@elliemae/ds-app-picker 2.0.0-alpha.5 → 2.0.0-alpha.9
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/cjs/AppPickerImpl.js +10 -10
- package/cjs/DSAppPicker.js +7 -7
- package/cjs/index.js +1 -1
- package/cjs/propTypes.js +1 -1
- package/package.json +5 -5
package/cjs/AppPickerImpl.js
CHANGED
|
@@ -207,14 +207,14 @@ const AppPickerImpl = ({
|
|
|
207
207
|
const buildRows = appList => {
|
|
208
208
|
const rows = lodash.chunk(appList, 3); // divides array in subarrays of 3 items
|
|
209
209
|
|
|
210
|
-
const formattedRows = rows.map((row, index) => /*#__PURE__*/_jsx__default[
|
|
210
|
+
const formattedRows = rows.map((row, index) => /*#__PURE__*/_jsx__default["default"](Row, {}, index, row.map((app, key) => {
|
|
211
211
|
const {
|
|
212
212
|
label,
|
|
213
213
|
disabled,
|
|
214
214
|
selected,
|
|
215
215
|
icon: Icon
|
|
216
216
|
} = app;
|
|
217
|
-
return /*#__PURE__*/_jsx__default[
|
|
217
|
+
return /*#__PURE__*/_jsx__default["default"](Chip, {
|
|
218
218
|
classProps: {
|
|
219
219
|
disabled,
|
|
220
220
|
selected
|
|
@@ -225,10 +225,10 @@ const AppPickerImpl = ({
|
|
|
225
225
|
"aria-disabled": disabled,
|
|
226
226
|
disabled: disabled,
|
|
227
227
|
"aria-selected": selected
|
|
228
|
-
}, key, /*#__PURE__*/_jsx__default[
|
|
228
|
+
}, key, /*#__PURE__*/_jsx__default["default"](Icon, {
|
|
229
229
|
className: "app-picker__icon",
|
|
230
230
|
size: "m"
|
|
231
|
-
}), /*#__PURE__*/_jsx__default[
|
|
231
|
+
}), /*#__PURE__*/_jsx__default["default"](ChipLabel, {}, void 0, label));
|
|
232
232
|
})));
|
|
233
233
|
return formattedRows;
|
|
234
234
|
};
|
|
@@ -241,16 +241,16 @@ const AppPickerImpl = ({
|
|
|
241
241
|
ref: wrapperRef,
|
|
242
242
|
onKeyDown: handleOnKeyDownWrapper,
|
|
243
243
|
"data-testid": "app-picker__wrapper",
|
|
244
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
244
|
+
children: [/*#__PURE__*/_jsx__default["default"](SectionTitle, {
|
|
245
245
|
"data-testid": "app-picker__main-title"
|
|
246
|
-
}, void 0, sectionTitle), /*#__PURE__*/_jsx__default[
|
|
246
|
+
}, void 0, sectionTitle), /*#__PURE__*/_jsx__default["default"](Grid, {
|
|
247
247
|
"data-testid": "app-picker__main-grid"
|
|
248
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
249
|
-
children: [_Separator || (_Separator = /*#__PURE__*/_jsx__default[
|
|
248
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](AppsRows, {})), !!customApps.length && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
249
|
+
children: [_Separator || (_Separator = /*#__PURE__*/_jsx__default["default"](Separator, {})), /*#__PURE__*/_jsx__default["default"](SectionTitle, {
|
|
250
250
|
"data-testid": "app-picker__custom-title"
|
|
251
|
-
}, void 0, customSectionTitle), /*#__PURE__*/_jsx__default[
|
|
251
|
+
}, void 0, customSectionTitle), /*#__PURE__*/_jsx__default["default"](Grid, {
|
|
252
252
|
"data-testid": "app-picker__custom-grid"
|
|
253
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
253
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](CustomRows, {}))]
|
|
254
254
|
})]
|
|
255
255
|
});
|
|
256
256
|
};
|
package/cjs/DSAppPicker.js
CHANGED
|
@@ -24,7 +24,7 @@ const DSAppPicker = ({
|
|
|
24
24
|
customApps = [],
|
|
25
25
|
sectionTitle = 'APPLICATIONS',
|
|
26
26
|
customSectionTitle = 'CUSTOM APPLICATIONS',
|
|
27
|
-
icon: Icon = () => /*#__PURE__*/_jsx__default[
|
|
27
|
+
icon: Icon = () => /*#__PURE__*/_jsx__default["default"](MenuPicker__default["default"], {
|
|
28
28
|
fill: ['brand-primary', 700],
|
|
29
29
|
size: "m"
|
|
30
30
|
}),
|
|
@@ -70,7 +70,7 @@ const DSAppPicker = ({
|
|
|
70
70
|
onClickOutside(e);
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
const AppPickerContent = () => /*#__PURE__*/_jsx__default[
|
|
73
|
+
const AppPickerContent = () => /*#__PURE__*/_jsx__default["default"](AppPickerImpl, {
|
|
74
74
|
apps: apps,
|
|
75
75
|
customApps: customApps,
|
|
76
76
|
sectionTitle: sectionTitle,
|
|
@@ -83,11 +83,11 @@ const DSAppPicker = ({
|
|
|
83
83
|
|
|
84
84
|
const RenderTrigger = renderTrigger || (({
|
|
85
85
|
ref
|
|
86
|
-
}) => /*#__PURE__*/_jsx__default[
|
|
86
|
+
}) => /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
87
87
|
"data-testid": "app-picker__button",
|
|
88
88
|
id: "app-picker__button",
|
|
89
89
|
buttonType: "text",
|
|
90
|
-
icon: _Icon || (_Icon = /*#__PURE__*/_jsx__default[
|
|
90
|
+
icon: _Icon || (_Icon = /*#__PURE__*/_jsx__default["default"](Icon, {})),
|
|
91
91
|
innerRef: dsUtilities.mergeRefs(ref, defaultTriggerRef),
|
|
92
92
|
onClick: e => {
|
|
93
93
|
onClick(e);
|
|
@@ -95,8 +95,8 @@ const DSAppPicker = ({
|
|
|
95
95
|
}
|
|
96
96
|
}));
|
|
97
97
|
|
|
98
|
-
return /*#__PURE__*/_jsx__default[
|
|
99
|
-
content: /*#__PURE__*/_jsx__default[
|
|
98
|
+
return /*#__PURE__*/_jsx__default["default"](DSPopover__default["default"], {
|
|
99
|
+
content: /*#__PURE__*/_jsx__default["default"](AppPickerContent, {}),
|
|
100
100
|
isOpen: typeof isOpen === 'boolean' ? isOpen : open,
|
|
101
101
|
onClickOutside: handleOnClickOutside,
|
|
102
102
|
placement: "bottom",
|
|
@@ -115,4 +115,4 @@ AppPickerWithSchema.propTypes = propTypes.propTypes;
|
|
|
115
115
|
|
|
116
116
|
exports.AppPickerWithSchema = AppPickerWithSchema;
|
|
117
117
|
exports.DSAppPicker = DSAppPicker;
|
|
118
|
-
exports[
|
|
118
|
+
exports["default"] = DSAppPicker;
|
package/cjs/index.js
CHANGED
package/cjs/propTypes.js
CHANGED
|
@@ -14,7 +14,7 @@ const propTypes = {
|
|
|
14
14
|
customApps: reactDesc.PropTypes.array.description('Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]'),
|
|
15
15
|
sectionTitle: reactDesc.PropTypes.string.description('main section title').defaultValue('APPLICATIONS'),
|
|
16
16
|
customSectionTitle: reactDesc.PropTypes.string.description('custom section title').defaultValue('CUSTOM APPLICATIONS'),
|
|
17
|
-
icon: reactDesc.PropTypes.func.description('trigger button s icon').defaultValue(MenuPicker__default[
|
|
17
|
+
icon: reactDesc.PropTypes.func.description('trigger button s icon').defaultValue(MenuPicker__default["default"]),
|
|
18
18
|
renderTrigger: reactDesc.PropTypes.func.description('Custom trigger component.'),
|
|
19
19
|
actionRef: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.func, reactDesc.PropTypes.shape({
|
|
20
20
|
current: reactDesc.PropTypes.any
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-app-picker",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - App Picker",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"build": "node ../../scripts/build/build.js"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@elliemae/ds-button": "2.0.0-alpha.
|
|
56
|
-
"@elliemae/ds-classnames": "2.0.0-alpha.
|
|
57
|
-
"@elliemae/ds-icons": "2.0.0-alpha.
|
|
58
|
-
"@elliemae/ds-popover": "2.0.0-alpha.
|
|
55
|
+
"@elliemae/ds-button": "2.0.0-alpha.9",
|
|
56
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.9",
|
|
57
|
+
"@elliemae/ds-icons": "2.0.0-alpha.9",
|
|
58
|
+
"@elliemae/ds-popover": "2.0.0-alpha.9",
|
|
59
59
|
"react-desc": "^4.1.3"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|