@resolveio/client-lib-core 0.1.1 → 1.0.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.
@@ -29,7 +29,6 @@ import * as i5 from 'ngx-file-drop';
29
29
  import { NgxFileDropModule } from 'ngx-file-drop';
30
30
  import * as i6$1 from 'ngx-doc-viewer';
31
31
  import { NgxDocViewerModule } from 'ngx-doc-viewer';
32
- import { Chart } from '@resolveio/chartjs';
33
32
 
34
33
  class CoreService {
35
34
  // customHomePage = new BehaviorSubject(false);
@@ -6663,10 +6662,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6663
6662
  }]
6664
6663
  }] });
6665
6664
 
6665
+ class HomeComponent extends BaseComponent {
6666
+ constructor(_route, auth, _services, _http, _app) {
6667
+ super(_services);
6668
+ this._route = _route;
6669
+ this.auth = auth;
6670
+ this._services = _services;
6671
+ this._http = _http;
6672
+ this._app = _app;
6673
+ this.menuData = {
6674
+ title: 'Home',
6675
+ module: null,
6676
+ description: null,
6677
+ description_name: null,
6678
+ tabs: [
6679
+ { 'link': 'home', 'params': null, 'label': 'Home' }
6680
+ ]
6681
+ };
6682
+ this.selectedSolution = 'Asset';
6683
+ this.subscription$ = [];
6684
+ }
6685
+ ngOnInit() {
6686
+ this._services._app.setNavbarModuleData(this.menuData);
6687
+ if (!this._app.isLoggingOut.getValue()) {
6688
+ if (this._services._account.getUser()) {
6689
+ if (this._services._account.getUser().settings && this._services._account.getUser().settings.opening_route && this._services._account.getUser().settings.opening_route !== '/home') {
6690
+ this._services._router.navigateByUrl(this._services._account.getUser().settings.opening_route);
6691
+ }
6692
+ else if (this._services._router.url !== '/home') {
6693
+ this._services._router.navigateByUrl('/home');
6694
+ }
6695
+ }
6696
+ else {
6697
+ this.subscription$.push(this._services._account.user.subscribe(user => {
6698
+ if (user && user.settings && user.settings.opening_route && user.settings.opening_route !== '/home') {
6699
+ this._services._router.navigateByUrl(user.settings.opening_route);
6700
+ }
6701
+ else if (this._services._router.url !== '/home') {
6702
+ this._services._router.navigateByUrl('/home');
6703
+ }
6704
+ }, () => { }));
6705
+ }
6706
+ }
6707
+ }
6708
+ ngOnDestroy() {
6709
+ this.subscription$.forEach(sub => {
6710
+ sub.unsubscribe();
6711
+ });
6712
+ }
6713
+ }
6714
+ HomeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HomeComponent, deps: [{ token: i1$3.ActivatedRoute }, { token: AuthService }, { token: ProviderService }, { token: i4.HttpClient }, { token: CoreService }], target: i0.ɵɵFactoryTarget.Component });
6715
+ HomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: HomeComponent, selector: "ng-component", providers: [ProviderService], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"jumbotron jumbotron-fluid\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>" });
6716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HomeComponent, decorators: [{
6717
+ type: Component,
6718
+ args: [{ providers: [ProviderService], template: "<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"jumbotron jumbotron-fluid\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>" }]
6719
+ }], ctorParameters: function () { return [{ type: i1$3.ActivatedRoute }, { type: AuthService }, { type: ProviderService }, { type: i4.HttpClient }, { type: CoreService }]; } });
6720
+
6666
6721
  class CoreModule {
6667
6722
  }
6668
6723
  CoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6669
