@colijnit/corecomponents_v12 256.1.18 → 256.1.20
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/colijnit-corecomponents_v12.umd.js +141 -37
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/base/base-input.component.js +8 -1
- package/esm2015/lib/components/button/button.component.js +1 -1
- package/esm2015/lib/components/filter-item/filter-item.component.js +2 -2
- package/esm2015/lib/components/input-date-picker/input-date-picker.component.js +20 -2
- package/esm2015/lib/components/input-date-range-picker/input-date-range-picker.component.js +65 -30
- package/esm2015/lib/components/input-scanner/bar-code-scanner.js +16 -3
- package/esm2015/lib/components/input-scanner/input-scanner.component.js +28 -4
- package/esm2015/lib/components/input-search/input-search.component.js +6 -1
- package/esm2015/lib/components/list-of-values/list-of-values.module.js +1 -2
- package/esm2015/lib/directives/screen-configuration/screen-configuration.directive.js +2 -1
- package/esm2015/lib/interfaces/screen-config-adapter.component.interface.js +1 -1
- package/esm2015/lib/service/base-module-screen-config.service.js +2 -2
- package/fesm2015/colijnit-corecomponents_v12.js +139 -37
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base/base-input.component.d.ts +4 -0
- package/lib/components/button/button.component.d.ts +2 -0
- package/lib/components/calendar/style/_layout.scss +14 -14
- package/lib/components/calendar/style/_material-definition.scss +3 -3
- package/lib/components/filter-item/filter-item.component.d.ts +2 -0
- package/lib/components/input-date-picker/input-date-picker.component.d.ts +2 -0
- package/lib/components/input-date-range-picker/input-date-range-picker.component.d.ts +5 -0
- package/lib/components/input-scanner/bar-code-scanner.d.ts +3 -0
- package/lib/components/input-scanner/input-scanner.component.d.ts +7 -2
- package/lib/components/input-search/input-search.component.d.ts +1 -0
- package/lib/interfaces/screen-config-adapter.component.interface.d.ts +2 -0
- package/package.json +1 -1
|
@@ -2358,6 +2358,16 @@
|
|
|
2358
2358
|
enumerable: false,
|
|
2359
2359
|
configurable: true
|
|
2360
2360
|
});
|
|
2361
|
+
Object.defineProperty(BaseInputComponent.prototype, "defaultValue", {
|
|
2362
|
+
get: function () {
|
|
2363
|
+
return this._defaultValue;
|
|
2364
|
+
},
|
|
2365
|
+
set: function (defaultValue) {
|
|
2366
|
+
this._defaultValue = defaultValue;
|
|
2367
|
+
},
|
|
2368
|
+
enumerable: false,
|
|
2369
|
+
configurable: true
|
|
2370
|
+
});
|
|
2361
2371
|
Object.defineProperty(BaseInputComponent.prototype, "readonly", {
|
|
2362
2372
|
get: function () {
|
|
2363
2373
|
return this.forceReadonly || this._readonly;
|
|
@@ -3145,6 +3155,7 @@
|
|
|
3145
3155
|
businessObjectId: [{ type: i0.Input }],
|
|
3146
3156
|
disabled: [{ type: i0.Input }],
|
|
3147
3157
|
maxLength: [{ type: i0.Input }],
|
|
3158
|
+
defaultValue: [{ type: i0.Input }],
|
|
3148
3159
|
forcedMaxLength: [{ type: i0.Input }],
|
|
3149
3160
|
readonly: [{ type: i0.Input }],
|
|
3150
3161
|
forceReadonly: [{ type: i0.Input }],
|
|
@@ -5968,6 +5979,23 @@
|
|
|
5968
5979
|
this.overlayService.removeComponent(this._calendarComponentRef);
|
|
5969
5980
|
}
|
|
5970
5981
|
};
|
|
5982
|
+
InputDatePickerComponent.prototype.finalizeDate = function () {
|
|
5983
|
+
if (this.isValidDateString(this.modelAsString)) {
|
|
5984
|
+
var _a = __read(this.modelAsString.split('-').map(Number), 3), year = _a[0], month = _a[1], day = _a[2];
|
|
5985
|
+
var date = new Date(year, month - 1, day);
|
|
5986
|
+
this.setModel(date);
|
|
5987
|
+
}
|
|
5988
|
+
};
|
|
5989
|
+
InputDatePickerComponent.prototype.isValidDateString = function (value) {
|
|
5990
|
+
var regex = /^\d{4}-\d{2}-\d{2}$/;
|
|
5991
|
+
if (!regex.test(value))
|
|
5992
|
+
return false;
|
|
5993
|
+
var _a = __read(value.split('-').map(Number), 3), year = _a[0], month = _a[1], day = _a[2];
|
|
5994
|
+
var date = new Date(year, month - 1, day);
|
|
5995
|
+
return (date.getFullYear() === year &&
|
|
5996
|
+
date.getMonth() === month - 1 &&
|
|
5997
|
+
date.getDate() === day);
|
|
5998
|
+
};
|
|
5971
5999
|
InputDatePickerComponent.prototype.handleDateChange = function (value) {
|
|
5972
6000
|
if (value) {
|
|
5973
6001
|
this.setModel(new Date(value));
|
|
@@ -5995,7 +6023,7 @@
|
|
|
5995
6023
|
InputDatePickerComponent.decorators = [
|
|
5996
6024
|
{ type: i0.Component, args: [{
|
|
5997
6025
|
selector: 'co-input-date',
|
|
5998
|
-
template: "\n <co-input-text (clickOutside)=\"toggleCalendar(false)\" overlayParent #parentForOverlay=\"overlayParent\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [(model)]=\"modelAsString\"\n [rightIcon]=\"rightIcon\"\n [leftIcon]=\"leftIcon\"\n [leftIconData]=\"leftIconData\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [placeholder]=\"placeholder\"\n (leftIconClick)=\"leftIconClick.emit($event)\"\n (rightIconClick)=\"toggleCalendar(true)\"\n (
|
|
6026
|
+
template: "\n <co-input-text (clickOutside)=\"toggleCalendar(false)\" overlayParent #parentForOverlay=\"overlayParent\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [(model)]=\"modelAsString\"\n [rightIcon]=\"rightIcon\"\n [leftIcon]=\"leftIcon\"\n [leftIconData]=\"leftIconData\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [placeholder]=\"placeholder\"\n (leftIconClick)=\"leftIconClick.emit($event)\"\n (rightIconClick)=\"toggleCalendar(true)\"\n (modelChange)=\"modelAsString = $event\"\n (clearIconClick)=\"handleClearIconClicked()\"\n [emptyPlace]=\"true\"\n (keyup.enter)=\"finalizeDate()\"\n ></co-input-text>\n ",
|
|
5999
6027
|
providers: [
|
|
6000
6028
|
OverlayService, {
|
|
6001
6029
|
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, useExisting: i0.forwardRef(function () { return InputDatePickerComponent; })
|
|
@@ -7380,7 +7408,10 @@
|
|
|
7380
7408
|
var InputDateRangePickerComponent = /** @class */ (function (_super) {
|
|
7381
7409
|
__extends(InputDateRangePickerComponent, _super);
|
|
7382
7410
|
function InputDateRangePickerComponent() {
|
|
7383
|
-
|
|
7411
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
7412
|
+
_this.EARLIEST_DATE = new Date(1900, 0, 1); // 1900-01-01
|
|
7413
|
+
_this.LATEST_DATE = new Date(2100, 11, 31); // 2100-12-31
|
|
7414
|
+
return _this;
|
|
7384
7415
|
}
|
|
7385
7416
|
InputDateRangePickerComponent.prototype.showClass = function () {
|
|
7386
7417
|
return true;
|
|
@@ -7423,50 +7454,80 @@
|
|
|
7423
7454
|
}
|
|
7424
7455
|
};
|
|
7425
7456
|
InputDateRangePickerComponent.prototype.handleFirstDateChanged = function (value) {
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7457
|
+
var _this = this;
|
|
7458
|
+
setTimeout(function () {
|
|
7459
|
+
var _a, _b;
|
|
7460
|
+
if (_this.isValidDateString(value)) {
|
|
7461
|
+
var _c = __read(value.split('-').map(Number), 3), year = _c[0], month = _c[1], day = _c[2];
|
|
7462
|
+
var date = new Date(year, month - 1, day);
|
|
7463
|
+
if (!_this.model)
|
|
7464
|
+
_this.setModel([]);
|
|
7465
|
+
_this.setModel([date, (_b = (_a = _this.model) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : null]);
|
|
7429
7466
|
}
|
|
7430
|
-
|
|
7431
|
-
}
|
|
7467
|
+
});
|
|
7432
7468
|
};
|
|
7433
7469
|
InputDateRangePickerComponent.prototype.handleSecondDateChanged = function (value) {
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7470
|
+
var _this = this;
|
|
7471
|
+
setTimeout(function () {
|
|
7472
|
+
var _a, _b;
|
|
7473
|
+
if (_this.isValidDateString(value)) {
|
|
7474
|
+
var _c = __read(value.split('-').map(Number), 3), year = _c[0], month = _c[1], day = _c[2];
|
|
7475
|
+
var date = new Date(year, month - 1, day);
|
|
7476
|
+
if (!_this.model)
|
|
7477
|
+
_this.setModel([]);
|
|
7478
|
+
_this.setModel([(_b = (_a = _this.model) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null, date]);
|
|
7437
7479
|
}
|
|
7438
|
-
|
|
7480
|
+
});
|
|
7481
|
+
};
|
|
7482
|
+
InputDateRangePickerComponent.prototype.finalizeDates = function () {
|
|
7483
|
+
var startDate = this.EARLIEST_DATE;
|
|
7484
|
+
var endDate = this.LATEST_DATE;
|
|
7485
|
+
if (this.isValidDateString(this.firstDateAsString)) {
|
|
7486
|
+
var _c = __read(this.firstDateAsString.split('-').map(Number), 3), y = _c[0], m = _c[1], d = _c[2];
|
|
7487
|
+
startDate = new Date(y, m - 1, d);
|
|
7488
|
+
}
|
|
7489
|
+
if (this.isValidDateString(this.secondDateAsString)) {
|
|
7490
|
+
var _d = __read(this.secondDateAsString.split('-').map(Number), 3), y = _d[0], m = _d[1], d = _d[2];
|
|
7491
|
+
endDate = new Date(y, m - 1, d);
|
|
7439
7492
|
}
|
|
7493
|
+
this.setModel([startDate, endDate]);
|
|
7494
|
+
};
|
|
7495
|
+
InputDateRangePickerComponent.prototype.isValidDateString = function (value) {
|
|
7496
|
+
var regex = /^\d{4}-\d{2}-\d{2}$/;
|
|
7497
|
+
if (!regex.test(value))
|
|
7498
|
+
return false;
|
|
7499
|
+
var _c = __read(value.split('-'), 3), yearStr = _c[0], monthStr = _c[1], dayStr = _c[2];
|
|
7500
|
+
var _d = __read([Number(yearStr), Number(monthStr), Number(dayStr)], 3), year = _d[0], month = _d[1], day = _d[2];
|
|
7501
|
+
// Prevent ancient years or too-far future
|
|
7502
|
+
if (year < 1900 || year > 2100)
|
|
7503
|
+
return false;
|
|
7504
|
+
var date = new Date(year, month - 1, day);
|
|
7505
|
+
return (date.getFullYear() === year &&
|
|
7506
|
+
date.getMonth() === month - 1 &&
|
|
7507
|
+
date.getDate() === day);
|
|
7440
7508
|
};
|
|
7441
7509
|
InputDateRangePickerComponent.prototype.modelSet = function () {
|
|
7442
7510
|
this.setModelAsString();
|
|
7443
7511
|
};
|
|
7444
7512
|
InputDateRangePickerComponent.prototype.setModelAsString = function () {
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
}
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
var month = this.model[1].toLocaleString("default", { month: "2-digit" });
|
|
7457
|
-
var day = this.model[1].toLocaleString("default", { day: "2-digit" });
|
|
7458
|
-
this.secondDateAsString = year + "-" + month + "-" + day;
|
|
7459
|
-
}
|
|
7460
|
-
else {
|
|
7461
|
-
this.secondDateAsString = "";
|
|
7462
|
-
}
|
|
7513
|
+
var _a, _b;
|
|
7514
|
+
var isStartDefault = ((_a = this.model[0]) === null || _a === void 0 ? void 0 : _a.getTime()) === this.EARLIEST_DATE.getTime();
|
|
7515
|
+
var isEndDefault = ((_b = this.model[1]) === null || _b === void 0 ? void 0 : _b.getTime()) === this.LATEST_DATE.getTime();
|
|
7516
|
+
this.firstDateAsString = (!this.model[0] || isStartDefault) ? '' : this.formatDate(this.model[0]);
|
|
7517
|
+
this.secondDateAsString = (!this.model[1] || isEndDefault) ? '' : this.formatDate(this.model[1]);
|
|
7518
|
+
};
|
|
7519
|
+
InputDateRangePickerComponent.prototype.formatDate = function (date) {
|
|
7520
|
+
var year = date.toLocaleString("default", { year: "numeric" });
|
|
7521
|
+
var month = date.toLocaleString("default", { month: "2-digit" });
|
|
7522
|
+
var day = date.toLocaleString("default", { day: "2-digit" });
|
|
7523
|
+
return year + "-" + month + "-" + day;
|
|
7463
7524
|
};
|
|
7464
7525
|
return InputDateRangePickerComponent;
|
|
7465
7526
|
}(BaseInputDatePickerDirective));
|
|
7466
7527
|
InputDateRangePickerComponent.decorators = [
|
|
7467
7528
|
{ type: i0.Component, args: [{
|
|
7468
7529
|
selector: 'co-input-date-range',
|
|
7469
|
-
template: "\n <div class=\"inputs-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-input-text #firstInput class=\"no-focus-line custom-height\"\n [(model)]=\"firstDateAsString\"\n [noClickFocus]=\"true\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [leftIcon]=\"leftIcon\"\n [leftIconData]=\"leftIconData\"\n [placeholder]=\"placeholder\"\n (
|
|
7530
|
+
template: "\n <div class=\"inputs-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-input-text #firstInput class=\"no-focus-line custom-height\"\n [(model)]=\"firstDateAsString\"\n [noClickFocus]=\"true\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [leftIcon]=\"leftIcon\"\n [leftIconData]=\"leftIconData\"\n [placeholder]=\"placeholder\"\n (modelChange)=\"handleFirstDateChanged(firstDateAsString)\"\n (clearIconClick)=\"clearDate(0)\"\n (click)=\"handleFirstInputClick($event)\"\n [emptyPlace]=\"true\"\n (keyup.enter)=\"finalizeDates()\"\n ></co-input-text>\n <co-input-text #secondInput class=\"no-focus-line custom-height\"\n [(model)]= \"secondDateAsString\"\n [noClickFocus]=\"true\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [rightIcon]=\"rightIcon\"\n (rightIconClick)=\"toggleCalendar()\"\n (modelChange)=\"handleSecondDateChanged(secondDateAsString)\"\n (clearIconClick)=\"clearDate(1)\"\n (click)=\"handleSecondInputClick($event)\"\n [emptyPlace]=\"true\"\n (keyup.enter)=\"finalizeDates()\"\n ></co-input-text>\n </div>\n ",
|
|
7470
7531
|
providers: [
|
|
7471
7532
|
OverlayService,
|
|
7472
7533
|
{
|
|
@@ -8278,6 +8339,7 @@
|
|
|
8278
8339
|
function InputSearchComponent() {
|
|
8279
8340
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
8280
8341
|
_this.searchIcon = exports.CoreComponentsIcon.Magnifier;
|
|
8342
|
+
_this.handleKeydown = true;
|
|
8281
8343
|
_this.search = new i0.EventEmitter();
|
|
8282
8344
|
_this.isFocused = new i0.EventEmitter();
|
|
8283
8345
|
_this.leftIconClick = new i0.EventEmitter();
|
|
@@ -8291,6 +8353,9 @@
|
|
|
8291
8353
|
return true;
|
|
8292
8354
|
};
|
|
8293
8355
|
InputSearchComponent.prototype.handleKeyDown = function (event) {
|
|
8356
|
+
if (!this.handleKeydown) {
|
|
8357
|
+
return;
|
|
8358
|
+
}
|
|
8294
8359
|
var enterKeys = ['Enter', 'NumpadEnter', 'Go'];
|
|
8295
8360
|
if (enterKeys.includes(event.key)) {
|
|
8296
8361
|
event.preventDefault();
|
|
@@ -8322,6 +8387,7 @@
|
|
|
8322
8387
|
];
|
|
8323
8388
|
InputSearchComponent.propDecorators = {
|
|
8324
8389
|
placeholder: [{ type: i0.Input }],
|
|
8390
|
+
handleKeydown: [{ type: i0.Input }],
|
|
8325
8391
|
search: [{ type: i0.Output }],
|
|
8326
8392
|
isFocused: [{ type: i0.Output }],
|
|
8327
8393
|
leftIconClick: [{ type: i0.Output }],
|
|
@@ -11925,7 +11991,6 @@
|
|
|
11925
11991
|
OverlayModule,
|
|
11926
11992
|
ClickoutsideModule,
|
|
11927
11993
|
IconModule,
|
|
11928
|
-
InputTextModule,
|
|
11929
11994
|
InputSearchModule
|
|
11930
11995
|
],
|
|
11931
11996
|
declarations: [
|
|
@@ -12939,7 +13004,7 @@
|
|
|
12939
13004
|
FilterItemComponent.decorators = [
|
|
12940
13005
|
{ type: i0.Component, args: [{
|
|
12941
13006
|
selector: "co-filter-item",
|
|
12942
|
-
template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n [showButton]=\"showButton\"\n [buttonText]=\"filterButtonLabel\"\n (buttonClicked)=\"onButtonClicked()\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\"\n (keydown)=\"showButton=true\" (mousedown)=\"showButton=true\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\" *ngIf=\"mode === modes.Filterlist || mode === modes.SingleSelectList\n || mode === modes.SelectListWithNumberOutput || mode === modes.SelectListWithStringCollectionOutput\">\n <co-input-text\n *ngIf=\"collection?.length > 10 || minSearchCharsToLoadCollection\"\n [placeholder]=\"searchPlaceholder\"\n [model]=\"filterText\"\n (modelChange)=\"onModelChange($event)\"\n [readonly]=\"readonly\"\n >\n </co-input-text>\n <div *ngIf=\"isLoading\" class=\"filter-loader\"><span></span></div>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <ng-container\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox *ngIf=\"mode !== modes.SingleSelectList\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n [clickableLabel]=\"false\"\n (modelChange)=\"handleModelChange(option)\"\n [readonly]=\"readonly\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"mode === modes.SingleSelectList\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n [readonly]=\"readonly\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n <div class=\"co-filter-item-slider-content\" *ngIf=\"mode === modes.Slider\">\n <co-input-text\n class=\"slider-from\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'FROM' | coreLocalize\"\n [(model)]=\"sliderMin\"\n [readonly]=\"readonly\"\n (focusout)=\"handleModelChange(sliderMin)\"\n ></co-input-text>\n <co-input-text\n class=\"slider-to\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'TO' | coreLocalize\"\n [(model)]=\"sliderMax\"\n [readonly]=\"readonly\"\n (focusout)=\"handleModelChange(sliderMax)\"\n ></co-input-text>\n </div>\n <div class=\"co-filter-item-slider-content\" *ngIf=\"mode === modes.NullableSlider\">\n <co-input-text\n class=\"slider-from\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'FROM' | coreLocalize\"\n [(model)]=\"sliderMin\"\n [readonly]=\"readonly\"\n (focusout)=\"handleModelChange(sliderMin)\"\n ></co-input-text>\n <co-input-text\n class=\"slider-to\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'TO' | coreLocalize\"\n [(model)]=\"sliderMax\"\n [readonly]=\"readonly\"\n (focusout)=\"handleModelChange(sliderMax)\"\n ></co-input-text>\n </div>\n <div class=\"co-filter-item-checkbox-content\" *ngIf=\"mode === modes.Checkbox \">\n <co-input-checkbox\n [(model)]=\"model\"\n (modelChange)=\"handleModelChange($event)\"\n [readonly]=\"readonly\"\n [label]=\"placeholder\">\n </co-input-checkbox>\n </div>\n <div class=\"co-filter-item-checkbox-content\"\n *ngIf=\"mode === modes.CheckboxToText || mode === modes.CheckboxToSimpleText || mode === modes.CheckboxToBinary\">\n <co-input-checkbox\n [(model)]=\"checkBoxToTextModel\"\n (modelChange)=\"handleModelChange($event)\"\n [readonly]=\"readonly\"\n [label]=\"placeholder\"></co-input-checkbox>\n </div>\n <div class=\"co-filter-item-textfield-content\" *ngIf=\"mode === modes.TextField\">\n <co-input-text\n [(model)]=\"model\" [readonly]=\"readonly\"\n (modelChange)=\"handleModelChange($event)\"></co-input-text>\n </div>\n <div class=\"co-filter-item-dateField-content\" *ngIf=\"mode === modes.DateField\">\n <co-input-date\n [(model)]=\"model\" [readonly]=\"readonly\"\n (modelChange)=\"handleModelChange($event)\"\n ></co-input-date>\n </div>\n <div class=\"co-filter-item-dateField-content\" *ngIf=\"mode === modes.DateRangeField\">\n <co-input-date-range [readonly]=\"readonly\"\n [model]=\"[dateRangeStart, dateRangeEnd]\"\n (modelChange)=\"handleModelChange($event)\"\n [placeholder]=\"'SELECT_DATE' | coreLocalize\">\n </co-input-date-range>\n </div>\n </ng-template>\n </div>\n </co-collapsible>\n </div>\n\n ",
|
|
13007
|
+
template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n [showButton]=\"showButton\"\n [buttonText]=\"filterButtonLabel\"\n (buttonClicked)=\"onButtonClicked()\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\"\n (keydown)=\"showButton=true\" (mousedown)=\"showButton=true\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\" *ngIf=\"mode === modes.Filterlist || mode === modes.SingleSelectList\n || mode === modes.SelectListWithNumberOutput || mode === modes.SelectListWithStringCollectionOutput\">\n <co-input-text\n *ngIf=\"collection?.length > 10 || minSearchCharsToLoadCollection\"\n [placeholder]=\"searchPlaceholder\"\n [model]=\"filterText\"\n (modelChange)=\"onModelChange($event)\"\n [readonly]=\"readonly\"\n >\n </co-input-text>\n <div *ngIf=\"isLoading\" class=\"filter-loader\"><span></span></div>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <ng-container\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox *ngIf=\"mode !== modes.SingleSelectList\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n [clickableLabel]=\"false\"\n (modelChange)=\"handleModelChange(option)\"\n [readonly]=\"readonly\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"mode === modes.SingleSelectList\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n [readonly]=\"readonly\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n <div class=\"co-filter-item-slider-content\" *ngIf=\"mode === modes.Slider\">\n <co-input-text\n class=\"slider-from\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'FROM' | coreLocalize\"\n [(model)]=\"sliderMin\"\n [readonly]=\"readonly\"\n (focusout)=\"handleModelChange(sliderMin)\"\n ></co-input-text>\n <co-input-text\n class=\"slider-to\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'TO' | coreLocalize\"\n [(model)]=\"sliderMax\"\n [readonly]=\"readonly\"\n (focusout)=\"handleModelChange(sliderMax)\"\n ></co-input-text>\n </div>\n <div class=\"co-filter-item-slider-content\" *ngIf=\"mode === modes.NullableSlider\">\n <co-input-text\n class=\"slider-from\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'FROM' | coreLocalize\"\n [(model)]=\"sliderMin\"\n [readonly]=\"readonly\"\n (focusout)=\"handleModelChange(sliderMin)\"\n ></co-input-text>\n <co-input-text\n class=\"slider-to\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'TO' | coreLocalize\"\n [(model)]=\"sliderMax\"\n [readonly]=\"readonly\"\n (focusout)=\"handleModelChange(sliderMax)\"\n ></co-input-text>\n </div>\n <div class=\"co-filter-item-checkbox-content\" *ngIf=\"mode === modes.Checkbox \">\n <co-input-checkbox\n [(model)]=\"model\"\n (modelChange)=\"handleModelChange($event)\"\n [readonly]=\"readonly\"\n [label]=\"placeholder\">\n </co-input-checkbox>\n </div>\n <div class=\"co-filter-item-checkbox-content\"\n *ngIf=\"mode === modes.CheckboxToText || mode === modes.CheckboxToSimpleText || mode === modes.CheckboxToBinary\">\n <co-input-checkbox\n [(model)]=\"checkBoxToTextModel\"\n (modelChange)=\"handleModelChange($event)\"\n [readonly]=\"readonly\"\n [label]=\"placeholder\"></co-input-checkbox>\n </div>\n <div class=\"co-filter-item-textfield-content\" *ngIf=\"mode === modes.TextField\">\n <co-input-text\n [(model)]=\"model\" [readonly]=\"readonly\"\n (modelChange)=\"handleModelChange($event)\"></co-input-text>\n </div>\n <div class=\"co-filter-item-dateField-content\" *ngIf=\"mode === modes.DateField\">\n <co-input-date\n [(model)]=\"model\" [readonly]=\"readonly\"\n (modelChange)=\"handleModelChange($event)\"\n ></co-input-date>\n </div>\n <div class=\"co-filter-item-dateField-content\" *ngIf=\"mode === modes.DateRangeField\">\n <co-input-date-range [readonly]=\"readonly\"\n [model]=\"[dateRangeStart, dateRangeEnd]\"\n (modelChange)=\"handleModelChange($event)\"\n [placeholder]=\"'Kies datum' | coreLocalize\">\n </co-input-date-range>\n </div>\n </ng-template>\n </div>\n </co-collapsible>\n </div>\n\n ",
|
|
12943
13008
|
encapsulation: i0.ViewEncapsulation.None,
|
|
12944
13009
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
12945
13010
|
providers: [{
|
|
@@ -13178,11 +13243,17 @@
|
|
|
13178
13243
|
var _this = this;
|
|
13179
13244
|
this._buffer = [];
|
|
13180
13245
|
this._keyPress = function (event) {
|
|
13246
|
+
_this._clearScanTimeout();
|
|
13181
13247
|
if (event.key === "Enter") {
|
|
13182
|
-
|
|
13183
|
-
|
|
13248
|
+
if (_this._buffer.length > 0) {
|
|
13249
|
+
document.dispatchEvent(_this._createScanEvent());
|
|
13250
|
+
_this._clearBuffer();
|
|
13251
|
+
}
|
|
13184
13252
|
}
|
|
13185
13253
|
else {
|
|
13254
|
+
_this._scanTimeout = setTimeout(function () {
|
|
13255
|
+
_this._clearBuffer();
|
|
13256
|
+
}, 200);
|
|
13186
13257
|
var str = event.key;
|
|
13187
13258
|
_this._buffer.push(str);
|
|
13188
13259
|
}
|
|
@@ -13192,6 +13263,13 @@
|
|
|
13192
13263
|
BarCodeScanner.prototype.close = function () {
|
|
13193
13264
|
document.removeEventListener('keypress', this._keyPress);
|
|
13194
13265
|
};
|
|
13266
|
+
BarCodeScanner.prototype._clearScanTimeout = function () {
|
|
13267
|
+
clearTimeout(this._scanTimeout);
|
|
13268
|
+
this._scanTimeout = undefined;
|
|
13269
|
+
};
|
|
13270
|
+
BarCodeScanner.prototype._clearBuffer = function () {
|
|
13271
|
+
this._buffer.length = 0;
|
|
13272
|
+
};
|
|
13195
13273
|
BarCodeScanner.prototype._createScanEvent = function () {
|
|
13196
13274
|
return new CustomEvent("barcodescanned", { detail: this._buffer.join("") });
|
|
13197
13275
|
};
|
|
@@ -13238,21 +13316,45 @@
|
|
|
13238
13316
|
this.search = new i0.EventEmitter();
|
|
13239
13317
|
this.isFocused = new i0.EventEmitter();
|
|
13240
13318
|
this.barCodeScanned = new i0.EventEmitter();
|
|
13319
|
+
this._blockEnterKeydown = false;
|
|
13241
13320
|
this._scannerService.registerInput(this);
|
|
13242
13321
|
}
|
|
13243
13322
|
InputScannerComponent.prototype.showClass = function () {
|
|
13244
13323
|
return true;
|
|
13245
13324
|
};
|
|
13325
|
+
InputScannerComponent.prototype.ngOnDestroy = function () {
|
|
13326
|
+
this._clearTimeout();
|
|
13327
|
+
};
|
|
13328
|
+
InputScannerComponent.prototype.handleKeyDown = function (event) {
|
|
13329
|
+
var _this = this;
|
|
13330
|
+
this._clearTimeout();
|
|
13331
|
+
this._keyDownTimeout = setTimeout(function () {
|
|
13332
|
+
if (_this._blockEnterKeydown) {
|
|
13333
|
+
return;
|
|
13334
|
+
}
|
|
13335
|
+
var enterKeys = ['Enter', 'NumpadEnter', 'Go'];
|
|
13336
|
+
if (enterKeys.includes(event.key)) {
|
|
13337
|
+
_this.search.next(_this.model);
|
|
13338
|
+
}
|
|
13339
|
+
}, 200);
|
|
13340
|
+
};
|
|
13246
13341
|
InputScannerComponent.prototype.triggerCodeScanned = function (code) {
|
|
13342
|
+
this._clearTimeout();
|
|
13343
|
+
this._blockEnterKeydown = true;
|
|
13247
13344
|
this.model = code;
|
|
13248
13345
|
this.barCodeScanned.next(this.model);
|
|
13346
|
+
this._blockEnterKeydown = false;
|
|
13347
|
+
};
|
|
13348
|
+
InputScannerComponent.prototype._clearTimeout = function () {
|
|
13349
|
+
clearTimeout(this._keyDownTimeout);
|
|
13350
|
+
this._keyDownTimeout = undefined;
|
|
13249
13351
|
};
|
|
13250
13352
|
return InputScannerComponent;
|
|
13251
13353
|
}());
|
|
13252
13354
|
InputScannerComponent.decorators = [
|
|
13253
13355
|
{ type: i0.Component, args: [{
|
|
13254
13356
|
selector: 'co-input-scanner',
|
|
13255
|
-
template: "\n <co-input-search\n [(model)]=\"model\"\n [customCssClass]=\"customCssClass\"\n [placeholder]=\"placeholder\"\n [centerLabel]=\"centerLabel\"\n [useLeftIcon]=\"useLeftIcon\"\n [leftIconData]=\"leftIconData\"\n [useRightIcon]=\"useRightIcon\"\n [rightIconData]=\"rightIconData\"\n (leftIconClick)=\"leftIconClick.emit($event)\"\n (rightIconClick)=\"rightIconClick.emit($event)\"\n (
|
|
13357
|
+
template: "\n <co-input-search\n [(model)]=\"model\"\n [handleKeydown]=\"false\"\n [customCssClass]=\"customCssClass\"\n [placeholder]=\"placeholder\"\n [centerLabel]=\"centerLabel\"\n [useLeftIcon]=\"useLeftIcon\"\n [leftIconData]=\"leftIconData\"\n [useRightIcon]=\"useRightIcon\"\n [rightIconData]=\"rightIconData\"\n (leftIconClick)=\"leftIconClick.emit($event)\"\n (rightIconClick)=\"rightIconClick.emit($event)\"\n (isFocused)=\"isFocused.emit($event)\"\n ></co-input-search>\n ",
|
|
13256
13358
|
providers: [
|
|
13257
13359
|
ScannerService,
|
|
13258
13360
|
OverlayService
|
|
@@ -13278,7 +13380,8 @@
|
|
|
13278
13380
|
search: [{ type: i0.Output }],
|
|
13279
13381
|
isFocused: [{ type: i0.Output }],
|
|
13280
13382
|
barCodeScanned: [{ type: i0.Output }],
|
|
13281
|
-
showClass: [{ type: i0.HostBinding, args: ['class.co-input-scanner',] }]
|
|
13383
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-input-scanner',] }],
|
|
13384
|
+
handleKeyDown: [{ type: i0.HostListener, args: ['keydown', ['$event'],] }]
|
|
13282
13385
|
};
|
|
13283
13386
|
|
|
13284
13387
|
var InputScannerModule = /** @class */ (function () {
|
|
@@ -13800,7 +13903,7 @@
|
|
|
13800
13903
|
};
|
|
13801
13904
|
BaseModuleScreenConfigService.prototype.getDefaultValue = function (configName) {
|
|
13802
13905
|
var objectConfig = this._objectConfigsMap.get(configName);
|
|
13803
|
-
return objectConfig ? objectConfig.
|
|
13906
|
+
return objectConfig ? objectConfig.defaultValue : undefined;
|
|
13804
13907
|
};
|
|
13805
13908
|
BaseModuleScreenConfigService.prototype.getDefaultStringValue = function (configName) {
|
|
13806
13909
|
var objectConfig = this._objectConfigsMap.get(configName);
|
|
@@ -14037,6 +14140,7 @@
|
|
|
14037
14140
|
this.hostComponent.readonly = this.hostComponent.forceReadonly || this._moduleInReadonlyMode() || myCfgObj.isReadonly();
|
|
14038
14141
|
this.hostComponent.decimals = myCfgObj.scale;
|
|
14039
14142
|
this.hostComponent.maxLength = myCfgObj.maxLength;
|
|
14143
|
+
this.hostComponent.defaultValue = myCfgObj.defaultValue;
|
|
14040
14144
|
if ('configObject' in this.hostComponent) {
|
|
14041
14145
|
this.hostComponent.configObject = myCfgObj;
|
|
14042
14146
|
}
|