@gojiraf/floating-ecommerce-display-test 1.3.0 → 1.3.2

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 CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- | Staging Version | Production Version |
6
- |:----------------:|:-------------------:|
5
+ | Staging Version | Production Version |
6
+ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
7
7
  | [![Staging Package Version](https://img.shields.io/npm/v/@gojiraf/floating-ecommerce-display-test?cache=none)](https://www.npmjs.com/package/@gojiraf/floating-ecommerce-display-test) | [![Production Package Version](https://img.shields.io/npm/v/@gojiraf/floating-ecommerce-display-prod?cache=none)](https://www.npmjs.com/package/@gojiraf/floating-ecommerce-display-prod) |
8
8
 
9
9
  </div>
@@ -12,12 +12,13 @@
12
12
 
13
13
  1. [Introduction](#introduction)
14
14
  2. [Features](#features)
15
- 6. [Scripts](#scripts)
15
+ 3. [Scripts](#scripts)
16
16
  4. [Usage](#usage)
17
17
  5. [Folder Structure](#folder-structure)
18
18
  6. [How to work in this project](#how-to-work-in-this-project)
19
19
 
20
- ## Introduction
20
+ ## Introduction
21
+
21
22
  This project focuses on the implementation of an iFrame that embeds Live and is distributed to clients through a script. By employing an iFrame and a specialized script, it facilitates the dynamic delivery of real time experiences to end users, offering a practical and scalable solution for integrating Live into clients' sites.
22
23
 
23
24
  ## Features
@@ -28,28 +29,30 @@ This project focuses on the implementation of an iFrame that embeds Live and is
28
29
  - Open Live in new tab when press in Live icon
29
30
  - Change position of Live icon
30
31
 
31
-
32
32
  ## Script
33
33
 
34
34
  The script accepts the following parameters
35
+
35
36
  - showLiveButton - to show the live icon
36
37
  - position - to put the icon on the left side or right side
37
38
  - openNewTab - to open the live in a new tab
38
39
  - autoPlayIframe - to leave the iframe open
39
40
  - storeId - id of the client's store
40
41
  - marginBottom - to define position of button in bottom, by default value is 0
42
+ - allowClose - to allow user to close live button
41
43
 
42
44
  ### Example Script
43
45
 
44
46
  ```javascript
45
47
  <script
46
- src="https://unpkg.com/@gojiraf/floating-ecommerce-display-prod/dist/gj-ctc-production.js"
47
- autoPlayIframe="true"
48
- openNewTab="false"
49
- showLiveButton="true"
50
- position="right"
51
- storeId="<storeId>"
52
- marginBottom="55"
48
+ src="https://unpkg.com/@gojiraf/floating-ecommerce-display-prod/dist/gj-ctc-production.js"
49
+ autoPlayIframe="true"
50
+ openNewTab="false"
51
+ showLiveButton="true"
52
+ position="right"
53
+ storeId="<storeId>"
54
+ marginBottom="55"
55
+ allowClose="true"
53
56
  ></script>
54
57
  ```
55
58
 
@@ -58,17 +61,19 @@ The script accepts the following parameters
58
61
  For use this project you need to start a Live and run the command `server:dev` to start a project in local
59
62
 
60
63
  - Simulate params of script in file App.tsx
64
+
61
65
  ```typescript
62
66
  const simulatedProps: AppProps = {
63
- position: 'left',
64
- autoPlayIframe: true,
65
- openLiveNewTab: false,
67
+ position: 'left',
68
+ autoPlayIframe: true,
69
+ openLiveNewTab: false,
66
70
  };
67
71
 
68
72
  return <ClickToCall {...simulatedProps} />;
69
73
  ```
70
74
 
71
75
  ## Folder Structure
76
+
72
77
  ```bash
73
78
  | |-- src/
74
79
  | |-- app.tsx
@@ -76,27 +81,32 @@ return <ClickToCall {...simulatedProps} />;
76
81
  | |-- App.css
77
82
  | |-- index.css
78
83
  | |-- components/
79
- | | |-- Devices/
80
- | |-- Forms/
81
- | |-- Iframe/
84
+ | |-- Forms/
85
+ | |-- Iframe/
82
86
  | |-- Kit/
83
87
  | |-- ClickToCall.tsx
88
+ | |-- FloatingLive.tsx
89
+ | |-- RedirectCard.tsx
84
90
  | |-- ...
85
91
  |-- README.md
86
92
  ```
87
93
 
88
94
  ## How to work in this project
95
+
89
96
  #### Two branchs:
97
+
90
98
  - dev - for staging
91
99
  - main - for production
92
100
 
93
101
  #### Git flow:
102
+
94
103
  - Create a new branch from dev and do the PR against the same branch.
95
104
  - Once the PR has been merged against the dev branch, you need to create another PR against the main branch to take the changes to production.
96
105
 
97
106
  #### Deploy changes:
98
- - For Deploy changes you need access to gojiraf npm account -
99
- `You must consult the corresponding person for access`
107
+
108
+ - For Deploy changes you need access to gojiraf npm account -
109
+ `You must consult the corresponding person for access`
100
110
  - Once you have access to gojiraf npm account you need to open terminal and run `npm login`
101
111
  - Then run the script publish corresponding to each environment
102
112
  - Don't forguet to change package.json name with -prod or -test and the version of package