@genesislcap/foundation-zero-grid-tabulator 14.424.1-alpha-cfc2887.0 → 14.425.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.
@@ -1667,57 +1667,6 @@
1667
1667
  }
1668
1668
  ]
1669
1669
  },
1670
- {
1671
- "kind": "javascript-module",
1672
- "path": "src/utils/index.ts",
1673
- "declarations": [],
1674
- "exports": [
1675
- {
1676
- "kind": "js",
1677
- "name": "*",
1678
- "declaration": {
1679
- "name": "*",
1680
- "package": "./init-grid"
1681
- }
1682
- }
1683
- ]
1684
- },
1685
- {
1686
- "kind": "javascript-module",
1687
- "path": "src/utils/init-grid.ts",
1688
- "declarations": [
1689
- {
1690
- "kind": "function",
1691
- "name": "initZeroGridTabulator",
1692
- "return": {
1693
- "type": {
1694
- "text": ""
1695
- }
1696
- },
1697
- "parameters": [
1698
- {
1699
- "name": "options",
1700
- "default": "{}",
1701
- "type": {
1702
- "text": "Options"
1703
- },
1704
- "description": "The tabulator options"
1705
- }
1706
- ],
1707
- "description": "Initialize a Zero Grid Tabulator with Zero-specific formatters"
1708
- }
1709
- ],
1710
- "exports": [
1711
- {
1712
- "kind": "js",
1713
- "name": "initZeroGridTabulator",
1714
- "declaration": {
1715
- "name": "initZeroGridTabulator",
1716
- "module": "src/utils/init-grid.ts"
1717
- }
1718
- }
1719
- ]
1720
- },
1721
1670
  {
1722
1671
  "kind": "javascript-module",
1723
1672
  "path": "src/themes/genesis-rapid/theme-genesis-rapid-css.ts",
@@ -1820,6 +1769,57 @@
1820
1769
  }
1821
1770
  }
1822
1771
  ]
1772
+ },
1773
+ {
1774
+ "kind": "javascript-module",
1775
+ "path": "src/utils/index.ts",
1776
+ "declarations": [],
1777
+ "exports": [
1778
+ {
1779
+ "kind": "js",
1780
+ "name": "*",
1781
+ "declaration": {
1782
+ "name": "*",
1783
+ "package": "./init-grid"
1784
+ }
1785
+ }
1786
+ ]
1787
+ },
1788
+ {
1789
+ "kind": "javascript-module",
1790
+ "path": "src/utils/init-grid.ts",
1791
+ "declarations": [
1792
+ {
1793
+ "kind": "function",
1794
+ "name": "initZeroGridTabulator",
1795
+ "return": {
1796
+ "type": {
1797
+ "text": ""
1798
+ }
1799
+ },
1800
+ "parameters": [
1801
+ {
1802
+ "name": "options",
1803
+ "default": "{}",
1804
+ "type": {
1805
+ "text": "Options"
1806
+ },
1807
+ "description": "The tabulator options"
1808
+ }
1809
+ ],
1810
+ "description": "Initialize a Zero Grid Tabulator with Zero-specific formatters"
1811
+ }
1812
+ ],
1813
+ "exports": [
1814
+ {
1815
+ "kind": "js",
1816
+ "name": "initZeroGridTabulator",
1817
+ "declaration": {
1818
+ "name": "initZeroGridTabulator",
1819
+ "module": "src/utils/init-grid.ts"
1820
+ }
1821
+ }
1822
+ ]
1823
1823
  }
1824
1824
  ]
1825
1825
  }
package/dist/react.cjs CHANGED
@@ -5,16 +5,33 @@
5
5
 
6
6
  'use strict';
7
7
 
8
- const { provideReactWrapper } = require('@microsoft/fast-react-wrapper');
9
8
  const React = require('react');
10
9
  const { ZeroGridTabulator: ZeroGridTabulatorWC } = require('./esm/grid-tabulator.js');
11
10
 
12
- const { wrap } = provideReactWrapper(React);
11
+ function _mergeRefs(...refs) {
12
+ return (value) => {
13
+ for (const ref of refs) {
14
+ if (typeof ref === 'function') ref(value);
15
+ else if (ref != null) ref.current = value;
16
+ }
17
+ };
18
+ }
13
19
 
