swoop-common 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
# Swoop
|
|
1
|
+
# Swoop Library
|
|
2
2
|
|
|
3
|
-
This library is used for rendering **Swoop itinerary templates**.
|
|
3
|
+
This library is used for rendering **Swoop itinerary templates**.
|
|
4
|
+
It provides tools for defining **custom field types**, registering **custom components**,
|
|
5
|
+
rendering templates from a **MasterSchema**, and includes SDKs for all related services.
|
|
6
|
+
It supports both input mode (for creating templates) and presentation mode (for rendering them for end users).
|
|
7
|
+
The schema system is stage-aware, enabling precise control over what data is editable or displayed at which stage.
|
|
4
8
|
|
|
5
9
|
> Note: This package is intended for internal use only.
|
|
6
10
|
|
|
7
11
|
---
|
|
8
12
|
|
|
13
|
+
# Swoop Library
|
|
14
|
+
|
|
15
|
+
## Initialization
|
|
16
|
+
|
|
17
|
+
Before using the Swoop Library, you must initialize it with service URLs:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { init } from 'swoop-common';
|
|
21
|
+
|
|
22
|
+
init({
|
|
23
|
+
itineraryServiceUrl: 'https://your.itinerary.service',
|
|
24
|
+
coreServiceUrl: 'https://your.core.service',
|
|
25
|
+
swoopServiceForwardUrl: 'https://your.forward.service'
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
|
|
9
29
|
## StyledFormView
|
|
10
30
|
|
|
11
31
|
The `StyledFormView` component is the entry point for rendering a full itinerary template. It handles schema parsing and renderer injection based on mode and form stage.
|