Browse Source

fix some problems

pull/10082/head
Mehmet Erim 5 years ago
parent
commit
1edbe4b501
  1. 4
      npm/ng-packs/packages/components/chart.js/src/chart.component.ts
  2. 3
      npm/ng-packs/packages/theme-shared/src/lib/tokens/append-content.token.ts
  3. 1079
      npm/ng-packs/yarn.lock

4
npm/ng-packs/packages/components/chart.js/src/chart.component.ts

@ -9,7 +9,7 @@ import {
OnChanges,
OnDestroy,
Output,
SimpleChanges,
SimpleChanges
} from '@angular/core';
let Chart: any;
@ -135,6 +135,8 @@ export class ChartComponent implements AfterViewInit, OnDestroy, OnChanges {
}
ngOnChanges(changes: SimpleChanges) {
if (!this.chart) return;
if (changes.data?.currentValue || changes.options?.currentValue) {
this.chart.destroy();
this.initChart();

3
npm/ng-packs/packages/theme-shared/src/lib/tokens/append-content.token.ts

@ -1,7 +1,6 @@
import { CONTENT_STRATEGY, DomInsertionService } from '@abp/ng.core';
import { inject, InjectionToken } from '@angular/core';
import styles from '../constants/styles';
import { chartJsLoaded$ } from '../utils/widget-utils';
export const THEME_SHARED_APPEND_CONTENT = new InjectionToken<void>('THEME_SHARED_APPEND_CONTENT', {
providedIn: 'root',
@ -9,7 +8,5 @@ export const THEME_SHARED_APPEND_CONTENT = new InjectionToken<void>('THEME_SHARE
const domInsertion: DomInsertionService = inject(DomInsertionService);
domInsertion.insertContent(CONTENT_STRATEGY.AppendStyleToHead(styles));
import('chart.js').then(() => chartJsLoaded$.next(true));
},
});

1079
npm/ng-packs/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save