@akinon/akifilter 0.3.1 → 0.4.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/dist/{components → cjs/components}/AppliedFilters/AppliedFilterItem.d.ts +1 -0
- package/dist/cjs/components/AppliedFilters/AppliedFilterItem.d.ts.map +1 -0
- package/dist/cjs/components/AppliedFilters/AppliedFilterItem.js +53 -0
- package/dist/cjs/components/AppliedFilters/common.d.ts +6 -0
- package/dist/cjs/components/AppliedFilters/common.d.ts.map +1 -0
- package/dist/cjs/components/AppliedFilters/common.js +33 -0
- package/dist/{components → cjs/components}/AppliedFilters/index.d.ts +1 -0
- package/dist/cjs/components/AppliedFilters/index.d.ts.map +1 -0
- package/dist/cjs/components/AppliedFilters/index.js +26 -0
- package/dist/cjs/components/AppliedFilters/styles.css +65 -0
- package/dist/cjs/components/ConditionalFilters/index.d.ts.map +1 -0
- package/dist/cjs/components/ConditionalFilters/index.js +32 -0
- package/dist/cjs/components/FilterContext/index.d.ts.map +1 -0
- package/dist/cjs/components/FilterContext/index.js +85 -0
- package/dist/{components → cjs/components}/SelectShownFilters/index.d.ts +1 -0
- package/dist/cjs/components/SelectShownFilters/index.d.ts.map +1 -0
- package/dist/cjs/components/SelectShownFilters/index.js +111 -0
- package/dist/cjs/components/SelectShownFilters/styles.css +99 -0
- package/dist/cjs/components/ShownFilters/index.d.ts.map +1 -0
- package/dist/cjs/components/ShownFilters/index.js +46 -0
- package/dist/cjs/components/index.d.ts.map +1 -0
- package/dist/cjs/components/index.js +21 -0
- package/dist/cjs/constants/index.d.ts.map +1 -0
- package/dist/cjs/constants/index.js +58 -0
- package/dist/cjs/i18n/index.d.ts.map +1 -0
- package/dist/cjs/i18n/index.js +14 -0
- package/dist/cjs/i18n/translations/en.d.ts.map +1 -0
- package/dist/cjs/i18n/translations/en.js +6 -0
- package/dist/cjs/i18n/translations/tr.d.ts.map +1 -0
- package/dist/cjs/i18n/translations/tr.js +6 -0
- package/dist/cjs/index.css +67 -0
- package/dist/{index.d.ts → cjs/index.d.ts} +1 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +34 -0
- package/dist/cjs/utils/index.d.ts.map +1 -0
- package/dist/cjs/utils/index.js +40 -0
- package/dist/esm/components/AppliedFilters/AppliedFilterItem.d.ts +12 -0
- package/dist/esm/components/AppliedFilters/AppliedFilterItem.d.ts.map +1 -0
- package/dist/esm/components/AppliedFilters/AppliedFilterItem.js +49 -0
- package/dist/esm/components/AppliedFilters/common.d.ts +6 -0
- package/dist/esm/components/AppliedFilters/common.d.ts.map +1 -0
- package/dist/esm/components/AppliedFilters/common.js +28 -0
- package/dist/esm/components/AppliedFilters/index.d.ts +4 -0
- package/dist/esm/components/AppliedFilters/index.d.ts.map +1 -0
- package/dist/esm/components/AppliedFilters/index.js +22 -0
- package/dist/esm/components/AppliedFilters/styles.css +65 -0
- package/dist/esm/components/ConditionalFilters/index.d.ts +3 -0
- package/dist/esm/components/ConditionalFilters/index.d.ts.map +1 -0
- package/dist/esm/components/ConditionalFilters/index.js +28 -0
- package/dist/esm/components/FilterContext/index.d.ts +45 -0
- package/dist/esm/components/FilterContext/index.d.ts.map +1 -0
- package/dist/esm/components/FilterContext/index.js +80 -0
- package/dist/esm/components/SelectShownFilters/index.d.ts +7 -0
- package/dist/esm/components/SelectShownFilters/index.d.ts.map +1 -0
- package/dist/esm/components/SelectShownFilters/index.js +107 -0
- package/dist/esm/components/SelectShownFilters/styles.css +99 -0
- package/dist/esm/components/ShownFilters/index.d.ts +3 -0
- package/dist/esm/components/ShownFilters/index.d.ts.map +1 -0
- package/dist/esm/components/ShownFilters/index.js +42 -0
- package/dist/esm/components/index.d.ts +6 -0
- package/dist/esm/components/index.d.ts.map +1 -0
- package/dist/esm/components/index.js +5 -0
- package/dist/esm/constants/index.d.ts +56 -0
- package/dist/esm/constants/index.d.ts.map +1 -0
- package/dist/esm/constants/index.js +55 -0
- package/dist/esm/i18n/index.d.ts +5 -0
- package/dist/esm/i18n/index.d.ts.map +1 -0
- package/dist/esm/i18n/index.js +11 -0
- package/dist/esm/i18n/translations/en.d.ts +5 -0
- package/dist/esm/i18n/translations/en.d.ts.map +1 -0
- package/dist/esm/i18n/translations/en.js +4 -0
- package/dist/esm/i18n/translations/tr.d.ts +5 -0
- package/dist/esm/i18n/translations/tr.d.ts.map +1 -0
- package/dist/esm/i18n/translations/tr.js +4 -0
- package/dist/esm/index.css +67 -0
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +30 -0
- package/dist/esm/utils/index.d.ts +25 -0
- package/dist/esm/utils/index.d.ts.map +1 -0
- package/dist/esm/utils/index.js +35 -0
- package/package.json +18 -7
- package/dist/Utils/index.d.ts.map +0 -1
- package/dist/components/AppliedFilters/AppliedFilterItem.d.ts.map +0 -1
- package/dist/components/AppliedFilters/common.d.ts +0 -7
- package/dist/components/AppliedFilters/common.d.ts.map +0 -1
- package/dist/components/AppliedFilters/index.d.ts.map +0 -1
- package/dist/components/ConditionalFilters/index.d.ts.map +0 -1
- package/dist/components/FilterContext/index.d.ts.map +0 -1
- package/dist/components/SelectShownFilters/index.d.ts.map +0 -1
- package/dist/components/ShownFilters/index.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/constants/index.d.ts.map +0 -1
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/translations/en.d.ts.map +0 -1
- package/dist/i18n/translations/tr.d.ts.map +0 -1
- package/dist/index.cjs +0 -31
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -16212
- /package/dist/{components → cjs/components}/ConditionalFilters/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/FilterContext/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/ShownFilters/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/index.d.ts +0 -0
- /package/dist/{constants → cjs/constants}/index.d.ts +0 -0
- /package/dist/{i18n → cjs/i18n}/index.d.ts +0 -0
- /package/dist/{i18n → cjs/i18n}/translations/en.d.ts +0 -0
- /package/dist/{i18n → cjs/i18n}/translations/tr.d.ts +0 -0
- /package/dist/{Utils → cjs/utils}/index.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppliedFilterItem.d.ts","sourceRoot":"","sources":["../../../../src/components/AppliedFilters/AppliedFilterItem.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAKtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAMpD,KAAK,sBAAsB,GAAG;IAC5B,cAAc,EAAE;QACd,MAAM;QACN,CACI,WAAW,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,GACrC,WAAW,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,EAAE,CAC1C;KACF,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,iBAAiB,uBAE3B,sBAAsB,6BA8FxB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppliedFilterItem = void 0;
|
|
4
|
+
require("./styles.css");
|
|
5
|
+
const icons_1 = require("@akinon/icons");
|
|
6
|
+
const ui_space_1 = require("@akinon/ui-space");
|
|
7
|
+
const ui_typography_1 = require("@akinon/ui-typography");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const FilterContext_1 = require("../FilterContext");
|
|
10
|
+
const lodash_1 = require("lodash");
|
|
11
|
+
const AppliedFilterItem = ({ filterKeyValue }) => {
|
|
12
|
+
const [filterKey, filterValue] = filterKeyValue;
|
|
13
|
+
const { state: { applicableFilters, appliedFilters }, dispatch, conditionalFiltersSchema } = (0, FilterContext_1.useFilterContext)();
|
|
14
|
+
// find filterItem for placeholder, etc from filterKey
|
|
15
|
+
const filterItem = [
|
|
16
|
+
...applicableFilters,
|
|
17
|
+
...(conditionalFiltersSchema || [])
|
|
18
|
+
].find(i => i.key === filterKey);
|
|
19
|
+
if (!filterItem) {
|
|
20
|
+
console.warn(`filterItem with key ${filterKey} not found`);
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
// TODO getModifiedFilterValue doesn't need filterValue. It can obtain it from filterItem
|
|
24
|
+
// TODO explain why you need to modify the filter value
|
|
25
|
+
// const modifiedFilterValue = getModifiedFilterValue({
|
|
26
|
+
// filterItem,
|
|
27
|
+
// filterValue
|
|
28
|
+
// });
|
|
29
|
+
// const shouldShowActiveFilter =
|
|
30
|
+
// !isEmpty(filterItem) && !isEmpty(modifiedFilterValue);
|
|
31
|
+
const handleRemoveFilter = (removedFilterKey) => {
|
|
32
|
+
// TODO write test for below comment
|
|
33
|
+
// you should mark the key as undefined instead of deleting it for antd form item to pick up the change
|
|
34
|
+
const newFilters = Object.assign(Object.assign({}, appliedFilters), { [removedFilterKey]: undefined });
|
|
35
|
+
dispatch({
|
|
36
|
+
type: 'SET_APPLIED_FILTERS',
|
|
37
|
+
payload: { appliedFilters: newFilters }
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const inputField = filterItem;
|
|
41
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
42
|
+
react_1.default.createElement(ui_space_1.Space, { key: filterKey, align: "center", className: "active-filter-item" },
|
|
43
|
+
react_1.default.createElement(ui_typography_1.Text, { className: "active-filter-item__label" }, inputField === null || inputField === void 0 ? void 0 :
|
|
44
|
+
inputField.placeholder,
|
|
45
|
+
":"),
|
|
46
|
+
react_1.default.createElement(ui_typography_1.Text, { className: "active-filter-item__value" }, (0, lodash_1.isBoolean)(filterValue)
|
|
47
|
+
? filterValue.toString()
|
|
48
|
+
: (0, lodash_1.isArray)(filterValue)
|
|
49
|
+
? filterValue.join(', ')
|
|
50
|
+
: filterValue),
|
|
51
|
+
react_1.default.createElement(icons_1.Icon, { icon: "close", size: 20, className: "active-filter-item__remove-filter-icon", onClick: () => handleRemoveFilter(filterKey) }))));
|
|
52
|
+
};
|
|
53
|
+
exports.AppliedFilterItem = AppliedFilterItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/AppliedFilters/common.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,UAAW,GAAG,YAAuC,CAAC;AAE/E,eAAO,MAAM,sBAAsB;gBAIrB,GAAG;iBACF,GAAG,CAAC,OAAO,CAAC;SA+B1B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getModifiedFilterValue = exports.isFileObject = void 0;
|
|
4
|
+
const ui_tree_select_1 = require("@akinon/ui-tree-select");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
const isFileObject = (value) => (value === null || value === void 0 ? void 0 : value.originFileObj) !== undefined;
|
|
8
|
+
exports.isFileObject = isFileObject;
|
|
9
|
+
const getModifiedFilterValue = ({ filterItem, filterValue }) => {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
switch (filterItem === null || filterItem === void 0 ? void 0 : filterItem.widget) {
|
|
12
|
+
case 'select':
|
|
13
|
+
if (((_a = filterItem === null || filterItem === void 0 ? void 0 : filterItem.widgetProps) === null || _a === void 0 ? void 0 : _a.mode) === 'multiple') {
|
|
14
|
+
return filterValue === null || filterValue === void 0 ? void 0 : filterValue.map((value) => {
|
|
15
|
+
const optionObject = filterItem.options.find((option) => option.value === value);
|
|
16
|
+
return (optionObject === null || optionObject === void 0 ? void 0 : optionObject.label) || value;
|
|
17
|
+
}).join(', ');
|
|
18
|
+
}
|
|
19
|
+
const optionObject = filterItem.options.find((option) => option.value === filterValue);
|
|
20
|
+
return (optionObject === null || optionObject === void 0 ? void 0 : optionObject.label) || filterValue;
|
|
21
|
+
case 'date-picker':
|
|
22
|
+
return filterValue === null || filterValue === void 0 ? void 0 : filterValue.format(constants_1.overallDateFormat);
|
|
23
|
+
case 'checkbox-group':
|
|
24
|
+
return filterValue === null || filterValue === void 0 ? void 0 : filterValue.map(() => 'Yes').join(', ');
|
|
25
|
+
case ui_tree_select_1.TreeSelect:
|
|
26
|
+
const tree = (_b = filterItem === null || filterItem === void 0 ? void 0 : filterItem.widgetProps) === null || _b === void 0 ? void 0 : _b.treeData;
|
|
27
|
+
const label = (_c = (0, utils_1.getTreeNodeByValue)({ tree, nodeValue: filterValue })) === null || _c === void 0 ? void 0 : _c.value;
|
|
28
|
+
return label || filterValue;
|
|
29
|
+
default:
|
|
30
|
+
return filterValue;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.getModifiedFilterValue = getModifiedFilterValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/AppliedFilters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAMtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,eAAO,MAAM,cAAc,yBAyC1B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppliedFilters = void 0;
|
|
4
|
+
require("./styles.css");
|
|
5
|
+
const icons_1 = require("@akinon/icons");
|
|
6
|
+
const ui_layout_1 = require("@akinon/ui-layout");
|
|
7
|
+
const ui_space_1 = require("@akinon/ui-space");
|
|
8
|
+
const ui_typography_1 = require("@akinon/ui-typography");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const FilterContext_1 = require("../FilterContext");
|
|
11
|
+
const AppliedFilterItem_1 = require("./AppliedFilterItem");
|
|
12
|
+
const AppliedFilters = () => {
|
|
13
|
+
var _a;
|
|
14
|
+
const { state: { appliedFilters }, dispatch } = (0, FilterContext_1.useFilterContext)();
|
|
15
|
+
const handleOnResetFilters = () => {
|
|
16
|
+
dispatch({ type: 'SET_APPLIED_FILTERS', payload: { appliedFilters: {} } });
|
|
17
|
+
};
|
|
18
|
+
return (react_1.default.createElement(ui_layout_1.Row, { align: "middle", className: "applied_filters" },
|
|
19
|
+
react_1.default.createElement(ui_layout_1.Col, { className: "applied_filters__list" },
|
|
20
|
+
react_1.default.createElement(ui_space_1.Space, null,
|
|
21
|
+
react_1.default.createElement(ui_typography_1.Text, { className: "applied_filters__label" }, "Active filters:"),
|
|
22
|
+
react_1.default.createElement(ui_space_1.Space, { className: "applied_filters__items", "data-testid": "appliedFilters" }, (_a = Object.entries(appliedFilters)) === null || _a === void 0 ? void 0 : _a.map(([filterKey, filterValue], i) => filterValue !== undefined && (react_1.default.createElement(AppliedFilterItem_1.AppliedFilterItem, { filterKeyValue: [filterKey, filterValue], key: i })))))),
|
|
23
|
+
react_1.default.createElement(ui_layout_1.Col, { className: "applied_filters__clear-filters" },
|
|
24
|
+
react_1.default.createElement(icons_1.Icon, { icon: "bin", size: 35, className: "applied_filters__reset-filters-icon", onClick: handleOnResetFilters }))));
|
|
25
|
+
};
|
|
26
|
+
exports.AppliedFilters = AppliedFilters;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
.akinon-filter .applied_filters {
|
|
2
|
+
padding: 5px 6px;
|
|
3
|
+
background-color: #2b344c;
|
|
4
|
+
border-radius: 5px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.applied_filters .applied_filters__list {
|
|
8
|
+
flex: 1;
|
|
9
|
+
background-color: #1e1e2d;
|
|
10
|
+
padding: 6px 16px;
|
|
11
|
+
border-radius: 3px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.applied_filters .applied_filters__label.akinon-typography {
|
|
15
|
+
color: white;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
font-weight: 600;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.applied_filters .applied_filters__reset-filters-icon {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
color: white;
|
|
23
|
+
font-size: 20px;
|
|
24
|
+
padding: 6px;
|
|
25
|
+
margin: 6px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.applied_filters .applied_filters__items {
|
|
29
|
+
flex-wrap: wrap;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.akinon-filter .active-filter-item {
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
background-color: white;
|
|
35
|
+
padding: 1px 4px;
|
|
36
|
+
border-radius: 3px;
|
|
37
|
+
line-height: 1rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.active-filter-item .akinon-space-item {
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.active-filter-item .active-filter-item__label.akinon-typography,
|
|
46
|
+
.active-filter-item .active-filter-item__value.akinon-typography {
|
|
47
|
+
color: #4a4a4a;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.active-filter-item .active-filter-item__label.akinon-typography {
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.active-filter-item .active-filter-item__value.akinon-typography {
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.active-filter-item .active-filter-item__remove-filter-icon {
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
background-color: #4482ff;
|
|
61
|
+
color: white;
|
|
62
|
+
font-size: 5px;
|
|
63
|
+
padding: 5px;
|
|
64
|
+
border-radius: 99px;
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ConditionalFilters/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,kBAAkB,gCAyC9B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConditionalFilters = void 0;
|
|
4
|
+
const akiform_builder_1 = require("@akinon/akiform-builder");
|
|
5
|
+
const ui_typography_1 = require("@akinon/ui-typography");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const FilterContext_1 = require("../FilterContext");
|
|
8
|
+
const ConditionalFilters = () => {
|
|
9
|
+
const { dispatch, state, conditionalFiltersSchema } = (0, FilterContext_1.useFilterContext)();
|
|
10
|
+
const { appliedFilters } = state;
|
|
11
|
+
const [formResetCount, setFormResetCount] = react_1.default.useState(0);
|
|
12
|
+
// reset form state when conditionalFiltersSchema changes
|
|
13
|
+
react_1.default.useEffect(() => {
|
|
14
|
+
setFormResetCount(formResetCount + 1);
|
|
15
|
+
}, [conditionalFiltersSchema]);
|
|
16
|
+
// second form created just to reset antd form state when conditionalFiltersSchema changes.
|
|
17
|
+
const handleFormChange = (allValues) => {
|
|
18
|
+
dispatch({
|
|
19
|
+
type: 'SET_APPLIED_FILTERS',
|
|
20
|
+
payload: {
|
|
21
|
+
appliedFilters: Object.assign(Object.assign({}, appliedFilters), allValues)
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
if (!conditionalFiltersSchema)
|
|
26
|
+
return null;
|
|
27
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
28
|
+
react_1.default.createElement(ui_typography_1.Paragraph, { className: "akinon-filter__header" }, "COMMON PARAMETER FILTERS"),
|
|
29
|
+
react_1.default.createElement("div", null,
|
|
30
|
+
react_1.default.createElement(akiform_builder_1.FormBuilderWatch, { builderFields: conditionalFiltersSchema, handleChange: handleFormChange, key: formResetCount, isDebounced: true }))));
|
|
31
|
+
};
|
|
32
|
+
exports.ConditionalFilters = ConditionalFilters;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FilterContext/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,EAAiB,QAAQ,EAAyB,MAAM,OAAO,CAAC;AAI9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGzC,MAAM,MAAM,WAAW,GAAG;IAExB,QAAQ,EAAE,MAAM,CAAC;IAEjB,cAAc,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;KAAE,CAAC;IAEzE,iBAAiB,EAAE,SAAS,EAAE,CAAC;IAE/B,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB,yBAAyB,EAAE,MAAM,CAAC;CACnC,CAAC;AAQF,MAAM,MAAM,YAAY,GACpB;IACE,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE;QAAE,cAAc,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;KAAE,CAAC;CAC5D,GACD;IACE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE;QAAE,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAA;KAAE,CAAC;CAClE,GACD;IACE,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE;QAAE,YAAY,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;KAAE,CAAC;CACxD,CAAC;AAEN,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IACjC,wBAAwB,EAAE,WAAW,CAAC,0BAA0B,CAAC,CAAC;CACnE,CAAC;AAEF,KAAK,0BAA0B,GAAG,WAAW,GAAG;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,4FAM/B,0BAA0B,sBA2F5B,CAAC;AAEF,wBAAgB,gBAAgB,kBAM/B"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useFilterContext = exports.FilterContextProvider = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
6
|
+
const use_immer_1 = require("use-immer");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
const FilterContext = (0, react_1.createContext)(undefined);
|
|
9
|
+
/**
|
|
10
|
+
* FilterContextProvider manages both filter context and antd form state.
|
|
11
|
+
* Reason for not separating antd form state from filter context is that antd
|
|
12
|
+
* form state is tightly coupled with filter context state.
|
|
13
|
+
*/
|
|
14
|
+
const FilterContextProvider = ({ children, filterSchema, customMainPath, useAppliedFilters, conditionalFiltersSchema }) => {
|
|
15
|
+
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
16
|
+
const mainPath = customMainPath
|
|
17
|
+
? customMainPath
|
|
18
|
+
: (0, utils_1.getPathFragments)(pathname).mainPath;
|
|
19
|
+
if (!mainPath) {
|
|
20
|
+
throw new Error('mainPath is not defined');
|
|
21
|
+
}
|
|
22
|
+
// load appliedFilters from local storage
|
|
23
|
+
const localAppliedFilters = JSON.parse(localStorage.getItem(`appliedFilters-${mainPath}`) || '{}');
|
|
24
|
+
// get applied filters from parent component
|
|
25
|
+
const parentAppliedFilters = useAppliedFilters[0];
|
|
26
|
+
// load shownFilters from local storage
|
|
27
|
+
const localShownFilters = JSON.parse(localStorage.getItem(`shownFilters-${mainPath}`) || '[]');
|
|
28
|
+
const initialState = {
|
|
29
|
+
mainPath,
|
|
30
|
+
// if parentAppliedFilters is not empty, use it. Otherwise, use localAppliedFilters. don't merge them to prevent conflicts since you want parent to have the control
|
|
31
|
+
appliedFilters: Object.keys(parentAppliedFilters).length > 0
|
|
32
|
+
? parentAppliedFilters
|
|
33
|
+
: localAppliedFilters,
|
|
34
|
+
applicableFilters: filterSchema,
|
|
35
|
+
// if localShownFilters is not defined, only show first 8 filters
|
|
36
|
+
shownFilters: localShownFilters.length
|
|
37
|
+
? localShownFilters
|
|
38
|
+
: filterSchema.map(filter => filter.key).slice(0, 8),
|
|
39
|
+
recreateShownFiltersCount: 0
|
|
40
|
+
};
|
|
41
|
+
const [state, dispatch] = (0, use_immer_1.useImmerReducer)((draft, action) => {
|
|
42
|
+
switch (action.type) {
|
|
43
|
+
case 'SET_APPLIED_FILTERS':
|
|
44
|
+
// console.log('SET_APPLIED_FILTERS', action.payload.appliedFilters);
|
|
45
|
+
draft.appliedFilters = action.payload.appliedFilters;
|
|
46
|
+
return;
|
|
47
|
+
case 'SET_APPLICABLE_FILTERS':
|
|
48
|
+
// console.log('SET_APPLICABLE_FILTERS');
|
|
49
|
+
draft.applicableFilters = action.payload.applicableFilters;
|
|
50
|
+
return;
|
|
51
|
+
case 'SET_SHOWN_FILTERS':
|
|
52
|
+
// console.log('SET_SHOWN_FILTERS', action.payload.shownFilters);
|
|
53
|
+
draft.shownFilters = action.payload.shownFilters;
|
|
54
|
+
draft.recreateShownFiltersCount = draft.recreateShownFiltersCount + 1;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
}, initialState);
|
|
58
|
+
(0, react_1.useEffect)(() => {
|
|
59
|
+
// send applied filters to parent component
|
|
60
|
+
useAppliedFilters[1](state.appliedFilters);
|
|
61
|
+
// save current appliedFilters to local storage to persist them
|
|
62
|
+
localStorage.setItem(`appliedFilters-${mainPath}`, JSON.stringify(state.appliedFilters));
|
|
63
|
+
}, [state.appliedFilters]);
|
|
64
|
+
// save current shownFilters to local storage to persist them
|
|
65
|
+
(0, react_1.useEffect)(() => {
|
|
66
|
+
localStorage.setItem(`shownFilters-${mainPath}`, JSON.stringify(state.shownFilters));
|
|
67
|
+
}, [state.shownFilters]);
|
|
68
|
+
(0, react_1.useEffect)(() => {
|
|
69
|
+
dispatch({
|
|
70
|
+
type: 'SET_APPLICABLE_FILTERS',
|
|
71
|
+
payload: { applicableFilters: filterSchema }
|
|
72
|
+
});
|
|
73
|
+
}, [filterSchema]);
|
|
74
|
+
// console.log('form state', state);
|
|
75
|
+
return (react_1.default.createElement(FilterContext.Provider, { value: { state, dispatch, conditionalFiltersSchema } }, children));
|
|
76
|
+
};
|
|
77
|
+
exports.FilterContextProvider = FilterContextProvider;
|
|
78
|
+
function useFilterContext() {
|
|
79
|
+
const context = (0, react_1.useContext)(FilterContext);
|
|
80
|
+
if (context === undefined) {
|
|
81
|
+
throw new Error('useFilterContext must be used within a FilterProvider');
|
|
82
|
+
}
|
|
83
|
+
return context;
|
|
84
|
+
}
|
|
85
|
+
exports.useFilterContext = useFilterContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectShownFilters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AActB,OAAO,KAAmB,MAAM,OAAO,CAAC;AAWxC;;GAEG;AACH,eAAO,MAAM,kBAAkB,yBA+J9B,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SelectShownFilters = void 0;
|
|
4
|
+
require("./styles.css");
|
|
5
|
+
const akiform_builder_1 = require("@akinon/akiform-builder");
|
|
6
|
+
const icons_1 = require("@akinon/icons");
|
|
7
|
+
const ui_input_1 = require("@akinon/ui-input");
|
|
8
|
+
const ui_pagination_1 = require("@akinon/ui-pagination");
|
|
9
|
+
const ui_divider_1 = require("@akinon/ui-divider");
|
|
10
|
+
const ui_modal_1 = require("@akinon/ui-modal");
|
|
11
|
+
const ui_space_1 = require("@akinon/ui-space");
|
|
12
|
+
const react_1 = require("react");
|
|
13
|
+
const FilterContext_1 = require("../FilterContext");
|
|
14
|
+
// import {
|
|
15
|
+
// getModalFormInitialValues,
|
|
16
|
+
// getModalFormMeta,
|
|
17
|
+
// transformFiltersFormMetaFieldsToModalFormMetaFields
|
|
18
|
+
// } from './common';
|
|
19
|
+
// import useOnModalCancel from './hooks/useOnModalCancel';
|
|
20
|
+
// TODO includeFileFilter
|
|
21
|
+
/**
|
|
22
|
+
* Via this component, user can select which filters to show in the UI from applicableFilters.
|
|
23
|
+
*/
|
|
24
|
+
const SelectShownFilters = () => {
|
|
25
|
+
const [search, setSearch] = (0, react_1.useState)('');
|
|
26
|
+
const [pagination, setPagination] = (0, react_1.useState)({
|
|
27
|
+
current: 1,
|
|
28
|
+
pageSize: 60
|
|
29
|
+
});
|
|
30
|
+
const { state, dispatch } = (0, FilterContext_1.useFilterContext)();
|
|
31
|
+
const { applicableFilters, shownFilters } = state;
|
|
32
|
+
// create checkbox form item for each filter, which will determine whether to show it or not
|
|
33
|
+
const modalFormItems = [];
|
|
34
|
+
applicableFilters.forEach((filter) => {
|
|
35
|
+
var _a;
|
|
36
|
+
if (search &&
|
|
37
|
+
!((_a = filter.placeholder) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(search.toLowerCase())) &&
|
|
38
|
+
!filter.label.toLowerCase().includes(search.toLowerCase())) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
modalFormItems.push({
|
|
42
|
+
key: filter.key,
|
|
43
|
+
label: filter.placeholder || filter.label || filter.key,
|
|
44
|
+
type: 'checkbox',
|
|
45
|
+
value: shownFilters.includes(filter.key),
|
|
46
|
+
props: {
|
|
47
|
+
labelRightAligned: true
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
const modalFormItemsPaginated = modalFormItems.slice((pagination.current - 1) * pagination.pageSize, pagination.current * pagination.pageSize);
|
|
52
|
+
// export const transformFiltersFormMetaFieldsToModalFormMetaFields = (filtersFormMetaFields) =>
|
|
53
|
+
// filtersFormMetaFields.map((metaField) => ({
|
|
54
|
+
// key: metaField.key,
|
|
55
|
+
// widget: WidgetType.CHECKBOX,
|
|
56
|
+
// children: metaField.placeholder,
|
|
57
|
+
// }));
|
|
58
|
+
const [isModalOpen, setIsModalOpen] = (0, react_1.useState)(false);
|
|
59
|
+
// const onModalCancel = useOnModalCancel({
|
|
60
|
+
// setCurrentFiltersFormMeta,
|
|
61
|
+
// modalForm,
|
|
62
|
+
// setIsModalOpen,
|
|
63
|
+
// staticFiltersFormMetaFields,
|
|
64
|
+
// dynamicFiltersFormMetaFields
|
|
65
|
+
// });
|
|
66
|
+
// const modalFormInitialValues = getModalFormInitialValues(
|
|
67
|
+
// currentFiltersFormMeta
|
|
68
|
+
// );
|
|
69
|
+
// const modalFormMetaFields =
|
|
70
|
+
// transformFiltersFormMetaFieldsToModalFormMetaFields([
|
|
71
|
+
// ...staticFiltersFormMetaFields,
|
|
72
|
+
// ...dynamicFiltersFormMetaFields
|
|
73
|
+
// ]);
|
|
74
|
+
const handleOpenModalIconClick = () => {
|
|
75
|
+
setIsModalOpen(true);
|
|
76
|
+
};
|
|
77
|
+
const onModalCancel = () => {
|
|
78
|
+
setIsModalOpen(false);
|
|
79
|
+
};
|
|
80
|
+
const handleModalFormValuesChange = (allValues) => {
|
|
81
|
+
// select true values from allValues
|
|
82
|
+
const shownFilters = Object.keys(allValues).filter(key => allValues[key] === true);
|
|
83
|
+
dispatch({
|
|
84
|
+
type: 'SET_SHOWN_FILTERS',
|
|
85
|
+
payload: { shownFilters }
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
// const addFileToFilters = selectFile => {
|
|
89
|
+
// setFilters({
|
|
90
|
+
// pagePath: mainPath,
|
|
91
|
+
// filters: { ...pageFilters, filter_file: selectFile.file }
|
|
92
|
+
// });
|
|
93
|
+
// };
|
|
94
|
+
return (react_1.default.createElement(ui_space_1.Space, { className: "filter-options" },
|
|
95
|
+
react_1.default.createElement("div", { className: "filter-options__item", onClick: handleOpenModalIconClick },
|
|
96
|
+
react_1.default.createElement(icons_1.Icon, { icon: "filter" })),
|
|
97
|
+
react_1.default.createElement(ui_modal_1.Modal, { className: "filter-options__modal", onCancel: onModalCancel, open: isModalOpen, destroyOnClose: true, footer: null, width: '80%', "data-testid": "filter-options-modal" },
|
|
98
|
+
react_1.default.createElement("div", { className: "filter-options__modal-header" },
|
|
99
|
+
react_1.default.createElement("div", { className: "filter-options__modal-header-banner" }),
|
|
100
|
+
react_1.default.createElement("h1", { className: "filter-options__modal-header-title" }, "Select Shown Filters")),
|
|
101
|
+
react_1.default.createElement(ui_divider_1.Divider, null),
|
|
102
|
+
react_1.default.createElement("div", { className: "filter-options__modal-control" },
|
|
103
|
+
react_1.default.createElement(ui_input_1.Input, { placeholder: "Search", onChange: e => setSearch(e.target.value), className: "filter-options__modal-search" }),
|
|
104
|
+
react_1.default.createElement("div", { className: "filter-options__modal-pagination" },
|
|
105
|
+
react_1.default.createElement(ui_pagination_1.Pagination, { current: pagination.current, pageSize: pagination.pageSize, total: modalFormItems.length, onChange: (page, pageSize) => {
|
|
106
|
+
setPagination({ current: page, pageSize });
|
|
107
|
+
}, showSizeChanger: false, simple: true }))),
|
|
108
|
+
react_1.default.createElement("div", { className: "filter-options__modal-form" },
|
|
109
|
+
react_1.default.createElement(akiform_builder_1.FormBuilderWatch, { builderFields: modalFormItemsPaginated, handleChange: handleModalFormValuesChange, isDebounced: false })))));
|
|
110
|
+
};
|
|
111
|
+
exports.SelectShownFilters = SelectShownFilters;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
.filter-options .filter-options__item {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
height: 36px;
|
|
6
|
+
width: 36px;
|
|
7
|
+
background-color: #4482ff;
|
|
8
|
+
color: var(--color-neutral-50);
|
|
9
|
+
border-radius: 5px;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.filter-options .filter-options__filter-modal-open-icon {
|
|
14
|
+
color: white;
|
|
15
|
+
font-size: 23px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.filter-options .filter-options__modal-header {
|
|
19
|
+
position: relative;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.filter-options .filter-options__modal-header-banner {
|
|
25
|
+
position: absolute;
|
|
26
|
+
left: 0;
|
|
27
|
+
width: 4px;
|
|
28
|
+
height: 16px;
|
|
29
|
+
background-color: #ff5163;
|
|
30
|
+
left: -22px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.filter-options .filter-options__modal-header-title {
|
|
34
|
+
font-size: 20px;
|
|
35
|
+
color: white;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.filter-options .filter-options__modal-divider.akinon-divider-horizontal {
|
|
41
|
+
background-color: #363d51;
|
|
42
|
+
width: calc(100% + 44px);
|
|
43
|
+
margin: 15px;
|
|
44
|
+
margin-left: -22px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.filter-options .filter-options__modal-control {
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
align-items: center;
|
|
51
|
+
margin-bottom: 15px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.filter-options .filter-options__modal-search {
|
|
55
|
+
width: 250px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.filter-options .filter-options__modal-form.akinon-form {
|
|
59
|
+
margin: 32px 44px 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.filter-options .filter-options__export-item {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
align-items: center;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.filter-options .filter-options__export-icon {
|
|
70
|
+
color: white;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.filter-options .filter-options__export-label.akinon-typography {
|
|
74
|
+
text-transform: uppercase;
|
|
75
|
+
color: white;
|
|
76
|
+
font-size: 11px;
|
|
77
|
+
font-weight: bold;
|
|
78
|
+
line-height: 14px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.filter-options__modal.akinon-modal .akinon-checkbox-wrapper {
|
|
82
|
+
color: white;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.filter-options__modal.akinon-modal
|
|
86
|
+
.akinon-checkbox-checked
|
|
87
|
+
.akinon-checkbox-inner {
|
|
88
|
+
background-color: #6c7ebe;
|
|
89
|
+
border-color: #6c7ebe;
|
|
90
|
+
|
|
91
|
+
&:hover {
|
|
92
|
+
border-color: #6c7ebe;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.filter-options__modal-form .akinon-form {
|
|
97
|
+
display: grid;
|
|
98
|
+
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
99
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ShownFilters/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,YAAY,yBAkExB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShownFilters = void 0;
|
|
4
|
+
const akiform_builder_1 = require("@akinon/akiform-builder");
|
|
5
|
+
const ui_typography_1 = require("@akinon/ui-typography");
|
|
6
|
+
const dayjs_1 = require("dayjs");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const FilterContext_1 = require("../FilterContext");
|
|
9
|
+
const ShownFilters = () => {
|
|
10
|
+
const { state, dispatch } = (0, FilterContext_1.useFilterContext)();
|
|
11
|
+
const { applicableFilters, shownFilters, appliedFilters, recreateShownFiltersCount } = state;
|
|
12
|
+
// derive form items from applicableFilters and shownFilters
|
|
13
|
+
const shownApplicableFilters = applicableFilters.filter(filter => shownFilters.includes(filter.key));
|
|
14
|
+
// create form items from shownApplicableFilters and appliedFilters.
|
|
15
|
+
// the shownApplicableFilters determines the schema of the form items and
|
|
16
|
+
// appliedFilters determines the values of the form items
|
|
17
|
+
const formItems = shownApplicableFilters.map(filter => {
|
|
18
|
+
return Object.assign(Object.assign({}, filter), { value: appliedFilters[filter.key], props: Object.assign(Object.assign({}, ((filter === null || filter === void 0 ? void 0 : filter.props) || {})), { labelRightAligned: true }) });
|
|
19
|
+
});
|
|
20
|
+
// remove the label from the form items since label is not used in design
|
|
21
|
+
formItems.forEach(item => {
|
|
22
|
+
if (item.type === 'checkbox')
|
|
23
|
+
return;
|
|
24
|
+
delete item.label;
|
|
25
|
+
});
|
|
26
|
+
const handleChange = (changedValues) => {
|
|
27
|
+
// for datepicker values, convert them to string
|
|
28
|
+
Object.keys(changedValues).forEach(key => {
|
|
29
|
+
if (changedValues[key] &&
|
|
30
|
+
typeof changedValues[key].isValid === 'function' &&
|
|
31
|
+
typeof changedValues[key].format === 'function') {
|
|
32
|
+
changedValues[key] = (0, dayjs_1.default)(changedValues[key]).format('YYYY-MM-DD');
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
dispatch({
|
|
36
|
+
type: 'SET_APPLIED_FILTERS',
|
|
37
|
+
payload: {
|
|
38
|
+
appliedFilters: changedValues
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
return (react_1.default.createElement("div", { className: "shown-filters", "data-testid": "shown-filters" },
|
|
43
|
+
react_1.default.createElement(ui_typography_1.Paragraph, { className: "akinon-filter__header" }, "MAIN FILTERS"),
|
|
44
|
+
react_1.default.createElement(akiform_builder_1.FormBuilderWatch, { key: recreateShownFiltersCount, builderFields: formItems, handleChange: handleChange, isDebounced: true })));
|
|
45
|
+
};
|
|
46
|
+
exports.ShownFilters = ShownFilters;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AppliedFilters"), exports);
|
|
18
|
+
__exportStar(require("./ConditionalFilters"), exports);
|
|
19
|
+
__exportStar(require("./FilterContext"), exports);
|
|
20
|
+
__exportStar(require("./SelectShownFilters"), exports);
|
|
21
|
+
__exportStar(require("./ShownFilters"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAC9C,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,4BAA4B,aAAa,CAAC;AACvD,eAAO,MAAM,6BAA6B,eAAe,CAAC;AAC1D,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAC/C,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AACpE,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,eAAO,MAAM,0BAA0B,wBAA8D,CAAC;AACtG,eAAO,MAAM,qBAAqB,qBAA8C,CAAC;AACjF,eAAO,MAAM,yBAAyB;;;;;;;CAOrC,CAAC;AAEF,eAAO,MAAM,iCAAiC,sBAAwD,CAAC;AACvG,eAAO,MAAM,cAAc,qBAAmD,CAAC;AAE/E,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC,eAAO,MAAM,eAAe,4CAA4C,CAAC;AAEzE,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAE7D,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAEpD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAE7C,eAAO,MAAM,uBAAuB,QAA+B,CAAC;AAEpE,eAAO,MAAM,iBAAiB,yBAAyB,CAAC;AAExD,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AAEjE,eAAO,MAAM,oBAAoB;;;;CAIhC,CAAC;AAEF,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,eAAO,MAAM,UAAU;;;;;CAKtB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC"}
|