14
- const ZeroGridTabulator = wrap(ZeroGridTabulatorWC, {
15
- events: {
16
- onGridReady: 'gridReady',
17
- },
20
+ const ZeroGridTabulator = React.forwardRef(function ZeroGridTabulator(props, ref) {
21
+ const { onGridReady, children, ...rest } = props;
22
+ const _innerRef = React.useRef(null);
23
+ const _onGridReadyRef = React.useRef(onGridReady);
24
+ _onGridReadyRef.current = onGridReady;
25
+ React.useLayoutEffect(() => {
26
+ const el = _innerRef.current;
27
+ if (!el) return;
28
+ const _onGridReadyFn = (e) => _onGridReadyRef.current?.(e);
29
+ el.addEventListener('gridReady', _onGridReadyFn);
30
+ return () => {
31
+ el.removeEventListener('gridReady', _onGridReadyFn);
32
+ };
33
+ }, []);
34
+ return React.createElement(customElements.getName(ZeroGridTabulatorWC) ?? '%%prefix%%-grid-tabulator', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
18
35
  });
19
36
 
20
37
  module.exports = {
package/dist/react.mjs CHANGED
@@ -3,14 +3,31 @@
3
3
  * Generated from custom-elements manifest.
4
4
  */
5
5
 
6
- import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
7
6
  import React from 'react';
8
7
  import { ZeroGridTabulator as ZeroGridTabulatorWC } from './esm/grid-tabulator.js';
9
8
 
10
- const { wrap } = provideReactWrapper(React);
9
+ function _mergeRefs(...refs) {
10
+ return (value) => {
11
+ for (const ref of refs) {
12
+ if (typeof ref === 'function') ref(value);
13
+ else if (ref != null) ref.current = value;
14
+ }
15
+ };
16
+ }
11
17
 
12
- export const ZeroGridTabulator = wrap(ZeroGridTabulatorWC, {
13
- events: {
14
- onGridReady: 'gridReady',
15
- },
18
+ export const ZeroGridTabulator = React.forwardRef(function ZeroGridTabulator(props, ref) {
19
+ const { onGridReady, children, ...rest } = props;
20
+ const _innerRef = React.useRef(null);
21
+ const _onGridReadyRef = React.useRef(onGridReady);
22
+ _onGridReadyRef.current = onGridReady;
23
+ React.useLayoutEffect(() => {
24
+ const el = _innerRef.current;
25
+ if (!el) return;
26
+ const _onGridReadyFn = (e) => _onGridReadyRef.current?.(e);
27
+ el.addEventListener('gridReady', _onGridReadyFn);
28
+ return () => {
29
+ el.removeEventListener('gridReady', _onGridReadyFn);
30
+ };
31
+ }, []);
32
+ return React.createElement(customElements.getName(ZeroGridTabulatorWC) ?? '%%prefix%%-grid-tabulator', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
16
33
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-zero-grid-tabulator",
3
3
  "description": "Genesis Foundation Zero Grid Tabulator",
4
- "version": "14.424.1-alpha-cfc2887.0",
4
+ "version": "14.425.0",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "license": "SEE LICENSE IN license.txt",
@@ -35,19 +35,19 @@
35
35
  }
36
36
  },
37
37
  "devDependencies": {
38
- "@genesislcap/genx": "14.424.1-alpha-cfc2887.0",
39
- "@genesislcap/rollup-builder": "14.424.1-alpha-cfc2887.0",
40
- "@genesislcap/ts-builder": "14.424.1-alpha-cfc2887.0",
41
- "@genesislcap/uvu-playwright-builder": "14.424.1-alpha-cfc2887.0",
42
- "@genesislcap/vite-builder": "14.424.1-alpha-cfc2887.0",
43
- "@genesislcap/webpack-builder": "14.424.1-alpha-cfc2887.0"
38
+ "@genesislcap/genx": "14.425.0",
39
+ "@genesislcap/rollup-builder": "14.425.0",
40
+ "@genesislcap/ts-builder": "14.425.0",
41
+ "@genesislcap/uvu-playwright-builder": "14.425.0",
42
+ "@genesislcap/vite-builder": "14.425.0",
43
+ "@genesislcap/webpack-builder": "14.425.0"
44
44
  },
45
45
  "dependencies": {
46
- "@genesislcap/foundation-comms": "14.424.1-alpha-cfc2887.0",
47
- "@genesislcap/foundation-ui": "14.424.1-alpha-cfc2887.0",
48
- "@genesislcap/foundation-utils": "14.424.1-alpha-cfc2887.0",
49
- "@genesislcap/foundation-zero": "14.424.1-alpha-cfc2887.0",
50
- "@genesislcap/grid-tabulator": "14.424.1-alpha-cfc2887.0",
46
+ "@genesislcap/foundation-comms": "14.425.0",
47
+ "@genesislcap/foundation-ui": "14.425.0",
48
+ "@genesislcap/foundation-utils": "14.425.0",
49
+ "@genesislcap/foundation-zero": "14.425.0",
50
+ "@genesislcap/grid-tabulator": "14.425.0",
51
51
  "@microsoft/fast-colors": "5.3.1",
52
52
  "@microsoft/fast-components": "2.30.6",
53
53
  "@microsoft/fast-element": "1.14.0",
@@ -66,5 +66,5 @@
66
66
  "access": "public"
67
67
  },
68
68
  "customElements": "dist/custom-elements.json",
69
- "gitHead": "0460a55fc4d9bde4d0e6e11db51125a371bf5b4d"
69
+ "gitHead": "c49bb94fbc3a74e84f18c7445398af116e1a58bb"
70
70
  }