@fluxhub/fluxhub-lib 1.0.303 → 1.0.304

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,5 +1,7 @@
1
1
  import { SimpleCrypt } from 'ngx-simple-crypt';
2
2
  import { AES, enc } from 'crypto-js';
3
+ import * as momentNs from 'moment';
4
+ import { isMoment } from 'moment';
3
5
  import 'clipboard';
4
6
  import 'prismjs';
5
7
  import 'prismjs/plugins/toolbar/prism-toolbar';
@@ -32,9 +34,9 @@ import { TranslateModule } from '@ngx-translate/core';
32
34
  import { DragulaService, DragulaModule } from 'ng2-dragula';
33
35
  import { DomSanitizer } from '@angular/platform-browser';
34
36
  import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
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';
37
+ import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_FORMATS, 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
38
  import { ActivatedRoute, Router } from '@angular/router';
37
- import { Injectable, Component, Directive, Inject, PLATFORM_ID, Pipe, Input, Output, EventEmitter, forwardRef, ViewChild, ElementRef, Optional, HostListener, ViewContainerRef, defineInjectable, inject, NgModule } from '@angular/core';
39
+ import { Injectable, Component, Directive, Pipe, Inject, PLATFORM_ID, Input, forwardRef, Output, EventEmitter, ViewChild, ElementRef, Optional, HostListener, ViewContainerRef, defineInjectable, inject, NgModule } from '@angular/core';
38
40
  import { Http } from '@angular/http';
39
41
  import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
40
42
  import { ToastrService } from 'ngx-toastr';
@@ -5836,6 +5838,7 @@ class FHGridComponent {
5836
5838
  }
5837
5839
  p.system_dest = this.system_dest;
5838
5840
  p.field = this.fields;
5841
+ console.log('filterModel ', params.filterModel);
5839
5842
  if (this.filters != null)
5840
5843
  p.filter = this.filters;
