@instructure/quiz-core 20.1.1-rc.0 → 20.1.1-rc.2
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/es/banks/components/BankSearch/presenter.js +29 -34
- package/es/banks/components/BankSearch/styles.js +17 -0
- package/es/banks/components/BankSearch/theme.js +5 -5
- package/es/banks/components/Banks/presenter.js +46 -57
- package/es/banks/components/Banks/styles.js +32 -0
- package/es/banks/components/Banks/theme.js +4 -2
- package/es/banks/components/BanksList/presenter.js +80 -90
- package/es/banks/components/BanksList/styles.js +45 -0
- package/es/banks/components/BanksList/theme.js +4 -2
- package/lib/banks/components/BankSearch/presenter.js +28 -37
- package/lib/banks/components/BankSearch/styles.js +25 -0
- package/lib/banks/components/BankSearch/theme.js +7 -6
- package/lib/banks/components/Banks/presenter.js +45 -61
- package/lib/banks/components/Banks/styles.js +40 -0
- package/lib/banks/components/Banks/theme.js +6 -3
- package/lib/banks/components/BanksList/presenter.js +73 -88
- package/lib/banks/components/BanksList/styles.js +53 -0
- package/lib/banks/components/BanksList/theme.js +6 -3
- package/package.json +9 -9
|
@@ -5,7 +5,8 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
import { Component } from 'react';
|
|
9
10
|
import memoize from 'lodash/memoize';
|
|
10
11
|
import PropTypes from 'prop-types';
|
|
11
12
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
@@ -17,20 +18,12 @@ import { View } from '@instructure/ui-view';
|
|
|
17
18
|
import { Flex } from '@instructure/ui-flex';
|
|
18
19
|
import { Text } from '@instructure/ui-text';
|
|
19
20
|
import { AccessibleContent, ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
20
|
-
import {
|
|
21
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
21
22
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
22
23
|
import TagSuggestSelect from "../../../common/components/shared/TagSuggestSelect/index.js";
|
|
23
24
|
import { interactionTypesNameDictionary } from "../../../common/util/interactionTypeMetadata.js";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
template: function template(theme) {
|
|
27
|
-
return "\n\n.eyMTa_ecuB{padding:".concat(theme.searchInteractionsPaddingTopBottom || 'inherit', " ").concat(theme.searchInteractionsPaddingLeftRight || 'inherit', "}\n\n.eyMTa_eYuC{display:flex;margin-top:1rem}\n\n.eyMTa_czeD{flex:1;margin-right:2rem}");
|
|
28
|
-
},
|
|
29
|
-
'interactionType': 'eyMTa_ecuB',
|
|
30
|
-
'filterContainer': 'eyMTa_eYuC',
|
|
31
|
-
'filterColumn': 'eyMTa_czeD'
|
|
32
|
-
};
|
|
33
|
-
import theme from "./theme.js";
|
|
25
|
+
import generateStyle from "./styles.js";
|
|
26
|
+
import generateComponentTheme from "./theme.js";
|
|
34
27
|
var tagShape = PropTypes.shape({
|
|
35
28
|
tag: PropTypes.shape({
|
|
36
29
|
id: PropTypes.string,
|
|
@@ -38,7 +31,7 @@ var tagShape = PropTypes.shape({
|
|
|
38
31
|
}).isRequired,
|
|
39
32
|
count: PropTypes.number.isRequired
|
|
40
33
|
});
|
|
41
|
-
export var BankSearch = (_dec =
|
|
34
|
+
export var BankSearch = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
42
35
|
_inherits(BankSearch, _Component);
|
|
43
36
|
|
|
44
37
|
var _super = _createSuper(BankSearch);
|
|
@@ -92,10 +85,10 @@ export var BankSearch = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
92
85
|
it = _ref2.interaction_type;
|
|
93
86
|
var interactionName = interactionTypesNameDictionary(it);
|
|
94
87
|
var label = "".concat(interactionName, " (").concat(count, ")");
|
|
95
|
-
return
|
|
88
|
+
return jsx("div", {
|
|
96
89
|
key: it.id,
|
|
97
|
-
|
|
98
|
-
},
|
|
90
|
+
css: _this2.props.styles.interactionType
|
|
91
|
+
}, jsx(Checkbox, {
|
|
99
92
|
checked: active.has(it.id),
|
|
100
93
|
label: label,
|
|
101
94
|
onChange: _this2.toggleInteraction(it.id),
|
|
@@ -107,7 +100,7 @@ export var BankSearch = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
107
100
|
return tag;
|
|
108
101
|
});
|
|
109
102
|
var activeTags = this.props.search.get('tags');
|
|
110
|
-
var tagSelect =
|
|
103
|
+
var tagSelect = jsx(TagSuggestSelect, {
|
|
111
104
|
noMatchText: t('No matching tags found'),
|
|
112
105
|
parentType: "Bank",
|
|
113
106
|
parentId: "0",
|
|
@@ -127,24 +120,24 @@ export var BankSearch = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
127
120
|
};
|
|
128
121
|
|
|
129
122
|
var text = allInteractions ? hide() : show();
|
|
130
|
-
return
|
|
123
|
+
return jsx(CondensedButton, {
|
|
131
124
|
onClick: toggleAllInteractions,
|
|
132
125
|
margin: "none small"
|
|
133
|
-
},
|
|
126
|
+
}, jsx(AccessibleContent, {
|
|
134
127
|
alt: text
|
|
135
128
|
}, text));
|
|
136
129
|
}
|
|
137
130
|
};
|
|
138
131
|
|
|
139
|
-
return
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
}, tagSelect),
|
|
144
|
-
|
|
145
|
-
},
|
|
132
|
+
return jsx("div", {
|
|
133
|
+
css: this.props.styles.filterContainer
|
|
134
|
+
}, jsx("div", {
|
|
135
|
+
css: this.props.styles.filterColumn
|
|
136
|
+
}, tagSelect), jsx("div", {
|
|
137
|
+
css: this.props.styles.filterColumn
|
|
138
|
+
}, jsx(View, {
|
|
146
139
|
margin: "none small"
|
|
147
|
-
},
|
|
140
|
+
}, jsx(Text, {
|
|
148
141
|
weight: "bold",
|
|
149
142
|
color: "primary"
|
|
150
143
|
}, t('Question Type'))), interactionFilters, toggleButton()));
|
|
@@ -156,23 +149,23 @@ export var BankSearch = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
156
149
|
var _this$props2 = this.props,
|
|
157
150
|
showFilters = _this$props2.showFilters,
|
|
158
151
|
toggleFilters = _this$props2.toggleFilters;
|
|
159
|
-
return
|
|
152
|
+
return jsx("div", null, jsx(Flex, {
|
|
160
153
|
as: "div"
|
|
161
|
-
},
|
|
154
|
+
}, jsx(Flex.Item, {
|
|
162
155
|
shouldGrow: true,
|
|
163
156
|
shouldShrink: true
|
|
164
|
-
},
|
|
165
|
-
renderLabel:
|
|
157
|
+
}, jsx(TextInput, {
|
|
158
|
+
renderLabel: jsx(ScreenReaderContent, null, t('Search')),
|
|
166
159
|
type: "search",
|
|
167
160
|
placeholder: t('Search'),
|
|
168
161
|
onChange: this.updateSearch,
|
|
169
162
|
value: this.props.search.get('text', '') || ''
|
|
170
|
-
})),
|
|
163
|
+
})), jsx(Flex.Item, null, jsx(Button, {
|
|
171
164
|
onClick: toggleFilters,
|
|
172
165
|
margin: "none none none small",
|
|
173
166
|
renderIcon: IconPlusLine,
|
|
174
167
|
"data-automation": "sdk-search-filter-button"
|
|
175
|
-
},
|
|
168
|
+
}, jsx(AccessibleContent, {
|
|
176
169
|
alt: showFilters ? t('Hide search filters') : t('Show search filters')
|
|
177
170
|
}, t('Filters'))))), this.renderFilters());
|
|
178
171
|
}
|
|
@@ -197,7 +190,9 @@ export var BankSearch = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
197
190
|
search: ImmutablePropTypes.map.isRequired,
|
|
198
191
|
toggle: PropTypes.func.isRequired,
|
|
199
192
|
setFilter: PropTypes.func.isRequired,
|
|
200
|
-
update: PropTypes.func.isRequired
|
|
193
|
+
update: PropTypes.func.isRequired,
|
|
194
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
195
|
+
styles: PropTypes.object
|
|
201
196
|
}, _class2.defaultProps = {
|
|
202
197
|
allInteractions: false,
|
|
203
198
|
interactionTypes: [],
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
interactionType: {
|
|
4
|
+
padding: "".concat(componentTheme.searchInteractionsPaddingTopBottom, " ").concat(componentTheme.searchInteractionsPaddingLeftRight)
|
|
5
|
+
},
|
|
6
|
+
filterContainer: {
|
|
7
|
+
display: 'flex',
|
|
8
|
+
marginTop: '1rem'
|
|
9
|
+
},
|
|
10
|
+
filterColumn: {
|
|
11
|
+
flex: 1,
|
|
12
|
+
marginRight: '2rem'
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default generateStyle;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var spacing = _ref.spacing
|
|
3
|
-
colors = _ref.colors,
|
|
4
|
-
breakpoints = _ref.breakpoints;
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
|
+
var spacing = _ref.spacing;
|
|
5
3
|
return {
|
|
6
4
|
searchInteractionsPaddingTopBottom: spacing.xSmall,
|
|
7
5
|
searchInteractionsPaddingLeftRight: spacing.small
|
|
8
6
|
};
|
|
9
|
-
}
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default generateComponentTheme;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
@@ -7,6 +6,7 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
7
6
|
|
|
8
7
|
var _dec, _class, _class2, _temp;
|
|
9
8
|
|
|
9
|
+
/** @jsx jsx */
|
|
10
10
|
import React, { Component } from 'react';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import { Heading } from '@instructure/ui-heading';
|
|
@@ -17,9 +17,8 @@ import { Billboard } from '@instructure/ui-billboard';
|
|
|
17
17
|
import { Button } from '@instructure/ui-buttons';
|
|
18
18
|
import { TextInput } from '@instructure/ui-text-input';
|
|
19
19
|
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
20
|
-
import {
|
|
20
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
21
21
|
import debounce from 'lodash/fp/debounce';
|
|
22
|
-
import classNames from 'classnames';
|
|
23
22
|
import Page from "../../../common/components/layout/Page/index.js";
|
|
24
23
|
import PaginatedCollection from "../../../common/components/shared/PaginatedCollection/index.js";
|
|
25
24
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
@@ -28,29 +27,18 @@ import BanksList from "../../../banks/components/BanksList/index.js";
|
|
|
28
27
|
import CreateBankModal from "../../../banks/components/CreateBankModal/index.js";
|
|
29
28
|
import NavWrapper from "../NavWrapper/index.js";
|
|
30
29
|
import noResults from '../noResults.svg';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
template: function template(theme) {
|
|
34
|
-
return "\n\n.cYUUC_caGd{background-color:".concat(theme.contentBackgroundColor || 'inherit', ";padding:").concat(theme.contentPaddingTopBottom || 'inherit', " ").concat(theme.contentPaddingLeftRight || 'inherit', "}\n\n.cYUUC_fsuY{display:flex;flex-direction:row;justify-content:space-between;padding-bottom:").concat(theme.headerPadding || 'inherit', "}\n\n.cYUUC_cyFt{border-bottom:").concat(theme.headerBorderWidth || 'inherit', " solid ").concat(theme.headerBorderColor || 'inherit', "}\n\n.cYUUC_ECfi{padding-bottom:2rem}\n\n.cYUUC_djgO{display:flex;flex-direction:row;margin-top:1.5rem}\n\n.cYUUC_bYSL{flex-grow:0.25;padding:0 1rem}");
|
|
35
|
-
},
|
|
36
|
-
'content': 'cYUUC_caGd',
|
|
37
|
-
'header': 'cYUUC_fsuY',
|
|
38
|
-
'borderedBottom': 'cYUUC_cyFt',
|
|
39
|
-
'filters': 'cYUUC_ECfi',
|
|
40
|
-
'filtersRow': 'cYUUC_djgO',
|
|
41
|
-
'searchBarContainer': 'cYUUC_bYSL'
|
|
42
|
-
};
|
|
43
|
-
import theme from "./theme.js";
|
|
30
|
+
import generateStyle from "./styles.js";
|
|
31
|
+
import generateComponentTheme from "./theme.js";
|
|
44
32
|
var sortOrderIcons = {
|
|
45
33
|
ascending: IconArrowUpLine,
|
|
46
34
|
descending: IconArrowDownLine
|
|
47
35
|
};
|
|
48
36
|
|
|
49
|
-
var _ref4 =
|
|
37
|
+
var _ref4 = jsx(Img, {
|
|
50
38
|
src: noResults
|
|
51
39
|
});
|
|
52
40
|
|
|
53
|
-
export var Banks = (_dec =
|
|
41
|
+
export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
54
42
|
_inherits(Banks, _Component);
|
|
55
43
|
|
|
56
44
|
var _super = _createSuper(Banks);
|
|
@@ -179,7 +167,7 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
179
167
|
};
|
|
180
168
|
|
|
181
169
|
_this.renderRecords = function (recordIds) {
|
|
182
|
-
return
|
|
170
|
+
return jsx(BanksList, {
|
|
183
171
|
createBankButton: _this.createBankButton,
|
|
184
172
|
currentUser: _this.props.currentUser,
|
|
185
173
|
focusCreateBankButton: _this.focusCreateBankButton,
|
|
@@ -209,7 +197,7 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
209
197
|
message = t("Your filter is set to \"Institution\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
210
198
|
}
|
|
211
199
|
|
|
212
|
-
return
|
|
200
|
+
return jsx(Billboard, {
|
|
213
201
|
size: "medium",
|
|
214
202
|
heading: t('No Results Found'),
|
|
215
203
|
message: message,
|
|
@@ -279,24 +267,23 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
279
267
|
display: false
|
|
280
268
|
}];
|
|
281
269
|
var searchFiltersSelectOptionIdPrefix = 'banks-search-filters-select-option-';
|
|
282
|
-
var searchFilters =
|
|
270
|
+
var searchFilters = jsx(React.Fragment, null, jsx("div", {
|
|
283
271
|
display: "inline-block"
|
|
284
|
-
},
|
|
272
|
+
}, jsx(SimpleSelect, {
|
|
285
273
|
onChange: this.handleBanksParentChange,
|
|
286
274
|
value: this.props.scopeType,
|
|
287
|
-
renderLabel:
|
|
275
|
+
renderLabel: jsx(ScreenReaderContent, null, t('Bank scope')),
|
|
288
276
|
width: "13rem"
|
|
289
277
|
}, scopeOptions.map(function (option) {
|
|
290
|
-
return
|
|
278
|
+
return jsx(SimpleSelect.Option, {
|
|
291
279
|
id: searchFiltersSelectOptionIdPrefix + option.slug,
|
|
292
280
|
key: option.slug,
|
|
293
281
|
value: option.slug
|
|
294
282
|
}, option.translation);
|
|
295
|
-
}))),
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
renderLabel: /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Search...')),
|
|
283
|
+
}))), jsx("div", {
|
|
284
|
+
css: this.props.styles.searchBarContainer
|
|
285
|
+
}, jsx(TextInput, {
|
|
286
|
+
renderLabel: jsx(ScreenReaderContent, null, t('Search...')),
|
|
300
287
|
type: "search",
|
|
301
288
|
value: this.state.searchTerms,
|
|
302
289
|
onChange: this.handleSearchInputChange,
|
|
@@ -304,70 +291,70 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
304
291
|
"data-automation": "sdk-search-bank-textinput"
|
|
305
292
|
})));
|
|
306
293
|
var sortingFiltersSelectOptionIdPrefix = 'banks-sorting-filters-select-option-';
|
|
307
|
-
var sortingFilters =
|
|
294
|
+
var sortingFilters = jsx(React.Fragment, null, jsx("div", {
|
|
308
295
|
display: "inline-block",
|
|
309
296
|
style: {
|
|
310
297
|
margin: 'auto 0px auto auto'
|
|
311
298
|
}
|
|
312
|
-
},
|
|
313
|
-
renderLabel:
|
|
299
|
+
}, jsx(SimpleSelect, {
|
|
300
|
+
renderLabel: jsx(ScreenReaderContent, null, t('Sort by')),
|
|
314
301
|
value: this.props.sortBy,
|
|
315
302
|
width: "10rem",
|
|
316
303
|
onChange: this.handleSortByChange
|
|
317
304
|
}, sortingCriteriaOptions.filter(function (option) {
|
|
318
305
|
return option.display === true;
|
|
319
306
|
}).map(function (option) {
|
|
320
|
-
return
|
|
307
|
+
return jsx(SimpleSelect.Option, {
|
|
321
308
|
id: sortingFiltersSelectOptionIdPrefix + option.slug,
|
|
322
309
|
key: option.slug,
|
|
323
310
|
value: option.slug
|
|
324
311
|
}, option.translation);
|
|
325
|
-
}))),
|
|
312
|
+
}))), jsx("div", {
|
|
326
313
|
display: "inline-block",
|
|
327
314
|
style: {
|
|
328
315
|
marginLeft: '1rem'
|
|
329
316
|
}
|
|
330
|
-
},
|
|
317
|
+
}, jsx(Button, {
|
|
331
318
|
type: "button",
|
|
332
319
|
onClick: this.handleSortingButtonClick,
|
|
333
320
|
"data-automation": "sdk-sort-banks-button",
|
|
334
321
|
renderIcon: this.getSortingOrderIcon()
|
|
335
|
-
},
|
|
322
|
+
}, jsx(AccessibleContent, {
|
|
336
323
|
alt: this.getSortAssistiveText()
|
|
337
324
|
}, t('Sort')))));
|
|
338
325
|
|
|
339
326
|
if (this.props.closeTray) {
|
|
340
|
-
return
|
|
341
|
-
|
|
342
|
-
},
|
|
343
|
-
|
|
344
|
-
}, searchFilters), !this.props.itemBankSearchTableEnabled &&
|
|
345
|
-
|
|
327
|
+
return jsx("div", {
|
|
328
|
+
css: [this.props.styles.filters, this.props.styles.borderedBottom]
|
|
329
|
+
}, jsx("div", {
|
|
330
|
+
css: this.props.styles.filtersRow
|
|
331
|
+
}, searchFilters), !this.props.itemBankSearchTableEnabled && jsx("div", {
|
|
332
|
+
css: this.props.styles.filtersRow
|
|
346
333
|
}, sortingFilters));
|
|
347
334
|
} else {
|
|
348
|
-
return
|
|
349
|
-
|
|
350
|
-
},
|
|
351
|
-
|
|
335
|
+
return jsx("div", {
|
|
336
|
+
css: [this.props.styles.filters, this.props.styles.borderedBottom]
|
|
337
|
+
}, jsx("div", {
|
|
338
|
+
css: this.props.styles.filtersRow
|
|
352
339
|
}, searchFilters, !this.props.itemBankSearchTableEnabled && sortingFilters));
|
|
353
340
|
}
|
|
354
341
|
}
|
|
355
342
|
}, {
|
|
356
343
|
key: "renderHeader",
|
|
357
344
|
value: function renderHeader() {
|
|
358
|
-
return
|
|
359
|
-
|
|
360
|
-
},
|
|
345
|
+
return jsx("div", {
|
|
346
|
+
css: [this.props.styles.filters, !this.props.filtersEnabled ? this.props.styles.borderedBottom : {}]
|
|
347
|
+
}, jsx(Heading, {
|
|
361
348
|
as: this.props.isCompact ? 'h2' : 'h1',
|
|
362
349
|
level: "h1"
|
|
363
|
-
}, t('Banks')),
|
|
350
|
+
}, t('Banks')), jsx(Button, {
|
|
364
351
|
ref: this.handleCreateBankButtonRef,
|
|
365
352
|
type: "button",
|
|
366
353
|
color: "primary",
|
|
367
354
|
onClick: this.onCreateBank,
|
|
368
355
|
"data-automation": "sdk-create-new-bank-button",
|
|
369
356
|
renderIcon: IconPlusLine
|
|
370
|
-
},
|
|
357
|
+
}, jsx(AccessibleContent, {
|
|
371
358
|
alt: t('Create Bank')
|
|
372
359
|
}, t('Bank'))));
|
|
373
360
|
}
|
|
@@ -380,7 +367,7 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
380
367
|
navigateToBuild = _this$props.navigateToBuild,
|
|
381
368
|
returnToUrl = _this$props.returnToUrl;
|
|
382
369
|
var isScopeEmpty = !Object.keys(scope).length;
|
|
383
|
-
return
|
|
370
|
+
return jsx(NavWrapper, {
|
|
384
371
|
closeTray: closeTray,
|
|
385
372
|
navigateToBuild: navigateToBuild,
|
|
386
373
|
returnToUrl: isScopeEmpty ? null : returnToUrl,
|
|
@@ -390,7 +377,7 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
390
377
|
}, {
|
|
391
378
|
key: "renderBanksSearchResults",
|
|
392
379
|
value: function renderBanksSearchResults() {
|
|
393
|
-
return
|
|
380
|
+
return jsx(PaginatedCollection, {
|
|
394
381
|
empty: this.emptyPage(),
|
|
395
382
|
getPage: this.getPage,
|
|
396
383
|
renderRecords: this.renderRecords,
|
|
@@ -400,9 +387,9 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
400
387
|
}, {
|
|
401
388
|
key: "render",
|
|
402
389
|
value: function render() {
|
|
403
|
-
return
|
|
404
|
-
|
|
405
|
-
}, this.renderHeader(), this.props.filtersEnabled && this.renderFilters(), this.renderBanksSearchResults(),
|
|
390
|
+
return jsx(Page, null, this.renderNav(), jsx("div", {
|
|
391
|
+
css: this.props.styles.content
|
|
392
|
+
}, this.renderHeader(), this.props.filtersEnabled && this.renderFilters(), this.renderBanksSearchResults(), jsx(CreateBankModal, {
|
|
406
393
|
itemBanksScope: this.props.scope
|
|
407
394
|
})));
|
|
408
395
|
}
|
|
@@ -458,7 +445,9 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
458
445
|
sortBy: PropTypes.string,
|
|
459
446
|
sortOrder: PropTypes.string,
|
|
460
447
|
usedByCourseEnabled: PropTypes.bool,
|
|
461
|
-
itemBankSearchTableEnabled: PropTypes.bool
|
|
448
|
+
itemBankSearchTableEnabled: PropTypes.bool,
|
|
449
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
450
|
+
styles: PropTypes.object
|
|
462
451
|
}, _class2.defaultProps = {
|
|
463
452
|
closeTray: null,
|
|
464
453
|
currentUser: null,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
content: {
|
|
4
|
+
padding: "".concat(componentTheme.contentPaddingTopBottom, " ").concat(componentTheme.contentPaddingLeftRight),
|
|
5
|
+
backgroundColor: componentTheme.contentBackgroundColor
|
|
6
|
+
},
|
|
7
|
+
header: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'row',
|
|
10
|
+
paddingBottom: componentTheme.headerPadding,
|
|
11
|
+
justifyContent: 'space-between'
|
|
12
|
+
},
|
|
13
|
+
borderedBottom: {
|
|
14
|
+
borderBottom: "".concat(componentTheme.headerBorderWidth, " solid ").concat(componentTheme.headerBorderColor)
|
|
15
|
+
},
|
|
16
|
+
filters: {
|
|
17
|
+
paddingBottom: '2rem'
|
|
18
|
+
},
|
|
19
|
+
filtersRow: {
|
|
20
|
+
marginTop: '1.5rem',
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'row'
|
|
23
|
+
},
|
|
24
|
+
searchBarContainer: {
|
|
25
|
+
flexGrow: 0.25,
|
|
26
|
+
padding: '0 1rem',
|
|
27
|
+
display: 'inline-block'
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var colors = _ref.colors,
|
|
3
3
|
spacing = _ref.spacing,
|
|
4
4
|
borders = _ref.borders;
|
|
@@ -10,4 +10,6 @@ export default function generator(_ref) {
|
|
|
10
10
|
headerBorderWidth: borders.widthSmall,
|
|
11
11
|
headerBorderColor: colors.tiara
|
|
12
12
|
};
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default generateComponentTheme;
|