@ai12z/react 0.0.1-alpha.22 → 0.0.1-alpha.26

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
@@ -7,7 +7,35 @@
7
7
  ```
8
8
  const reactLibrary = require('react-library');
9
9
 
10
- // TODO: DEMONSTRATE API
10
+ ```
11
+
12
+ 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.
13
+
14
+ ```
15
+ <script>
16
+ const ele = document.querySelector('ai12z-cta');
17
+ ele.dataAttributes = {
18
+ content: {
19
+ newlist: [
20
+ {
21
+ _uid: "BUY6Drn9e1",
22
+ component: "foo",
23
+ headline: "Foo"
24
+ },
25
+ {
26
+ _uid: "gJZoSLkfZV",
27
+ component: "bar",
28
+ title: "Bar"
29
+ },
30
+ {
31
+ _uid: "X1JAfdsZxy",
32
+ component: "foo",
33
+ headline: "Another headline"
34
+ }
35
+ ]
36
+ }
37
+ };
38
+ </script>
11
39
  ```
12
40
  # Setup
13
41
 
@@ -51,6 +79,8 @@ import { Ai12zCta, Ai12zKnowledgeBox } from '@ai12z/react'
51
79
  | noResultsText (Optional) | allows us to customize the no results found text | noResultsText="No results found..." |
52
80
  | autoSearch (Optional) | allows us to configure the search option | autoSearch="true" |
53
81
  | placeholder (Optional) | allows us to customize the placeholder text | placeholder="Enter the text" |
82
+ | iconSrc (Optional) | allows us to add the icon to the search button along with the text or icon only | icon-src= "https://uxwing.com/wp-content/themes/uxwing/download/user-interface/magnifying-glass-icon.png?w=24&h=24" |
83
+ | categorize (Optional) | allows us to customize the search results based on the category. By default the search results will be catogorized. | categorize = "true" |
54
84
 
55
85
  - The second control named as **Ai12zKnowledgeBox** allows us to send the query programmmatically through javascript and rendering the query results by clicking on the button.
56
86
 
@@ -1,6 +1,7 @@
1
1
  import { createReactComponent } from './react-component-lib';
2
2
  import { defineCustomElements } from 'ai12z/loader';
3
3
  defineCustomElements();
4
+ export const Ai12zCategory = createReactComponent('ai12z-category');
4
5
  export const Ai12zChat = createReactComponent('ai12z-chat');
5
6
  export const Ai12zCta = createReactComponent('ai12z-cta');
6
7
  export const Ai12zInputForm = createReactComponent('ai12z-input-form');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/components/stencil-generated/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,oBAAoB,EAAE,CAAC;AACvB,MAAM,CAAC,MAAM,SAAS,GAAgB,oBAAoB,CAAsC,YAAY,CAAC,CAAC;AAC9G,MAAM,CAAC,MAAM,QAAQ,GAAgB,oBAAoB,CAAoC,WAAW,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,cAAc,GAAgB,oBAAoB,CAAgD,kBAAkB,CAAC,CAAC;AACnI,MAAM,CAAC,MAAM,iBAAiB,GAAgB,oBAAoB,CAAsD,qBAAqB,CAAC,CAAC;AAC/I,MAAM,CAAC,MAAM,YAAY,GAAgB,oBAAoB,CAA4C,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/components/stencil-generated/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,oBAAoB,EAAE,CAAC;AACvB,MAAM,CAAC,MAAM,aAAa,GAAgB,oBAAoB,CAA8C,gBAAgB,CAAC,CAAC;AAC9H,MAAM,CAAC,MAAM,SAAS,GAAgB,oBAAoB,CAAsC,YAAY,CAAC,CAAC;AAC9G,MAAM,CAAC,MAAM,QAAQ,GAAgB,oBAAoB,CAAoC,WAAW,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,cAAc,GAAgB,oBAAoB,CAAgD,kBAAkB,CAAC,CAAC;AACnI,MAAM,CAAC,MAAM,iBAAiB,GAAgB,oBAAoB,CAAsD,qBAAqB,CAAC,CAAC;AAC/I,MAAM,CAAC,MAAM,YAAY,GAAgB,oBAAoB,CAA4C,eAAe,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { JSX } from 'ai12z';
3
+ export declare const Ai12zCategory: import("react").ForwardRefExoticComponent<JSX.Ai12zCategory & Omit<import("react").HTMLAttributes<HTMLAi12zCategoryElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLAi12zCategoryElement>>;
3
4
  export declare const Ai12zChat: import("react").ForwardRefExoticComponent<JSX.Ai12zChat & Omit<import("react").HTMLAttributes<HTMLAi12zChatElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLAi12zChatElement>>;
4
5
  export declare const Ai12zCta: import("react").ForwardRefExoticComponent<JSX.Ai12zCta & Omit<import("react").HTMLAttributes<HTMLAi12zCtaElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLAi12zCtaElement>>;
5
6
  export declare const Ai12zInputForm: import("react").ForwardRefExoticComponent<JSX.Ai12zInputForm & Omit<import("react").HTMLAttributes<HTMLAi12zInputFormElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLAi12zInputFormElement>>;
@@ -8,6 +8,7 @@ import type { JSX } from 'ai12z';
8
8
  import { defineCustomElements } from 'ai12z/loader';
9
9
 
10
10
  defineCustomElements();
11
+ export const Ai12zCategory = /*@__PURE__*/createReactComponent<JSX.Ai12zCategory, HTMLAi12zCategoryElement>('ai12z-category');
11
12
  export const Ai12zChat = /*@__PURE__*/createReactComponent<JSX.Ai12zChat, HTMLAi12zChatElement>('ai12z-chat');
12
13
  export const Ai12zCta = /*@__PURE__*/createReactComponent<JSX.Ai12zCta, HTMLAi12zCtaElement>('ai12z-cta');
13
14
  export const Ai12zInputForm = /*@__PURE__*/createReactComponent<JSX.Ai12zInputForm, HTMLAi12zInputFormElement>('ai12z-input-form');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai12z/react",
3
- "version": "0.0.1-alpha.22",
3
+ "version": "0.0.1-alpha.26",
4
4
  "description": "ai12z React Library",
5
5
  "author": "Alpesh Patel <alpesh@ai12z.com>",
6
6
  "homepage": "",
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "23f1896288dca8ce09acd69676cefb0c91d1445f"
36
+ "gitHead": "2e8fd07559060f4907ee8549db3ffdfd54fa2fe5"
37
37
  }