6724
  CoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CoreModule, declarations: [CoreComponent,
6725
+ HomeComponent,
6670
6726
  LoggerComponent,
6671
6727
  NavbarMainComponent,
6672
6728
  NavbarModuleComponent,
@@ -6686,6 +6742,7 @@ CoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
6686
6742
  HttpClientModule,
6687
6743
  NgbModule, i1$1.ToastrModule, i1$2.NgxLocalStorageModule, UserSettingsModule,
6688
6744
  BrowserAnimationsModule], exports: [CoreComponent,
6745
+ HomeComponent,
6689
6746
  LoggerComponent,
6690
6747
  NavbarMainComponent,
6691
6748
  NavbarModuleComponent,
@@ -6738,6 +6795,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6738
6795
  ],
6739
6796
  declarations: [
6740
6797
  CoreComponent,
6798
+ HomeComponent,
6741
6799
  LoggerComponent,
6742
6800
  NavbarMainComponent,
6743
6801
  NavbarModuleComponent,
@@ -6775,6 +6833,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6775
6833
  ],
6776
6834
  exports: [
6777
6835
  CoreComponent,
6836
+ HomeComponent,
6778
6837
  LoggerComponent,
6779
6838
  NavbarMainComponent,
6780
6839
  NavbarModuleComponent,
@@ -6787,62 +6846,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6787
6846
  }]
6788
6847
  }] });
6789
6848
 
6790
- class HomeComponent extends BaseComponent {
6791
- constructor(_route, auth, _services, _http, _app) {
6792
- super(_services);
6793
- this._route = _route;
6794
- this.auth = auth;
6795
- this._services = _services;
6796
- this._http = _http;
6797
- this._app = _app;
6798
- this.menuData = {
6799
- title: 'Home',
6800
- module: null,
6801
- description: null,
6802
- description_name: null,
6803
- tabs: [
6804
- { 'link': 'home', 'params': null, 'label': 'Home' }
6805
- ]
6806
- };
6807
- this.selectedSolution = 'Asset';
6808
- this.subscription$ = [];
6809
- }
6810
- ngOnInit() {
6811
- this._services._app.setNavbarModuleData(this.menuData);
6812
- if (!this._app.isLoggingOut.getValue()) {
6813
- if (this._services._account.getUser()) {
6814
- if (this._services._account.getUser().settings && this._services._account.getUser().settings.opening_route && this._services._account.getUser().settings.opening_route !== '/home') {
6815
- this._services._router.navigateByUrl(this._services._account.getUser().settings.opening_route);
6816
- }
6817
- else if (this._services._router.url !== '/home') {
6818
- this._services._router.navigateByUrl('/home');
6819
- }
6820
- }
6821
- else {
6822
- this.subscription$.push(this._services._account.user.subscribe(user => {
6823
- if (user && user.settings && user.settings.opening_route && user.settings.opening_route !== '/home') {
6824
- this._services._router.navigateByUrl(user.settings.opening_route);
6825
- }
6826
- else if (this._services._router.url !== '/home') {
6827
- this._services._router.navigateByUrl('/home');
6828
- }
6829
- }, () => { }));
6830
- }
6831
- }
6832
- }
6833
- ngOnDestroy() {
6834
- this.subscription$.forEach(sub => {
6835
- sub.unsubscribe();
6836
- });
6837
- }
6838
- }
6839
- HomeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HomeComponent, deps: [{ token: i1$3.ActivatedRoute }, { token: AuthService }, { token: ProviderService }, { token: i4.HttpClient }, { token: CoreService }], target: i0.ɵɵFactoryTarget.Component });
6840
- HomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: HomeComponent, selector: "ng-component", providers: [ProviderService], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"jumbotron jumbotron-fluid\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>" });
6841
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: HomeComponent, decorators: [{
6842
- type: Component,
6843
- args: [{ providers: [ProviderService], template: "<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"jumbotron jumbotron-fluid\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>" }]
6844
- }], ctorParameters: function () { return [{ type: i1$3.ActivatedRoute }, { type: AuthService }, { type: ProviderService }, { type: i4.HttpClient }, { type: CoreService }]; } });
6845
-
6846
6849
  class SupportTicketService {
6847
6850
  constructor() {
6848
6851
  this.selectedSupportTicket = new BehaviorSubject('0');
@@ -7925,103 +7928,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
7925
7928
  }]
