dce-reactkit 3.1.4 → 3.1.5

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.
@@ -0,0 +1,30 @@
1
+ /**
2
+ * An item that can be chosen (for use within ItemPicker)
3
+ * @author Gabe Abrams
4
+ */
5
+ type PickableItem = (
6
+ {
7
+ // Unique id of the item
8
+ id: number | string,
9
+ // Name of the item (human readable)
10
+ name: string,
11
+ // Link to view the item in the browser
12
+ link?: string,
13
+ }
14
+ & (
15
+ | {
16
+ // True if this is a group of items
17
+ isGroup: false,
18
+ // True if item is checked
19
+ checked: boolean,
20
+ }
21
+ | {
22
+ // True if this is a group of items
23
+ isGroup: true,
24
+ // List of sub-items
25
+ children: PickableItem[],
26
+ }
27
+ )
28
+ );
29
+
30
+ export default PickableItem;
package/src/index.ts CHANGED
@@ -13,6 +13,7 @@ import PopSuccessMark from './components/PopSuccessMark';
13
13
  import PopFailureMark from './components/PopFailureMark';
14
14
  import PopPendingMark from './components/PopPendingMark';
15
15
  import CopiableBox from './components/CopiableBox';
16
+ import ItemPicker from './components/ItemPicker';
16
17
 
17
18
  // Import errors
18
19
  import ErrorWithCode from './errors/ErrorWithCode';
@@ -73,6 +74,7 @@ export {
73
74
  PopFailureMark,
74
75
  PopPendingMark,
75
76
  CopiableBox,
77
+ ItemPicker,
76
78
  // Global functions
77
79
  alert,
78
80
  confirm,