5841
5844
  if (this.fix_flt != "") {
@@ -7736,6 +7739,278 @@ FHAutoCompleteComponent.propDecorators = {
7736
7739
  * @fileoverview added by tsickle
7737
7740
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7738
7741
  */
7742
+ /** @type {?} */
7743
+ const moment = momentNs;
7744
+ /** @type {?} */
7745
+ const MOMENT_DATE_FORMATS = {
7746
+ parse: {
7747
+ dateInput: 'D/MM/YYYY'
7748
+ },
7749
+ display: {
7750
+ dateInput: 'DD/MM/YYYY',
7751
+ monthYearLabel: 'MMMM Y',
7752
+ dateA11yLabel: 'LL',
7753
+ monthYearA11yLabel: 'MMMM Y'
7754
+ }
7755
+ };
7756
+ /** @type {?} */
7757
+ const dateNames = [];
7758
+ for (let date = 1; date <= 31; date++) {
7759
+ dateNames.push(String(date));
7760
+ }
7761
+ class MomentDateAdapter extends DateAdapter {
7762
+ constructor() {
7763
+ super(...arguments);
7764
+ this.localeData = moment.localeData();
7765
+ }
7766
+ /**
7767
+ * @param {?} date
7768
+ * @return {?}
7769
+ */
7770
+ getYear(date) {
7771
+ return date.year();
7772
+ }
7773
+ /**
7774
+ * @param {?} date
7775
+ * @return {?}
7776
+ */
7777
+ getMonth(date) {
7778
+ return date.month();
7779
+ }
7780
+ /**
7781
+ * @param {?} date
7782
+ * @return {?}
7783
+ */
7784
+ getDate(date) {
7785
+ return date.date();
7786
+ }
7787
+ /**
7788
+ * @param {?} date
7789
+ * @return {?}
7790
+ */
7791
+ getDayOfWeek(date) {
7792
+ return date.day();
7793
+ }
7794
+ /**
7795
+ * @param {?} style
7796
+ * @return {?}
7797
+ */
7798
+ getMonthNames(style) {
7799
+ switch (style) {
7800
+ case 'long':
7801
+ return this.localeData.months();
7802
+ case 'short':
7803
+ return this.localeData.monthsShort();
7804
+ case 'narrow':
7805
+ return this.localeData.monthsShort().map((/**
7806
+ * @param {?} month
7807
+ * @return {?}
7808
+ */
7809
+ month => month[0]));
7810
+ }
7811
+ }
7812
+ /**
7813
+ * @return {?}
7814
+ */
7815
+ getDateNames() {
7816
+ return dateNames;
7817
+ }
7818
+ /**
7819
+ * @param {?} style
7820
+ * @return {?}
7821
+ */
7822
+ getDayOfWeekNames(style) {
7823
+ switch (style) {
7824
+ case 'long':
7825
+ return this.localeData.weekdays();
7826
+ case 'short':
7827
+ return this.localeData.weekdaysShort();
7828
+ case 'narrow':
7829
+ return this.localeData.weekdaysShort();
7830
+ }
7831
+ }
7832
+ /**
7833
+ * @param {?} date
7834
+ * @return {?}
7835
+ */
7836
+ getYearName(date) {
7837
+ return String(date.year());
7838
+ }
7839
+ /**
7840
+ * @return {?}
7841
+ */
7842
+ getFirstDayOfWeek() {
7843
+ return this.localeData.firstDayOfWeek();
7844
+ }
7845
+ /**
7846
+ * @param {?} date
7847
+ * @return {?}
7848
+ */
7849
+ getNumDaysInMonth(date) {
7850
+ return date.daysInMonth();
7851
+ }
7852
+ /**
7853
+ * @param {?} date
7854
+ * @return {?}
7855
+ */
7856
+ clone(date) {
7857
+ return date.clone();
7858
+ }
7859
+ /**
7860
+ * @param {?} year
7861
+ * @param {?} month
7862
+ * @param {?} date
7863
+ * @return {?}
7864
+ */
7865
+ createDate(year, month, date) {
7866
+ return moment([year, month, date]);
7867
+ }
7868
+ /**
7869
+ * @return {?}
7870
+ */
7871
+ today() {
7872
+ return moment();
7873
+ }
7874
+ /**
7875
+ * @param {?} value
7876
+ * @param {?} parseFormat
7877
+ * @return {?}
7878
+ */
7879
+ parse(value, parseFormat) {
7880
+ /** @type {?} */
7881
+ let m = moment(value, parseFormat, true);
7882
+ if (!m.isValid()) {
7883
+ m = moment(value);
7884
+ }
7885
+ if (m.isValid()) {
7886
+ return m;
7887
+ }
7888
+ return null;
7889
+ }
7890
+ /**
7891
+ * @param {?} date
7892
+ * @param {?} displayFormat
7893
+ * @return {?}
7894
+ */
7895
+ format(date, displayFormat) {
7896
+ if (date) {
7897
+ return date.format(displayFormat);
7898
+ }
7899
+ return '';
7900
+ }
7901
+ /**
7902
+ * @param {?} date
7903
+ * @param {?} years
7904
+ * @return {?}
7905
+ */
7906
+ addCalendarYears(date, years) {
7907
+ return date.clone().add(years, 'y');
7908
+ }
7909
+ /**
7910
+ * @param {?} date
7911
+ * @param {?} months
7912
+ * @return {?}
7913
+ */
7914
+ addCalendarMonths(date, months) {
7915
+ return date.clone().add(months, 'M');
7916
+ }
7917
+ /**
7918
+ * @param {?} date
7919
+ * @param {?} days
7920
+ * @return {?}
7921
+ */
7922
+ addCalendarDays(date, days) {
7923
+ return date.clone().add(days, 'd');
7924
+ }
7925
+ /**
7926
+ * @param {?} locale
7927
+ * @return {?}
7928
+ */
7929
+ setLocale(locale) {
7930
+ this.localeData = moment.localeData(locale);
7931
+ }
7932
+ /**
7933
+ * @param {?} first
7934
+ * @param {?} second
7935
+ * @return {?}
7936
+ */
7937
+ compareDate(first, second) {
7938
+ return first.diff(second, 'seconds', true);
7939
+ }
7940
+ /**
7941
+ * @param {?} first
7942
+ * @param {?} second
7943
+ * @return {?}
7944
+ */
7945
+ sameDate(first, second) {
7946
+ if (first == null) {
7947
+ return second == null;
7948
+ }
7949
+ else if (isMoment(first)) {
7950
+ return first.isSame(second);
7951
+ }
7952
+ return super.sameDate(first, second);
7953
+ }
7954
+ /**
7955
+ * @param {?} date
7956
+ * @param {?=} min
7957
+ * @param {?=} max
7958
+ * @return {?}
7959
+ */
7960
+ clampDate(date, min, max) {
7961
+ if (min && date.isBefore(min)) {
7962
+ return min;
7963
+ }
7964
+ else if (max && date.isAfter(max)) {
7965
+ return max;
7966
+ }
7967
+ return date;
7968
+ }
7969
+ /**
7970
+ * @param {?} date
7971
+ * @return {?}
7972
+ */
7973
+ isValid(date) {
7974
+ return date.isValid();
7975
+ }
7976
+ ;
7977
+ /**
7978
+ * @param {?} obj
7979
+ * @return {?}
7980
+ */
7981
+ isDateInstance(obj) {
7982
+ return moment.isMoment(obj);
7983
+ }
7984
+ ;
7985
+ /**
7986
+ * @param {?} date
7987
+ * @return {?}
7988
+ */
7989
+ toIso8601(date) {
7990
+ return date.format();
7991
+ }
7992
+ ;
7993
+ /**
7994
+ * @param {?} iso8601String
7995
+ * @return {?}
7996
+ */
7997
+ fromIso8601(iso8601String) {
7998
+ return moment(iso8601String);
7999
+ }
8000
+ ;
8001
+ /**
8002
+ * @return {?}
8003
+ */
8004
+ invalid() {
8005
+ return undefined;
8006
+ }
8007
+ }
8008
+
8009
+ /**
8010
+ * @fileoverview added by tsickle
8011
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8012
+ */
8013
+ const ɵ0 = MOMENT_DATE_FORMATS;
7739
8014
  class FHDatePickerComponent extends FHValueAccessor {
7740
8015
  /**
7741
8016
  * @param {?} dateAdapter
@@ -7762,13 +8037,23 @@ class FHDatePickerComponent extends FHValueAccessor {
7762
8037
  * @return {?}
7763
8038
  */
7764
8039
  dt_chg(s) {
7765
- // console.log(s);
8040
+ console.log('s ', s);
8041
+ console.log('this.date_sel prima ', this.date_sel);
7766
8042
  /** @type {?} */
7767
8043
  let arr = s.split('/');
7768
8044
  if (arr.length == 3) {
7769
- if (parseInt(arr[2]) < 3000 && parseInt(arr[0]) > 0 && parseInt(arr[0]) <= 31 && parseInt(arr[1]) > 1 && parseInt(arr[1]) <= 12) {
7770
- this.date_sel = new Date(parseInt(arr[2]), parseInt(arr[1]) - 1, parseInt(arr[0]));
8045
+ console.log('arr[2]) < 3000 ', (parseInt(arr[2]) < 3000));
8046
+ console.log('parseInt(arr[0]) > 0 && parseInt(arr[0]) <= 31 ', (parseInt(arr[0]) > 0 && parseInt(arr[0]) <= 31));
8047
+ console.log('parseInt(arr[1]) > 0 && parseInt(arr[1]) <= 12 ', (parseInt(arr[1]) > 0 && parseInt(arr[1]) <= 12));
8048
+ if (parseInt(arr[2]) < 3000 && parseInt(arr[0]) > 0 && parseInt(arr[0]) <= 31 && parseInt(arr[1]) > 0 && parseInt(arr[1]) <= 12) {
8049
+ console.log('data ', arr);
8050
+ /** @type {?} */
8051
+ let dtp = new MomentDateAdapter();
8052
+ this.date_sel = dtp.createDate(parseInt(arr[2]), parseInt(arr[1]) - 1, parseInt(arr[0]));
8053
+ console.log('this.date_sel dopo ', this.date_sel);
7771
8054
  }
8055
+ else
8056
+ console.log('data non valida! ', arr);
7772
8057
  }
7773
8058
  }
7774
8059
  /**
@@ -7891,7 +8176,8 @@ FHDatePickerComponent.decorators = [
7891
8176
  { type: Component, args: [{
7892
8177
  selector: 'FHDatePicker',
7893
8178
  providers: [
7894
- { provide: MAT_DATE_LOCALE, useValue: 'it-IT' },
8179
+ { provide: MAT_DATE_FORMATS, useValue: ɵ0 },
8180
+ { provide: DateAdapter, useClass: MomentDateAdapter },
7895
8181
  { provide: NG_VALUE_ACCESSOR, useExisting: FHDatePickerComponent, multi: true },
7896
8182
  ],
7897
8183
  template: `
@@ -17541,6 +17827,6 @@ class dt {
17541
17827
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
17542
17828
  */
17543
17829
 
17544
- export { FluxhubLibModule, AppService, AppMakerService, FileService, OdbcService, QueryService, WkfService, GridService, AuthenticationService, UtilityService, OfficeAutomatorService, LocalDBService, FHGuard, FHGridJSONComponent, FHGridComponent, ApprovaGridComponent, CurrencyComponent, DateComponent, DtPick, dt, NumericEditorComponent, ComboBoxEditor, TextAreaEditor, FHFieldPickListComponent, FHAutoCompleteComponent, FHComboboxComponent, FHConfirmComponent, FHCurrencyFieldComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHListComponent, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, ReplaceLineBreaks, FHRichText, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUserFieldComponent, FHUserPickerComponent, FHPickListComponent, WinAskNumberComponent, WinAskTextComponent, WinAskTextBigComponent, WinAskButtonsComponent, FHWinComboSelect, win_show_image, fhimagepreview, FHListPick, win_mappa, WinOutputComponent, win_time_slider, WinWait, win_salva_annulla, QGParam, QGResult, QParam, QResult, FSInput, FSResult, FormBuilderComponent, FormExecuterComponent, wkf_header_bar, wkfapp, dati_aggiuntivi, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵb, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵa, FHGridToolBarComponent as ɵm, win_grid_help as ɵi, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵc, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵe, FHViewerComponent as ɵk, SafePipe as ɵf, DecimalMask as ɵg, FHValueAccessor as ɵh, HighlightService as ɵj, win_assegna as ɵn, win_commenti as ɵs, win_commento_sel_notif as ɵy, win_conferma as ɵo, win_info_doc as ɵt, win_log as ɵu, win_recupera_doc as ɵv, win_riassegna_select_level as ɵw, win_riassegna_select_user as ɵx, win_select_canale as ɵp, win_select_level as ɵq, win_uploads as ɵr };
17830
+ export { FluxhubLibModule, AppService, AppMakerService, FileService, OdbcService, QueryService, WkfService, GridService, AuthenticationService, UtilityService, OfficeAutomatorService, LocalDBService, FHGuard, FHGridJSONComponent, FHGridComponent, ApprovaGridComponent, CurrencyComponent, DateComponent, DtPick, dt, NumericEditorComponent, ComboBoxEditor, TextAreaEditor, FHFieldPickListComponent, FHAutoCompleteComponent, FHComboboxComponent, FHConfirmComponent, FHCurrencyFieldComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHListComponent, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, ReplaceLineBreaks, FHRichText, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUserFieldComponent, FHUserPickerComponent, FHPickListComponent, WinAskNumberComponent, WinAskTextComponent, WinAskTextBigComponent, WinAskButtonsComponent, FHWinComboSelect, win_show_image, fhimagepreview, FHListPick, win_mappa, WinOutputComponent, win_time_slider, WinWait, win_salva_annulla, QGParam, QGResult, QParam, QResult, FSInput, FSResult, FormBuilderComponent, FormExecuterComponent, wkf_header_bar, wkfapp, dati_aggiuntivi, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵb, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵa, FHGridToolBarComponent as ɵo, win_grid_help as ɵk, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵc, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵe, FHViewerComponent as ɵm, SafePipe as ɵf, DecimalMask as ɵg, MOMENT_DATE_FORMATS as ɵi, MomentDateAdapter as ɵj, FHValueAccessor as ɵh, HighlightService as ɵl, win_assegna as ɵp, win_commenti as ɵu, win_commento_sel_notif as ɵba, win_conferma as ɵq, win_info_doc as ɵv, win_log as ɵw, win_recupera_doc as ɵx, win_riassegna_select_level as ɵy, win_riassegna_select_user as ɵz, win_select_canale as ɵr, win_select_level as ɵs, win_uploads as ɵt };
17545
17831
 
17546
17832
  //# sourceMappingURL=fluxhub-fluxhub-lib.js.map