@klippa/ngx-enhancy-forms 5.2.1 → 5.3.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/klippa-ngx-enhancy-forms.umd.js +11 -2
- package/bundles/klippa-ngx-enhancy-forms.umd.js.map +1 -1
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js +1 -1
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js.map +1 -1
- package/esm2015/lib/elements/date-time-picker/date-time-picker.component.js +13 -5
- package/fesm2015/klippa-ngx-enhancy-forms.js +12 -4
- package/fesm2015/klippa-ngx-enhancy-forms.js.map +1 -1
- package/klippa-ngx-enhancy-forms.metadata.json +1 -1
- package/lib/elements/date-time-picker/date-time-picker.component.d.ts +5 -2
- package/package.json +1 -1
|
@@ -1358,17 +1358,20 @@
|
|
|
1358
1358
|
|
|
1359
1359
|
var KLP_DATE_FORMATS = new core.InjectionToken('klp.form.date.formats');
|
|
1360
1360
|
var DATE_TIME_PICKER_TRANSLATIONS = new core.InjectionToken('klp.form.dateTime.translations');
|
|
1361
|
+
var DATE_PICKER_LOCALE = new core.InjectionToken('klp.form.dateTime.locale');
|
|
1361
1362
|
function matDateFormatsFactory(component, dateFormats) {
|
|
1362
1363
|
var _a;
|
|
1363
1364
|
return (_a = dateFormats === null || dateFormats === void 0 ? void 0 : dateFormats(component.format)) !== null && _a !== void 0 ? _a : core$1.MAT_NATIVE_DATE_FORMATS;
|
|
1364
1365
|
}
|
|
1365
1366
|
var DateTimePickerComponent = /** @class */ (function (_super) {
|
|
1366
1367
|
__extends(DateTimePickerComponent, _super);
|
|
1367
|
-
function DateTimePickerComponent(parent, controlContainer, translations, cdr) {
|
|
1368
|
+
function DateTimePickerComponent(parent, controlContainer, translations, datePickerLocale, dateAdapter, cdr) {
|
|
1368
1369
|
var _this = _super.call(this, parent, controlContainer) || this;
|
|
1369
1370
|
_this.parent = parent;
|
|
1370
1371
|
_this.controlContainer = controlContainer;
|
|
1371
1372
|
_this.translations = translations;
|
|
1373
|
+
_this.datePickerLocale = datePickerLocale;
|
|
1374
|
+
_this.dateAdapter = dateAdapter;
|
|
1372
1375
|
_this.cdr = cdr;
|
|
1373
1376
|
_this.minDate = undefined;
|
|
1374
1377
|
_this.maxDate = undefined;
|
|
@@ -1395,6 +1398,9 @@
|
|
|
1395
1398
|
}
|
|
1396
1399
|
return true;
|
|
1397
1400
|
};
|
|
1401
|
+
if (isValueSet(datePickerLocale)) {
|
|
1402
|
+
dateAdapter.setLocale(datePickerLocale());
|
|
1403
|
+
}
|
|
1398
1404
|
return _this;
|
|
1399
1405
|
}
|
|
1400
1406
|
DateTimePickerComponent.prototype.ngOnInit = function () {
|
|
@@ -1643,7 +1649,7 @@
|
|
|
1643
1649
|
provide: core$1.MAT_DATE_FORMATS,
|
|
1644
1650
|
deps: [DateTimePickerComponent, [new core.Optional(), KLP_DATE_FORMATS]],
|
|
1645
1651
|
useFactory: matDateFormatsFactory,
|
|
1646
|
-
}
|
|
1652
|
+
},
|
|
1647
1653
|
],
|
|
1648
1654
|
styles: [":host{display:block}:host ::ng-deep mat-form-field{display:block;height:100%}:host ::ng-deep mat-form-field.mat-focused .mat-form-field-label,:host ::ng-deep mat-form-field .mat-form-field-label{color:#adadad}:host ::ng-deep .mat-datepicker-toggle-active{color:#666}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field-flex{flex-direction:row-reverse}:host ::ng-deep .mat-form-field-infix{border-top:none;width:auto}:host ::ng-deep .mat-form-field-suffix{margin-right:.625rem}:host ::ng-deep .mat-form-field-suffix:hover .mat-button-focus-overlay{opacity:.1}:host ::ng-deep .mat-form-field-underline{display:none}:host ::ng-deep .daysSelectedCaption{cursor:pointer}:host ::ng-deep .daysSelectedCaption.disabled{cursor:zoom-in}:host ::ng-deep .inputForMultipleDays{display:none}.componentContainer{border-radius:2px;color:#888da8;display:flex;position:relative}.componentContainer .placeholderForMultipleSelection{color:#adadad}.componentContainer.showErrors .clearButton.withoutSpacing,.componentContainer.showErrors .dateContainer,.componentContainer.showErrors .timeContainer{border-color:#ff8000}.componentContainer .clearButton{align-items:center;background:#fff;border:1px solid #e6ecf5;color:#7b7b7b;display:flex;flex:0 0 auto;font-size:18px;margin-left:1.25rem;padding:6px 14px}.componentContainer .clearButton.withoutSpacing{border-left:none;margin-left:0}.componentContainer .clearButton:disabled{background:#f9f9f9;border:1px solid #e6ecf5}.componentContainer .dateContainer{background:#fff;border:1px solid #e6ecf5;flex:1 1 auto;padding:6px}.componentContainer .dateContainer.noRightBorder{border-right:none}.componentContainer .dateContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer{align-items:center;background:#fff;border:1px solid #e6ecf5;display:flex;flex:0 0 auto;margin-left:1.25rem;padding:6px .625rem}.componentContainer .timeContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer input{border:none;color:#888da8;padding:0;text-align:center;width:20px}.componentContainer .timeContainer input::-moz-placeholder{color:#adadad}.componentContainer .timeContainer input:-ms-input-placeholder{color:#adadad}.componentContainer .timeContainer input::placeholder{color:#adadad}.componentContainer .timeContainer .divider{margin:0 .3125rem}"]
|
|
1649
1655
|
},] }
|
|
@@ -1652,6 +1658,8 @@
|
|
|
1652
1658
|
{ type: FormElementComponent, decorators: [{ type: core.Host }, { type: core.Optional }] },
|
|
1653
1659
|
{ type: forms.ControlContainer, decorators: [{ type: core.Host }, { type: core.Optional }] },
|
|
1654
1660
|
{ type: undefined, decorators: [{ type: core.Inject, args: [DATE_TIME_PICKER_TRANSLATIONS,] }, { type: core.Optional }] },
|
|
1661
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATE_PICKER_LOCALE,] }, { type: core.Optional }] },
|
|
1662
|
+
{ type: core$1.DateAdapter },
|
|
1655
1663
|
{ type: core.ChangeDetectorRef }
|
|
1656
1664
|
]; };
|
|
1657
1665
|
DateTimePickerComponent.propDecorators = {
|
|
@@ -1754,6 +1762,7 @@
|
|
|
1754
1762
|
|
|
1755
1763
|
exports.ButtonComponent = ButtonComponent;
|
|
1756
1764
|
exports.CheckboxComponent = CheckboxComponent;
|
|
1765
|
+
exports.DATE_PICKER_LOCALE = DATE_PICKER_LOCALE;
|
|
1757
1766
|
exports.DATE_PICKER_TRANSLATIONS = DATE_PICKER_TRANSLATIONS;
|
|
1758
1767
|
exports.DATE_TIME_PICKER_TRANSLATIONS = DATE_TIME_PICKER_TRANSLATIONS;
|
|
1759
1768
|
exports.DEFAULT_ERROR_MESSAGES = DEFAULT_ERROR_MESSAGES;
|