nuxeo-development-framework 3.3.9 → 3.4.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.
- package/bundles/nuxeo-development-framework.umd.js +17 -6
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/dynamic-form/components/dynamic-form-dateitem/dynamic-form-dateitem.component.js +15 -4
- package/esm2015/lib/components/dynamic-form/dynamic-form.module.js +5 -5
- package/fesm2015/nuxeo-development-framework.js +18 -7
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/dynamic-form/components/dynamic-form-dateitem/dynamic-form-dateitem.component.d.ts +1 -0
- package/lib/components/dynamic-form/dynamic-form.module.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6153,6 +6153,7 @@
|
|
|
6153
6153
|
this.selectMode = 'single';
|
|
6154
6154
|
this.isfilter = false; // showed error when building lib that this property is not exist
|
|
6155
6155
|
this.placeholder = ''; // showed error when building lib that this property is not exist
|
|
6156
|
+
this.displayedTime = '';
|
|
6156
6157
|
this.onDestroy$ = new rxjs.Subject();
|
|
6157
6158
|
this.onChange = function () { };
|
|
6158
6159
|
this.onTouched = function () { };
|
|
@@ -6168,7 +6169,14 @@
|
|
|
6168
6169
|
};
|
|
6169
6170
|
DynamicFormDateItemComponent.prototype.writeValue = function (obj) {
|
|
6170
6171
|
if (this.selectMode === 'single') {
|
|
6171
|
-
|
|
6172
|
+
if (obj) {
|
|
6173
|
+
moment__default['default'].locale('en-au');
|
|
6174
|
+
this.valueDate = obj;
|
|
6175
|
+
this.displayedTime = moment__default['default'](obj).format("HH:mm");
|
|
6176
|
+
}
|
|
6177
|
+
else {
|
|
6178
|
+
this.displayedTime = '';
|
|
6179
|
+
}
|
|
6172
6180
|
}
|
|
6173
6181
|
else {
|
|
6174
6182
|
this.valueDate = obj;
|
|
@@ -6242,6 +6250,7 @@
|
|
|
6242
6250
|
DynamicFormDateItemComponent.prototype.onDateChanged = function (newDateValue) {
|
|
6243
6251
|
if (this.valueDate) {
|
|
6244
6252
|
if (this.selectMode === 'single') {
|
|
6253
|
+
moment__default['default'].locale('en-au');
|
|
6245
6254
|
var momentDate = moment__default['default'](this.valueDate, this.dateFormat, true);
|
|
6246
6255
|
if (momentDate.isValid()) {
|
|
6247
6256
|
//this.property.value = momentDate.toDate();
|
|
@@ -6249,6 +6258,7 @@
|
|
|
6249
6258
|
this.onTouched();
|
|
6250
6259
|
// this.dynamicFormUpdateService.update(this.property, momentDate.toDate());
|
|
6251
6260
|
}
|
|
6261
|
+
this.displayedTime = moment__default['default'](this.valueDate).format("HH:mm");
|
|
6252
6262
|
}
|
|
6253
6263
|
else {
|
|
6254
6264
|
this.onChange(this.valueDate);
|
|
@@ -6264,16 +6274,17 @@
|
|
|
6264
6274
|
this.valueDate = null;
|
|
6265
6275
|
this.onChange(this.valueDate);
|
|
6266
6276
|
this.onTouched();
|
|
6277
|
+
this.displayedTime = '';
|
|
6267
6278
|
// this.dynamicFormUpdateService.update(this.property, null);
|
|
6268
6279
|
//this.property.value = null;
|
|
6269
|
-
this.property.default = null;
|
|
6280
|
+
this.property ? this.property.default = null : '';
|
|
6270
6281
|
};
|
|
6271
6282
|
return DynamicFormDateItemComponent;
|
|
6272
6283
|
}());
|
|
6273
6284
|
DynamicFormDateItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DynamicFormDateItemComponent, deps: [{ token: DynamicFormUpdateService }, { token: i2__namespace$5.DateAdapter }, { token: UserPreferencesService$1 }, { token: i1__namespace$1.TranslateService }, { token: i6__namespace.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6274
6285
|
DynamicFormDateItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DynamicFormDateItemComponent, selector: "app-dynamic-form-dateitem", inputs: { label: "label", disabled: "disabled", property: "property", editable: "editable", displayEmpty: "displayEmpty", min: "min", max: "max", startAt: "startAt", displayClearAction: "displayClearAction", pickerType: "pickerType", selectMode: "selectMode", isfilter: "isfilter", placeholder: "placeholder" }, providers: [
|
|
6275
6286
|
{ provide: i6$1.OWL_DATE_TIME_FORMATS, useValue: MY_MOMENT_FORMATS }
|
|
6276
|
-
], viewQueries: [{ propertyName: "datepicker", first: true, predicate: ["datetimePicker"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"app-property-value\">\r\n <div class=\"app-input-wrapper\">\r\n <ng-container *ngIf=\"label\">\r\n <label class=\"\" for=\"formGroupInputSmall\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span>\r\n </label>\r\n </ng-container>\r\n <div class=\"input-container\">\r\n <ng-container *ngIf=\"isEditable(); else readOnly\">\r\n\r\n <button *ngIf=\"!isfilter\" type=\"button\" class=\"claendar-icon\" [owlDateTimeTrigger]=\"dt3\">\r\n <i class=\"bi bi-calendar-week icon\"></i> </button>\r\n <input\r\n class=\"form-control\"\r\n [disabled]=\"isDisabled() || null\"\r\n (blur)=\"onTouched($event)\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [selectMode]=\"selectMode\"\r\n [required]=\"isRequired\"\r\n [(ngModel)]=\"valueDate\"\r\n (ngModelChange)=\"onDateChanged($event)\"\r\n autocomplete=\"false\"\r\n [owlDateTimeTrigger]=\"dt3\"\r\n [owlDateTime]=\"dt3\"\r\n placeholder=\"{{ placeholder }}\"\r\n />\r\n <button type=\"button\" *ngIf=\"valueDate\" (click)=\"onDateClear()\" class=\"relative mx-1 clear-date-btn\"\r\n [ngClass]=\"{'d-none': isDisabled()}\">\r\n <i class=\"clear-date-icon material-icons flex mr-1\"></i>\r\n </button>\r\n <owl-date-time\r\n [startAt]=\"startAt\"\r\n [pickerType]=\"pickerType\"\r\n #dt3\r\n ></owl-date-time>\r\n\r\n <mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n >\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n
|
|
6287
|
+
], viewQueries: [{ propertyName: "datepicker", first: true, predicate: ["datetimePicker"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"app-property-value\">\r\n <div class=\"app-input-wrapper\">\r\n <ng-container *ngIf=\"label\">\r\n <label class=\"\" for=\"formGroupInputSmall\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span>\r\n </label>\r\n </ng-container>\r\n <div class=\"input-container\">\r\n <ng-container *ngIf=\"isEditable(); else readOnly\">\r\n\r\n <button *ngIf=\"!isfilter && pickerType !== 'timer'\" type=\"button\" class=\"claendar-icon\" [owlDateTimeTrigger]=\"dt3\">\r\n <i class=\"bi bi-calendar-week icon\"></i> </button>\r\n\r\n <button *ngIf=\"!isfilter && pickerType === 'timer'\" type=\"button\" class=\"claendar-icon\" [owlDateTimeTrigger]=\"dt3\">\r\n <i class=\"bi bi-clock icon\"></i> </button>\r\n <input\r\n class=\"form-control date\"\r\n [disabled]=\"isDisabled() || null\"\r\n (blur)=\"onTouched($event)\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [selectMode]=\"selectMode\"\r\n [required]=\"isRequired\"\r\n [(ngModel)]=\"valueDate\"\r\n (ngModelChange)=\"onDateChanged($event)\"\r\n autocomplete=\"false\"\r\n [owlDateTimeTrigger]=\"dt3\"\r\n [owlDateTime]=\"dt3\"\r\n placeholder=\"{{ placeholder }}\"\r\n />\r\n <input\r\n class=\"form-control timer\"\r\n [disabled]=\"true\"\r\n [required]=\"isRequired\"\r\n [(ngModel)]=\"displayedTime\"\r\n placeholder=\"{{ placeholder }}\"\r\n />\r\n <button type=\"button\" *ngIf=\"valueDate\" (click)=\"onDateClear()\" class=\"relative mx-1 clear-date-btn\"\r\n [ngClass]=\"{'d-none': isDisabled()}\">\r\n <i class=\"clear-date-icon material-icons flex mr-1\"></i>\r\n </button>\r\n <owl-date-time\r\n [startAt]=\"startAt\"\r\n [pickerType]=\"pickerType\"\r\n #dt3\r\n ></owl-date-time>\r\n\r\n <mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n >\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n <span *ngIf=\"label\" class=\"mx-1\">{{ label | translate}}</span> {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n </ul>\r\n </mat-error>\r\n </ng-container>\r\n <ng-template #readOnly>\r\n {{ valueDate | date }}\r\n </ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".clear-date-icon{color:#999;font-size:15px}.input-container{position:relative}.input-container .form-control{padding:0 35px}.clear-date-btn{align-items:center;background:transparent;border:0px;position:absolute;right:10px;left:auto;top:50%;margin-top:-9px}.claendar-icon{border:none;background-color:transparent;position:absolute;top:5px}.claendar-icon .icon{font-size:20px;color:#495057}.claendar-icon:focus{outline:none}.rtl .clear-date-btn{left:10px;right:auto}.rtl .owl-dt-container-info{direction:rtl}\n"], components: [{ type: i6__namespace$1.OwlDateTimeComponent, selector: "owl-date-time", inputs: ["backdropClass", "panelClass", "startAt", "pickerType", "pickerMode", "disabled", "opened", "scrollStrategy"], outputs: ["afterPickerClosed", "afterPickerOpen", "yearSelected", "monthSelected"], exportAs: ["owlDateTime"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace$1.OwlDateTimeTriggerDirective, selector: "[owlDateTimeTrigger]", inputs: ["disabled", "owlDateTimeTrigger"] }, { type: i6__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6__namespace$1.OwlDateTimeInputDirective, selector: "input[owlDateTime]", inputs: ["rangeSeparator", "value", "owlDateTime", "owlDateTimeFilter", "_disabled", "min", "max", "selectMode", "values"], outputs: ["dateTimeChange", "dateTimeInput"], exportAs: ["owlDateTimeInput"] }, { type: i6__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace$2.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1__namespace$1.TranslatePipe, "date": i3__namespace.DatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
6277
6288
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DynamicFormDateItemComponent, decorators: [{
|
|
6278
6289
|
type: i0.Component,
|
|
6279
6290
|
args: [{
|
|
@@ -10591,7 +10602,7 @@
|
|
|
10591
10602
|
i6.FormsModule,
|
|
10592
10603
|
LibrarySharedModule,
|
|
10593
10604
|
i6$1.OwlDateTimeModule,
|
|
10594
|
-
i6$1.
|
|
10605
|
+
i6$1.OwlNativeDateTimeModule,
|
|
10595
10606
|
i6.ReactiveFormsModule,
|
|
10596
10607
|
datepicker.MatDatepickerModule,
|
|
10597
10608
|
i2$5.MatNativeDateModule,
|
|
@@ -10642,7 +10653,7 @@
|
|
|
10642
10653
|
i6.FormsModule,
|
|
10643
10654
|
LibrarySharedModule,
|
|
10644
10655
|
i6$1.OwlDateTimeModule,
|
|
10645
|
-
i6$1.
|
|
10656
|
+
i6$1.OwlNativeDateTimeModule,
|
|
10646
10657
|
i6.ReactiveFormsModule,
|
|
10647
10658
|
datepicker.MatDatepickerModule,
|
|
10648
10659
|
i2$5.MatNativeDateModule,
|
|
@@ -10674,7 +10685,7 @@
|
|
|
10674
10685
|
i6.FormsModule,
|
|
10675
10686
|
LibrarySharedModule,
|
|
10676
10687
|
i6$1.OwlDateTimeModule,
|
|
10677
|
-
i6$1.
|
|
10688
|
+
i6$1.OwlNativeDateTimeModule,
|
|
10678
10689
|
i6.ReactiveFormsModule,
|
|
10679
10690
|
datepicker.MatDatepickerModule,
|
|
10680
10691
|
i2$5.MatNativeDateModule,
|