@colijnit/corecomponents_v12 12.2.12 → 12.2.14
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 +723 -281
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.d.ts +11 -7
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/colijnit-corecomponents_v12.js +12 -8
- package/esm2015/lib/components/base/dialog-base.component.js +6 -0
- package/esm2015/lib/components/core-dialog/confirmation-dialog/confirmation-dialog.component.js +79 -0
- package/esm2015/lib/components/core-dialog/core-dialog.module.js +39 -0
- package/esm2015/lib/components/core-dialog/core-dialog.service.js +67 -0
- package/esm2015/lib/components/core-dialog/core-dynamic-component.service.js +93 -0
- package/esm2015/lib/components/filter-item/filter-item.component.js +145 -145
- package/esm2015/lib/components/input-scanner/bar-code-scanner.js +23 -0
- package/esm2015/lib/components/input-scanner/input-scanner.component.js +69 -0
- package/esm2015/lib/components/input-scanner/input-scanner.module.js +21 -0
- package/esm2015/lib/components/input-scanner/scanner.service.js +28 -0
- package/esm2015/lib/components/input-search/input-search.component.js +2 -1
- package/esm2015/lib/components/input-text/input-text.component.js +2 -1
- package/esm2015/lib/components/simple-grid/simple-grid-cell.component.js +37 -27
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +55 -35
- package/esm2015/lib/components/simple-grid/simple-grid.module.js +4 -2
- package/esm2015/lib/components/validation-error/validation-error.component.js +6 -6
- package/esm2015/lib/core/enum/core-components-icon.enum.js +2 -1
- package/esm2015/lib/core/model/core-components-icon-svg.js +2 -1
- package/esm2015/lib/interfaces/dialog-response.interface.js +2 -0
- package/esm2015/lib/interfaces/scanner-input.interface.js +2 -0
- package/esm2015/lib/model/enum/app-button-type.enum.js +11 -0
- package/esm2015/lib/model/enum/app-popup-type.enum.js +8 -0
- package/esm2015/lib/translation/core-components-translation.module.js +6 -6
- package/esm2015/lib/translation/core-components-translation.service.js +3 -3
- package/esm2015/lib/translation/core-dictionary.service.js +29 -0
- package/esm2015/lib/translation/core-localize.pipe.js +26 -0
- package/esm2015/public-api.js +16 -11
- package/fesm2015/colijnit-corecomponents_v12.js +870 -425
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base/dialog-base.component.d.ts +4 -0
- package/lib/components/core-dialog/confirmation-dialog/confirmation-dialog.component.d.ts +20 -0
- package/lib/components/core-dialog/confirmation-dialog/style/_layout.scss +30 -0
- package/lib/components/core-dialog/confirmation-dialog/style/_material-definition.scss +2 -0
- package/lib/components/core-dialog/confirmation-dialog/style/_theme.scss +6 -0
- package/lib/components/core-dialog/confirmation-dialog/style/material.scss +4 -0
- package/lib/components/core-dialog/core-dialog.module.d.ts +4 -0
- package/lib/components/core-dialog/core-dialog.service.d.ts +15 -0
- package/lib/components/core-dialog/core-dynamic-component.service.d.ts +12 -0
- package/lib/components/core-dialog/style/_layout.scss +6 -0
- package/lib/components/core-dialog/style/_material-definition.scss +0 -0
- package/lib/components/core-dialog/style/_theme.scss +6 -0
- package/lib/components/core-dialog/style/material.scss +4 -0
- package/lib/components/input-scanner/bar-code-scanner.d.ts +7 -0
- package/lib/components/input-scanner/input-scanner.component.d.ts +23 -0
- package/lib/components/input-scanner/input-scanner.module.d.ts +2 -0
- package/lib/components/input-scanner/scanner.service.d.ts +11 -0
- package/lib/components/input-scanner/style/_layout.scss +4 -0
- package/lib/components/input-scanner/style/_material-definition.scss +0 -0
- package/lib/components/input-scanner/style/_theme.scss +4 -0
- package/lib/components/input-scanner/style/material.scss +4 -0
- package/lib/components/simple-grid/simple-grid-cell.component.d.ts +4 -2
- package/lib/components/simple-grid/simple-grid.component.d.ts +5 -3
- package/lib/components/simple-grid/style/_layout.scss +30 -4
- package/lib/components/simple-grid/style/_material-definition.scss +9 -2
- package/lib/components/simple-grid/style/_theme.scss +3 -0
- package/lib/core/enum/core-components-icon.enum.d.ts +1 -0
- package/lib/interfaces/dialog-response.interface.d.ts +6 -0
- package/lib/interfaces/scanner-input.interface.d.ts +3 -0
- package/lib/model/enum/app-button-type.enum.d.ts +9 -0
- package/lib/model/enum/app-popup-type.enum.d.ts +6 -0
- package/lib/translation/core-components-translation.service.d.ts +2 -2
- package/lib/translation/{dictionary.service.d.ts → core-dictionary.service.d.ts} +1 -1
- package/lib/translation/core-localize.pipe.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +15 -10
- package/esm2015/lib/translation/dictionary.service.js +0 -29
- package/esm2015/lib/translation/localize.pipe.js +0 -26
- package/lib/translation/localize.pipe.d.ts +0 -7
|
@@ -1422,6 +1422,7 @@
|
|
|
1422
1422
|
CoreComponentsIcon["CashRegisterSimple"] = "cash_register_simple";
|
|
1423
1423
|
CoreComponentsIcon["ChangeLocation"] = "change_location";
|
|
1424
1424
|
CoreComponentsIcon["Check"] = "check";
|
|
1425
|
+
CoreComponentsIcon["CheckDuotone"] = "check_duotone";
|
|
1425
1426
|
CoreComponentsIcon["CheckRound"] = "check_round";
|
|
1426
1427
|
CoreComponentsIcon["CheckRoundOpen"] = "check_round_open";
|
|
1427
1428
|
CoreComponentsIcon["CheckSimple"] = "check_simple";
|
|
@@ -1720,6 +1721,7 @@
|
|
|
1720
1721
|
"cash_register_simple": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path style= \"fill: #484f60\" d=\"M288 0C305.7 0 320 14.33 320 32V96C320 113.7 305.7 128 288 128H208V160H424.1C456.6 160 483.5 183.1 488.2 214.4L510.9 364.1C511.6 368.8 512 373.6 512 378.4V448C512 483.3 483.3 512 448 512H64C28.65 512 0 483.3 0 448V378.4C0 373.6 .3622 368.8 1.083 364.1L23.76 214.4C28.5 183.1 55.39 160 87.03 160H143.1V128H63.1C46.33 128 31.1 113.7 31.1 96V32C31.1 14.33 46.33 0 63.1 0L288 0zM96 48C87.16 48 80 55.16 80 64C80 72.84 87.16 80 96 80H256C264.8 80 272 72.84 272 64C272 55.16 264.8 48 256 48H96zM80 448H432C440.8 448 448 440.8 448 432C448 423.2 440.8 416 432 416H80C71.16 416 64 423.2 64 432C64 440.8 71.16 448 80 448zM112 216C98.75 216 88 226.7 88 240C88 253.3 98.75 264 112 264C125.3 264 136 253.3 136 240C136 226.7 125.3 216 112 216zM208 264C221.3 264 232 253.3 232 240C232 226.7 221.3 216 208 216C194.7 216 184 226.7 184 240C184 253.3 194.7 264 208 264zM160 296C146.7 296 136 306.7 136 320C136 333.3 146.7 344 160 344C173.3 344 184 333.3 184 320C184 306.7 173.3 296 160 296zM304 264C317.3 264 328 253.3 328 240C328 226.7 317.3 216 304 216C290.7 216 280 226.7 280 240C280 253.3 290.7 264 304 264zM256 296C242.7 296 232 306.7 232 320C232 333.3 242.7 344 256 344C269.3 344 280 333.3 280 320C280 306.7 269.3 296 256 296zM400 264C413.3 264 424 253.3 424 240C424 226.7 413.3 216 400 216C386.7 216 376 226.7 376 240C376 253.3 386.7 264 400 264zM352 296C338.7 296 328 306.7 328 320C328 333.3 338.7 344 352 344C365.3 344 376 333.3 376 320C376 306.7 365.3 296 352 296z\"/></svg>",
|
|
1721
1722
|
"change_location": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"16.96 25 24.27 32.31 24.27 27.76 29.09 27.76 29.09 22.23 24.27 22.23 24.27 17.69 16.96 25\" fill=\"#484f60\"/><polygon points=\"16.21 23.18 10 23.18 10 26.82 16.21 26.82 14.39 25 16.21 23.18\" fill=\"#484f60\"/><polygon points=\"10 14.77 10 18.4 20.99 18.4 24.63 14.77 10 14.77\" fill=\"#484f60\"/><polygon points=\"10 31.6 10 35.23 24.63 35.23 20.99 31.6 10 31.6\" fill=\"#484f60\"/><polygon points=\"31.35 13.84 35.45 11.47 39.55 13.83 35.45 16.2 31.35 13.84\" fill=\"#484f60\"/><polygon points=\"40 19.32 39.99 14.59 35.89 16.96 35.9 18.05 39.06 19.86 40 19.32\" fill=\"#484f60\" opacity=\"0.5\"/><polygon points=\"35.02 16.96 30.91 14.6 30.92 19.34 31.84 19.87 35.02 18.03 35.02 16.96\" fill=\"#484f60\" opacity=\"0.25\"/><polygon points=\"31.35 22.26 35.45 19.88 39.55 22.24 35.45 24.62 31.35 22.26\" fill=\"#484f60\"/><polygon points=\"40 27.74 39.99 23 35.89 25.38 35.9 26.46 39.06 28.28 40 27.74\" fill=\"#484f60\" opacity=\"0.5\"/><polygon points=\"35.02 25.38 30.91 23.02 30.92 27.75 31.84 28.29 35.02 26.45 35.02 25.38\" fill=\"#484f60\" opacity=\"0.25\"/><polygon points=\"31.35 30.67 35.45 28.3 39.55 30.66 35.45 33.03 31.35 30.67\" fill=\"#484f60\"/><polygon points=\"35.89 33.79 39.99 31.42 40 36.15 35.9 38.53 35.89 33.79\" fill=\"#484f60\" opacity=\"0.5\"/><polygon points=\"30.92 36.17 30.91 31.43 35.02 33.8 35.03 38.53 30.92 36.17\" fill=\"#484f60\" opacity=\"0.25\"/></svg>",
|
|
1722
1723
|
"check": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"16.97 22.92 20.78 28.61 29.96 13 36.16 13 20.78 37 13.84 26.9 16.97 22.92\" fill=\"#484f60\"/></svg>",
|
|
1724
|
+
"check_duotone": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><defs><style>.fa-secondary{opacity:.4}</style></defs><path class=\"fa-primary\" d=\"M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z\"/></svg>",
|
|
1723
1725
|
"check_round": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,10A15,15,0,1,0,40,25,15,15,0,0,0,25,10ZM23,34l-6.24-9.09,2.81-3.59L23,26.45,27.66,16h5.58Z\" fill=\"#484f60\"/></svg>",
|
|
1724
1726
|
"check_round_open": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 50\" enable-background=\"new 0 0 50 50\" ><g><path fill=\"#2A363B\" d=\"M40.5,25.5C40.5,34,33.5,41,25,41S9.5,34,9.5,25.5S16.5,10,25,10S40.5,16.9,40.5,25.5z M10.5,25.5C10.5,33.5,17,40,25,40s14.5-6.5,14.5-14.5S33,11,25,11S10.5,17.5,10.5,25.5z\"/></g><polygon fill=\"#2A363B\" points=\"19.9,24 22.5,28 29,17.1 33.3,17.1 22.5,33.9 17.7,26.8 \"/></svg>",
|
|
1725
1727
|
"check_simple": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon fill=\"#2A363B\" points=\"19.9,24 22.5,28 29,17.1 33.3,17.1 22.5,33.9 17.7,26.8 \"/></svg>",
|
|
@@ -2034,7 +2036,7 @@
|
|
|
2034
2036
|
ValidationErrorComponent.decorators = [
|
|
2035
2037
|
{ type: i0.Component, args: [{
|
|
2036
2038
|
selector: "co-validation-error",
|
|
2037
|
-
template: "\n
|
|
2039
|
+
template: "\n <div class=\"validation-error-wrapper\" [overlay]=\"parentForOverlay\">\n <div class=\"validation-error-content\">\n <co-icon [iconData]=\"icons.getIcon(Icons.InformationRoundOpen)\"></co-icon>\n <div class=\"validation-error-message\" [textContent]=\"error | coreLocalize\"></div>\n </div>\n </div>\n ",
|
|
2038
2040
|
animations: [],
|
|
2039
2041
|
encapsulation: i0.ViewEncapsulation.None
|
|
2040
2042
|
},] }
|
|
@@ -6312,7 +6314,7 @@
|
|
|
6312
6314
|
InputTextComponent.decorators = [
|
|
6313
6315
|
{ type: i0.Component, args: [{
|
|
6314
6316
|
selector: 'co-input-text',
|
|
6315
|
-
template: "\n <div class=\"input-text-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-icon *ngIf=\"leftIcon || leftIconData\" class=\"input-text-left-icon\" [icon]=\"leftIcon\" [iconData]=\"leftIconData\"\n (click)=\"handleLeftIconClick($event)\" (mousedown)=\"handleLeftIconMouseDown($event)\"\n (mouseup)=\"handleLeftIconMouseUp($event)\"></co-icon>\n <div *ngIf=\"leftIcon || leftIconData\" class=\"spacer left-icon\"></div>\n <div class=\"input-wrapper\">\n <label *ngIf=\"showPlaceholderOnFocus || (!showPlaceholderOnFocus && !hasValue && !focused)\"\n [textContent]=\"placeholder\"></label>\n <input #input\n [class.input-input-hidden]=\"useContent\"\n [ngClass]=\"align\"\n [type]=\"digitsOnly ? 'number' : type\"\n [pattern]=\"type === 'date' ? pattern : undefined\"\n [ngModel]=\"model\"\n [min]=\"(type === 'number' || type === 'date') && this.min ? this.min : undefined\"\n [max]=\"(type === 'number' || type === 'date') && this.max ? this.max : undefined\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (keydown)=\"digitsOnly ? excludeNonDigitChars($event) : true\"\n >\n <ng-container *ngIf=\"useContent\">\n <div class=\"input-content-wrapper\">\n <ng-content></ng-content>\n </div>\n </ng-container>\n <co-icon [class.show]=\"showClearButton && hasValue && focused && !readonly\" class=\"input-text-clear-button\" [icon]=\"icons.CrossSkinny\" (click)=\"clearInput($event)\"></co-icon>\n <div class=\"required-indicator\"></div>\n </div>\n <div *ngIf=\"rightIcon || rightIconData\" class=\"spacer right-icon\"></div>\n <co-icon *ngIf=\"rightIcon || rightIconData\" class=\"input-text-right-icon\" [icon]=\"rightIcon\" [iconData]=\"rightIconData\"\n (click)=\"handleRightIconClick($event)\" (mousedown)=\"handleRightIconMouseDown($event)\" (mouseup)=\"handleRightIconMouseUp($event)\"></co-icon>\n </div>\n <!--\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n -->\n ",
|
|
6317
|
+
template: "\n <div class=\"input-text-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-icon *ngIf=\"leftIcon || leftIconData\" class=\"input-text-left-icon\" [icon]=\"leftIcon\" [iconData]=\"leftIconData\"\n (click)=\"handleLeftIconClick($event)\" (mousedown)=\"handleLeftIconMouseDown($event)\"\n (mouseup)=\"handleLeftIconMouseUp($event)\"></co-icon>\n <div *ngIf=\"leftIcon || leftIconData\" class=\"spacer left-icon\"></div>\n <div class=\"input-wrapper\">\n <label *ngIf=\"showPlaceholderOnFocus || (!showPlaceholderOnFocus && !hasValue && !focused)\"\n [textContent]=\"placeholder\"></label>\n <input #input\n [class.input-input-hidden]=\"useContent\"\n [ngClass]=\"align\"\n [type]=\"digitsOnly ? 'number' : type\"\n [pattern]=\"type === 'date' ? pattern : undefined\"\n [ngModel]=\"model\"\n [min]=\"(type === 'number' || type === 'date') && this.min ? this.min : undefined\"\n [max]=\"(type === 'number' || type === 'date') && this.max ? this.max : undefined\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (keydown)=\"digitsOnly ? excludeNonDigitChars($event) : true\"\n (keyup)=\"keyUp.emit($event)\"\n >\n <ng-container *ngIf=\"useContent\">\n <div class=\"input-content-wrapper\">\n <ng-content></ng-content>\n </div>\n </ng-container>\n <co-icon [class.show]=\"showClearButton && hasValue && focused && !readonly\" class=\"input-text-clear-button\" [icon]=\"icons.CrossSkinny\" (click)=\"clearInput($event)\"></co-icon>\n <div class=\"required-indicator\"></div>\n </div>\n <div *ngIf=\"rightIcon || rightIconData\" class=\"spacer right-icon\"></div>\n <co-icon *ngIf=\"rightIcon || rightIconData\" class=\"input-text-right-icon\" [icon]=\"rightIcon\" [iconData]=\"rightIconData\"\n (click)=\"handleRightIconClick($event)\" (mousedown)=\"handleRightIconMouseDown($event)\" (mouseup)=\"handleRightIconMouseUp($event)\"></co-icon>\n </div>\n <!--\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n -->\n ",
|
|
6316
6318
|
providers: [
|
|
6317
6319
|
OverlayService, {
|
|
6318
6320
|
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
@@ -6405,8 +6407,8 @@
|
|
|
6405
6407
|
];
|
|
6406
6408
|
|
|
6407
6409
|
// The localization service, providing peers with text translation functionality.
|
|
6408
|
-
var
|
|
6409
|
-
function
|
|
6410
|
+
var CoreDictionaryService = /** @class */ (function () {
|
|
6411
|
+
function CoreDictionaryService() {
|
|
6410
6412
|
// Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
|
|
6411
6413
|
this._placeholder = "|~";
|
|
6412
6414
|
}
|
|
@@ -6417,7 +6419,7 @@
|
|
|
6417
6419
|
* @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
|
|
6418
6420
|
* @returns {string} The translated text for given dictionary key
|
|
6419
6421
|
*/
|
|
6420
|
-
|
|
6422
|
+
CoreDictionaryService.prototype.get = function (key, upperCaseFirst) {
|
|
6421
6423
|
if (upperCaseFirst === void 0) { upperCaseFirst = true; }
|
|
6422
6424
|
var replacementTexts = [];
|
|
6423
6425
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
@@ -6432,9 +6434,9 @@
|
|
|
6432
6434
|
}
|
|
6433
6435
|
return text;
|
|
6434
6436
|
};
|
|
6435
|
-
return
|
|
6437
|
+
return CoreDictionaryService;
|
|
6436
6438
|
}());
|
|
6437
|
-
|
|
6439
|
+
CoreDictionaryService.decorators = [
|
|
6438
6440
|
{ type: i0.Injectable }
|
|
6439
6441
|
];
|
|
6440
6442
|
|
|
@@ -6451,14 +6453,14 @@
|
|
|
6451
6453
|
{ type: i0.Injectable }
|
|
6452
6454
|
];
|
|
6453
6455
|
CoreComponentsTranslationService.ctorParameters = function () { return [
|
|
6454
|
-
{ type:
|
|
6456
|
+
{ type: CoreDictionaryService }
|
|
6455
6457
|
]; };
|
|
6456
6458
|
|
|
6457
|
-
var
|
|
6458
|
-
function
|
|
6459
|
+
var CoreLocalizePipe = /** @class */ (function () {
|
|
6460
|
+
function CoreLocalizePipe(_dictionaryService) {
|
|
6459
6461
|
this._dictionaryService = _dictionaryService;
|
|
6460
6462
|
}
|
|
6461
|
-
|
|
6463
|
+
CoreLocalizePipe.prototype.transform = function (value, upperCaseFirst, replace) {
|
|
6462
6464
|
var _a;
|
|
6463
6465
|
if (upperCaseFirst === void 0) { upperCaseFirst = true; }
|
|
6464
6466
|
if (replace === void 0) { replace = []; }
|
|
@@ -6471,15 +6473,15 @@
|
|
|
6471
6473
|
}
|
|
6472
6474
|
return (_a = this._dictionaryService).get.apply(_a, __spreadArray([value, upperCaseFirst], __read(replace)));
|
|
6473
6475
|
};
|
|
6474
|
-
return
|
|
6476
|
+
return CoreLocalizePipe;
|
|
6475
6477
|
}());
|
|
6476
|
-
|
|
6478
|
+
CoreLocalizePipe.decorators = [
|
|
6477
6479
|
{ type: i0.Pipe, args: [{
|
|
6478
|
-
name: "
|
|
6480
|
+
name: "coreLocalize"
|
|
6479
6481
|
},] }
|
|
6480
6482
|
];
|
|
6481
|
-
|
|
6482
|
-
{ type:
|
|
6483
|
+
CoreLocalizePipe.ctorParameters = function () { return [
|
|
6484
|
+
{ type: CoreDictionaryService }
|
|
6483
6485
|
]; };
|
|
6484
6486
|
|
|
6485
6487
|
var CoreComponentsTranslationModule = /** @class */ (function () {
|
|
@@ -6498,14 +6500,14 @@
|
|
|
6498
6500
|
CoreComponentsTranslationModule.decorators = [
|
|
6499
6501
|
{ type: i0.NgModule, args: [{
|
|
6500
6502
|
declarations: [
|
|
6501
|
-
|
|
6503
|
+
CoreLocalizePipe
|
|
6502
6504
|
],
|
|
6503
6505
|
providers: [
|
|
6504
6506
|
CoreComponentsTranslationService,
|
|
6505
|
-
|
|
6507
|
+
CoreDictionaryService
|
|
6506
6508
|
],
|
|
6507
6509
|
exports: [
|
|
6508
|
-
|
|
6510
|
+
CoreLocalizePipe
|
|
6509
6511
|
]
|
|
6510
6512
|
},] }
|
|
6511
6513
|
];
|
|
@@ -8164,7 +8166,7 @@
|
|
|
8164
8166
|
InputSearchComponent.decorators = [
|
|
8165
8167
|
{ type: i0.Component, args: [{
|
|
8166
8168
|
selector: 'co-input-search',
|
|
8167
|
-
template: "\n <co-input-text\n [ngClass]=\"customCssClass\"\n [model]=\"model\"\n [leftIcon]=\"useLeftIcon ? searchIcon : null\"\n [rightIcon]=\"useRightIcon ? searchIcon : null\"\n [leftIconData]=\"useLeftIcon && leftIconData ? leftIconData : undefined\"\n [rightIconData]=\"useRightIcon && rightIconData ? rightIconData : undefined\"\n [placeholder]=\"placeholder\"\n [customHeight]=\"true\"\n [showPlaceholderOnFocus]=\"false\"\n (modelChange)=\"modelChange.emit($event)\"\n (leftIconClick)=\"leftIconClick.emit($event)\"\n (rightIconClick)=\"rightIconClick.emit($event)\"\n ></co-input-text>\n ",
|
|
8169
|
+
template: "\n <co-input-text\n [ngClass]=\"customCssClass\"\n [model]=\"model\"\n [leftIcon]=\"useLeftIcon ? searchIcon : null\"\n [rightIcon]=\"useRightIcon ? searchIcon : null\"\n [leftIconData]=\"useLeftIcon && leftIconData ? leftIconData : undefined\"\n [rightIconData]=\"useRightIcon && rightIconData ? rightIconData : undefined\"\n [placeholder]=\"placeholder\"\n [customHeight]=\"true\"\n [showPlaceholderOnFocus]=\"false\"\n (modelChange)=\"modelChange.emit($event)\"\n (leftIconClick)=\"leftIconClick.emit($event)\"\n (rightIconClick)=\"rightIconClick.emit($event)\"\n (keyup)=\"keyUp.emit($event)\"\n ></co-input-text>\n ",
|
|
8168
8170
|
providers: [
|
|
8169
8171
|
OverlayService
|
|
8170
8172
|
],
|
|
@@ -9899,6 +9901,9 @@
|
|
|
9899
9901
|
this.validateAndSave();
|
|
9900
9902
|
}
|
|
9901
9903
|
};
|
|
9904
|
+
SimpleGridComponent.prototype.handleClickOutsideRow = function () {
|
|
9905
|
+
this.validateAndSave();
|
|
9906
|
+
};
|
|
9902
9907
|
SimpleGridComponent.prototype.isRowDisabled = function (row) {
|
|
9903
9908
|
if (this.rowDisabledFn && (typeof this.rowDisabledFn === 'function')) {
|
|
9904
9909
|
return this.rowDisabledFn.call(this, row);
|
|
@@ -9916,26 +9921,34 @@
|
|
|
9916
9921
|
return !!singleColumn;
|
|
9917
9922
|
};
|
|
9918
9923
|
SimpleGridComponent.prototype.addNewRow = function () {
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9924
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
9925
|
+
var valid, _a;
|
|
9926
|
+
return __generator(this, function (_b) {
|
|
9927
|
+
switch (_b.label) {
|
|
9928
|
+
case 0:
|
|
9929
|
+
if (!this.inlineEdit) return [3 /*break*/, 3];
|
|
9930
|
+
valid = this.validateAndSave();
|
|
9931
|
+
if (!valid) return [3 /*break*/, 2];
|
|
9932
|
+
this.data.push({});
|
|
9933
|
+
this._detectChanges();
|
|
9934
|
+
this._newRow = true;
|
|
9935
|
+
this.editing = true;
|
|
9936
|
+
this.editRowIndex = this.data.length - 1;
|
|
9937
|
+
this.rowToEdit = this.data[this.editRowIndex];
|
|
9938
|
+
_a = this;
|
|
9939
|
+
return [4 /*yield*/, this._nextAvailableCellToEdit(true)];
|
|
9940
|
+
case 1:
|
|
9941
|
+
_a.editCellIndex = _b.sent();
|
|
9942
|
+
this._detectChanges();
|
|
9943
|
+
_b.label = 2;
|
|
9944
|
+
case 2: return [3 /*break*/, 4];
|
|
9945
|
+
case 3:
|
|
9946
|
+
this.addRow.next();
|
|
9947
|
+
_b.label = 4;
|
|
9948
|
+
case 4: return [2 /*return*/];
|
|
9949
|
+
}
|
|
9950
|
+
});
|
|
9951
|
+
});
|
|
9939
9952
|
};
|
|
9940
9953
|
SimpleGridComponent.prototype.validateAndSave = function (stopediting) {
|
|
9941
9954
|
if (stopediting === void 0) { stopediting = true; }
|
|
@@ -9960,8 +9973,7 @@
|
|
|
9960
9973
|
else {
|
|
9961
9974
|
this.data[this.editRowIndex] = this.rowToEdit;
|
|
9962
9975
|
}
|
|
9963
|
-
this.
|
|
9964
|
-
this.editing = false;
|
|
9976
|
+
this._resetEdit();
|
|
9965
9977
|
this._detectChanges();
|
|
9966
9978
|
};
|
|
9967
9979
|
SimpleGridComponent.prototype.removeRow = function () {
|
|
@@ -9982,7 +9994,7 @@
|
|
|
9982
9994
|
};
|
|
9983
9995
|
SimpleGridComponent.prototype.selectTheRow = function (index, emit) {
|
|
9984
9996
|
if (emit === void 0) { emit = true; }
|
|
9985
|
-
if (this.selectedRowIndex !== index && ((this.editing && this.validateAndSave()) || !this.editing)) {
|
|
9997
|
+
if (this.selectedRowIndex === -1 || (this.selectedRowIndex !== index && ((this.editing && this.validateAndSave()) || !this.editing))) {
|
|
9986
9998
|
this.selectedRowIndex = index;
|
|
9987
9999
|
}
|
|
9988
10000
|
if (emit) {
|
|
@@ -10003,18 +10015,31 @@
|
|
|
10003
10015
|
}
|
|
10004
10016
|
this._resetDblClick();
|
|
10005
10017
|
};
|
|
10006
|
-
SimpleGridComponent.prototype.editRow = function (event) {
|
|
10018
|
+
SimpleGridComponent.prototype.editRow = function (event, selectCell) {
|
|
10007
10019
|
var _this = this;
|
|
10020
|
+
if (selectCell === void 0) { selectCell = true; }
|
|
10008
10021
|
this.editRowIndex = this.selectedRowIndex;
|
|
10009
10022
|
this.rowToEdit = this.data[this.editRowIndex];
|
|
10010
10023
|
this.editing = true;
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10024
|
+
if (selectCell) {
|
|
10025
|
+
this._nextAvailableCellToEdit(true).then(function (index) {
|
|
10026
|
+
_this.editCellIndex = index;
|
|
10027
|
+
});
|
|
10028
|
+
}
|
|
10014
10029
|
this._detectChanges();
|
|
10015
10030
|
};
|
|
10016
|
-
SimpleGridComponent.prototype.handleCellClick = function (
|
|
10017
|
-
this.
|
|
10031
|
+
SimpleGridComponent.prototype.handleCellClick = function (event, row, rowIndex, cellIndex) {
|
|
10032
|
+
if (this.isRowDisabled(row)) {
|
|
10033
|
+
this.selectedRowIndex = -1;
|
|
10034
|
+
return;
|
|
10035
|
+
}
|
|
10036
|
+
this.selectTheRow(rowIndex, false);
|
|
10037
|
+
if (this.inlineEdit) {
|
|
10038
|
+
this.editRowIndex = rowIndex;
|
|
10039
|
+
this.editCellIndex = cellIndex;
|
|
10040
|
+
this.editing = true;
|
|
10041
|
+
this.editRow(event, false);
|
|
10042
|
+
}
|
|
10018
10043
|
this._detectChanges();
|
|
10019
10044
|
};
|
|
10020
10045
|
SimpleGridComponent.prototype._resetDblClick = function () {
|
|
@@ -10136,10 +10161,7 @@
|
|
|
10136
10161
|
}
|
|
10137
10162
|
this._newRow = false;
|
|
10138
10163
|
if (stopediting) {
|
|
10139
|
-
this.
|
|
10140
|
-
this.editCellIndex = -1;
|
|
10141
|
-
this.editing = false;
|
|
10142
|
-
this.rowToEdit = undefined;
|
|
10164
|
+
this._resetEdit();
|
|
10143
10165
|
}
|
|
10144
10166
|
this._detectChanges();
|
|
10145
10167
|
};
|
|
@@ -10155,12 +10177,20 @@
|
|
|
10155
10177
|
SimpleGridComponent.prototype._detectChanges = function () {
|
|
10156
10178
|
this._changeDetection.detectChanges();
|
|
10157
10179
|
};
|
|
10180
|
+
SimpleGridComponent.prototype._resetEdit = function () {
|
|
10181
|
+
this._newRow = false;
|
|
10182
|
+
this.selectedRowIndex = -1;
|
|
10183
|
+
this.editRowIndex = -1;
|
|
10184
|
+
this.editCellIndex = -1;
|
|
10185
|
+
this.editing = false;
|
|
10186
|
+
this.rowToEdit = undefined;
|
|
10187
|
+
};
|
|
10158
10188
|
return SimpleGridComponent;
|
|
10159
10189
|
}(BaseSimpleGridComponent));
|
|
10160
10190
|
SimpleGridComponent.decorators = [
|
|
10161
10191
|
{ type: i0.Component, args: [{
|
|
10162
10192
|
selector: 'co-simple-grid',
|
|
10163
|
-
template: "\n <co-grid-toolbar *ngIf=\"showToolbar\" [class.right]=\"rightToolbar\"\n [showEdit]=\"showEdit\"\n [showAdd]=\"showAdd\"\n [showDelete]=\"showDelete\"\n [deleteEnabled]=\"selectedRowIndex > -1\"\n (addClick)=\"addNewRow()\"\n (editClick)=\"editRow($event)\"\n (saveClick)=\"validateAndSave()\"\n (cancelClick)=\"cancelEditRow()\"\n (deleteClick)=\"removeRow()\"\n ></co-grid-toolbar>\n <table class=\"simple-grid-table\">\n <colgroup>\n <col *ngFor=\"let column of headerColumns; let index = index\"\n [class.simple-grid-column-auto-fit]=\"column.autoFit\"\n [style.width.px]=\"column.width\"\n [style.min-width.px]=\"MIN_COLUMN_WIDTH\">\n </colgroup>\n <thead>\n <tr>\n <th scope=\"col\" #headerCell class=\"simple-grid-column-header\" *ngFor=\"let column of headerColumns; let index = index\">\n <div class=\"simple-grid-column-header-wrapper\" [class.resizable]=\"resizable\"\n [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"column.headerTemplate; else noHeaderTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.headerTemplate\"></ng-container>\n </ng-container>\n <ng-template #noHeaderTemplate>\n <div class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText || ' '\"\n ></div>\n </ng-template>\n <div *ngIf=\"resizable && column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </th>\n </tr>\n </thead>\n <tbody #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\">\n <tr class=\"simple-grid-row\" [class.selected]=\"rowIndex === selectedRowIndex && !editing\" observeVisibility\n [class.disabled]=\"isRowDisabled(row)\"\n [class.editing]=\"rowIndex === editRowIndex\" *ngFor=\"let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index\" cdkDrag\n (click)=\"handleClickRow($event, rowIndex, row)\" (dblclick)=\"handleDblClickRow($event, rowIndex, row)\" (visibilityChange)=\"rowVisible.next(row)\">\n <co-form-test class=\"simple-grid-row-form\">\n <ng-container *ngIf=\"isSingleColumnRow(row)\">\n <td class=\"simple-grid-single-column-cell\" [attr.colspan]=\"headerColumns.length\">\n <co-simple-grid-cell\n [column]=\"columns[singleColumnIndex(row)]\"\n [row]=\"row\"\n [editMode]=\"false\"\n ></co-simple-grid-cell>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isSingleColumnRow(row)\">\n <ng-container *ngFor=\"let column of headerColumns; let columnIndex = index\">\n <td class=\"simple-grid-column-cell\" *ngIf=\"columnIndex !== singleColumnIndex(row)\">\n <co-simple-grid-cell\n [column]=\"column\"\n [row]=\"row\"\n [editMode]=\"inlineEdit && editing && rowIndex === editRowIndex\"\n [fieldEditMode]=\"editCellIndex === columnIndex\"\n (cellClick)=\"handleCellClick(columnIndex)\"\n ></co-simple-grid-cell>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer-placeholder\"></div>\n </td>\n </ng-container>\n </ng-container>\n </co-form-test>\n </tr>\n </tbody>\n </table>\n <co-pagination-bar *ngIf=\"data?.length > rowsPerPage\" class=\"pagination-bar\"\n [itemsPerPage]=\"rowsPerPage\"\n [currentPage]=\"currentPage\"\n [totalItems]=\"data.length\"\n [autoHide]=\"true\"\n (previousClick)=\"goToPreviousPage()\"\n (nextClick)=\"goToNextPage()\"\n (pageClick)=\"setCurrentPage($event)\"\n ></co-pagination-bar>\n ",
|
|
10193
|
+
template: "\n <co-grid-toolbar *ngIf=\"showToolbar\" [class.right]=\"rightToolbar\"\n [showEdit]=\"showEdit\"\n [showAdd]=\"showAdd\"\n [showDelete]=\"showDelete\"\n [deleteEnabled]=\"selectedRowIndex > -1\"\n (addClick)=\"addNewRow()\"\n (editClick)=\"editRow($event)\"\n (saveClick)=\"validateAndSave()\"\n (cancelClick)=\"cancelEditRow()\"\n (deleteClick)=\"removeRow()\"\n ></co-grid-toolbar>\n <table class=\"simple-grid-table\" [clickOutside]=\"editing\" (clickOutside)=\"handleClickOutsideRow()\">\n <colgroup>\n <col *ngFor=\"let column of headerColumns; let index = index\"\n [class.simple-grid-column-auto-fit]=\"column.autoFit\"\n [style.width.px]=\"column.width\"\n [style.min-width.px]=\"MIN_COLUMN_WIDTH\">\n </colgroup>\n <thead>\n <tr>\n <th scope=\"col\" #headerCell class=\"simple-grid-column-header\" *ngFor=\"let column of headerColumns; let index = index\">\n <div class=\"simple-grid-column-header-wrapper\" [class.resizable]=\"resizable\"\n [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"column.headerTemplate; else noHeaderTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.headerTemplate\"></ng-container>\n </ng-container>\n <ng-template #noHeaderTemplate>\n <div class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText || ' '\"\n ></div>\n </ng-template>\n <div *ngIf=\"resizable && column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </th>\n </tr>\n </thead>\n <tbody #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled || editing\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\">\n <tr class=\"simple-grid-row\" [class.selected]=\"rowIndex === selectedRowIndex && !editing\" observeVisibility\n [class.disabled]=\"isRowDisabled(row)\"\n [class.editing]=\"rowIndex === editRowIndex\" *ngFor=\"let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index\" cdkDrag\n (click)=\"handleClickRow($event, rowIndex, row)\" (dblclick)=\"handleDblClickRow($event, rowIndex, row)\" (visibilityChange)=\"rowVisible.next(row)\">\n <co-form-test class=\"simple-grid-row-form\">\n <ng-container *ngIf=\"isSingleColumnRow(row)\">\n <td class=\"simple-grid-single-column-cell\" [attr.colspan]=\"headerColumns.length\">\n <co-simple-grid-cell\n [column]=\"columns[singleColumnIndex(row)]\"\n [row]=\"row\"\n [editMode]=\"false\"\n ></co-simple-grid-cell>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isSingleColumnRow(row)\">\n <ng-container *ngFor=\"let column of headerColumns; let columnIndex = index\">\n <td class=\"simple-grid-column-cell\" *ngIf=\"columnIndex !== singleColumnIndex(row)\">\n <co-simple-grid-cell\n [column]=\"column\"\n [row]=\"row\"\n [editMode]=\"inlineEdit && editing && rowIndex === editRowIndex\"\n [fieldEditMode]=\"editCellIndex === columnIndex && rowIndex === editRowIndex\"\n (cellClick)=\"handleCellClick($event, row, rowIndex, columnIndex)\"\n ></co-simple-grid-cell>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer-placeholder\"></div>\n </td>\n </ng-container>\n </ng-container>\n </co-form-test>\n </tr>\n </tbody>\n </table>\n <co-pagination-bar *ngIf=\"data?.length > rowsPerPage\" class=\"pagination-bar\"\n [itemsPerPage]=\"rowsPerPage\"\n [currentPage]=\"currentPage\"\n [totalItems]=\"data.length\"\n [autoHide]=\"true\"\n (previousClick)=\"goToPreviousPage()\"\n (nextClick)=\"goToNextPage()\"\n (pageClick)=\"setCurrentPage($event)\"\n ></co-pagination-bar>\n ",
|
|
10164
10194
|
providers: [
|
|
10165
10195
|
FormMasterService
|
|
10166
10196
|
],
|
|
@@ -10670,11 +10700,21 @@
|
|
|
10670
10700
|
function SimpleGridCellComponent(_changeDetector) {
|
|
10671
10701
|
this._changeDetector = _changeDetector;
|
|
10672
10702
|
this.defaultTextAlign = exports.ColumnAlign.Left;
|
|
10673
|
-
this.
|
|
10703
|
+
this._editMode = false;
|
|
10674
10704
|
this.cellClick = new i0.EventEmitter();
|
|
10675
10705
|
this._fieldEditMode = false;
|
|
10676
10706
|
this._focused = false;
|
|
10677
10707
|
}
|
|
10708
|
+
Object.defineProperty(SimpleGridCellComponent.prototype, "editMode", {
|
|
10709
|
+
get: function () {
|
|
10710
|
+
return this._editMode;
|
|
10711
|
+
},
|
|
10712
|
+
set: function (value) {
|
|
10713
|
+
this._editMode = value;
|
|
10714
|
+
},
|
|
10715
|
+
enumerable: false,
|
|
10716
|
+
configurable: true
|
|
10717
|
+
});
|
|
10678
10718
|
Object.defineProperty(SimpleGridCellComponent.prototype, "editTemplateContent", {
|
|
10679
10719
|
set: function (template) {
|
|
10680
10720
|
if (template) {
|
|
@@ -10725,7 +10765,7 @@
|
|
|
10725
10765
|
}
|
|
10726
10766
|
};
|
|
10727
10767
|
SimpleGridCellComponent.prototype._setFocusComponent = function () {
|
|
10728
|
-
if (this.
|
|
10768
|
+
if (this._editMode && this.fieldEditMode) {
|
|
10729
10769
|
var element = this._getElement();
|
|
10730
10770
|
if (element) {
|
|
10731
10771
|
var focusEvent = this._createNewEvent(element, 'focus');
|
|
@@ -10796,7 +10836,7 @@
|
|
|
10796
10836
|
SimpleGridCellComponent.decorators = [
|
|
10797
10837
|
{ type: i0.Component, args: [{
|
|
10798
10838
|
selector: "co-simple-grid-cell",
|
|
10799
|
-
template: "\n
|
|
10839
|
+
template: "\n <div class=\"simple-grid-column-cell-value\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"editMode; else noInlineEdit\">\n <div class=\"simple-grid-column-cell-field\">\n <ng-container #editTemplate *ngIf=\"column.editTemplate; else noEditTemplate\"\n [ngTemplateOutlet]=\"column.editTemplate\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n <ng-template #noEditTemplate>\n <ng-container *ngIf=\"column.template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <co-input-text [(model)]=\"row[column.field]\" [required]=\"column.required\"></co-input-text>\n </ng-template>\n </ng-template>\n </div>\n </ng-container>\n <ng-template #noInlineEdit>\n <div class=\"simple-grid-column-cell-field\">\n <ng-container *ngIf=\"column.template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <span [textContent]=\"column.getFieldValue(row[column.field])\"></span>\n </ng-template>\n </div>\n </ng-template>\n </div>\n ",
|
|
10800
10840
|
encapsulation: i0.ViewEncapsulation.None
|
|
10801
10841
|
},] }
|
|
10802
10842
|
];
|
|
@@ -10804,12 +10844,12 @@
|
|
|
10804
10844
|
{ type: i0.ChangeDetectorRef }
|
|
10805
10845
|
]; };
|
|
10806
10846
|
SimpleGridCellComponent.propDecorators = {
|
|
10847
|
+
editMode: [{ type: i0.Input }],
|
|
10807
10848
|
editTemplateContent: [{ type: i0.ViewChild, args: ["editTemplate", { read: BaseInputComponent },] }],
|
|
10808
10849
|
noEditTemplateContent: [{ type: i0.ViewChild, args: ["noEditTemplate",] }],
|
|
10809
10850
|
noTemplateContent: [{ type: i0.ViewChild, args: ["noTemplate",] }],
|
|
10810
10851
|
column: [{ type: i0.Input }],
|
|
10811
10852
|
row: [{ type: i0.Input }],
|
|
10812
|
-
editMode: [{ type: i0.Input }],
|
|
10813
10853
|
fieldEditMode: [{ type: i0.Input }],
|
|
10814
10854
|
cellClick: [{ type: i0.Output }],
|
|
10815
10855
|
showClass: [{ type: i0.HostBinding, args: ["class.co-simple-grid-cell",] }],
|
|
@@ -10901,7 +10941,8 @@
|
|
|
10901
10941
|
FormModule,
|
|
10902
10942
|
ObserveVisibilityModule,
|
|
10903
10943
|
PaginationModule,
|
|
10904
|
-
PaginationBarModule
|
|
10944
|
+
PaginationBarModule,
|
|
10945
|
+
ClickoutsideModule
|
|
10905
10946
|
],
|
|
10906
10947
|
declarations: [
|
|
10907
10948
|
SimpleGridComponent,
|
|
@@ -11662,87 +11703,273 @@
|
|
|
11662
11703
|
},] }
|
|
11663
11704
|
];
|
|
11664
11705
|
|
|
11665
|
-
var
|
|
11666
|
-
function
|
|
11706
|
+
var CoreDynamicComponentService = /** @class */ (function () {
|
|
11707
|
+
function CoreDynamicComponentService(_compFactoryResolver, appRef, injector) {
|
|
11708
|
+
this._compFactoryResolver = _compFactoryResolver;
|
|
11709
|
+
this.appRef = appRef;
|
|
11710
|
+
this.injector = injector;
|
|
11711
|
+
this._componentRefs = [];
|
|
11667
11712
|
}
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11713
|
+
CoreDynamicComponentService.prototype.getComponentRefs = function () {
|
|
11714
|
+
return this._componentRefs;
|
|
11715
|
+
};
|
|
11716
|
+
CoreDynamicComponentService.prototype.createAndReturnComponentRef = function (componentClass, inputs) {
|
|
11717
|
+
var _this = this;
|
|
11718
|
+
return new Promise(function (resolve) {
|
|
11719
|
+
var componentRef = _this._compFactoryResolver
|
|
11720
|
+
.resolveComponentFactory(componentClass)
|
|
11721
|
+
.create(_this.injector);
|
|
11722
|
+
if (inputs) {
|
|
11723
|
+
for (var property in inputs) {
|
|
11724
|
+
if (inputs.hasOwnProperty(property)) {
|
|
11725
|
+
componentRef.instance[property] = inputs[property];
|
|
11726
|
+
}
|
|
11727
|
+
}
|
|
11728
|
+
}
|
|
11729
|
+
_this.appRef.attachView(componentRef.hostView);
|
|
11730
|
+
var domElem = componentRef.hostView
|
|
11731
|
+
.rootNodes[0];
|
|
11732
|
+
document.body.appendChild(domElem);
|
|
11733
|
+
componentRef.onDestroy(function () {
|
|
11734
|
+
_this.appRef.detachView(componentRef.hostView);
|
|
11735
|
+
});
|
|
11736
|
+
resolve(componentRef);
|
|
11737
|
+
});
|
|
11738
|
+
};
|
|
11739
|
+
CoreDynamicComponentService.prototype.createComponent = function (componentClass, inputs, outputs, providers) {
|
|
11740
|
+
var _this = this;
|
|
11741
|
+
return new Promise(function (resolve) {
|
|
11742
|
+
if (providers) {
|
|
11743
|
+
i0.Injector.create(providers, _this.injector);
|
|
11744
|
+
}
|
|
11745
|
+
var componentRef = _this._compFactoryResolver
|
|
11746
|
+
.resolveComponentFactory(componentClass)
|
|
11747
|
+
.create(_this.injector);
|
|
11748
|
+
_this._componentRefs.push(componentRef);
|
|
11749
|
+
if (inputs) {
|
|
11750
|
+
for (var property in inputs) {
|
|
11751
|
+
if (inputs.hasOwnProperty(property)) {
|
|
11752
|
+
componentRef.instance[property] = inputs[property];
|
|
11753
|
+
}
|
|
11754
|
+
}
|
|
11755
|
+
}
|
|
11756
|
+
if (outputs) {
|
|
11757
|
+
var _loop_1 = function (event) {
|
|
11758
|
+
if (outputs.hasOwnProperty(event)) {
|
|
11759
|
+
componentRef.instance[event].subscribe(function () { return outputs[event](); });
|
|
11760
|
+
}
|
|
11761
|
+
};
|
|
11762
|
+
for (var event in outputs) {
|
|
11763
|
+
_loop_1(event);
|
|
11764
|
+
}
|
|
11765
|
+
}
|
|
11766
|
+
_this.appRef.attachView(componentRef.hostView);
|
|
11767
|
+
var domElem = componentRef.hostView
|
|
11768
|
+
.rootNodes[0];
|
|
11769
|
+
document.body.appendChild(domElem);
|
|
11770
|
+
componentRef.onDestroy(function () {
|
|
11771
|
+
_this.appRef.detachView(componentRef.hostView);
|
|
11772
|
+
});
|
|
11773
|
+
componentRef.instance.onClose = function (button, output, rememberChoice) {
|
|
11774
|
+
var idx = _this._componentRefs.indexOf(componentRef);
|
|
11775
|
+
_this.appRef.detachView(componentRef.hostView);
|
|
11776
|
+
_this._componentRefs[idx] = undefined;
|
|
11777
|
+
_this._componentRefs.splice(idx, 1);
|
|
11778
|
+
if (outputs) {
|
|
11779
|
+
for (var event in outputs) {
|
|
11780
|
+
if (outputs.hasOwnProperty(event)) {
|
|
11781
|
+
componentRef.instance[event].unsubscribe();
|
|
11782
|
+
}
|
|
11783
|
+
}
|
|
11784
|
+
}
|
|
11785
|
+
resolve({ button: button, output: output ? output : undefined, rememberChoice: rememberChoice });
|
|
11786
|
+
};
|
|
11787
|
+
});
|
|
11788
|
+
};
|
|
11789
|
+
return CoreDynamicComponentService;
|
|
11790
|
+
}());
|
|
11791
|
+
CoreDynamicComponentService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CoreDynamicComponentService_Factory() { return new CoreDynamicComponentService(i0__namespace.ɵɵinject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵinject(i0__namespace.ApplicationRef), i0__namespace.ɵɵinject(i0__namespace.INJECTOR)); }, token: CoreDynamicComponentService, providedIn: "root" });
|
|
11792
|
+
CoreDynamicComponentService.decorators = [
|
|
11793
|
+
{ type: i0.Injectable, args: [{
|
|
11794
|
+
providedIn: "root"
|
|
11795
|
+
},] }
|
|
11796
|
+
];
|
|
11797
|
+
CoreDynamicComponentService.ctorParameters = function () { return [
|
|
11798
|
+
{ type: i0.ComponentFactoryResolver },
|
|
11799
|
+
{ type: i0.ApplicationRef },
|
|
11800
|
+
{ type: i0.Injector }
|
|
11801
|
+
]; };
|
|
11802
|
+
|
|
11803
|
+
var AppPopupType;
|
|
11804
|
+
(function (AppPopupType) {
|
|
11805
|
+
AppPopupType[AppPopupType["Error"] = 0] = "Error";
|
|
11806
|
+
AppPopupType[AppPopupType["Warning"] = 1] = "Warning";
|
|
11807
|
+
AppPopupType[AppPopupType["Information"] = 2] = "Information";
|
|
11808
|
+
AppPopupType[AppPopupType["Confirmation"] = 3] = "Confirmation";
|
|
11809
|
+
})(AppPopupType || (AppPopupType = {}));
|
|
11810
|
+
|
|
11811
|
+
var AppPopupButtonType;
|
|
11812
|
+
(function (AppPopupButtonType) {
|
|
11813
|
+
AppPopupButtonType[AppPopupButtonType["Ok"] = 0] = "Ok";
|
|
11814
|
+
AppPopupButtonType[AppPopupButtonType["Open"] = 1] = "Open";
|
|
11815
|
+
AppPopupButtonType[AppPopupButtonType["Save"] = 2] = "Save";
|
|
11816
|
+
AppPopupButtonType[AppPopupButtonType["Cancel"] = 3] = "Cancel";
|
|
11817
|
+
AppPopupButtonType[AppPopupButtonType["Yes"] = 4] = "Yes";
|
|
11818
|
+
AppPopupButtonType[AppPopupButtonType["No"] = 5] = "No";
|
|
11819
|
+
AppPopupButtonType[AppPopupButtonType["NoButton"] = 6] = "NoButton";
|
|
11820
|
+
})(AppPopupButtonType || (AppPopupButtonType = {}));
|
|
11821
|
+
|
|
11822
|
+
var DialogBaseComponent = /** @class */ (function () {
|
|
11823
|
+
function DialogBaseComponent() {
|
|
11824
|
+
}
|
|
11825
|
+
DialogBaseComponent.prototype.onClose = function (eventType, output, rememberChoice) {
|
|
11826
|
+
return;
|
|
11827
|
+
};
|
|
11828
|
+
return DialogBaseComponent;
|
|
11829
|
+
}());
|
|
11830
|
+
|
|
11831
|
+
var ConfirmationDialogComponent = /** @class */ (function (_super) {
|
|
11832
|
+
__extends(ConfirmationDialogComponent, _super);
|
|
11833
|
+
function ConfirmationDialogComponent(iconCacheService) {
|
|
11834
|
+
var _this = _super.call(this) || this;
|
|
11835
|
+
_this.iconCacheService = iconCacheService;
|
|
11836
|
+
_this.icons = exports.CoreComponentsIcon;
|
|
11837
|
+
_this.ptype = AppPopupType;
|
|
11838
|
+
_this.showRememberCheckbox = false;
|
|
11839
|
+
_this.rememberChoice = false;
|
|
11840
|
+
return _this;
|
|
11841
|
+
}
|
|
11842
|
+
ConfirmationDialogComponent.prototype.showClass = function () {
|
|
11843
|
+
return true;
|
|
11844
|
+
};
|
|
11845
|
+
ConfirmationDialogComponent.prototype.handleYesClick = function (event) {
|
|
11846
|
+
this.onClose(AppPopupButtonType.Yes, undefined, this.rememberChoice);
|
|
11847
|
+
};
|
|
11848
|
+
ConfirmationDialogComponent.prototype.handleNoClick = function (event) {
|
|
11849
|
+
this.onClose(AppPopupButtonType.No, undefined, this.rememberChoice);
|
|
11850
|
+
};
|
|
11851
|
+
ConfirmationDialogComponent.prototype.handleOkClick = function (event) {
|
|
11852
|
+
this.onClose(AppPopupButtonType.Ok, undefined, this.rememberChoice);
|
|
11853
|
+
};
|
|
11854
|
+
return ConfirmationDialogComponent;
|
|
11855
|
+
}(DialogBaseComponent));
|
|
11856
|
+
ConfirmationDialogComponent.decorators = [
|
|
11857
|
+
{ type: i0.Component, args: [{
|
|
11858
|
+
selector: "co-confirmation-dialog",
|
|
11859
|
+
template: "\n <co-dialog [showCloseIcon]=\"false\" [headerTemplate]=\"headerTemplate\" [footerTemplate]=\"footerTemplate\">\n <div class=\"confirmation-dialog-wrapper\">\n <div class=\"text\" [innerHTML]=\"text\"></div>\n <co-collapsible [headerTitle]=\"'DETAILS' | coreLocalize\" [iconData]=\"iconCacheService.getIcon(icons.TriangleDown)\" *ngIf=\"details\">\n <div class=\"dialog-details\" [innerHTML]=\"details\"></div>\n </co-collapsible>\n </div>\n </co-dialog>\n <ng-template #headerTemplate>\n <div class=\"co-dialog-header-title\" [textContent]=\"title\"></div>\n </ng-template>\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <ng-container *ngIf=\"type === ptype.Confirmation\">\n <co-button class=\"save-button\"\n [label]=\"'YES' | coreLocalize\"\n (click)=\"handleYesClick($event)\"></co-button>\n <co-button class=\"close-button\"\n [label]=\"'NO' | coreLocalize\"\n (click)=\"handleNoClick($event)\"></co-button>\n </ng-container>\n <ng-container *ngIf=\"type === ptype.Information || type === ptype.Error || type === ptype.Warning\">\n <co-button class=\"save-button\"\n [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\"\n (click)=\"handleYesClick($event)\"></co-button>\n </ng-container>\n </div>\n <ng-container *ngIf=\"showRememberCheckbox\">\n <co-input-checkbox [label]=\"'REMEMBER_CHOICE' | coreLocalize\" [(model)]=\"rememberChoice\"></co-input-checkbox>\n </ng-container>\n </ng-template>\n ",
|
|
11860
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
11861
|
+
},] }
|
|
11862
|
+
];
|
|
11863
|
+
ConfirmationDialogComponent.ctorParameters = function () { return [
|
|
11864
|
+
{ type: IconCacheService }
|
|
11865
|
+
]; };
|
|
11866
|
+
ConfirmationDialogComponent.propDecorators = {
|
|
11867
|
+
title: [{ type: i0.Input }],
|
|
11868
|
+
text: [{ type: i0.Input }],
|
|
11869
|
+
details: [{ type: i0.Input }],
|
|
11870
|
+
type: [{ type: i0.Input }],
|
|
11871
|
+
showRememberCheckbox: [{ type: i0.Input }],
|
|
11872
|
+
showClass: [{ type: i0.HostBinding, args: ["class.co-confirmation-dialog",] }]
|
|
11873
|
+
};
|
|
11874
|
+
|
|
11875
|
+
var CoreDialogService = /** @class */ (function () {
|
|
11876
|
+
function CoreDialogService(_compFactoryResolver, appRef, injector, dynamicComponentService) {
|
|
11877
|
+
this._compFactoryResolver = _compFactoryResolver;
|
|
11878
|
+
this.appRef = appRef;
|
|
11879
|
+
this.injector = injector;
|
|
11880
|
+
this.dynamicComponentService = dynamicComponentService;
|
|
11881
|
+
this._componentRefs = [];
|
|
11882
|
+
}
|
|
11883
|
+
CoreDialogService.prototype.showYesNo = function (title, text, showRememberChoice) {
|
|
11884
|
+
if (showRememberChoice === void 0) { showRememberChoice = false; }
|
|
11885
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11886
|
+
var data;
|
|
11887
|
+
return __generator(this, function (_a) {
|
|
11888
|
+
data = {
|
|
11889
|
+
title: title,
|
|
11890
|
+
text: text,
|
|
11891
|
+
type: AppPopupType.Confirmation,
|
|
11892
|
+
showRememberCheckbox: showRememberChoice
|
|
11893
|
+
};
|
|
11894
|
+
return [2 /*return*/, this.dynamicComponentService.createComponent(ConfirmationDialogComponent, data)];
|
|
11895
|
+
});
|
|
11896
|
+
});
|
|
11897
|
+
};
|
|
11898
|
+
CoreDialogService.prototype.showError = function (message, details) {
|
|
11899
|
+
var data = {
|
|
11900
|
+
title: 'ERROR',
|
|
11901
|
+
text: message,
|
|
11902
|
+
type: AppPopupType.Error
|
|
11903
|
+
};
|
|
11904
|
+
if (details) {
|
|
11905
|
+
data.details = details;
|
|
11671
11906
|
}
|
|
11672
|
-
return
|
|
11907
|
+
return this.dynamicComponentService.createComponent(ConfirmationDialogComponent, data);
|
|
11673
11908
|
};
|
|
11674
|
-
|
|
11909
|
+
CoreDialogService.prototype.showInformation = function (message) {
|
|
11910
|
+
var data = {
|
|
11911
|
+
title: 'INFORMATION',
|
|
11912
|
+
text: message,
|
|
11913
|
+
type: AppPopupType.Information
|
|
11914
|
+
};
|
|
11915
|
+
return this.dynamicComponentService.createComponent(ConfirmationDialogComponent, data);
|
|
11916
|
+
};
|
|
11917
|
+
CoreDialogService.prototype.showWarning = function (message) {
|
|
11918
|
+
var data = {
|
|
11919
|
+
title: 'WARNING',
|
|
11920
|
+
text: message,
|
|
11921
|
+
type: AppPopupType.Warning
|
|
11922
|
+
};
|
|
11923
|
+
return this.dynamicComponentService.createComponent(ConfirmationDialogComponent, data);
|
|
11924
|
+
};
|
|
11925
|
+
return CoreDialogService;
|
|
11675
11926
|
}());
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11927
|
+
CoreDialogService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CoreDialogService_Factory() { return new CoreDialogService(i0__namespace.ɵɵinject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵinject(i0__namespace.ApplicationRef), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(CoreDynamicComponentService)); }, token: CoreDialogService, providedIn: "root" });
|
|
11928
|
+
CoreDialogService.decorators = [
|
|
11929
|
+
{ type: i0.Injectable, args: [{
|
|
11930
|
+
providedIn: "root"
|
|
11680
11931
|
},] }
|
|
11681
|
-
];
|
|
11932
|
+
];
|
|
11933
|
+
CoreDialogService.ctorParameters = function () { return [
|
|
11934
|
+
{ type: i0.ComponentFactoryResolver },
|
|
11935
|
+
{ type: i0.ApplicationRef },
|
|
11936
|
+
{ type: i0.Injector },
|
|
11937
|
+
{ type: CoreDynamicComponentService }
|
|
11938
|
+
]; };
|
|
11682
11939
|
|
|
11683
|
-
var
|
|
11684
|
-
function
|
|
11940
|
+
var CoreDialogModule = /** @class */ (function () {
|
|
11941
|
+
function CoreDialogModule() {
|
|
11685
11942
|
}
|
|
11686
|
-
|
|
11943
|
+
CoreDialogModule.forRoot = function () {
|
|
11944
|
+
return {
|
|
11945
|
+
ngModule: CoreDialogModule,
|
|
11946
|
+
providers: [
|
|
11947
|
+
CoreDialogService
|
|
11948
|
+
]
|
|
11949
|
+
};
|
|
11950
|
+
};
|
|
11951
|
+
return CoreDialogModule;
|
|
11687
11952
|
}());
|
|
11688
|
-
|
|
11953
|
+
CoreDialogModule.decorators = [
|
|
11689
11954
|
{ type: i0.NgModule, args: [{
|
|
11955
|
+
imports: [
|
|
11956
|
+
common.CommonModule,
|
|
11957
|
+
CoDialogModule,
|
|
11958
|
+
CollapsibleModule,
|
|
11959
|
+
CoreComponentsTranslationModule,
|
|
11960
|
+
ButtonModule,
|
|
11961
|
+
InputCheckboxModule
|
|
11962
|
+
],
|
|
11690
11963
|
declarations: [
|
|
11691
|
-
|
|
11964
|
+
ConfirmationDialogComponent
|
|
11692
11965
|
],
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
]
|
|
11966
|
+
providers: [
|
|
11967
|
+
CoreDialogService
|
|
11968
|
+
],
|
|
11969
|
+
exports: []
|
|
11696
11970
|
},] }
|
|
11697
11971
|
];
|
|
11698
11972
|
|
|
11699
|
-
function equalValidator(valueGetterFn) {
|
|
11700
|
-
return function (control) {
|
|
11701
|
-
var isValid = true;
|
|
11702
|
-
if (valueGetterFn) {
|
|
11703
|
-
var mustBeEqualTo = valueGetterFn.call(this);
|
|
11704
|
-
isValid = control.value === mustBeEqualTo;
|
|
11705
|
-
}
|
|
11706
|
-
return isValid ? null : { "equality": "MESSAGE_FIELD_WRONG_VALUE" };
|
|
11707
|
-
};
|
|
11708
|
-
}
|
|
11709
|
-
|
|
11710
|
-
function passwordValidator(userNameGetterFn) {
|
|
11711
|
-
return function (control) {
|
|
11712
|
-
if (control && control.value) {
|
|
11713
|
-
var username = userNameGetterFn.call(this);
|
|
11714
|
-
var errorString = getValidatePasswordErrorString(StringUtils.ToStringOrDefault(control.value), username);
|
|
11715
|
-
if (errorString) {
|
|
11716
|
-
return { "password": errorString };
|
|
11717
|
-
}
|
|
11718
|
-
}
|
|
11719
|
-
};
|
|
11720
|
-
}
|
|
11721
|
-
// @returns undefined if valid, or an error string if there's an error
|
|
11722
|
-
function getValidatePasswordErrorString(password, username) {
|
|
11723
|
-
var minimumPasswordLength = 10;
|
|
11724
|
-
var lengthOk = password && minimumPasswordLength <= password.length;
|
|
11725
|
-
if (!lengthOk) {
|
|
11726
|
-
return "PASSWORD_MUST_BE_10_CHARACTERS";
|
|
11727
|
-
}
|
|
11728
|
-
var atLeastOneNumber = RegExp(".*[0-9].*").test(password);
|
|
11729
|
-
var atLeastOneLetter = RegExp(".*[a-zA-Z].*").test(password);
|
|
11730
|
-
var atLeastOneSpecial = RegExp(".*[!@#$%&*()'+,\\-./:;<=>?\\[\\]^_`{|}\\\\].*").test(password);
|
|
11731
|
-
if (!atLeastOneNumber || !atLeastOneLetter || !atLeastOneSpecial) {
|
|
11732
|
-
return "PASSWORD_MUST_CONTAIN_LETTER_NUMBER_SPECIAL";
|
|
11733
|
-
}
|
|
11734
|
-
var hasUsernameInPassword = username && RegExp(".*" + username.trim() + ".*", "i").test(password);
|
|
11735
|
-
if (hasUsernameInPassword) {
|
|
11736
|
-
return "PASSWORD_CONTAINS_USERNAME";
|
|
11737
|
-
}
|
|
11738
|
-
}
|
|
11739
|
-
|
|
11740
|
-
function emailValidator(control) {
|
|
11741
|
-
var emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
11742
|
-
var isValid = !!emailRegex.test(control.value);
|
|
11743
|
-
return isValid ? null : { 'email': 'MESSAGE_EMAIL_NOT_CORRECT' };
|
|
11744
|
-
}
|
|
11745
|
-
|
|
11746
11973
|
var FilterItemComponent = /** @class */ (function () {
|
|
11747
11974
|
function FilterItemComponent(iconService, _changeDetector) {
|
|
11748
11975
|
this.iconService = iconService;
|
|
@@ -12252,7 +12479,7 @@
|
|
|
12252
12479
|
FilterItemComponent.decorators = [
|
|
12253
12480
|
{ type: i0.Component, args: [{
|
|
12254
12481
|
selector: "co-filter-item",
|
|
12255
|
-
template: "\n
|
|
12482
|
+
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)=\"applyFilter($event)\"\n >\n </co-input-text>\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 ></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 ></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 (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 (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 (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 (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 [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 [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\"\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\"\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\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 ",
|
|
12256
12483
|
encapsulation: i0.ViewEncapsulation.None,
|
|
12257
12484
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
12258
12485
|
},] }
|
|
@@ -12353,36 +12580,371 @@
|
|
|
12353
12580
|
},] }
|
|
12354
12581
|
];
|
|
12355
12582
|
|
|
12356
|
-
var
|
|
12357
|
-
function
|
|
12358
|
-
|
|
12359
|
-
this.
|
|
12360
|
-
this.
|
|
12361
|
-
this.
|
|
12362
|
-
this.
|
|
12363
|
-
this.
|
|
12583
|
+
var CheckmarkOverlayComponent = /** @class */ (function () {
|
|
12584
|
+
function CheckmarkOverlayComponent(_renderer) {
|
|
12585
|
+
var _this = this;
|
|
12586
|
+
this._renderer = _renderer;
|
|
12587
|
+
this.showOverlay = false;
|
|
12588
|
+
this.showWrapper = false;
|
|
12589
|
+
this._visible = false;
|
|
12590
|
+
this._handleAnimationIteration = function (event) {
|
|
12591
|
+
_this.animateDivs.forEach(function (a) { return _this._renderer.removeClass(a.nativeElement, 'animate'); });
|
|
12592
|
+
event.currentTarget.removeEventListener('animationiteration', _this._handleAnimationIteration);
|
|
12593
|
+
};
|
|
12364
12594
|
}
|
|
12365
|
-
Object.defineProperty(
|
|
12595
|
+
Object.defineProperty(CheckmarkOverlayComponent.prototype, "content", {
|
|
12596
|
+
set: function (children) {
|
|
12597
|
+
this.animateDivs = children.toArray();
|
|
12598
|
+
this._checkAnimation();
|
|
12599
|
+
},
|
|
12600
|
+
enumerable: false,
|
|
12601
|
+
configurable: true
|
|
12602
|
+
});
|
|
12603
|
+
Object.defineProperty(CheckmarkOverlayComponent.prototype, "visible", {
|
|
12366
12604
|
get: function () {
|
|
12367
|
-
return this.
|
|
12605
|
+
return this._visible;
|
|
12368
12606
|
},
|
|
12369
12607
|
set: function (value) {
|
|
12370
|
-
|
|
12371
|
-
|
|
12608
|
+
var _this = this;
|
|
12609
|
+
if (value) {
|
|
12610
|
+
this.showOverlay = true;
|
|
12611
|
+
this.showWrapper = true;
|
|
12612
|
+
}
|
|
12613
|
+
else {
|
|
12614
|
+
setTimeout(function () { return _this.showOverlay = false; }, 800);
|
|
12615
|
+
setTimeout(function () { return _this.showWrapper = false; }, 600);
|
|
12616
|
+
}
|
|
12617
|
+
this._visible = value;
|
|
12618
|
+
this._checkAnimation();
|
|
12619
|
+
this._checkAnimationFinished();
|
|
12372
12620
|
},
|
|
12373
12621
|
enumerable: false,
|
|
12374
12622
|
configurable: true
|
|
12375
12623
|
});
|
|
12376
|
-
|
|
12624
|
+
CheckmarkOverlayComponent.prototype.showClass = function () {
|
|
12377
12625
|
return true;
|
|
12378
12626
|
};
|
|
12379
|
-
|
|
12627
|
+
CheckmarkOverlayComponent.prototype._checkAnimation = function () {
|
|
12380
12628
|
var _this = this;
|
|
12381
|
-
|
|
12382
|
-
_this.
|
|
12383
|
-
}
|
|
12384
|
-
};
|
|
12385
|
-
|
|
12629
|
+
if (this.visible && this.animateDivs) {
|
|
12630
|
+
this.animateDivs.forEach(function (a) { return _this._renderer.addClass(a.nativeElement, 'animate'); });
|
|
12631
|
+
}
|
|
12632
|
+
};
|
|
12633
|
+
CheckmarkOverlayComponent.prototype._checkAnimationFinished = function () {
|
|
12634
|
+
var _this = this;
|
|
12635
|
+
if (!this.visible && this.animateDivs) {
|
|
12636
|
+
this.animateDivs.forEach(function (a) {
|
|
12637
|
+
a.nativeElement.addEventListener('animationiteration', _this._handleAnimationIteration);
|
|
12638
|
+
});
|
|
12639
|
+
}
|
|
12640
|
+
};
|
|
12641
|
+
return CheckmarkOverlayComponent;
|
|
12642
|
+
}());
|
|
12643
|
+
CheckmarkOverlayComponent.decorators = [
|
|
12644
|
+
{ type: i0.Component, args: [{
|
|
12645
|
+
selector: "co-checkmark-overlay",
|
|
12646
|
+
template: "\n <div *ngIf=\"showOverlay\">\n <div class=\"checkmark-overlay-wrapper\" *ngIf=\"showWrapper\" @showHideSaveCancel>\n <div class=\"checkmark-buttons-button save\" [class.finished]=\"!visible\">\n <div class=\"save-button-spinner\">\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n </div>\n <div class=\"spinner-checkmark\" *ngIf=\"!visible && successful\"></div>\n </div>\n </div>\n </div>\n ",
|
|
12647
|
+
animations: [
|
|
12648
|
+
animations.trigger('showHideSaveCancel', [
|
|
12649
|
+
animations.state('*', animations.style({ transform: 'scaleY(1)', opacity: 1 })),
|
|
12650
|
+
animations.state('void', animations.style({ transform: 'scaleY(0)', opacity: 0 })),
|
|
12651
|
+
animations.transition('void <=> *', animations.animate(200))
|
|
12652
|
+
]),
|
|
12653
|
+
],
|
|
12654
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
12655
|
+
},] }
|
|
12656
|
+
];
|
|
12657
|
+
CheckmarkOverlayComponent.ctorParameters = function () { return [
|
|
12658
|
+
{ type: i0.Renderer2 }
|
|
12659
|
+
]; };
|
|
12660
|
+
CheckmarkOverlayComponent.propDecorators = {
|
|
12661
|
+
content: [{ type: i0.ViewChildren, args: ['animatediv', { read: i0.ElementRef },] }],
|
|
12662
|
+
visible: [{ type: i0.Input }],
|
|
12663
|
+
successful: [{ type: i0.Input }],
|
|
12664
|
+
showClass: [{ type: i0.HostBinding, args: ["class.co-checkmark-overlay",] }]
|
|
12665
|
+
};
|
|
12666
|
+
|
|
12667
|
+
var CheckmarkOverlayModule = /** @class */ (function () {
|
|
12668
|
+
function CheckmarkOverlayModule() {
|
|
12669
|
+
}
|
|
12670
|
+
return CheckmarkOverlayModule;
|
|
12671
|
+
}());
|
|
12672
|
+
CheckmarkOverlayModule.decorators = [
|
|
12673
|
+
{ type: i0.NgModule, args: [{
|
|
12674
|
+
imports: [
|
|
12675
|
+
common.CommonModule
|
|
12676
|
+
],
|
|
12677
|
+
declarations: [
|
|
12678
|
+
CheckmarkOverlayComponent
|
|
12679
|
+
],
|
|
12680
|
+
exports: [
|
|
12681
|
+
CheckmarkOverlayComponent
|
|
12682
|
+
]
|
|
12683
|
+
},] }
|
|
12684
|
+
];
|
|
12685
|
+
|
|
12686
|
+
var FilterItemViewmodel = /** @class */ (function () {
|
|
12687
|
+
function FilterItemViewmodel(code, description, checked, count, valueName) {
|
|
12688
|
+
this.checked = false;
|
|
12689
|
+
this.code = code;
|
|
12690
|
+
this.description = description === null || description === void 0 ? void 0 : description.toString();
|
|
12691
|
+
this.checked = checked;
|
|
12692
|
+
this.count = count;
|
|
12693
|
+
this.valueName = valueName;
|
|
12694
|
+
}
|
|
12695
|
+
FilterItemViewmodel.prototype.codeAsNumber = function () { return NumberUtils.ParseInt(this.code); };
|
|
12696
|
+
return FilterItemViewmodel;
|
|
12697
|
+
}());
|
|
12698
|
+
|
|
12699
|
+
var FilterViewmodel = /** @class */ (function () {
|
|
12700
|
+
function FilterViewmodel(collection, fields) {
|
|
12701
|
+
var _this = this;
|
|
12702
|
+
this.filterItems = [];
|
|
12703
|
+
collection.forEach(function (item) {
|
|
12704
|
+
var _a, _b, _c;
|
|
12705
|
+
_this.filterItems.push(new FilterItemViewmodel(item[fields.value], item[fields.text], (_a = item.checked) !== null && _a !== void 0 ? _a : false, (_b = item.count) !== null && _b !== void 0 ? _b : null, (_c = item.valueName) !== null && _c !== void 0 ? _c : null));
|
|
12706
|
+
});
|
|
12707
|
+
}
|
|
12708
|
+
return FilterViewmodel;
|
|
12709
|
+
}());
|
|
12710
|
+
|
|
12711
|
+
var BarCodeScanner = /** @class */ (function () {
|
|
12712
|
+
function BarCodeScanner() {
|
|
12713
|
+
var _this = this;
|
|
12714
|
+
this._buffer = [];
|
|
12715
|
+
this._keyPress = function (event) {
|
|
12716
|
+
if (event.key === "Enter") {
|
|
12717
|
+
document.dispatchEvent(_this._createScanEvent());
|
|
12718
|
+
_this._buffer.length = 0;
|
|
12719
|
+
}
|
|
12720
|
+
else {
|
|
12721
|
+
var str = event.key;
|
|
12722
|
+
_this._buffer.push(str);
|
|
12723
|
+
}
|
|
12724
|
+
};
|
|
12725
|
+
document.addEventListener('keypress', this._keyPress);
|
|
12726
|
+
}
|
|
12727
|
+
BarCodeScanner.prototype.close = function () {
|
|
12728
|
+
document.removeEventListener('keypress', this._keyPress);
|
|
12729
|
+
};
|
|
12730
|
+
BarCodeScanner.prototype._createScanEvent = function () {
|
|
12731
|
+
return new CustomEvent("barcodescanned", { detail: this._buffer.join("") });
|
|
12732
|
+
};
|
|
12733
|
+
return BarCodeScanner;
|
|
12734
|
+
}());
|
|
12735
|
+
|
|
12736
|
+
var ScannerService = /** @class */ (function () {
|
|
12737
|
+
function ScannerService(_ngZone) {
|
|
12738
|
+
var _this = this;
|
|
12739
|
+
this._ngZone = _ngZone;
|
|
12740
|
+
this.barCodeScanner = new BarCodeScanner();
|
|
12741
|
+
this._barCodeScanned = function (event) {
|
|
12742
|
+
if (_this._activeInput) {
|
|
12743
|
+
_this._activeInput.triggerCodeScanned(event.detail);
|
|
12744
|
+
}
|
|
12745
|
+
};
|
|
12746
|
+
document.addEventListener("barcodescanned", this._barCodeScanned);
|
|
12747
|
+
}
|
|
12748
|
+
ScannerService.prototype.ngOnDestroy = function () {
|
|
12749
|
+
document.removeEventListener("barcodescanned", this._barCodeScanned);
|
|
12750
|
+
this.barCodeScanner.close();
|
|
12751
|
+
};
|
|
12752
|
+
ScannerService.prototype.registerInput = function (input) {
|
|
12753
|
+
this._activeInput = input;
|
|
12754
|
+
};
|
|
12755
|
+
return ScannerService;
|
|
12756
|
+
}());
|
|
12757
|
+
ScannerService.decorators = [
|
|
12758
|
+
{ type: i0.Injectable }
|
|
12759
|
+
];
|
|
12760
|
+
ScannerService.ctorParameters = function () { return [
|
|
12761
|
+
{ type: i0.NgZone }
|
|
12762
|
+
]; };
|
|
12763
|
+
|
|
12764
|
+
var InputScannerComponent = /** @class */ (function () {
|
|
12765
|
+
function InputScannerComponent(_scannerService) {
|
|
12766
|
+
this._scannerService = _scannerService;
|
|
12767
|
+
this.centerLabel = false;
|
|
12768
|
+
this.useLeftIcon = false;
|
|
12769
|
+
this.useRightIcon = false;
|
|
12770
|
+
this.modelChange = new i0.EventEmitter();
|
|
12771
|
+
this.leftIconClick = new i0.EventEmitter();
|
|
12772
|
+
this.rightIconClick = new i0.EventEmitter();
|
|
12773
|
+
this.search = new i0.EventEmitter();
|
|
12774
|
+
this.barCodeScanned = new i0.EventEmitter();
|
|
12775
|
+
this._scannerService.registerInput(this);
|
|
12776
|
+
}
|
|
12777
|
+
InputScannerComponent.prototype.showClass = function () {
|
|
12778
|
+
return true;
|
|
12779
|
+
};
|
|
12780
|
+
InputScannerComponent.prototype.triggerCodeScanned = function (code) {
|
|
12781
|
+
this.model = code;
|
|
12782
|
+
this.barCodeScanned.next(this.model);
|
|
12783
|
+
};
|
|
12784
|
+
return InputScannerComponent;
|
|
12785
|
+
}());
|
|
12786
|
+
InputScannerComponent.decorators = [
|
|
12787
|
+
{ type: i0.Component, args: [{
|
|
12788
|
+
selector: 'co-input-scanner',
|
|
12789
|
+
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 (search)=\"search.emit($event)\"\n ></co-input-search>\n ",
|
|
12790
|
+
providers: [
|
|
12791
|
+
ScannerService,
|
|
12792
|
+
OverlayService
|
|
12793
|
+
],
|
|
12794
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
12795
|
+
},] }
|
|
12796
|
+
];
|
|
12797
|
+
InputScannerComponent.ctorParameters = function () { return [
|
|
12798
|
+
{ type: ScannerService }
|
|
12799
|
+
]; };
|
|
12800
|
+
InputScannerComponent.propDecorators = {
|
|
12801
|
+
model: [{ type: i0.Input }],
|
|
12802
|
+
placeholder: [{ type: i0.Input }],
|
|
12803
|
+
centerLabel: [{ type: i0.Input }],
|
|
12804
|
+
useLeftIcon: [{ type: i0.Input }],
|
|
12805
|
+
useRightIcon: [{ type: i0.Input }],
|
|
12806
|
+
leftIconData: [{ type: i0.Input }],
|
|
12807
|
+
rightIconData: [{ type: i0.Input }],
|
|
12808
|
+
customCssClass: [{ type: i0.Input }],
|
|
12809
|
+
modelChange: [{ type: i0.Output }],
|
|
12810
|
+
leftIconClick: [{ type: i0.Output }],
|
|
12811
|
+
rightIconClick: [{ type: i0.Output }],
|
|
12812
|
+
search: [{ type: i0.Output }],
|
|
12813
|
+
barCodeScanned: [{ type: i0.Output }],
|
|
12814
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-input-scanner',] }]
|
|
12815
|
+
};
|
|
12816
|
+
|
|
12817
|
+
var InputScannerModule = /** @class */ (function () {
|
|
12818
|
+
function InputScannerModule() {
|
|
12819
|
+
}
|
|
12820
|
+
return InputScannerModule;
|
|
12821
|
+
}());
|
|
12822
|
+
InputScannerModule.decorators = [
|
|
12823
|
+
{ type: i0.NgModule, args: [{
|
|
12824
|
+
imports: [
|
|
12825
|
+
common.CommonModule,
|
|
12826
|
+
InputSearchModule
|
|
12827
|
+
],
|
|
12828
|
+
declarations: [
|
|
12829
|
+
InputScannerComponent
|
|
12830
|
+
],
|
|
12831
|
+
exports: [
|
|
12832
|
+
InputScannerComponent
|
|
12833
|
+
]
|
|
12834
|
+
},] }
|
|
12835
|
+
];
|
|
12836
|
+
|
|
12837
|
+
var FilterPipe = /** @class */ (function () {
|
|
12838
|
+
function FilterPipe() {
|
|
12839
|
+
}
|
|
12840
|
+
FilterPipe.prototype.transform = function (items, field, value) {
|
|
12841
|
+
if (!items || !field) {
|
|
12842
|
+
return items;
|
|
12843
|
+
}
|
|
12844
|
+
return items.filter(function (item) { return item[field] === value; });
|
|
12845
|
+
};
|
|
12846
|
+
return FilterPipe;
|
|
12847
|
+
}());
|
|
12848
|
+
FilterPipe.decorators = [
|
|
12849
|
+
{ type: i0.Pipe, args: [{
|
|
12850
|
+
name: "filter",
|
|
12851
|
+
pure: false
|
|
12852
|
+
},] }
|
|
12853
|
+
];
|
|
12854
|
+
|
|
12855
|
+
var FilterPipeModule = /** @class */ (function () {
|
|
12856
|
+
function FilterPipeModule() {
|
|
12857
|
+
}
|
|
12858
|
+
return FilterPipeModule;
|
|
12859
|
+
}());
|
|
12860
|
+
FilterPipeModule.decorators = [
|
|
12861
|
+
{ type: i0.NgModule, args: [{
|
|
12862
|
+
declarations: [
|
|
12863
|
+
FilterPipe
|
|
12864
|
+
],
|
|
12865
|
+
exports: [
|
|
12866
|
+
FilterPipe
|
|
12867
|
+
]
|
|
12868
|
+
},] }
|
|
12869
|
+
];
|
|
12870
|
+
|
|
12871
|
+
function equalValidator(valueGetterFn) {
|
|
12872
|
+
return function (control) {
|
|
12873
|
+
var isValid = true;
|
|
12874
|
+
if (valueGetterFn) {
|
|
12875
|
+
var mustBeEqualTo = valueGetterFn.call(this);
|
|
12876
|
+
isValid = control.value === mustBeEqualTo;
|
|
12877
|
+
}
|
|
12878
|
+
return isValid ? null : { "equality": "MESSAGE_FIELD_WRONG_VALUE" };
|
|
12879
|
+
};
|
|
12880
|
+
}
|
|
12881
|
+
|
|
12882
|
+
function passwordValidator(userNameGetterFn) {
|
|
12883
|
+
return function (control) {
|
|
12884
|
+
if (control && control.value) {
|
|
12885
|
+
var username = userNameGetterFn.call(this);
|
|
12886
|
+
var errorString = getValidatePasswordErrorString(StringUtils.ToStringOrDefault(control.value), username);
|
|
12887
|
+
if (errorString) {
|
|
12888
|
+
return { "password": errorString };
|
|
12889
|
+
}
|
|
12890
|
+
}
|
|
12891
|
+
};
|
|
12892
|
+
}
|
|
12893
|
+
// @returns undefined if valid, or an error string if there's an error
|
|
12894
|
+
function getValidatePasswordErrorString(password, username) {
|
|
12895
|
+
var minimumPasswordLength = 10;
|
|
12896
|
+
var lengthOk = password && minimumPasswordLength <= password.length;
|
|
12897
|
+
if (!lengthOk) {
|
|
12898
|
+
return "PASSWORD_MUST_BE_10_CHARACTERS";
|
|
12899
|
+
}
|
|
12900
|
+
var atLeastOneNumber = RegExp(".*[0-9].*").test(password);
|
|
12901
|
+
var atLeastOneLetter = RegExp(".*[a-zA-Z].*").test(password);
|
|
12902
|
+
var atLeastOneSpecial = RegExp(".*[!@#$%&*()'+,\\-./:;<=>?\\[\\]^_`{|}\\\\].*").test(password);
|
|
12903
|
+
if (!atLeastOneNumber || !atLeastOneLetter || !atLeastOneSpecial) {
|
|
12904
|
+
return "PASSWORD_MUST_CONTAIN_LETTER_NUMBER_SPECIAL";
|
|
12905
|
+
}
|
|
12906
|
+
var hasUsernameInPassword = username && RegExp(".*" + username.trim() + ".*", "i").test(password);
|
|
12907
|
+
if (hasUsernameInPassword) {
|
|
12908
|
+
return "PASSWORD_CONTAINS_USERNAME";
|
|
12909
|
+
}
|
|
12910
|
+
}
|
|
12911
|
+
|
|
12912
|
+
function emailValidator(control) {
|
|
12913
|
+
var emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
12914
|
+
var isValid = !!emailRegex.test(control.value);
|
|
12915
|
+
return isValid ? null : { 'email': 'MESSAGE_EMAIL_NOT_CORRECT' };
|
|
12916
|
+
}
|
|
12917
|
+
|
|
12918
|
+
var TooltipComponent = /** @class */ (function () {
|
|
12919
|
+
function TooltipComponent(_elementRef, _changeDetector) {
|
|
12920
|
+
this._elementRef = _elementRef;
|
|
12921
|
+
this._changeDetector = _changeDetector;
|
|
12922
|
+
this.top = -100;
|
|
12923
|
+
this.left = -100;
|
|
12924
|
+
this.bottom = false;
|
|
12925
|
+
this.animate = true;
|
|
12926
|
+
}
|
|
12927
|
+
Object.defineProperty(TooltipComponent.prototype, "hostElement", {
|
|
12928
|
+
get: function () {
|
|
12929
|
+
return this._hostElement;
|
|
12930
|
+
},
|
|
12931
|
+
set: function (value) {
|
|
12932
|
+
this._hostElement = value;
|
|
12933
|
+
// this._positionTooltip();
|
|
12934
|
+
},
|
|
12935
|
+
enumerable: false,
|
|
12936
|
+
configurable: true
|
|
12937
|
+
});
|
|
12938
|
+
TooltipComponent.prototype.showClass = function () {
|
|
12939
|
+
return true;
|
|
12940
|
+
};
|
|
12941
|
+
TooltipComponent.prototype.ngAfterViewInit = function () {
|
|
12942
|
+
var _this = this;
|
|
12943
|
+
setTimeout(function () {
|
|
12944
|
+
_this._positionTooltip();
|
|
12945
|
+
});
|
|
12946
|
+
};
|
|
12947
|
+
TooltipComponent.prototype._positionTooltip = function () {
|
|
12386
12948
|
if (this.hostElement && this._elementRef && this._elementRef.nativeElement) {
|
|
12387
12949
|
var rect = this.hostElement.getBoundingClientRect();
|
|
12388
12950
|
var ownRect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
@@ -12552,109 +13114,6 @@
|
|
|
12552
13114
|
},] }
|
|
12553
13115
|
];
|
|
12554
13116
|
|
|
12555
|
-
var CheckmarkOverlayComponent = /** @class */ (function () {
|
|
12556
|
-
function CheckmarkOverlayComponent(_renderer) {
|
|
12557
|
-
var _this = this;
|
|
12558
|
-
this._renderer = _renderer;
|
|
12559
|
-
this.showOverlay = false;
|
|
12560
|
-
this.showWrapper = false;
|
|
12561
|
-
this._visible = false;
|
|
12562
|
-
this._handleAnimationIteration = function (event) {
|
|
12563
|
-
_this.animateDivs.forEach(function (a) { return _this._renderer.removeClass(a.nativeElement, 'animate'); });
|
|
12564
|
-
event.currentTarget.removeEventListener('animationiteration', _this._handleAnimationIteration);
|
|
12565
|
-
};
|
|
12566
|
-
}
|
|
12567
|
-
Object.defineProperty(CheckmarkOverlayComponent.prototype, "content", {
|
|
12568
|
-
set: function (children) {
|
|
12569
|
-
this.animateDivs = children.toArray();
|
|
12570
|
-
this._checkAnimation();
|
|
12571
|
-
},
|
|
12572
|
-
enumerable: false,
|
|
12573
|
-
configurable: true
|
|
12574
|
-
});
|
|
12575
|
-
Object.defineProperty(CheckmarkOverlayComponent.prototype, "visible", {
|
|
12576
|
-
get: function () {
|
|
12577
|
-
return this._visible;
|
|
12578
|
-
},
|
|
12579
|
-
set: function (value) {
|
|
12580
|
-
var _this = this;
|
|
12581
|
-
if (value) {
|
|
12582
|
-
this.showOverlay = true;
|
|
12583
|
-
this.showWrapper = true;
|
|
12584
|
-
}
|
|
12585
|
-
else {
|
|
12586
|
-
setTimeout(function () { return _this.showOverlay = false; }, 800);
|
|
12587
|
-
setTimeout(function () { return _this.showWrapper = false; }, 600);
|
|
12588
|
-
}
|
|
12589
|
-
this._visible = value;
|
|
12590
|
-
this._checkAnimation();
|
|
12591
|
-
this._checkAnimationFinished();
|
|
12592
|
-
},
|
|
12593
|
-
enumerable: false,
|
|
12594
|
-
configurable: true
|
|
12595
|
-
});
|
|
12596
|
-
CheckmarkOverlayComponent.prototype.showClass = function () {
|
|
12597
|
-
return true;
|
|
12598
|
-
};
|
|
12599
|
-
CheckmarkOverlayComponent.prototype._checkAnimation = function () {
|
|
12600
|
-
var _this = this;
|
|
12601
|
-
if (this.visible && this.animateDivs) {
|
|
12602
|
-
this.animateDivs.forEach(function (a) { return _this._renderer.addClass(a.nativeElement, 'animate'); });
|
|
12603
|
-
}
|
|
12604
|
-
};
|
|
12605
|
-
CheckmarkOverlayComponent.prototype._checkAnimationFinished = function () {
|
|
12606
|
-
var _this = this;
|
|
12607
|
-
if (!this.visible && this.animateDivs) {
|
|
12608
|
-
this.animateDivs.forEach(function (a) {
|
|
12609
|
-
a.nativeElement.addEventListener('animationiteration', _this._handleAnimationIteration);
|
|
12610
|
-
});
|
|
12611
|
-
}
|
|
12612
|
-
};
|
|
12613
|
-
return CheckmarkOverlayComponent;
|
|
12614
|
-
}());
|
|
12615
|
-
CheckmarkOverlayComponent.decorators = [
|
|
12616
|
-
{ type: i0.Component, args: [{
|
|
12617
|
-
selector: "co-checkmark-overlay",
|
|
12618
|
-
template: "\n <div *ngIf=\"showOverlay\">\n <div class=\"checkmark-overlay-wrapper\" *ngIf=\"showWrapper\" @showHideSaveCancel>\n <div class=\"checkmark-buttons-button save\" [class.finished]=\"!visible\">\n <div class=\"save-button-spinner\">\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n </div>\n <div class=\"spinner-checkmark\" *ngIf=\"!visible && successful\"></div>\n </div>\n </div>\n </div>\n ",
|
|
12619
|
-
animations: [
|
|
12620
|
-
animations.trigger('showHideSaveCancel', [
|
|
12621
|
-
animations.state('*', animations.style({ transform: 'scaleY(1)', opacity: 1 })),
|
|
12622
|
-
animations.state('void', animations.style({ transform: 'scaleY(0)', opacity: 0 })),
|
|
12623
|
-
animations.transition('void <=> *', animations.animate(200))
|
|
12624
|
-
]),
|
|
12625
|
-
],
|
|
12626
|
-
encapsulation: i0.ViewEncapsulation.None
|
|
12627
|
-
},] }
|
|
12628
|
-
];
|
|
12629
|
-
CheckmarkOverlayComponent.ctorParameters = function () { return [
|
|
12630
|
-
{ type: i0.Renderer2 }
|
|
12631
|
-
]; };
|
|
12632
|
-
CheckmarkOverlayComponent.propDecorators = {
|
|
12633
|
-
content: [{ type: i0.ViewChildren, args: ['animatediv', { read: i0.ElementRef },] }],
|
|
12634
|
-
visible: [{ type: i0.Input }],
|
|
12635
|
-
successful: [{ type: i0.Input }],
|
|
12636
|
-
showClass: [{ type: i0.HostBinding, args: ["class.co-checkmark-overlay",] }]
|
|
12637
|
-
};
|
|
12638
|
-
|
|
12639
|
-
var CheckmarkOverlayModule = /** @class */ (function () {
|
|
12640
|
-
function CheckmarkOverlayModule() {
|
|
12641
|
-
}
|
|
12642
|
-
return CheckmarkOverlayModule;
|
|
12643
|
-
}());
|
|
12644
|
-
CheckmarkOverlayModule.decorators = [
|
|
12645
|
-
{ type: i0.NgModule, args: [{
|
|
12646
|
-
imports: [
|
|
12647
|
-
common.CommonModule
|
|
12648
|
-
],
|
|
12649
|
-
declarations: [
|
|
12650
|
-
CheckmarkOverlayComponent
|
|
12651
|
-
],
|
|
12652
|
-
exports: [
|
|
12653
|
-
CheckmarkOverlayComponent
|
|
12654
|
-
]
|
|
12655
|
-
},] }
|
|
12656
|
-
];
|
|
12657
|
-
|
|
12658
13117
|
var BaseModuleScreenConfigService = /** @class */ (function () {
|
|
12659
13118
|
function BaseModuleScreenConfigService() {
|
|
12660
13119
|
// emits the params of the loaded config, each time when a new config was loaded
|
|
@@ -13104,31 +13563,6 @@
|
|
|
13104
13563
|
},] }
|
|
13105
13564
|
];
|
|
13106
13565
|
|
|
13107
|
-
var FilterItemViewmodel = /** @class */ (function () {
|
|
13108
|
-
function FilterItemViewmodel(code, description, checked, count, valueName) {
|
|
13109
|
-
this.checked = false;
|
|
13110
|
-
this.code = code;
|
|
13111
|
-
this.description = description === null || description === void 0 ? void 0 : description.toString();
|
|
13112
|
-
this.checked = checked;
|
|
13113
|
-
this.count = count;
|
|
13114
|
-
this.valueName = valueName;
|
|
13115
|
-
}
|
|
13116
|
-
FilterItemViewmodel.prototype.codeAsNumber = function () { return NumberUtils.ParseInt(this.code); };
|
|
13117
|
-
return FilterItemViewmodel;
|
|
13118
|
-
}());
|
|
13119
|
-
|
|
13120
|
-
var FilterViewmodel = /** @class */ (function () {
|
|
13121
|
-
function FilterViewmodel(collection, fields) {
|
|
13122
|
-
var _this = this;
|
|
13123
|
-
this.filterItems = [];
|
|
13124
|
-
collection.forEach(function (item) {
|
|
13125
|
-
var _a, _b, _c;
|
|
13126
|
-
_this.filterItems.push(new FilterItemViewmodel(item[fields.value], item[fields.text], (_a = item.checked) !== null && _a !== void 0 ? _a : false, (_b = item.count) !== null && _b !== void 0 ? _b : null, (_c = item.valueName) !== null && _c !== void 0 ? _c : null));
|
|
13127
|
-
});
|
|
13128
|
-
}
|
|
13129
|
-
return FilterViewmodel;
|
|
13130
|
-
}());
|
|
13131
|
-
|
|
13132
13566
|
var ColorSequenceService = /** @class */ (function () {
|
|
13133
13567
|
function ColorSequenceService() {
|
|
13134
13568
|
this.colors = new Map();
|
|
@@ -13189,6 +13623,8 @@
|
|
|
13189
13623
|
exports.ColorSequenceService = ColorSequenceService;
|
|
13190
13624
|
exports.CoreComponentsTranslationModule = CoreComponentsTranslationModule;
|
|
13191
13625
|
exports.CoreComponentsTranslationService = CoreComponentsTranslationService;
|
|
13626
|
+
exports.CoreDialogModule = CoreDialogModule;
|
|
13627
|
+
exports.CoreDialogService = CoreDialogService;
|
|
13192
13628
|
exports.DoubleCalendarComponent = DoubleCalendarComponent;
|
|
13193
13629
|
exports.DoubleCalendarModule = DoubleCalendarModule;
|
|
13194
13630
|
exports.FilterItemComponent = FilterItemComponent;
|
|
@@ -13222,6 +13658,8 @@
|
|
|
13222
13658
|
exports.InputNumberPickerModule = InputNumberPickerModule;
|
|
13223
13659
|
exports.InputRadioButtonComponent = InputRadioButtonComponent;
|
|
13224
13660
|
exports.InputRadioButtonModule = InputRadioButtonModule;
|
|
13661
|
+
exports.InputScannerComponent = InputScannerComponent;
|
|
13662
|
+
exports.InputScannerModule = InputScannerModule;
|
|
13225
13663
|
exports.InputSearchComponent = InputSearchComponent;
|
|
13226
13664
|
exports.InputSearchModule = InputSearchModule;
|
|
13227
13665
|
exports.InputTextComponent = InputTextComponent;
|
|
@@ -13277,12 +13715,16 @@
|
|
|
13277
13715
|
exports["ɵbb"] = PaginatePipe;
|
|
13278
13716
|
exports["ɵbc"] = SimpleGridCellComponent;
|
|
13279
13717
|
exports["ɵbd"] = ListOfValuesMultiselectPopupComponent;
|
|
13280
|
-
exports["ɵbe"] =
|
|
13281
|
-
exports["ɵbf"] =
|
|
13282
|
-
exports["ɵbg"] =
|
|
13283
|
-
exports["ɵbh"] =
|
|
13284
|
-
exports["ɵbi"] =
|
|
13718
|
+
exports["ɵbe"] = ConfirmationDialogComponent;
|
|
13719
|
+
exports["ɵbf"] = DialogBaseComponent;
|
|
13720
|
+
exports["ɵbg"] = CoreDynamicComponentService;
|
|
13721
|
+
exports["ɵbh"] = PrependPipeModule;
|
|
13722
|
+
exports["ɵbi"] = PrependPipe;
|
|
13285
13723
|
exports["ɵbj"] = CheckmarkOverlayComponent;
|
|
13724
|
+
exports["ɵbk"] = ScannerService;
|
|
13725
|
+
exports["ɵbl"] = TooltipModule;
|
|
13726
|
+
exports["ɵbm"] = TooltipComponent;
|
|
13727
|
+
exports["ɵbn"] = TooltipDirective;
|
|
13286
13728
|
exports["ɵc"] = MD_RIPPLE_GLOBAL_OPTIONS;
|
|
13287
13729
|
exports["ɵd"] = CoRippleDirective;
|
|
13288
13730
|
exports["ɵe"] = CoViewportRulerService;
|
|
@@ -13296,8 +13738,8 @@
|
|
|
13296
13738
|
exports["ɵm"] = ValidationErrorModule;
|
|
13297
13739
|
exports["ɵn"] = OverlayDirective;
|
|
13298
13740
|
exports["ɵo"] = OverlayParentDirective;
|
|
13299
|
-
exports["ɵp"] =
|
|
13300
|
-
exports["ɵq"] =
|
|
13741
|
+
exports["ɵp"] = CoreLocalizePipe;
|
|
13742
|
+
exports["ɵq"] = CoreDictionaryService;
|
|
13301
13743
|
exports["ɵr"] = ValidationErrorComponent;
|
|
13302
13744
|
exports["ɵs"] = CommitButtonsModule;
|
|
13303
13745
|
exports["ɵt"] = CommitButtonsComponent;
|