@plasmicapp/react-web 0.2.120 → 0.2.121
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/dist/all.d.ts +45 -191
- package/dist/data-sources/index.d.ts +1 -1
- package/dist/host/index.d.ts +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/query/index.d.ts +1 -0
- package/dist/react-web.cjs.development.js +0 -31
- package/dist/react-web.cjs.development.js.map +1 -1
- package/dist/react-web.cjs.production.min.js +1 -1
- package/dist/react-web.cjs.production.min.js.map +1 -1
- package/dist/react-web.esm.js +0 -1
- package/dist/react-web.esm.js.map +1 -1
- package/lib/data-sources/index.d.ts +1 -0
- package/lib/data-sources/index.js +2 -0
- package/{skinny/dist → lib}/data-sources/index.js.map +0 -0
- package/lib/data-sources/package.json +4 -0
- package/lib/host/index.d.ts +1 -0
- package/lib/host/index.js +2 -0
- package/lib/host/index.js.map +1 -0
- package/lib/host/package.json +4 -0
- package/lib/query/index.d.ts +1 -0
- package/lib/query/index.js +2 -0
- package/lib/query/index.js.map +1 -0
- package/lib/query/package.json +4 -0
- package/package.json +4 -2
- package/skinny/dist/data-sources/index.d.ts +1 -1
- package/skinny/dist/host/index.d.ts +1 -0
- package/skinny/dist/index.d.ts +0 -1
- package/skinny/dist/query/index.d.ts +1 -0
- package/skinny/dist/data-sources/index.js +0 -2
package/dist/all.d.ts
CHANGED
|
@@ -1,151 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties, Key
|
|
3
|
-
|
|
4
|
-
declare type FetcherResponse<Data = unknown> = Data | Promise<Data>;
|
|
5
|
-
declare type BareFetcher<Data = unknown> = (...args: any[]) => FetcherResponse<Data>;
|
|
6
|
-
declare type Fetcher$1<Data = unknown, SWRKey extends Key = Key> = SWRKey extends () => readonly [...infer Args] | null | undefined | false ? (...args: [...Args]) => FetcherResponse<Data> : SWRKey extends readonly [...infer Args] ? (...args: [...Args]) => FetcherResponse<Data> : SWRKey extends () => infer Arg | null | undefined | false ? (...args: [Arg]) => FetcherResponse<Data> : SWRKey extends null | undefined | false ? never : SWRKey extends infer Arg ? (...args: [Arg]) => FetcherResponse<Data> : never;
|
|
7
|
-
interface InternalConfiguration {
|
|
8
|
-
cache: Cache;
|
|
9
|
-
mutate: ScopedMutator;
|
|
10
|
-
}
|
|
11
|
-
interface PublicConfiguration<Data = any, Error = any, Fn extends Fetcher$1 = BareFetcher> {
|
|
12
|
-
errorRetryInterval: number;
|
|
13
|
-
errorRetryCount?: number;
|
|
14
|
-
loadingTimeout: number;
|
|
15
|
-
focusThrottleInterval: number;
|
|
16
|
-
dedupingInterval: number;
|
|
17
|
-
refreshInterval?: number | ((latestData: Data | undefined) => number);
|
|
18
|
-
refreshWhenHidden?: boolean;
|
|
19
|
-
refreshWhenOffline?: boolean;
|
|
20
|
-
revalidateOnFocus: boolean;
|
|
21
|
-
revalidateOnReconnect: boolean;
|
|
22
|
-
revalidateOnMount?: boolean;
|
|
23
|
-
revalidateIfStale: boolean;
|
|
24
|
-
shouldRetryOnError: boolean | ((err: Error) => boolean);
|
|
25
|
-
suspense?: boolean;
|
|
26
|
-
fallbackData?: Data;
|
|
27
|
-
fetcher?: Fn;
|
|
28
|
-
use?: Middleware[];
|
|
29
|
-
fallback: {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
};
|
|
32
|
-
isPaused: () => boolean;
|
|
33
|
-
onLoadingSlow: (key: string, config: Readonly<PublicConfiguration<Data, Error, Fn>>) => void;
|
|
34
|
-
onSuccess: (data: Data, key: string, config: Readonly<PublicConfiguration<Data, Error, Fn>>) => void;
|
|
35
|
-
onError: (err: Error, key: string, config: Readonly<PublicConfiguration<Data, Error, Fn>>) => void;
|
|
36
|
-
onErrorRetry: (err: Error, key: string, config: Readonly<PublicConfiguration<Data, Error, Fn>>, revalidate: Revalidator, revalidateOpts: Required<RevalidatorOptions>) => void;
|
|
37
|
-
onDiscarded: (key: string) => void;
|
|
38
|
-
compare: (a: Data | undefined, b: Data | undefined) => boolean;
|
|
39
|
-
isOnline: () => boolean;
|
|
40
|
-
isVisible: () => boolean;
|
|
41
|
-
}
|
|
42
|
-
declare type FullConfiguration = InternalConfiguration & PublicConfiguration;
|
|
43
|
-
interface SWRHook {
|
|
44
|
-
<Data = any, Error = any, SWRKey extends Key = null>(key: SWRKey): SWRResponse<Data, Error>;
|
|
45
|
-
<Data = any, Error = any, SWRKey extends Key = null>(key: SWRKey, fetcher: Fetcher$1<Data, SWRKey> | null): SWRResponse<Data, Error>;
|
|
46
|
-
<Data = any, Error = any, SWRKey extends Key = null>(key: SWRKey, config: SWRConfiguration<Data, Error, Fetcher$1<Data, SWRKey>> | undefined): SWRResponse<Data, Error>;
|
|
47
|
-
<Data = any, Error = any, SWRKey extends Key = null>(key: SWRKey, fetcher: Fetcher$1<Data, SWRKey> | null, config: SWRConfiguration<Data, Error, Fetcher$1<Data, SWRKey>> | undefined): SWRResponse<Data, Error>;
|
|
48
|
-
<Data = any, Error = any>(key: Key): SWRResponse<Data, Error>;
|
|
49
|
-
<Data = any, Error = any>(key: Key, fetcher: BareFetcher<Data> | null): SWRResponse<Data, Error>;
|
|
50
|
-
<Data = any, Error = any>(key: Key, config: SWRConfiguration<Data, Error, BareFetcher<Data>> | undefined): SWRResponse<Data, Error>;
|
|
51
|
-
<Data = any, Error = any>(key: Key, fetcher: BareFetcher<Data> | null, config: SWRConfiguration<Data, Error, BareFetcher<Data>> | undefined): SWRResponse<Data, Error>;
|
|
52
|
-
}
|
|
53
|
-
declare type Middleware = (useSWRNext: SWRHook) => <Data = any, Error = any>(key: Key, fetcher: BareFetcher<Data> | null, config: SWRConfiguration<Data, Error, BareFetcher<Data>>) => SWRResponse<Data, Error>;
|
|
54
|
-
declare type ArgumentsTuple = [any, ...unknown[]] | readonly [any, ...unknown[]];
|
|
55
|
-
declare type Arguments = string | ArgumentsTuple | Record<any, any> | null | undefined | false;
|
|
56
|
-
declare type Key = Arguments | (() => Arguments);
|
|
57
|
-
declare type MutatorCallback<Data = any> = (currentData?: Data) => Promise<undefined | Data> | undefined | Data;
|
|
58
|
-
declare type MutatorOptions<Data = any> = {
|
|
59
|
-
revalidate?: boolean;
|
|
60
|
-
populateCache?: boolean | ((result: any, currentData: Data) => Data);
|
|
61
|
-
optimisticData?: Data | ((currentData?: Data) => Data);
|
|
62
|
-
rollbackOnError?: boolean;
|
|
63
|
-
};
|
|
64
|
-
interface ScopedMutator<Data = any> {
|
|
65
|
-
/** This is used for bound mutator */
|
|
66
|
-
(key: Key, data?: Data | Promise<Data> | MutatorCallback<Data>, opts?: boolean | MutatorOptions<Data>): Promise<Data | undefined>;
|
|
67
|
-
/** This is used for global mutator */
|
|
68
|
-
<T = any>(key: Key, data?: T | Promise<T> | MutatorCallback<T>, opts?: boolean | MutatorOptions<Data>): Promise<T | undefined>;
|
|
69
|
-
}
|
|
70
|
-
declare type KeyedMutator<Data> = (data?: Data | Promise<Data> | MutatorCallback<Data>, opts?: boolean | MutatorOptions<Data>) => Promise<Data | undefined>;
|
|
71
|
-
declare type SWRConfiguration<Data = any, Error = any, Fn extends BareFetcher<any> = BareFetcher<any>> = Partial<PublicConfiguration<Data, Error, Fn>>;
|
|
72
|
-
interface SWRResponse<Data = any, Error = any> {
|
|
73
|
-
data?: Data;
|
|
74
|
-
error?: Error;
|
|
75
|
-
mutate: KeyedMutator<Data>;
|
|
76
|
-
isValidating: boolean;
|
|
77
|
-
}
|
|
78
|
-
interface RevalidatorOptions {
|
|
79
|
-
retryCount?: number;
|
|
80
|
-
dedupe?: boolean;
|
|
81
|
-
}
|
|
82
|
-
declare type Revalidator = (revalidateOpts?: RevalidatorOptions) => Promise<boolean> | void;
|
|
83
|
-
interface Cache<Data = any> {
|
|
84
|
-
get(key: Key): Data | null | undefined;
|
|
85
|
-
set(key: Key, value: Data): void;
|
|
86
|
-
delete(key: Key): void;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
declare function usePlasmicDataConfig(): FullConfiguration;
|
|
90
|
-
|
|
91
|
-
interface Pagination {
|
|
92
|
-
pageSize: number;
|
|
93
|
-
pageIndex: number;
|
|
94
|
-
}
|
|
95
|
-
interface DataSourceSchema {
|
|
96
|
-
tables: TableSchema[];
|
|
97
|
-
}
|
|
98
|
-
interface TableSchema {
|
|
99
|
-
id: string;
|
|
100
|
-
label?: string;
|
|
101
|
-
fields: TableFieldSchema[];
|
|
102
|
-
}
|
|
103
|
-
interface TableFieldSchema {
|
|
104
|
-
id: string;
|
|
105
|
-
label?: string;
|
|
106
|
-
type: TableFieldType;
|
|
107
|
-
}
|
|
108
|
-
declare type TableFieldType = 'text' | 'boolean' | 'number' | 'datetime' | 'unknown';
|
|
109
|
-
interface SingleRowResult<T = any> {
|
|
110
|
-
data: T;
|
|
111
|
-
schema?: TableSchema;
|
|
112
|
-
}
|
|
113
|
-
interface ManyRowsResult<T = any> {
|
|
114
|
-
data: T[];
|
|
115
|
-
total?: number;
|
|
116
|
-
schema?: TableSchema;
|
|
117
|
-
paginate?: Pagination;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
interface DataOp {
|
|
121
|
-
sourceId: string;
|
|
122
|
-
opId: string;
|
|
123
|
-
userArgs?: Record<string, any>;
|
|
124
|
-
cacheKey?: string;
|
|
125
|
-
invalidatedKeys?: string[];
|
|
126
|
-
}
|
|
127
|
-
declare function executePlasmicDataOp<T = any>(op: DataOp, opts?: {
|
|
128
|
-
userAuthToken?: string;
|
|
129
|
-
includeSchema?: boolean;
|
|
130
|
-
paginate?: Pagination;
|
|
131
|
-
}): Promise<T>;
|
|
132
|
-
|
|
133
|
-
declare function Fetcher(props: {
|
|
134
|
-
dataOp?: DataOp;
|
|
135
|
-
name?: string;
|
|
136
|
-
children?: React__default.ReactNode;
|
|
137
|
-
includeSchema?: boolean;
|
|
138
|
-
pageIndex?: number;
|
|
139
|
-
pageSize?: number;
|
|
140
|
-
}): JSX.Element;
|
|
141
|
-
|
|
142
|
-
declare function usePlasmicDataOp<T = any, E = any>(dataOp: DataOp | undefined, opts?: {
|
|
143
|
-
includeSchema?: boolean;
|
|
144
|
-
paginate?: Pagination;
|
|
145
|
-
}): SWRResponse<T, E>;
|
|
146
|
-
declare function usePlasmicDataMutationOp<T = any>(dataOp: DataOp | undefined, opts?: {
|
|
147
|
-
includeSchema?: boolean;
|
|
148
|
-
}): () => Promise<T | undefined>;
|
|
2
|
+
import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties, Key, ReactNode, ReactElement, FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent } from 'react';
|
|
149
3
|
|
|
150
4
|
// LICENSE is MIT
|
|
151
5
|
//
|
|
@@ -612,7 +466,7 @@ interface InputBase {
|
|
|
612
466
|
|
|
613
467
|
type SelectionMode = 'none' | 'single' | 'multiple';
|
|
614
468
|
type SelectionBehavior = 'toggle' | 'replace';
|
|
615
|
-
type Selection = 'all' | Set<Key
|
|
469
|
+
type Selection = 'all' | Set<Key>;
|
|
616
470
|
|
|
617
471
|
type FocusStrategy = 'first' | 'last';
|
|
618
472
|
type DisabledBehavior = 'selection' | 'all';
|
|
@@ -639,32 +493,32 @@ interface Collection<T> extends Iterable<T> {
|
|
|
639
493
|
readonly size: number,
|
|
640
494
|
|
|
641
495
|
/** Iterate over all keys in the collection. */
|
|
642
|
-
getKeys(): Iterable<Key
|
|
496
|
+
getKeys(): Iterable<Key>,
|
|
643
497
|
|
|
644
498
|
/** Get an item by its key. */
|
|
645
|
-
getItem(key: Key
|
|
499
|
+
getItem(key: Key): T,
|
|
646
500
|
|
|
647
501
|
/** Get an item by the index of its key. */
|
|
648
502
|
at(idx: number): T,
|
|
649
503
|
|
|
650
504
|
/** Get the key that comes before the given key in the collection. */
|
|
651
|
-
getKeyBefore(key: Key
|
|
505
|
+
getKeyBefore(key: Key): Key | null,
|
|
652
506
|
|
|
653
507
|
/** Get the key that comes after the given key in the collection. */
|
|
654
|
-
getKeyAfter(key: Key
|
|
508
|
+
getKeyAfter(key: Key): Key | null,
|
|
655
509
|
|
|
656
510
|
/** Get the first key in the collection. */
|
|
657
|
-
getFirstKey(): Key
|
|
511
|
+
getFirstKey(): Key | null,
|
|
658
512
|
|
|
659
513
|
/** Get the last key in the collection. */
|
|
660
|
-
getLastKey(): Key
|
|
514
|
+
getLastKey(): Key | null
|
|
661
515
|
}
|
|
662
516
|
|
|
663
517
|
interface Node<T> {
|
|
664
518
|
/** The type of item this node represents. */
|
|
665
519
|
type: string,
|
|
666
520
|
/** A unique key for the node. */
|
|
667
|
-
key: Key
|
|
521
|
+
key: Key,
|
|
668
522
|
/** The object value the node was created from. */
|
|
669
523
|
value: T,
|
|
670
524
|
/** The level of depth this node is at in the heirarchy. */
|
|
@@ -684,11 +538,11 @@ interface Node<T> {
|
|
|
684
538
|
/** A function that should be called to wrap the rendered node. */
|
|
685
539
|
wrapper?: (element: ReactElement) => ReactElement,
|
|
686
540
|
/** The key of the parent node. */
|
|
687
|
-
parentKey?: Key
|
|
541
|
+
parentKey?: Key,
|
|
688
542
|
/** The key of the node before this node. */
|
|
689
|
-
prevKey?: Key
|
|
543
|
+
prevKey?: Key,
|
|
690
544
|
/** The key of the node after this node. */
|
|
691
|
-
nextKey?: Key
|
|
545
|
+
nextKey?: Key,
|
|
692
546
|
/** Additional properties specific to a particular node type. */
|
|
693
547
|
props?: any,
|
|
694
548
|
/** @private */
|
|
@@ -1431,11 +1285,11 @@ interface FocusState {
|
|
|
1431
1285
|
/** Sets whether the collection is focused. */
|
|
1432
1286
|
setFocused(isFocused: boolean): void;
|
|
1433
1287
|
/** The current focused key in the collection. */
|
|
1434
|
-
readonly focusedKey: Key
|
|
1288
|
+
readonly focusedKey: Key;
|
|
1435
1289
|
/** Whether the first or last child of the focused key should receive focus. */
|
|
1436
1290
|
readonly childFocusStrategy: FocusStrategy;
|
|
1437
1291
|
/** Sets the focused key, and optionally, whether the first or last child of that key should receive focus. */
|
|
1438
|
-
setFocusedKey(key: Key
|
|
1292
|
+
setFocusedKey(key: Key, child?: FocusStrategy): void;
|
|
1439
1293
|
}
|
|
1440
1294
|
interface MultipleSelectionState extends FocusState {
|
|
1441
1295
|
/** The type of selection that is allowed in the collection. */
|
|
@@ -1451,7 +1305,7 @@ interface MultipleSelectionState extends FocusState {
|
|
|
1451
1305
|
/** Sets the selected keys in the collection. */
|
|
1452
1306
|
setSelectedKeys(keys: Selection): void;
|
|
1453
1307
|
/** The currently disabled keys in the collection. */
|
|
1454
|
-
readonly disabledKeys: Set<Key
|
|
1308
|
+
readonly disabledKeys: Set<Key>;
|
|
1455
1309
|
/** Whether `disabledKeys` applies to selection, actions, or both. */
|
|
1456
1310
|
readonly disabledBehavior: DisabledBehavior;
|
|
1457
1311
|
}
|
|
@@ -1463,31 +1317,31 @@ interface MultipleSelectionManager extends FocusState {
|
|
|
1463
1317
|
/** Whether the collection allows empty selection. */
|
|
1464
1318
|
readonly disallowEmptySelection?: boolean;
|
|
1465
1319
|
/** The currently selected keys in the collection. */
|
|
1466
|
-
readonly selectedKeys: Set<Key
|
|
1320
|
+
readonly selectedKeys: Set<Key>;
|
|
1467
1321
|
/** Whether the selection is empty. */
|
|
1468
1322
|
readonly isEmpty: boolean;
|
|
1469
1323
|
/** Whether all items in the collection are selected. */
|
|
1470
1324
|
readonly isSelectAll: boolean;
|
|
1471
1325
|
/** The first selected key in the collection. */
|
|
1472
|
-
readonly firstSelectedKey: Key
|
|
1326
|
+
readonly firstSelectedKey: Key | null;
|
|
1473
1327
|
/** The last selected key in the collection. */
|
|
1474
|
-
readonly lastSelectedKey: Key
|
|
1328
|
+
readonly lastSelectedKey: Key | null;
|
|
1475
1329
|
/** The currently disabled keys in the collection. */
|
|
1476
|
-
readonly disabledKeys: Set<Key
|
|
1330
|
+
readonly disabledKeys: Set<Key>;
|
|
1477
1331
|
/** Whether `disabledKeys` applies to selection, actions, or both. */
|
|
1478
1332
|
readonly disabledBehavior: DisabledBehavior;
|
|
1479
1333
|
/** Returns whether a key is selected. */
|
|
1480
|
-
isSelected(key: Key
|
|
1334
|
+
isSelected(key: Key): boolean;
|
|
1481
1335
|
/** Returns whether the current selection is equal to the given selection. */
|
|
1482
|
-
isSelectionEqual(selection: Set<Key
|
|
1336
|
+
isSelectionEqual(selection: Set<Key>): boolean;
|
|
1483
1337
|
/** Extends the selection to the given key. */
|
|
1484
|
-
extendSelection(toKey: Key
|
|
1338
|
+
extendSelection(toKey: Key): void;
|
|
1485
1339
|
/** Toggles whether the given key is selected. */
|
|
1486
|
-
toggleSelection(key: Key
|
|
1340
|
+
toggleSelection(key: Key): void;
|
|
1487
1341
|
/** Replaces the selection with only the given key. */
|
|
1488
|
-
replaceSelection(key: Key
|
|
1342
|
+
replaceSelection(key: Key): void;
|
|
1489
1343
|
/** Replaces the selection with the given keys. */
|
|
1490
|
-
setSelectedKeys(keys: Iterable<Key
|
|
1344
|
+
setSelectedKeys(keys: Iterable<Key>): void;
|
|
1491
1345
|
/** Selects all items in the collection. */
|
|
1492
1346
|
selectAll(): void;
|
|
1493
1347
|
/** Removes all keys from the selection. */
|
|
@@ -1498,11 +1352,11 @@ interface MultipleSelectionManager extends FocusState {
|
|
|
1498
1352
|
* Toggles, replaces, or extends selection to the given key depending
|
|
1499
1353
|
* on the pointer event and collection's selection mode.
|
|
1500
1354
|
*/
|
|
1501
|
-
select(key: Key
|
|
1355
|
+
select(key: Key, e?: PressEvent | LongPressEvent | PointerEvent): void;
|
|
1502
1356
|
/** Returns whether the given key can be selected. */
|
|
1503
|
-
canSelectItem(key: Key
|
|
1357
|
+
canSelectItem(key: Key): boolean;
|
|
1504
1358
|
/** Returns whether the given key is non-interactive, i.e. both selection and actions are disabled. */
|
|
1505
|
-
isDisabled(key: Key
|
|
1359
|
+
isDisabled(key: Key): boolean;
|
|
1506
1360
|
/** Sets the selection behavior for the collection. */
|
|
1507
1361
|
setSelectionBehavior(selectionBehavior: SelectionBehavior): void;
|
|
1508
1362
|
}
|
|
@@ -1541,17 +1395,17 @@ declare class SelectionManager implements MultipleSelectionManager {
|
|
|
1541
1395
|
/**
|
|
1542
1396
|
* The current focused key in the collection.
|
|
1543
1397
|
*/
|
|
1544
|
-
get focusedKey(): Key
|
|
1398
|
+
get focusedKey(): Key;
|
|
1545
1399
|
/** Whether the first or last child of the focused key should receive focus. */
|
|
1546
1400
|
get childFocusStrategy(): FocusStrategy;
|
|
1547
1401
|
/**
|
|
1548
1402
|
* Sets the focused key.
|
|
1549
1403
|
*/
|
|
1550
|
-
setFocusedKey(key: Key
|
|
1404
|
+
setFocusedKey(key: Key, childFocusStrategy?: FocusStrategy): void;
|
|
1551
1405
|
/**
|
|
1552
1406
|
* The currently selected keys in the collection.
|
|
1553
1407
|
*/
|
|
1554
|
-
get selectedKeys(): Set<Key
|
|
1408
|
+
get selectedKeys(): Set<Key>;
|
|
1555
1409
|
/**
|
|
1556
1410
|
* The raw selection value for the collection.
|
|
1557
1411
|
* Either 'all' for select all, or a set of keys.
|
|
@@ -1560,7 +1414,7 @@ declare class SelectionManager implements MultipleSelectionManager {
|
|
|
1560
1414
|
/**
|
|
1561
1415
|
* Returns whether a key is selected.
|
|
1562
1416
|
*/
|
|
1563
|
-
isSelected(key: Key
|
|
1417
|
+
isSelected(key: Key): boolean;
|
|
1564
1418
|
/**
|
|
1565
1419
|
* Whether the selection is empty.
|
|
1566
1420
|
*/
|
|
@@ -1569,26 +1423,26 @@ declare class SelectionManager implements MultipleSelectionManager {
|
|
|
1569
1423
|
* Whether all items in the collection are selected.
|
|
1570
1424
|
*/
|
|
1571
1425
|
get isSelectAll(): boolean;
|
|
1572
|
-
get firstSelectedKey(): Key
|
|
1573
|
-
get lastSelectedKey(): Key
|
|
1574
|
-
get disabledKeys(): Set<Key
|
|
1426
|
+
get firstSelectedKey(): Key | null;
|
|
1427
|
+
get lastSelectedKey(): Key | null;
|
|
1428
|
+
get disabledKeys(): Set<Key>;
|
|
1575
1429
|
get disabledBehavior(): DisabledBehavior;
|
|
1576
1430
|
/**
|
|
1577
1431
|
* Extends the selection to the given key.
|
|
1578
1432
|
*/
|
|
1579
|
-
extendSelection(toKey: Key
|
|
1433
|
+
extendSelection(toKey: Key): void;
|
|
1580
1434
|
/**
|
|
1581
1435
|
* Toggles whether the given key is selected.
|
|
1582
1436
|
*/
|
|
1583
|
-
toggleSelection(key: Key
|
|
1437
|
+
toggleSelection(key: Key): void;
|
|
1584
1438
|
/**
|
|
1585
1439
|
* Replaces the selection with only the given key.
|
|
1586
1440
|
*/
|
|
1587
|
-
replaceSelection(key: Key
|
|
1441
|
+
replaceSelection(key: Key): void;
|
|
1588
1442
|
/**
|
|
1589
1443
|
* Replaces the selection with the given keys.
|
|
1590
1444
|
*/
|
|
1591
|
-
setSelectedKeys(keys: Iterable<Key
|
|
1445
|
+
setSelectedKeys(keys: Iterable<Key>): void;
|
|
1592
1446
|
/**
|
|
1593
1447
|
* Selects all items in the collection.
|
|
1594
1448
|
*/
|
|
@@ -1601,20 +1455,20 @@ declare class SelectionManager implements MultipleSelectionManager {
|
|
|
1601
1455
|
* Toggles between select all and an empty selection.
|
|
1602
1456
|
*/
|
|
1603
1457
|
toggleSelectAll(): void;
|
|
1604
|
-
select(key: Key
|
|
1458
|
+
select(key: Key, e?: PressEvent | LongPressEvent | PointerEvent): void;
|
|
1605
1459
|
/**
|
|
1606
1460
|
* Returns whether the current selection is equal to the given selection.
|
|
1607
1461
|
*/
|
|
1608
|
-
isSelectionEqual(selection: Set<Key
|
|
1609
|
-
canSelectItem(key: Key
|
|
1610
|
-
isDisabled(key: Key
|
|
1462
|
+
isSelectionEqual(selection: Set<Key>): boolean;
|
|
1463
|
+
canSelectItem(key: Key): boolean;
|
|
1464
|
+
isDisabled(key: Key): boolean;
|
|
1611
1465
|
}
|
|
1612
1466
|
|
|
1613
1467
|
interface ListState<T> {
|
|
1614
1468
|
/** A collection of items in the list. */
|
|
1615
1469
|
collection: Collection<Node<T>>;
|
|
1616
1470
|
/** A set of items that are disabled. */
|
|
1617
|
-
disabledKeys: Set<Key
|
|
1471
|
+
disabledKeys: Set<Key>;
|
|
1618
1472
|
/** A selection manager to read and update multiple selection state. */
|
|
1619
1473
|
selectionManager: SelectionManager;
|
|
1620
1474
|
}
|
|
@@ -1783,4 +1637,4 @@ interface TriggeredOverlayContextValue {
|
|
|
1783
1637
|
}
|
|
1784
1638
|
declare const TriggeredOverlayContext: React.Context<TriggeredOverlayContextValue | undefined>;
|
|
1785
1639
|
|
|
1786
|
-
export { $State$1 as $State, BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue,
|
|
1640
|
+
export { $State$1 as $State, BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue, DropdownMenu, Flex, HTMLElementRefOf, HtmlAnchorOnlyProps, HtmlButtonOnlyProps, MenuButtonRef, MenuButtonRefValue, MenuRef, MenuRefValue, MultiChoiceArg, PlasmicDataSourceContextProvider, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicRootProvider, PlasmicSlot, SelectContext, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayContext, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateValueProp, dlv as get, getDataProps, hasVariant, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, set, setPlumeStrictMode, useButton, useCanvasDollarState, useCheckbox, useCurrentUser, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "@plasmicapp/data-sources";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@plasmicapp/host";
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@plasmicapp/query";
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
|
-
var dataSources = require('@plasmicapp/data-sources');
|
|
8
7
|
var classNames$1 = _interopDefault(require('classnames'));
|
|
9
8
|
var _get = _interopDefault(require('dlv'));
|
|
10
9
|
var React = require('react');
|
|
@@ -3730,36 +3729,6 @@ function useTriggeredOverlay(plasmicClass, props, config, outerRef, isDismissabl
|
|
|
3730
3729
|
};
|
|
3731
3730
|
}
|
|
3732
3731
|
|
|
3733
|
-
Object.defineProperty(exports, 'Fetcher', {
|
|
3734
|
-
enumerable: true,
|
|
3735
|
-
get: function () {
|
|
3736
|
-
return dataSources.Fetcher;
|
|
3737
|
-
}
|
|
3738
|
-
});
|
|
3739
|
-
Object.defineProperty(exports, 'executePlasmicDataOp', {
|
|
3740
|
-
enumerable: true,
|
|
3741
|
-
get: function () {
|
|
3742
|
-
return dataSources.executePlasmicDataOp;
|
|
3743
|
-
}
|
|
3744
|
-
});
|
|
3745
|
-
Object.defineProperty(exports, 'usePlasmicDataConfig', {
|
|
3746
|
-
enumerable: true,
|
|
3747
|
-
get: function () {
|
|
3748
|
-
return dataSources.usePlasmicDataConfig;
|
|
3749
|
-
}
|
|
3750
|
-
});
|
|
3751
|
-
Object.defineProperty(exports, 'usePlasmicDataMutationOp', {
|
|
3752
|
-
enumerable: true,
|
|
3753
|
-
get: function () {
|
|
3754
|
-
return dataSources.usePlasmicDataMutationOp;
|
|
3755
|
-
}
|
|
3756
|
-
});
|
|
3757
|
-
Object.defineProperty(exports, 'usePlasmicDataOp', {
|
|
3758
|
-
enumerable: true,
|
|
3759
|
-
get: function () {
|
|
3760
|
-
return dataSources.usePlasmicDataOp;
|
|
3761
|
-
}
|
|
3762
|
-
});
|
|
3763
3732
|
exports.get = _get;
|
|
3764
3733
|
Object.defineProperty(exports, 'PlasmicDataSourceContextProvider', {
|
|
3765
3734
|
enumerable: true,
|