@bigbinary/neeto-filters-frontend 4.0.1 → 4.1.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/Bar.js +667 -0
- package/dist/Bar.js.map +1 -0
- package/dist/Filters.js +368 -0
- package/dist/Filters.js.map +1 -0
- package/dist/Segments.js +529 -0
- package/dist/Segments.js.map +1 -0
- package/dist/cjs/Bar.js +681 -0
- package/dist/cjs/Bar.js.map +1 -0
- package/dist/cjs/Filters.js +379 -0
- package/dist/cjs/Filters.js.map +1 -0
- package/dist/cjs/Segments.js +543 -0
- package/dist/cjs/Segments.js.map +1 -0
- package/dist/cjs/hooks.js +17 -0
- package/dist/cjs/hooks.js.map +1 -0
- package/dist/cjs/index.js +72 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/utils.js +24 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/constants-8f6e851e.js +125 -0
- package/dist/constants-8f6e851e.js.map +1 -0
- package/dist/constants-fb0f688a.js +135 -0
- package/dist/constants-fb0f688a.js.map +1 -0
- package/dist/hooks.js +7 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index-03114015.js +336 -0
- package/dist/index-03114015.js.map +1 -0
- package/dist/index-2d1d9838.js +971 -0
- package/dist/index-2d1d9838.js.map +1 -0
- package/dist/index-31aaf3e4.js +302 -0
- package/dist/index-31aaf3e4.js.map +1 -0
- package/dist/index-95fe069e.js +958 -0
- package/dist/index-95fe069e.js.map +1 -0
- package/dist/index.js +53 -3703
- package/dist/index.js.map +1 -1
- package/dist/useSegmentsApi-003055eb.js +96 -0
- package/dist/useSegmentsApi-003055eb.js.map +1 -0
- package/dist/useSegmentsApi-c514647d.js +86 -0
- package/dist/useSegmentsApi-c514647d.js.map +1 -0
- package/dist/utils-61b4223d.js +861 -0
- package/dist/utils-61b4223d.js.map +1 -0
- package/dist/utils-9ea34335.js +809 -0
- package/dist/utils-9ea34335.js.map +1 -0
- package/dist/utils.js +12 -0
- package/dist/utils.js.map +1 -0
- package/package.json +24 -12
- package/dist/index.cjs.js +0 -3773
- package/dist/index.cjs.js.map +0 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var Bar = require('./Bar.js');
|
|
6
|
+
var Filters = require('./Filters.js');
|
|
7
|
+
var Segments = require('./Segments.js');
|
|
8
|
+
var utils = require('../utils-61b4223d.js');
|
|
9
|
+
var useSegmentsApi = require('../useSegmentsApi-003055eb.js');
|
|
10
|
+
require('../constants-fb0f688a.js');
|
|
11
|
+
require('react');
|
|
12
|
+
require('@tanstack/react-query');
|
|
13
|
+
require('classnames');
|
|
14
|
+
require('i18next');
|
|
15
|
+
require('@bigbinary/neeto-cist');
|
|
16
|
+
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
17
|
+
require('ramda');
|
|
18
|
+
require('../index-03114015.js');
|
|
19
|
+
require('@bigbinary/neeto-icons/Delete');
|
|
20
|
+
require('@bigbinary/neetoui/Accordion');
|
|
21
|
+
require('@bigbinary/neetoui/Button');
|
|
22
|
+
require('@bigbinary/neetoui/Pane');
|
|
23
|
+
require('@bigbinary/neetoui/Typography');
|
|
24
|
+
require('@bigbinary/neetoui/formik/ActionBlock');
|
|
25
|
+
require('@bigbinary/neetoui/formik/Form');
|
|
26
|
+
require('@bigbinary/neetoui/formik/Input');
|
|
27
|
+
require('react-i18next');
|
|
28
|
+
require('react-router-dom/cjs/react-router-dom.min');
|
|
29
|
+
require('../index-2d1d9838.js');
|
|
30
|
+
require('@bigbinary/neetoui/Select');
|
|
31
|
+
require('dayjs');
|
|
32
|
+
require('react/jsx-runtime');
|
|
33
|
+
require('@bigbinary/neetoui/DatePicker');
|
|
34
|
+
require('@bigbinary/neetoui/TimePicker');
|
|
35
|
+
require('@bigbinary/neetoui/Input');
|
|
36
|
+
require('@bigbinary/neetoui/TreeSelect');
|
|
37
|
+
require('@bigbinary/neeto-icons/Plus');
|
|
38
|
+
require('yup');
|
|
39
|
+
require('@bigbinary/neeto-commons-frontend/utils');
|
|
40
|
+
require('react-router-dom');
|
|
41
|
+
require('@bigbinary/neeto-hotkeys');
|
|
42
|
+
require('@bigbinary/neeto-icons/Close');
|
|
43
|
+
require('@bigbinary/neetoui/Tooltip');
|
|
44
|
+
require('@bigbinary/neetoui/Dropdown');
|
|
45
|
+
require('axios');
|
|
46
|
+
require('dayjs/plugin/timezone');
|
|
47
|
+
require('dayjs/plugin/utc');
|
|
48
|
+
require('dayjs/plugin/weekday');
|
|
49
|
+
require('@bigbinary/neeto-icons/Help');
|
|
50
|
+
require('@bigbinary/neeto-molecules/Search');
|
|
51
|
+
require('@bigbinary/neeto-commons-frontend/constants');
|
|
52
|
+
require('@bigbinary/neetoui/Alert');
|
|
53
|
+
require('@bigbinary/neetoui/Spinner');
|
|
54
|
+
require('@hello-pangea/dnd');
|
|
55
|
+
require('@bigbinary/neeto-icons/Down');
|
|
56
|
+
require('@bigbinary/neeto-molecules/MenuBar');
|
|
57
|
+
require('@bigbinary/neeto-molecules/MoreDropdown');
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
exports.Bar = Bar;
|
|
62
|
+
exports.Filters = Filters;
|
|
63
|
+
exports.Segments = Segments;
|
|
64
|
+
exports.buildFilterColumnsFromFields = utils.buildFilterColumnsFromFields;
|
|
65
|
+
exports.buildFiltersFromURL = utils.buildFiltersFromURL;
|
|
66
|
+
exports.buildSelectorsFromURL = utils.buildSelectorsFromURL;
|
|
67
|
+
exports.buildUrlFromFilters = utils.buildUrlFromFilters;
|
|
68
|
+
exports.buildUrlFromSegment = utils.buildUrlFromSegment;
|
|
69
|
+
exports.useDestroySegment = useSegmentsApi.useDestroySegment;
|
|
70
|
+
exports.useFetchSegments = useSegmentsApi.useFetchSegments;
|
|
71
|
+
exports.useUpdateSegment = useSegmentsApi.useUpdateSegment;
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var utils = require('../utils-61b4223d.js');
|
|
6
|
+
require('../constants-fb0f688a.js');
|
|
7
|
+
require('i18next');
|
|
8
|
+
require('@bigbinary/neeto-cist');
|
|
9
|
+
require('@bigbinary/neeto-commons-frontend/utils');
|
|
10
|
+
require('ramda');
|
|
11
|
+
require('dayjs');
|
|
12
|
+
require('dayjs/plugin/timezone');
|
|
13
|
+
require('dayjs/plugin/utc');
|
|
14
|
+
require('dayjs/plugin/weekday');
|
|
15
|
+
require('@bigbinary/neeto-icons/Help');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
exports.buildFilterColumnsFromFields = utils.buildFilterColumnsFromFields;
|
|
20
|
+
exports.buildFiltersFromURL = utils.buildFiltersFromURL;
|
|
21
|
+
exports.buildSelectorsFromURL = utils.buildSelectorsFromURL;
|
|
22
|
+
exports.buildUrlFromFilters = utils.buildUrlFromFilters;
|
|
23
|
+
exports.buildUrlFromSegment = utils.buildUrlFromSegment;
|
|
24
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
function _typeof(o) {
|
|
2
|
+
"@babel/helpers - typeof";
|
|
3
|
+
|
|
4
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
5
|
+
return typeof o;
|
|
6
|
+
} : function (o) {
|
|
7
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
8
|
+
}, _typeof(o);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function _toPrimitive(input, hint) {
|
|
12
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
13
|
+
var prim = input[Symbol.toPrimitive];
|
|
14
|
+
if (prim !== undefined) {
|
|
15
|
+
var res = prim.call(input, hint || "default");
|
|
16
|
+
if (_typeof(res) !== "object") return res;
|
|
17
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
18
|
+
}
|
|
19
|
+
return (hint === "string" ? String : Number)(input);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function _toPropertyKey(arg) {
|
|
23
|
+
var key = _toPrimitive(arg, "string");
|
|
24
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function _defineProperty(obj, key, value) {
|
|
28
|
+
key = _toPropertyKey(key);
|
|
29
|
+
if (key in obj) {
|
|
30
|
+
Object.defineProperty(obj, key, {
|
|
31
|
+
value: value,
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true
|
|
35
|
+
});
|
|
36
|
+
} else {
|
|
37
|
+
obj[key] = value;
|
|
38
|
+
}
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var SEGMENTS_BASE_URL = "/neeto_filters/segments";
|
|
43
|
+
var DATE_OPTIONS = [{
|
|
44
|
+
label: "Today",
|
|
45
|
+
value: "today"
|
|
46
|
+
}, {
|
|
47
|
+
label: "Yesterday",
|
|
48
|
+
value: "yesterday"
|
|
49
|
+
}, {
|
|
50
|
+
label: "This week",
|
|
51
|
+
value: "this-week"
|
|
52
|
+
}, {
|
|
53
|
+
label: "Last week",
|
|
54
|
+
value: "last-week"
|
|
55
|
+
}, {
|
|
56
|
+
label: "This month",
|
|
57
|
+
value: "this-month"
|
|
58
|
+
}, {
|
|
59
|
+
label: "Last month",
|
|
60
|
+
value: "last-month"
|
|
61
|
+
}, {
|
|
62
|
+
label: "This year",
|
|
63
|
+
value: "this-year"
|
|
64
|
+
}, {
|
|
65
|
+
label: "Last year",
|
|
66
|
+
value: "last-year"
|
|
67
|
+
}, {
|
|
68
|
+
label: "All time",
|
|
69
|
+
value: "all-time"
|
|
70
|
+
}, {
|
|
71
|
+
label: "After",
|
|
72
|
+
value: "after"
|
|
73
|
+
}, {
|
|
74
|
+
label: "Before",
|
|
75
|
+
value: "before"
|
|
76
|
+
}, {
|
|
77
|
+
label: "Custom date range",
|
|
78
|
+
value: "custom-date-range"
|
|
79
|
+
}];
|
|
80
|
+
var SINGLE_DATE_OPTIONS = [{
|
|
81
|
+
label: "On",
|
|
82
|
+
value: "on"
|
|
83
|
+
}, {
|
|
84
|
+
label: "After",
|
|
85
|
+
value: "after"
|
|
86
|
+
}, {
|
|
87
|
+
label: "Before",
|
|
88
|
+
value: "before"
|
|
89
|
+
}, {
|
|
90
|
+
label: "Between",
|
|
91
|
+
value: "between"
|
|
92
|
+
}];
|
|
93
|
+
var SINGLE_TIME_OPTIONS = [{
|
|
94
|
+
label: "At",
|
|
95
|
+
value: "at"
|
|
96
|
+
}, {
|
|
97
|
+
label: "After",
|
|
98
|
+
value: "after"
|
|
99
|
+
}, {
|
|
100
|
+
label: "Before",
|
|
101
|
+
value: "before"
|
|
102
|
+
}, {
|
|
103
|
+
label: "Between",
|
|
104
|
+
value: "between"
|
|
105
|
+
}];
|
|
106
|
+
var TIME_OPTIONS = [{
|
|
107
|
+
label: "This hour",
|
|
108
|
+
value: "this-hour"
|
|
109
|
+
}, {
|
|
110
|
+
label: "Last hour",
|
|
111
|
+
value: "last-hour"
|
|
112
|
+
}, {
|
|
113
|
+
label: "Custom time range",
|
|
114
|
+
value: "custom-time-range"
|
|
115
|
+
}];
|
|
116
|
+
var DATE_RULES = {
|
|
117
|
+
today: "on",
|
|
118
|
+
yesterday: "on",
|
|
119
|
+
"all-time": "before"
|
|
120
|
+
};
|
|
121
|
+
var SEARCH_TERM_KEY = "search_term";
|
|
122
|
+
var SEGMENT_ID_KEY = "segment_id";
|
|
123
|
+
|
|
124
|
+
export { DATE_OPTIONS as D, SEARCH_TERM_KEY as S, TIME_OPTIONS as T, _defineProperty as _, SEGMENT_ID_KEY as a, DATE_RULES as b, SINGLE_DATE_OPTIONS as c, SINGLE_TIME_OPTIONS as d, SEGMENTS_BASE_URL as e };
|
|
125
|
+
//# sourceMappingURL=constants-8f6e851e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-8f6e851e.js","sources":["../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../app/javascript/src/common/constants.js"],"sourcesContent":["export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export const SEGMENTS_BASE_URL = \"/neeto_filters/segments\";\n\nexport const DATE_OPTIONS = [\n { label: \"Today\", value: \"today\" },\n { label: \"Yesterday\", value: \"yesterday\" },\n { label: \"This week\", value: \"this-week\" },\n { label: \"Last week\", value: \"last-week\" },\n { label: \"This month\", value: \"this-month\" },\n { label: \"Last month\", value: \"last-month\" },\n { label: \"This year\", value: \"this-year\" },\n { label: \"Last year\", value: \"last-year\" },\n { label: \"All time\", value: \"all-time\" },\n { label: \"After\", value: \"after\" },\n { label: \"Before\", value: \"before\" },\n { label: \"Custom date range\", value: \"custom-date-range\" },\n];\n\nexport const SINGLE_DATE_OPTIONS = [\n { label: \"On\", value: \"on\" },\n { label: \"After\", value: \"after\" },\n { label: \"Before\", value: \"before\" },\n { label: \"Between\", value: \"between\" },\n];\n\nexport const SINGLE_TIME_OPTIONS = [\n { label: \"At\", value: \"at\" },\n { label: \"After\", value: \"after\" },\n { label: \"Before\", value: \"before\" },\n { label: \"Between\", value: \"between\" },\n];\n\nexport const TIME_OPTIONS = [\n { label: \"This hour\", value: \"this-hour\" },\n { label: \"Last hour\", value: \"last-hour\" },\n { label: \"Custom time range\", value: \"custom-time-range\" },\n];\n\nexport const DATE_RULES = {\n today: \"on\",\n yesterday: \"on\",\n \"all-time\": \"before\",\n};\n\nexport const SEARCH_TERM_KEY = \"search_term\";\nexport const SEGMENT_ID_KEY = \"segment_id\";\n"],"names":["toPrimitive","toPropertyKey","SEGMENTS_BASE_URL","DATE_OPTIONS","label","value","SINGLE_DATE_OPTIONS","SINGLE_TIME_OPTIONS","TIME_OPTIONS","DATE_RULES","today","yesterday","SEARCH_TERM_KEY","SEGMENT_ID_KEY"],"mappings":"AAAe,SAAS,OAAO,CAAC,CAAC,EAAE;AACnC,EAAE,yBAAyB,CAAC;A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,KAAK,EAAE,WAAA;AAAY,CAAC,EAC1C;AAAED,EAAAA,KAAK,EAAE,mBAAmB;AAAEC,EAAAA,KAAK,EAAE,mBAAA;AAAoB,CAAC,EAC3D;AAEM,IAAMI,UAAU,GAAG;AACxBC,EAAAA,KAAK,EAAE,IAAI;AACXC,EAAAA,SAAS,EAAE,IAAI;AACf,EAAA,UAAU,EAAE,QAAA;AACd,EAAC;AAEM,IAAMC,eAAe,GAAG,cAAa;AACrC,IAAMC,cAAc,GAAG;;;;"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _typeof(o) {
|
|
4
|
+
"@babel/helpers - typeof";
|
|
5
|
+
|
|
6
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
+
return typeof o;
|
|
8
|
+
} : function (o) {
|
|
9
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
+
}, _typeof(o);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function _toPrimitive(input, hint) {
|
|
14
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
15
|
+
var prim = input[Symbol.toPrimitive];
|
|
16
|
+
if (prim !== undefined) {
|
|
17
|
+
var res = prim.call(input, hint || "default");
|
|
18
|
+
if (_typeof(res) !== "object") return res;
|
|
19
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
20
|
+
}
|
|
21
|
+
return (hint === "string" ? String : Number)(input);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function _toPropertyKey(arg) {
|
|
25
|
+
var key = _toPrimitive(arg, "string");
|
|
26
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function _defineProperty(obj, key, value) {
|
|
30
|
+
key = _toPropertyKey(key);
|
|
31
|
+
if (key in obj) {
|
|
32
|
+
Object.defineProperty(obj, key, {
|
|
33
|
+
value: value,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
obj[key] = value;
|
|
40
|
+
}
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var SEGMENTS_BASE_URL = "/neeto_filters/segments";
|
|
45
|
+
var DATE_OPTIONS = [{
|
|
46
|
+
label: "Today",
|
|
47
|
+
value: "today"
|
|
48
|
+
}, {
|
|
49
|
+
label: "Yesterday",
|
|
50
|
+
value: "yesterday"
|
|
51
|
+
}, {
|
|
52
|
+
label: "This week",
|
|
53
|
+
value: "this-week"
|
|
54
|
+
}, {
|
|
55
|
+
label: "Last week",
|
|
56
|
+
value: "last-week"
|
|
57
|
+
}, {
|
|
58
|
+
label: "This month",
|
|
59
|
+
value: "this-month"
|
|
60
|
+
}, {
|
|
61
|
+
label: "Last month",
|
|
62
|
+
value: "last-month"
|
|
63
|
+
}, {
|
|
64
|
+
label: "This year",
|
|
65
|
+
value: "this-year"
|
|
66
|
+
}, {
|
|
67
|
+
label: "Last year",
|
|
68
|
+
value: "last-year"
|
|
69
|
+
}, {
|
|
70
|
+
label: "All time",
|
|
71
|
+
value: "all-time"
|
|
72
|
+
}, {
|
|
73
|
+
label: "After",
|
|
74
|
+
value: "after"
|
|
75
|
+
}, {
|
|
76
|
+
label: "Before",
|
|
77
|
+
value: "before"
|
|
78
|
+
}, {
|
|
79
|
+
label: "Custom date range",
|
|
80
|
+
value: "custom-date-range"
|
|
81
|
+
}];
|
|
82
|
+
var SINGLE_DATE_OPTIONS = [{
|
|
83
|
+
label: "On",
|
|
84
|
+
value: "on"
|
|
85
|
+
}, {
|
|
86
|
+
label: "After",
|
|
87
|
+
value: "after"
|
|
88
|
+
}, {
|
|
89
|
+
label: "Before",
|
|
90
|
+
value: "before"
|
|
91
|
+
}, {
|
|
92
|
+
label: "Between",
|
|
93
|
+
value: "between"
|
|
94
|
+
}];
|
|
95
|
+
var SINGLE_TIME_OPTIONS = [{
|
|
96
|
+
label: "At",
|
|
97
|
+
value: "at"
|
|
98
|
+
}, {
|
|
99
|
+
label: "After",
|
|
100
|
+
value: "after"
|
|
101
|
+
}, {
|
|
102
|
+
label: "Before",
|
|
103
|
+
value: "before"
|
|
104
|
+
}, {
|
|
105
|
+
label: "Between",
|
|
106
|
+
value: "between"
|
|
107
|
+
}];
|
|
108
|
+
var TIME_OPTIONS = [{
|
|
109
|
+
label: "This hour",
|
|
110
|
+
value: "this-hour"
|
|
111
|
+
}, {
|
|
112
|
+
label: "Last hour",
|
|
113
|
+
value: "last-hour"
|
|
114
|
+
}, {
|
|
115
|
+
label: "Custom time range",
|
|
116
|
+
value: "custom-time-range"
|
|
117
|
+
}];
|
|
118
|
+
var DATE_RULES = {
|
|
119
|
+
today: "on",
|
|
120
|
+
yesterday: "on",
|
|
121
|
+
"all-time": "before"
|
|
122
|
+
};
|
|
123
|
+
var SEARCH_TERM_KEY = "search_term";
|
|
124
|
+
var SEGMENT_ID_KEY = "segment_id";
|
|
125
|
+
|
|
126
|
+
exports.DATE_OPTIONS = DATE_OPTIONS;
|
|
127
|
+
exports.DATE_RULES = DATE_RULES;
|
|
128
|
+
exports.SEARCH_TERM_KEY = SEARCH_TERM_KEY;
|
|
129
|
+
exports.SEGMENTS_BASE_URL = SEGMENTS_BASE_URL;
|
|
130
|
+
exports.SEGMENT_ID_KEY = SEGMENT_ID_KEY;
|
|
131
|
+
exports.SINGLE_DATE_OPTIONS = SINGLE_DATE_OPTIONS;
|
|
132
|
+
exports.SINGLE_TIME_OPTIONS = SINGLE_TIME_OPTIONS;
|
|
133
|
+
exports.TIME_OPTIONS = TIME_OPTIONS;
|
|
134
|
+
exports._defineProperty = _defineProperty;
|
|
135
|
+
//# sourceMappingURL=constants-fb0f688a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-fb0f688a.js","sources":["../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../app/javascript/src/common/constants.js"],"sourcesContent":["export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export const SEGMENTS_BASE_URL = \"/neeto_filters/segments\";\n\nexport const DATE_OPTIONS = [\n { label: \"Today\", value: \"today\" },\n { label: \"Yesterday\", value: \"yesterday\" },\n { label: \"This week\", value: \"this-week\" },\n { label: \"Last week\", value: \"last-week\" },\n { label: \"This month\", value: \"this-month\" },\n { label: \"Last month\", value: \"last-month\" },\n { label: \"This year\", value: \"this-year\" },\n { label: \"Last year\", value: \"last-year\" },\n { label: \"All time\", value: \"all-time\" },\n { label: \"After\", value: \"after\" },\n { label: \"Before\", value: \"before\" },\n { label: \"Custom date range\", value: \"custom-date-range\" },\n];\n\nexport const SINGLE_DATE_OPTIONS = [\n { label: \"On\", value: \"on\" },\n { label: \"After\", value: \"after\" },\n { label: \"Before\", value: \"before\" },\n { label: \"Between\", value: \"between\" },\n];\n\nexport const SINGLE_TIME_OPTIONS = [\n { label: \"At\", value: \"at\" },\n { label: \"After\", value: \"after\" },\n { label: \"Before\", value: \"before\" },\n { label: \"Between\", value: \"between\" },\n];\n\nexport const TIME_OPTIONS = [\n { label: \"This hour\", value: \"this-hour\" },\n { label: \"Last hour\", value: \"last-hour\" },\n { label: \"Custom time range\", value: \"custom-time-range\" },\n];\n\nexport const DATE_RULES = {\n today: \"on\",\n yesterday: \"on\",\n \"all-time\": \"before\",\n};\n\nexport const SEARCH_TERM_KEY = \"search_term\";\nexport const SEGMENT_ID_KEY = \"segment_id\";\n"],"names":["toPrimitive","toPropertyKey","SEGMENTS_BASE_URL","DATE_OPTIONS","label","value","SINGLE_DATE_OPTIONS","SINGLE_TIME_OPTIONS","TIME_OPTIONS","DATE_RULES","today","yesterday","SEARCH_TERM_KEY","SEGMENT_ID_KEY"],"mappings":";;AAAe,SAAS,OAAO,CAAC,CAAC,EAAE;AACnC,EAAE,yBAAyB,CAAC;AAC5B;AACA,EAAE,OAAO,OAAO,GAAG,UAAU,IAAI,OAAO,MAAM,IAAI,QAAQ,IAAI,OAAO,MAAM,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE;AACpG,IAAI,OAAO,OAAO,CAAC,CAAC;AACpB,GAAG,GAAG,UAAU,CAAC,EAAE;AACnB,IAAI,OAAO,CAAC,IAAI,UAAU,IAAI,OAAO,MAAM,IAAI,CAAC,CAAC,WAAW,KAAK,MAAM,IAAI,CAAC,KAAK,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;AACxH,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;AAChB;;ACPe,SAAS,YAAY,CAAC,KAAK,EAAE,IA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
+
import './constants-8f6e851e.js';
|
|
3
|
+
import '@tanstack/react-query';
|
|
4
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
|
+
import 'ramda';
|
|
6
|
+
import 'axios';
|
|
7
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|