3.0.15 • Published 4 months ago

@ai12z/react v3.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

react-library

TODO: description

Usage

const reactLibrary = require('react-library');

We are providing the option named as dataAttributes for assigning the JSON object programmatically and sending those object to the API payload for furthur use.

<script>
  const ele = document.querySelector('ai12z-cta');
  ele.dataAttributes = {
    content: {
      newlist: [
        {
          _uid: "BUY6Drn9e1",
          component: "foo",
          headline: "Foo"
        },
        {
          _uid: "gJZoSLkfZV",
          component: "bar",
          title: "Bar"
        },
        {
          _uid: "X1JAfdsZxy",
          component: "foo",
          headline: "Another headline"
        }
      ]
    }
};
</script>

Setup

To install from npm

npm install @ai12z/react

Getting Started

  • Include this below command to use the control.
import { Ai12zCta, Ai12zKnowledgeBox } from '@ai12z/react'
  • Then you can use the element anywhere in your template.
  • The control named as Ai12zCta allows us to show the search results along with the follow up chat conversations and customize our search results.
  • This control is having two tag element which is mentioned below.
<Ai12zCta>
  <privacy></privacy>
  <cta></cta>
</Ai12zCta>
  • (Optional) This tag element allows us to add the privacy policy links.
  • (Optional) This tag element allows us to customize our page by adding our own tag elements within this element.

  • The control contains following properties to customize the page.

PropertyDescriptionExample
dataKey (Required)API key from your ai12z project settingsdataKey="123456"
dataMode (Required)Allows us to enter the data-mode which will identify the server as local or dev or proddataMode="dev"
heading (Optional)Allows us to show the header textheading="Search Here 1"
buttonText (Optional)Allows us to customize the button namebuttonText="Ask me"
helpText (Optional)Allows us to customize the helper texthelpText="Type your question here..."
noResultsText (Optional)allows us to customize the no results found textnoResultsText="No results found..."
autoSearch (Optional)allows us to configure the search optionautoSearch="true"
placeholder (Optional)allows us to customize the placeholder textplaceholder="Enter the text"
iconSrc (Optional)allows us to add the icon to the search button along with the text or icon onlyicon-src= "https://uxwing.com/wp-content/themes/uxwing/download/user-interface/magnifying-glass-icon.png?w=24&h=24"
categorize (Optional)allows us to customize the search results based on the category. By default the search results will be catogorized.categorize = "true"
clearMemory (Optional)allows us to clear the previously searched data. By defualt, this property is set to trueclearMemory={true}
imageUpload (Optional)allows us to perform a image based search.By default, this property is set to trueimageUpload={true}
  • The second control named as Ai12zKnowledgeBox allows us to send the query programmmatically through javascript and rendering the query results by clicking on a button.
PropertyDescriptionExample
dataKey (Required)API key from your ai12z project settingsdataKey="123456"
dataMode (Required)Allows us to enter the data-mode which will identify the server as local or dev or proddataMode="dev"
question (Required)Allows us to set the question for on-loadquestion="what does ai12z do"
relavanceScore (Optional)allows us to view the score of clicks, engagement, conversions and negative reviews.relavanceScore="true"
feedback (Optional)allows us to add the thumbs up and down option for the questions. By default, this property is set to truefeedback="true"
clearMemory (Optional)allows us to clear the previously searched data. By defualt, this property is set to trueclearMemory="true"

1.0.18

11 months ago

1.0.17

12 months ago

1.0.16

12 months ago

2.0.3

10 months ago

2.0.5

10 months ago

2.0.4

10 months ago

2.0.7

9 months ago

2.0.6

9 months ago

2.0.9

9 months ago

2.0.8

9 months ago

2.0.2-alpha.0

10 months ago

2.0.2-alpha.1

10 months ago

3.0.12

5 months ago

3.0.4

6 months ago

3.0.13

5 months ago

3.0.3

6 months ago

3.0.10

5 months ago

3.0.2

6 months ago

3.0.11

5 months ago

3.0.1

6 months ago

3.0.8

6 months ago

3.0.7

6 months ago

3.0.14

5 months ago

3.0.6

6 months ago

3.0.15

5 months ago

3.0.5

6 months ago

3.0.0

6 months ago

2.0.3-alpha.3

10 months ago

2.0.3-alpha.2

10 months ago

2.0.3-alpha.1

10 months ago

2.0.3-alpha.0

10 months ago

3.1.1-rc.0

5 months ago

2.0.15

9 months ago

2.0.16

8 months ago

2.0.13

9 months ago

2.0.1-alpha.0

10 months ago

2.0.14

9 months ago

2.0.11

9 months ago

2.0.12

9 months ago

2.0.10

9 months ago

3.0.9

5 months ago

2.1.0

7 months ago

3.1.0-rc.1

5 months ago

3.1.0-rc.6

4 months ago

2.0.19

7 months ago

3.1.0-rc.7

4 months ago

2.0.17

8 months ago

3.1.0-rc.5

4 months ago

2.0.18

8 months ago

1.0.15

12 months ago

1.0.14

12 months ago

1.0.13

12 months ago

1.0.11

1 year ago

1.0.12

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.10

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2-alpha.0

1 year ago

0.0.1-alpha.76

1 year ago

0.0.1-alpha.75

1 year ago

0.0.1-alpha.67

1 year ago

0.0.1-alpha.66

1 year ago

0.0.1-alpha.68

1 year ago

0.0.1-alpha.35

1 year ago

0.0.1-alpha.38

1 year ago

0.0.1-alpha.37

1 year ago

0.0.1-alpha.41

1 year ago

0.0.1-alpha.40

1 year ago

0.0.1-alpha.42

1 year ago

0.0.1-alpha.33

1 year ago

0.0.1-alpha.32

1 year ago

0.0.1-alpha.30

2 years ago

0.0.1-alpha.31

2 years ago

0.0.1-alpha.29

2 years ago

0.0.1-alpha.27

2 years ago

0.0.1-alpha.26

2 years ago

0.0.1-alpha.28

2 years ago

0.0.1-alpha.25

2 years ago

0.0.1-alpha.22

2 years ago

0.0.1-alpha.21

2 years ago

0.0.1-alpha.20

2 years ago

0.0.1-alpha.12

2 years ago

0.0.1-alpha.10

2 years ago