@fluxhub/fluxhub-lib 1.0.291 → 1.0.293

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.
@@ -26,7 +26,7 @@ import { MyDatePickerModule } from 'mydatepicker';
26
26
  import { AgmCoreModule } from '@agm/core';
27
27
  import 'ag-grid-enterprise';
28
28
  import { CdkTableModule } from '@angular/cdk/table';
29
- import { Driver, NgForageCache, NgForage } from 'ngforage';
29
+ import { NgForage } from 'ngforage';
30
30
  import { TranslateModule } from '@ngx-translate/core';
31
31
  import { DragulaService, DragulaModule } from 'ng2-dragula';
32
32
  import { __read, __assign, __extends } from 'tslib';
@@ -34,7 +34,7 @@ import { DomSanitizer } from '@angular/platform-browser';
34
34
  import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
35
35
  import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_LOCALE, MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatPaginatorModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSortModule, MatSlideToggleModule, MatSnackBarModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatFormFieldModule, MatExpansionModule, MatStepperModule, MatDialogModule, MatNativeDateModule } from '@angular/material';
36
36
  import { ActivatedRoute, Router } from '@angular/router';
37
- import { Injectable, Component, Directive, Pipe, Inject, PLATFORM_ID, Input, forwardRef, Output, EventEmitter, ViewChild, ViewContainerRef, ElementRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
37
+ import { Injectable, Component, Directive, Pipe, Inject, PLATFORM_ID, Input, Output, EventEmitter, forwardRef, ViewChild, ViewContainerRef, ElementRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
38
38
  import { Http } from '@angular/http';
39
39
  import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
40
40
  import { ToastrService } from 'ngx-toastr';
@@ -13031,13 +13031,9 @@ var FSResult = /** @class */ (function () {
13031
13031
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
13032
13032
  */
13033
13033
  var LocalDBService = /** @class */ (function () {
13034
- function LocalDBService(ngf, cache, uti, app) {
13035
- this.ngf = ngf;
13036
- this.cache = cache;
13034
+ function LocalDBService(uti, app) {
13037
13035
  this.uti = uti;
13038
13036
  this.app = app;
13039
- this.ngf.name = 'Fluxhub_' + this.app.COMPANY_KEY;
13040
- this.ngf.driver = [Driver.INDEXED_DB, Driver.LOCAL_STORAGE];
13041
13037
  }
13042
13038
  /**
13043
13039
  * @template T
@@ -13057,41 +13053,37 @@ var LocalDBService = /** @class */ (function () {
13057
13053
  var _this = this;
13058
13054
  if (crypt === void 0) { crypt = true; }
13059
13055
  if (json_format === void 0) { json_format = true; }
13060
- return this.ngf.getItem(key)
13061
- .then((/**
13062
- * @param {?} r
13056
+ return new Promise((/**
13057
+ * @param {?} resolve
13063
13058
  * @return {?}
13064
13059
  */
13065
- function (r) {
13066
- if (r == null) {
13067
- return null;
13060
+ function (resolve) {
13061
+ if (localStorage.getItem(key) == null) {
13062
+ resolve(null);
13063
+ return;
13068
13064
  }
13069
13065
  if (crypt) {
13070
- if (json_format)
13071
- return JSON.parse(_this.uti.decrypt_v2(r));
13072
- else
13073
- return (_this.uti.decrypt_v2(r));
13066
+ if (json_format) {
13067
+ resolve(JSON.parse(_this.uti.decrypt_v2(localStorage.getItem(key))));
13068
+ return;
13069
+ }
13070
+ else {
13071
+ resolve(_this.uti.decrypt_v2(localStorage.getItem(key)));
13072
+ return;
13073
+ }
13074
13074
  }
13075
13075
  else {
13076
- if (json_format)
13077
- return JSON.parse('' + r);
13078
- else
13079
- return ('' + r);
13076
+ if (json_format) {
13077
+ resolve(JSON.parse('' + localStorage.getItem(key)));
13078
+ return;
13079
+ }
13080
+ else {
13081
+ resolve((localStorage.getItem(key)));
13082
+ return;
13083
+ }
13080
13084
  }
13081
- }));
13082
- };
13083
- /**
13084
- * @return {?}
13085
- */
13086
- LocalDBService.prototype.list_keys = /**
13087
- * @return {?}
13088
- */
13089
- function () {
13090
- this.ngf.keys().then((/**
13091
- * @param {?} arr
13092
- * @return {?}
13093
- */
13094
- function (arr) {
13085
+ resolve(null);
13086
+ return;
13095
13087
  }));
13096
13088
  };
13097
13089
  /**
@@ -13113,25 +13105,15 @@ var LocalDBService = /** @class */ (function () {
13113
13105
  if (json_format === void 0) { json_format = true; }
13114
13106
  if (crypt) {
13115
13107
  if (json_format)
13116
- this.ngf.setItem(k, this.uti.encrypt_v2((JSON.stringify(obj)))).then((/**
13117
- * @param {?} dt
13118
- * @return {?}
13119
- */
13120
- function (dt) {
13121
- }));
13108
+ localStorage.setItem(k, this.uti.encrypt_v2((JSON.stringify(obj))));
13122
13109
  else
13123
- this.ngf.setItem(k, this.uti.encrypt_v2((obj))).then((/**
13124
- * @param {?} dt
13125
- * @return {?}
13126
- */
13127
- function (dt) {
13128
- }));
13110
+ localStorage.setItem(k, this.uti.encrypt_v2((obj)));
13129
13111
  }
13130
13112
  else {
13131
13113
  if (json_format)
13132
- this.ngf.setItem(k, (JSON.stringify(obj)));
13114
+ localStorage.setItem(k, (JSON.stringify(obj)));
13133
13115
  else
13134
- this.ngf.setItem(k, (obj));
13116
+ localStorage.setItem(k, (obj));
13135
13117
  }
13136
13118
  };
13137
13119
  /**
@@ -13143,7 +13125,7 @@ var LocalDBService = /** @class */ (function () {
13143
13125
  * @return {?}
13144
13126
  */
13145
13127
  function (k) {
13146
- this.ngf.removeItem(k);
13128
+ localStorage.removeItem(k);
13147
13129
  };
13148
13130
  LocalDBService.decorators = [
13149
13131
  { type: Injectable, args: [{
@@ -13152,12 +13134,10 @@ var LocalDBService = /** @class */ (function () {
13152
13134
  ];
13153
13135
  /** @nocollapse */
13154
13136
  LocalDBService.ctorParameters = function () { return [
13155
- { type: NgForage },
13156
- { type: NgForageCache },
13157
13137
  { type: UtilityService },
13158
13138
  { type: AppService }
13159
13139
  ]; };
13160
- /** @nocollapse */ LocalDBService.ngInjectableDef = defineInjectable({ factory: function LocalDBService_Factory() { return new LocalDBService(inject(NgForage), inject(NgForageCache), inject(UtilityService), inject(AppService)); }, token: LocalDBService, providedIn: "root" });
13140
+ /** @nocollapse */ LocalDBService.ngInjectableDef = defineInjectable({ factory: function LocalDBService_Factory() { return new LocalDBService(inject(UtilityService), inject(AppService)); }, token: LocalDBService, providedIn: "root" });
13161
13141
  return LocalDBService;
13162
13142
  }());
13163
13143
 
@@ -14013,8 +13993,10 @@ var FHGridJSONComponent = /** @class */ (function () {
14013
13993
  * @return {?}
14014
13994
  */
14015
13995
  function () {
14016
- // console.log( this.m_appService.COMPANY_KEY + this.tbl_name);
14017
13996
  var _this = this;
13997
+ console.log(this.m_appService.COMPANY_KEY + this.tbl_name);
13998
+ console.log('m_appService ', this.m_appService);
13999
+ console.log('localstore ', this.localstore);
14018
14000
  this.localstore.read(this.m_appService.COMPANY_KEY + this.tbl_name).then((/**
14019
14001
  * @param {?} dt
14020
14002
  * @return {?}