@seniorsistemas/angular-components 17.1.4 → 17.1.6
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/seniorsistemas-angular-components.umd.js +168 -130
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/components/lookup/lookup.component.d.ts +46 -14
- package/components/gantt/components/gantt/gantt.d.ts +1 -3
- package/components/gantt/components/side-table/side-table.component.d.ts +4 -1
- package/components/gantt/gantt.component.d.ts +1 -0
- package/components/gantt/models/view-mode.d.ts +1 -0
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +43 -52
- package/esm2015/components/dynamic-form/configurations/fields/lookup-field.js +1 -11
- package/esm2015/components/dynamic-form/dynamic-form.module.js +3 -1
- package/esm2015/components/gantt/components/gantt/bar.js +2 -2
- package/esm2015/components/gantt/components/gantt/gantt.js +92 -64
- package/esm2015/components/gantt/components/gantt/utils/date-utils.js +3 -2
- package/esm2015/components/gantt/components/side-table/side-table.component.js +7 -1
- package/esm2015/components/gantt/gantt.component.js +14 -3
- package/esm2015/components/gantt/models/view-mode.js +2 -1
- package/esm2015/locale/fallback.js +11 -1
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +43 -52
- package/esm5/components/dynamic-form/configurations/fields/lookup-field.js +1 -11
- package/esm5/components/dynamic-form/dynamic-form.module.js +3 -1
- package/esm5/components/gantt/components/gantt/bar.js +2 -2
- package/esm5/components/gantt/components/gantt/gantt.js +95 -67
- package/esm5/components/gantt/components/gantt/utils/date-utils.js +3 -2
- package/esm5/components/gantt/components/side-table/side-table.component.js +7 -1
- package/esm5/components/gantt/gantt.component.js +14 -3
- package/esm5/components/gantt/models/view-mode.js +2 -1
- package/esm5/locale/fallback.js +11 -1
- package/fesm2015/seniorsistemas-angular-components.js +165 -127
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +168 -130
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -3310,16 +3310,6 @@
|
|
|
3310
3310
|
function LookupField(config) {
|
|
3311
3311
|
var _this = _super.call(this, __assign(__assign({}, config), { type: exports.FieldType.Lookup })) || this;
|
|
3312
3312
|
_this.multiple = false;
|
|
3313
|
-
_this.searchTitle = "Pesquisa avançada";
|
|
3314
|
-
_this.searchEmptyTitle = "Nenhum registro encontrado";
|
|
3315
|
-
_this.filterLabel = "Filtrar";
|
|
3316
|
-
_this.filterTitle = "Filtros";
|
|
3317
|
-
_this.clearLabel = "Limpar";
|
|
3318
|
-
_this.cancelLabel = "Cancelar";
|
|
3319
|
-
_this.selectLabel = "Selecionar";
|
|
3320
|
-
_this.recordLabel = " registro";
|
|
3321
|
-
_this.recordsLabel = " registros";
|
|
3322
|
-
_this.emptyFieldLabel = "Não informado";
|
|
3323
3313
|
_this.autocompleteForceSelection = true;
|
|
3324
3314
|
_this.onSelect = function (event) { };
|
|
3325
3315
|
_this.onUnselect = function (event) { };
|
|
@@ -3541,24 +3531,15 @@
|
|
|
3541
3531
|
}());
|
|
3542
3532
|
|
|
3543
3533
|
var LookupComponent = /** @class */ (function () {
|
|
3544
|
-
function LookupComponent(hotkeysService) {
|
|
3534
|
+
function LookupComponent(hotkeysService, translateService) {
|
|
3545
3535
|
this.hotkeysService = hotkeysService;
|
|
3536
|
+
this.translateService = translateService;
|
|
3546
3537
|
this.id = "s-lookup-" + LookupComponent_1.nextId++;
|
|
3547
3538
|
this.autocompleteForceSelection = true;
|
|
3548
3539
|
this.disabled = false;
|
|
3549
3540
|
this.showSearch = true;
|
|
3550
3541
|
this.lookupAppendTo = "body";
|
|
3551
|
-
this.searchTitle = "Pesquisa avançada";
|
|
3552
|
-
this.searchEmptyTitle = "Nenhum registro encontrado";
|
|
3553
3542
|
this.searchFields = [];
|
|
3554
|
-
this.filterTitle = "Filtros";
|
|
3555
|
-
this.filterLabel = "Filtrar";
|
|
3556
|
-
this.clearLabel = "Limpar";
|
|
3557
|
-
this.cancelLabel = "Cancelar";
|
|
3558
|
-
this.selectLabel = "Selecionar";
|
|
3559
|
-
this.emptyFieldLabel = "Não informado";
|
|
3560
|
-
this.recordLabel = " registro";
|
|
3561
|
-
this.recordsLabel = " registros";
|
|
3562
3543
|
this.onLookupRequest = new core.EventEmitter();
|
|
3563
3544
|
this.onSearchRequest = new core.EventEmitter();
|
|
3564
3545
|
this.onFocus = new core.EventEmitter();
|
|
@@ -3626,10 +3607,8 @@
|
|
|
3626
3607
|
});
|
|
3627
3608
|
};
|
|
3628
3609
|
LookupComponent.prototype.printRecordTotalizer = function () {
|
|
3629
|
-
var
|
|
3630
|
-
|
|
3631
|
-
: this.recordsLabel.trim();
|
|
3632
|
-
return this.searchTotalRecordsLabel ? this.searchTotalRecordsLabel : this.searchTotalRecords + " " + label;
|
|
3610
|
+
var _a, _b, _c;
|
|
3611
|
+
return ((_a = this.searchTotalRecordsLabel) !== null && _a !== void 0 ? _a : this.searchTotalRecords === 1) ? (_b = this.recordLabel) !== null && _b !== void 0 ? _b : this.translateService.instant("platform.angular_components.record", { count: this.searchTotalRecords }) : (_c = this.recordsLabel) !== null && _c !== void 0 ? _c : this.translateService.instant("platform.angular_components.records", { count: this.searchTotalRecords });
|
|
3633
3612
|
};
|
|
3634
3613
|
LookupComponent.prototype._convertToMomentHourFormat = function (hourFormat, format) {
|
|
3635
3614
|
if (format === "dd/mm/yy") { // valor padrão para o format.
|
|
@@ -3902,7 +3881,8 @@
|
|
|
3902
3881
|
var LookupComponent_1;
|
|
3903
3882
|
LookupComponent.nextId = 0;
|
|
3904
3883
|
LookupComponent.ctorParameters = function () { return [
|
|
3905
|
-
{ type: angular2Hotkeys.HotkeysService }
|
|
3884
|
+
{ type: angular2Hotkeys.HotkeysService },
|
|
3885
|
+
{ type: core$1.TranslateService }
|
|
3906
3886
|
]; };
|
|
3907
3887
|
__decorate([
|
|
3908
3888
|
core.Input()
|
|
@@ -3943,12 +3923,6 @@
|
|
|
3943
3923
|
__decorate([
|
|
3944
3924
|
core.Input()
|
|
3945
3925
|
], LookupComponent.prototype, "lookupAppendTo", void 0);
|
|
3946
|
-
__decorate([
|
|
3947
|
-
core.Input()
|
|
3948
|
-
], LookupComponent.prototype, "searchTitle", void 0);
|
|
3949
|
-
__decorate([
|
|
3950
|
-
core.Input()
|
|
3951
|
-
], LookupComponent.prototype, "searchEmptyTitle", void 0);
|
|
3952
3926
|
__decorate([
|
|
3953
3927
|
core.Input()
|
|
3954
3928
|
], LookupComponent.prototype, "searchEmptyDescription", void 0);
|
|
@@ -3967,36 +3941,9 @@
|
|
|
3967
3941
|
__decorate([
|
|
3968
3942
|
core.Input()
|
|
3969
3943
|
], LookupComponent.prototype, "multiSortMeta", void 0);
|
|
3970
|
-
__decorate([
|
|
3971
|
-
core.Input()
|
|
3972
|
-
], LookupComponent.prototype, "filterTitle", void 0);
|
|
3973
|
-
__decorate([
|
|
3974
|
-
core.Input()
|
|
3975
|
-
], LookupComponent.prototype, "filterLabel", void 0);
|
|
3976
|
-
__decorate([
|
|
3977
|
-
core.Input()
|
|
3978
|
-
], LookupComponent.prototype, "clearLabel", void 0);
|
|
3979
|
-
__decorate([
|
|
3980
|
-
core.Input()
|
|
3981
|
-
], LookupComponent.prototype, "cancelLabel", void 0);
|
|
3982
|
-
__decorate([
|
|
3983
|
-
core.Input()
|
|
3984
|
-
], LookupComponent.prototype, "selectLabel", void 0);
|
|
3985
|
-
__decorate([
|
|
3986
|
-
core.Input()
|
|
3987
|
-
], LookupComponent.prototype, "emptyFieldLabel", void 0);
|
|
3988
|
-
__decorate([
|
|
3989
|
-
core.Input()
|
|
3990
|
-
], LookupComponent.prototype, "recordLabel", void 0);
|
|
3991
|
-
__decorate([
|
|
3992
|
-
core.Input()
|
|
3993
|
-
], LookupComponent.prototype, "recordsLabel", void 0);
|
|
3994
3944
|
__decorate([
|
|
3995
3945
|
core.Input()
|
|
3996
3946
|
], LookupComponent.prototype, "placeholder", void 0);
|
|
3997
|
-
__decorate([
|
|
3998
|
-
core.Input()
|
|
3999
|
-
], LookupComponent.prototype, "searchTotalRecordsLabel", void 0);
|
|
4000
3947
|
__decorate([
|
|
4001
3948
|
core.Input()
|
|
4002
3949
|
], LookupComponent.prototype, "sortableColumnsDisabled", void 0);
|
|
@@ -4039,10 +3986,43 @@
|
|
|
4039
3986
|
__decorate([
|
|
4040
3987
|
core.ViewChild(autocomplete$1.AutoComplete, { static: false })
|
|
4041
3988
|
], LookupComponent.prototype, "autocomplete", void 0);
|
|
3989
|
+
__decorate([
|
|
3990
|
+
core.Input()
|
|
3991
|
+
], LookupComponent.prototype, "searchTitle", void 0);
|
|
3992
|
+
__decorate([
|
|
3993
|
+
core.Input()
|
|
3994
|
+
], LookupComponent.prototype, "searchEmptyTitle", void 0);
|
|
3995
|
+
__decorate([
|
|
3996
|
+
core.Input()
|
|
3997
|
+
], LookupComponent.prototype, "searchTotalRecordsLabel", void 0);
|
|
3998
|
+
__decorate([
|
|
3999
|
+
core.Input()
|
|
4000
|
+
], LookupComponent.prototype, "filterTitle", void 0);
|
|
4001
|
+
__decorate([
|
|
4002
|
+
core.Input()
|
|
4003
|
+
], LookupComponent.prototype, "filterLabel", void 0);
|
|
4004
|
+
__decorate([
|
|
4005
|
+
core.Input()
|
|
4006
|
+
], LookupComponent.prototype, "clearLabel", void 0);
|
|
4007
|
+
__decorate([
|
|
4008
|
+
core.Input()
|
|
4009
|
+
], LookupComponent.prototype, "cancelLabel", void 0);
|
|
4010
|
+
__decorate([
|
|
4011
|
+
core.Input()
|
|
4012
|
+
], LookupComponent.prototype, "selectLabel", void 0);
|
|
4013
|
+
__decorate([
|
|
4014
|
+
core.Input()
|
|
4015
|
+
], LookupComponent.prototype, "emptyFieldLabel", void 0);
|
|
4016
|
+
__decorate([
|
|
4017
|
+
core.Input()
|
|
4018
|
+
], LookupComponent.prototype, "recordLabel", void 0);
|
|
4019
|
+
__decorate([
|
|
4020
|
+
core.Input()
|
|
4021
|
+
], LookupComponent.prototype, "recordsLabel", void 0);
|
|
4042
4022
|
LookupComponent = LookupComponent_1 = __decorate([
|
|
4043
4023
|
core.Component({
|
|
4044
4024
|
selector: "s-lookup",
|
|
4045
|
-
template: "<div [ngClass]=\"{ inputgroup: showSearch }\">\n <p-autoComplete\n #autocomplete\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [dataKey]=\"dataKey\"\n [multiple]=\"multiple\"\n [inputId]=\"id + '-autocomplete'\"\n [forceSelection]=\"autocompleteForceSelection\"\n [suggestions]=\"getLookupSuggestions()\"\n (completeMethod)=\"lazyLoadLookup($event)\"\n (onSelect)=\"onSelect.next($event)\"\n (onBlur)=\"onBlur.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onUnselect)=\"onUnselect.next($event)\"\n (onClear)=\"onClear.next($event)\"\n (onKeyUp)=\"onKeyUp.next($event)\"\n [field]=\"lookupDisplayField\"\n [emptyMessage]=\"lookupEmptyMessage\"\n [dropdown]=\"!showSearch\"\n [appendTo]=\"lookupAppendTo\"\n [placeholder]=\"placeholder || ' '\"\n [autoHighlight]=\"true\"\n inputStyleClass=\"mousetrap\">\n <ng-template let-item pTemplate=\"selectedItem\">\n <span\n class=\"ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted\"\n [sTooltip]=\"lookupDisplayFieldTooltip ? item[lookupDisplayField] : null\"\n tooltipPosition=\"top\">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\n <button\n *ngIf=\"showSearch\"\n pButton\n type=\"button\"\n icon=\"fa fa-search\"\n class=\"button-addon\"\n [disabled]=\"disabled\"\n (click)=\"showDialog()\">\n </button>\n</div>\n<p-dialog\n appendTo=\"body\"\n styleClass=\"s-lookup-modal\"\n [header]=\"searchTitle\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n (onHide)=\"hideDialog()\"\n [blockScroll]=\"true\"\n [focusOnShow]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n #dialog>\n <div\n *ngIf=\"dialogVisible\"\n class=\"s-lookup-modal-container\">\n <div\n *ngIf=\"searchFields && searchFields.length\"\n class=\"filter\"\n [@collapseContent]=\"collapsed \n ? { value: 'hidden', params: { transitionParams: transitionOptions } }\n : { value: 'visible', params: { transitionParams: transitionOptions } }\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form\n [formGroup]=\"formGroupDialog\"\n novalidate\n autocomplete=\"off\">\n <div\n *ngIf=\"!collapsed\"\n class=\"form-content\"\n [@childCollapseContent]=\"collapsed\n ? { value: ':leave', params: { transitionParams: transitionOptions } }\n : { value: ':enter', params: { transitionParams: transitionOptions } }\">\n <div class=\"filter-title sds-section-title\">{{ filterTitle }}</div>\n <div class=\"form-fields\">\n <s-dynamic-form\n [fields]=\"searchFields\"\n [form]=\"formGroupDialog\">\n </s-dynamic-form>\n </div>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n [id]=\"id + '-filter-button'\"\n type=\"submit\"\n [label]=\"filterLabel\"\n (onClick)=\"search()\"\n sTooltip=\"(ALT + SHIFT + F)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n <s-button\n [id]=\"id + '-clear-button'\"\n type=\"button\"\n [label]=\"clearLabel\"\n (onClick)=\"clear()\"\n priority=\"link\"\n sTooltip=\"(ALT + SHIFT + L)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n *ngIf=\"searchFields && searchFields.length\"\n class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button\n [id]=\"id + '-filter-toggle-button'\"\n type=\"button\"\n (click)=\"filterToggle()\">\n <span\n class=\"fa\"\n [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\">\n </span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div\n class=\"content\"\n [ngClass]=\"{'empty-content': !searchTotalRecords && !loading}\">\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!searchTotalRecords && !loading\"\n [title]=\"searchEmptyTitle\"\n [description]=\"searchEmptyDescription\"\n iconClass=\"fa fa-search\">\n </s-empty-state>\n <p-table\n [dataKey]=\"dataKey\"\n [value]=\"getGridData()\"\n [columns]=\"searchGridFields\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n sortMode=\"multiple\"\n [totalRecords]=\"searchTotalRecords\"\n [rows]=\"10\"\n [selection]=\"selected\"\n (onLazyLoad)=\"lazyLoadGrid($event)\"\n *sLoadingState=\"loading\"\n [multiSortMeta]=\"multiSortMeta\"\n [attr.data-hidden]=\"!searchTotalRecords && !loading\"\n [selectionMode]=\"multiple ? 'multiple' : 'single'\"\n (selectionChange)=\"onSelectionChange($event)\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col\n *ngIf=\"multiple\"\n style=\"width: 50px\" />\n <col\n *ngFor=\"let col of columns\"\n [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th\n *ngIf=\"multiple\"\n style=\"width: 50px\">\n <s-table-header-checkbox\n [useAllObject]=\"lookupRowProps ? false : true\"\n [rowProps]=\"lookupRowProps\">\n </s-table-header-checkbox>\n </th>\n <th\n [style.width]=\"col.width\"\n *ngFor=\"let col of columns\"\n [pSortableColumn]=\"col.name\"\n [pSortableColumnDisabled]=\"sortableColumnsDisabled?.includes(col.name)\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon\n [field]=\"col.name\"\n *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\">\n </p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns\n let-rowIndex=\"rowIndex\">\n <tr\n sNavigation\n [pSelectableRow]=\"rowData\"\n [pSelectableRowIndex]=\"rowIndex\"\n sDoubleClick (onDoubleClick)=\"onTableRowDoubleClick(rowData)\">\n <td\n *ngIf=\"multiple\"\n style=\"width: 50px\"\n tabindex=\"0\">\n <p-tableCheckbox\n [value]=\"rowData\"\n [pSelectableRow]=\"rowData\">\n </p-tableCheckbox>\n </td>\n <td\n [style.width]=\"col['width']\"\n *ngFor=\"let col of searchGridFields\"\n [ngSwitch]=\"col.type\"\n tabindex=\"0\">\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <ng-container *ngIf=\"isBooleanValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Date'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: col.calendarLocaleOptions?.dateFormat || \"L\" | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'LocalDateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Time'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime: col.calendarLocaleOptions?.dateFormat || \"LTS\" | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Integer'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getIntegerMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Double'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getDoubleMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Money'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getMoneyMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Number'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getNumberMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Enum'\">\n <ng-container\n *ngIf=\"getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate\"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"col.mask && col.mask()\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))\">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!(col.mask && col.mask())\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [attr.data-hidden]=\"loading\">\n {{ printRecordTotalizer() }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel\"\n (onClick)=\"select()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [disabled]=\"!selected?.length\">\n </s-button>\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (onClick)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n </p-footer>\n</p-dialog>\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">{{ emptyFieldLabel }}</span>\n</ng-template>\n",
|
|
4025
|
+
template: "<div [ngClass]=\"{ inputgroup: showSearch }\">\n <p-autoComplete\n #autocomplete\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [dataKey]=\"dataKey\"\n [multiple]=\"multiple\"\n [inputId]=\"id + '-autocomplete'\"\n [forceSelection]=\"autocompleteForceSelection\"\n [suggestions]=\"getLookupSuggestions()\"\n (completeMethod)=\"lazyLoadLookup($event)\"\n (onSelect)=\"onSelect.next($event)\"\n (onBlur)=\"onBlur.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onUnselect)=\"onUnselect.next($event)\"\n (onClear)=\"onClear.next($event)\"\n (onKeyUp)=\"onKeyUp.next($event)\"\n [field]=\"lookupDisplayField\"\n [emptyMessage]=\"lookupEmptyMessage\"\n [dropdown]=\"!showSearch\"\n [appendTo]=\"lookupAppendTo\"\n [placeholder]=\"placeholder || ' '\"\n [autoHighlight]=\"true\"\n inputStyleClass=\"mousetrap\">\n <ng-template let-item pTemplate=\"selectedItem\">\n <span\n class=\"ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted\"\n [sTooltip]=\"lookupDisplayFieldTooltip ? item[lookupDisplayField] : null\"\n tooltipPosition=\"top\">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\n <button\n *ngIf=\"showSearch\"\n pButton\n type=\"button\"\n icon=\"fa fa-search\"\n class=\"button-addon\"\n [disabled]=\"disabled\"\n (click)=\"showDialog()\">\n </button>\n</div>\n<p-dialog\n appendTo=\"body\"\n styleClass=\"s-lookup-modal\"\n [header]=\"searchTitle || 'platform.angular_components.advanced_search' | translate\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n (onHide)=\"hideDialog()\"\n [blockScroll]=\"true\"\n [focusOnShow]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n #dialog>\n <div\n *ngIf=\"dialogVisible\"\n class=\"s-lookup-modal-container\">\n <div\n *ngIf=\"searchFields && searchFields.length\"\n class=\"filter\"\n [@collapseContent]=\"collapsed \n ? { value: 'hidden', params: { transitionParams: transitionOptions } }\n : { value: 'visible', params: { transitionParams: transitionOptions } }\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form\n [formGroup]=\"formGroupDialog\"\n novalidate\n autocomplete=\"off\">\n <div\n *ngIf=\"!collapsed\"\n class=\"form-content\"\n [@childCollapseContent]=\"collapsed\n ? { value: ':leave', params: { transitionParams: transitionOptions } }\n : { value: ':enter', params: { transitionParams: transitionOptions } }\">\n <div class=\"filter-title sds-section-title\">\n {{ filterTitle || \"platform.angular_components.filters\" | translate }}\n </div>\n <div class=\"form-fields\">\n <s-dynamic-form\n [fields]=\"searchFields\"\n [form]=\"formGroupDialog\">\n </s-dynamic-form>\n </div>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n [id]=\"id + '-filter-button'\"\n type=\"submit\"\n [label]=\"filterLabel || 'platform.angular_components.filter' | translate\"\n (onClick)=\"search()\"\n sTooltip=\"(ALT + SHIFT + F)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n <s-button\n [id]=\"id + '-clear-button'\"\n type=\"button\"\n [label]=\"clearLabel || 'platform.angular_components.clear' | translate\"\n (onClick)=\"clear()\"\n priority=\"link\"\n sTooltip=\"(ALT + SHIFT + L)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n *ngIf=\"searchFields && searchFields.length\"\n class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button\n [id]=\"id + '-filter-toggle-button'\"\n type=\"button\"\n (click)=\"filterToggle()\">\n <span\n class=\"fa\"\n [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\">\n </span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div\n class=\"content\"\n [ngClass]=\"{'empty-content': !searchTotalRecords && !loading}\">\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!searchTotalRecords && !loading\"\n [title]=\"searchEmptyTitle || 'platform.angular_components.no_records_found' | translate\"\n [description]=\"searchEmptyDescription\"\n iconClass=\"fa fa-search\">\n </s-empty-state>\n <p-table\n [dataKey]=\"dataKey\"\n [value]=\"getGridData()\"\n [columns]=\"searchGridFields\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n sortMode=\"multiple\"\n [totalRecords]=\"searchTotalRecords\"\n [rows]=\"10\"\n [selection]=\"selected\"\n (onLazyLoad)=\"lazyLoadGrid($event)\"\n *sLoadingState=\"loading\"\n [multiSortMeta]=\"multiSortMeta\"\n [attr.data-hidden]=\"!searchTotalRecords && !loading\"\n [selectionMode]=\"multiple ? 'multiple' : 'single'\"\n (selectionChange)=\"onSelectionChange($event)\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col\n *ngIf=\"multiple\"\n style=\"width: 50px\" />\n <col\n *ngFor=\"let col of columns\"\n [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th\n *ngIf=\"multiple\"\n style=\"width: 50px\">\n <s-table-header-checkbox\n [useAllObject]=\"lookupRowProps ? false : true\"\n [rowProps]=\"lookupRowProps\">\n </s-table-header-checkbox>\n </th>\n <th\n [style.width]=\"col.width\"\n *ngFor=\"let col of columns\"\n [pSortableColumn]=\"col.name\"\n [pSortableColumnDisabled]=\"sortableColumnsDisabled?.includes(col.name)\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon\n [field]=\"col.name\"\n *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\">\n </p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns\n let-rowIndex=\"rowIndex\">\n <tr\n sNavigation\n [pSelectableRow]=\"rowData\"\n [pSelectableRowIndex]=\"rowIndex\"\n sDoubleClick (onDoubleClick)=\"onTableRowDoubleClick(rowData)\">\n <td\n *ngIf=\"multiple\"\n style=\"width: 50px\"\n tabindex=\"0\">\n <p-tableCheckbox\n [value]=\"rowData\"\n [pSelectableRow]=\"rowData\">\n </p-tableCheckbox>\n </td>\n <td\n [style.width]=\"col['width']\"\n *ngFor=\"let col of searchGridFields\"\n [ngSwitch]=\"col.type\"\n tabindex=\"0\">\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <ng-container *ngIf=\"isBooleanValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Date'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: col.calendarLocaleOptions?.dateFormat || \"L\" | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'LocalDateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Time'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime: col.calendarLocaleOptions?.dateFormat || \"LTS\" | async }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Integer'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getIntegerMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Double'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getDoubleMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Money'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getMoneyMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Number'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getNumberMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Enum'\">\n <ng-container\n *ngIf=\"getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate\"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"col.mask && col.mask()\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))\">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!(col.mask && col.mask())\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [attr.data-hidden]=\"loading\">\n {{ printRecordTotalizer() }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel || 'platform.angular_components.select' | translate\"\n (onClick)=\"select()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [disabled]=\"!selected?.length\">\n </s-button>\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel || 'platform.angular_components.cancel' | translate\"\n (onClick)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n </p-footer>\n</p-dialog>\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">\n {{ emptyFieldLabel || 'platform.angular_components.not_informed' | translate }}\n </span>\n</ng-template>\n",
|
|
4046
4026
|
providers: [
|
|
4047
4027
|
{
|
|
4048
4028
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -8080,6 +8060,7 @@
|
|
|
8080
8060
|
SwitchModule,
|
|
8081
8061
|
PasswordStrengthModule,
|
|
8082
8062
|
slider.SliderModule,
|
|
8063
|
+
core$1.TranslateModule,
|
|
8083
8064
|
],
|
|
8084
8065
|
declarations: [
|
|
8085
8066
|
AutocompleteFieldComponent,
|
|
@@ -8883,11 +8864,12 @@
|
|
|
8883
8864
|
.startOf("month")
|
|
8884
8865
|
.format("MMMM");
|
|
8885
8866
|
var monthNameCapitalized = monthName.charAt(0).toUpperCase() + monthName.slice(1);
|
|
8886
|
-
var dateToFormat = moment$7(date);
|
|
8867
|
+
var dateToFormat = moment$7(date).locale(lang);
|
|
8887
8868
|
var format_map = {
|
|
8888
8869
|
YYYY: dateToFormat.format("YYYY"),
|
|
8889
8870
|
MM: dateToFormat.format("MM"),
|
|
8890
8871
|
DD: dateToFormat.format("DD"),
|
|
8872
|
+
ddd: dateToFormat.format("ddd").toUpperCase().replace(".", ""),
|
|
8891
8873
|
HH: dateToFormat.format("HH"),
|
|
8892
8874
|
mm: dateToFormat.format("mm"),
|
|
8893
8875
|
ss: dateToFormat.format("ss"),
|
|
@@ -9110,6 +9092,7 @@
|
|
|
9110
9092
|
|
|
9111
9093
|
|
|
9112
9094
|
(function (ViewMode) {
|
|
9095
|
+
ViewMode["QuarterHour"] = "quarterHour";
|
|
9113
9096
|
ViewMode["Hour"] = "hour";
|
|
9114
9097
|
ViewMode["QuarterDay"] = "quarterDay";
|
|
9115
9098
|
ViewMode["HalfDay"] = "halfDay";
|
|
@@ -9360,7 +9343,7 @@
|
|
|
9360
9343
|
Bar.prototype._computeX = function () {
|
|
9361
9344
|
var _a = this._gantt.options, step = _a.step, columnWidth = _a.columnWidth;
|
|
9362
9345
|
var x;
|
|
9363
|
-
if (this._gantt.view_is([exports.ViewMode.Hour, exports.ViewMode.QuarterDay, exports.ViewMode.HalfDay, exports.ViewMode.Day])) {
|
|
9346
|
+
if (this._gantt.view_is([exports.ViewMode.QuarterHour, exports.ViewMode.Hour, exports.ViewMode.QuarterDay, exports.ViewMode.HalfDay, exports.ViewMode.Day])) {
|
|
9364
9347
|
var diff = DateUtils.diff(this.task.start, this._gantt.minDate, "minutes");
|
|
9365
9348
|
x = (diff / step) * (columnWidth / 60);
|
|
9366
9349
|
}
|
|
@@ -9767,7 +9750,11 @@
|
|
|
9767
9750
|
Gantt.prototype.update_view_scale = function (view_mode) {
|
|
9768
9751
|
this.options.viewMode = view_mode;
|
|
9769
9752
|
// this.isHourView = false;
|
|
9770
|
-
if (view_mode === exports.ViewMode.
|
|
9753
|
+
if (view_mode === exports.ViewMode.QuarterHour) {
|
|
9754
|
+
this.options.step = 24 / 24 / 4;
|
|
9755
|
+
this.options.columnWidth = 50;
|
|
9756
|
+
}
|
|
9757
|
+
else if (view_mode === exports.ViewMode.Hour) {
|
|
9771
9758
|
this.options.step = 24 / 24;
|
|
9772
9759
|
this.options.columnWidth = 50;
|
|
9773
9760
|
}
|
|
@@ -9801,12 +9788,12 @@
|
|
|
9801
9788
|
};
|
|
9802
9789
|
Gantt.prototype.setup_gantt_dates = function () {
|
|
9803
9790
|
var e_3, _a;
|
|
9804
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
9791
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
9805
9792
|
this._minDate = null;
|
|
9806
9793
|
this._maxDate = null;
|
|
9807
9794
|
try {
|
|
9808
|
-
for (var
|
|
9809
|
-
var task =
|
|
9795
|
+
for (var _t = __values(this.tasks), _u = _t.next(); !_u.done; _u = _t.next()) {
|
|
9796
|
+
var task = _u.value;
|
|
9810
9797
|
// set global start and end date
|
|
9811
9798
|
if (!this.minDate || task.start < this.minDate) {
|
|
9812
9799
|
this._minDate = DateUtils.startOf(task.start, 'day');
|
|
@@ -9819,40 +9806,41 @@
|
|
|
9819
9806
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
9820
9807
|
finally {
|
|
9821
9808
|
try {
|
|
9822
|
-
if (
|
|
9809
|
+
if (_u && !_u.done && (_a = _t.return)) _a.call(_t);
|
|
9823
9810
|
}
|
|
9824
9811
|
finally { if (e_3) throw e_3.error; }
|
|
9825
9812
|
}
|
|
9826
|
-
this._realMinDate = this.minDate;
|
|
9827
|
-
this._realMaxDate = this.maxDate;
|
|
9828
9813
|
switch (this.options.viewMode) {
|
|
9814
|
+
case exports.ViewMode.QuarterHour:
|
|
9815
|
+
this._minDate = DateUtils.add(this.minDate, -((_b = this.options.marginBeforeStart) !== null && _b !== void 0 ? _b : 15), "minutes");
|
|
9816
|
+
this._maxDate = DateUtils.add(this.maxDate, (_c = this.options.marginAfterEnd) !== null && _c !== void 0 ? _c : 15, "minutes");
|
|
9829
9817
|
case exports.ViewMode.Hour:
|
|
9830
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9831
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9818
|
+
this._minDate = DateUtils.add(this.minDate, -((_d = this.options.marginBeforeStart) !== null && _d !== void 0 ? _d : 1), "hour");
|
|
9819
|
+
this._maxDate = DateUtils.add(this.maxDate, (_e = this.options.marginAfterEnd) !== null && _e !== void 0 ? _e : 1, "hour");
|
|
9832
9820
|
break;
|
|
9833
9821
|
case exports.ViewMode.QuarterDay:
|
|
9834
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9835
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9822
|
+
this._minDate = DateUtils.add(this.minDate, -((_f = this.options.marginBeforeStart) !== null && _f !== void 0 ? _f : 6), "hour");
|
|
9823
|
+
this._maxDate = DateUtils.add(this.maxDate, (_g = this.options.marginAfterEnd) !== null && _g !== void 0 ? _g : 6, "hour");
|
|
9836
9824
|
break;
|
|
9837
9825
|
case exports.ViewMode.HalfDay:
|
|
9838
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9839
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9826
|
+
this._minDate = DateUtils.add(this.minDate, -((_h = this.options.marginBeforeStart) !== null && _h !== void 0 ? _h : 12), "hour");
|
|
9827
|
+
this._maxDate = DateUtils.add(this.maxDate, (_j = this.options.marginAfterEnd) !== null && _j !== void 0 ? _j : 12, "hour");
|
|
9840
9828
|
break;
|
|
9841
9829
|
case exports.ViewMode.Day:
|
|
9842
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9843
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9830
|
+
this._minDate = DateUtils.add(this.minDate, -((_k = this.options.marginBeforeStart) !== null && _k !== void 0 ? _k : 1), "day");
|
|
9831
|
+
this._maxDate = DateUtils.add(this.maxDate, (_l = this.options.marginAfterEnd) !== null && _l !== void 0 ? _l : 1, "day");
|
|
9844
9832
|
break;
|
|
9845
9833
|
case exports.ViewMode.Week:
|
|
9846
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9847
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9834
|
+
this._minDate = DateUtils.add(this.minDate, -((_m = this.options.marginBeforeStart) !== null && _m !== void 0 ? _m : 1), "week");
|
|
9835
|
+
this._maxDate = DateUtils.add(this.maxDate, (_o = this.options.marginAfterEnd) !== null && _o !== void 0 ? _o : 1, "week");
|
|
9848
9836
|
break;
|
|
9849
9837
|
case exports.ViewMode.Month:
|
|
9850
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9851
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9838
|
+
this._minDate = DateUtils.add(this.minDate, -((_p = this.options.marginBeforeStart) !== null && _p !== void 0 ? _p : 1), "month");
|
|
9839
|
+
this._maxDate = DateUtils.add(this.maxDate, (_q = this.options.marginAfterEnd) !== null && _q !== void 0 ? _q : 1, "month");
|
|
9852
9840
|
break;
|
|
9853
9841
|
case exports.ViewMode.Year:
|
|
9854
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9855
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9842
|
+
this._minDate = DateUtils.add(this.minDate, -((_r = this.options.marginBeforeStart) !== null && _r !== void 0 ? _r : 1), "year");
|
|
9843
|
+
this._maxDate = DateUtils.add(this.maxDate, (_s = this.options.marginAfterEnd) !== null && _s !== void 0 ? _s : 1, "year");
|
|
9856
9844
|
break;
|
|
9857
9845
|
}
|
|
9858
9846
|
};
|
|
@@ -9880,8 +9868,6 @@
|
|
|
9880
9868
|
var columnWidth = (this.options.containerWidth - 1) / this.dates.length;
|
|
9881
9869
|
this.options.columnWidth = columnWidth < 45 ? 45 : columnWidth;
|
|
9882
9870
|
}
|
|
9883
|
-
console.log("cur_date", cur_date);
|
|
9884
|
-
console.log("dates", this.dates);
|
|
9885
9871
|
};
|
|
9886
9872
|
Gantt.prototype.bind_events = function () {
|
|
9887
9873
|
this.bind_grid_click();
|
|
@@ -10001,23 +9987,24 @@
|
|
|
10001
9987
|
for (var _b = __values(this.dates), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
10002
9988
|
var date = _c.value;
|
|
10003
9989
|
var tick_class = "tick";
|
|
10004
|
-
|
|
10005
|
-
|
|
9990
|
+
if (this.view_is(exports.ViewMode.QuarterHour) && date.getHours() === 0 && date.getMinutes() === 0) {
|
|
9991
|
+
// thick tick for first hour of day.
|
|
9992
|
+
tick_class += " thick";
|
|
9993
|
+
}
|
|
9994
|
+
else if (this.view_is([exports.ViewMode.Hour, exports.ViewMode.QuarterDay, exports.ViewMode.HalfDay]) && date.getHours() === 0) {
|
|
9995
|
+
// thick tick for first hour of day.
|
|
10006
9996
|
tick_class += " thick";
|
|
10007
9997
|
}
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
date.getDate() >= 1 &&
|
|
10011
|
-
date.getDate() < 8) {
|
|
9998
|
+
else if (this.view_is(exports.ViewMode.Day) && date.getDate() === 1) {
|
|
9999
|
+
// thick tick for monday
|
|
10012
10000
|
tick_class += " thick";
|
|
10013
10001
|
}
|
|
10014
|
-
|
|
10015
|
-
|
|
10002
|
+
else if (this.view_is(exports.ViewMode.Week) && date.getDate() >= 1 && date.getDate() < 8) {
|
|
10003
|
+
// thick tick for first week
|
|
10016
10004
|
tick_class += " thick";
|
|
10017
10005
|
}
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
date.getHours() == 0) {
|
|
10006
|
+
else if (this.view_is(exports.ViewMode.Month) && date.getMonth() % 3 === 0) {
|
|
10007
|
+
// thick ticks for quarters
|
|
10021
10008
|
tick_class += " thick";
|
|
10022
10009
|
}
|
|
10023
10010
|
createSVG("path", {
|
|
@@ -10057,7 +10044,7 @@
|
|
|
10057
10044
|
for (var _b = __values(this.dates), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
10058
10045
|
var date = _c.value;
|
|
10059
10046
|
var y = (this.options.headerHeight + this.options.padding) / 2;
|
|
10060
|
-
var isToday = date
|
|
10047
|
+
var isToday = date == DateUtils.today();
|
|
10061
10048
|
var isWeekend = (date.getDay() == 0 || date.getDay() == 6);
|
|
10062
10049
|
var className = void 0;
|
|
10063
10050
|
if (isToday) {
|
|
@@ -10095,19 +10082,8 @@
|
|
|
10095
10082
|
};
|
|
10096
10083
|
Gantt.prototype.make_dates = function () {
|
|
10097
10084
|
var dates = this.get_dates_to_draw();
|
|
10098
|
-
var isHourView = this.view_is([exports.ViewMode.Hour, exports.ViewMode.QuarterDay, exports.ViewMode.HalfDay]);
|
|
10099
|
-
var counter = 0;
|
|
10100
10085
|
for (var i = 0; i < dates.length; i++) {
|
|
10101
10086
|
var date = dates[i];
|
|
10102
|
-
if (isHourView && date.date >= this._realMinDate && date.date <= this._realMaxDate) {
|
|
10103
|
-
createSVG("text", {
|
|
10104
|
-
x: date.lower_x,
|
|
10105
|
-
y: date.lower_y,
|
|
10106
|
-
innerHTML: "H" + counter++ * this.options.step,
|
|
10107
|
-
class: "title-1",
|
|
10108
|
-
append_to: this.layers.date,
|
|
10109
|
-
});
|
|
10110
|
-
}
|
|
10111
10087
|
createSVG("text", {
|
|
10112
10088
|
x: date.lower_x,
|
|
10113
10089
|
y: date.lower_y + 20,
|
|
@@ -10115,6 +10091,15 @@
|
|
|
10115
10091
|
class: "title-2",
|
|
10116
10092
|
append_to: this.layers.date,
|
|
10117
10093
|
});
|
|
10094
|
+
if (date.middle_text) {
|
|
10095
|
+
createSVG("text", {
|
|
10096
|
+
x: date.middle_x,
|
|
10097
|
+
y: date.middle_y,
|
|
10098
|
+
innerHTML: date.middle_text,
|
|
10099
|
+
class: "middle-text",
|
|
10100
|
+
append_to: this.layers.date,
|
|
10101
|
+
});
|
|
10102
|
+
}
|
|
10118
10103
|
if (date.upper_text) {
|
|
10119
10104
|
var $upper_text = createSVG("text", {
|
|
10120
10105
|
x: date.upper_x,
|
|
@@ -10145,67 +10130,93 @@
|
|
|
10145
10130
|
last_date = DateUtils.add(date, 1, "year");
|
|
10146
10131
|
}
|
|
10147
10132
|
var date_text = {
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
halfDayLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
10151
|
-
dayLower: DateUtils.format(date, "D", this.options.language),
|
|
10152
|
-
weekLower: date.getMonth() !== last_date.getMonth()
|
|
10133
|
+
// quarter hour
|
|
10134
|
+
quarterHourUpper: date.getDate() !== last_date.getDate()
|
|
10153
10135
|
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10154
|
-
:
|
|
10155
|
-
|
|
10156
|
-
|
|
10136
|
+
: "",
|
|
10137
|
+
quarterHourLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
10138
|
+
// hour
|
|
10139
|
+
hourUpper: date.getDate() !== last_date.getDate()
|
|
10140
|
+
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10141
|
+
: "",
|
|
10142
|
+
hourLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
10143
|
+
// quarter day
|
|
10157
10144
|
quarterDayUpper: date.getDate() !== last_date.getDate()
|
|
10158
10145
|
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10159
10146
|
: "",
|
|
10147
|
+
quarterDayLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
10148
|
+
// half day
|
|
10160
10149
|
halfDayUpper: (date.getDate() !== last_date.getDate())
|
|
10161
10150
|
? (((date.getMonth() !== last_date.getMonth()) || i < 2)
|
|
10162
10151
|
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10163
10152
|
: DateUtils.format(date, "D", this.options.language))
|
|
10164
10153
|
: "",
|
|
10154
|
+
halfDayLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
10155
|
+
// day
|
|
10165
10156
|
dayUpper: ((date.getMonth() !== last_date.getMonth()) || i === 0)
|
|
10166
10157
|
? DateUtils.format(date, "MMMM", this.options.language)
|
|
10167
10158
|
: "",
|
|
10159
|
+
dayMiddle: DateUtils.format(date, "ddd", this.options.language),
|
|
10160
|
+
dayLower: DateUtils.format(date, "D", this.options.language),
|
|
10161
|
+
// week
|
|
10168
10162
|
weekUpper: date.getMonth() !== last_date.getMonth()
|
|
10169
10163
|
? DateUtils.format(date, "MMMM", this.options.language)
|
|
10170
10164
|
: "",
|
|
10165
|
+
weekLower: date.getMonth() !== last_date.getMonth()
|
|
10166
|
+
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10167
|
+
: DateUtils.format(date, "D", this.options.language),
|
|
10168
|
+
// month
|
|
10171
10169
|
monthUpper: date.getFullYear() !== last_date.getFullYear()
|
|
10172
10170
|
? DateUtils.format(date, "YYYY", this.options.language)
|
|
10173
10171
|
: "",
|
|
10172
|
+
monthLower: DateUtils.format(date, "MMMM", this.options.language),
|
|
10173
|
+
// year
|
|
10174
10174
|
yearUpper: date.getFullYear() !== last_date.getFullYear()
|
|
10175
10175
|
? DateUtils.format(date, "YYYY", this.options.language)
|
|
10176
10176
|
: "",
|
|
10177
|
-
|
|
10178
|
-
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10179
|
-
: "",
|
|
10177
|
+
yearLower: DateUtils.format(date, "YYYY", this.options.language),
|
|
10180
10178
|
};
|
|
10181
10179
|
// Descontando 20 para adcionar uma segunda linha de informação no cabeçalho
|
|
10182
10180
|
var base_pos = {
|
|
10183
10181
|
x: i * this.options.columnWidth,
|
|
10184
|
-
lower_y: this.options.headerHeight - 20,
|
|
10185
10182
|
upper_y: this.options.headerHeight - 20 - 25,
|
|
10183
|
+
middle_y: this.options.headerHeight - 20,
|
|
10184
|
+
lower_y: this.options.headerHeight - 20,
|
|
10186
10185
|
};
|
|
10187
|
-
debugger;
|
|
10188
10186
|
var x_pos = {
|
|
10189
|
-
|
|
10187
|
+
quarterHourUpper: (this.dates.length < 14) ? (this.options.columnWidth) : (this.options.columnWidth * 24 / 2),
|
|
10188
|
+
quarterHourMiddle: this.options.columnWidth / 2,
|
|
10189
|
+
quarterHourLower: this.options.columnWidth / 2,
|
|
10190
10190
|
hourUpper: (this.dates.length < 14) ? (this.options.columnWidth) : (this.options.columnWidth * 24 / 2),
|
|
10191
|
-
|
|
10191
|
+
hourMiddle: this.options.columnWidth / 2,
|
|
10192
|
+
hourLower: this.options.columnWidth / 2,
|
|
10192
10193
|
quarterDayUpper: this.options.columnWidth * 4 / 2,
|
|
10193
|
-
|
|
10194
|
+
quarterDayMiddle: this.options.columnWidth / 2,
|
|
10195
|
+
quarterDayLower: this.options.columnWidth / 2,
|
|
10194
10196
|
halfDayUpper: this.options.columnWidth * 2 / 2,
|
|
10195
|
-
|
|
10197
|
+
halfDayMiddle: this.options.columnWidth / 2,
|
|
10198
|
+
halfDayLower: this.options.columnWidth / 2,
|
|
10196
10199
|
dayUpper: (this.dates.length < 15) ? (this.options.columnWidth) : ((this.options.columnWidth * 30) / 2),
|
|
10197
|
-
|
|
10200
|
+
dayMiddle: this.options.columnWidth / 2 - 12,
|
|
10201
|
+
dayLower: this.options.columnWidth / 2,
|
|
10198
10202
|
weekUpper: (this.options.columnWidth * 4) / 2,
|
|
10203
|
+
weekMiddle: 0,
|
|
10204
|
+
weekLower: 0,
|
|
10205
|
+
monthUpper: (this.dates.length < 15) ? (this.options.columnWidth) : ((this.options.columnWidth * 12) / 2),
|
|
10206
|
+
monthMiddle: 0,
|
|
10199
10207
|
monthLower: this.options.columnWidth / 2,
|
|
10200
|
-
monthUpper: (this.options.columnWidth * 12) / 2,
|
|
10201
|
-
yearLower: this.options.columnWidth / 2,
|
|
10202
10208
|
yearUpper: (this.options.columnWidth * 30) / 2,
|
|
10209
|
+
yearMiddle: this.options.columnWidth / 2,
|
|
10210
|
+
yearLower: this.options.columnWidth / 2,
|
|
10203
10211
|
};
|
|
10204
10212
|
return {
|
|
10205
10213
|
upper_text: date_text[this.options.viewMode + "Upper"],
|
|
10214
|
+
middle_text: date_text[this.options.viewMode + "Middle"],
|
|
10206
10215
|
lower_text: date_text[this.options.viewMode + "Lower"],
|
|
10207
10216
|
upper_x: base_pos.x + x_pos[this.options.viewMode + "Upper"],
|
|
10208
10217
|
upper_y: base_pos.upper_y,
|
|
10218
|
+
middle_x: base_pos.x + x_pos[this.options.viewMode + "Middle"],
|
|
10219
|
+
middle_y: base_pos.middle_y,
|
|
10209
10220
|
lower_x: base_pos.x + x_pos[this.options.viewMode + "Lower"],
|
|
10210
10221
|
lower_y: base_pos.lower_y,
|
|
10211
10222
|
date: date,
|
|
@@ -10497,6 +10508,7 @@
|
|
|
10497
10508
|
}
|
|
10498
10509
|
GanttComponent.prototype.ngOnInit = function () {
|
|
10499
10510
|
this._validateViewMode();
|
|
10511
|
+
this._validateTasks();
|
|
10500
10512
|
};
|
|
10501
10513
|
GanttComponent.prototype.ngAfterViewInit = function () {
|
|
10502
10514
|
var _this = this;
|
|
@@ -10507,7 +10519,7 @@
|
|
|
10507
10519
|
viewMode: this.viewMode,
|
|
10508
10520
|
marginBeforeStart: this.marginBeforeStart,
|
|
10509
10521
|
marginAfterEnd: this.marginAfterEnd,
|
|
10510
|
-
language: "pt-
|
|
10522
|
+
language: "pt-br",
|
|
10511
10523
|
allowMovement: this.allowMovement,
|
|
10512
10524
|
hasPopup: this.hasPopup,
|
|
10513
10525
|
containerWidth: this.containerWidth,
|
|
@@ -10551,6 +10563,7 @@
|
|
|
10551
10563
|
};
|
|
10552
10564
|
GanttComponent.prototype._validateViewMode = function () {
|
|
10553
10565
|
if (![
|
|
10566
|
+
exports.ViewMode.QuarterHour,
|
|
10554
10567
|
exports.ViewMode.Hour,
|
|
10555
10568
|
exports.ViewMode.QuarterDay,
|
|
10556
10569
|
exports.ViewMode.HalfDay,
|
|
@@ -10562,6 +10575,15 @@
|
|
|
10562
10575
|
throw new Error("Invalid gantt view mode");
|
|
10563
10576
|
}
|
|
10564
10577
|
};
|
|
10578
|
+
GanttComponent.prototype._validateTasks = function () {
|
|
10579
|
+
this.tasks.forEach(function (group) {
|
|
10580
|
+
group.tasks.forEach(function (task) {
|
|
10581
|
+
if (task.start > task.end) {
|
|
10582
|
+
throw new Error("invalid task. The start date must be less than the end date.");
|
|
10583
|
+
}
|
|
10584
|
+
});
|
|
10585
|
+
});
|
|
10586
|
+
};
|
|
10565
10587
|
__decorate([
|
|
10566
10588
|
core.Input()
|
|
10567
10589
|
], GanttComponent.prototype, "columnTitle", void 0);
|
|
@@ -10621,7 +10643,7 @@
|
|
|
10621
10643
|
selector: "s-gantt",
|
|
10622
10644
|
template: "<div class=\"outer\" #outer>\n <div #side>\n <gantt-side-table\n *ngIf=\"showSideTable\"\n [tasks]=\"tasks\"\n [columnTitle]=\"columnTitle\"\n [multipleTaskPerLine]=\"multipleTaskPerLine\">\n </gantt-side-table>\n </div>\n <svg id=\"gantt\"></svg>\n</div>\n",
|
|
10623
10645
|
encapsulation: core.ViewEncapsulation.None,
|
|
10624
|
-
styles: [".outer{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}", ".gantt{border:1px solid #e0e0e0}.gantt .weekend-highlight{fill:#b8c2cc;opacity:.5;stroke:#ebeff2;stroke-width:1}.gantt .grid-background{fill:none}.gantt .grid-header,.gantt .grid-row{fill:#fff}.gantt .grid-row:nth-child(even){fill:#f5f5f5}.gantt .row-line{stroke:#ebeff2}.gantt .tick{stroke:#e0e0e0;stroke-width:.4}.gantt .tick.thick{stroke:#
|
|
10646
|
+
styles: [".outer{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}", ".gantt{border:1px solid #e0e0e0}.gantt .weekend-highlight{fill:#b8c2cc;opacity:.5;stroke:#ebeff2;stroke-width:1}.gantt .grid-background{fill:none}.gantt .grid-header,.gantt .grid-row{fill:#fff}.gantt .grid-row:nth-child(even){fill:#f5f5f5}.gantt .row-line{stroke:#ebeff2}.gantt .tick{stroke:#e0e0e0;stroke-width:.4}.gantt .tick.thick{stroke:#428bca;stroke-width:2}.gantt .today-highlight{fill:#ffe979;opacity:.5}.gantt .arrow{fill:none;stroke:#666;stroke-width:1.4}.gantt .bar{opacity:.8;stroke:#8d99a6;stroke-width:0;transition:stroke-width .3s;-webkit-user-select:none;-ms-user-select:none;user-select:none}.gantt .bar-invalid{fill:transparent;stroke:#8d99a6;stroke-dasharray:5;stroke-width:1}.gantt .bar-invalid~.bar-label{fill:#555}.gantt .bar-label{fill:#fff;text-anchor:middle;font-size:12px;font-weight:lighter}.gantt .bar-label.big{fill:#555;text-anchor:start}.gantt .bar-wrapper{cursor:pointer;outline:0}.gantt .bar-wrapper.active .bar,.gantt .bar-wrapper:hover .bar{opacity:1}.gantt .bar-wrapper.active .bar{stroke:#212533;stroke-width:2}.gantt .lower-text,.gantt .upper-text{font-size:12px;text-anchor:middle}.gantt .upper-text{fill:#555}.gantt .lower-text{fill:#333}.gantt .hide{display:none}.gantt-container{border-left:1px solid #e0e0e0;font-size:12px;overflow:auto;position:relative}.gantt-container .title-1{fill:#999;font-size:12px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .title-2{fill:#333;font-size:14px;font-weight:400;line-height:150%;text-anchor:middle}.gantt-container .popup-wrapper{left:0;position:absolute;top:0}.gantt-container .popup-wrapper .popup{background:#0e1119;border-radius:2px;color:#fff;padding:8px;font-family:\"Open Sans\" sans-serif;line-height:150%;font-weight:400}.gantt-container .popup-wrapper .popup .wrp-title{border-bottom:1px solid #525966;padding-bottom:10px}.gantt-container .popup-wrapper .popup .wrp-title .title{font-size:14px}.gantt-container .popup-wrapper .popup .wrp-subtitle{color:#dfe2e5;padding-top:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.gantt-container .popup-wrapper .popup .wrp-subtitle .icon{margin-right:10px}.gantt-container .popup-wrapper .popup .wrp-subtitle .subtitle{font-size:12px}.gantt-container .popup-wrapper .popup .pointer{border:6px solid transparent;border-top-color:#0e1119;height:6px;margin-left:-4px;position:absolute}"]
|
|
10625
10647
|
})
|
|
10626
10648
|
], GanttComponent);
|
|
10627
10649
|
return GanttComponent;
|
|
@@ -10632,6 +10654,12 @@
|
|
|
10632
10654
|
this.ROW_HEIGHT = 44;
|
|
10633
10655
|
this.multipleTaskPerLine = false;
|
|
10634
10656
|
}
|
|
10657
|
+
SideTableComponent.prototype.ngOnInit = function () {
|
|
10658
|
+
this._removeEmptyTasks();
|
|
10659
|
+
};
|
|
10660
|
+
SideTableComponent.prototype._removeEmptyTasks = function () {
|
|
10661
|
+
this.tasks = this.tasks.filter(function (task) { return task.tasks.length; });
|
|
10662
|
+
};
|
|
10635
10663
|
__decorate([
|
|
10636
10664
|
core.Input()
|
|
10637
10665
|
], SideTableComponent.prototype, "columnTitle", void 0);
|
|
@@ -14680,6 +14708,16 @@
|
|
|
14680
14708
|
}());
|
|
14681
14709
|
|
|
14682
14710
|
var fallback = {
|
|
14711
|
+
"platform.angular_components.filters": "Filtros",
|
|
14712
|
+
"platform.angular_components.filter": "Filtrar",
|
|
14713
|
+
"platform.angular_components.clear": "Limpar",
|
|
14714
|
+
"platform.angular_components.cancel": "Cancelar",
|
|
14715
|
+
"platform.angular_components.select": "Selecionar",
|
|
14716
|
+
"platform.angular_components.not_informed": "Não informado",
|
|
14717
|
+
"platform.angular_components.advanced_search": "Pesquisa avançada",
|
|
14718
|
+
"platform.angular_components.no_records_found": "Nenhum registro encontrado",
|
|
14719
|
+
"platform.angular_components.total_record": "{{ count }} registros encontrados",
|
|
14720
|
+
"platform.angular_components.total_records": "{{ count }} registros encontrados",
|
|
14683
14721
|
"platform.angular_components.country_name_br": "Brasil",
|
|
14684
14722
|
"platform.angular_components.country_name_us": "Estados Unidos",
|
|
14685
14723
|
"platform.angular_components.country_name_co": "Colômbia",
|