Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit 6580884

Browse files
authored
Merge pull request #91 from agile-ts/develop
fixed some typos
2 parents 07ea7d2 + 93303b7 commit 6580884

33 files changed

+589
-285
lines changed

docs/Interfaces.md

Lines changed: 1 addition & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: interfaces
33
title: Interfaces
4-
sidebar_label: Interfaces
4+
sidebar_label: INTERFACES
55
slug: /interfaces
66
---
77

@@ -14,164 +14,6 @@ You might get redirected to parts of the Interface Section from other documentat
1414

1515
:::
1616

17-
## `CreateLoggerConfig`
18-
19-
The `CreateLoggerConfigInterface` is used in the creation and configuration of the [Agile `Logger Class`](packages/core/api/agile-instance/Properties.md#logger).
20-
Here is a Typescript Interface for quick reference. However,
21-
each property is explained in more detail below.
22-
```ts
23-
export interface CreateLoggerConfigInterface {
24-
prefix?: string;
25-
allowedTags?: string[];
26-
canUseCustomStyles?: boolean;
27-
active?: boolean;
28-
level?: number;
29-
timestamp?: boolean;
30-
}
31-
```
32-
33-
<br/>
34-
35-
#### `prefix`
36-
37-
Prefix which is added before each log message.
38-
```ts {2}
39-
const logger = new Logger({
40-
prefix: "MyLog"
41-
});
42-
43-
logger.debug("Jeff"); // Logs 'MyLog Debug: Jeff'
44-
```
45-
The log messages of AgileTs have the default prefix "Agile".
46-
47-
| Type | Default | Required |
48-
|--------------------|-----------|----------|
49-
| `string` | "Agile" | No |
50-
51-
<br/>
52-
53-
#### `level`
54-
55-
The `log level` controls which kind of log messages are allowed to be logged.
56-
Therefore, it is used to filter log messages to only see these relevant to us.
57-
For example, we won't often set the `log level` to `debug`
58-
since debug messages flood the console and are, in most cases, not relevant for us.
59-
```ts {2}
60-
const logger = new Logger({
61-
level: Logger.level.WARN
62-
});
63-
64-
logger.debug("Jeff"); // Doesn't get logged
65-
logger.warn("A important Warning"); // Gets logged
66-
```
67-
The `Logger Class` supports some hard-coded log levels, which can be set dynamically.
68-
```ts
69-
{
70-
TRACE: 1,
71-
DEBUG: 2,
72-
LOG: 5,
73-
TABLE: 5,
74-
INFO: 10,
75-
SUCCESS: 15,
76-
WARN: 20,
77-
ERROR: 50,
78-
}
79-
80-
Logger.level.LOG; // 5
81-
```
82-
For example, suppose we set the logger level to `INFO`. In that case,
83-
each log category at a higher or same level is printed to the console.
84-
In the case of `INFO`, that would be `SUCCESS`, `WARN`, `ERROR` and of course `INFO`.
85-
86-
| Type | Default | Required |
87-
|--------------------|-----------|----------|
88-
| `number` | 20 | No |
89-
90-
<br/>
91-
92-
#### `active`
93-
94-
Determines whether the logger is `active` and is allowed to print messages to the console.
95-
```ts {2}
96-
const logger = new Logger({
97-
active: false
98-
});
99-
100-
logger.log("Jeff"); // Doesn't get logged
101-
logger.isActive = true;
102-
logger.log("Jeff"); // Gets logged
103-
```
104-
105-
| Type | Default | Required |
106-
|--------------------|-----------|----------|
107-
| `boolean` | true | No |
108-
109-
<br/>
110-
111-
#### `timestamp`
112-
113-
If `true`, a timestamp is added before each log message.
114-
This timestamp represents the time the message was logged.
115-
```ts {2}
116-
const logger = new Logger({
117-
timestamp: true
118-
});
119-
120-
logger.debug("Jeff"); // Logs '[1613108673781] Debug: Jeff'
121-
```
122-
123-
| Type | Default | Required |
124-
|--------------------|-----------|----------|
125-
| `boolean` | false | No |
126-
127-
<br/>
128-
129-
#### `allowedTags`
130-
131-
Sometimes logging can be very confusing and overwhelming if the console is flooded with logs that don't matter at the time.
132-
Therefore, `tags` got created which filter logs specifically by tags.
133-
```ts {2}
134-
const logger = new Logger({
135-
allowedTags: ["jeff", "hans"]
136-
});
137-
138-
logger.debug("Jeff"); // Gets logged
139-
logger.if.tag(["jeff"]).debug("Jeff"); // Doesn't get logged
140-
logger.if.tag(["hans", "jeff"]).debug("Jeff");; // Gets get logged
141-
logger.if.tag(["hans"]).debug("Jeff");; // Doesn't get logged
142-
logger.if.tag(["hans", "frank"]).debug("Jeff");; // Doesn't get logged
143-
```
144-
Any log message with defined tags will only be logged if all its tags are allowed in the `Logger Class`.
145-
Logs that have no condition/tag are always logged.
146-
147-
| Type | Default | Required |
148-
|--------------------|-----------------------------------------------------------|----------|
149-
| `string[]` | ['runtime', 'storage', 'subscription', 'multieditor'] | No |
150-
151-
<br/>
152-
153-
#### `canUseCustomStyles`
154-
155-
Whether we can apply custom `css` styles to the log messages.
156-
157-
![Log Custom Styles Example](../static/img/docs/logger_example.png)
158-
159-
For example, AgileTs Logs are by default purple.
160-
161-
| Type | Default | Required |
162-
|--------------------|-----------|----------|
163-
| `boolean` | true | No |
164-
165-
166-
167-
<br/>
168-
169-
---
170-
171-
<br/>
172-
173-
174-
17517
## `StateIngestConfig`
17618

17719
The `StateIngestConfigInterface` is used as configuration object in functions like [`set()`](packages/core/api/state/Methods.md#set) or [`undo()`](packages/core/api/state/Methods.md#undo).

docs/examples/react-native/examples/FirstState.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ slug: /examples/react-native/first-state
88
import {ExpoSandBoxEmbed} from "../../../../src/components/docs/ExpoSandBoxEmbed";
99

1010
<ExpoSandBoxEmbed uri={'@bennodev/agilets-first-state'} />
11+
12+
[Back](../react-native)

docs/examples/react/Introduction.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ slug: /examples/react
1010
- [First State [Class Component]](./react/class/first-state)
1111
- [First Collection](./react/first-collection)
1212
- [First Computed](./react/first-computed)
13-
- [Multieditor](./react/multieditor)
1413
- [useProxy](./react/simple-useproxy)
1514

16-
## 👾 Performance
17-
- [Large State](./react/large-state)
18-
- [Frequent Updates](./react/frequent-updates)
19-
20-
You can get an overview of all performance examples in [this](https://github.com/agile-ts/performance-compare) repository.
21-
2215
## 😎 Medium
2316
- [Simple Todo List](./react/simple-todo-list)
17+
- [Query-Stopwatch](./react/query-stopwatch)
18+
- [Boxes](./react/boxes)
19+
- [Multieditor](./react/multieditor)
2420

2521
## 🤓 Enterprise
2622
- coming soon
23+
24+
## 👾 Performance
25+
- [Large State](./react/large-state)
26+
- [Frequent Updates](./react/frequent-updates)
27+
28+
You can get an overview of all performance examples in [this](https://github.com/agile-ts/performance-compare) repository
29+
or in the [benchmark](https://github.com/agile-ts/agile/tree/master/benchmark) tests.
30+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
id: boxes
3+
title: Boxes
4+
sidebar_label: Boxes
5+
slug: /examples/react/Boxes
6+
---
7+
8+
import {CodeSandBoxEmbed} from "../../../../src/components/docs/CodeSandBoxEmbed";
9+
10+
<CodeSandBoxEmbed uri={'agile-boxes-edux4'} />
11+
12+
[Back](../react)

docs/examples/react/examples/FirstCollection.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ slug: /examples/react/first-collection
88
import {CodeSandBoxEmbed} from "../../../../src/components/docs/CodeSandBoxEmbed";
99

1010
<CodeSandBoxEmbed uri={'agilets-first-collection-uyi9g'} />
11+
12+
[Back](../react)

docs/examples/react/examples/FirstComputed.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ slug: /examples/react/first-computed
88
import {CodeSandBoxEmbed} from "../../../../src/components/docs/CodeSandBoxEmbed";
99

1010
<CodeSandBoxEmbed uri={'agilets-first-collection-uyi9g'} />
11+
12+
[Back](../react)

docs/examples/react/examples/FirstState.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ slug: /examples/react/first-state
88
import {CodeSandBoxEmbed} from "../../../../src/components/docs/CodeSandBoxEmbed";
99

1010
<CodeSandBoxEmbed uri={'agilets-first-state-f12cz'} />
11+
12+
[Back](../react)

docs/examples/react/examples/FirstState_Class.mdx renamed to docs/examples/react/examples/FirstStateClass.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ slug: /examples/react/class/first-state
88
import {CodeSandBoxEmbed} from "../../../../src/components/docs/CodeSandBoxEmbed";
99

1010
<CodeSandBoxEmbed uri={'agilets-first-state-with-hoc-1qdew'} />
11+
12+
[Back](../../react)

docs/examples/react/examples/FrequentUpdates.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ import {CodeSandBoxEmbed} from "../../../../src/components/docs/CodeSandBoxEmbed
99

1010
<CodeSandBoxEmbed uri={'agilets-frequent-updates-5tprm'} />
1111

12+
[Back](../react)
13+
1214

docs/examples/react/examples/LargeState.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ slug: /examples/react/large-state
88
import {CodeSandBoxEmbed} from "../../../../src/components/docs/CodeSandBoxEmbed";
99

1010
<CodeSandBoxEmbed uri={'agilets-large-state-1kr4z'} />
11+
12+
[Back](../react)

0 commit comments

Comments
 (0)