@elliemae/ds-shuttle 2.0.0-rc.5 → 2.0.0-rc.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/package.json +23 -11
- package/types/DSShuttle.d.ts +259 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-shuttle",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Shuttle",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -152,11 +152,16 @@
|
|
|
152
152
|
"build": "node ../../scripts/build/build.js"
|
|
153
153
|
},
|
|
154
154
|
"dependencies": {
|
|
155
|
-
"@elliemae/ds-basic": "2.0.0-rc.
|
|
156
|
-
"@elliemae/ds-
|
|
157
|
-
"@elliemae/ds-
|
|
158
|
-
"@elliemae/ds-
|
|
159
|
-
"@elliemae/ds-
|
|
155
|
+
"@elliemae/ds-basic": "2.0.0-rc.9",
|
|
156
|
+
"@elliemae/ds-button": "2.0.0-rc.9",
|
|
157
|
+
"@elliemae/ds-circular-progress-indicator": "2.0.0-rc.9",
|
|
158
|
+
"@elliemae/ds-classnames": "2.0.0-rc.9",
|
|
159
|
+
"@elliemae/ds-form": "2.0.0-rc.9",
|
|
160
|
+
"@elliemae/ds-icons": "2.0.0-rc.9",
|
|
161
|
+
"@elliemae/ds-indeterminate-progress-indicator": "2.0.0-rc.9",
|
|
162
|
+
"@elliemae/ds-system": "2.0.0-rc.9",
|
|
163
|
+
"@elliemae/ds-truncated-tooltip-text": "2.0.0-rc.9",
|
|
164
|
+
"@elliemae/ds-utilities": "2.0.0-rc.9",
|
|
160
165
|
"constate": "~1.3.2",
|
|
161
166
|
"prop-types": "~15.7.2",
|
|
162
167
|
"react-desc": "~4.1.3",
|
|
@@ -167,14 +172,21 @@
|
|
|
167
172
|
"react-window-infinite-loader": "~1.0.5",
|
|
168
173
|
"treetabular": "~3.6.0"
|
|
169
174
|
},
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
175
|
+
"devDependencies": {
|
|
176
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
177
|
+
"@testing-library/react": "~12.1.2",
|
|
178
|
+
"@testing-library/user-event": "~13.5.0",
|
|
179
|
+
"styled-components": "~5.3.3"
|
|
174
180
|
},
|
|
175
181
|
"peerDependencies": {
|
|
176
182
|
"lodash": "^4.17.21",
|
|
177
183
|
"react": "~17.0.2",
|
|
178
|
-
"react-dom": "^17.0.2"
|
|
184
|
+
"react-dom": "^17.0.2",
|
|
185
|
+
"styled-components": "^5.3.3"
|
|
186
|
+
},
|
|
187
|
+
"publishConfig": {
|
|
188
|
+
"access": "public",
|
|
189
|
+
"directory": "dist",
|
|
190
|
+
"generateSubmodules": true
|
|
179
191
|
}
|
|
180
192
|
}
|
package/types/DSShuttle.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
import utils from './utils';
|
|
3
4
|
declare const DSShuttle: {
|
|
@@ -41,79 +42,300 @@ declare const DSShuttle: {
|
|
|
41
42
|
}): JSX.Element;
|
|
42
43
|
propTypes: {
|
|
43
44
|
/** inject props to shuttle wrapper */
|
|
44
|
-
containerProps:
|
|
45
|
+
containerProps: {
|
|
46
|
+
defaultValue<T = unknown>(arg: T): {
|
|
47
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
48
|
+
};
|
|
49
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
50
|
+
};
|
|
45
51
|
/** The identifier field for the item object */
|
|
46
|
-
idField:
|
|
52
|
+
idField: {
|
|
53
|
+
defaultValue<T = unknown>(arg: T): {
|
|
54
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
55
|
+
};
|
|
56
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
57
|
+
};
|
|
47
58
|
/** The parent identifier field for the item object */
|
|
48
|
-
parentIdField:
|
|
59
|
+
parentIdField: {
|
|
60
|
+
defaultValue<T = unknown>(arg: T): {
|
|
61
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
62
|
+
};
|
|
63
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
64
|
+
};
|
|
49
65
|
/** Whether to show the icons or not */
|
|
50
|
-
showIcons:
|
|
66
|
+
showIcons: {
|
|
67
|
+
defaultValue<T = unknown>(arg: T): {
|
|
68
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
69
|
+
};
|
|
70
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
71
|
+
};
|
|
51
72
|
/** List of items */
|
|
52
|
-
items:
|
|
73
|
+
items: {
|
|
74
|
+
defaultValue<T = unknown>(arg: T): {
|
|
75
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
76
|
+
};
|
|
77
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
78
|
+
};
|
|
53
79
|
/** Array of item ids that are selected. If passed the component behaves as controlled */
|
|
54
|
-
selectedItems:
|
|
80
|
+
selectedItems: {
|
|
81
|
+
defaultValue<T = unknown>(arg: T): {
|
|
82
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
83
|
+
};
|
|
84
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
85
|
+
};
|
|
55
86
|
/** Array of item ids that aren't selected. Should include ALL non selected items, even those not rendered */
|
|
56
|
-
nonSelectedItems:
|
|
87
|
+
nonSelectedItems: {
|
|
88
|
+
defaultValue<T = unknown>(arg: T): {
|
|
89
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
90
|
+
};
|
|
91
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
92
|
+
};
|
|
57
93
|
/** Handler on search */
|
|
58
|
-
onSearch:
|
|
94
|
+
onSearch: {
|
|
95
|
+
defaultValue<T = unknown>(arg: T): {
|
|
96
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
97
|
+
};
|
|
98
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
99
|
+
};
|
|
59
100
|
/** Handler when the searchbox is visible */
|
|
60
|
-
onSearchOpen:
|
|
101
|
+
onSearchOpen: {
|
|
102
|
+
defaultValue<T = unknown>(arg: T): {
|
|
103
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
104
|
+
};
|
|
105
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
106
|
+
};
|
|
61
107
|
/** Handler when the searchbox is not visible */
|
|
62
|
-
onSearchClose:
|
|
108
|
+
onSearchClose: {
|
|
109
|
+
defaultValue<T = unknown>(arg: T): {
|
|
110
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
111
|
+
};
|
|
112
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
113
|
+
};
|
|
63
114
|
/** Source handler when a user navigates to a level down on the nested structure. First param: item drilled. Second param: direction ("up" | "down") */
|
|
64
|
-
onDrillDown:
|
|
115
|
+
onDrillDown: {
|
|
116
|
+
defaultValue<T = unknown>(arg: T): {
|
|
117
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
118
|
+
};
|
|
119
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
120
|
+
};
|
|
65
121
|
/** Target handler when a user navigates to a level down on the nested structure. First param: item drilled. Second param: direction ("up" | "down") */
|
|
66
|
-
onDrillDownTarget:
|
|
122
|
+
onDrillDownTarget: {
|
|
123
|
+
defaultValue<T = unknown>(arg: T): {
|
|
124
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
125
|
+
};
|
|
126
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
127
|
+
};
|
|
67
128
|
/** Target handler when user stops dragging an item */
|
|
68
|
-
onTargetSortEnd:
|
|
129
|
+
onTargetSortEnd: {
|
|
130
|
+
defaultValue<T = unknown>(arg: T): {
|
|
131
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
132
|
+
};
|
|
133
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
134
|
+
};
|
|
69
135
|
/** Callback function that gets more items for Infinite Scroll */
|
|
70
|
-
onGetMoreItems:
|
|
136
|
+
onGetMoreItems: {
|
|
137
|
+
defaultValue<T = unknown>(arg: T): {
|
|
138
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
139
|
+
};
|
|
140
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
141
|
+
};
|
|
71
142
|
/** Wheter there are mor items loading for Infinite Scroll */
|
|
72
|
-
moreItemsLoading:
|
|
143
|
+
moreItemsLoading: {
|
|
144
|
+
defaultValue<T = unknown>(arg: T): {
|
|
145
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
146
|
+
};
|
|
147
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
148
|
+
};
|
|
73
149
|
/** Wheter there is a next page for Infinite Scroll, controls when to trigger onGetMoreItems */
|
|
74
|
-
hasNextPage:
|
|
150
|
+
hasNextPage: {
|
|
151
|
+
defaultValue<T = unknown>(arg: T): {
|
|
152
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
153
|
+
};
|
|
154
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
155
|
+
};
|
|
75
156
|
/** Function that takes as a parameter an internal getter for the state */
|
|
76
|
-
setGetStatus:
|
|
157
|
+
setGetStatus: {
|
|
158
|
+
defaultValue<T = unknown>(arg: T): {
|
|
159
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
160
|
+
};
|
|
161
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
162
|
+
};
|
|
77
163
|
/** Whether the target can be sortable with DnD */
|
|
78
|
-
targetSortable:
|
|
164
|
+
targetSortable: {
|
|
165
|
+
defaultValue<T = unknown>(arg: T): {
|
|
166
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
167
|
+
};
|
|
168
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
169
|
+
};
|
|
79
170
|
/** Handler when the searchbox is visible */
|
|
80
|
-
sourceRootTitle:
|
|
171
|
+
sourceRootTitle: {
|
|
172
|
+
defaultValue<T = unknown>(arg: T): {
|
|
173
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
174
|
+
};
|
|
175
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
176
|
+
};
|
|
81
177
|
/** Source text when there is no items */
|
|
82
|
-
sourceEmptyMessage:
|
|
178
|
+
sourceEmptyMessage: {
|
|
179
|
+
defaultValue<T = unknown>(arg: T): {
|
|
180
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
181
|
+
};
|
|
182
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
183
|
+
};
|
|
83
184
|
/** Target text when there is no items */
|
|
84
|
-
targetEmptyMessage:
|
|
185
|
+
targetEmptyMessage: {
|
|
186
|
+
defaultValue<T = unknown>(arg: T): {
|
|
187
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
188
|
+
};
|
|
189
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
190
|
+
};
|
|
85
191
|
/** Target text for the first hierarchy item */
|
|
86
|
-
targetRootTitle:
|
|
192
|
+
targetRootTitle: {
|
|
193
|
+
defaultValue<T = unknown>(arg: T): {
|
|
194
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
195
|
+
};
|
|
196
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
197
|
+
};
|
|
87
198
|
/** Function that allow to compose the item props in the source */
|
|
88
|
-
composeSourceItemProps:
|
|
199
|
+
composeSourceItemProps: {
|
|
200
|
+
defaultValue<T = unknown>(arg: T): {
|
|
201
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
202
|
+
};
|
|
203
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
204
|
+
};
|
|
89
205
|
/** Function that allow to compose the item props in the target */
|
|
90
|
-
composeTargetItemProps:
|
|
206
|
+
composeTargetItemProps: {
|
|
207
|
+
defaultValue<T = unknown>(arg: T): {
|
|
208
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
209
|
+
};
|
|
210
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
211
|
+
};
|
|
91
212
|
/** Handler when a users moves an item to the target */
|
|
92
|
-
onAddToTarget:
|
|
213
|
+
onAddToTarget: {
|
|
214
|
+
defaultValue<T = unknown>(arg: T): {
|
|
215
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
216
|
+
};
|
|
217
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
218
|
+
};
|
|
93
219
|
/** Handler when a users moves all the 'checked' items to the target */
|
|
94
|
-
onAddCheckedItems:
|
|
220
|
+
onAddCheckedItems: {
|
|
221
|
+
defaultValue<T = unknown>(arg: T): {
|
|
222
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
223
|
+
};
|
|
224
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
225
|
+
};
|
|
95
226
|
/** Handler when a user removes an item from the target */
|
|
96
|
-
onRemoveFromTarget:
|
|
227
|
+
onRemoveFromTarget: {
|
|
228
|
+
defaultValue<T = unknown>(arg: T): {
|
|
229
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
230
|
+
};
|
|
231
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
232
|
+
};
|
|
97
233
|
/** Handler when a user removes all the items from the target */
|
|
98
|
-
onRemoveAllFromTarget:
|
|
234
|
+
onRemoveAllFromTarget: {
|
|
235
|
+
defaultValue<T = unknown>(arg: T): {
|
|
236
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
237
|
+
};
|
|
238
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
239
|
+
};
|
|
99
240
|
/** Handler for every change on the state */
|
|
100
|
-
onChange:
|
|
241
|
+
onChange: {
|
|
242
|
+
defaultValue<T = unknown>(arg: T): {
|
|
243
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
244
|
+
};
|
|
245
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
246
|
+
};
|
|
101
247
|
/** Function that returns an element for the source counter */
|
|
102
|
-
renderSourceCounter:
|
|
248
|
+
renderSourceCounter: {
|
|
249
|
+
defaultValue<T = unknown>(arg: T): {
|
|
250
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
251
|
+
};
|
|
252
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
253
|
+
};
|
|
103
254
|
/** Function that returns an element for the target counter */
|
|
104
|
-
renderTargetCounter:
|
|
255
|
+
renderTargetCounter: {
|
|
256
|
+
defaultValue<T = unknown>(arg: T): {
|
|
257
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
258
|
+
};
|
|
259
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
260
|
+
};
|
|
105
261
|
/** Source text for the clear items button */
|
|
106
|
-
sourceClearItemsText:
|
|
262
|
+
sourceClearItemsText: {
|
|
263
|
+
defaultValue<T = unknown>(arg: T): {
|
|
264
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
265
|
+
};
|
|
266
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
267
|
+
};
|
|
107
268
|
/** Target text for the clear items button */
|
|
108
|
-
targetClearItemsText:
|
|
269
|
+
targetClearItemsText: {
|
|
270
|
+
defaultValue<T = unknown>(arg: T): {
|
|
271
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
272
|
+
};
|
|
273
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
274
|
+
};
|
|
109
275
|
/** Searchbox placeholder */
|
|
110
|
-
searchPlaceholder:
|
|
276
|
+
searchPlaceholder: {
|
|
277
|
+
defaultValue<T = unknown>(arg: T): {
|
|
278
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
279
|
+
};
|
|
280
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
281
|
+
};
|
|
111
282
|
/** Displays loading indicator on source section */
|
|
112
|
-
loadingSource:
|
|
283
|
+
loadingSource: {
|
|
284
|
+
defaultValue<T = unknown>(arg: T): {
|
|
285
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
286
|
+
};
|
|
287
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
288
|
+
};
|
|
113
289
|
/** Displays loading indicator on target section */
|
|
114
|
-
loadingTarget:
|
|
290
|
+
loadingTarget: {
|
|
291
|
+
defaultValue<T = unknown>(arg: T): {
|
|
292
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
293
|
+
};
|
|
294
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
295
|
+
};
|
|
115
296
|
};
|
|
116
297
|
};
|
|
117
|
-
declare const DSShuttleWithSchema:
|
|
298
|
+
declare const DSShuttleWithSchema: {
|
|
299
|
+
(props?: {
|
|
300
|
+
containerProps?: {} | undefined;
|
|
301
|
+
idField?: string | undefined;
|
|
302
|
+
parentIdField?: string | undefined;
|
|
303
|
+
showIcons?: boolean | undefined;
|
|
304
|
+
items?: never[] | undefined;
|
|
305
|
+
selectedItems?: undefined;
|
|
306
|
+
nonSelectedItems?: undefined;
|
|
307
|
+
onSearch?: (() => void) | undefined;
|
|
308
|
+
onSearchOpen?: (() => void) | undefined;
|
|
309
|
+
onSearchClose?: (() => void) | undefined;
|
|
310
|
+
onDrillDown?: (() => void) | undefined;
|
|
311
|
+
onDrillDownTarget?: (() => void) | undefined;
|
|
312
|
+
onTargetSortEnd?: (() => void) | undefined;
|
|
313
|
+
setGetStatus?: (() => void) | undefined;
|
|
314
|
+
targetSortable?: boolean | undefined;
|
|
315
|
+
sourceEmptyMessage?: string | undefined;
|
|
316
|
+
sourceRootTitle?: string | undefined;
|
|
317
|
+
targetEmptyMessage?: string | undefined;
|
|
318
|
+
targetRootTitle?: string | undefined;
|
|
319
|
+
composeSourceItemProps?: (() => {}) | undefined;
|
|
320
|
+
composeTargetItemProps?: (() => {}) | undefined;
|
|
321
|
+
onAddToTarget?: (() => void) | undefined;
|
|
322
|
+
onAddCheckedItems?: (() => void) | undefined;
|
|
323
|
+
onRemoveFromTarget?: (() => void) | undefined;
|
|
324
|
+
onRemoveAllFromTarget?: (() => void) | undefined;
|
|
325
|
+
onChange?: (() => void) | undefined;
|
|
326
|
+
renderSourceCounter?: (() => void) | undefined;
|
|
327
|
+
renderTargetCounter?: (() => void) | undefined;
|
|
328
|
+
sourceClearItemsText?: string | undefined;
|
|
329
|
+
targetClearItemsText?: string | undefined;
|
|
330
|
+
searchPlaceholder?: string | undefined;
|
|
331
|
+
loadingSource?: boolean | undefined;
|
|
332
|
+
loadingTarget?: boolean | undefined;
|
|
333
|
+
onGetMoreItems?: (() => null) | undefined;
|
|
334
|
+
hasNextPage?: boolean | undefined;
|
|
335
|
+
moreItemsLoading: any;
|
|
336
|
+
} | undefined): JSX.Element;
|
|
337
|
+
propTypes: unknown;
|
|
338
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
339
|
+
};
|
|
118
340
|
export { utils, DSShuttleWithSchema };
|
|
119
341
|
export default DSShuttle;
|