@genesislcap/g2plot-chart 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.
@@ -1 +1 @@
1
- {"version":3,"file":"chart-datasource.d.ts","sourceRoot":"","sources":["../../../src/chart-datasource/chart-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,4BAA4B,CAAC;AAIrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAO5C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAQhD,cAAM,kBAAmB,SAAQ,cAAc;IAC7C,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC;IAC7B,SAAS,CAAC,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAC1C,SAAS,CAAC,yBAAyB,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAChE,SAAS,CAAC,gBAAgB,EAAE,MAAM,CAAC;IACnC,SAAS,CAAC,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAC1C,SAAS,CAAC,iBAAiB,UAAS;IACpC,SAAS,CAAC,OAAO,UAAQ;IAEzB,IAAI,sBAAsB,IAAI,MAAM,CAEnC;IAID,SAAS;IAMT,iBAAiB,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE;IAuCtC,mBAAmB,CAAC,YAAY,EAAE,GAAG,EAAE;IAQvC,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE;IAQtC,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE;CAUvC;;;;;;;kBAtCM,CAAC;;;;;;;;8BAgEL,CAAA,cAAc,CAAC;;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import { DatasourceDefaults } from '@genesislcap/foundation-comms';
3
3
  import { createLogger } from '@genesislcap/foundation-logger';
4
4
  import { BaseDatasource } from '@genesislcap/foundation-ui';
5
5
  import { LifecycleMixin } from '@genesislcap/foundation-utils';
6
- import { DOM, attr, customElement, observable } from '@microsoft/fast-element';
6
+ import { attr, customElement, observable } from '@microsoft/fast-element';
7
7
  import { chartDatasourceEventNames } from './chart-datasource.config';
8
8
  import { extractFields, getFormattedDateGroupBy, getReduced } from './chart-datasource.utils';
9
9
  const logger = createLogger('chart-datasource');
@@ -167,11 +167,9 @@ let ChartDatasource = class ChartDatasource extends LifecycleMixin(ConcreteDatas
167
167
  connectedCallback() {
168
168
  super.connectedCallback();
169
169
  const shouldRunConnect = this.shouldRunConnect;
170
- DOM.queueUpdate(() => {
171
- if (!shouldRunConnect)
172
- return;
173
- void this.initAndFetch();
174
- });
170
+ if (!shouldRunConnect)
171
+ return;
172
+ void this.initAndFetch();
175
173
  }
176
174
  initAndFetch() {
177
175
  return __awaiter(this, void 0, void 0, function* () {
@@ -199,12 +197,9 @@ let ChartDatasource = class ChartDatasource extends LifecycleMixin(ConcreteDatas
199
197
  });
200
198
  return;
201
199
  }
202
- // Subscribe first so we catch the case where isConnected is still false
203
- // when this runs (e.g. design-system-provider Connect not yet established).
200
+ // BehaviorSubject emits current value synchronously on subscribe, so this
201
+ // handles both: already-connected at mount and connection established later.
204
202
  this.subscribeToConnection();
205
- if (this.chart && this.resourceName && this.connect.isConnected) {
206
- this.fetchGenesisData(false);
207
- }
208
203
  });
209
204
  }
210
205
  subscribeToConnection() {
package/dist/esm/chart.js CHANGED
@@ -172,10 +172,7 @@ export class G2PlotChart extends LifecycleMixin(FoundationElement) {
172
172
  this.removeEventListener(key, action);
173
173
  });
174
174
  DOM.queueUpdate(() => {
175
- // Skip destroy if the element reconnected before this deferred callback ran
176
- // (e.g. a dockview panel move). The new connectedCallback already created a
177
- // fresh G2Plot instance; destroying it here would leave the chart dead.
178
- if (!shouldRunDisconnect || this.isConnected)
175
+ if (!shouldRunDisconnect)
179
176
  return;
180
177
  if (this.chart) {
181
178
  this.chart.off('*', this.eventHandler);
package/dist/react.cjs CHANGED
@@ -5,23 +5,51 @@
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 { ChartDatasource: ChartDatasourceWC } = require('./esm/chart-datasource/chart-datasource.js');
11
10
  const { G2PlotChart: G2PlotChartWC } = require('./esm/chart.js');
12
11
 
13
- const { wrap } = provideReactWrapper(React);
12
+ function _mergeRefs(...refs) {
13
+ return (value) => {
14
+ for (const ref of refs) {
15
+ if (typeof ref === 'function') ref(value);
16
+ else if (ref != null) ref.current = value;
17
+ }
18
+ };
19
+ }
14
20
 
15
- const G2PlotChart = wrap(G2PlotChartWC, {
16
- events: {
17
- onChangeTitle: 'change-title',
18
- },
21
+ const G2PlotChart = React.forwardRef(function G2PlotChart(props, ref) {
22
+ const { onChangeTitle, children, ...rest } = props;
23
+ const _innerRef = React.useRef(null);
24
+ const _onChangeTitleRef = React.useRef(onChangeTitle);
25
+ _onChangeTitleRef.current = onChangeTitle;
26
+ React.useLayoutEffect(() => {
27
+ const el = _innerRef.current;
28
+ if (!el) return;
29
+ const _onChangeTitleFn = (e) => _onChangeTitleRef.current?.(e);
30
+ el.addEventListener('change-title', _onChangeTitleFn);
31
+ return () => {
32
+ el.removeEventListener('change-title', _onChangeTitleFn);
33
+ };
34
+ }, []);
35
+ return React.createElement(customElements.getName(G2PlotChartWC) ?? '%%prefix%%-g2plot-chart', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
19
36
  });
20
37
 
21
- const ChartDatasource = wrap(ChartDatasourceWC, {
22
- events: {
23
- onDatasourceError: 'datasource-error',
24
- },
38
+ const ChartDatasource = React.forwardRef(function ChartDatasource(props, ref) {
39
+ const { onDatasourceError, children, ...rest } = props;
40
+ const _innerRef = React.useRef(null);
41
+ const _onDatasourceErrorRef = React.useRef(onDatasourceError);
42
+ _onDatasourceErrorRef.current = onDatasourceError;
43
+ React.useLayoutEffect(() => {
44
+ const el = _innerRef.current;
45
+ if (!el) return;
46
+ const _onDatasourceErrorFn = (e) => _onDatasourceErrorRef.current?.(e);
47
+ el.addEventListener('datasource-error', _onDatasourceErrorFn);
48
+ return () => {
49
+ el.removeEventListener('datasource-error', _onDatasourceErrorFn);
50
+ };
51
+ }, []);
52
+ return React.createElement(customElements.getName(ChartDatasourceWC) ?? 'chart-datasource', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
25
53
  });
26
54
 
27
55
  module.exports = {
package/dist/react.mjs CHANGED
@@ -3,21 +3,49 @@
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 { ChartDatasource as ChartDatasourceWC } from './esm/chart-datasource/chart-datasource.js';
9
8
  import { G2PlotChart as G2PlotChartWC } from './esm/chart.js';
10
9
 
11
- const { wrap } = provideReactWrapper(React);
10
+ function _mergeRefs(...refs) {
11
+ return (value) => {
12
+ for (const ref of refs) {
13
+ if (typeof ref === 'function') ref(value);
14
+ else if (ref != null) ref.current = value;
15
+ }
16
+ };
17
+ }
12
18
 
13
- export const G2PlotChart = wrap(G2PlotChartWC, {
14
- events: {
15
- onChangeTitle: 'change-title',
16
- },
19
+ export const G2PlotChart = React.forwardRef(function G2PlotChart(props, ref) {
20
+ const { onChangeTitle, children, ...rest } = props;
21
+ const _innerRef = React.useRef(null);
22
+ const _onChangeTitleRef = React.useRef(onChangeTitle);
23
+ _onChangeTitleRef.current = onChangeTitle;
24
+ React.useLayoutEffect(() => {
25
+ const el = _innerRef.current;
26
+ if (!el) return;
27
+ const _onChangeTitleFn = (e) => _onChangeTitleRef.current?.(e);
28
+ el.addEventListener('change-title', _onChangeTitleFn);
29
+ return () => {
30
+ el.removeEventListener('change-title', _onChangeTitleFn);
31
+ };
32
+ }, []);
33
+ return React.createElement(customElements.getName(G2PlotChartWC) ?? '%%prefix%%-g2plot-chart', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
17
34
  });
18
35
 
19
- export const ChartDatasource = wrap(ChartDatasourceWC, {
20
- events: {
21
- onDatasourceError: 'datasource-error',
22
- },
36
+ export const ChartDatasource = React.forwardRef(function ChartDatasource(props, ref) {
37
+ const { onDatasourceError, children, ...rest } = props;
38
+ const _innerRef = React.useRef(null);
39
+ const _onDatasourceErrorRef = React.useRef(onDatasourceError);
40
+ _onDatasourceErrorRef.current = onDatasourceError;
41
+ React.useLayoutEffect(() => {
42
+ const el = _innerRef.current;
43
+ if (!el) return;
44
+ const _onDatasourceErrorFn = (e) => _onDatasourceErrorRef.current?.(e);
45
+ el.addEventListener('datasource-error', _onDatasourceErrorFn);
46
+ return () => {
47
+ el.removeEventListener('datasource-error', _onDatasourceErrorFn);
48
+ };
49
+ }, []);
50
+ return React.createElement(customElements.getName(ChartDatasourceWC) ?? 'chart-datasource', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
23
51
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/g2plot-chart",
3
3
  "description": "Genesis G2plot Chart",
4
- "version": "14.424.1-alpha-cfc2887.0",
4
+ "version": "14.425.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -53,21 +53,21 @@
53
53
  }
54
54
  },
55
55
  "devDependencies": {
56
- "@genesislcap/foundation-testing": "14.424.1-alpha-cfc2887.0",
57
- "@genesislcap/genx": "14.424.1-alpha-cfc2887.0",
58
- "@genesislcap/rollup-builder": "14.424.1-alpha-cfc2887.0",
59
- "@genesislcap/ts-builder": "14.424.1-alpha-cfc2887.0",
60
- "@genesislcap/uvu-playwright-builder": "14.424.1-alpha-cfc2887.0",
61
- "@genesislcap/vite-builder": "14.424.1-alpha-cfc2887.0",
62
- "@genesislcap/webpack-builder": "14.424.1-alpha-cfc2887.0"
56
+ "@genesislcap/foundation-testing": "14.425.0",
57
+ "@genesislcap/genx": "14.425.0",
58
+ "@genesislcap/rollup-builder": "14.425.0",
59
+ "@genesislcap/ts-builder": "14.425.0",
60
+ "@genesislcap/uvu-playwright-builder": "14.425.0",
61
+ "@genesislcap/vite-builder": "14.425.0",
62
+ "@genesislcap/webpack-builder": "14.425.0"
63
63
  },
64
64
  "dependencies": {
65
65
  "@antv/g2plot": "^2.4.32",
66
- "@genesislcap/foundation-comms": "14.424.1-alpha-cfc2887.0",
67
- "@genesislcap/foundation-logger": "14.424.1-alpha-cfc2887.0",
68
- "@genesislcap/foundation-ui": "14.424.1-alpha-cfc2887.0",
69
- "@genesislcap/foundation-utils": "14.424.1-alpha-cfc2887.0",
70
- "@genesislcap/foundation-zero": "14.424.1-alpha-cfc2887.0",
66
+ "@genesislcap/foundation-comms": "14.425.0",
67
+ "@genesislcap/foundation-logger": "14.425.0",
68
+ "@genesislcap/foundation-ui": "14.425.0",
69
+ "@genesislcap/foundation-utils": "14.425.0",
70
+ "@genesislcap/foundation-zero": "14.425.0",
71
71
  "@microsoft/fast-element": "1.14.0",
72
72
  "@microsoft/fast-foundation": "2.50.0"
73
73
  },
@@ -91,8 +91,5 @@
91
91
  "require": "./dist/react.cjs"
92
92
  }
93
93
  },
94
- "peerDependencies": {
95
- "@microsoft/fast-react-wrapper": ">=0.3.0"
96
- },
97
- "gitHead": "0460a55fc4d9bde4d0e6e11db51125a371bf5b4d"
94
+ "gitHead": "c49bb94fbc3a74e84f18c7445398af116e1a58bb"
98
95
  }