@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
|
@@ -3163,16 +3163,6 @@ var LookupField = /** @class */ (function (_super) {
|
|
|
3163
3163
|
function LookupField(config) {
|
|
3164
3164
|
var _this = _super.call(this, __assign(__assign({}, config), { type: FieldType.Lookup })) || this;
|
|
3165
3165
|
_this.multiple = false;
|
|
3166
|
-
_this.searchTitle = "Pesquisa avançada";
|
|
3167
|
-
_this.searchEmptyTitle = "Nenhum registro encontrado";
|
|
3168
|
-
_this.filterLabel = "Filtrar";
|
|
3169
|
-
_this.filterTitle = "Filtros";
|
|
3170
|
-
_this.clearLabel = "Limpar";
|
|
3171
|
-
_this.cancelLabel = "Cancelar";
|
|
3172
|
-
_this.selectLabel = "Selecionar";
|
|
3173
|
-
_this.recordLabel = " registro";
|
|
3174
|
-
_this.recordsLabel = " registros";
|
|
3175
|
-
_this.emptyFieldLabel = "Não informado";
|
|
3176
3166
|
_this.autocompleteForceSelection = true;
|
|
3177
3167
|
_this.onSelect = function (event) { };
|
|
3178
3168
|
_this.onUnselect = function (event) { };
|
|
@@ -3394,24 +3384,15 @@ var Option = /** @class */ (function () {
|
|
|
3394
3384
|
}());
|
|
3395
3385
|
|
|
3396
3386
|
var LookupComponent = /** @class */ (function () {
|
|
3397
|
-
function LookupComponent(hotkeysService) {
|
|
3387
|
+
function LookupComponent(hotkeysService, translateService) {
|
|
3398
3388
|
this.hotkeysService = hotkeysService;
|
|
3389
|
+
this.translateService = translateService;
|
|
3399
3390
|
this.id = "s-lookup-" + LookupComponent_1.nextId++;
|
|
3400
3391
|
this.autocompleteForceSelection = true;
|
|
3401
3392
|
this.disabled = false;
|
|
3402
3393
|
this.showSearch = true;
|
|
3403
3394
|
this.lookupAppendTo = "body";
|
|
3404
|
-
this.searchTitle = "Pesquisa avançada";
|
|
3405
|
-
this.searchEmptyTitle = "Nenhum registro encontrado";
|
|
3406
3395
|
this.searchFields = [];
|
|
3407
|
-
this.filterTitle = "Filtros";
|
|
3408
|
-
this.filterLabel = "Filtrar";
|
|
3409
|
-
this.clearLabel = "Limpar";
|
|
3410
|
-
this.cancelLabel = "Cancelar";
|
|
3411
|
-
this.selectLabel = "Selecionar";
|
|
3412
|
-
this.emptyFieldLabel = "Não informado";
|
|
3413
|
-
this.recordLabel = " registro";
|
|
3414
|
-
this.recordsLabel = " registros";
|
|
3415
3396
|
this.onLookupRequest = new EventEmitter();
|
|
3416
3397
|
this.onSearchRequest = new EventEmitter();
|
|
3417
3398
|
this.onFocus = new EventEmitter();
|
|
@@ -3479,10 +3460,8 @@ var LookupComponent = /** @class */ (function () {
|
|
|
3479
3460
|
});
|
|
3480
3461
|
};
|
|
3481
3462
|
LookupComponent.prototype.printRecordTotalizer = function () {
|
|
3482
|
-
var
|
|
3483
|
-
|
|
3484
|
-
: this.recordsLabel.trim();
|
|
3485
|
-
return this.searchTotalRecordsLabel ? this.searchTotalRecordsLabel : this.searchTotalRecords + " " + label;
|
|
3463
|
+
var _a, _b, _c;
|
|
3464
|
+
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 });
|
|
3486
3465
|
};
|
|
3487
3466
|
LookupComponent.prototype._convertToMomentHourFormat = function (hourFormat, format) {
|
|
3488
3467
|
if (format === "dd/mm/yy") { // valor padrão para o format.
|
|
@@ -3755,7 +3734,8 @@ var LookupComponent = /** @class */ (function () {
|
|
|
3755
3734
|
var LookupComponent_1;
|
|
3756
3735
|
LookupComponent.nextId = 0;
|
|
3757
3736
|
LookupComponent.ctorParameters = function () { return [
|
|
3758
|
-
{ type: HotkeysService }
|
|
3737
|
+
{ type: HotkeysService },
|
|
3738
|
+
{ type: TranslateService }
|
|
3759
3739
|
]; };
|
|
3760
3740
|
__decorate([
|
|
3761
3741
|
Input()
|
|
@@ -3796,12 +3776,6 @@ var LookupComponent = /** @class */ (function () {
|
|
|
3796
3776
|
__decorate([
|
|
3797
3777
|
Input()
|
|
3798
3778
|
], LookupComponent.prototype, "lookupAppendTo", void 0);
|
|
3799
|
-
__decorate([
|
|
3800
|
-
Input()
|
|
3801
|
-
], LookupComponent.prototype, "searchTitle", void 0);
|
|
3802
|
-
__decorate([
|
|
3803
|
-
Input()
|
|
3804
|
-
], LookupComponent.prototype, "searchEmptyTitle", void 0);
|
|
3805
3779
|
__decorate([
|
|
3806
3780
|
Input()
|
|
3807
3781
|
], LookupComponent.prototype, "searchEmptyDescription", void 0);
|
|
@@ -3820,36 +3794,9 @@ var LookupComponent = /** @class */ (function () {
|
|
|
3820
3794
|
__decorate([
|
|
3821
3795
|
Input()
|
|
3822
3796
|
], LookupComponent.prototype, "multiSortMeta", void 0);
|
|
3823
|
-
__decorate([
|
|
3824
|
-
Input()
|
|
3825
|
-
], LookupComponent.prototype, "filterTitle", void 0);
|
|
3826
|
-
__decorate([
|
|
3827
|
-
Input()
|
|
3828
|
-
], LookupComponent.prototype, "filterLabel", void 0);
|
|
3829
|
-
__decorate([
|
|
3830
|
-
Input()
|
|
3831
|
-
], LookupComponent.prototype, "clearLabel", void 0);
|
|
3832
|
-
__decorate([
|
|
3833
|
-
Input()
|
|
3834
|
-
], LookupComponent.prototype, "cancelLabel", void 0);
|
|
3835
|
-
__decorate([
|
|
3836
|
-
Input()
|
|
3837
|
-
], LookupComponent.prototype, "selectLabel", void 0);
|
|
3838
|
-
__decorate([
|
|
3839
|
-
Input()
|
|
3840
|
-
], LookupComponent.prototype, "emptyFieldLabel", void 0);
|
|
3841
|
-
__decorate([
|
|
3842
|
-
Input()
|
|
3843
|
-
], LookupComponent.prototype, "recordLabel", void 0);
|
|
3844
|
-
__decorate([
|
|
3845
|
-
Input()
|
|
3846
|
-
], LookupComponent.prototype, "recordsLabel", void 0);
|
|
3847
3797
|
__decorate([
|
|
3848
3798
|
Input()
|
|
3849
3799
|
], LookupComponent.prototype, "placeholder", void 0);
|
|
3850
|
-
__decorate([
|
|
3851
|
-
Input()
|
|
3852
|
-
], LookupComponent.prototype, "searchTotalRecordsLabel", void 0);
|
|
3853
3800
|
__decorate([
|
|
3854
3801
|
Input()
|
|
3855
3802
|
], LookupComponent.prototype, "sortableColumnsDisabled", void 0);
|
|
@@ -3892,10 +3839,43 @@ var LookupComponent = /** @class */ (function () {
|
|
|
3892
3839
|
__decorate([
|
|
3893
3840
|
ViewChild(AutoComplete, { static: false })
|
|
3894
3841
|
], LookupComponent.prototype, "autocomplete", void 0);
|
|
3842
|
+
__decorate([
|
|
3843
|
+
Input()
|
|
3844
|
+
], LookupComponent.prototype, "searchTitle", void 0);
|
|
3845
|
+
__decorate([
|
|
3846
|
+
Input()
|
|
3847
|
+
], LookupComponent.prototype, "searchEmptyTitle", void 0);
|
|
3848
|
+
__decorate([
|
|
3849
|
+
Input()
|
|
3850
|
+
], LookupComponent.prototype, "searchTotalRecordsLabel", void 0);
|
|
3851
|
+
__decorate([
|
|
3852
|
+
Input()
|
|
3853
|
+
], LookupComponent.prototype, "filterTitle", void 0);
|
|
3854
|
+
__decorate([
|
|
3855
|
+
Input()
|
|
3856
|
+
], LookupComponent.prototype, "filterLabel", void 0);
|
|
3857
|
+
__decorate([
|
|
3858
|
+
Input()
|
|
3859
|
+
], LookupComponent.prototype, "clearLabel", void 0);
|
|
3860
|
+
__decorate([
|
|
3861
|
+
Input()
|
|
3862
|
+
], LookupComponent.prototype, "cancelLabel", void 0);
|
|
3863
|
+
__decorate([
|
|
3864
|
+
Input()
|
|
3865
|
+
], LookupComponent.prototype, "selectLabel", void 0);
|
|
3866
|
+
__decorate([
|
|
3867
|
+
Input()
|
|
3868
|
+
], LookupComponent.prototype, "emptyFieldLabel", void 0);
|
|
3869
|
+
__decorate([
|
|
3870
|
+
Input()
|
|
3871
|
+
], LookupComponent.prototype, "recordLabel", void 0);
|
|
3872
|
+
__decorate([
|
|
3873
|
+
Input()
|
|
3874
|
+
], LookupComponent.prototype, "recordsLabel", void 0);
|
|
3895
3875
|
LookupComponent = LookupComponent_1 = __decorate([
|
|
3896
3876
|
Component({
|
|
3897
3877
|
selector: "s-lookup",
|
|
3898
|
-
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",
|
|
3878
|
+
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",
|
|
3899
3879
|
providers: [
|
|
3900
3880
|
{
|
|
3901
3881
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -7933,6 +7913,7 @@ var DynamicFormModule = /** @class */ (function () {
|
|
|
7933
7913
|
SwitchModule,
|
|
7934
7914
|
PasswordStrengthModule,
|
|
7935
7915
|
SliderModule,
|
|
7916
|
+
TranslateModule,
|
|
7936
7917
|
],
|
|
7937
7918
|
declarations: [
|
|
7938
7919
|
AutocompleteFieldComponent,
|
|
@@ -8736,11 +8717,12 @@ var DateUtils = /** @class */ (function () {
|
|
|
8736
8717
|
.startOf("month")
|
|
8737
8718
|
.format("MMMM");
|
|
8738
8719
|
var monthNameCapitalized = monthName.charAt(0).toUpperCase() + monthName.slice(1);
|
|
8739
|
-
var dateToFormat = moment$7(date);
|
|
8720
|
+
var dateToFormat = moment$7(date).locale(lang);
|
|
8740
8721
|
var format_map = {
|
|
8741
8722
|
YYYY: dateToFormat.format("YYYY"),
|
|
8742
8723
|
MM: dateToFormat.format("MM"),
|
|
8743
8724
|
DD: dateToFormat.format("DD"),
|
|
8725
|
+
ddd: dateToFormat.format("ddd").toUpperCase().replace(".", ""),
|
|
8744
8726
|
HH: dateToFormat.format("HH"),
|
|
8745
8727
|
mm: dateToFormat.format("mm"),
|
|
8746
8728
|
ss: dateToFormat.format("ss"),
|
|
@@ -8963,6 +8945,7 @@ $.attr = function (element, attr, value) {
|
|
|
8963
8945
|
|
|
8964
8946
|
var ViewMode;
|
|
8965
8947
|
(function (ViewMode) {
|
|
8948
|
+
ViewMode["QuarterHour"] = "quarterHour";
|
|
8966
8949
|
ViewMode["Hour"] = "hour";
|
|
8967
8950
|
ViewMode["QuarterDay"] = "quarterDay";
|
|
8968
8951
|
ViewMode["HalfDay"] = "halfDay";
|
|
@@ -9213,7 +9196,7 @@ var Bar = /** @class */ (function () {
|
|
|
9213
9196
|
Bar.prototype._computeX = function () {
|
|
9214
9197
|
var _a = this._gantt.options, step = _a.step, columnWidth = _a.columnWidth;
|
|
9215
9198
|
var x;
|
|
9216
|
-
if (this._gantt.view_is([ViewMode.Hour, ViewMode.QuarterDay, ViewMode.HalfDay, ViewMode.Day])) {
|
|
9199
|
+
if (this._gantt.view_is([ViewMode.QuarterHour, ViewMode.Hour, ViewMode.QuarterDay, ViewMode.HalfDay, ViewMode.Day])) {
|
|
9217
9200
|
var diff = DateUtils.diff(this.task.start, this._gantt.minDate, "minutes");
|
|
9218
9201
|
x = (diff / step) * (columnWidth / 60);
|
|
9219
9202
|
}
|
|
@@ -9620,7 +9603,11 @@ var Gantt = /** @class */ (function () {
|
|
|
9620
9603
|
Gantt.prototype.update_view_scale = function (view_mode) {
|
|
9621
9604
|
this.options.viewMode = view_mode;
|
|
9622
9605
|
// this.isHourView = false;
|
|
9623
|
-
if (view_mode === ViewMode.
|
|
9606
|
+
if (view_mode === ViewMode.QuarterHour) {
|
|
9607
|
+
this.options.step = 24 / 24 / 4;
|
|
9608
|
+
this.options.columnWidth = 50;
|
|
9609
|
+
}
|
|
9610
|
+
else if (view_mode === ViewMode.Hour) {
|
|
9624
9611
|
this.options.step = 24 / 24;
|
|
9625
9612
|
this.options.columnWidth = 50;
|
|
9626
9613
|
}
|
|
@@ -9654,12 +9641,12 @@ var Gantt = /** @class */ (function () {
|
|
|
9654
9641
|
};
|
|
9655
9642
|
Gantt.prototype.setup_gantt_dates = function () {
|
|
9656
9643
|
var e_3, _a;
|
|
9657
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
9644
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
9658
9645
|
this._minDate = null;
|
|
9659
9646
|
this._maxDate = null;
|
|
9660
9647
|
try {
|
|
9661
|
-
for (var
|
|
9662
|
-
var task =
|
|
9648
|
+
for (var _t = __values(this.tasks), _u = _t.next(); !_u.done; _u = _t.next()) {
|
|
9649
|
+
var task = _u.value;
|
|
9663
9650
|
// set global start and end date
|
|
9664
9651
|
if (!this.minDate || task.start < this.minDate) {
|
|
9665
9652
|
this._minDate = DateUtils.startOf(task.start, 'day');
|
|
@@ -9672,40 +9659,41 @@ var Gantt = /** @class */ (function () {
|
|
|
9672
9659
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
9673
9660
|
finally {
|
|
9674
9661
|
try {
|
|
9675
|
-
if (
|
|
9662
|
+
if (_u && !_u.done && (_a = _t.return)) _a.call(_t);
|
|
9676
9663
|
}
|
|
9677
9664
|
finally { if (e_3) throw e_3.error; }
|
|
9678
9665
|
}
|
|
9679
|
-
this._realMinDate = this.minDate;
|
|
9680
|
-
this._realMaxDate = this.maxDate;
|
|
9681
9666
|
switch (this.options.viewMode) {
|
|
9667
|
+
case ViewMode.QuarterHour:
|
|
9668
|
+
this._minDate = DateUtils.add(this.minDate, -((_b = this.options.marginBeforeStart) !== null && _b !== void 0 ? _b : 15), "minutes");
|
|
9669
|
+
this._maxDate = DateUtils.add(this.maxDate, (_c = this.options.marginAfterEnd) !== null && _c !== void 0 ? _c : 15, "minutes");
|
|
9682
9670
|
case ViewMode.Hour:
|
|
9683
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9684
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9671
|
+
this._minDate = DateUtils.add(this.minDate, -((_d = this.options.marginBeforeStart) !== null && _d !== void 0 ? _d : 1), "hour");
|
|
9672
|
+
this._maxDate = DateUtils.add(this.maxDate, (_e = this.options.marginAfterEnd) !== null && _e !== void 0 ? _e : 1, "hour");
|
|
9685
9673
|
break;
|
|
9686
9674
|
case ViewMode.QuarterDay:
|
|
9687
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9688
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9675
|
+
this._minDate = DateUtils.add(this.minDate, -((_f = this.options.marginBeforeStart) !== null && _f !== void 0 ? _f : 6), "hour");
|
|
9676
|
+
this._maxDate = DateUtils.add(this.maxDate, (_g = this.options.marginAfterEnd) !== null && _g !== void 0 ? _g : 6, "hour");
|
|
9689
9677
|
break;
|
|
9690
9678
|
case ViewMode.HalfDay:
|
|
9691
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9692
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9679
|
+
this._minDate = DateUtils.add(this.minDate, -((_h = this.options.marginBeforeStart) !== null && _h !== void 0 ? _h : 12), "hour");
|
|
9680
|
+
this._maxDate = DateUtils.add(this.maxDate, (_j = this.options.marginAfterEnd) !== null && _j !== void 0 ? _j : 12, "hour");
|
|
9693
9681
|
break;
|
|
9694
9682
|
case ViewMode.Day:
|
|
9695
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9696
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9683
|
+
this._minDate = DateUtils.add(this.minDate, -((_k = this.options.marginBeforeStart) !== null && _k !== void 0 ? _k : 1), "day");
|
|
9684
|
+
this._maxDate = DateUtils.add(this.maxDate, (_l = this.options.marginAfterEnd) !== null && _l !== void 0 ? _l : 1, "day");
|
|
9697
9685
|
break;
|
|
9698
9686
|
case ViewMode.Week:
|
|
9699
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9700
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9687
|
+
this._minDate = DateUtils.add(this.minDate, -((_m = this.options.marginBeforeStart) !== null && _m !== void 0 ? _m : 1), "week");
|
|
9688
|
+
this._maxDate = DateUtils.add(this.maxDate, (_o = this.options.marginAfterEnd) !== null && _o !== void 0 ? _o : 1, "week");
|
|
9701
9689
|
break;
|
|
9702
9690
|
case ViewMode.Month:
|
|
9703
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9704
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9691
|
+
this._minDate = DateUtils.add(this.minDate, -((_p = this.options.marginBeforeStart) !== null && _p !== void 0 ? _p : 1), "month");
|
|
9692
|
+
this._maxDate = DateUtils.add(this.maxDate, (_q = this.options.marginAfterEnd) !== null && _q !== void 0 ? _q : 1, "month");
|
|
9705
9693
|
break;
|
|
9706
9694
|
case ViewMode.Year:
|
|
9707
|
-
this._minDate = DateUtils.add(this.minDate, -((
|
|
9708
|
-
this._maxDate = DateUtils.add(this.maxDate, (
|
|
9695
|
+
this._minDate = DateUtils.add(this.minDate, -((_r = this.options.marginBeforeStart) !== null && _r !== void 0 ? _r : 1), "year");
|
|
9696
|
+
this._maxDate = DateUtils.add(this.maxDate, (_s = this.options.marginAfterEnd) !== null && _s !== void 0 ? _s : 1, "year");
|
|
9709
9697
|
break;
|
|
9710
9698
|
}
|
|
9711
9699
|
};
|
|
@@ -9733,8 +9721,6 @@ var Gantt = /** @class */ (function () {
|
|
|
9733
9721
|
var columnWidth = (this.options.containerWidth - 1) / this.dates.length;
|
|
9734
9722
|
this.options.columnWidth = columnWidth < 45 ? 45 : columnWidth;
|
|
9735
9723
|
}
|
|
9736
|
-
console.log("cur_date", cur_date);
|
|
9737
|
-
console.log("dates", this.dates);
|
|
9738
9724
|
};
|
|
9739
9725
|
Gantt.prototype.bind_events = function () {
|
|
9740
9726
|
this.bind_grid_click();
|
|
@@ -9854,23 +9840,24 @@ var Gantt = /** @class */ (function () {
|
|
|
9854
9840
|
for (var _b = __values(this.dates), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
9855
9841
|
var date = _c.value;
|
|
9856
9842
|
var tick_class = "tick";
|
|
9857
|
-
|
|
9858
|
-
|
|
9843
|
+
if (this.view_is(ViewMode.QuarterHour) && date.getHours() === 0 && date.getMinutes() === 0) {
|
|
9844
|
+
// thick tick for first hour of day.
|
|
9845
|
+
tick_class += " thick";
|
|
9846
|
+
}
|
|
9847
|
+
else if (this.view_is([ViewMode.Hour, ViewMode.QuarterDay, ViewMode.HalfDay]) && date.getHours() === 0) {
|
|
9848
|
+
// thick tick for first hour of day.
|
|
9859
9849
|
tick_class += " thick";
|
|
9860
9850
|
}
|
|
9861
|
-
|
|
9862
|
-
|
|
9863
|
-
date.getDate() >= 1 &&
|
|
9864
|
-
date.getDate() < 8) {
|
|
9851
|
+
else if (this.view_is(ViewMode.Day) && date.getDate() === 1) {
|
|
9852
|
+
// thick tick for monday
|
|
9865
9853
|
tick_class += " thick";
|
|
9866
9854
|
}
|
|
9867
|
-
|
|
9868
|
-
|
|
9855
|
+
else if (this.view_is(ViewMode.Week) && date.getDate() >= 1 && date.getDate() < 8) {
|
|
9856
|
+
// thick tick for first week
|
|
9869
9857
|
tick_class += " thick";
|
|
9870
9858
|
}
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
date.getHours() == 0) {
|
|
9859
|
+
else if (this.view_is(ViewMode.Month) && date.getMonth() % 3 === 0) {
|
|
9860
|
+
// thick ticks for quarters
|
|
9874
9861
|
tick_class += " thick";
|
|
9875
9862
|
}
|
|
9876
9863
|
createSVG("path", {
|
|
@@ -9910,7 +9897,7 @@ var Gantt = /** @class */ (function () {
|
|
|
9910
9897
|
for (var _b = __values(this.dates), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
9911
9898
|
var date = _c.value;
|
|
9912
9899
|
var y = (this.options.headerHeight + this.options.padding) / 2;
|
|
9913
|
-
var isToday = date
|
|
9900
|
+
var isToday = date == DateUtils.today();
|
|
9914
9901
|
var isWeekend = (date.getDay() == 0 || date.getDay() == 6);
|
|
9915
9902
|
var className = void 0;
|
|
9916
9903
|
if (isToday) {
|
|
@@ -9948,19 +9935,8 @@ var Gantt = /** @class */ (function () {
|
|
|
9948
9935
|
};
|
|
9949
9936
|
Gantt.prototype.make_dates = function () {
|
|
9950
9937
|
var dates = this.get_dates_to_draw();
|
|
9951
|
-
var isHourView = this.view_is([ViewMode.Hour, ViewMode.QuarterDay, ViewMode.HalfDay]);
|
|
9952
|
-
var counter = 0;
|
|
9953
9938
|
for (var i = 0; i < dates.length; i++) {
|
|
9954
9939
|
var date = dates[i];
|
|
9955
|
-
if (isHourView && date.date >= this._realMinDate && date.date <= this._realMaxDate) {
|
|
9956
|
-
createSVG("text", {
|
|
9957
|
-
x: date.lower_x,
|
|
9958
|
-
y: date.lower_y,
|
|
9959
|
-
innerHTML: "H" + counter++ * this.options.step,
|
|
9960
|
-
class: "title-1",
|
|
9961
|
-
append_to: this.layers.date,
|
|
9962
|
-
});
|
|
9963
|
-
}
|
|
9964
9940
|
createSVG("text", {
|
|
9965
9941
|
x: date.lower_x,
|
|
9966
9942
|
y: date.lower_y + 20,
|
|
@@ -9968,6 +9944,15 @@ var Gantt = /** @class */ (function () {
|
|
|
9968
9944
|
class: "title-2",
|
|
9969
9945
|
append_to: this.layers.date,
|
|
9970
9946
|
});
|
|
9947
|
+
if (date.middle_text) {
|
|
9948
|
+
createSVG("text", {
|
|
9949
|
+
x: date.middle_x,
|
|
9950
|
+
y: date.middle_y,
|
|
9951
|
+
innerHTML: date.middle_text,
|
|
9952
|
+
class: "middle-text",
|
|
9953
|
+
append_to: this.layers.date,
|
|
9954
|
+
});
|
|
9955
|
+
}
|
|
9971
9956
|
if (date.upper_text) {
|
|
9972
9957
|
var $upper_text = createSVG("text", {
|
|
9973
9958
|
x: date.upper_x,
|
|
@@ -9998,67 +9983,93 @@ var Gantt = /** @class */ (function () {
|
|
|
9998
9983
|
last_date = DateUtils.add(date, 1, "year");
|
|
9999
9984
|
}
|
|
10000
9985
|
var date_text = {
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
halfDayLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
10004
|
-
dayLower: DateUtils.format(date, "D", this.options.language),
|
|
10005
|
-
weekLower: date.getMonth() !== last_date.getMonth()
|
|
9986
|
+
// quarter hour
|
|
9987
|
+
quarterHourUpper: date.getDate() !== last_date.getDate()
|
|
10006
9988
|
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10007
|
-
:
|
|
10008
|
-
|
|
10009
|
-
|
|
9989
|
+
: "",
|
|
9990
|
+
quarterHourLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
9991
|
+
// hour
|
|
9992
|
+
hourUpper: date.getDate() !== last_date.getDate()
|
|
9993
|
+
? DateUtils.format(date, "D MMM", this.options.language)
|
|
9994
|
+
: "",
|
|
9995
|
+
hourLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
9996
|
+
// quarter day
|
|
10010
9997
|
quarterDayUpper: date.getDate() !== last_date.getDate()
|
|
10011
9998
|
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10012
9999
|
: "",
|
|
10000
|
+
quarterDayLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
10001
|
+
// half day
|
|
10013
10002
|
halfDayUpper: (date.getDate() !== last_date.getDate())
|
|
10014
10003
|
? (((date.getMonth() !== last_date.getMonth()) || i < 2)
|
|
10015
10004
|
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10016
10005
|
: DateUtils.format(date, "D", this.options.language))
|
|
10017
10006
|
: "",
|
|
10007
|
+
halfDayLower: DateUtils.format(date, "HH:mm", this.options.language),
|
|
10008
|
+
// day
|
|
10018
10009
|
dayUpper: ((date.getMonth() !== last_date.getMonth()) || i === 0)
|
|
10019
10010
|
? DateUtils.format(date, "MMMM", this.options.language)
|
|
10020
10011
|
: "",
|
|
10012
|
+
dayMiddle: DateUtils.format(date, "ddd", this.options.language),
|
|
10013
|
+
dayLower: DateUtils.format(date, "D", this.options.language),
|
|
10014
|
+
// week
|
|
10021
10015
|
weekUpper: date.getMonth() !== last_date.getMonth()
|
|
10022
10016
|
? DateUtils.format(date, "MMMM", this.options.language)
|
|
10023
10017
|
: "",
|
|
10018
|
+
weekLower: date.getMonth() !== last_date.getMonth()
|
|
10019
|
+
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10020
|
+
: DateUtils.format(date, "D", this.options.language),
|
|
10021
|
+
// month
|
|
10024
10022
|
monthUpper: date.getFullYear() !== last_date.getFullYear()
|
|
10025
10023
|
? DateUtils.format(date, "YYYY", this.options.language)
|
|
10026
10024
|
: "",
|
|
10025
|
+
monthLower: DateUtils.format(date, "MMMM", this.options.language),
|
|
10026
|
+
// year
|
|
10027
10027
|
yearUpper: date.getFullYear() !== last_date.getFullYear()
|
|
10028
10028
|
? DateUtils.format(date, "YYYY", this.options.language)
|
|
10029
10029
|
: "",
|
|
10030
|
-
|
|
10031
|
-
? DateUtils.format(date, "D MMM", this.options.language)
|
|
10032
|
-
: "",
|
|
10030
|
+
yearLower: DateUtils.format(date, "YYYY", this.options.language),
|
|
10033
10031
|
};
|
|
10034
10032
|
// Descontando 20 para adcionar uma segunda linha de informação no cabeçalho
|
|
10035
10033
|
var base_pos = {
|
|
10036
10034
|
x: i * this.options.columnWidth,
|
|
10037
|
-
lower_y: this.options.headerHeight - 20,
|
|
10038
10035
|
upper_y: this.options.headerHeight - 20 - 25,
|
|
10036
|
+
middle_y: this.options.headerHeight - 20,
|
|
10037
|
+
lower_y: this.options.headerHeight - 20,
|
|
10039
10038
|
};
|
|
10040
|
-
debugger;
|
|
10041
10039
|
var x_pos = {
|
|
10042
|
-
|
|
10040
|
+
quarterHourUpper: (this.dates.length < 14) ? (this.options.columnWidth) : (this.options.columnWidth * 24 / 2),
|
|
10041
|
+
quarterHourMiddle: this.options.columnWidth / 2,
|
|
10042
|
+
quarterHourLower: this.options.columnWidth / 2,
|
|
10043
10043
|
hourUpper: (this.dates.length < 14) ? (this.options.columnWidth) : (this.options.columnWidth * 24 / 2),
|
|
10044
|
-
|
|
10044
|
+
hourMiddle: this.options.columnWidth / 2,
|
|
10045
|
+
hourLower: this.options.columnWidth / 2,
|
|
10045
10046
|
quarterDayUpper: this.options.columnWidth * 4 / 2,
|
|
10046
|
-
|
|
10047
|
+
quarterDayMiddle: this.options.columnWidth / 2,
|
|
10048
|
+
quarterDayLower: this.options.columnWidth / 2,
|
|
10047
10049
|
halfDayUpper: this.options.columnWidth * 2 / 2,
|
|
10048
|
-
|
|
10050
|
+
halfDayMiddle: this.options.columnWidth / 2,
|
|
10051
|
+
halfDayLower: this.options.columnWidth / 2,
|
|
10049
10052
|
dayUpper: (this.dates.length < 15) ? (this.options.columnWidth) : ((this.options.columnWidth * 30) / 2),
|
|
10050
|
-
|
|
10053
|
+
dayMiddle: this.options.columnWidth / 2 - 12,
|
|
10054
|
+
dayLower: this.options.columnWidth / 2,
|
|
10051
10055
|
weekUpper: (this.options.columnWidth * 4) / 2,
|
|
10056
|
+
weekMiddle: 0,
|
|
10057
|
+
weekLower: 0,
|
|
10058
|
+
monthUpper: (this.dates.length < 15) ? (this.options.columnWidth) : ((this.options.columnWidth * 12) / 2),
|
|
10059
|
+
monthMiddle: 0,
|
|
10052
10060
|
monthLower: this.options.columnWidth / 2,
|
|
10053
|
-
monthUpper: (this.options.columnWidth * 12) / 2,
|
|
10054
|
-
yearLower: this.options.columnWidth / 2,
|
|
10055
10061
|
yearUpper: (this.options.columnWidth * 30) / 2,
|
|
10062
|
+
yearMiddle: this.options.columnWidth / 2,
|
|
10063
|
+
yearLower: this.options.columnWidth / 2,
|
|
10056
10064
|
};
|
|
10057
10065
|
return {
|
|
10058
10066
|
upper_text: date_text[this.options.viewMode + "Upper"],
|
|
10067
|
+
middle_text: date_text[this.options.viewMode + "Middle"],
|
|
10059
10068
|
lower_text: date_text[this.options.viewMode + "Lower"],
|
|
10060
10069
|
upper_x: base_pos.x + x_pos[this.options.viewMode + "Upper"],
|
|
10061
10070
|
upper_y: base_pos.upper_y,
|
|
10071
|
+
middle_x: base_pos.x + x_pos[this.options.viewMode + "Middle"],
|
|
10072
|
+
middle_y: base_pos.middle_y,
|
|
10062
10073
|
lower_x: base_pos.x + x_pos[this.options.viewMode + "Lower"],
|
|
10063
10074
|
lower_y: base_pos.lower_y,
|
|
10064
10075
|
date: date,
|
|
@@ -10350,6 +10361,7 @@ var GanttComponent = /** @class */ (function () {
|
|
|
10350
10361
|
}
|
|
10351
10362
|
GanttComponent.prototype.ngOnInit = function () {
|
|
10352
10363
|
this._validateViewMode();
|
|
10364
|
+
this._validateTasks();
|
|
10353
10365
|
};
|
|
10354
10366
|
GanttComponent.prototype.ngAfterViewInit = function () {
|
|
10355
10367
|
var _this = this;
|
|
@@ -10360,7 +10372,7 @@ var GanttComponent = /** @class */ (function () {
|
|
|
10360
10372
|
viewMode: this.viewMode,
|
|
10361
10373
|
marginBeforeStart: this.marginBeforeStart,
|
|
10362
10374
|
marginAfterEnd: this.marginAfterEnd,
|
|
10363
|
-
language: "pt-
|
|
10375
|
+
language: "pt-br",
|
|
10364
10376
|
allowMovement: this.allowMovement,
|
|
10365
10377
|
hasPopup: this.hasPopup,
|
|
10366
10378
|
containerWidth: this.containerWidth,
|
|
@@ -10404,6 +10416,7 @@ var GanttComponent = /** @class */ (function () {
|
|
|
10404
10416
|
};
|
|
10405
10417
|
GanttComponent.prototype._validateViewMode = function () {
|
|
10406
10418
|
if (![
|
|
10419
|
+
ViewMode.QuarterHour,
|
|
10407
10420
|
ViewMode.Hour,
|
|
10408
10421
|
ViewMode.QuarterDay,
|
|
10409
10422
|
ViewMode.HalfDay,
|
|
@@ -10415,6 +10428,15 @@ var GanttComponent = /** @class */ (function () {
|
|
|
10415
10428
|
throw new Error("Invalid gantt view mode");
|
|
10416
10429
|
}
|
|
10417
10430
|
};
|
|
10431
|
+
GanttComponent.prototype._validateTasks = function () {
|
|
10432
|
+
this.tasks.forEach(function (group) {
|
|
10433
|
+
group.tasks.forEach(function (task) {
|
|
10434
|
+
if (task.start > task.end) {
|
|
10435
|
+
throw new Error("invalid task. The start date must be less than the end date.");
|
|
10436
|
+
}
|
|
10437
|
+
});
|
|
10438
|
+
});
|
|
10439
|
+
};
|
|
10418
10440
|
__decorate([
|
|
10419
10441
|
Input()
|
|
10420
10442
|
], GanttComponent.prototype, "columnTitle", void 0);
|
|
@@ -10474,7 +10496,7 @@ var GanttComponent = /** @class */ (function () {
|
|
|
10474
10496
|
selector: "s-gantt",
|
|
10475
10497
|
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",
|
|
10476
10498
|
encapsulation: ViewEncapsulation.None,
|
|
10477
|
-
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:#
|
|
10499
|
+
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}"]
|
|
10478
10500
|
})
|
|
10479
10501
|
], GanttComponent);
|
|
10480
10502
|
return GanttComponent;
|
|
@@ -10485,6 +10507,12 @@ var SideTableComponent = /** @class */ (function () {
|
|
|
10485
10507
|
this.ROW_HEIGHT = 44;
|
|
10486
10508
|
this.multipleTaskPerLine = false;
|
|
10487
10509
|
}
|
|
10510
|
+
SideTableComponent.prototype.ngOnInit = function () {
|
|
10511
|
+
this._removeEmptyTasks();
|
|
10512
|
+
};
|
|
10513
|
+
SideTableComponent.prototype._removeEmptyTasks = function () {
|
|
10514
|
+
this.tasks = this.tasks.filter(function (task) { return task.tasks.length; });
|
|
10515
|
+
};
|
|
10488
10516
|
__decorate([
|
|
10489
10517
|
Input()
|
|
10490
10518
|
], SideTableComponent.prototype, "columnTitle", void 0);
|
|
@@ -14533,6 +14561,16 @@ var PanelModule = /** @class */ (function () {
|
|
|
14533
14561
|
}());
|
|
14534
14562
|
|
|
14535
14563
|
var fallback = {
|
|
14564
|
+
"platform.angular_components.filters": "Filtros",
|
|
14565
|
+
"platform.angular_components.filter": "Filtrar",
|
|
14566
|
+
"platform.angular_components.clear": "Limpar",
|
|
14567
|
+
"platform.angular_components.cancel": "Cancelar",
|
|
14568
|
+
"platform.angular_components.select": "Selecionar",
|
|
14569
|
+
"platform.angular_components.not_informed": "Não informado",
|
|
14570
|
+
"platform.angular_components.advanced_search": "Pesquisa avançada",
|
|
14571
|
+
"platform.angular_components.no_records_found": "Nenhum registro encontrado",
|
|
14572
|
+
"platform.angular_components.total_record": "{{ count }} registros encontrados",
|
|
14573
|
+
"platform.angular_components.total_records": "{{ count }} registros encontrados",
|
|
14536
14574
|
"platform.angular_components.country_name_br": "Brasil",
|
|
14537
14575
|
"platform.angular_components.country_name_us": "Estados Unidos",
|
|
14538
14576
|
"platform.angular_components.country_name_co": "Colômbia",
|