277 lines
7.6 KiB
Markdown
Raw Normal View History

2022-10-17 23:58:51 -03:00
> **Warning**
>
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
>
2022-10-29 00:46:25 +05:30
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/modules/config.md](../../../../packages/mermaid/src/docs/config/setup/modules/config.md).
2022-10-15 00:50:11 -03:00
# Module: config
## Variables
2022-10-31 22:15:07 +05:30
### defaultConfig
2022-10-15 00:50:11 -03:00
`Const` **defaultConfig**: `MermaidConfig`
#### Defined in
2022-10-31 22:15:07 +05:30
[config.ts:7](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L7)
2022-10-15 00:50:11 -03:00
## Functions
2022-10-31 22:15:07 +05:30
### addDirective
2022-10-15 00:50:11 -03:00
**addDirective**(`directive`): `void`
Pushes in a directive to the configuration
#### Parameters
| Name | Type | Description |
| :---------- | :---- | :----------------------- |
| `directive` | `any` | The directive to push in |
#### Returns
`void`
#### Defined in
2022-11-10 13:51:53 +05:30
[config.ts:193](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L193)
2022-10-15 00:50:11 -03:00
---
2022-10-31 22:15:07 +05:30
### getConfig
2022-10-15 00:50:11 -03:00
**getConfig**(): `MermaidConfig`
## getConfig
| Function | Description | Type | Return Values |
| --------- | ------------------------- | ----------- | ------------------------------ |
| getConfig | Obtains the currentConfig | Get Request | Any Values from current Config |
**Notes**: Returns **any** the currentConfig
#### Returns
`MermaidConfig`
2022-10-25 17:54:07 -03:00
The currentConfig
2022-10-15 00:50:11 -03:00
#### Defined in
2022-11-10 13:51:53 +05:30
[config.ts:138](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L138)
2022-10-15 00:50:11 -03:00
---
2022-10-31 22:15:07 +05:30
### getSiteConfig
2022-10-15 00:50:11 -03:00
**getSiteConfig**(): `MermaidConfig`
## getSiteConfig
| Function | Description | Type | Values |
| ------------- | ------------------------------------------------- | ----------- | -------------------------------- |
| setSiteConfig | Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig |
**Notes**: Returns **any** values in siteConfig.
#### Returns
`MermaidConfig`
2022-10-25 17:54:07 -03:00
The siteConfig
2022-10-15 00:50:11 -03:00
#### Defined in
2022-11-10 13:51:53 +05:30
[config.ts:97](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L97)
2022-10-15 00:50:11 -03:00
---
2022-10-31 22:15:07 +05:30
### reset
2022-10-15 00:50:11 -03:00
**reset**(`config?`): `void`
## reset
| Function | Description | Type | Required | Values |
| -------- | ---------------------------- | ----------- | -------- | ------ |
| reset | Resets currentConfig to conf | Put Request | Required | None |
## conf
| Parameter | Description | Type | Required | Values |
| --------- | -------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- |
| conf | base set of values, which currentConfig could be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array |
**Notes**: (default: current siteConfig ) (optional, default `getSiteConfig()`)
#### Parameters
2022-10-25 17:54:07 -03:00
| Name | Type | Default value | Description |
| :------- | :-------------- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `config` | `MermaidConfig` | `siteConfig` | base set of values, which currentConfig could be **reset** to. Defaults to the current siteConfig (e.g returned by [getSiteConfig](config.md#getsiteconfig)). |
2022-10-15 00:50:11 -03:00
#### Returns
`void`
#### Defined in
2022-11-10 13:51:53 +05:30
[config.ts:225](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L225)
2022-10-15 00:50:11 -03:00
---
2022-10-31 22:15:07 +05:30
### sanitize
2022-10-15 00:50:11 -03:00
**sanitize**(`options`): `void`
## sanitize
| Function | Description | Type | Values |
| -------- | -------------------------------------- | ----------- | ------ |
| sanitize | Sets the siteConfig to desired values. | Put Request | None |
Ensures options parameter does not attempt to override siteConfig secure keys **Notes**: modifies
options in-place
#### Parameters
| Name | Type | Description |
| :-------- | :---- | :-------------------------------- |
| `options` | `any` | The potential setConfig parameter |
#### Returns
`void`
#### Defined in
2022-11-10 13:51:53 +05:30
[config.ts:153](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L153)
2022-10-15 00:50:11 -03:00
---
2022-10-31 22:15:07 +05:30
### saveConfigFromInitialize
2022-10-15 00:50:11 -03:00
**saveConfigFromInitialize**(`conf`): `void`
#### Parameters
| Name | Type |
| :----- | :-------------- |
| `conf` | `MermaidConfig` |
#### Returns
`void`
#### Defined in
2022-11-10 13:51:53 +05:30
[config.ts:76](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L76)
2022-10-15 00:50:11 -03:00
---
2022-10-31 22:15:07 +05:30
### setConfig
2022-10-15 00:50:11 -03:00
**setConfig**(`conf`): `MermaidConfig`
## setConfig
| Function | Description | Type | Values |
| ------------- | ------------------------------------- | ----------- | --------------------------------------- |
| setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
**Notes**: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure
keys. Any values found in conf with key found in siteConfig.secure will be replaced with the
corresponding siteConfig value.
#### Parameters
| Name | Type | Description |
| :----- | :-------------- | :-------------------------- |
| `conf` | `MermaidConfig` | The potential currentConfig |
#### Returns
`MermaidConfig`
2022-10-25 17:54:07 -03:00
The currentConfig merged with the sanitized conf
2022-10-15 00:50:11 -03:00
#### Defined in
2022-11-10 13:51:53 +05:30
[config.ts:114](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L114)
2022-10-15 00:50:11 -03:00
---
2022-10-31 22:15:07 +05:30
### setSiteConfig
2022-10-15 00:50:11 -03:00
**setSiteConfig**(`conf`): `MermaidConfig`
## setSiteConfig
| Function | Description | Type | Values |
| ------------- | ------------------------------------- | ----------- | --------------------------------------- |
| setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
**Notes:** Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls
to reset() will reset the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig)
will reset siteConfig and currentConfig to the defaultConfig Note: currentConfig is set in this
function _Default value: At default, will mirror Global Config_
#### Parameters
| Name | Type | Description |
| :----- | :-------------- | :------------------------------------------ |
| `conf` | `MermaidConfig` | The base currentConfig to use as siteConfig |
#### Returns
`MermaidConfig`
2022-10-25 17:54:07 -03:00
The new siteConfig
2022-10-15 00:50:11 -03:00
#### Defined in
2022-11-10 13:51:53 +05:30
[config.ts:62](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L62)
2022-10-15 00:50:11 -03:00
---
2022-10-31 22:15:07 +05:30
### updateCurrentConfig
2022-10-15 00:50:11 -03:00
**updateCurrentConfig**(`siteCfg`, `_directives`): `MermaidConfig`
#### Parameters
| Name | Type |
| :------------ | :-------------- |
| `siteCfg` | `MermaidConfig` |
| `_directives` | `any`\[] |
#### Returns
`MermaidConfig`
#### Defined in
2022-10-31 22:15:07 +05:30
[config.ts:14](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L14)
2022-10-15 00:50:11 -03:00
---
2022-10-31 22:15:07 +05:30
### updateSiteConfig
2022-10-15 00:50:11 -03:00
**updateSiteConfig**(`conf`): `MermaidConfig`
#### Parameters
| Name | Type |
| :----- | :-------------- |
| `conf` | `MermaidConfig` |
#### Returns
`MermaidConfig`
#### Defined in
2022-11-10 13:51:53 +05:30
[config.ts:80](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.ts#L80)