@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.
Files changed (35) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +168 -130
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/dynamic-form/components/lookup/lookup.component.d.ts +46 -14
  6. package/components/gantt/components/gantt/gantt.d.ts +1 -3
  7. package/components/gantt/components/side-table/side-table.component.d.ts +4 -1
  8. package/components/gantt/gantt.component.d.ts +1 -0
  9. package/components/gantt/models/view-mode.d.ts +1 -0
  10. package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +43 -52
  11. package/esm2015/components/dynamic-form/configurations/fields/lookup-field.js +1 -11
  12. package/esm2015/components/dynamic-form/dynamic-form.module.js +3 -1
  13. package/esm2015/components/gantt/components/gantt/bar.js +2 -2
  14. package/esm2015/components/gantt/components/gantt/gantt.js +92 -64
  15. package/esm2015/components/gantt/components/gantt/utils/date-utils.js +3 -2
  16. package/esm2015/components/gantt/components/side-table/side-table.component.js +7 -1
  17. package/esm2015/components/gantt/gantt.component.js +14 -3
  18. package/esm2015/components/gantt/models/view-mode.js +2 -1
  19. package/esm2015/locale/fallback.js +11 -1
  20. package/esm5/components/dynamic-form/components/lookup/lookup.component.js +43 -52
  21. package/esm5/components/dynamic-form/configurations/fields/lookup-field.js +1 -11
  22. package/esm5/components/dynamic-form/dynamic-form.module.js +3 -1
  23. package/esm5/components/gantt/components/gantt/bar.js +2 -2
  24. package/esm5/components/gantt/components/gantt/gantt.js +95 -67
  25. package/esm5/components/gantt/components/gantt/utils/date-utils.js +3 -2
  26. package/esm5/components/gantt/components/side-table/side-table.component.js +7 -1
  27. package/esm5/components/gantt/gantt.component.js +14 -3
  28. package/esm5/components/gantt/models/view-mode.js +2 -1
  29. package/esm5/locale/fallback.js +11 -1
  30. package/fesm2015/seniorsistemas-angular-components.js +165 -127
  31. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  32. package/fesm5/seniorsistemas-angular-components.js +168 -130
  33. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  34. package/package.json +1 -1
  35. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -2959,16 +2959,6 @@ class LookupField extends Field {
2959
2959
  constructor(config) {
2960
2960
  super(Object.assign(Object.assign({}, config), { type: FieldType.Lookup }));
2961
2961
  this.multiple = false;
2962
- this.searchTitle = "Pesquisa avançada";
2963
- this.searchEmptyTitle = "Nenhum registro encontrado";
2964
- this.filterLabel = "Filtrar";
2965
- this.filterTitle = "Filtros";
2966
- this.clearLabel = "Limpar";
2967
- this.cancelLabel = "Cancelar";
2968
- this.selectLabel = "Selecionar";
2969
- this.recordLabel = " registro";
2970
- this.recordsLabel = " registros";
2971
- this.emptyFieldLabel = "Não informado";
2972
2962
  this.autocompleteForceSelection = true;
2973
2963
  this.onSelect = (event) => { };
2974
2964
  this.onUnselect = (event) => { };
@@ -3154,24 +3144,15 @@ class Option {
3154
3144
 
3155
3145
  var LookupComponent_1;
3156
3146
  let LookupComponent = LookupComponent_1 = class LookupComponent {
3157
- constructor(hotkeysService) {
3147
+ constructor(hotkeysService, translateService) {
3158
3148
  this.hotkeysService = hotkeysService;
3149
+ this.translateService = translateService;
3159
3150
  this.id = `s-lookup-${LookupComponent_1.nextId++}`;
3160
3151
  this.autocompleteForceSelection = true;
3161
3152
  this.disabled = false;
3162
3153
  this.showSearch = true;
3163
3154
  this.lookupAppendTo = "body";
3164
- this.searchTitle = "Pesquisa avançada";
3165
- this.searchEmptyTitle = "Nenhum registro encontrado";
3166
3155
  this.searchFields = [];
3167
- this.filterTitle = "Filtros";
3168
- this.filterLabel = "Filtrar";
3169
- this.clearLabel = "Limpar";
3170
- this.cancelLabel = "Cancelar";
3171
- this.selectLabel = "Selecionar";
3172
- this.emptyFieldLabel = "Não informado";
3173
- this.recordLabel = " registro";
3174
- this.recordsLabel = " registros";
3175
3156
  this.onLookupRequest = new EventEmitter();
3176
3157
  this.onSearchRequest = new EventEmitter();
3177
3158
  this.onFocus = new EventEmitter();
@@ -3237,10 +3218,8 @@ let LookupComponent = LookupComponent_1 = class LookupComponent {
3237
3218
  });
3238
3219
  }
3239
3220
  printRecordTotalizer() {
3240
- const label = this.searchTotalRecords === 1
3241
- ? this.recordsLabel.trim()
3242
- : this.recordsLabel.trim();
3243
- return this.searchTotalRecordsLabel ? this.searchTotalRecordsLabel : `${this.searchTotalRecords} ${label}`;
3221
+ var _a, _b, _c;
3222
+ 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 });
3244
3223
  }
3245
3224
  _convertToMomentHourFormat(hourFormat, format) {
3246
3225
  if (format === "dd/mm/yy") { // valor padrão para o format.
@@ -3506,7 +3485,8 @@ let LookupComponent = LookupComponent_1 = class LookupComponent {
3506
3485
  };
3507
3486
  LookupComponent.nextId = 0;
3508
3487
  LookupComponent.ctorParameters = () => [
3509
- { type: HotkeysService }
3488
+ { type: HotkeysService },
3489
+ { type: TranslateService }
3510
3490
  ];
3511
3491
  __decorate([
3512
3492
  Input()
@@ -3547,12 +3527,6 @@ __decorate([
3547
3527
  __decorate([
3548
3528
  Input()
3549
3529
  ], LookupComponent.prototype, "lookupAppendTo", void 0);
3550
- __decorate([
3551
- Input()
3552
- ], LookupComponent.prototype, "searchTitle", void 0);
3553
- __decorate([
3554
- Input()
3555
- ], LookupComponent.prototype, "searchEmptyTitle", void 0);
3556
3530
  __decorate([
3557
3531
  Input()
3558
3532
  ], LookupComponent.prototype, "searchEmptyDescription", void 0);
@@ -3571,36 +3545,9 @@ __decorate([
3571
3545
  __decorate([
3572
3546
  Input()
3573
3547
  ], LookupComponent.prototype, "multiSortMeta", void 0);
3574
- __decorate([
3575
- Input()
3576
- ], LookupComponent.prototype, "filterTitle", void 0);
3577
- __decorate([
3578
- Input()
3579
- ], LookupComponent.prototype, "filterLabel", void 0);
3580
- __decorate([
3581
- Input()
3582
- ], LookupComponent.prototype, "clearLabel", void 0);
3583
- __decorate([
3584
- Input()
3585
- ], LookupComponent.prototype, "cancelLabel", void 0);
3586
- __decorate([
3587
- Input()
3588
- ], LookupComponent.prototype, "selectLabel", void 0);
3589
- __decorate([
3590
- Input()
3591
- ], LookupComponent.prototype, "emptyFieldLabel", void 0);
3592
- __decorate([
3593
- Input()
3594
- ], LookupComponent.prototype, "recordLabel", void 0);
3595
- __decorate([
3596
- Input()
3597
- ], LookupComponent.prototype, "recordsLabel", void 0);
3598
3548
  __decorate([
3599
3549
  Input()
3600
3550
  ], LookupComponent.prototype, "placeholder", void 0);
3601
- __decorate([
3602
- Input()
3603
- ], LookupComponent.prototype, "searchTotalRecordsLabel", void 0);
3604
3551
  __decorate([
3605
3552
  Input()
3606
3553
  ], LookupComponent.prototype, "sortableColumnsDisabled", void 0);
@@ -3643,10 +3590,43 @@ __decorate([
3643
3590
  __decorate([
3644
3591
  ViewChild(AutoComplete, { static: false })
3645
3592
  ], LookupComponent.prototype, "autocomplete", void 0);
3593
+ __decorate([
3594
+ Input()
3595
+ ], LookupComponent.prototype, "searchTitle", void 0);
3596
+ __decorate([
3597
+ Input()
3598
+ ], LookupComponent.prototype, "searchEmptyTitle", void 0);
3599
+ __decorate([
3600
+ Input()
3601
+ ], LookupComponent.prototype, "searchTotalRecordsLabel", void 0);
3602
+ __decorate([
3603
+ Input()
3604
+ ], LookupComponent.prototype, "filterTitle", void 0);
3605
+ __decorate([
3606
+ Input()
3607
+ ], LookupComponent.prototype, "filterLabel", void 0);
3608
+ __decorate([
3609
+ Input()
3610
+ ], LookupComponent.prototype, "clearLabel", void 0);
3611
+ __decorate([
3612
+ Input()
3613
+ ], LookupComponent.prototype, "cancelLabel", void 0);
3614
+ __decorate([
3615
+ Input()
3616
+ ], LookupComponent.prototype, "selectLabel", void 0);
3617
+ __decorate([
3618
+ Input()
3619
+ ], LookupComponent.prototype, "emptyFieldLabel", void 0);
3620
+ __decorate([
3621
+ Input()
3622
+ ], LookupComponent.prototype, "recordLabel", void 0);
3623
+ __decorate([
3624
+ Input()
3625
+ ], LookupComponent.prototype, "recordsLabel", void 0);
3646
3626
  LookupComponent = LookupComponent_1 = __decorate([
3647
3627
  Component({
3648
3628
  selector: "s-lookup",
3649
- 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",
3629
+ 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",
3650
3630
  providers: [
3651
3631
  {
3652
3632
  provide: NG_VALUE_ACCESSOR,
@@ -7345,6 +7325,7 @@ DynamicFormModule = __decorate([
7345
7325
  SwitchModule,
7346
7326
  PasswordStrengthModule,
7347
7327
  SliderModule,
7328
+ TranslateModule,
7348
7329
  ],
7349
7330
  declarations: [
7350
7331
  AutocompleteFieldComponent,
@@ -8096,11 +8077,12 @@ class DateUtils {
8096
8077
  .startOf("month")
8097
8078
  .format("MMMM");
8098
8079
  const monthNameCapitalized = monthName.charAt(0).toUpperCase() + monthName.slice(1);
8099
- const dateToFormat = moment$7(date);
8080
+ const dateToFormat = moment$7(date).locale(lang);
8100
8081
  const format_map = {
8101
8082
  YYYY: dateToFormat.format("YYYY"),
8102
8083
  MM: dateToFormat.format("MM"),
8103
8084
  DD: dateToFormat.format("DD"),
8085
+ ddd: dateToFormat.format("ddd").toUpperCase().replace(".", ""),
8104
8086
  HH: dateToFormat.format("HH"),
8105
8087
  mm: dateToFormat.format("mm"),
8106
8088
  ss: dateToFormat.format("ss"),
@@ -8319,6 +8301,7 @@ $.attr = (element, attr, value) => {
8319
8301
 
8320
8302
  var ViewMode;
8321
8303
  (function (ViewMode) {
8304
+ ViewMode["QuarterHour"] = "quarterHour";
8322
8305
  ViewMode["Hour"] = "hour";
8323
8306
  ViewMode["QuarterDay"] = "quarterDay";
8324
8307
  ViewMode["HalfDay"] = "halfDay";
@@ -8548,7 +8531,7 @@ class Bar {
8548
8531
  _computeX() {
8549
8532
  const { step, columnWidth } = this._gantt.options;
8550
8533
  let x;
8551
- if (this._gantt.view_is([ViewMode.Hour, ViewMode.QuarterDay, ViewMode.HalfDay, ViewMode.Day])) {
8534
+ if (this._gantt.view_is([ViewMode.QuarterHour, ViewMode.Hour, ViewMode.QuarterDay, ViewMode.HalfDay, ViewMode.Day])) {
8552
8535
  const diff = DateUtils.diff(this.task.start, this._gantt.minDate, "minutes");
8553
8536
  x = (diff / step) * (columnWidth / 60);
8554
8537
  }
@@ -8932,7 +8915,11 @@ class Gantt {
8932
8915
  update_view_scale(view_mode) {
8933
8916
  this.options.viewMode = view_mode;
8934
8917
  // this.isHourView = false;
8935
- if (view_mode === ViewMode.Hour) {
8918
+ if (view_mode === ViewMode.QuarterHour) {
8919
+ this.options.step = 24 / 24 / 4;
8920
+ this.options.columnWidth = 50;
8921
+ }
8922
+ else if (view_mode === ViewMode.Hour) {
8936
8923
  this.options.step = 24 / 24;
8937
8924
  this.options.columnWidth = 50;
8938
8925
  }
@@ -8965,7 +8952,7 @@ class Gantt {
8965
8952
  this.setup_date_values();
8966
8953
  }
8967
8954
  setup_gantt_dates() {
8968
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
8955
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
8969
8956
  this._minDate = null;
8970
8957
  this._maxDate = null;
8971
8958
  for (let task of this.tasks) {
@@ -8977,36 +8964,37 @@ class Gantt {
8977
8964
  this._maxDate = task.end;
8978
8965
  }
8979
8966
  }
8980
- this._realMinDate = this.minDate;
8981
- this._realMaxDate = this.maxDate;
8982
8967
  switch (this.options.viewMode) {
8968
+ case ViewMode.QuarterHour:
8969
+ this._minDate = DateUtils.add(this.minDate, -((_a = this.options.marginBeforeStart) !== null && _a !== void 0 ? _a : 15), "minutes");
8970
+ this._maxDate = DateUtils.add(this.maxDate, (_b = this.options.marginAfterEnd) !== null && _b !== void 0 ? _b : 15, "minutes");
8983
8971
  case ViewMode.Hour:
8984
- this._minDate = DateUtils.add(this.minDate, -((_a = this.options.marginBeforeStart) !== null && _a !== void 0 ? _a : 1), "hour");
8985
- this._maxDate = DateUtils.add(this.maxDate, (_b = this.options.marginAfterEnd) !== null && _b !== void 0 ? _b : 1, "hour");
8972
+ this._minDate = DateUtils.add(this.minDate, -((_c = this.options.marginBeforeStart) !== null && _c !== void 0 ? _c : 1), "hour");
8973
+ this._maxDate = DateUtils.add(this.maxDate, (_d = this.options.marginAfterEnd) !== null && _d !== void 0 ? _d : 1, "hour");
8986
8974
  break;
8987
8975
  case ViewMode.QuarterDay:
8988
- this._minDate = DateUtils.add(this.minDate, -((_c = this.options.marginBeforeStart) !== null && _c !== void 0 ? _c : 6), "hour");
8989
- this._maxDate = DateUtils.add(this.maxDate, (_d = this.options.marginAfterEnd) !== null && _d !== void 0 ? _d : 6, "hour");
8976
+ this._minDate = DateUtils.add(this.minDate, -((_e = this.options.marginBeforeStart) !== null && _e !== void 0 ? _e : 6), "hour");
8977
+ this._maxDate = DateUtils.add(this.maxDate, (_f = this.options.marginAfterEnd) !== null && _f !== void 0 ? _f : 6, "hour");
8990
8978
  break;
8991
8979
  case ViewMode.HalfDay:
8992
- this._minDate = DateUtils.add(this.minDate, -((_e = this.options.marginBeforeStart) !== null && _e !== void 0 ? _e : 12), "hour");
8993
- this._maxDate = DateUtils.add(this.maxDate, (_f = this.options.marginAfterEnd) !== null && _f !== void 0 ? _f : 12, "hour");
8980
+ this._minDate = DateUtils.add(this.minDate, -((_g = this.options.marginBeforeStart) !== null && _g !== void 0 ? _g : 12), "hour");
8981
+ this._maxDate = DateUtils.add(this.maxDate, (_h = this.options.marginAfterEnd) !== null && _h !== void 0 ? _h : 12, "hour");
8994
8982
  break;
8995
8983
  case ViewMode.Day:
8996
- this._minDate = DateUtils.add(this.minDate, -((_g = this.options.marginBeforeStart) !== null && _g !== void 0 ? _g : 1), "day");
8997
- this._maxDate = DateUtils.add(this.maxDate, (_h = this.options.marginAfterEnd) !== null && _h !== void 0 ? _h : 1, "day");
8984
+ this._minDate = DateUtils.add(this.minDate, -((_j = this.options.marginBeforeStart) !== null && _j !== void 0 ? _j : 1), "day");
8985
+ this._maxDate = DateUtils.add(this.maxDate, (_k = this.options.marginAfterEnd) !== null && _k !== void 0 ? _k : 1, "day");
8998
8986
  break;
8999
8987
  case ViewMode.Week:
9000
- this._minDate = DateUtils.add(this.minDate, -((_j = this.options.marginBeforeStart) !== null && _j !== void 0 ? _j : 1), "week");
9001
- this._maxDate = DateUtils.add(this.maxDate, (_k = this.options.marginAfterEnd) !== null && _k !== void 0 ? _k : 1, "week");
8988
+ this._minDate = DateUtils.add(this.minDate, -((_l = this.options.marginBeforeStart) !== null && _l !== void 0 ? _l : 1), "week");
8989
+ this._maxDate = DateUtils.add(this.maxDate, (_m = this.options.marginAfterEnd) !== null && _m !== void 0 ? _m : 1, "week");
9002
8990
  break;
9003
8991
  case ViewMode.Month:
9004
- this._minDate = DateUtils.add(this.minDate, -((_l = this.options.marginBeforeStart) !== null && _l !== void 0 ? _l : 1), "month");
9005
- this._maxDate = DateUtils.add(this.maxDate, (_m = this.options.marginAfterEnd) !== null && _m !== void 0 ? _m : 1, "month");
8992
+ this._minDate = DateUtils.add(this.minDate, -((_o = this.options.marginBeforeStart) !== null && _o !== void 0 ? _o : 1), "month");
8993
+ this._maxDate = DateUtils.add(this.maxDate, (_p = this.options.marginAfterEnd) !== null && _p !== void 0 ? _p : 1, "month");
9006
8994
  break;
9007
8995
  case ViewMode.Year:
9008
- this._minDate = DateUtils.add(this.minDate, -((_o = this.options.marginBeforeStart) !== null && _o !== void 0 ? _o : 1), "year");
9009
- this._maxDate = DateUtils.add(this.maxDate, (_p = this.options.marginAfterEnd) !== null && _p !== void 0 ? _p : 1, "year");
8996
+ this._minDate = DateUtils.add(this.minDate, -((_q = this.options.marginBeforeStart) !== null && _q !== void 0 ? _q : 1), "year");
8997
+ this._maxDate = DateUtils.add(this.maxDate, (_r = this.options.marginAfterEnd) !== null && _r !== void 0 ? _r : 1, "year");
9010
8998
  break;
9011
8999
  }
9012
9000
  }
@@ -9034,8 +9022,6 @@ class Gantt {
9034
9022
  const columnWidth = (this.options.containerWidth - 1) / this.dates.length;
9035
9023
  this.options.columnWidth = columnWidth < 45 ? 45 : columnWidth;
9036
9024
  }
9037
- console.log("cur_date", cur_date);
9038
- console.log("dates", this.dates);
9039
9025
  }
9040
9026
  bind_events() {
9041
9027
  this.bind_grid_click();
@@ -9140,23 +9126,24 @@ class Gantt {
9140
9126
  this.tasks.length;
9141
9127
  for (let date of this.dates) {
9142
9128
  let tick_class = "tick";
9143
- // thick tick for monday
9144
- if (this.view_is(ViewMode.Day) && date.getDate() === 1) {
9129
+ if (this.view_is(ViewMode.QuarterHour) && date.getHours() === 0 && date.getMinutes() === 0) {
9130
+ // thick tick for first hour of day.
9131
+ tick_class += " thick";
9132
+ }
9133
+ else if (this.view_is([ViewMode.Hour, ViewMode.QuarterDay, ViewMode.HalfDay]) && date.getHours() === 0) {
9134
+ // thick tick for first hour of day.
9145
9135
  tick_class += " thick";
9146
9136
  }
9147
- // thick tick for first week
9148
- if (this.view_is(ViewMode.Week) &&
9149
- date.getDate() >= 1 &&
9150
- date.getDate() < 8) {
9137
+ else if (this.view_is(ViewMode.Day) && date.getDate() === 1) {
9138
+ // thick tick for monday
9151
9139
  tick_class += " thick";
9152
9140
  }
9153
- // thick ticks for quarters
9154
- if (this.view_is(ViewMode.Month) && date.getMonth() % 3 === 0) {
9141
+ else if (this.view_is(ViewMode.Week) && date.getDate() >= 1 && date.getDate() < 8) {
9142
+ // thick tick for first week
9155
9143
  tick_class += " thick";
9156
9144
  }
9157
- // Thick ticks for hours
9158
- if (this.view_is(ViewMode.Hour) &&
9159
- date.getHours() == 0) {
9145
+ else if (this.view_is(ViewMode.Month) && date.getMonth() % 3 === 0) {
9146
+ // thick ticks for quarters
9160
9147
  tick_class += " thick";
9161
9148
  }
9162
9149
  createSVG("path", {
@@ -9185,7 +9172,7 @@ class Gantt {
9185
9172
  let x = 0;
9186
9173
  for (let date of this.dates) {
9187
9174
  let y = (this.options.headerHeight + this.options.padding) / 2;
9188
- let isToday = date.toString() == DateUtils.today();
9175
+ let isToday = date == DateUtils.today();
9189
9176
  let isWeekend = (date.getDay() == 0 || date.getDay() == 6);
9190
9177
  let className;
9191
9178
  if (isToday) {
@@ -9215,19 +9202,8 @@ class Gantt {
9215
9202
  }
9216
9203
  make_dates() {
9217
9204
  const dates = this.get_dates_to_draw();
9218
- const isHourView = this.view_is([ViewMode.Hour, ViewMode.QuarterDay, ViewMode.HalfDay]);
9219
- let counter = 0;
9220
9205
  for (let i = 0; i < dates.length; i++) {
9221
9206
  const date = dates[i];
9222
- if (isHourView && date.date >= this._realMinDate && date.date <= this._realMaxDate) {
9223
- createSVG("text", {
9224
- x: date.lower_x,
9225
- y: date.lower_y,
9226
- innerHTML: `H${counter++ * this.options.step}`,
9227
- class: "title-1",
9228
- append_to: this.layers.date,
9229
- });
9230
- }
9231
9207
  createSVG("text", {
9232
9208
  x: date.lower_x,
9233
9209
  y: date.lower_y + 20,
@@ -9235,6 +9211,15 @@ class Gantt {
9235
9211
  class: "title-2",
9236
9212
  append_to: this.layers.date,
9237
9213
  });
9214
+ if (date.middle_text) {
9215
+ createSVG("text", {
9216
+ x: date.middle_x,
9217
+ y: date.middle_y,
9218
+ innerHTML: date.middle_text,
9219
+ class: "middle-text",
9220
+ append_to: this.layers.date,
9221
+ });
9222
+ }
9238
9223
  if (date.upper_text) {
9239
9224
  const $upper_text = createSVG("text", {
9240
9225
  x: date.upper_x,
@@ -9264,67 +9249,93 @@ class Gantt {
9264
9249
  last_date = DateUtils.add(date, 1, "year");
9265
9250
  }
9266
9251
  const date_text = {
9267
- hourLower: DateUtils.format(date, "HH:mm", this.options.language),
9268
- quarterDayLower: DateUtils.format(date, "HH:mm", this.options.language),
9269
- halfDayLower: DateUtils.format(date, "HH:mm", this.options.language),
9270
- dayLower: DateUtils.format(date, "D", this.options.language),
9271
- weekLower: date.getMonth() !== last_date.getMonth()
9252
+ // quarter hour
9253
+ quarterHourUpper: date.getDate() !== last_date.getDate()
9272
9254
  ? DateUtils.format(date, "D MMM", this.options.language)
9273
- : DateUtils.format(date, "D", this.options.language),
9274
- monthLower: DateUtils.format(date, "MMMM", this.options.language),
9275
- yearLower: DateUtils.format(date, "YYYY", this.options.language),
9255
+ : "",
9256
+ quarterHourLower: DateUtils.format(date, "HH:mm", this.options.language),
9257
+ // hour
9258
+ hourUpper: date.getDate() !== last_date.getDate()
9259
+ ? DateUtils.format(date, "D MMM", this.options.language)
9260
+ : "",
9261
+ hourLower: DateUtils.format(date, "HH:mm", this.options.language),
9262
+ // quarter day
9276
9263
  quarterDayUpper: date.getDate() !== last_date.getDate()
9277
9264
  ? DateUtils.format(date, "D MMM", this.options.language)
9278
9265
  : "",
9266
+ quarterDayLower: DateUtils.format(date, "HH:mm", this.options.language),
9267
+ // half day
9279
9268
  halfDayUpper: (date.getDate() !== last_date.getDate())
9280
9269
  ? (((date.getMonth() !== last_date.getMonth()) || i < 2)
9281
9270
  ? DateUtils.format(date, "D MMM", this.options.language)
9282
9271
  : DateUtils.format(date, "D", this.options.language))
9283
9272
  : "",
9273
+ halfDayLower: DateUtils.format(date, "HH:mm", this.options.language),
9274
+ // day
9284
9275
  dayUpper: ((date.getMonth() !== last_date.getMonth()) || i === 0)
9285
9276
  ? DateUtils.format(date, "MMMM", this.options.language)
9286
9277
  : "",
9278
+ dayMiddle: DateUtils.format(date, "ddd", this.options.language),
9279
+ dayLower: DateUtils.format(date, "D", this.options.language),
9280
+ // week
9287
9281
  weekUpper: date.getMonth() !== last_date.getMonth()
9288
9282
  ? DateUtils.format(date, "MMMM", this.options.language)
9289
9283
  : "",
9284
+ weekLower: date.getMonth() !== last_date.getMonth()
9285
+ ? DateUtils.format(date, "D MMM", this.options.language)
9286
+ : DateUtils.format(date, "D", this.options.language),
9287
+ // month
9290
9288
  monthUpper: date.getFullYear() !== last_date.getFullYear()
9291
9289
  ? DateUtils.format(date, "YYYY", this.options.language)
9292
9290
  : "",
9291
+ monthLower: DateUtils.format(date, "MMMM", this.options.language),
9292
+ // year
9293
9293
  yearUpper: date.getFullYear() !== last_date.getFullYear()
9294
9294
  ? DateUtils.format(date, "YYYY", this.options.language)
9295
9295
  : "",
9296
- hourUpper: date.getDate() !== last_date.getDate()
9297
- ? DateUtils.format(date, "D MMM", this.options.language)
9298
- : "",
9296
+ yearLower: DateUtils.format(date, "YYYY", this.options.language),
9299
9297
  };
9300
9298
  // Descontando 20 para adcionar uma segunda linha de informação no cabeçalho
9301
9299
  const base_pos = {
9302
9300
  x: i * this.options.columnWidth,
9303
- lower_y: this.options.headerHeight - 20,
9304
9301
  upper_y: this.options.headerHeight - 20 - 25,
9302
+ middle_y: this.options.headerHeight - 20,
9303
+ lower_y: this.options.headerHeight - 20,
9305
9304
  };
9306
- debugger;
9307
9305
  const x_pos = {
9308
- hourLower: this.options.columnWidth / 2,
9306
+ quarterHourUpper: (this.dates.length < 14) ? (this.options.columnWidth) : (this.options.columnWidth * 24 / 2),
9307
+ quarterHourMiddle: this.options.columnWidth / 2,
9308
+ quarterHourLower: this.options.columnWidth / 2,
9309
9309
  hourUpper: (this.dates.length < 14) ? (this.options.columnWidth) : (this.options.columnWidth * 24 / 2),
9310
- quarterDayLower: this.options.columnWidth / 2,
9310
+ hourMiddle: this.options.columnWidth / 2,
9311
+ hourLower: this.options.columnWidth / 2,
9311
9312
  quarterDayUpper: this.options.columnWidth * 4 / 2,
9312
- halfDayLower: this.options.columnWidth / 2,
9313
+ quarterDayMiddle: this.options.columnWidth / 2,
9314
+ quarterDayLower: this.options.columnWidth / 2,
9313
9315
  halfDayUpper: this.options.columnWidth * 2 / 2,
9314
- dayLower: this.options.columnWidth / 2,
9316
+ halfDayMiddle: this.options.columnWidth / 2,
9317
+ halfDayLower: this.options.columnWidth / 2,
9315
9318
  dayUpper: (this.dates.length < 15) ? (this.options.columnWidth) : ((this.options.columnWidth * 30) / 2),
9316
- weekLower: 0,
9319
+ dayMiddle: this.options.columnWidth / 2 - 12,
9320
+ dayLower: this.options.columnWidth / 2,
9317
9321
  weekUpper: (this.options.columnWidth * 4) / 2,
9322
+ weekMiddle: 0,
9323
+ weekLower: 0,
9324
+ monthUpper: (this.dates.length < 15) ? (this.options.columnWidth) : ((this.options.columnWidth * 12) / 2),
9325
+ monthMiddle: 0,
9318
9326
  monthLower: this.options.columnWidth / 2,
9319
- monthUpper: (this.options.columnWidth * 12) / 2,
9320
- yearLower: this.options.columnWidth / 2,
9321
9327
  yearUpper: (this.options.columnWidth * 30) / 2,
9328
+ yearMiddle: this.options.columnWidth / 2,
9329
+ yearLower: this.options.columnWidth / 2,
9322
9330
  };
9323
9331
  return {
9324
9332
  upper_text: date_text[`${this.options.viewMode}Upper`],
9333
+ middle_text: date_text[`${this.options.viewMode}Middle`],
9325
9334
  lower_text: date_text[`${this.options.viewMode}Lower`],
9326
9335
  upper_x: base_pos.x + x_pos[`${this.options.viewMode}Upper`],
9327
9336
  upper_y: base_pos.upper_y,
9337
+ middle_x: base_pos.x + x_pos[`${this.options.viewMode}Middle`],
9338
+ middle_y: base_pos.middle_y,
9328
9339
  lower_x: base_pos.x + x_pos[`${this.options.viewMode}Lower`],
9329
9340
  lower_y: base_pos.lower_y,
9330
9341
  date,
@@ -9578,6 +9589,7 @@ let GanttComponent = class GanttComponent {
9578
9589
  }
9579
9590
  ngOnInit() {
9580
9591
  this._validateViewMode();
9592
+ this._validateTasks();
9581
9593
  }
9582
9594
  ngAfterViewInit() {
9583
9595
  if (this.fullWidth) {
@@ -9587,7 +9599,7 @@ let GanttComponent = class GanttComponent {
9587
9599
  viewMode: this.viewMode,
9588
9600
  marginBeforeStart: this.marginBeforeStart,
9589
9601
  marginAfterEnd: this.marginAfterEnd,
9590
- language: "pt-BR",
9602
+ language: "pt-br",
9591
9603
  allowMovement: this.allowMovement,
9592
9604
  hasPopup: this.hasPopup,
9593
9605
  containerWidth: this.containerWidth,
@@ -9631,6 +9643,7 @@ let GanttComponent = class GanttComponent {
9631
9643
  }
9632
9644
  _validateViewMode() {
9633
9645
  if (![
9646
+ ViewMode.QuarterHour,
9634
9647
  ViewMode.Hour,
9635
9648
  ViewMode.QuarterDay,
9636
9649
  ViewMode.HalfDay,
@@ -9642,6 +9655,15 @@ let GanttComponent = class GanttComponent {
9642
9655
  throw new Error("Invalid gantt view mode");
9643
9656
  }
9644
9657
  }
9658
+ _validateTasks() {
9659
+ this.tasks.forEach(group => {
9660
+ group.tasks.forEach(task => {
9661
+ if (task.start > task.end) {
9662
+ throw new Error("invalid task. The start date must be less than the end date.");
9663
+ }
9664
+ });
9665
+ });
9666
+ }
9645
9667
  };
9646
9668
  __decorate([
9647
9669
  Input()
@@ -9702,7 +9724,7 @@ GanttComponent = __decorate([
9702
9724
  selector: "s-gantt",
9703
9725
  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",
9704
9726
  encapsulation: ViewEncapsulation.None,
9705
- 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:#533a3a8c;stroke-width:.4}.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}"]
9727
+ 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}"]
9706
9728
  })
9707
9729
  ], GanttComponent);
9708
9730
 
@@ -9711,6 +9733,12 @@ let SideTableComponent = class SideTableComponent {
9711
9733
  this.ROW_HEIGHT = 44;
9712
9734
  this.multipleTaskPerLine = false;
9713
9735
  }
9736
+ ngOnInit() {
9737
+ this._removeEmptyTasks();
9738
+ }
9739
+ _removeEmptyTasks() {
9740
+ this.tasks = this.tasks.filter(task => task.tasks.length);
9741
+ }
9714
9742
  };
9715
9743
  __decorate([
9716
9744
  Input()
@@ -13534,6 +13562,16 @@ PanelModule = __decorate([
13534
13562
  ], PanelModule);
13535
13563
 
13536
13564
  const fallback = {
13565
+ "platform.angular_components.filters": "Filtros",
13566
+ "platform.angular_components.filter": "Filtrar",
13567
+ "platform.angular_components.clear": "Limpar",
13568
+ "platform.angular_components.cancel": "Cancelar",
13569
+ "platform.angular_components.select": "Selecionar",
13570
+ "platform.angular_components.not_informed": "Não informado",
13571
+ "platform.angular_components.advanced_search": "Pesquisa avançada",
13572
+ "platform.angular_components.no_records_found": "Nenhum registro encontrado",
13573
+ "platform.angular_components.total_record": "{{ count }} registros encontrados",
13574
+ "platform.angular_components.total_records": "{{ count }} registros encontrados",
13537
13575
  "platform.angular_components.country_name_br": "Brasil",
13538
13576
  "platform.angular_components.country_name_us": "Estados Unidos",
13539
13577
  "platform.angular_components.country_name_co": "Colômbia",