@usereactify/search 5.0.0-beta.11 → 5.0.0-beta.12
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 +7 -0
- package/dist/package.json +1 -1
- package/dist/src/components/Example/ExampleFilterStack.js +2 -1
- package/dist/src/components/Example/ExampleFilterStack.js.map +1 -1
- package/dist/src/components/Filter/FilterStack.d.ts +2 -2
- package/dist/src/components/Filter/FilterStack.js +2 -2
- package/dist/src/components/Filter/FilterStack.js.map +1 -1
- package/dist/src/utility/debug.d.ts +2 -0
- package/dist/src/utility/debug.js +6 -2
- package/dist/src/utility/debug.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.0.0-beta.12](https://bitbucket.org/usereactify/reactify-search-ui/compare/v5.0.0-beta.11...v5.0.0-beta.12) (2022-07-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* improve performance when debugging by reusing debugger instances ([aa88917](https://bitbucket.org/usereactify/reactify-search-ui/commit/aa88917b0aedf2abe66439d430587f18dcb72aae))
|
|
11
|
+
|
|
5
12
|
## [5.0.0-beta.11](https://bitbucket.org/usereactify/reactify-search-ui/compare/v5.0.0-beta.10...v5.0.0-beta.11) (2022-07-27)
|
|
6
13
|
|
|
7
14
|
## [5.0.0-beta.10](https://bitbucket.org/usereactify/reactify-search-ui/compare/v5.0.0-beta.9...v5.0.0-beta.10) (2022-07-27)
|
package/dist/package.json
CHANGED
|
@@ -7,7 +7,8 @@ exports.ExampleFilterStack = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const components_1 = require("../../components");
|
|
9
9
|
const ExampleFilterStack = (props) => {
|
|
10
|
-
|
|
10
|
+
var _a;
|
|
11
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, (_a = props.filterStack) === null || _a === void 0 ? void 0 : _a.options.map((filter) => (react_1.default.createElement(components_1.Filter, Object.assign({ key: filter.id, filter: filter }, props))))));
|
|
11
12
|
};
|
|
12
13
|
exports.ExampleFilterStack = ExampleFilterStack;
|
|
13
14
|
//# sourceMappingURL=ExampleFilterStack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleFilterStack.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterStack.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAA4D;AAMrD,MAAM,kBAAkB,GAAsC,CACnE,KAAK,EACL,EAAE
|
|
1
|
+
{"version":3,"file":"ExampleFilterStack.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterStack.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAA4D;AAMrD,MAAM,kBAAkB,GAAsC,CACnE,KAAK,EACL,EAAE;;IACF,OAAO,CACL,8DACG,MAAA,KAAK,CAAC,WAAW,0CAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC1C,8BAAC,mBAAM,kBAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,IAAM,KAAK,EAAI,CACtD,CAAC,CACD,CACJ,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,kBAAkB,sBAU7B","sourcesContent":["import React from \"react\";\n\nimport { Filter, FilterStackProps } from \"../../components\";\n\nexport type ExampleFilterStackProps = React.ComponentProps<\n NonNullable<FilterStackProps[\"renderFilters\"]>\n>;\n\nexport const ExampleFilterStack: React.FC<ExampleFilterStackProps> = (\n props\n) => {\n return (\n <>\n {props.filterStack?.options.map((filter) => (\n <Filter key={filter.id} filter={filter} {...props} />\n ))}\n </>\n );\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { useFilterStack } from "../../hooks";
|
|
3
3
|
export declare type FilterStackProps = {
|
|
4
4
|
/** Render method called once for all filters */
|
|
5
|
-
renderFilters?: React.FC<ReturnType<typeof
|
|
5
|
+
renderFilters?: React.FC<ReturnType<typeof useFilterStack>>;
|
|
6
6
|
};
|
|
7
7
|
export declare const FilterStack: React.FC<FilterStackProps>;
|
|
@@ -9,9 +9,9 @@ const hooks_1 = require("../../hooks");
|
|
|
9
9
|
const components_1 = require("../../components");
|
|
10
10
|
const FilterStack = (props) => {
|
|
11
11
|
var _a;
|
|
12
|
-
const
|
|
12
|
+
const filterStackHook = (0, hooks_1.useFilterStack)();
|
|
13
13
|
const RenderFiltersComponent = (_a = props.renderFilters) !== null && _a !== void 0 ? _a : components_1.ExampleFilterStack;
|
|
14
|
-
return
|
|
14
|
+
return react_1.default.createElement(RenderFiltersComponent, Object.assign({}, filterStackHook));
|
|
15
15
|
};
|
|
16
16
|
exports.FilterStack = FilterStack;
|
|
17
17
|
//# sourceMappingURL=FilterStack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterStack.js","sourceRoot":"","sources":["../../../../src/components/Filter/FilterStack.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,
|
|
1
|
+
{"version":3,"file":"FilterStack.js","sourceRoot":"","sources":["../../../../src/components/Filter/FilterStack.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAA6C;AAC7C,iDAAsD;AAO/C,MAAM,WAAW,GAA+B,CAAC,KAAK,EAAE,EAAE;;IAC/D,MAAM,eAAe,GAAG,IAAA,sBAAc,GAAE,CAAC;IAEzC,MAAM,sBAAsB,GAAG,MAAA,KAAK,CAAC,aAAa,mCAAI,+BAAkB,CAAC;IAEzE,OAAO,8BAAC,sBAAsB,oBAAK,eAAe,EAAI,CAAC;AACzD,CAAC,CAAC;AANW,QAAA,WAAW,eAMtB","sourcesContent":["import React from \"react\";\n\nimport { useFilterStack } from \"../../hooks\";\nimport { ExampleFilterStack } from \"../../components\";\n\nexport type FilterStackProps = {\n /** Render method called once for all filters */\n renderFilters?: React.FC<ReturnType<typeof useFilterStack>>;\n};\n\nexport const FilterStack: React.FC<FilterStackProps> = (props) => {\n const filterStackHook = useFilterStack();\n\n const RenderFiltersComponent = props.renderFilters ?? ExampleFilterStack;\n\n return <RenderFiltersComponent {...filterStackHook} />;\n};\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import Debug from "debug";
|
|
1
2
|
import * as Sentry from "@sentry/react";
|
|
3
|
+
export declare const debuggers: Record<string, Debug.Debugger>;
|
|
2
4
|
export declare const debug: {
|
|
3
5
|
namespace: string;
|
|
4
6
|
log: (namespace: string, formatter?: string | undefined, ...args: Array<any>) => void;
|
|
@@ -22,14 +22,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
22
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.debug = void 0;
|
|
25
|
+
exports.debug = exports.debuggers = void 0;
|
|
26
26
|
const debug_1 = __importDefault(require("debug"));
|
|
27
27
|
const Sentry = __importStar(require("@sentry/react"));
|
|
28
28
|
const hooks_1 = require("../hooks");
|
|
29
|
+
exports.debuggers = {};
|
|
29
30
|
exports.debug = {
|
|
30
31
|
namespace: "reactify-search",
|
|
31
32
|
log: (namespace, formatter, ...args) => {
|
|
32
|
-
|
|
33
|
+
if (!exports.debuggers[namespace]) {
|
|
34
|
+
exports.debuggers[namespace] = (0, debug_1.default)(`${exports.debug.namespace}:${namespace}`);
|
|
35
|
+
}
|
|
36
|
+
exports.debuggers[namespace](formatter, ...args);
|
|
33
37
|
},
|
|
34
38
|
breadcrumb: (breadcrumb) => {
|
|
35
39
|
Sentry.addBreadcrumb(Object.assign(Object.assign({ level: "debug", type: "query" }, breadcrumb), { category: `${exports.debug.namespace}:${breadcrumb.category}` }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/utility/debug.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,sDAAwC;AAExC,oCAAuC;AAE1B,QAAA,KAAK,GAAG;IACnB,SAAS,EAAE,iBAAiB;IAC5B,GAAG,EAAE,CAAC,SAAiB,EAAE,SAAkB,EAAE,GAAG,IAAgB,EAAE,EAAE;QAClE,IAAA,eAAK,EAAC,GAAG,aAAK,CAAC,SAAS,IAAI,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/utility/debug.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,sDAAwC;AAExC,oCAAuC;AAE1B,QAAA,SAAS,GAAmC,EAAE,CAAC;AAE/C,QAAA,KAAK,GAAG;IACnB,SAAS,EAAE,iBAAiB;IAC5B,GAAG,EAAE,CAAC,SAAiB,EAAE,SAAkB,EAAE,GAAG,IAAgB,EAAE,EAAE;QAClE,IAAI,CAAC,iBAAS,CAAC,SAAS,CAAC,EAAE;YACzB,iBAAS,CAAC,SAAS,CAAC,GAAG,IAAA,eAAK,EAAC,GAAG,aAAK,CAAC,SAAS,IAAI,SAAS,EAAE,CAAC,CAAC;SACjE;QAED,iBAAS,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;IAC3C,CAAC;IACD,UAAU,EAAE,CACV,UAGC,EACD,EAAE;QACF,MAAM,CAAC,aAAa,+BAClB,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,OAAO,IACV,UAAU,KACb,QAAQ,EAAE,GAAG,aAAK,CAAC,SAAS,IAAI,UAAU,CAAC,QAAQ,EAAE,IACrD,CAAC;IACL,CAAC;IACD,IAAI,EAAE,mBAAW;CAClB,CAAC","sourcesContent":["import Debug from \"debug\";\nimport * as Sentry from \"@sentry/react\";\n\nimport { useDebugger } from \"../hooks\";\n\nexport const debuggers: Record<string, Debug.Debugger> = {};\n\nexport const debug = {\n namespace: \"reactify-search\",\n log: (namespace: string, formatter?: string, ...args: Array<any>) => {\n if (!debuggers[namespace]) {\n debuggers[namespace] = Debug(`${debug.namespace}:${namespace}`);\n }\n\n debuggers[namespace](formatter, ...args);\n },\n breadcrumb: (\n breadcrumb: Partial<Sentry.Breadcrumb> & {\n message: string;\n category: \"search\" | \"sort\" | \"pagination\" | \"filter\" | \"curation\";\n }\n ) => {\n Sentry.addBreadcrumb({\n level: \"debug\",\n type: \"query\",\n ...breadcrumb,\n category: `${debug.namespace}:${breadcrumb.category}`,\n });\n },\n hook: useDebugger,\n};\n"]}
|