### Install and Use Cognizone CLI Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Demonstrates how to install the Cognizone CLI globally and then use it to execute commands. It also shows how to get version and help information. ```sh-session $ npm install -g @cognizone/cli $ cz-cli COMMAND running command... $ cz-cli (--version) @cognizone/cli/0.0.0 darwin-arm64 node-v16.18.1 $ cz-cli --help [COMMAND] USAGE $ cz-cli COMMAND ... ``` -------------------------------- ### cz-cli plugins:install PLUGIN... Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Installs one or more plugins into the Cognizone CLI. Plugins can be installed from npm, a git URL, or a GitHub repository path. ```APIDOC ## cz-cli plugins:install PLUGIN... ### Description Installs a plugin into the CLI. Can be installed from npm or a git url. ### Method CLI COMMAND ### Endpoint cz-cli plugins:install PLUGIN... ### Parameters #### Arguments - **PLUGIN** (string) - The name or URL of the plugin to install. #### Flags - **-f, --force** (boolean) - Run yarn install with force flag. - **-h, --help** (boolean) - Show CLI help. - **-v, --verbose** (boolean) - Enable verbose output. ### Request Example ```sh cz-cli plugins:install myplugin cz-cli plugins:install https://github.com/someuser/someplugin cz-cli plugins:install someuser/someplugin ``` ### Response #### Success Response (0) - **Output**: Confirmation message of successful installation. ``` -------------------------------- ### POST /cognizone/ng-cognizone/plugins:install Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Installs one or more plugins into the Cognizone CLI. Plugins can be installed from npm or a git URL. Installing a user-defined plugin can override core plugin functionality. ```APIDOC ## POST /cognizone/ng-cognizone/plugins:install ### Description Installs one or more plugins into the Cognizone CLI. Plugins can be installed from npm or a git URL. Installing a user-defined plugin can override core plugin functionality. ### Method POST ### Endpoint /cognizone/ng-cognizone/plugins:install ### Parameters #### Query Parameters - **PLUGIN** (string) - Required - The name or URL of the plugin to install. - **force** (boolean) - Optional - Run yarn install with the force flag. ### Request Example ```json { "PLUGIN": "myplugin", "force": false } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the plugin was installed. #### Response Example ```json { "message": "Plugin 'myplugin' installed successfully." } ``` ``` -------------------------------- ### Start Local Development Server using npm Source: https://github.com/cognizone/ng-cognizone/blob/main/apps/docs/README.md Starts a local development server for live previewing changes. The server typically runs on localhost:3000 and hot-reloads most modifications. ```bash npm start ``` -------------------------------- ### Install Plugins for CZ-CLI Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Installs plugins into the Cognizone CLI from npm or a git URL. This command can override core plugins and supports forcing the installation. ```sh USAGE $ cz-cli plugins:install PLUGIN... ARGUMENTS PLUGIN Plugin to install. FLAGS -f, --force Run yarn install with force flag. -h, --help Show CLI help. -v, --verbose DESCRIPTION Installs a plugin into the CLI. Can be installed from npm or a git url. Installation of a user-installed plugin will override a core plugin. e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in the CLI without the need to patch and update the whole CLI. ALIASES $ cz-cli plugins add EXAMPLES $ cz-cli plugins:install myplugin $ cz-cli plugins:install https://github.com/someuser/someplugin $ cz-cli plugins:install someuser/someplugin ``` -------------------------------- ### Install Dependencies using npm Source: https://github.com/cognizone/ng-cognizone/blob/main/apps/docs/README.md Installs all necessary project dependencies using npm. This is a prerequisite for local development and building the project. ```bash npm i ``` -------------------------------- ### cz-cli plugins Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Lists all installed plugins for the Cognizone CLI. ```APIDOC ## cz-cli plugins ### Description List installed plugins. ### Method CLI COMMAND ### Endpoint cz-cli plugins ### Parameters #### Flags - **--core** (boolean) - Show core plugins. - **-h, --help** (boolean) - Show CLI help. ### Request Example ```sh cz-cli plugins cz-cli plugins --core ``` ### Response #### Success Response (0) - **Output**: A list of installed plugins. ``` -------------------------------- ### cz-cli plugins:inspect PLUGIN... Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Displays installation properties of a specified plugin. ```APIDOC ## cz-cli plugins:inspect PLUGIN... ### Description Displays installation properties of a plugin. ### Method CLI COMMAND ### Endpoint cz-cli plugins:inspect PLUGIN... ### Parameters #### Arguments - **PLUGIN** (string) - The plugin to inspect. Defaults to the current directory if not specified. #### Flags - **-h, --help** (boolean) - Show CLI help. - **-v, --verbose** (boolean) - Enable verbose output. ### Request Example ```sh cz-cli plugins:inspect myplugin ``` ### Response #### Success Response (0) - **Output**: Detailed properties of the specified plugin. ``` -------------------------------- ### Adapt tsconfig.json for Paths and Strictness Source: https://github.com/cognizone/ng-cognizone/blob/main/apps/docs-app/src/app/features/architecture/views/getting-started/getting-started.component.html Example of modifying the root tsconfig.json file to include path mappings for cleaner imports and enabling strict type checking. Strict flags enhance TypeScript compiler checks. ```json { "compilerOptions": { "strict": true, "paths": { "@app/*": ["app/*"], "@env/*": ["environments/*"] } } } ``` -------------------------------- ### List Installed CZ-CLI Plugins Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Lists all plugins installed in the Cognizone CLI. It also provides an option to show only core plugins. ```sh USAGE $ cz-cli plugins [--core] FLAGS --core Show core plugins. DESCRIPTION List installed plugins. EXAMPLES $ cz-cli plugins ``` -------------------------------- ### Create New Angular Application Source: https://github.com/cognizone/ng-cognizone/blob/main/apps/docs-app/src/app/features/architecture/views/getting-started/getting-started.component.html Command to create a new Angular application with routing and SCSS styling. It's recommended to follow the Angular tutorial for an introduction to the environment. ```bash ng new my-application-name --routing --style=scss ``` -------------------------------- ### Start Library Build and Sync Source: https://github.com/cognizone/ng-cognizone/blob/main/README.md Commands to run in the root of a library to initiate its build process and synchronize changes. These commands are typically run in separate terminals alongside the main application's development server. ```bash npm run start:build ``` ```bash npm run start:sync ``` -------------------------------- ### Get Help for CZ-CLI Commands Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Displays help information for the Cognizone CLI and its specific commands. It can also include nested commands in the output. ```sh USAGE $ cz-cli help [COMMAND] [-n] ARGUMENTS COMMAND Command to show help for. FLAGS -n, --nested-commands Include all nested commands in the output. DESCRIPTION Display help for cz-cli. ``` -------------------------------- ### POST /cognizone/ng-cognizone/plugins:update Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Updates all installed plugins in the Cognizone CLI. ```APIDOC ## POST /cognizone/ng-cognizone/plugins:update ### Description Updates all installed plugins in the Cognizone CLI. ### Method POST ### Endpoint /cognizone/ng-cognizone/plugins:update ### Parameters No specific parameters are required for this action. ### Request Example ```json {} ``` -------------------------------- ### Inspect CZ-CLI Plugin Properties Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Displays installation properties of a specified plugin in the Cognizone CLI. Defaults to inspecting the current directory if no plugin is specified. ```sh USAGE $ cz-cli plugins:inspect PLUGIN... ARGUMENTS PLUGIN [default: .] Plugin to inspect. FLAGS -h, --help Show CLI help. -v, --verbose DESCRIPTION Displays installation properties of a plugin. EXAMPLES $ cz-cli plugins:inspect myplugin ``` -------------------------------- ### Run Unit Tests for User Action Library (Nx) Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/user-action/api/index.html This command executes the unit tests for the 'user-action' library within the Nx project. Ensure you have Nx installed and configured in your project to run this command. It helps verify the functionality and integrity of the user-action module. ```bash nx test user-action ``` -------------------------------- ### Run Unit Tests for Elastic Explorer Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/elastic-explorer/api/index.html This command demonstrates how to run unit tests specifically for the 'elastic-explorer' package using the Nx build system. Ensure you have Nx installed and configured in your project. ```bash nx test elastic-explorer ``` -------------------------------- ### Run Unit Tests for Ng-Cognizone Devtools Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/devtools/api/index.html This command executes the unit tests for the Ng-Cognizone Devtools library using the Nx build system. Ensure you have Nx installed and configured in your project to run this command. ```bash nx test devtools ``` -------------------------------- ### Run Nx Angular Development Server Source: https://github.com/cognizone/ng-cognizone/blob/main/README.md Starts the development server for a specified Angular application within the Nx workspace. The server is accessible at http://localhost:4200/ and provides hot reloading for source file changes. ```bash ng serve my-app ``` -------------------------------- ### Disable TSLint Rules for a File Source: https://github.com/cognizone/ng-cognizone/blob/main/apps/docs-app/src/app/features/architecture/views/getting-started/getting-started.component.html Shows how to disable TSLint rules for the rest of the file starting from a specific line. 'no-import-side-effect' and 'ordered-imports' are disabled globally for the file. ```typescript // tslint:disable:no-import-side-effect ordered-imports // ... rest of the file ``` -------------------------------- ### Execute Unit Tests for i18n-transloco Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/i18n-transloco/api/index.html This command executes the unit tests for the i18n-transloco library using the Nx build system. Ensure Nx is installed and configured in your project to run this command. It's a standard way to verify the correctness of the library's components. ```bash nx test i18n-transloco ``` -------------------------------- ### CollectionCvProvider Constructor Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/CollectionCvProvider/index.html Details the parameters required to instantiate the CollectionCvProvider, including various services and configuration objects. ```APIDOC ## CollectionCvProvider Constructor ### Description This section details the parameters used in the constructor of the `CollectionCvProvider` class. ### Method `constructor` ### Endpoint N/A (Class Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ##### Constructor Parameters - **cvService** (`CvStateService`) - Required - The CV state service. - **atomicCvClient** (`AtomicCvClient`) - Required - The atomic CV client. - **matcher** (`ConceptMatcherService`) - Required - The concept matcher service. - **config** (`AtomicCvProviderConfig`) - Required - The configuration for the atomic CV provider. - **options** (`LegiCvOptions`) - Required - Options for the Legi CV provider. ### Request Example ```json { "cvService": "CvStateServiceInstance", "atomicCvClient": "AtomicCvClientInstance", "matcher": "ConceptMatcherServiceInstance", "config": { /* AtomicCvProviderConfig object */ }, "options": { /* LegiCvOptions object */ } } ``` ### Response N/A (Constructor) #### Success Response (N/A) #### Response Example N/A ``` -------------------------------- ### ApplicationProfile Interface Example (JSON) Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/application-profile/api/interfaces/ApplicationProfile/index.html An example of the ApplicationProfile interface in JSON format. It demonstrates the structure with a URI and nested TypeProfile objects for different classes like 'Animal', 'Cat', and 'Dog'. The 'types' property is a map where keys are class IDs and values are TypeProfile objects. ```JSON { "uri": "http://my-domain/my-ap", "types": { "Animal": {...}, "Cat": {...}, "Dog": {...} } } ``` -------------------------------- ### Update Transloco Imports and Setup for jsverse/transloco Source: https://github.com/cognizone/ng-cognizone/blob/main/README.md Angular applications migrating from v3 to v4 need to update their Transloco setup. Transloco has moved from `@ngneat/transloco` to `@jsverse/transloco`. This change requires updating import paths and potentially adjusting how the main and locale modules are configured according to the official `@jsverse/transloco` documentation. ```typescript // Old import (example) // import { TranslocoModule } from '@ngneat/transloco'; // New import (example) import { TranslocoModule } from '@jsverse/transloco'; // Ensure your module setup aligns with jsverse/transloco documentation // for both main module and locale configuration. ``` -------------------------------- ### Build Static Website using npm Source: https://github.com/cognizone/ng-cognizone/blob/main/apps/docs/README.md Generates the static content for the website into the 'docs' directory. The output can be deployed to any static hosting service. ```bash npm run build ``` -------------------------------- ### cz-cli help [COMMAND] Source: https://github.com/cognizone/ng-cognizone/blob/main/libs/cli/README.md Displays help information for the Cognizone CLI or specific commands. ```APIDOC ## cz-cli help [COMMAND] ### Description Display help for cz-cli. ### Method CLI COMMAND ### Endpoint cz-cli help [COMMAND] ### Parameters #### Arguments - **COMMAND** (string) - The command to show help for. If not specified, general help is shown. #### Flags - **-h, --help** (boolean) - Show CLI help. - **-n, --nested-commands** (boolean) - Include all nested commands in the output. ### Request Example ```sh cz-cli help create-ap-types cz-cli --help ``` ### Response #### Success Response (0) - **Output**: Help text for the specified command or general CLI help. ``` -------------------------------- ### UserActionModule API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/user-action/api/classes/UserActionModule/index.html Documentation for the UserActionModule class, including its constructor and the static withOptions method. ```APIDOC ## Class: UserActionModule ### Description The `UserActionModule` class is part of the Ng-Cognizone project and is responsible for handling user actions. It provides a static method `withOptions` for configuration. ### Constructors #### constructor * **new UserActionModule**() * Initializes a new instance of the `UserActionModule`. ### Methods #### Static: withOptions * `Static` **withOptions**(`options?`) * **Description**: Configures the `UserActionModule` with optional settings. * **Parameters**: * `options` (`UserActionsModuleOptions`): Optional configuration object for user actions. * **Returns**: `ModuleWithProviders` - The module with providers configured for user actions. * **Defined in**: `libs/user-action/src/lib/user-action.module.ts:48` ``` -------------------------------- ### Get All Properties Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/model-utils/api/modules/index.html Retrieves all enumerable properties of a given object, including those up the prototype chain. ```APIDOC ## getAllProperties ### Description Get all properties of the given object, and goes up the prototype chain. This is mostly useful for debugging purposes and javascript digging. ### Method Not applicable (this is a function signature, not an HTTP endpoint). ### Endpoint Not applicable. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```javascript const myObject = { prop1: 'value1' }; const proto = Object.create(myObject); proto.protoProp = 'protoValue'; const instance = Object.create(proto); instance.instanceProp = 'instanceValue'; getAllProperties(instance); ``` ### Response #### Success Response (200) - **string[]**: An array of strings, where each string is a property name. #### Response Example ```json [ "instanceProp", "protoProp", "prop1" ] ``` #### Defined in `lib/utils/get-all-properties.ts:5` ``` -------------------------------- ### getDefaultFontSetClass Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/material-icons/api/classes/CognizoneMatIconRegistry/index.html Gets the default CSS class name for icon fonts when no specific font set is provided. ```APIDOC ## getDefaultFontSetClass ### Description Returns the CSS class name to be used for icon fonts when an `` component does not have a fontSet input value, and is not loading an icon by name or URL. ### Method GET ### Endpoint `/cognizone/ng-cognizone/icon-registry/default-font-set-class` ### Parameters None ### Response #### Success Response (200) - **fontSetClass** (string) - The default CSS class name for icon fonts. #### Response Example { "fontSetClass": "mat-icon-font" } ``` -------------------------------- ### formControlName API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-shared/api/classes/input.InputComponent/index.html Allows getting and setting the name of the form control, typically used within Angular forms. ```APIDOC ## GET /formControlName ### Description Retrieves the name of the form control. ### Method GET ### Endpoint /formControlName ### Parameters None ### Response #### Success Response (200) - **formControlName** (Maybe) - The name of the form control or null if not set. #### Response Example ```json { "formControlName": "exampleName" } ``` ## SET /formControlName ### Description Sets the name of the form control. ### Method SET ### Endpoint /formControlName ### Parameters #### Request Body - **value** (Maybe) - The name of the form control to set. ### Response #### Success Response (200) - Returns void. #### Response Example ```json // No response body for void return type ``` ``` -------------------------------- ### ConceptSchemeCvProvider Constructor Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/ConceptSchemeCvProvider/index.html The constructor for the ConceptSchemeCvProvider class initializes it with several dependencies. ```APIDOC ## Constructor ConceptSchemeCvProvider ### Description Initializes the ConceptSchemeCvProvider with the provided services and configurations. ### Method Constructor ### Endpoint N/A (Class Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **cvService** (`CvStateService`) - The service for managing CV states. - **atomicCvClient** (`AtomicCvClient`) - The client for atomic CV operations. - **matcher** (`ConceptMatcherService`) - The service for matching concepts. - **config** (`AtomicCvProviderConfig`) - The configuration object for the CV provider. - **options** (`LegiCvOptions`) - Optional settings for the LEGI CV provider. ### Request Example (Not applicable for a constructor) ### Response (Not applicable for a constructor) ``` -------------------------------- ### Helper Methods Source: https://github.com/cognizone/ng-cognizone/blob/main/apps/docs-app/src/app/features/packages-doc/features/ng-core-doc/views/on-destroy-mixin-doc/on-destroy-mixin-doc.component.html Explains the `firstUntilDestroyed()` helper and the `OnDestroy$` class. ```APIDOC ## Helper Methods ### firstUntilDestroyed() #### Description A combination of `first()` and `untilDestroyed()`. It emits the first value from the source observable and then completes, while also ensuring automatic unsubscription upon component destruction. #### Example ```typescript import { firstUntilDestroyed } from '@cognizone/ng-core'; import { of } from 'rxjs'; of('first value') .pipe(firstUntilDestroyed(this)) .subscribe(value => console.log(value)); // Logs 'first value' and then completes ``` ### OnDestroy$ Class #### Description A simple wrapper for `OnDestroyMixin(class {{ '{' }}})`. It provides the same functionality as `OnDestroyMixin` but in a class format. #### Example ```typescript import { OnDestroy$ } from '@cognizone/ng-core'; export class MyService extends OnDestroy$ { // Use OnDestroy$ as a mixin for services or other classes // The onDestroy$ observable is available on this instance } ``` ``` -------------------------------- ### Get Label As String - CvProvider Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/AtomicCvProvider/index.html Converts a concept's label into a string representation for a specified language. This protected method is defined in atomic-cv-provider.ts. ```typescript protected getLabelAsString(label: CzLabel, lang: string): string ``` -------------------------------- ### CvSelectOptionsProvider API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/CvSelectOptionsProvider/index.html Documentation for the CvSelectOptionsProvider class, including its constructor and the getOptions method. ```APIDOC ## CvSelectOptionsProvider ### Description Provides select options for CV (Curriculum Vitae) related functionalities. It implements the SelectOptionsProvider interface. ### Constructor #### new CvSelectOptionsProvider(cvProvider: CvProvider) **Parameters**: * `cvProvider` (CvProvider) - The CV provider service to fetch data from. #### Defined in libs/legi-cv/src/lib/services/cv-select-options-provider.ts:18 ### Methods #### getOptions(query: Nil, params: GetSelectOptionsParams): Observable<(SelectOption | SelectOptionGroup)[]> Retrieves a list of select options based on a query and additional parameters. **Parameters**: * `query` (Nil) - The search query string. * `params` (GetSelectOptionsParams) - Additional parameters for fetching options. **Returns**: Observable<(SelectOption | SelectOptionGroup)[]> - An observable that emits an array of select options or option groups. ``` -------------------------------- ### Get Concept Sorter - CvProvider Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/AtomicCvProvider/index.html Provides a sorter for concept wrappers, used internally for ordering concepts. This protected method is defined in atomic-cv-provider.ts. ```typescript protected getConceptSorter(params: GetSelectOptionsParams): Sorter> ``` -------------------------------- ### Get Lang String Value Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/model-utils/api/modules/index.html Extracts a localized string value from a LangString object, with fallback language support. ```APIDOC ## getLangStringValue ### Description Extract from a [LangString](/ng-cognizone/docs/libraries/model-utils/api/interfaces/LangString) the label in a corresponding `lang`. If not found, it will try to extract the label of one of the fallback languages. If even there nothing is found, it will fallback to the first label found. It is to be noted that even if the label is a string[] with multiple values, only the 0th element will be taken. ### Method Not applicable (this is a function signature, not an HTTP endpoint). ### Endpoint Not applicable. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```javascript const langString = { en: 'English Value', fr: ['French Value 1', 'French Value 2'] }; getLangStringValue(langString, 'fr'); // Returns 'French Value 1' getLangStringValue(langString, 'es', ['en']); // Returns 'English Value' getLangStringValue(langString, 'de'); // Returns 'English Value' (falls back to first available) ``` ### Response #### Success Response (200) - **string | undefined**: The extracted string value, or undefined if no value could be found. #### Response Example ```json "French Value 1" ``` #### Defined in `lib/utils/get-lang-string-value.ts:15` ``` -------------------------------- ### PermissionsService API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/permissions/api/classes/PermissionsService/index.html Documentation for the PermissionsService, including its constructor, properties, and methods for managing permissions. ```APIDOC ## Class: PermissionsService ### Description Provides functionality for managing and checking user permissions within the Ng-Cognizone application. ### Constructor * **new PermissionsService**(permissionsProvider: [`PermissionsProvider`](/ng-cognizone/docs/libraries/permissions/api/interfaces/PermissionsProvider)) * Initializes the PermissionsService with a `permissionsProvider`. ### Properties * **permissions$**: `Observable`<`string`[]> * An observable stream of the user's current permissions. * Defined in: `libs/permissions/src/lib/services/permissions.service.ts:10` ### Methods * **getPermissions**(): `Observable`<`string`[]> * A private method to retrieve the observable stream of permissions. * Defined in: `libs/permissions/src/lib/services/permissions.service.ts:20` * **hasPermissions**(`permissions`: `Nil`<`Many`<`string`>>): `Observable`<`boolean`> * Checks if the user has the specified permissions. * **Parameters**: * `permissions` (`Nil`<`Many`<`string`>>): A single permission string or an array of permission strings to check. * **Returns**: An observable boolean indicating whether the user has the required permissions. ``` -------------------------------- ### model API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-shared/api/classes/input.InputComponent/index.html Handles the data model bound to a component, allowing for getting and setting the component's primary data. ```APIDOC ## GET /model ### Description Retrieves the current data model of the component. ### Method GET ### Endpoint /model ### Parameters None ### Response #### Success Response (200) - **model** (MODEL) - The current data model. #### Response Example ```json { "model": { ... data model ... } } ``` ## SET /model ### Description Sets the data model for the component. ### Method SET ### Endpoint /model ### Parameters #### Request Body - **value** (MODEL) - The data model to set. ### Response #### Success Response (200) - Returns void. #### Response Example ```json // No response body for void return type ``` ``` -------------------------------- ### Get Collection Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/interfaces/AtomicCvClient/index.html Retrieves a collection of concepts based on a provided URI. This method is generic and can return a collection of specific concept types. ```APIDOC ## GET /api/collections/{uri} ### Description Retrieves a collection of concepts identified by its URI. This endpoint supports generic collections, enabling retrieval of typed concept lists. ### Method GET ### Endpoint `/api/collections/{uri}` ### Parameters #### Path Parameters - **uri** (string) - Required - The unique identifier (URI) of the collection to retrieve. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Collection** (object) - Returns a collection object, where T is the type of concepts within the collection. #### Response Example ```json { "@context": "http://schema.org", "@type": "Collection", "uri": "http://example.com/collection/456", "title": "Example Collection", "member": [ { "@type": "Concept", "uri": "http://example.com/concept/abc", "prefLabel": "Concept A" }, { "@type": "Concept", "uri": "http://example.com/concept/def", "prefLabel": "Concept B" } ] } ``` ``` -------------------------------- ### LegiCvModule API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/LegiCvModule/index.html Documentation for the LegiCvModule class, including its constructor and static methods. ```APIDOC ## Class: LegiCvModule ### Description Represents the main module for the Legi-CV feature in Ng-Cognizone. ### Methods #### Static `forRoot` ▸ `Static` **forRoot**(`options?`): `ModuleWithProviders`<[`LegiCvModule`](/ng-cognizone/docs/libraries/legi-cv/api/classes/LegiCvModule)> ##### Description Provides configuration options for the LegiCvModule. ##### Parameters - **options** (`LegiCvOptions`) - Optional - Configuration options for the module. Defaults to `DEFAULT_LEGI_CV_OPTIONS`. ##### Returns - `ModuleWithProviders`<[`LegiCvModule`](/ng-cognizone/docs/libraries/legi-cv/api/classes/LegiCvModule)> - The module with providers. ### Constructors #### `constructor` • **new LegiCvModule**() ##### Description Initializes a new instance of the LegiCvModule. ``` -------------------------------- ### NgYasguiModule API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/ng-yasgui/api/classes/NgYasguiModule/index.html Documentation for the NgYasguiModule class, including its constructor. ```APIDOC ## Class: NgYasguiModule ### Description Provides the core functionality for the Yasgui component within the Ng-Cognizone library. ### Method N/A ### Endpoint N/A ### Constructors #### constructor - **new NgYasguiModule**() - Initializes a new instance of the NgYasguiModule. ### Request Body N/A ### Request Example N/A ### Response #### Success Response (N/A) N/A #### Response Example N/A ``` -------------------------------- ### Get Concept By URI - CvProvider Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/AtomicCvProvider/index.html Retrieves a concept using its Uniform Resource Identifier (URI). This method is part of the CvProvider interface and is defined in atomic-cv-provider.ts. ```typescript getConceptByUri(uri: string): Observable ``` -------------------------------- ### Get Available Simple Languages - TypeScript Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/i18n/api/classes/I18nService/index.html Retrieves a list of available languages in a short format (e.g., 'en'). This method is abstract and part of the I18nService. ```typescript /** * @description the list of available langs, in short format * @returns {string[]} the list of available langs, in short format */ abstract getAvailableSimpleLangs(): string[]; ``` -------------------------------- ### CvService API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/CvService/index.html Documentation for the CvService class, including its constructor and methods. ```APIDOC ## Class: CvService ### Description Provides services for managing and retrieving concept vocabulary (CV) data. ### Constructor * **new CvService**(`providers`) * **Parameters**: * `providers` (CvProvider[]) - An array of CvProvider instances to supply CV data. * **Defined in**: libs/legi-cv/src/lib/services/cv.service.ts:12 ### Methods #### getAllOptions * **getAllOptions**(`cvName`) * **Description**: Retrieves all available options for a given CV name. * **Parameters**: * `cvName` (Many) - The name(s) of the CV to retrieve options for. * **Returns**: Observable[]> * **Defined in**: libs/legi-cv/src/lib/services/cv.service.ts ``` -------------------------------- ### Get All Select Options Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/model-utils/api/modules/index.html Flattens a list of select options and nested select option groups into a single flat list. ```APIDOC ## getAllSelectOptions ### Description `getAllSelectOptions` spread options and sub options into one flat list of options. ### Method Not applicable (this is a function signature, not an HTTP endpoint). ### Endpoint Not applicable. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```javascript const options = [ { value: '1', label: 'Option 1' }, { label: 'Group 1', options: [ { value: '2', label: 'Sub Option 2' }, { value: '3', label: 'Sub Option 3' } ] } ]; getAllSelectOptions(options); ``` ### Response #### Success Response (200) - **SelectOption[]**: A flat array of `SelectOption` objects. #### Response Example ```json [ { "value": "1", "label": "Option 1" }, { "value": "2", "label": "Sub Option 2" }, { "value": "3", "label": "Sub Option 3" } ] ``` #### Defined in `lib/utils/get-all-select-options.ts:6` ``` -------------------------------- ### Get Options in AutocompleteComponent (TypeScript) Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-shared/api/classes/autocomplete.AutocompleteComponent/index.html This getter retrieves the list of available options for the autocomplete component. Each option is of type SelectOption. These options are used to populate the dropdown. ```typescript get options(): SelectOption[]; ``` -------------------------------- ### Get Label - CvProvider Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/AtomicCvProvider/index.html Retrieves a localized label for a given concept. This method returns a Completable object that resolves to a LangString. Implemented in CvProvider and defined in atomic-cv-provider.ts. ```typescript getLabel(concept: T): Completable ``` -------------------------------- ### Static Methods: [hasInstance], apply, bind Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/CvLabelDirective/index.html This section details static methods available on the `OnDestroy$` class, including `[hasInstance]`, `apply`, and `bind`. These methods provide utility functions for instance checking, function invocation with specific context and arguments, and creating bound functions. ```APIDOC ## Static Methods: [hasInstance], apply, bind ### Description Provides static utility methods for instance checking, function invocation, and function binding. ### Method Static Methods ### Endpoint N/A (Static Methods) ### Parameters N/A ### Request Example ```typescript // Example for [hasInstance] const instance = {}; const isInstance = OnDestroy$.[hasInstance](instance); // Example for apply function greet(message) { console.log(message + ', ' + this.name); } const person = { name: 'Alice' }; OnDestroy$.apply(person, ['Hello']) // Example for bind function multiply(a, b) { return a * b; } const boundMultiply = OnDestroy$.bind(null, 5); boundMultiply(10); // returns 50 ``` ### Response #### Success Response (N/A) These methods perform actions or return values based on their specific utility. #### Response Example N/A ``` -------------------------------- ### FormControl Get Method Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/ng-core/api/classes/DisabledControl/index.html Retrieves a child control given the control's name or path. Supports nested controls and controls within FormArrays. ```APIDOC ## GET /cognizone/ng-cognizone/get ### Description Retrieves a child control given the control's name or path. Supports nested controls and controls within FormArrays. ### Method GET ### Endpoint /cognizone/ng-cognizone/get ### Parameters #### Query Parameters - **path** (string | Array) - Required - A dot-delimited string or array of string/number values that define the path to the control. ### Request Example ```json { "path": "person.name" } ``` -OR- ```json { "path": ["person", "name"] } ``` ### Response #### Success Response (200) - **control** (AbstractControl | null) - The retrieved AbstractControl or null if not found. #### Response Example ```json { "control": { ... AbstractControl object ... } } ``` ``` -------------------------------- ### CollectionCvProvider Constructor Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/CollectionCvProvider/index.html Details of the CollectionCvProvider constructor, including its parameters and their types. ```APIDOC ## CollectionCvProvider Constructor ### Description Initializes a new instance of the CollectionCvProvider class. ### Method `constructor` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "cvService": "any", "atomicCvClient": "any", "matcher": "any", "config": "any", "options": "any" } ``` ### Response #### Success Response (200) This is a constructor, it does not return a value. #### Response Example N/A ``` -------------------------------- ### GraphWrapperFactory API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/json-model-graph/api/classes/GraphWrapperFactory/index.html Documentation for the GraphWrapperFactory class, including its constructor and methods. ```APIDOC ## GraphWrapperFactory ### Description Provides factory methods for creating GraphWrapper instances. ### Constructor #### Parameters - **graphService** (GraphService) - Required - The GraphService instance. - **jsonModelService** (JsonModelService) - Required - The JsonModelService instance. ### Methods (No methods are detailed in the provided text.) ### Source Code Location libs/json-model-graph/src/lib/services/graph-wrapper.factory.ts ``` -------------------------------- ### Get OptionsProvider in CheckboxGroupComponent (TypeScript) Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-shared/api/classes/checkbox_group.CheckboxGroupComponent/index.html This getter in CheckboxGroupComponent retrieves the SelectOptionsProvider. It's part of the HasOptionsProvider interface and returns a SelectOptionsProvider of type T. ```typescript /** * Gets the options provider for the checkbox group. * @returns The SelectOptionsProvider instance. */ get optionsProvider(): SelectOptionsProvider { // Implementation details } ``` -------------------------------- ### YasguiService API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/ng-yasgui/api/classes/YasguiService/index.html Details of the YasguiService, including its constructor, properties, and methods. ```APIDOC ## YasguiService API ### Description Provides functionality related to the Yasgui component within the Ng-Cognizone library. This service manages the loading and interaction with the Yasgui editor. ### Constructor * **new YasguiService**() * Initializes a new instance of the YasguiService. ### Properties * **assetsBasePath** (string) * The base path for Yasgui assets. Defaults to 'assets/ng-yasgui'. * Defined in: `lib/services/yasgui.service.ts:9` * **script** (HTMLScriptElement, optional, private) * A reference to the script element for Yasgui. * Defined in: `lib/services/yasgui.service.ts:11` * **style** (HTMLLinkElement, optional, private) * A reference to the style element for Yasgui. * Defined in: `lib/services/yasgui.service.ts:13` * **yasgui$** (Observable, optional, private) * An observable stream for the Yasgui instance. * Defined in: `lib/services/yasgui.service.ts:15` ### Methods * **clearYasguiCache**(): `void` (private) * Clears the Yasgui cache. * Defined in: `lib/services/yasgui.service.ts:47` * **loadYasgui**(): `Observable` * Loads the Yasgui component and returns an observable of the YASGUI instance. * Defined in: `lib/services/yasgui.service.ts:17` ``` -------------------------------- ### ApService Constructor Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/ng-application-profile/api/classes/ApService/index.html Documentation for the constructor of the ApService class, detailing its parameters and their types. ```APIDOC ## ApService Constructor ### Description This is the constructor for the ApService class. It initializes the service with necessary dependencies. ### Method constructor ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "apStore": "", "loaders": "" } ``` ### Response #### Success Response (200) N/A (Constructors do not return a response in the traditional sense). #### Response Example N/A ``` -------------------------------- ### formControl API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-shared/api/classes/input.InputComponent/index.html Provides methods to get and set the form control associated with a component. This is often used for form management and data binding. ```APIDOC ## GET /formControl ### Description Retrieves the form control associated with the current component. ### Method GET ### Endpoint /formControl ### Parameters None ### Response #### Success Response (200) - **formControl** (Maybe) - The AbstractControl instance or null if not set. #### Response Example ```json { "formControl": { ... AbstractControl object ... } } ``` ## SET /formControl ### Description Sets the form control for the current component. ### Method SET ### Endpoint /formControl ### Parameters #### Request Body - **value** (Maybe) - The AbstractControl instance to set. ### Response #### Success Response (200) - Returns void. #### Response Example ```json // No response body for void return type ``` ``` -------------------------------- ### Static Methods and Symbol Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-shared/api/classes/autocomplete.AutocompleteComponent/index.html Documentation for static methods and the Symbol.hasInstance for the ControlComponent. ```APIDOC ## Static Methods and Symbol ### Description Documentation for static methods and the Symbol.hasInstance for the ControlComponent. ### Methods #### `[hasInstance](value)` ##### Description Determines whether the given value inherits from this function if this function was used as a constructor function. A constructor function can control which objects are recognized as its instances by 'instanceof' by overriding this method. ##### Parameters - **value** (any) - The value to check. ##### Returns - `boolean`: True if the value is an instance, false otherwise. ##### Defined in `apps/docs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:162` * * * #### `apply(thisArg)` ##### Description Calls the function with the specified object as the `this` value and the elements of the specified array as the arguments. ##### Type Parameters - `T` ##### Parameters - **thisArg** (T) - The object to be used as the `this` object. ##### Returns - `void` ##### Defined in `apps/docs/node_modules/typescript/lib/lib.es5.d.ts:364` * * * #### `apply(thisArg, args)` ##### Description Calls the function with the specified object as the `this` value and the elements of the specified array as the arguments. ##### Type Parameters - `T` - `A` extends `any[]` ##### Parameters - **thisArg** (T) - **args** (A) ##### Returns - `void` ##### Defined in `apps/docs/node_modules/typescript/lib/lib.es5.d.ts:365` * * * #### `apply(thisArg, argArray?)` ##### Description Calls the function, substituting the specified object for the `this` value of the function, and the specified array for the arguments of the function. ##### Parameters - **thisArg** - **argArray?** ##### Returns - `any` ##### Inherited from ControlComponent.apply ##### Defined in `apps/docs/node_modules/typescript/lib/lib.es5.d.ts:364` ``` -------------------------------- ### Get Concept Scheme Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/interfaces/AtomicCvClient/index.html Retrieves a concept scheme based on a provided URI. This method is generic and can return a concept scheme of a specific type T. ```APIDOC ## GET /api/concept-schemes/{uri} ### Description Retrieves a concept scheme identified by its URI. This endpoint is designed to be generic, allowing for typed concept schemes. ### Method GET ### Endpoint `/api/concept-schemes/{uri}` ### Parameters #### Path Parameters - **uri** (string) - Required - The unique identifier (URI) of the concept scheme to retrieve. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **ConceptScheme** (object) - Returns a concept scheme object, where T is the type of concepts within the scheme. #### Response Example ```json { "@context": "http://schema.org", "@type": "ConceptScheme", "uri": "http://example.com/concept-scheme/123", "title": "Example Concept Scheme", "description": "A sample concept scheme.", "concepts": [ { "@type": "Concept", "uri": "http://example.com/concept/abc", "prefLabel": "Concept A" } ] } ``` ``` -------------------------------- ### NgApplicationProfileModule Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/ng-application-profile/api/classes/NgApplicationProfileModule/index.html Documentation for the NgApplicationProfileModule class, including its constructor and static methods. ```APIDOC ## Class: NgApplicationProfileModule ### Description Represents the NgApplicationProfileModule in the ng-cognizone project. ### Constructors #### constructor - **new NgApplicationProfileModule**() ### Methods #### forRoot - `Static` **forRoot**(): `ModuleWithProviders`<`NgApplicationProfileModuleRoot`> #### Returns `ModuleWithProviders`<`NgApplicationProfileModuleRoot`> ### Request Example ```json { "example": "No request body for this method." } ``` ### Response #### Success Response (200) - **ModuleWithProviders** (`NgApplicationProfileModuleRoot`): Returns configuration for the module. #### Response Example ```json { "example": "Returns a ModuleWithProviders object." } ``` ``` -------------------------------- ### Get CV - CvProvider Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/legi-cv/api/classes/AtomicCvProvider/index.html Fetches CV data based on a query and selection parameters. It returns an Observable emitting an array of results. Implemented in CvProvider and defined in atomic-cv-provider.ts. ```typescript getCv(query: Nil, params: GetSelectOptionsParams): Observable ``` -------------------------------- ### SelectOptionsProvider Interface API Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/model-utils/api/interfaces/SelectOptionsProvider/index.html Documentation for the SelectOptionsProvider interface and its associated methods within the Ng-Cognizone model-utils library. ```APIDOC ## Interface: SelectOptionsProvider ### Description Any service or other that provides an array of SelectOption should implement this interface for consistency and interoperability. ### Type Parameters * **T**: The type parameter for the SelectOptionsProvider. ### Implemented By * `SelectOptionsProvidersMerger` ### Methods #### getOptions ##### Description Given the query, will return a filtered array of `SelectOption` that all matches. ##### Method Not applicable (this is an interface method signature) ##### Endpoint Not applicable (this is an interface method signature) ##### Parameters ###### Query Parameters * **query** (`Nil`) - Required - The search query string. * **params** (`GetSelectOptionsParams`) - Required - Additional parameters for fetching select options. ###### Request Body None ##### Request Example None (interface method signature) ##### Response ###### Success Response (Observable) * **(SelectOption | SelectOptionGroup)[]**: An array of SelectOption or SelectOptionGroup objects. ###### Response Example ```json [ { "value": "option1", "label": "Option 1" }, { "value": "group1", "label": "Group 1", "options": [ { "value": "option1_1", "label": "Option 1.1" } ] } ] ``` ``` -------------------------------- ### Build Nx Angular Application Source: https://github.com/cognizone/ng-cognizone/blob/main/README.md Builds the specified Angular application for deployment. The build artifacts are placed in the `dist/` directory. A `--prod` flag can be used for production builds. ```bash ng build my-app ``` -------------------------------- ### Get User Actions Method in TypeScript Source: https://github.com/cognizone/ng-cognizone/blob/main/docs/docs/libraries/user-action/api/classes/UserActionTableComponent/index.html A private method within the user-action-table component responsible for retrieving user actions. It returns void and is not exposed externally. ```typescript getUserActions(): void; ```