@resolveio/client-lib-core 15.1.7 → 15.1.8

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.
@@ -5,7 +5,7 @@ import * as i1$5 from 'ngx-device-detector';
5
5
  import { DeviceDetectorService } from 'ngx-device-detector';
6
6
  import * as i1 from '@angular/platform-browser';
7
7
  import * as i2 from '@angular/forms';
8
- import { FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
+ import { UntypedFormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
9
  import * as i1$1 from 'ngx-toastr';
10
10
  import { ToastrModule } from 'ngx-toastr';
11
11
  import * as i1$2 from 'ngx-localstorage';
@@ -2206,11 +2206,27 @@ class DialogInputContent {
2206
2206
  ngOnInit() {
2207
2207
  this.formInput = this._fb.group({});
2208
2208
  for (let i = 0; i < this.inputFields.length; i++) {
2209
- if (this.inputFields[i].validators === null) {
2210
- this.formInput.addControl(this.inputFields[i].form, new FormControl({ value: this.inputFields[i].data, disabled: this.inputFields[i].disabled }));
2209
+ if (this.inputFields[i].type !== 'datetime') {
2210
+ if (this.inputFields[i].validators === null) {
2211
+ this.formInput.addControl(this.inputFields[i].form, new UntypedFormControl({ value: this.inputFields[i].data, disabled: this.inputFields[i].disabled }));
2212
+ }
2213
+ else {
2214
+ this.formInput.addControl(this.inputFields[i].form, new UntypedFormControl({ value: this.inputFields[i].data, disabled: this.inputFields[i].disabled }, this.inputFields[i].validators));
2215
+ }
2211
2216
  }
2212
2217
  else {
2213
- this.formInput.addControl(this.inputFields[i].form, new FormControl({ value: this.inputFields[i].data, disabled: this.inputFields[i].disabled }, this.inputFields[i].validators));
2218
+ if (this.inputFields[i].validators === null) {
2219
+ this.formInput.addControl(this.inputFields[i].form, new UntypedFormControl({ value: this.inputFields[i].data[0], disabled: this.inputFields[i].disabled }));
2220
+ }
2221
+ else {
2222
+ this.formInput.addControl(this.inputFields[i].form, new UntypedFormControl({ value: this.inputFields[i].data[0], disabled: this.inputFields[i].disabled }, this.inputFields[i].validators));
2223
+ }
2224
+ if (this.inputFields[i].validators === null) {
2225
+ this.formInput.addControl(this.inputFields[i].form + '_time', new UntypedFormControl({ value: this.inputFields[i].data[1], disabled: this.inputFields[i].disabled }));
2226
+ }
2227
+ else {
2228
+ this.formInput.addControl(this.inputFields[i].form + '_time', new UntypedFormControl({ value: this.inputFields[i].data[1], disabled: this.inputFields[i].disabled }, this.inputFields[i].validators));
2229
+ }
2214
2230
  }
2215
2231
  }
2216
2232
  }
@@ -2257,7 +2273,7 @@ DialogInputContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
2257
2273
  <label class="form-control-label">{{inputField.label}}</label>
2258
2274
  <em *ngIf="formInput.controls[inputField.form].hasError('required') && inputField.required">- Required</em>
2259
2275
  <em *ngIf="!formInput.controls[inputField.form].hasError('required') && formInput.controls[inputField.form].invalid">- Invalid</em>
2260
- <div *ngIf="inputField.type !== 'state' && inputField.type !== 'textarea' && inputField.type !== 'number' && inputField.type !== 'select' && inputField.type !== 'boolean'">
2276
+ <div *ngIf="inputField.type !== 'date' && inputField.type !== 'datetime' && inputField.type !== 'state' && inputField.type !== 'textarea' && inputField.type !== 'number' && inputField.type !== 'select' && inputField.type !== 'boolean'">
2261
2277
  <input [autofocus]="i === 0 ? true : false" [focus]="i === 0 ? true : false" [formControlName]="inputField.form" [ngClass]="['form-control', validateInput(inputField, formInput)]" [type]="(inputField.type ? inputField.type : 'text')">
2262
2278
  <ng-container *ngFor="let errorMsg of getErrorMessages(inputField, formInput);">
2263
2279
  <div class="invalid-feedback">{{errorMsg}}</div>
@@ -2292,6 +2308,35 @@ DialogInputContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
2292
2308
  <div class="invalid-feedback">{{errorMsg}}</div>
2293
2309
  </ng-container>
2294
2310
  </div>
2311
+ <div *ngIf="inputField.type === 'date'">
2312
+ <div class="input-group">
2313
+ <input [formControlName]="inputField.form" placeholder="yyyy-mm-dd" ngbDatepicker [firstDayOfWeek]="7" #d="ngbDatepicker" [ngClass]="['form-control', validateInput(inputField, formInput)]" (click)="d.toggle()">
2314
+ <div class="input-group-append" (click)="d.toggle()">
2315
+ <div class="input-group-text">
2316
+ <i class="fa fa-calendar" aria-hidden="true"></i>
2317
+ </div>
2318
+ </div>
2319
+ </div>
2320
+ </div>
2321
+ <div *ngIf="inputField.type === 'datetime'">
2322
+ <div class="row" style="align-items: center;">
2323
+ <div class="col-sm-8">
2324
+ <label class="form-control-label" style="align-items: top;">Date/Time</label>
2325
+ <div class="input-group">
2326
+ <input [formControlName]="inputField.form" placeholder="yyyy-mm-dd" ngbDatepicker [firstDayOfWeek]="7" #d="ngbDatepicker" [ngClass]="['form-control', validateInput(inputField, formInput)]" (click)="d.toggle()">
2327
+ <div class="input-group-append" (click)="d.toggle()">
2328
+ <div class="input-group-text">
2329
+ <i class="fa fa-calendar" aria-hidden="true"></i>
2330
+ </div>
2331
+ </div>
2332
+ </div>
2333
+ </div>
2334
+ <div class="col-sm-4">
2335
+ <label class="form-control-label" style="align-items: top;">&nbsp;</label>
2336
+ <ngb-timepicker [formControlName]="inputField.form + '_time'" meridian="ON" [ngClass]="[validateInput(inputField, formInput)]"></ngb-timepicker>
2337
+ </div>
2338
+ </div>
2339
+ </div>
2295
2340
  <div *ngIf="inputField.type === 'boolean'" (click)="formInput.controls[inputField.form].setValue(!formInput.controls[inputField.form].value)">
2296
2341
  <i *ngIf="formInput.controls[inputField.form].value" class="fa fa-check" style="color: green; font-size: 24px;" aria-hidden="true"></i>
2297
2342
  <i *ngIf="!formInput.controls[inputField.form].value" class="fa fa-times" style="color: red; font-size: 24px;" aria-hidden="true"></i>
@@ -2304,7 +2349,7 @@ DialogInputContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
2304
2349
  <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>
2305
2350
  </div>
2306
2351
  </form>
2307
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FormButtonComponent, selector: "form-button", inputs: ["form", "disabled", "type"] }, { kind: "component", type: i4$1.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "component", type: i4$1.NgOptionComponent, selector: "ng-option", inputs: ["value", "disabled"] }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: FocusDirective, selector: "[focus]", inputs: ["focus"] }] });
2352
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$4.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "component", type: i1$4.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"] }, { kind: "component", type: FormButtonComponent, selector: "form-button", inputs: ["form", "disabled", "type"] }, { kind: "component", type: i4$1.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "component", type: i4$1.NgOptionComponent, selector: "ng-option", inputs: ["value", "disabled"] }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: FocusDirective, selector: "[focus]", inputs: ["focus"] }] });
2308
2353
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogInputContent, decorators: [{
2309
2354
  type: Component,
2310
2355
  args: [{
@@ -2322,7 +2367,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2322
2367
  <label class="form-control-label">{{inputField.label}}</label>
2323
2368
  <em *ngIf="formInput.controls[inputField.form].hasError('required') && inputField.required">- Required</em>
2324
2369
  <em *ngIf="!formInput.controls[inputField.form].hasError('required') && formInput.controls[inputField.form].invalid">- Invalid</em>
2325
- <div *ngIf="inputField.type !== 'state' && inputField.type !== 'textarea' && inputField.type !== 'number' && inputField.type !== 'select' && inputField.type !== 'boolean'">
2370
+ <div *ngIf="inputField.type !== 'date' && inputField.type !== 'datetime' && inputField.type !== 'state' && inputField.type !== 'textarea' && inputField.type !== 'number' && inputField.type !== 'select' && inputField.type !== 'boolean'">
2326
2371
  <input [autofocus]="i === 0 ? true : false" [focus]="i === 0 ? true : false" [formControlName]="inputField.form" [ngClass]="['form-control', validateInput(inputField, formInput)]" [type]="(inputField.type ? inputField.type : 'text')">
2327
2372
  <ng-container *ngFor="let errorMsg of getErrorMessages(inputField, formInput);">
2328
2373
  <div class="invalid-feedback">{{errorMsg}}</div>
@@ -2357,6 +2402,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2357
2402
  <div class="invalid-feedback">{{errorMsg}}</div>
2358
2403
  </ng-container>
2359
2404
  </div>
2405
+ <div *ngIf="inputField.type === 'date'">
2406
+ <div class="input-group">
2407
+ <input [formControlName]="inputField.form" placeholder="yyyy-mm-dd" ngbDatepicker [firstDayOfWeek]="7" #d="ngbDatepicker" [ngClass]="['form-control', validateInput(inputField, formInput)]" (click)="d.toggle()">
2408
+ <div class="input-group-append" (click)="d.toggle()">
2409
+ <div class="input-group-text">
2410
+ <i class="fa fa-calendar" aria-hidden="true"></i>
2411
+ </div>
2412
+ </div>
2413
+ </div>
2414
+ </div>
2415
+ <div *ngIf="inputField.type === 'datetime'">
2416
+ <div class="row" style="align-items: center;">
2417
+ <div class="col-sm-8">
2418
+ <label class="form-control-label" style="align-items: top;">Date/Time</label>
2419
+ <div class="input-group">
2420
+ <input [formControlName]="inputField.form" placeholder="yyyy-mm-dd" ngbDatepicker [firstDayOfWeek]="7" #d="ngbDatepicker" [ngClass]="['form-control', validateInput(inputField, formInput)]" (click)="d.toggle()">
2421
+ <div class="input-group-append" (click)="d.toggle()">
2422
+ <div class="input-group-text">
2423
+ <i class="fa fa-calendar" aria-hidden="true"></i>
2424
+ </div>
2425
+ </div>
2426
+ </div>
2427
+ </div>
2428
+ <div class="col-sm-4">
2429
+ <label class="form-control-label" style="align-items: top;">&nbsp;</label>
2430
+ <ngb-timepicker [formControlName]="inputField.form + '_time'" meridian="ON" [ngClass]="[validateInput(inputField, formInput)]"></ngb-timepicker>
2431
+ </div>
2432
+ </div>
2433
+ </div>
2360
2434
  <div *ngIf="inputField.type === 'boolean'" (click)="formInput.controls[inputField.form].setValue(!formInput.controls[inputField.form].value)">
2361
2435
  <i *ngIf="formInput.controls[inputField.form].value" class="fa fa-check" style="color: green; font-size: 24px;" aria-hidden="true"></i>
2362
2436
  <i *ngIf="!formInput.controls[inputField.form].value" class="fa fa-times" style="color: red; font-size: 24px;" aria-hidden="true"></i>