@ruc-lib/tour-guide 2.0.1 → 3.1.0
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 +60 -28
- package/{fesm2020 → fesm2022}/ruc-lib-tour-guide.mjs +407 -421
- package/fesm2022/ruc-lib-tour-guide.mjs.map +1 -0
- package/index.d.ts +253 -3
- package/package.json +8 -18
- package/esm2020/index.mjs +0 -4
- package/esm2020/lib/model/default-config.model.mjs +0 -26
- package/esm2020/lib/model/tour-guide.model.mjs +0 -2
- package/esm2020/lib/ruclib-tour-guide/ruclib-tour-guide.component.mjs +0 -382
- package/esm2020/lib/ruclib-tour-guide.module.mjs +0 -20
- package/esm2020/ruc-lib-tour-guide.mjs +0 -5
- package/fesm2015/ruc-lib-tour-guide.mjs +0 -438
- package/fesm2015/ruc-lib-tour-guide.mjs.map +0 -1
- package/fesm2020/ruc-lib-tour-guide.mjs.map +0 -1
- package/lib/model/default-config.model.d.ts +0 -16
- package/lib/model/tour-guide.model.d.ts +0 -26
- package/lib/ruclib-tour-guide/ruclib-tour-guide.component.d.ts +0 -148
- package/lib/ruclib-tour-guide.module.d.ts +0 -10
package/README.md
CHANGED
|
@@ -15,41 +15,52 @@ npm install @uxpractice/ruc-lib
|
|
|
15
15
|
|
|
16
16
|
If you only need the Tour Guide component
|
|
17
17
|
```bash
|
|
18
|
-
npm install @
|
|
18
|
+
npm install @ruc-lib/tour-guide
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
### 📦 Version Compatibility
|
|
22
|
+
|
|
23
|
+
Please ensure you install the correct version of `@ruc-lib/tour-guide` based on your Angular version.
|
|
24
|
+
|
|
25
|
+
| Angular Version | Compatible `@ruc-lib/tour-guide` Version |
|
|
26
|
+
|--------------------|---------------------------------------------|
|
|
27
|
+
| 15.x.x | `npm install @ruc-lib/tour-guide@^3.0.0` |
|
|
28
|
+
| 16.x.x | `npm install @ruc-lib/tour-guide@^3.0.0` |
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
### 1. Import the Component
|
|
33
|
+
In your Angular component file (e.g., `app.component.ts`), import the `RuclibTourGuideComponent`:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { Component } from '@angular/core';
|
|
37
|
+
|
|
38
|
+
// For Complete Library
|
|
39
|
+
import { RuclibTourGuideComponent } from '@uxpractice/ruc-lib/tour-guide';
|
|
40
|
+
|
|
41
|
+
// For Individual Package
|
|
42
|
+
import { RuclibTourGuideComponent } from '@ruc-lib/tour-guide';
|
|
43
|
+
|
|
44
|
+
@Component({
|
|
45
|
+
selector: 'app-root',
|
|
46
|
+
imports: [RuclibTourGuideComponent],
|
|
47
|
+
templateUrl: './app.component.html',
|
|
48
|
+
})
|
|
49
|
+
export class AppComponent {
|
|
50
|
+
// Component code here
|
|
51
|
+
}
|
|
41
52
|
```
|
|
42
53
|
|
|
43
54
|
### 2. Use the Component
|
|
44
|
-
In your component's template, use the `<uxp-
|
|
55
|
+
In your component's template, use the `<uxp-ruclib-tour-guide>` selector and pass the configuration object to the `rucInputData` input and the data array to the `dataSource` input.
|
|
45
56
|
|
|
46
57
|
```html
|
|
47
|
-
<uxp-
|
|
58
|
+
<uxp-ruclib-tour-guide
|
|
48
59
|
[rucInputData]="tourGuideConfig"
|
|
49
60
|
[customTheme]="customTheme"
|
|
50
61
|
(rucEvent)="passEvent($event)"
|
|
51
62
|
[dataSource]="tourGuideData">
|
|
52
|
-
</uxp-
|
|
63
|
+
</uxp-ruclib-tour-guide>
|
|
53
64
|
```
|
|
54
65
|
|
|
55
66
|
## API Reference
|
|
@@ -58,9 +69,9 @@ In your component's template, use the `<uxp-ruc-tour-guide>` selector and pass t
|
|
|
58
69
|
|
|
59
70
|
| Input | Type | Description |
|
|
60
71
|
|----------------|--------------------|---------------------------------------------------|
|
|
61
|
-
| `rucInputData` | `
|
|
72
|
+
| `rucInputData` | `TourGuideConfig` | The main configuration object for the tour guide. |
|
|
62
73
|
| `customTheme` | `string` | An optional CSS class for custom theming. |
|
|
63
|
-
| `dataSource` | `
|
|
74
|
+
| `dataSource` | `TourGuideData` | Data for the tour guide. |
|
|
64
75
|
|
|
65
76
|
### Component Outputs
|
|
66
77
|
|
|
@@ -68,7 +79,7 @@ In your component's template, use the `<uxp-ruc-tour-guide>` selector and pass t
|
|
|
68
79
|
|-----------|-----------|---------------------------------------------------|
|
|
69
80
|
| `rucEvent`| `any` | Emits events related to tour guide actions (e.g., 'skip', 'next', 'finish'). |
|
|
70
81
|
|
|
71
|
-
### `
|
|
82
|
+
### `TourGuideConfig`
|
|
72
83
|
This is the main configuration object for the Tour Guide component.
|
|
73
84
|
|
|
74
85
|
| Property | Type | Description |
|
|
@@ -90,7 +101,7 @@ This is the main configuration object for the Tour Guide component.
|
|
|
90
101
|
| `highlightBorderWidth` | `string` | Width of the highlight border around the guided element. |
|
|
91
102
|
| `defaultPopupWidth` | `string` | Default width of the tour guide popup. |
|
|
92
103
|
|
|
93
|
-
### `
|
|
104
|
+
### `TourGuideData`
|
|
94
105
|
This array of objects defines the content for each step of the tour guide.
|
|
95
106
|
|
|
96
107
|
| Property | Type | Description |
|
|
@@ -108,7 +119,12 @@ Here's an example of how to configure the Tour Guide component in your component
|
|
|
108
119
|
|
|
109
120
|
```typescript
|
|
110
121
|
import { Component } from '@angular/core';
|
|
111
|
-
|
|
122
|
+
|
|
123
|
+
// For Complete Library
|
|
124
|
+
import { TourGuideConfig, TourGuideData } from '@uxpractice/ruc-lib/tour-guide';
|
|
125
|
+
|
|
126
|
+
// For Individual package
|
|
127
|
+
import { TourGuideConfig, TourGuideData } from '@ruc-lib/tour-guide';
|
|
112
128
|
|
|
113
129
|
@Component({
|
|
114
130
|
selector: 'app-root',
|
|
@@ -183,6 +199,22 @@ export class AppComponent {
|
|
|
183
199
|
}
|
|
184
200
|
```
|
|
185
201
|
|
|
202
|
+
> ⚠️ **IMPORTANT: Custom Theme Usage in Angular Material**
|
|
203
|
+
|
|
204
|
+
When implementing **custom themes**, such as:
|
|
205
|
+
|
|
206
|
+
```scss
|
|
207
|
+
.custom-theme-1 {
|
|
208
|
+
@include angular-material-theme($custom-theme);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// You must also include the typography mixin to ensure text styles are applied correctly as shown below:
|
|
212
|
+
.custom-theme-1 {
|
|
213
|
+
@include angular-material-theme($custom-theme);
|
|
214
|
+
@include mat.typography-level($theme-custom-typography-name, body-1);
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
186
218
|
## Contribution
|
|
187
219
|
|
|
188
220
|
Contributions are welcome! Feel free to open issues or pull requests for any enhancements or fixes.
|