@ni/nimble-react 0.9.0 → 0.10.0
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/esm/dialog/index.d.ts +8 -2
- package/dist/esm/dialog/index.js +7 -0
- package/dist/esm/dialog/index.js.map +1 -1
- package/dist/esm/drawer/index.d.ts +8 -2
- package/dist/esm/drawer/index.js +7 -0
- package/dist/esm/drawer/index.js.map +1 -1
- package/dist/esm/table/index.d.ts +8 -2
- package/dist/esm/table/index.js +7 -0
- package/dist/esm/table/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { Dialog, UserDismissed as DialogUserDismissed } from '@ni/nimble-components/dist/esm/dialog';
|
|
2
|
-
import type {
|
|
2
|
+
import type { RefAttributes, RefObject } from 'react';
|
|
3
3
|
export { type Dialog, DialogUserDismissed };
|
|
4
4
|
export declare const NimbleDialog: import("@lit/react").ReactWebComponent<Dialog<void>, {}>;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Helper to assign Dialog refs with generics to ref bindings
|
|
7
|
+
* See: https://github.com/ni/nimble/issues/2784
|
|
8
|
+
* @param dialogRef A ref to a dialog created with `useRef`
|
|
9
|
+
* @returns A ref type compatible with normal `ref` bindings
|
|
10
|
+
*/
|
|
11
|
+
export declare const fromDialogRef: <T>(dialogRef: RefObject<Dialog<T> | null>) => RefAttributes<Dialog>["ref"];
|
package/dist/esm/dialog/index.js
CHANGED
|
@@ -2,4 +2,11 @@ import { Dialog, UserDismissed as DialogUserDismissed } from '@ni/nimble-compone
|
|
|
2
2
|
import { wrap } from '../utilities/react-wrapper';
|
|
3
3
|
export { DialogUserDismissed };
|
|
4
4
|
export const NimbleDialog = wrap(Dialog);
|
|
5
|
+
/**
|
|
6
|
+
* Helper to assign Dialog refs with generics to ref bindings
|
|
7
|
+
* See: https://github.com/ni/nimble/issues/2784
|
|
8
|
+
* @param dialogRef A ref to a dialog created with `useRef`
|
|
9
|
+
* @returns A ref type compatible with normal `ref` bindings
|
|
10
|
+
*/
|
|
11
|
+
export const fromDialogRef = (dialogRef) => dialogRef;
|
|
5
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAErG,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,EAAe,mBAAmB,EAAE,CAAC;AAC5C,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { Dialog, UserDismissed as DialogUserDismissed } from '@ni/nimble-components/dist/esm/dialog';\nimport type {
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAErG,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,EAAe,mBAAmB,EAAE,CAAC;AAC5C,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,SAAsC,EAAgC,EAAE,CAAC,SAAyC,CAAC","sourcesContent":["import { Dialog, UserDismissed as DialogUserDismissed } from '@ni/nimble-components/dist/esm/dialog';\nimport type { RefAttributes, RefObject } from 'react';\nimport { wrap } from '../utilities/react-wrapper';\n\nexport { type Dialog, DialogUserDismissed };\nexport const NimbleDialog = wrap(Dialog);\n\n/**\n * Helper to assign Dialog refs with generics to ref bindings\n * See: https://github.com/ni/nimble/issues/2784\n * @param dialogRef A ref to a dialog created with `useRef`\n * @returns A ref type compatible with normal `ref` bindings\n */\nexport const fromDialogRef = <T>(dialogRef: RefObject<Dialog<T> | null>): RefAttributes<Dialog>['ref'] => dialogRef as RefAttributes<Dialog>['ref'];\n"]}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Drawer, UserDismissed as DrawerUserDismissed } from '@ni/nimble-components/dist/esm/drawer';
|
|
2
2
|
import { DrawerLocation } from '@ni/nimble-components/dist/esm/drawer/types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RefAttributes, RefObject } from 'react';
|
|
4
4
|
export { type Drawer, DrawerUserDismissed, DrawerLocation };
|
|
5
5
|
export declare const NimbleDrawer: import("@lit/react").ReactWebComponent<Drawer<void>, {}>;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Helper to assign Drawer refs with generics to ref bindings
|
|
8
|
+
* See: https://github.com/ni/nimble/issues/2784
|
|
9
|
+
* @param drawerRef A ref to a drawer created with `useRef`
|
|
10
|
+
* @returns A ref type compatible with normal `ref` bindings
|
|
11
|
+
*/
|
|
12
|
+
export declare const fromDrawerRef: <T>(drawerRef: RefObject<Drawer<T> | null>) => RefAttributes<Drawer>["ref"];
|
package/dist/esm/drawer/index.js
CHANGED
|
@@ -3,4 +3,11 @@ import { DrawerLocation } from '@ni/nimble-components/dist/esm/drawer/types';
|
|
|
3
3
|
import { wrap } from '../utilities/react-wrapper';
|
|
4
4
|
export { DrawerUserDismissed, DrawerLocation };
|
|
5
5
|
export const NimbleDrawer = wrap(Drawer);
|
|
6
|
+
/**
|
|
7
|
+
* Helper to assign Drawer refs with generics to ref bindings
|
|
8
|
+
* See: https://github.com/ni/nimble/issues/2784
|
|
9
|
+
* @param drawerRef A ref to a drawer created with `useRef`
|
|
10
|
+
* @returns A ref type compatible with normal `ref` bindings
|
|
11
|
+
*/
|
|
12
|
+
export const fromDrawerRef = (drawerRef) => drawerRef;
|
|
6
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,EAAe,mBAAmB,EAAE,cAAc,EAAE,CAAC;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { Drawer, UserDismissed as DrawerUserDismissed } from '@ni/nimble-components/dist/esm/drawer';\nimport { DrawerLocation } from '@ni/nimble-components/dist/esm/drawer/types';\nimport type {
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,EAAe,mBAAmB,EAAE,cAAc,EAAE,CAAC;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,SAAsC,EAAgC,EAAE,CAAC,SAAyC,CAAC","sourcesContent":["import { Drawer, UserDismissed as DrawerUserDismissed } from '@ni/nimble-components/dist/esm/drawer';\nimport { DrawerLocation } from '@ni/nimble-components/dist/esm/drawer/types';\nimport type { RefAttributes, RefObject } from 'react';\nimport { wrap } from '../utilities/react-wrapper';\n\nexport { type Drawer, DrawerUserDismissed, DrawerLocation };\nexport const NimbleDrawer = wrap(Drawer);\n\n/**\n * Helper to assign Drawer refs with generics to ref bindings\n * See: https://github.com/ni/nimble/issues/2784\n * @param drawerRef A ref to a drawer created with `useRef`\n * @returns A ref type compatible with normal `ref` bindings\n */\nexport const fromDrawerRef = <T>(drawerRef: RefObject<Drawer<T> | null>): RefAttributes<Drawer>['ref'] => drawerRef as RefAttributes<Drawer>['ref'];\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table } from '@ni/nimble-components/dist/esm/table';
|
|
2
2
|
import type { TableActionMenuToggleEventDetail, TableRowExpansionToggleEventDetail, TableColumnConfigurationChangeEventDetail, TableRowSelectionEventDetail, TableRecord, TableSetRecordHierarchyOptions } from '@ni/nimble-components/dist/esm/table/types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RefAttributes, RefObject } from 'react';
|
|
4
4
|
import { type EventName } from '../utilities/react-wrapper';
|
|
5
5
|
export { type Table, type TableRecord, type TableSetRecordHierarchyOptions };
|
|
6
6
|
export declare const NimbleTable: import("@lit/react").ReactWebComponent<Table<TableRecord>, {
|
|
@@ -25,4 +25,10 @@ export interface TableColumnConfigurationChangeEvent extends CustomEvent<TableCo
|
|
|
25
25
|
export interface TableRowExpandToggleEvent extends CustomEvent<TableRowExpansionToggleEventDetail> {
|
|
26
26
|
target: Table;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Helper to assign Table refs with generics to ref bindings
|
|
30
|
+
* See: https://github.com/ni/nimble/issues/2784
|
|
31
|
+
* @param tableRef A ref to a table created with `useRef`
|
|
32
|
+
* @returns A ref type compatible with normal `ref` bindings
|
|
33
|
+
*/
|
|
34
|
+
export declare const fromTableRef: <T extends TableRecord>(tableRef: RefObject<Table<T> | null>) => RefAttributes<Table>["ref"];
|
package/dist/esm/table/index.js
CHANGED
|
@@ -10,4 +10,11 @@ export const NimbleTable = wrap(Table, {
|
|
|
10
10
|
onRowExpandToggle: 'row-expand-toggle',
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
+
/**
|
|
14
|
+
* Helper to assign Table refs with generics to ref bindings
|
|
15
|
+
* See: https://github.com/ni/nimble/issues/2784
|
|
16
|
+
* @param tableRef A ref to a table created with `useRef`
|
|
17
|
+
* @returns A ref type compatible with normal `ref` bindings
|
|
18
|
+
*/
|
|
19
|
+
export const fromTableRef = (tableRef) => tableRef;
|
|
13
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAU7D,OAAO,EAAE,IAAI,EAAkB,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAqE,CAAC;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE;IACnC,MAAM,EAAE;QACJ,wBAAwB,EAAE,0BAAyE;QACnG,kBAAkB,EAAE,oBAA6D;QACjF,iBAAiB,EAAE,kBAA0D;QAC7E,2BAA2B,EAAE,6BAA+E;QAC5G,iBAAiB,EAAE,mBAA2D;KACjF;CACJ,CAAC,CAAC","sourcesContent":["import { Table } from '@ni/nimble-components/dist/esm/table';\nimport type {\n TableActionMenuToggleEventDetail,\n TableRowExpansionToggleEventDetail,\n TableColumnConfigurationChangeEventDetail,\n TableRowSelectionEventDetail,\n TableRecord,\n TableSetRecordHierarchyOptions\n} from '@ni/nimble-components/dist/esm/table/types';\nimport type {
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAU7D,OAAO,EAAE,IAAI,EAAkB,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAqE,CAAC;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE;IACnC,MAAM,EAAE;QACJ,wBAAwB,EAAE,0BAAyE;QACnG,kBAAkB,EAAE,oBAA6D;QACjF,iBAAiB,EAAE,kBAA0D;QAC7E,2BAA2B,EAAE,6BAA+E;QAC5G,iBAAiB,EAAE,mBAA2D;KACjF;CACJ,CAAC,CAAC;AAiBH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAwB,QAAoC,EAA+B,EAAE,CAAC,QAAuC,CAAC","sourcesContent":["import { Table } from '@ni/nimble-components/dist/esm/table';\nimport type {\n TableActionMenuToggleEventDetail,\n TableRowExpansionToggleEventDetail,\n TableColumnConfigurationChangeEventDetail,\n TableRowSelectionEventDetail,\n TableRecord,\n TableSetRecordHierarchyOptions\n} from '@ni/nimble-components/dist/esm/table/types';\nimport type { RefAttributes, RefObject } from 'react';\nimport { wrap, type EventName } from '../utilities/react-wrapper';\n\nexport { type Table, type TableRecord, type TableSetRecordHierarchyOptions };\nexport const NimbleTable = wrap(Table, {\n events: {\n onActionMenuBeforeToggle: 'action-menu-beforetoggle' as EventName<TableActionMenuBeforeToggleEvent>,\n onActionMenuToggle: 'action-menu-toggle' as EventName<TableActionMenuToggleEvent>,\n onSelectionChange: 'selection-change' as EventName<TableSelectionChangeEvent>,\n onColumnConfigurationChange: 'column-configuration-change' as EventName<TableColumnConfigurationChangeEvent>,\n onRowExpandToggle: 'row-expand-toggle' as EventName<TableRowExpandToggleEvent>,\n }\n});\nexport interface TableActionMenuBeforeToggleEvent extends CustomEvent<TableActionMenuToggleEventDetail> {\n target: Table;\n}\nexport interface TableActionMenuToggleEvent extends CustomEvent<TableActionMenuToggleEventDetail> {\n target: Table;\n}\nexport interface TableSelectionChangeEvent extends CustomEvent<TableRowSelectionEventDetail> {\n target: Table;\n}\nexport interface TableColumnConfigurationChangeEvent extends CustomEvent<TableColumnConfigurationChangeEventDetail> {\n target: Table;\n}\nexport interface TableRowExpandToggleEvent extends CustomEvent<TableRowExpansionToggleEventDetail> {\n target: Table;\n}\n\n/**\n * Helper to assign Table refs with generics to ref bindings\n * See: https://github.com/ni/nimble/issues/2784\n * @param tableRef A ref to a table created with `useRef`\n * @returns A ref type compatible with normal `ref` bindings\n */\nexport const fromTableRef = <T extends TableRecord>(tableRef: RefObject<Table<T> | null>): RefAttributes<Table>['ref'] => tableRef as RefAttributes<Table>['ref'];\n"]}
|