@usereactify/search 5.44.0 → 5.46.0-beta.0
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 +21 -0
- package/dist/package.json +1 -0
- package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.d.ts +6 -0
- package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.js +3 -3
- package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.js.map +1 -1
- package/dist/src/components/Sensor/SensorCollection.js.map +1 -1
- package/dist/src/components/Sensor/SensorCustom.js +1 -1
- package/dist/src/components/Sensor/SensorCustom.js.map +1 -1
- package/dist/src/hooks/reactivesearch/useReactiveBaseProps.js +40 -35
- package/dist/src/hooks/reactivesearch/useReactiveBaseProps.js.map +1 -1
- package/dist/src/hooks/useAnalytics.js +3 -0
- package/dist/src/hooks/useAnalytics.js.map +1 -1
- package/dist/src/hooks/useConfig.d.ts +1 -1
- package/dist/src/hooks/useConfig.js +3 -6
- package/dist/src/hooks/useConfig.js.map +1 -1
- package/dist/src/hooks/useFlags.js +8 -2
- package/dist/src/hooks/useFlags.js.map +1 -1
- package/dist/src/hooks/useReactifySearchContext.d.ts +8 -0
- package/dist/src/hooks/useReactifySearchContext.js.map +1 -1
- package/dist/src/hooks/useSortBy.js +4 -1
- package/dist/src/hooks/useSortBy.js.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/utility/config.d.ts +4 -0
- package/dist/src/utility/config.js +57 -0
- package/dist/src/utility/config.js.map +1 -0
- package/dist/src/utility/props.d.ts +292 -0
- package/dist/src/utility/props.js +255 -0
- package/dist/src/utility/props.js.map +1 -0
- package/dist/src/utility/server.d.ts +2 -0
- package/dist/src/utility/server.js +36 -0
- package/dist/src/utility/server.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.generateProviderProps = void 0;
|
|
16
|
+
// @ts-expect-error missing types
|
|
17
|
+
const server_1 = __importDefault(require("@appbaseio/reactivesearch/lib/server"));
|
|
18
|
+
const config_1 = require("./config");
|
|
19
|
+
const props_1 = require("./props");
|
|
20
|
+
const generateProviderProps = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
const config = yield (0, config_1.getConfig)(options.shopifyPermanentDomain);
|
|
22
|
+
const props = (0, props_1.getPropsFilterGroup)({
|
|
23
|
+
mode: options.mode,
|
|
24
|
+
config: config,
|
|
25
|
+
filterGroup: config.filters[0],
|
|
26
|
+
});
|
|
27
|
+
return Object.assign(Object.assign({}, options), { preload: {
|
|
28
|
+
config: config,
|
|
29
|
+
state: yield (0, server_1.default)(props, null, {
|
|
30
|
+
app: config.index,
|
|
31
|
+
url: config.endpoint,
|
|
32
|
+
}),
|
|
33
|
+
} });
|
|
34
|
+
});
|
|
35
|
+
exports.generateProviderProps = generateProviderProps;
|
|
36
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/utility/server.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,kFAAsE;AAEtE,qCAAqC;AACrC,mCAA8C;AAIvC,MAAM,qBAAqB,GAAG,CAAO,OAAoC,EAAwC,EAAE;IACxH,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/D,MAAM,KAAK,GAAG,IAAA,2BAAmB,EAAC;QAChC,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;KAC/B,CAAC,CAAC;IAEH,uCACK,OAAO,KACV,OAAO,EAAE;YACP,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM,IAAA,gBAAkB,EAAC,KAAK,EAAE,IAAI,EAAE;gBAC3C,GAAG,EAAE,MAAM,CAAC,KAAK;gBACjB,GAAG,EAAE,MAAM,CAAC,QAAQ;aACrB,CAAC;SACH,IACF;AACH,CAAC,CAAA,CAAA;AAlBY,QAAA,qBAAqB,yBAkBjC","sourcesContent":["// @ts-expect-error missing types\nimport initReactivesearch from \"@appbaseio/reactivesearch/lib/server\";\n\nimport { getConfig } from \"./config\";\nimport { getPropsFilterGroup } from \"./props\";\nimport { ReactifySearchProviderProps } from \"../components\";\n\n\nexport const generateProviderProps = async (options: ReactifySearchProviderProps): Promise<ReactifySearchProviderProps> => {\n const config = await getConfig(options.shopifyPermanentDomain);\n const props = getPropsFilterGroup({\n mode: options.mode,\n config: config,\n filterGroup: config.filters[0],\n });\n\n return {\n ...options,\n preload: {\n config: config,\n state: await initReactivesearch(props, null, {\n app: config.index,\n url: config.endpoint,\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.
|
|
4
|
+
"version": "5.46.0-beta.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
7
|
"types": "dist/src/index.d.ts",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@appbaseio/reactivesearch": "3.14.0",
|
|
47
|
+
"@appbaseio/reactivecore": "9.8.0",
|
|
47
48
|
"@babel/plugin-transform-typescript": "7.18.12",
|
|
48
49
|
"@commitlint/cli": "13.2.0",
|
|
49
50
|
"@commitlint/config-conventional": "13.2.0",
|