@gojiraf/floating-ecommerce-display-test 1.0.46 → 1.0.48

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 ADDED
@@ -0,0 +1,99 @@
1
+ # Floating Ecommerce Display - Iframe
2
+
3
+ <div align="center">
4
+
5
+ | Staging Version | Production Version |
6
+ |:----------------:|:-------------------:|
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
+
9
+ </div>
10
+
11
+ ## Table of Contents
12
+
13
+ 1. [Introduction](#introduction)
14
+ 2. [Features](#features)
15
+ 6. [Scripts](#scripts)
16
+ 4. [Usage](#usage)
17
+ 5. [Folder Structure](#folder-structure)
18
+ 6. [How to work in this project](#how-to-work-in-this-project)
19
+
20
+ ## Introduction
21
+ 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
+ ## Features
24
+
25
+ - Show Live icon
26
+ - Autoplay iframe when a page is open
27
+ - Open iframe when press in Live icon
28
+ - Open Live in new tab when press in Live icon
29
+ - Change position of Live icon
30
+
31
+
32
+ ## Script
33
+
34
+ The script accepts the following parameters
35
+ - showLiveButton - to show the live icon
36
+ - position - to put the icon on the left side or right side
37
+ - openNewTab - to open the live in a new tab
38
+ - autoPlayIframe - to leave the iframe open
39
+ - storeId - id of the client's store
40
+
41
+ ### Example Script
42
+
43
+ ```javascript
44
+ <script
45
+ src="https://unpkg.com/@gojiraf/floating-ecommerce-display-prod/dist/gj-ctc-production.js"
46
+ autoPlayIframe="true"
47
+ openNewTab="false"
48
+ showLiveButton="true"
49
+ position="right"
50
+ storeId="<storeId>"
51
+ ></script>
52
+ ```
53
+
54
+ ## Usage
55
+
56
+ For use this project you need to start a Live and run the command `server:dev` to start a project in local
57
+
58
+ - Simulate params of script in file App.tsx
59
+ ```typescript
60
+ const simulatedProps: AppProps = {
61
+ position: 'left',
62
+ autoPlayIframe: true,
63
+ openLiveNewTab: false,
64
+ };
65
+
66
+ return <ClickToCall {...simulatedProps} />;
67
+ ```
68
+
69
+ ## Folder Structure
70
+ ```bash
71
+ | |-- src/
72
+ | |-- app.tsx
73
+ | |-- index.tsx
74
+ | |-- App.css
75
+ | |-- index.css
76
+ | |-- components/
77
+ | | |-- Devices/
78
+ | |-- Forms/
79
+ | |-- Iframe/
80
+ | |-- Kit/
81
+ | |-- ClickToCall.tsx
82
+ | |-- ...
83
+ |-- README.md
84
+ ```
85
+
86
+ ## How to work in this project
87
+ #### Two branchs:
88
+ - dev - for staging
89
+ - main - for production
90
+
91
+ #### Git flow:
92
+ - Create a new branch from dev and do the PR against the same branch.
93
+ - 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.
94
+
95
+ #### Deploy changes:
96
+ - For Deploy changes you need access to gojiraf npm account -
97
+ `You must consult the corresponding person for access`
98
+ - Once you have access to gojiraf npm account you need to open terminal and run `npm login`
99
+ - Then run the script publish corresponding to each environment