7926
7929
  }] });
7927
7930
 
7928
- class ChartComponent {
7929
- constructor(elementRef, ngZone) {
7930
- this.elementRef = elementRef;
7931
- this.ngZone = ngZone;
7932
- this.clickCanvas = new EventEmitter();
7933
- this.clickDataset = new EventEmitter();
7934
- this.clickElements = new EventEmitter();
7935
- this.clickElement = new EventEmitter();
7936
- }
7937
- ngOnInit() {
7938
- this.create();
7939
- }
7940
- ngOnChanges(changes) {
7941
- if (this.chart) {
7942
- if (changes['type'] || changes['options']) {
7943
- this.create();
7944
- }
7945
- else if (changes['data']) {
7946
- let currentValue = changes['data'].currentValue;
7947
- ['datasets', 'labels', 'xLabels', 'yLabels'].forEach(property => {
7948
- this.chart.data[property] = currentValue[property];
7949
- });
7950
- this.chart.update();
7951
- }
7952
- }
7953
- }
7954
- create() {
7955
- this.ngZone.runOutsideAngular(() => {
7956
- if (this.canvas) {
7957
- this.elementRef.nativeElement.removeChild(this.canvas);
7958
- }
7959
- this.canvas = document.createElement('canvas');
7960
- this.elementRef.nativeElement.appendChild(this.canvas);
7961
- this.chart = new Chart(this.canvas, {
7962
- type: this.type,
7963
- data: this.data,
7964
- options: this.options
7965
- });
7966
- this.canvas.onclick = e => {
7967
- this.ngZone.run(() => {
7968
- this.clickCanvas.next(e);
7969
- if (this.clickDataset.observers.length) {
7970
- this.clickDataset.next(this.chart.getDatasetAtEvent(e));
7971
- }
7972
- if (this.clickElements.observers.length) {
7973
- this.clickElements.next(this.chart.getElementsAtEvent(e));
7974
- }
7975
- if (this.clickElement.observers.length) {
7976
- this.clickElement.next(this.chart.getElementAtEvent(e));
7977
- }
7978
- });
7979
- };
7980
- });
7981
- }
7982
- resetZoom() {
7983
- this.chart.resetZoom();
7984
- }
7985
- }
7986
- ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
7987
- ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: ChartComponent, selector: "chart", inputs: { type: "type", data: "data", options: "options" }, outputs: { clickCanvas: "clickCanvas", clickDataset: "clickDataset", clickElements: "clickElements", clickElement: "clickElement" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block}\n"] });
7988
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartComponent, decorators: [{
7989
- type: Component,
7990
- args: [{
7991
- selector: 'chart',
7992
- template: '',
7993
- styles: [':host { display: block; }']
7994
- }]
7995
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { type: [{
7996
- type: Input
7997
- }], data: [{
7998
- type: Input
7999
- }], options: [{
8000
- type: Input
8001
- }], clickCanvas: [{
8002
- type: Output
8003
- }], clickDataset: [{
8004
- type: Output
8005
- }], clickElements: [{
8006
- type: Output
8007
- }], clickElement: [{
8008
- type: Output
8009
- }] } });
8010
-
8011
- class ChartModule {
8012
- constructor() { }
8013
- }
8014
- ChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8015
- ChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartModule, declarations: [ChartComponent], exports: [ChartComponent] });
8016
- ChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartModule });
8017
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ChartModule, decorators: [{
8018
- type: NgModule,
8019
- args: [{
8020
- declarations: [ChartComponent],
8021
- exports: [ChartComponent]
8022
- }]
8023
- }], ctorParameters: function () { return []; } });
8024
-
8025
7931
  const ReportBuilderModulePermission = {
8026
7932
  name: 'report-builder',
8027
7933
  views: [
@@ -8052,5 +7958,5 @@ const SuperAdminModulePermission = {
8052
7958
  * Generated bundle index. Do not edit.
8053
7959
  */
8054
7960
 
8055
- export { AccountManagerService, AlertService, Auth365Component, AuthGuard, AuthPermissionService, AuthService, AwsService, BaseComponent, CanDeactivateGuard, ChartComponent, ChartModule, CollapseTableComponent, CollapseTableModule, CoreComponent, CoreModule, CoreService, DatatableComponent, DatatableModule, DateShortcutComponent, DateShortcutModule, DialogService, DomSanitizorPipe, EnrollComponent, FileModule, FileUploadComponent, FilterEqualPipe, FilterNotEqualPipe, FocusDirective, ForgotPasswordComponent, FormButtonComponent, FormButtonModule, HomeComponent, JsonParsePipe, LoggerComponent, MinusCurrencyPipe, NavbarMainComponent, NavbarModuleComponent, OfflineManagerService, PhonePipe, PipeModule, ProviderService, ReportBuilderModulePermission, ResizeService, ResponsiveButtonGroupComponent, ResponsiveButtonGroupModule, ReversePipe, SchedulerComponent, SchedulerModule, ScrollDirective, SharedModule, SocketManagerService, SocketService, SortTableDirective, SortTableHeaderComponent, SortTableModule, SortTableNgForComponent, StorageDB, SuperAdminModulePermission, SupportTicketComponent, SupportTicketDetailComponent, SupportTicketEditComponent, SupportTicketListComponent, SupportTicketModule, SupportTicketNewComponent, SupportTicketRouting, SupportTicketService, TitleCaseAndUnderscorePipe, TokenManagerService, UserRoleComponent, UserRoleModule, ValidationService, WindowRefService, b64toBlobURL, blobToFile, dateReviver, deepCopy, generateCronStringFromDate, getDeepDiffDetails, isUpperCase, mergeDeep, pad, s2ab, toDataURL, toTitleCase, type };
7961
+ export { AccountManagerService, AlertService, Auth365Component, AuthGuard, AuthPermissionService, AuthService, AwsService, BaseComponent, CanDeactivateGuard, CollapseTableComponent, CollapseTableModule, CoreComponent, CoreModule, CoreService, DatatableComponent, DatatableModule, DateShortcutComponent, DateShortcutModule, DialogService, DomSanitizorPipe, EnrollComponent, FileModule, FileUploadComponent, FilterEqualPipe, FilterNotEqualPipe, FocusDirective, ForgotPasswordComponent, FormButtonComponent, FormButtonModule, HomeComponent, JsonParsePipe, LoggerComponent, MinusCurrencyPipe, NavbarMainComponent, NavbarModuleComponent, OfflineManagerService, PhonePipe, PipeModule, ProviderService, ReportBuilderModulePermission, ResizeService, ResponsiveButtonGroupComponent, ResponsiveButtonGroupModule, ReversePipe, SchedulerComponent, SchedulerModule, ScrollDirective, SharedModule, SocketManagerService, SocketService, SortTableDirective, SortTableHeaderComponent, SortTableModule, SortTableNgForComponent, StorageDB, SuperAdminModulePermission, SupportTicketComponent, SupportTicketDetailComponent, SupportTicketEditComponent, SupportTicketListComponent, SupportTicketModule, SupportTicketNewComponent, SupportTicketRouting, SupportTicketService, TitleCaseAndUnderscorePipe, TokenManagerService, UserRoleComponent, UserRoleModule, ValidationService, WindowRefService, b64toBlobURL, blobToFile, dateReviver, deepCopy, generateCronStringFromDate, getDeepDiffDetails, isUpperCase, mergeDeep, pad, s2ab, toDataURL, toTitleCase, type };
8056
7962
  //# sourceMappingURL=resolveio-client-lib-core.mjs.map