@usereactify/search 5.2.0-beta.0 → 5.2.0-beta.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [5.2.0-beta.3](https://bitbucket.org/usereactify/reactify-search-ui/compare/beta-v5.2.0-beta.2...beta-v5.2.0-beta.3) (2022-08-10)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * export liquid utility ([8df10b2](https://bitbucket.org/usereactify/reactify-search-ui/commit/8df10b2dd09658abf41d4404102db8eb20e4b63b))
11
+
12
+ ## [5.2.0-beta.2](https://bitbucket.org/usereactify/reactify-search-ui/compare/beta-v5.2.0-beta.1...beta-v5.2.0-beta.2) (2022-08-10)
13
+
14
+
15
+ ### Features
16
+
17
+ * add getData method to liquid utility ([bf3b75c](https://bitbucket.org/usereactify/reactify-search-ui/commit/bf3b75c0b3a9f6ece11120ff190f0e740021a58f))
18
+
19
+ ## [5.2.0-beta.1](https://bitbucket.org/usereactify/reactify-search-ui/compare/beta-v5.2.0-beta.0...beta-v5.2.0-beta.1) (2022-08-10)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * improve liquid utilities ([b54a8ca](https://bitbucket.org/usereactify/reactify-search-ui/commit/b54a8caa6c498d3798068fe47527ac5bcde74aca))
25
+
5
26
  ## [5.2.0-beta.0](https://bitbucket.org/usereactify/reactify-search-ui/compare/beta-v5.1.6-beta.0...beta-v5.2.0-beta.0) (2022-08-10)
6
27
 
7
28
 
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@usereactify/search",
3
3
  "description": "React UI library for Reactify Search",
4
- "version": "5.2.0-beta.0",
4
+ "version": "5.2.0-beta.3",
5
5
  "license": "MIT",
6
6
  "main": "dist/src/index.js",
7
7
  "types": "dist/src/index.d.ts",
@@ -1,3 +1,4 @@
1
1
  export * from "./components";
2
2
  export * from "./hooks";
3
3
  export * from "./types";
4
+ export * from "./utility/liquid";
package/dist/src/index.js CHANGED
@@ -58,4 +58,5 @@ Sentry.init({
58
58
  __exportStar(require("./components"), exports);
59
59
  __exportStar(require("./hooks"), exports);
60
60
  __exportStar(require("./types"), exports);
61
+ __exportStar(require("./utility/liquid"), exports);
61
62
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,6CAAiD;AAEjD,uCAAkC;AAClC,mEAAkC;AAElC,eAAK,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,sBAAG,CAAC,IAAI,KAAK,sBAAG,CAAC,OAAO,EAAE,CAAC,CAAC;AAEpD,MAAM,CAAC,IAAI,CAAC;IACV,GAAG,EAAE,4EAA4E;IACjF,YAAY,EAAE,CAAC,IAAI,wBAAc,EAAE,CAAC;IACpC,gBAAgB,EAAE,GAAG;IACrB,OAAO,EAAE,sBAAG,CAAC,OAAO;IACpB,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;;QACpB,eAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACxC,kDAAkD;QAClD,MAAM,SAAS,GAAG,MAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,MAAM,0CAAG,CAAC,CAAC,CAAC;QAC/C,KAAK,MAAM,KAAK,IAAI,MAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,UAAU,0CAAE,MAAM,mCAAI,EAAE,EAAE;YACvD,IAAI,KAAK,CAAC,QAAQ,EAAE;gBAClB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CACrC,kCAAkC,EAClC,GAAG,CACJ,CAAC;aACH;SACF;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IACD,gBAAgB,EAAE,CAAC,UAAU,EAAE,EAAE;;QAC/B,IAAI,MAAA,UAAU,CAAC,QAAQ,0CAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE;YACpD,eAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;SAC/C;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAC,CAAC;AAEH,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB","sourcesContent":["import * as Sentry from \"@sentry/react\";\nimport { BrowserTracing } from \"@sentry/tracing\";\n\nimport { debug } from \"./utility\";\nimport pkg from \"../package.json\";\n\ndebug.log(\"package\", `${pkg.name} v${pkg.version}`);\n\nSentry.init({\n dsn: \"https://f591e13196ad4d6bbcd8abbeb2e023db@o1280055.ingest.sentry.io/6482743\",\n integrations: [new BrowserTracing()],\n tracesSampleRate: 1.0,\n release: pkg.version,\n beforeSend: (event) => {\n debug.log(\"sentry\", event.level, event);\n // rename stacktrace frames to point to sourcemaps\n const exception = event.exception?.values?.[0];\n for (const frame of exception?.stacktrace?.frames ?? []) {\n if (frame.filename) {\n frame.filename = frame.filename.replace(\n /^(.*?)@usereactify\\/search\\/dist/,\n \"~\"\n );\n }\n }\n\n return event;\n },\n beforeBreadcrumb: (breadcrumb) => {\n if (breadcrumb.category?.includes(\"reactify-search\")) {\n debug.log(\"sentry\", \"breadcrumb\", breadcrumb);\n }\n\n return breadcrumb;\n },\n});\n\nexport * from \"./components\";\nexport * from \"./hooks\";\nexport * from \"./types\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,6CAAiD;AAEjD,uCAAkC;AAClC,mEAAkC;AAElC,eAAK,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,sBAAG,CAAC,IAAI,KAAK,sBAAG,CAAC,OAAO,EAAE,CAAC,CAAC;AAEpD,MAAM,CAAC,IAAI,CAAC;IACV,GAAG,EAAE,4EAA4E;IACjF,YAAY,EAAE,CAAC,IAAI,wBAAc,EAAE,CAAC;IACpC,gBAAgB,EAAE,GAAG;IACrB,OAAO,EAAE,sBAAG,CAAC,OAAO;IACpB,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;;QACpB,eAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACxC,kDAAkD;QAClD,MAAM,SAAS,GAAG,MAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,MAAM,0CAAG,CAAC,CAAC,CAAC;QAC/C,KAAK,MAAM,KAAK,IAAI,MAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,UAAU,0CAAE,MAAM,mCAAI,EAAE,EAAE;YACvD,IAAI,KAAK,CAAC,QAAQ,EAAE;gBAClB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CACrC,kCAAkC,EAClC,GAAG,CACJ,CAAC;aACH;SACF;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IACD,gBAAgB,EAAE,CAAC,UAAU,EAAE,EAAE;;QAC/B,IAAI,MAAA,UAAU,CAAC,QAAQ,0CAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE;YACpD,eAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;SAC/C;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAC,CAAC;AAEH,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB;AACxB,mDAAiC","sourcesContent":["import * as Sentry from \"@sentry/react\";\nimport { BrowserTracing } from \"@sentry/tracing\";\n\nimport { debug } from \"./utility\";\nimport pkg from \"../package.json\";\n\ndebug.log(\"package\", `${pkg.name} v${pkg.version}`);\n\nSentry.init({\n dsn: \"https://f591e13196ad4d6bbcd8abbeb2e023db@o1280055.ingest.sentry.io/6482743\",\n integrations: [new BrowserTracing()],\n tracesSampleRate: 1.0,\n release: pkg.version,\n beforeSend: (event) => {\n debug.log(\"sentry\", event.level, event);\n // rename stacktrace frames to point to sourcemaps\n const exception = event.exception?.values?.[0];\n for (const frame of exception?.stacktrace?.frames ?? []) {\n if (frame.filename) {\n frame.filename = frame.filename.replace(\n /^(.*?)@usereactify\\/search\\/dist/,\n \"~\"\n );\n }\n }\n\n return event;\n },\n beforeBreadcrumb: (breadcrumb) => {\n if (breadcrumb.category?.includes(\"reactify-search\")) {\n debug.log(\"sentry\", \"breadcrumb\", breadcrumb);\n }\n\n return breadcrumb;\n },\n});\n\nexport * from \"./components\";\nexport * from \"./hooks\";\nexport * from \"./types\";\nexport * from \"./utility/liquid\";\n"]}
@@ -1,10 +1,15 @@
1
1
  import React from "react";
2
2
  import { ReactifySearchProviderProps } from "../components";
3
- export declare const getLiquidProvider: (props: ReactifySearchProviderProps & {
4
- mode: "collection";
5
- collectionHandle?: string;
6
- }, children: React.ReactNode) => () => JSX.Element;
7
- export declare const getLiquidMountNode: (props: ReactifySearchProviderProps & {
8
- mode: "collection";
9
- collectionHandle?: string;
10
- }, children: React.ReactNode) => HTMLElement;
3
+ export declare class ReactifySearchLiquidFactory {
4
+ providerProps: Omit<ReactifySearchProviderProps, "shopifyPermanentDomain"> & {
5
+ shopifyPermanentDomain?: string;
6
+ collectionHandle?: string;
7
+ };
8
+ constructor(providerProps: Omit<ReactifySearchProviderProps, "shopifyPermanentDomain"> & {
9
+ shopifyPermanentDomain?: string;
10
+ collectionHandle?: string;
11
+ });
12
+ getProvider(): React.FC<{}>;
13
+ getMountNode(): HTMLElement;
14
+ getData(): any;
15
+ }
@@ -3,28 +3,46 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getLiquidMountNode = exports.getLiquidProvider = void 0;
6
+ exports.ReactifySearchLiquidFactory = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const components_1 = require("../components");
9
- const getLiquidProvider = (props, children) => {
10
- var _a, _b, _c, _d;
11
- const shopifyPermanentDomain = (_a = props.shopifyPermanentDomain) !== null && _a !== void 0 ? _a : (_c = (_b = window) === null || _b === void 0 ? void 0 : _b.Shopify) === null || _c === void 0 ? void 0 : _c.shop;
12
- if (!shopifyPermanentDomain) {
13
- throw new Error("Cannot determine shopifyPermanentDomain from window");
9
+ class ReactifySearchLiquidFactory {
10
+ constructor(providerProps) {
11
+ this.providerProps = providerProps;
14
12
  }
15
- const collectionHandle = (_d = props.collectionHandle) !== null && _d !== void 0 ? _d : window.location.href.split(/\//)[4];
16
- if (props.mode === "collection" && !collectionHandle) {
17
- throw new Error("Cannot determine collectionHandle from URL");
13
+ getProvider() {
14
+ var _a, _b, _c, _d;
15
+ const shopifyPermanentDomain = (_a = this.providerProps.shopifyPermanentDomain) !== null && _a !== void 0 ? _a : (_c = (_b = window) === null || _b === void 0 ? void 0 : _b.Shopify) === null || _c === void 0 ? void 0 : _c.shop;
16
+ if (!shopifyPermanentDomain) {
17
+ throw new Error("Cannot determine shopifyPermanentDomain from window");
18
+ }
19
+ const collectionHandle = (_d = this.providerProps.collectionHandle) !== null && _d !== void 0 ? _d : window.location.href.split(/\//)[4];
20
+ if (this.providerProps.mode === "collection" && !collectionHandle) {
21
+ throw new Error("Cannot determine collectionHandle from URL");
22
+ }
23
+ const provider = (props) => (react_1.default.createElement(components_1.ReactifySearchProvider, Object.assign({}, this.providerProps, { shopifyPermanentDomain: shopifyPermanentDomain, collectionHandle: collectionHandle }), props.children));
24
+ return provider;
18
25
  }
19
- return () => (react_1.default.createElement(components_1.ReactifySearchProvider, Object.assign({}, props, { shopifyPermanentDomain: shopifyPermanentDomain, collectionHandle: collectionHandle }), children));
20
- };
21
- exports.getLiquidProvider = getLiquidProvider;
22
- const getLiquidMountNode = (props, children) => {
23
- const ReactifySearchMountNode = document.getElementById(`reactify-mount-${props.mode}`);
24
- if (!ReactifySearchMountNode) {
25
- throw new Error(`Cannot find mount node with ID "reactify-mount-${props.mode}"`);
26
+ getMountNode() {
27
+ const mountNode = document.getElementById(`reactify-mount-${this.providerProps.mode}`);
28
+ if (!mountNode) {
29
+ throw new Error(`Cannot find mount node with ID "reactify-mount-${this.providerProps.mode}"`);
30
+ }
31
+ return mountNode;
26
32
  }
27
- return ReactifySearchMountNode;
28
- };
29
- exports.getLiquidMountNode = getLiquidMountNode;
33
+ getData() {
34
+ const dataNode = document.getElementById("reactify-data");
35
+ if (!dataNode) {
36
+ throw new Error(`Cannot find data node with ID "reactify-data"`);
37
+ }
38
+ try {
39
+ const data = JSON.parse(dataNode.innerHTML);
40
+ return data;
41
+ }
42
+ catch (_a) {
43
+ throw new Error(`Cannot parse the data node with ID "reactify-data", check your liquid formatting`);
44
+ }
45
+ }
46
+ }
47
+ exports.ReactifySearchLiquidFactory = ReactifySearchLiquidFactory;
30
48
  //# sourceMappingURL=liquid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"liquid.js","sourceRoot":"","sources":["../../../src/utility/liquid.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,8CAGuB;AAEhB,MAAM,iBAAiB,GAAG,CAC/B,KAGC,EACD,QAAyB,EACzB,EAAE;;IACF,MAAM,sBAAsB,GAC1B,MAAA,KAAK,CAAC,sBAAsB,mCAAI,MAAA,MAAC,MAAc,0CAAE,OAAO,0CAAE,IAAI,CAAC;IACjE,IAAI,CAAC,sBAAsB,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;KACxE;IAED,MAAM,gBAAgB,GACpB,MAAA,KAAK,CAAC,gBAAgB,mCAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChE,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,IAAI,CAAC,gBAAgB,EAAE;QACpD,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;KAC/D;IAED,OAAO,GAAG,EAAE,CAAC,CACX,8BAAC,mCAAsB,oBACjB,KAAK,IACT,sBAAsB,EAAE,sBAAsB,EAC9C,gBAAgB,EAAE,gBAAgB,KAEjC,QAAQ,CACc,CAC1B,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,iBAAiB,qBA4B5B;AAEK,MAAM,kBAAkB,GAAG,CAChC,KAGC,EACD,QAAyB,EACzB,EAAE;IACF,MAAM,uBAAuB,GAAG,QAAQ,CAAC,cAAc,CACrD,kBAAkB,KAAK,CAAC,IAAI,EAAE,CAC/B,CAAC;IACF,IAAI,CAAC,uBAAuB,EAAE;QAC5B,MAAM,IAAI,KAAK,CACb,kDAAkD,KAAK,CAAC,IAAI,GAAG,CAChE,CAAC;KACH;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC,CAAC;AAjBW,QAAA,kBAAkB,sBAiB7B","sourcesContent":["import React from \"react\";\n\nimport {\n ReactifySearchProvider,\n ReactifySearchProviderProps,\n} from \"../components\";\n\nexport const getLiquidProvider = (\n props: ReactifySearchProviderProps & {\n mode: \"collection\";\n collectionHandle?: string;\n },\n children: React.ReactNode\n) => {\n const shopifyPermanentDomain =\n props.shopifyPermanentDomain ?? (window as any)?.Shopify?.shop;\n if (!shopifyPermanentDomain) {\n throw new Error(\"Cannot determine shopifyPermanentDomain from window\");\n }\n\n const collectionHandle =\n props.collectionHandle ?? window.location.href.split(/\\//)[4];\n if (props.mode === \"collection\" && !collectionHandle) {\n throw new Error(\"Cannot determine collectionHandle from URL\");\n }\n\n return () => (\n <ReactifySearchProvider\n {...props}\n shopifyPermanentDomain={shopifyPermanentDomain}\n collectionHandle={collectionHandle}\n >\n {children}\n </ReactifySearchProvider>\n );\n};\n\nexport const getLiquidMountNode = (\n props: ReactifySearchProviderProps & {\n mode: \"collection\";\n collectionHandle?: string;\n },\n children: React.ReactNode\n) => {\n const ReactifySearchMountNode = document.getElementById(\n `reactify-mount-${props.mode}`\n );\n if (!ReactifySearchMountNode) {\n throw new Error(\n `Cannot find mount node with ID \"reactify-mount-${props.mode}\"`\n );\n }\n\n return ReactifySearchMountNode;\n};\n"]}
1
+ {"version":3,"file":"liquid.js","sourceRoot":"","sources":["../../../src/utility/liquid.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,8CAGuB;AAEvB,MAAa,2BAA2B;IACtC,YACS,aAMN;QANM,kBAAa,GAAb,aAAa,CAMnB;IACA,CAAC;IAEJ,WAAW;;QACT,MAAM,sBAAsB,GAC1B,MAAA,IAAI,CAAC,aAAa,CAAC,sBAAsB,mCACzC,MAAA,MAAC,MAAc,0CAAE,OAAO,0CAAE,IAAI,CAAC;QACjC,IAAI,CAAC,sBAAsB,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;SACxE;QAED,MAAM,gBAAgB,GACpB,MAAA,IAAI,CAAC,aAAa,CAAC,gBAAgB,mCACnC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,YAAY,IAAI,CAAC,gBAAgB,EAAE;YACjE,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;SAC/D;QAED,MAAM,QAAQ,GAAa,CAAC,KAAK,EAAE,EAAE,CAAC,CACpC,8BAAC,mCAAsB,oBACjB,IAAI,CAAC,aAAa,IACtB,sBAAsB,EAAE,sBAAsB,EAC9C,gBAAgB,EAAE,gBAAgB,KAEjC,KAAK,CAAC,QAAQ,CACQ,CAC1B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,YAAY;QACV,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CACvC,kBAAkB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAC5C,CAAC;QACF,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,KAAK,CACb,kDAAkD,IAAI,CAAC,aAAa,CAAC,IAAI,GAAG,CAC7E,CAAC;SACH;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;SAClE;QAED,IAAI;YACF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YAE5C,OAAO,IAAI,CAAC;SACb;QAAC,WAAM;YACN,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAC;SACH;IACH,CAAC;CACF;AApED,kEAoEC","sourcesContent":["import React from \"react\";\n\nimport {\n ReactifySearchProvider,\n ReactifySearchProviderProps,\n} from \"../components\";\n\nexport class ReactifySearchLiquidFactory {\n constructor(\n public providerProps: Omit<\n ReactifySearchProviderProps,\n \"shopifyPermanentDomain\"\n > & {\n shopifyPermanentDomain?: string;\n collectionHandle?: string;\n }\n ) {}\n\n getProvider() {\n const shopifyPermanentDomain =\n this.providerProps.shopifyPermanentDomain ??\n (window as any)?.Shopify?.shop;\n if (!shopifyPermanentDomain) {\n throw new Error(\"Cannot determine shopifyPermanentDomain from window\");\n }\n\n const collectionHandle =\n this.providerProps.collectionHandle ??\n window.location.href.split(/\\//)[4];\n if (this.providerProps.mode === \"collection\" && !collectionHandle) {\n throw new Error(\"Cannot determine collectionHandle from URL\");\n }\n\n const provider: React.FC = (props) => (\n <ReactifySearchProvider\n {...this.providerProps}\n shopifyPermanentDomain={shopifyPermanentDomain}\n collectionHandle={collectionHandle}\n >\n {props.children}\n </ReactifySearchProvider>\n );\n\n return provider;\n }\n\n getMountNode() {\n const mountNode = document.getElementById(\n `reactify-mount-${this.providerProps.mode}`\n );\n if (!mountNode) {\n throw new Error(\n `Cannot find mount node with ID \"reactify-mount-${this.providerProps.mode}\"`\n );\n }\n\n return mountNode;\n }\n\n getData() {\n const dataNode = document.getElementById(\"reactify-data\");\n if (!dataNode) {\n throw new Error(`Cannot find data node with ID \"reactify-data\"`);\n }\n\n try {\n const data = JSON.parse(dataNode.innerHTML);\n\n return data;\n } catch {\n throw new Error(\n `Cannot parse the data node with ID \"reactify-data\", check your liquid formatting`\n );\n }\n }\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@usereactify/search",
3
3
  "description": "React UI library for Reactify Search",
4
- "version": "5.2.0-beta.0",
4
+ "version": "5.2.0-beta.3",
5
5
  "license": "MIT",
6
6
  "main": "dist/src/index.js",
7
7
  "types": "dist/src/index.d.ts",