@kineticdata/bundle-queue 5.1.1 → 6.0.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/README.md +0 -2
- package/assets/styles/_submissions.scss +0 -4
- package/lib/App.js +62 -60
- package/lib/components/FormPreview.js +39 -27
- package/lib/components/filter_menu/FilterMenuAbstract.js +87 -107
- package/lib/components/filter_menu/FilterMenuModal.js +115 -114
- package/lib/components/filter_menu/FilterMenuToolbar.js +114 -108
- package/lib/components/new_item_menu/NewItemMenu.js +65 -63
- package/lib/components/new_item_menu/NewItemMenuContainer.js +40 -43
- package/lib/components/queue_item/AssignmentBadge.js +22 -14
- package/lib/components/queue_item/QueueItem.js +70 -132
- package/lib/components/queue_item/QueueItemDetails.js +122 -159
- package/lib/components/queue_item/QueueItemDetails.test.js +14 -11
- package/lib/components/queue_item/ViewOriginalRequest.js +28 -20
- package/lib/components/queue_list/BulkAssignModal.js +30 -27
- package/lib/components/queue_list/BulkStatusModal.js +64 -59
- package/lib/components/queue_list/BulkWorkModal.js +26 -21
- package/lib/components/queue_list/QueueList.js +56 -54
- package/lib/components/queue_list/QueueListContainer.js +25 -21
- package/lib/components/queue_list/QueueListItem.js +78 -85
- package/lib/components/queue_list/QueueListPagination.js +54 -47
- package/lib/components/queue_list/QueueListSelection.js +92 -82
- package/lib/components/queue_list/QueueListSidebar.js +64 -59
- package/lib/components/settings/QueueSettings.js +44 -37
- package/lib/components/settings/Settings.js +56 -50
- package/lib/components/settings/Sidebar.js +32 -22
- package/lib/components/settings/forms/Export.js +45 -48
- package/lib/components/settings/forms/ExportModal.js +25 -20
- package/lib/components/settings/forms/FormActivity.js +60 -52
- package/lib/components/settings/forms/FormList.js +109 -110
- package/lib/components/settings/forms/FormSettings.js +69 -63
- package/lib/components/settings/forms/FormSubmissions.js +65 -60
- package/lib/components/shared/AssignmentItem.js +24 -21
- package/lib/components/shared/AssignmentSelector.js +39 -40
- package/lib/components/shared/PageTitle.js +24 -15
- package/lib/components/shared/StatusContent.js +29 -24
- package/lib/components/shared/WallyButton.js +28 -19
- package/lib/components/work_menu/WorkMenu.js +39 -30
- package/lib/constants.js +1 -0
- package/lib/index.js +53 -49
- package/lib/models.js +13 -5
- package/lib/records.js +39 -26
- package/lib/redux/modules/app.js +22 -17
- package/lib/redux/modules/filterMenu.js +23 -26
- package/lib/redux/modules/forms.js +28 -21
- package/lib/redux/modules/queue.js +52 -64
- package/lib/redux/modules/queue.test.js +46 -44
- package/lib/redux/modules/queueApp.js +70 -63
- package/lib/redux/modules/queueApp.test.js +26 -24
- package/lib/redux/modules/settingsForms.js +66 -74
- package/lib/redux/modules/settingsQueue.js +21 -27
- package/lib/redux/modules/workMenu.js +21 -15
- package/lib/redux/reducers.js +25 -18
- package/lib/redux/sagas/app.js +15 -13
- package/lib/redux/sagas/forms.js +22 -25
- package/lib/redux/sagas/queue.js +117 -210
- package/lib/redux/sagas/queue.test.js +85 -83
- package/lib/redux/sagas/queueApp.js +48 -57
- package/lib/redux/sagas/settingsForms.js +264 -358
- package/lib/redux/sagas/settingsQueue.js +186 -229
- package/lib/redux/sagas.js +18 -14
- package/lib/redux/store.js +36 -27
- package/lib/utils.js +9 -2
- package/package.json +6 -17
- package/lib/components/Sidebar.js +0 -100
- package/lib/components/filter_menu/AssignmentSection.js +0 -52
- package/lib/components/filter_menu/CreatedByMe.js +0 -31
- package/lib/components/filter_menu/DateRangeSection.js +0 -54
- package/lib/components/filter_menu/FilterMenu.js +0 -83
- package/lib/components/filter_menu/FilterMenuContainer.js +0 -112
- package/lib/components/filter_menu/GroupedBySection.js +0 -34
- package/lib/components/filter_menu/MainSection.js +0 -187
- package/lib/components/filter_menu/SortedBySection.js +0 -50
- package/lib/components/filter_menu/StatusSection.js +0 -34
- package/lib/components/filter_menu/TeamsSection.js +0 -34
- package/lib/components/queue_list/FilterMenuMobile.js +0 -120
- package/lib/components/queue_list/FilterMenuToolbar.js +0 -306
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import moment from 'moment';
|
|
3
|
-
import { ModalBody } from 'reactstrap';
|
|
4
|
-
import { SORT_OPTIONS } from './SortedBySection';
|
|
5
|
-
import { CreatedByMeContainer } from './CreatedByMe';
|
|
6
|
-
import { I18n } from '@kineticdata/react';
|
|
7
|
-
import { ASSIGNMENT_LABELS } from './FilterMenuAbstract';
|
|
8
|
-
|
|
9
|
-
var ListSummary = function ListSummary(_ref) {
|
|
10
|
-
var type = _ref.type,
|
|
11
|
-
list = _ref.list;
|
|
12
|
-
return list.size > 0 && (list.size === 1 ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(I18n, null, list.get(0))) : /*#__PURE__*/React.createElement("span", null, list.size, " ", /*#__PURE__*/React.createElement(I18n, null, type)));
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
var AssignmentSummary = function AssignmentSummary(_ref2) {
|
|
16
|
-
var errors = _ref2.errors,
|
|
17
|
-
assignments = _ref2.assignments;
|
|
18
|
-
return errors.get('Assignment') ? /*#__PURE__*/React.createElement("span", {
|
|
19
|
-
className: "validation-error text-danger"
|
|
20
|
-
}, errors.get('Assignment')) : assignments && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(I18n, null, ASSIGNMENT_LABELS.get(assignments)));
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
var formatTimeline = function formatTimeline(timeline) {
|
|
24
|
-
var match = timeline.match(/(.)(.*)At/);
|
|
25
|
-
return "".concat(match[1].toUpperCase()).concat(match[2]);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
var formatPreset = function formatPreset(preset) {
|
|
29
|
-
var match = preset.match(/(\d+)days/);
|
|
30
|
-
return "".concat(match[1], " days");
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
var DateRangeSummary = function DateRangeSummary(_ref3) {
|
|
34
|
-
var errors = _ref3.errors,
|
|
35
|
-
filter = _ref3.filter;
|
|
36
|
-
return errors.get('Date Range') ? /*#__PURE__*/React.createElement("span", {
|
|
37
|
-
className: "validation-error text-danger"
|
|
38
|
-
}, /*#__PURE__*/React.createElement(I18n, null, errors.get('Date Range'))) : filter.dateRange.preset !== '' ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(I18n, null, formatTimeline(filter.dateRange.timeline), " in last", ' ', formatPreset(filter.dateRange.preset))) : filter.dateRange.custom ? /*#__PURE__*/React.createElement("span", {
|
|
39
|
-
style: {
|
|
40
|
-
textAlign: 'right'
|
|
41
|
-
}
|
|
42
|
-
}, /*#__PURE__*/React.createElement(I18n, null, formatTimeline(filter.dateRange.timeline), " between"), /*#__PURE__*/React.createElement("br", null), moment(filter.dateRange.start).format('l'), " ", /*#__PURE__*/React.createElement(I18n, null, "and"), ' ', moment(filter.dateRange.end).format('l')) : null;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
var FilterNameSummary = function FilterNameSummary(_ref4) {
|
|
46
|
-
var errors = _ref4.errors;
|
|
47
|
-
return errors.get('Filter Name') ? /*#__PURE__*/React.createElement("span", {
|
|
48
|
-
className: "validation-error text-danger"
|
|
49
|
-
}, /*#__PURE__*/React.createElement(I18n, null, errors.get('Filter Name'))) : null;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export var MainSection = function MainSection(_ref5) {
|
|
53
|
-
var filter = _ref5.filter,
|
|
54
|
-
hasTeams = _ref5.hasTeams,
|
|
55
|
-
showSection = _ref5.showSection,
|
|
56
|
-
filterName = _ref5.filterName,
|
|
57
|
-
handleChangeFilterName = _ref5.handleChangeFilterName,
|
|
58
|
-
handleSaveFilter = _ref5.handleSaveFilter,
|
|
59
|
-
handleRemoveFilter = _ref5.handleRemoveFilter,
|
|
60
|
-
errors = _ref5.errors;
|
|
61
|
-
return /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement("ul", {
|
|
62
|
-
className: "list-group button-list"
|
|
63
|
-
}, hasTeams && /*#__PURE__*/React.createElement("li", {
|
|
64
|
-
className: "list-group-item"
|
|
65
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
66
|
-
type: "button",
|
|
67
|
-
className: "btn btn-link",
|
|
68
|
-
onClick: function onClick() {
|
|
69
|
-
return showSection('teams');
|
|
70
|
-
}
|
|
71
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
72
|
-
className: "button-title"
|
|
73
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Teams")), /*#__PURE__*/React.createElement(ListSummary, {
|
|
74
|
-
type: "Teams",
|
|
75
|
-
list: filter.teams
|
|
76
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
77
|
-
className: "icon"
|
|
78
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
79
|
-
className: "fa fa-angle-right"
|
|
80
|
-
})))), /*#__PURE__*/React.createElement("li", {
|
|
81
|
-
className: "list-group-item"
|
|
82
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
83
|
-
type: "button",
|
|
84
|
-
className: "btn btn-link",
|
|
85
|
-
onClick: function onClick() {
|
|
86
|
-
return showSection('assignment');
|
|
87
|
-
}
|
|
88
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
89
|
-
className: "button-title"
|
|
90
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Assignment")), /*#__PURE__*/React.createElement(AssignmentSummary, {
|
|
91
|
-
errors: errors,
|
|
92
|
-
assignments: filter.assignments
|
|
93
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
94
|
-
className: "icon"
|
|
95
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
96
|
-
className: "fa fa-angle-right"
|
|
97
|
-
})))), /*#__PURE__*/React.createElement("li", {
|
|
98
|
-
className: "list-group-item"
|
|
99
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
100
|
-
type: "button",
|
|
101
|
-
className: "btn btn-link",
|
|
102
|
-
onClick: function onClick() {
|
|
103
|
-
return showSection('status');
|
|
104
|
-
}
|
|
105
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
106
|
-
className: "button-title"
|
|
107
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Status")), /*#__PURE__*/React.createElement(ListSummary, {
|
|
108
|
-
type: "Statuses",
|
|
109
|
-
list: filter.status
|
|
110
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
111
|
-
className: "icon"
|
|
112
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
113
|
-
className: "fa fa-angle-right"
|
|
114
|
-
})))), /*#__PURE__*/React.createElement("li", {
|
|
115
|
-
className: "list-group-item"
|
|
116
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
117
|
-
type: "button",
|
|
118
|
-
className: "btn btn-link",
|
|
119
|
-
onClick: function onClick() {
|
|
120
|
-
return showSection('date');
|
|
121
|
-
}
|
|
122
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
123
|
-
className: "button-title"
|
|
124
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Date Range")), /*#__PURE__*/React.createElement(DateRangeSummary, {
|
|
125
|
-
errors: errors,
|
|
126
|
-
filter: filter
|
|
127
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
128
|
-
className: "icon"
|
|
129
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
130
|
-
className: "fa fa-angle-right"
|
|
131
|
-
})))), /*#__PURE__*/React.createElement("li", {
|
|
132
|
-
className: "list-group-item"
|
|
133
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
134
|
-
type: "button",
|
|
135
|
-
className: "btn btn-link",
|
|
136
|
-
onClick: function onClick() {
|
|
137
|
-
return showSection('sort');
|
|
138
|
-
}
|
|
139
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
140
|
-
className: "button-title"
|
|
141
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Sorted By")), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(I18n, null, SORT_OPTIONS.get(filter.sortBy).label)), /*#__PURE__*/React.createElement("span", {
|
|
142
|
-
className: "icon"
|
|
143
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
144
|
-
className: "fa fa-angle-right"
|
|
145
|
-
})))), /*#__PURE__*/React.createElement("li", {
|
|
146
|
-
className: "list-group-item"
|
|
147
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
148
|
-
type: "button",
|
|
149
|
-
className: "btn btn-link",
|
|
150
|
-
onClick: function onClick() {
|
|
151
|
-
return showSection('group');
|
|
152
|
-
}
|
|
153
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
154
|
-
className: "button-title"
|
|
155
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Grouped By")), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(I18n, null, filter.groupBy)), /*#__PURE__*/React.createElement("span", {
|
|
156
|
-
className: "icon"
|
|
157
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
158
|
-
className: "fa fa-angle-right"
|
|
159
|
-
})))), /*#__PURE__*/React.createElement("li", {
|
|
160
|
-
className: "list-group-item"
|
|
161
|
-
}, /*#__PURE__*/React.createElement(CreatedByMeContainer, {
|
|
162
|
-
filter: filter
|
|
163
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
164
|
-
className: "save-filter"
|
|
165
|
-
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement(I18n, null, "Filter Name")), /*#__PURE__*/React.createElement(FilterNameSummary, {
|
|
166
|
-
errors: errors
|
|
167
|
-
}), /*#__PURE__*/React.createElement(I18n, {
|
|
168
|
-
render: function render(translate) {
|
|
169
|
-
return /*#__PURE__*/React.createElement("input", {
|
|
170
|
-
type: "text",
|
|
171
|
-
placeholder: translate('New Filter Name'),
|
|
172
|
-
value: filterName,
|
|
173
|
-
onChange: handleChangeFilterName
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
}), /*#__PURE__*/React.createElement("button", {
|
|
177
|
-
type: "button",
|
|
178
|
-
className: "btn btn-inverse",
|
|
179
|
-
onClick: handleSaveFilter,
|
|
180
|
-
disabled: filterName === '' || !errors.isEmpty()
|
|
181
|
-
}, /*#__PURE__*/React.createElement(I18n, null, filter && filter.type === 'custom' && filter.name === filterName ? 'Save Filter' : 'Save Filter As')), filter && filter.type === 'custom' && filter.name.length > 0 && /*#__PURE__*/React.createElement("button", {
|
|
182
|
-
type: "button",
|
|
183
|
-
className: "btn btn-inverse text-danger",
|
|
184
|
-
onClick: handleRemoveFilter,
|
|
185
|
-
disabled: filterName === '' || !errors.isEmpty()
|
|
186
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Delete Filter"))));
|
|
187
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { compose, withHandlers } from 'recompose';
|
|
3
|
-
import { ModalBody } from 'reactstrap';
|
|
4
|
-
import { OrderedMap } from 'immutable';
|
|
5
|
-
import { actions } from '../../redux/modules/filterMenu';
|
|
6
|
-
import { I18n } from '@kineticdata/react';
|
|
7
|
-
import { connect } from '../../redux/store';
|
|
8
|
-
export var SORT_OPTIONS = OrderedMap([['createdAt', {
|
|
9
|
-
label: 'Created At',
|
|
10
|
-
id: 'sorted-by-created-at'
|
|
11
|
-
}], ['updatedAt', {
|
|
12
|
-
label: 'Updated At',
|
|
13
|
-
id: 'sorted-by-updated-at'
|
|
14
|
-
}], ['closedAt', {
|
|
15
|
-
label: 'Closed At',
|
|
16
|
-
id: 'sorted-by-closed-at'
|
|
17
|
-
}], ['Due Date', {
|
|
18
|
-
label: 'Due Date',
|
|
19
|
-
id: 'sorted-by-due-date'
|
|
20
|
-
}]]);
|
|
21
|
-
export var SortedBySection = function SortedBySection(_ref) {
|
|
22
|
-
var filter = _ref.filter,
|
|
23
|
-
setSortedByHandler = _ref.setSortedByHandler;
|
|
24
|
-
return /*#__PURE__*/React.createElement(ModalBody, {
|
|
25
|
-
className: "filter-section"
|
|
26
|
-
}, /*#__PURE__*/React.createElement("h5", null, /*#__PURE__*/React.createElement(I18n, null, "Sorted By")), SORT_OPTIONS.map(function (_ref2, value) {
|
|
27
|
-
var label = _ref2.label,
|
|
28
|
-
id = _ref2.id;
|
|
29
|
-
return /*#__PURE__*/React.createElement("label", {
|
|
30
|
-
key: id,
|
|
31
|
-
htmlFor: id
|
|
32
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
33
|
-
type: "radio",
|
|
34
|
-
id: id,
|
|
35
|
-
value: value,
|
|
36
|
-
name: "sorted-by",
|
|
37
|
-
checked: value === filter.sortBy,
|
|
38
|
-
onChange: setSortedByHandler
|
|
39
|
-
}), /*#__PURE__*/React.createElement(I18n, null, label));
|
|
40
|
-
}).toList());
|
|
41
|
-
};
|
|
42
|
-
export var SortedBySectionContainer = compose(connect(null, {
|
|
43
|
-
setSortedBy: actions.setSortedBy
|
|
44
|
-
}), withHandlers({
|
|
45
|
-
setSortedByHandler: function setSortedByHandler(props) {
|
|
46
|
-
return function (event) {
|
|
47
|
-
return props.setSortedBy(event.target.value);
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}))(SortedBySection);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { compose, withHandlers } from 'recompose';
|
|
3
|
-
import { ModalBody } from 'reactstrap';
|
|
4
|
-
import { actions } from '../../redux/modules/filterMenu';
|
|
5
|
-
import { I18n } from '@kineticdata/react';
|
|
6
|
-
import { connect } from '../../redux/store';
|
|
7
|
-
var STATUSES = ['Open', 'Pending', 'Complete', 'Cancelled'];
|
|
8
|
-
export var StatusSection = function StatusSection(_ref) {
|
|
9
|
-
var filter = _ref.filter,
|
|
10
|
-
toggleStatusHandler = _ref.toggleStatusHandler;
|
|
11
|
-
return /*#__PURE__*/React.createElement(ModalBody, {
|
|
12
|
-
className: "filter-section"
|
|
13
|
-
}, /*#__PURE__*/React.createElement("h5", null, /*#__PURE__*/React.createElement(I18n, null, "Status")), STATUSES.map(function (status) {
|
|
14
|
-
return /*#__PURE__*/React.createElement("label", {
|
|
15
|
-
htmlFor: "filter-status-".concat(status),
|
|
16
|
-
key: status
|
|
17
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
18
|
-
type: "checkbox",
|
|
19
|
-
id: "filter-status-".concat(status),
|
|
20
|
-
value: status,
|
|
21
|
-
checked: filter.status.includes(status),
|
|
22
|
-
onChange: toggleStatusHandler
|
|
23
|
-
}), /*#__PURE__*/React.createElement(I18n, null, status));
|
|
24
|
-
}));
|
|
25
|
-
};
|
|
26
|
-
export var StatusSectionContainer = compose(connect(null, {
|
|
27
|
-
toggleStatus: actions.toggleStatus
|
|
28
|
-
}), withHandlers({
|
|
29
|
-
toggleStatusHandler: function toggleStatusHandler(props) {
|
|
30
|
-
return function (event) {
|
|
31
|
-
return props.toggleStatus(event.target.value);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}))(StatusSection);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { compose, withHandlers } from 'recompose';
|
|
3
|
-
import { ModalBody } from 'reactstrap';
|
|
4
|
-
import { actions } from '../../redux/modules/filterMenu';
|
|
5
|
-
import { I18n } from '@kineticdata/react';
|
|
6
|
-
import { connect } from '../../redux/store';
|
|
7
|
-
export var TeamsSection = function TeamsSection(_ref) {
|
|
8
|
-
var teams = _ref.teams,
|
|
9
|
-
filter = _ref.filter,
|
|
10
|
-
toggleTeamHandler = _ref.toggleTeamHandler;
|
|
11
|
-
return /*#__PURE__*/React.createElement(ModalBody, {
|
|
12
|
-
className: "filter-section"
|
|
13
|
-
}, /*#__PURE__*/React.createElement("h5", null, /*#__PURE__*/React.createElement(I18n, null, "Teams")), teams.map(function (team) {
|
|
14
|
-
return /*#__PURE__*/React.createElement("label", {
|
|
15
|
-
key: team.name,
|
|
16
|
-
htmlFor: team.slug
|
|
17
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
18
|
-
type: "checkbox",
|
|
19
|
-
id: team.slug,
|
|
20
|
-
value: team.name,
|
|
21
|
-
checked: filter.teams.includes(team.name),
|
|
22
|
-
onChange: toggleTeamHandler
|
|
23
|
-
}), /*#__PURE__*/React.createElement(I18n, null, team.name));
|
|
24
|
-
}));
|
|
25
|
-
};
|
|
26
|
-
export var TeamsSectionContainer = compose(connect(null, {
|
|
27
|
-
toggleTeam: actions.toggleTeam
|
|
28
|
-
}), withHandlers({
|
|
29
|
-
toggleTeamHandler: function toggleTeamHandler(props) {
|
|
30
|
-
return function (event) {
|
|
31
|
-
return props.toggleTeam(event.target.value);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}))(TeamsSection);
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
import React, { Fragment } from 'react';
|
|
3
|
-
import { FilterMenuContainer } from '../filter_menu/FilterMenuContainer';
|
|
4
|
-
import { I18n } from '@kineticdata/react'; // Define some simple button components just to cleanup the toolbar component.
|
|
5
|
-
|
|
6
|
-
var ShortcutButton = function ShortcutButton(props) {
|
|
7
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
8
|
-
type: "button",
|
|
9
|
-
className: "btn btn-subtle ".concat(props.inactive ? 'inactive' : ''),
|
|
10
|
-
onClick: props.open
|
|
11
|
-
}, props.children);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
var SortButton = function SortButton(props) {
|
|
15
|
-
var icon = props.direction === 'ASC' ? 'asc' : 'desc';
|
|
16
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
17
|
-
type: "button",
|
|
18
|
-
className: "btn btn-icon",
|
|
19
|
-
onClick: props.toggle,
|
|
20
|
-
"aria-label": "Sort by ".concat(icon)
|
|
21
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
22
|
-
className: "icon",
|
|
23
|
-
"aria-hidden": true
|
|
24
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
25
|
-
className: "fa fa-fw fa-sort-amount-".concat(icon),
|
|
26
|
-
style: {
|
|
27
|
-
fontSize: '16px',
|
|
28
|
-
color: '#7e8083'
|
|
29
|
-
}
|
|
30
|
-
})));
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export var FilterMenuMobile = function FilterMenuMobile(_ref) {
|
|
34
|
-
var filter = _ref.filter,
|
|
35
|
-
props = _objectWithoutProperties(_ref, ["filter"]);
|
|
36
|
-
|
|
37
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: "queue-controls"
|
|
39
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
40
|
-
className: "queue-controls__filter"
|
|
41
|
-
}, /*#__PURE__*/React.createElement("h2", {
|
|
42
|
-
className: filter.type === 'adhoc' && filter.name ? 'edited' : ''
|
|
43
|
-
}, /*#__PURE__*/React.createElement(I18n, null, filter.name || 'Adhoc')), /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: "buttons"
|
|
45
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
46
|
-
type: "button",
|
|
47
|
-
className: "btn btn-icon",
|
|
48
|
-
onClick: props.refresh,
|
|
49
|
-
"aria-label": "Refresh"
|
|
50
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
51
|
-
className: "icon",
|
|
52
|
-
"aria-hidden": "true"
|
|
53
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
54
|
-
className: "fa fa-fw fa-refresh",
|
|
55
|
-
style: {
|
|
56
|
-
fontSize: '16px',
|
|
57
|
-
color: '#7e8083'
|
|
58
|
-
}
|
|
59
|
-
}))), /*#__PURE__*/React.createElement("button", {
|
|
60
|
-
type: "button",
|
|
61
|
-
className: "btn btn-icon",
|
|
62
|
-
onClick: props.openFilterMenu(),
|
|
63
|
-
"aria-label": "Filter Menu"
|
|
64
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
65
|
-
className: "fa fa-fw fa-sliders",
|
|
66
|
-
style: {
|
|
67
|
-
fontSize: '16px',
|
|
68
|
-
color: '#7e8083'
|
|
69
|
-
},
|
|
70
|
-
"aria-hidden": "true"
|
|
71
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
72
|
-
className: "queue-controls__shortcuts"
|
|
73
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
className: "queue-filter-list queue-filter-list--mobile"
|
|
75
|
-
}, props.hasTeams && /*#__PURE__*/React.createElement(ShortcutButton, {
|
|
76
|
-
open: props.openFilterMenu('teams'),
|
|
77
|
-
inactive: filter.teams.isEmpty()
|
|
78
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Teams")), /*#__PURE__*/React.createElement(ShortcutButton, {
|
|
79
|
-
open: props.openFilterMenu('assignment'),
|
|
80
|
-
inactive: !filter.assignments
|
|
81
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Assignments")), /*#__PURE__*/React.createElement(ShortcutButton, {
|
|
82
|
-
open: props.openFilterMenu('status'),
|
|
83
|
-
inactive: filter.status.isEmpty()
|
|
84
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Status")), /*#__PURE__*/React.createElement(ShortcutButton, {
|
|
85
|
-
open: props.openFilterMenu('date'),
|
|
86
|
-
inactive: !filter.dateRange.custom && filter.dateRange.preset === ''
|
|
87
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Date Range")))), /*#__PURE__*/React.createElement("div", {
|
|
88
|
-
className: "queue-controls__sorting"
|
|
89
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
90
|
-
className: "queue-controls__item--left"
|
|
91
|
-
}, /*#__PURE__*/React.createElement(ShortcutButton, {
|
|
92
|
-
open: props.openFilterMenu('group'),
|
|
93
|
-
inactive: !filter.groupBy
|
|
94
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
95
|
-
className: "fa fa-fw fa-folder-open",
|
|
96
|
-
style: {
|
|
97
|
-
fontSize: '14px',
|
|
98
|
-
color: filter.groupBy ? '#1094C4' : '#7e8083'
|
|
99
|
-
},
|
|
100
|
-
role: "presentation"
|
|
101
|
-
})), /*#__PURE__*/React.createElement(SortButton, {
|
|
102
|
-
toggle: props.toggleGroupDirection,
|
|
103
|
-
direction: props.groupDirection
|
|
104
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
105
|
-
className: "queue-controls__item--right"
|
|
106
|
-
}, /*#__PURE__*/React.createElement(ShortcutButton, {
|
|
107
|
-
open: props.openFilterMenu('sort'),
|
|
108
|
-
inactive: false
|
|
109
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
110
|
-
className: "fa fa-fw fa-sort",
|
|
111
|
-
style: {
|
|
112
|
-
fontSize: '14px',
|
|
113
|
-
color: '#1094C4'
|
|
114
|
-
},
|
|
115
|
-
role: "presentation"
|
|
116
|
-
})), /*#__PURE__*/React.createElement(SortButton, {
|
|
117
|
-
toggle: props.toggleSortDirection,
|
|
118
|
-
direction: props.sortDirection
|
|
119
|
-
})))), /*#__PURE__*/React.createElement(FilterMenuContainer, null));
|
|
120
|
-
};
|