bright-components 10.2.7 → 10.2.8
Sign up to get free protection for your applications and to get access to all the features.
- package/circle.yml +1 -2
- package/deploy.sh +6 -0
- package/dist/components/DayPicker/NewDayPicker/index.js +0 -28
- package/dist/components/DayPicker/index.js +2 -20
- package/dist/components/DayPickerPanel/HeaderDayPickerPanel/index.js +1 -18
- package/dist/components/DayPickerPanel/HeaderMonthPanel/index.js +0 -14
- package/dist/components/DayPickerPanel/HeaderYearPanel/index.js +2 -15
- package/dist/components/DayPickerPanel/Shortcuts/index.js +2 -16
- package/dist/components/DayPickerPanel/index.js +2 -74
- package/dist/components/EmployeeCard/index.js +1 -14
- package/dist/components/EmployeePicker/FilterBar/index.js +1 -28
- package/dist/components/EmployeePicker/Group/index.js +1 -41
- package/dist/components/FilterRadioGroup/index.js +2 -14
- package/dist/components/Form/index.js +4 -47
- package/dist/components/Modal/index.js +1 -23
- package/dist/components/RadioBlock/index.js +10 -41
- package/dist/components/Snackbar/index.js +1 -17
- package/dist/components/Time/OverlayBase/index.js +2 -25
- package/dist/components/Time/TimePicker/TimeOverlay/index.js +3 -26
- package/dist/components/TimePicker/Time/TimeOverlay/index.js +1 -58
- package/dist/setupTests.js +0 -7
- package/package.json +5 -7
- package/src/components/DayPicker/NewDayPicker/index.js +0 -21
- package/src/components/DayPicker/index.js +1 -16
- package/src/components/DayPicker/test.js +0 -85
- package/src/components/DayPickerPanel/HeaderDayPickerPanel/index.js +2 -22
- package/src/components/DayPickerPanel/HeaderDayPickerPanel/test.js +0 -34
- package/src/components/DayPickerPanel/HeaderMonthPanel/index.js +0 -10
- package/src/components/DayPickerPanel/HeaderMonthPanel/test.js +0 -25
- package/src/components/DayPickerPanel/HeaderYearPanel/index.js +3 -12
- package/src/components/DayPickerPanel/HeaderYearPanel/test.js +0 -17
- package/src/components/DayPickerPanel/Shortcuts/index.js +3 -17
- package/src/components/DayPickerPanel/Shortcuts/test.js +0 -39
- package/src/components/DayPickerPanel/index.js +1 -69
- package/src/components/DayPickerPanel/test.js +0 -177
- package/src/components/EmployeeCard/index.js +1 -15
- package/src/components/EmployeeCard/test.js +0 -20
- package/src/components/EmployeePicker/FilterBar/index.js +2 -26
- package/src/components/EmployeePicker/FilterBar/test.js +0 -29
- package/src/components/EmployeePicker/Group/index.js +1 -42
- package/src/components/EmployeePicker/Group/test.js +0 -21
- package/src/components/FilterRadioGroup/index.js +2 -14
- package/src/components/FilterRadioGroup/test.js +0 -13
- package/src/components/Form/index.js +1 -49
- package/src/components/Form/test.js +0 -73
- package/src/components/Modal/index.js +1 -22
- package/src/components/Modal/test.js +9 -9
- package/src/components/RadioBlock/index.js +14 -33
- package/src/components/RadioBlock/test.js +35 -155
- package/src/components/ResponsiveTabs/test.js +49 -86
- package/src/components/Snackbar/index.js +1 -16
- package/src/components/Time/OverlayBase/index.js +3 -21
- package/src/components/Time/OverlayBase/test.js +0 -50
- package/src/components/Time/TimePicker/TimeOverlay/index.js +4 -30
- package/src/components/Time/TimePicker/TimeOverlay/test.js +0 -24
- package/src/components/TimePicker/DayPart/test.js +1 -1
- package/src/components/TimePicker/Time/TimeOverlay/index.js +2 -50
- package/src/components/TimePicker/Time/TimeOverlay/test.js +1 -220
- package/src/index.js +1 -1
- package/src/setupTests.js +0 -2
- package/dist/components/TimePicker/utils/PickerGA/index.js +0 -24
- package/dist/utils/trackForm/index.js +0 -48
- package/src/components/TimePicker/utils/PickerGA/index.js +0 -6
- package/src/components/TimePicker/utils/PickerGA/test.js +0 -29
- package/src/utils/trackForm/index.js +0 -36
- package/src/utils/trackForm/test.js +0 -110
package/circle.yml
CHANGED
@@ -16,7 +16,6 @@ jobs:
|
|
16
16
|
- node_modules
|
17
17
|
key: v1-dependencies-{{ checksum "package.json" }}
|
18
18
|
- run: npm run check-build
|
19
|
-
- run: npm run eslint
|
20
19
|
- run: npm run test:coverage-ci
|
21
20
|
deploy:
|
22
21
|
docker:
|
@@ -31,7 +30,7 @@ jobs:
|
|
31
30
|
paths:
|
32
31
|
- node_modules
|
33
32
|
key: v1-dependencies-{{ checksum "package.json" }}
|
34
|
-
- run: npm run styleguide:build && ./deploy.sh
|
33
|
+
- run: npm run styleguide:build && ./deploy.sh -v
|
35
34
|
- run: npm run semantic-release
|
36
35
|
|
37
36
|
workflows:
|
package/deploy.sh
CHANGED
@@ -94,6 +94,8 @@ main() {
|
|
94
94
|
return 1
|
95
95
|
fi
|
96
96
|
|
97
|
+
echo Uncommitted changes check ok
|
98
|
+
|
97
99
|
commit_title=`git log -n 1 --format="%s" HEAD`
|
98
100
|
commit_hash=` git log -n 1 --format="%H" HEAD`
|
99
101
|
|
@@ -120,6 +122,8 @@ main() {
|
|
120
122
|
return 1
|
121
123
|
fi
|
122
124
|
|
125
|
+
echo About to git ls-remote
|
126
|
+
|
123
127
|
if git ls-remote --exit-code $repo "refs/heads/$deploy_branch" ; then
|
124
128
|
# deploy_branch exists in $repo; make sure we have the latest version
|
125
129
|
|
@@ -203,6 +207,8 @@ set_user_id() {
|
|
203
207
|
}
|
204
208
|
|
205
209
|
restore_head() {
|
210
|
+
echo Restoring head
|
211
|
+
|
206
212
|
if [[ $previous_branch = "HEAD" ]]; then
|
207
213
|
#we weren't on any branch before, so just set HEAD back to the commit it was on
|
208
214
|
git update-ref --no-deref HEAD $commit_hash $deploy_branch
|
@@ -21,20 +21,12 @@ var _spacing = _interopRequireDefault(require("../../../constants/spacing"));
|
|
21
21
|
|
22
22
|
var _Calendar = _interopRequireDefault(require("../../Icons/Calendar"));
|
23
23
|
|
24
|
-
var _reactGa = require("react-ga");
|
25
|
-
|
26
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
27
25
|
|
28
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
29
27
|
|
30
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
31
29
|
|
32
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
33
|
-
|
34
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
35
|
-
|
36
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
37
|
-
|
38
30
|
const HiddenBox = (0, _styledComponents.default)(_Input.default.withComponent('div'))`
|
39
31
|
display: flex;
|
40
32
|
align-items: center;
|
@@ -92,11 +84,6 @@ const NewDisplay = _ref => {
|
|
92
84
|
disabled,
|
93
85
|
error,
|
94
86
|
toggleDayPicker,
|
95
|
-
GA: {
|
96
|
-
category,
|
97
|
-
actionId
|
98
|
-
},
|
99
|
-
recordValue,
|
100
87
|
dayPickerOpen
|
101
88
|
} = _ref;
|
102
89
|
const {
|
@@ -145,16 +132,6 @@ const NewDisplay = _ref => {
|
|
145
132
|
return range.from ? onSelectedDate(allowClear ? '' : range) : null;
|
146
133
|
}
|
147
134
|
|
148
|
-
if (category) {
|
149
|
-
const label = `${(0, _dateFns.format)(newDate.from, 'EEE dd MMM')} ${(0, _dateFns.format)(newDate.from, 'yyyy')}`;
|
150
|
-
(0, _reactGa.event)(_objectSpread({
|
151
|
-
category,
|
152
|
-
action: `${actionId} - Set via Typing`
|
153
|
-
}, recordValue ? {
|
154
|
-
label
|
155
|
-
} : {}));
|
156
|
-
}
|
157
|
-
|
158
135
|
return onSelectedDate(newDate);
|
159
136
|
},
|
160
137
|
onChange: _ref3 => {
|
@@ -196,11 +173,6 @@ NewDisplay.propTypes = {
|
|
196
173
|
disabled: _propTypes.bool.isRequired,
|
197
174
|
error: _propTypes.bool.isRequired,
|
198
175
|
toggleDayPicker: _propTypes.func.isRequired,
|
199
|
-
GA: (0, _propTypes.shape)({
|
200
|
-
category: _propTypes.string,
|
201
|
-
actionId: _propTypes.string
|
202
|
-
}).isRequired,
|
203
|
-
recordValue: _propTypes.bool.isRequired,
|
204
176
|
dayPickerOpen: _propTypes.bool.isRequired
|
205
177
|
};
|
206
178
|
var _default = NewDisplay;
|
@@ -11,8 +11,6 @@ var _reactOnclickoutside = _interopRequireDefault(require("react-onclickoutside"
|
|
11
11
|
|
12
12
|
var _dateFns = require("date-fns");
|
13
13
|
|
14
|
-
var _reactGa = require("react-ga");
|
15
|
-
|
16
14
|
var _propTypes = require("prop-types");
|
17
15
|
|
18
16
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
@@ -200,21 +198,12 @@ class DayPicker extends _react.default.Component {
|
|
200
198
|
|
201
199
|
toggleDayPicker() {
|
202
200
|
const {
|
203
|
-
disabled
|
204
|
-
GA
|
201
|
+
disabled
|
205
202
|
} = this.props;
|
206
203
|
const {
|
207
204
|
dayPickerOpen
|
208
205
|
} = this.state;
|
209
206
|
if (disabled) return;
|
210
|
-
|
211
|
-
if (GA.category && !dayPickerOpen) {
|
212
|
-
(0, _reactGa.event)({
|
213
|
-
category: GA.category,
|
214
|
-
action: `${GA.actionId} - DayPicker Input Open`
|
215
|
-
});
|
216
|
-
}
|
217
|
-
|
218
207
|
this.setState({
|
219
208
|
dayPickerOpen: !dayPickerOpen
|
220
209
|
}, () => {
|
@@ -267,7 +256,6 @@ class DayPicker extends _react.default.Component {
|
|
267
256
|
disabled,
|
268
257
|
shortcuts,
|
269
258
|
disabledDays,
|
270
|
-
GA,
|
271
259
|
recordValue,
|
272
260
|
legacyInputStyle,
|
273
261
|
closeButton,
|
@@ -276,7 +264,7 @@ class DayPicker extends _react.default.Component {
|
|
276
264
|
isDateSelect,
|
277
265
|
typeable
|
278
266
|
} = _this$props,
|
279
|
-
rest = _objectWithoutProperties(_this$props, ["allowClear", "placeholder", "dateRange", "yearRange", "yearsToDisplay", "style", "error", "disabled", "shortcuts", "disabledDays", "
|
267
|
+
rest = _objectWithoutProperties(_this$props, ["allowClear", "placeholder", "dateRange", "yearRange", "yearsToDisplay", "style", "error", "disabled", "shortcuts", "disabledDays", "recordValue", "legacyInputStyle", "closeButton", "panelAbsoluteOnDesktop", "onSelectedDate", "isDateSelect", "typeable"]);
|
280
268
|
|
281
269
|
const {
|
282
270
|
dayPickerOpen
|
@@ -315,7 +303,6 @@ class DayPicker extends _react.default.Component {
|
|
315
303
|
disabled: disabled,
|
316
304
|
error: error,
|
317
305
|
toggleDayPicker: this.toggleDayPicker,
|
318
|
-
GA: GA,
|
319
306
|
recordValue: recordValue,
|
320
307
|
dayPickerOpen: dayPickerOpen
|
321
308
|
}), dayPickerOpen && _react.default.createElement(DayRangeContainer, {
|
@@ -332,7 +319,6 @@ class DayPicker extends _react.default.Component {
|
|
332
319
|
range: range,
|
333
320
|
onApply: this.applyDate,
|
334
321
|
recordValue: recordValue,
|
335
|
-
GA: GA,
|
336
322
|
onClear: allowClear ? this.clearValue : undefined,
|
337
323
|
shortcuts: shortcuts,
|
338
324
|
disabledDays: disabledDays,
|
@@ -359,10 +345,6 @@ DayPicker.propTypes = {
|
|
359
345
|
// eslint-disable-line react/forbid-prop-types
|
360
346
|
open: _propTypes.bool,
|
361
347
|
recordValue: _propTypes.bool,
|
362
|
-
GA: (0, _propTypes.shape)({
|
363
|
-
category: _propTypes.string,
|
364
|
-
actionId: _propTypes.string
|
365
|
-
}).isRequired,
|
366
348
|
range: (0, _propTypes.shape)({
|
367
349
|
from: (0, _propTypes.instanceOf)(Date),
|
368
350
|
to: (0, _propTypes.instanceOf)(Date)
|
@@ -9,8 +9,6 @@ var _reactDayPicker = _interopRequireWildcard(require("react-day-picker"));
|
|
9
9
|
|
10
10
|
var _dateFns = require("date-fns");
|
11
11
|
|
12
|
-
var _reactGa = require("react-ga");
|
13
|
-
|
14
12
|
var _propTypes = require("prop-types");
|
15
13
|
|
16
14
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
@@ -220,7 +218,6 @@ class HeaderDayPickerPanel extends _react.default.Component {
|
|
220
218
|
onMonthClick,
|
221
219
|
onYearClick,
|
222
220
|
shortcuts,
|
223
|
-
GA,
|
224
221
|
isDateSelect,
|
225
222
|
onMonthChange,
|
226
223
|
onYearChange
|
@@ -280,18 +277,10 @@ class HeaderDayPickerPanel extends _react.default.Component {
|
|
280
277
|
onNext: () => {
|
281
278
|
onNextClick();
|
282
279
|
this.setMonthYear(nextMonth);
|
283
|
-
(0, _reactGa.event)({
|
284
|
-
category: GA.category,
|
285
|
-
action: `${GA.actionId} - Next Month`
|
286
|
-
});
|
287
280
|
},
|
288
281
|
onPrevious: () => {
|
289
282
|
onPreviousClick();
|
290
283
|
this.setMonthYear(previousMonth);
|
291
|
-
(0, _reactGa.event)({
|
292
|
-
category: GA.category,
|
293
|
-
action: `${GA.actionId} - Previous Month`
|
294
|
-
});
|
295
284
|
},
|
296
285
|
showNext: showNext,
|
297
286
|
showPrevious: showPrevious,
|
@@ -353,10 +342,8 @@ class HeaderDayPickerPanel extends _react.default.Component {
|
|
353
342
|
}, _react.default.createElement(FooterShortcuts, null, shortcuts && _react.default.createElement(_Shortcuts.default, {
|
354
343
|
set: shortcuts,
|
355
344
|
dateRange: dateRange,
|
356
|
-
shortcutClicked: this.setDateFromShortcut
|
357
|
-
GA: GA
|
345
|
+
shortcutClicked: this.setDateFromShortcut
|
358
346
|
})), (dateRange || onClear) && _react.default.createElement(FooterActions, null, onClear && _react.default.createElement(ClearButton, {
|
359
|
-
gaAction: `${GA.actionId} Day picker clear`,
|
360
347
|
onClick: onClear
|
361
348
|
}, "Clear"), dateRange && onApply && _react.default.createElement(ApplyButton, {
|
362
349
|
disabled: !from,
|
@@ -390,10 +377,6 @@ HeaderDayPickerPanel.propTypes = {
|
|
390
377
|
disabledDays: _propTypes.array,
|
391
378
|
// eslint-disable-line react/forbid-prop-types
|
392
379
|
shortcuts: (0, _propTypes.oneOf)(['today', 'current', 'last']),
|
393
|
-
GA: (0, _propTypes.shape)({
|
394
|
-
category: _propTypes.string,
|
395
|
-
actionId: _propTypes.string
|
396
|
-
}).isRequired,
|
397
380
|
isDateSelect: _propTypes.bool,
|
398
381
|
onMonthChange: _propTypes.func,
|
399
382
|
onYearChange: _propTypes.func
|
@@ -9,8 +9,6 @@ var _propTypes = require("prop-types");
|
|
9
9
|
|
10
10
|
var _dateFns = require("date-fns");
|
11
11
|
|
12
|
-
var _reactGa = require("react-ga");
|
13
|
-
|
14
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
15
13
|
|
16
14
|
var _spacing = _interopRequireDefault(require("../../../constants/spacing"));
|
@@ -39,10 +37,6 @@ const HeaderMonthPanel = props => {
|
|
39
37
|
setYear,
|
40
38
|
switchBackToCalendarView,
|
41
39
|
onCancelClick,
|
42
|
-
GA: {
|
43
|
-
category,
|
44
|
-
actionId
|
45
|
-
},
|
46
40
|
isViewingCurrentYear,
|
47
41
|
isMonthOnly
|
48
42
|
} = props;
|
@@ -63,10 +57,6 @@ const HeaderMonthPanel = props => {
|
|
63
57
|
const selectedIndex = MONTHS.indexOf(selectedMonth);
|
64
58
|
setMonth(selectedIndex);
|
65
59
|
switchBackToCalendarView();
|
66
|
-
(0, _reactGa.event)({
|
67
|
-
category,
|
68
|
-
action: `${actionId} - Month ${selectedIndex + 1}`
|
69
|
-
});
|
70
60
|
},
|
71
61
|
selectedItem: defaultSelectedItem,
|
72
62
|
hideSelected: !isViewingCurrentYear,
|
@@ -89,10 +79,6 @@ HeaderMonthPanel.propTypes = {
|
|
89
79
|
setYear: _propTypes.func.isRequired,
|
90
80
|
switchBackToCalendarView: _propTypes.func.isRequired,
|
91
81
|
onCancelClick: _propTypes.func,
|
92
|
-
GA: (0, _propTypes.shape)({
|
93
|
-
category: _propTypes.string,
|
94
|
-
actionId: _propTypes.string
|
95
|
-
}).isRequired,
|
96
82
|
isViewingCurrentYear: _propTypes.bool,
|
97
83
|
isMonthOnly: _propTypes.bool
|
98
84
|
};
|
@@ -7,8 +7,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
|
8
8
|
var _propTypes = require("prop-types");
|
9
9
|
|
10
|
-
var _reactGa = require("react-ga");
|
11
|
-
|
12
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
13
11
|
|
14
12
|
var _spacing = _interopRequireDefault(require("../../../constants/spacing"));
|
@@ -37,11 +35,7 @@ const HeaderYearPanel = _ref => {
|
|
37
35
|
setYear,
|
38
36
|
switchBackToCalendarView,
|
39
37
|
year,
|
40
|
-
onCancelClick
|
41
|
-
GA: {
|
42
|
-
category,
|
43
|
-
actionId
|
44
|
-
}
|
38
|
+
onCancelClick
|
45
39
|
} = _ref;
|
46
40
|
const currentYearItems = yearRanges[yearRangeIndex];
|
47
41
|
const showNext = yearRangeIndex !== yearRanges.length - 1;
|
@@ -57,10 +51,6 @@ const HeaderYearPanel = _ref => {
|
|
57
51
|
onItemSelected: yearSelected => {
|
58
52
|
setYear(yearSelected);
|
59
53
|
switchBackToCalendarView();
|
60
|
-
(0, _reactGa.event)({
|
61
|
-
category,
|
62
|
-
action: `${actionId} - Year ${yearSelected}`
|
63
|
-
});
|
64
54
|
},
|
65
55
|
items: currentYearItems
|
66
56
|
}), _react.default.createElement(Footer, null, _react.default.createElement(_Cancel.default, {
|
@@ -77,10 +67,7 @@ HeaderYearPanel.propTypes = {
|
|
77
67
|
onCancelClick: _propTypes.func,
|
78
68
|
yearRanges: (0, _propTypes.arrayOf)((0, _propTypes.arrayOf)(_propTypes.number)).isRequired,
|
79
69
|
yearRangeIndex: _propTypes.number.isRequired,
|
80
|
-
setYearRangeIndex: _propTypes.func.isRequired
|
81
|
-
GA: (0, _propTypes.shape)({
|
82
|
-
category: _propTypes.string
|
83
|
-
}).isRequired
|
70
|
+
setYearRangeIndex: _propTypes.func.isRequired
|
84
71
|
};
|
85
72
|
HeaderYearPanel.defaultProps = {
|
86
73
|
onCancelClick: null
|
@@ -9,8 +9,6 @@ var _propTypes = require("prop-types");
|
|
9
9
|
|
10
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
11
11
|
|
12
|
-
var _reactGa = require("react-ga");
|
13
|
-
|
14
12
|
var _dateFns = require("date-fns");
|
15
13
|
|
16
14
|
var _LinkButton = _interopRequireDefault(require("../../LinkButton"));
|
@@ -83,11 +81,7 @@ const Shortcuts = _ref => {
|
|
83
81
|
let {
|
84
82
|
set,
|
85
83
|
dateRange,
|
86
|
-
shortcutClicked
|
87
|
-
GA: {
|
88
|
-
category,
|
89
|
-
actionId
|
90
|
-
}
|
84
|
+
shortcutClicked
|
91
85
|
} = _ref;
|
92
86
|
return _react.default.createElement(_react.default.Fragment, null, shortcuts(set, dateRange).map(_ref2 => {
|
93
87
|
let {
|
@@ -97,10 +91,6 @@ const Shortcuts = _ref => {
|
|
97
91
|
return _react.default.createElement(Shortcut, {
|
98
92
|
key: name,
|
99
93
|
onClick: () => {
|
100
|
-
(0, _reactGa.event)({
|
101
|
-
category,
|
102
|
-
action: `${actionId} - ${name} shortcut`
|
103
|
-
});
|
104
94
|
shortcutClicked(range);
|
105
95
|
}
|
106
96
|
}, name);
|
@@ -111,11 +101,7 @@ Shortcuts.displayName = 'Shortcuts';
|
|
111
101
|
Shortcuts.propTypes = {
|
112
102
|
set: (0, _propTypes.oneOf)(['today', 'current', 'last', 'next']),
|
113
103
|
dateRange: _propTypes.bool,
|
114
|
-
shortcutClicked: _propTypes.func.isRequired
|
115
|
-
GA: (0, _propTypes.shape)({
|
116
|
-
category: _propTypes.string,
|
117
|
-
action: _propTypes.string
|
118
|
-
}).isRequired
|
104
|
+
shortcutClicked: _propTypes.func.isRequired
|
119
105
|
};
|
120
106
|
Shortcuts.defaultProps = {
|
121
107
|
set: 'today',
|
@@ -7,8 +7,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
|
8
8
|
var _propTypes = require("prop-types");
|
9
9
|
|
10
|
-
var _reactGa = require("react-ga");
|
11
|
-
|
12
10
|
var _reactAutobind = _interopRequireDefault(require("react-autobind"));
|
13
11
|
|
14
12
|
var _dateFns = require("date-fns");
|
@@ -45,13 +43,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
45
43
|
|
46
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
47
45
|
|
48
|
-
|
49
|
-
|
50
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
51
|
-
|
52
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
53
|
-
|
54
|
-
const friendlyShort = 'EEE dd MMM';
|
46
|
+
// eslint-disable-line max-lines
|
55
47
|
const friendlyShortWithYear = 'EEE dd MMM yyyy';
|
56
48
|
const DayPickerWrapper = _styledComponents.default.div`
|
57
49
|
display: relative;
|
@@ -139,7 +131,6 @@ class DayPickerPanel extends _react.default.Component {
|
|
139
131
|
return this.setState({
|
140
132
|
range: newRange
|
141
133
|
}, () => {
|
142
|
-
this.applyDatesGaEvent('selected');
|
143
134
|
onApply(newRange);
|
144
135
|
});
|
145
136
|
}
|
@@ -192,34 +183,6 @@ class DayPickerPanel extends _react.default.Component {
|
|
192
183
|
});
|
193
184
|
}
|
194
185
|
|
195
|
-
applyDatesGaEvent(selectedDay) {
|
196
|
-
const {
|
197
|
-
GA: {
|
198
|
-
category,
|
199
|
-
actionId
|
200
|
-
},
|
201
|
-
dateRange,
|
202
|
-
recordValue
|
203
|
-
} = this.props;
|
204
|
-
const {
|
205
|
-
range: {
|
206
|
-
from,
|
207
|
-
to
|
208
|
-
}
|
209
|
-
} = this.state;
|
210
|
-
const actionEvent = selectedDay ? 'Set via Date Picker' : 'Apply';
|
211
|
-
|
212
|
-
if (category) {
|
213
|
-
const label = dateRange ? `${(0, _dateFns.format)(from, friendlyShort)} - ${(0, _dateFns.format)(to || from, friendlyShort)} ${(0, _dateFns.format)(to || from, 'yyyy')}` : `${(0, _dateFns.format)(from, friendlyShort)} ${(0, _dateFns.format)(from, 'yyyy')}`;
|
214
|
-
(0, _reactGa.event)(_objectSpread({
|
215
|
-
category,
|
216
|
-
action: `${actionId} - ${actionEvent}`
|
217
|
-
}, recordValue ? {
|
218
|
-
label
|
219
|
-
} : {}));
|
220
|
-
}
|
221
|
-
}
|
222
|
-
|
223
186
|
render() {
|
224
187
|
const {
|
225
188
|
onCancel,
|
@@ -231,7 +194,6 @@ class DayPickerPanel extends _react.default.Component {
|
|
231
194
|
disabledDays,
|
232
195
|
shortcuts,
|
233
196
|
close,
|
234
|
-
GA,
|
235
197
|
isDateSelect
|
236
198
|
} = this.props;
|
237
199
|
const {
|
@@ -272,15 +234,10 @@ class DayPickerPanel extends _react.default.Component {
|
|
272
234
|
this.setState({
|
273
235
|
view: CALENDAR
|
274
236
|
});
|
275
|
-
(0, _reactGa.event)({
|
276
|
-
category: GA.category,
|
277
|
-
action: `${GA.actionId} - Cancel Month`
|
278
|
-
});
|
279
237
|
},
|
280
238
|
setMonth: this.setMonth,
|
281
239
|
switchBackToCalendarView: this.switchBackToCalendarView,
|
282
240
|
setYear: this.setYear,
|
283
|
-
GA: GA,
|
284
241
|
isViewingCurrentYear: startDate && startDate.getFullYear() === year,
|
285
242
|
isMonthOnly: this.isMonthOnly()
|
286
243
|
}), view === YEAR && _react.default.createElement(_HeaderYearPanel.default, {
|
@@ -294,12 +251,7 @@ class DayPickerPanel extends _react.default.Component {
|
|
294
251
|
this.setState({
|
295
252
|
view: CALENDAR
|
296
253
|
});
|
297
|
-
|
298
|
-
category: GA.category,
|
299
|
-
action: `${GA.actionId} - Cancel Year`
|
300
|
-
});
|
301
|
-
},
|
302
|
-
GA: GA
|
254
|
+
}
|
303
255
|
}), view === CALENDAR && _react.default.createElement(_HeaderDayPickerPanel.default, {
|
304
256
|
month: month,
|
305
257
|
year: year,
|
@@ -308,39 +260,22 @@ class DayPickerPanel extends _react.default.Component {
|
|
308
260
|
this.setState({
|
309
261
|
view: MONTH
|
310
262
|
});
|
311
|
-
(0, _reactGa.event)({
|
312
|
-
category: GA.category,
|
313
|
-
action: `${GA.actionId} - Month Picker`
|
314
|
-
});
|
315
263
|
},
|
316
264
|
onYearClick: () => {
|
317
265
|
this.setState({
|
318
266
|
view: YEAR
|
319
267
|
});
|
320
|
-
(0, _reactGa.event)({
|
321
|
-
category: GA.category,
|
322
|
-
action: `${GA.actionId} - Year Picker`
|
323
|
-
});
|
324
268
|
},
|
325
269
|
onMonthChange: e => {
|
326
270
|
this.setMonth(+e.target.value);
|
327
|
-
(0, _reactGa.event)({
|
328
|
-
category: GA.category,
|
329
|
-
action: `${GA.actionId} - Month Changed`
|
330
|
-
});
|
331
271
|
},
|
332
272
|
onYearChange: e => {
|
333
273
|
this.setYear(+e.target.value);
|
334
|
-
(0, _reactGa.event)({
|
335
|
-
category: GA.category,
|
336
|
-
action: `${GA.actionId} - Year Changed`
|
337
|
-
});
|
338
274
|
},
|
339
275
|
setMonth: this.setMonth,
|
340
276
|
setYear: this.setYear,
|
341
277
|
dateRange: dateRange,
|
342
278
|
onApply: () => {
|
343
|
-
this.applyDatesGaEvent();
|
344
279
|
onApply(range);
|
345
280
|
},
|
346
281
|
onCancel: onCancel,
|
@@ -350,10 +285,8 @@ class DayPickerPanel extends _react.default.Component {
|
|
350
285
|
range: range,
|
351
286
|
shortcuts: shortcuts,
|
352
287
|
onSelectedDay: this.onSelectedDay,
|
353
|
-
GA: GA,
|
354
288
|
isDateSelect: isDateSelect
|
355
289
|
}), close && _react.default.createElement(CloseButton, {
|
356
|
-
gaAction: `${GA.actionId} Day picker close`,
|
357
290
|
onClick: close
|
358
291
|
}, _react.default.createElement(_Cross.default, {
|
359
292
|
size: 16
|
@@ -386,11 +319,6 @@ DayPickerPanel.propTypes = {
|
|
386
319
|
disabledDays: _propTypes.array,
|
387
320
|
// eslint-disable-line react/forbid-prop-types
|
388
321
|
shortcuts: (0, _propTypes.oneOf)(['today', 'current', 'last']),
|
389
|
-
GA: (0, _propTypes.shape)({
|
390
|
-
category: _propTypes.string,
|
391
|
-
actionId: _propTypes.string
|
392
|
-
}).isRequired,
|
393
|
-
recordValue: _propTypes.bool.isRequired,
|
394
322
|
onMonthSelected: _propTypes.func,
|
395
323
|
isDateSelect: _propTypes.bool
|
396
324
|
};
|
@@ -5,8 +5,6 @@ exports.default = void 0;
|
|
5
5
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
7
7
|
|
8
|
-
var _reactGa = _interopRequireDefault(require("react-ga"));
|
9
|
-
|
10
8
|
var _propTypes = require("prop-types");
|
11
9
|
|
12
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
@@ -38,22 +36,15 @@ const EmployeeCard = _ref => {
|
|
38
36
|
name,
|
39
37
|
imageHref,
|
40
38
|
link,
|
41
|
-
category,
|
42
|
-
action,
|
43
39
|
onClick
|
44
40
|
} = _ref,
|
45
|
-
rest = _objectWithoutProperties(_ref, ["name", "imageHref", "link", "
|
41
|
+
rest = _objectWithoutProperties(_ref, ["name", "imageHref", "link", "onClick"]);
|
46
42
|
|
47
43
|
return _react.default.createElement(Container, rest, _react.default.createElement(_Avatar.default, {
|
48
44
|
employeeName: name,
|
49
45
|
employeeImageHref: imageHref
|
50
46
|
}), _react.default.createElement(LinkContainer, null, _react.default.createElement(_A.default, {
|
51
47
|
onClick: () => {
|
52
|
-
_reactGa.default.event({
|
53
|
-
category,
|
54
|
-
action
|
55
|
-
});
|
56
|
-
|
57
48
|
if (onClick) {
|
58
49
|
onClick();
|
59
50
|
}
|
@@ -66,14 +57,10 @@ EmployeeCard.propTypes = {
|
|
66
57
|
name: _propTypes.string.isRequired,
|
67
58
|
imageHref: _propTypes.string,
|
68
59
|
link: _propTypes.string.isRequired,
|
69
|
-
category: _propTypes.string,
|
70
|
-
action: _propTypes.string,
|
71
60
|
onClick: _propTypes.func
|
72
61
|
};
|
73
62
|
EmployeeCard.defaultProps = {
|
74
63
|
imageHref: undefined,
|
75
|
-
category: 'Employee',
|
76
|
-
action: 'Employee card name is clicked',
|
77
64
|
onClick: undefined
|
78
65
|
};
|
79
66
|
var _default = EmployeeCard;
|
@@ -11,8 +11,6 @@ var _propTypes = require("prop-types");
|
|
11
11
|
|
12
12
|
var _breakpoints = _interopRequireDefault(require("../../../constants/breakpoints"));
|
13
13
|
|
14
|
-
var _reactGa = require("react-ga");
|
15
|
-
|
16
14
|
var _Input = _interopRequireDefault(require("../../Input"));
|
17
15
|
|
18
16
|
var _LinkButton = _interopRequireDefault(require("../../LinkButton"));
|
@@ -75,7 +73,6 @@ exports.focusObj = focusObj;
|
|
75
73
|
|
76
74
|
const FilterBar = _ref => {
|
77
75
|
let {
|
78
|
-
GA,
|
79
76
|
value,
|
80
77
|
update,
|
81
78
|
type,
|
@@ -93,60 +90,36 @@ const FilterBar = _ref => {
|
|
93
90
|
onChange: e => {
|
94
91
|
updateType(e.target.value);
|
95
92
|
focusObj(textInput);
|
96
|
-
(0, _reactGa.event)({
|
97
|
-
action: `Search by ${e.target.value}`,
|
98
|
-
category: GA.category
|
99
|
-
});
|
100
93
|
}
|
101
94
|
}, _react.default.createElement(_Option.default, {
|
102
95
|
value: "name"
|
103
96
|
}, "Search by name"), _react.default.createElement(_Option.default, {
|
104
97
|
value: "group"
|
105
98
|
}, "Search by group")), _react.default.createElement(StyledInput, {
|
106
|
-
onBlur: () => {
|
107
|
-
(0, _reactGa.event)({
|
108
|
-
action: 'Enter Name',
|
109
|
-
category: GA.category
|
110
|
-
});
|
111
|
-
},
|
99
|
+
onBlur: () => {},
|
112
100
|
value: value,
|
113
101
|
onChange: e => update(e.target.value),
|
114
102
|
placeholder: "Enter name",
|
115
103
|
ref: textInput
|
116
104
|
}), _react.default.createElement(FloatButtonGroup, null, value && _react.default.createElement(ClearButton, {
|
117
105
|
onClick: () => {
|
118
|
-
(0, _reactGa.event)({
|
119
|
-
action: 'Clear Filter',
|
120
|
-
category: GA.category
|
121
|
-
});
|
122
106
|
update('');
|
123
107
|
}
|
124
108
|
}, "Clear filter"), !value && !hideSelectAll && _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_LinkButton.default, {
|
125
109
|
disabled: disableSelect,
|
126
110
|
onClick: () => {
|
127
111
|
selectAll();
|
128
|
-
(0, _reactGa.event)({
|
129
|
-
action: 'Select All',
|
130
|
-
category: GA.category
|
131
|
-
});
|
132
112
|
}
|
133
113
|
}, "Select all"), _react.default.createElement(_LinkButton.default, {
|
134
114
|
disabled: disableDeselect,
|
135
115
|
onClick: () => {
|
136
116
|
deselectAll();
|
137
|
-
(0, _reactGa.event)({
|
138
|
-
action: 'Deselect All',
|
139
|
-
category: GA.category
|
140
|
-
});
|
141
117
|
}
|
142
118
|
}, "Deselect all"))));
|
143
119
|
};
|
144
120
|
|
145
121
|
FilterBar.displayName = 'FilterBar';
|
146
122
|
FilterBar.propTypes = {
|
147
|
-
GA: (0, _propTypes.shape)({
|
148
|
-
category: _propTypes.string
|
149
|
-
}).isRequired,
|
150
123
|
value: _propTypes.string,
|
151
124
|
update: _propTypes.func.isRequired,
|
152
125
|
type: _propTypes.string.isRequired,
|