@seniorsistemas/angular-components 16.10.16 → 16.10.18
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 +50 -62
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +12 -12
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/workspace-switch/models/workspace.d.ts +1 -0
- package/esm2015/components/file-upload/file-upload.component.js +4 -3
- package/esm2015/components/table/table-column/table-columns.component.js +3 -2
- package/esm2015/components/table/table-paging/table-paging.component.js +3 -2
- package/esm2015/components/timeline/components/vertical-timeline/components/range-line/range-line.component.js +1 -1
- package/esm2015/components/workspace-switch/models/workspace.js +1 -1
- package/esm2015/components/workspace-switch/workspace-switch.component.js +10 -3
- package/esm5/components/file-upload/file-upload.component.js +4 -3
- package/esm5/components/table/table-column/table-columns.component.js +3 -2
- package/esm5/components/table/table-paging/table-paging.component.js +3 -2
- package/esm5/components/timeline/components/vertical-timeline/components/range-line/range-line.component.js +1 -1
- package/esm5/components/workspace-switch/models/workspace.js +1 -1
- package/esm5/components/workspace-switch/workspace-switch.component.js +10 -3
- package/fesm2015/seniorsistemas-angular-components.js +33 -23
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +33 -23
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +40 -40
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -21,7 +21,7 @@ import { Dialog, DialogModule } from 'primeng/dialog';
|
|
|
21
21
|
import { Table, TableService, RowToggler, TableModule as TableModule$1 } from 'primeng/table';
|
|
22
22
|
import { applyMask, AlignmentOptions, CurrencyMaskDirective as CurrencyMaskDirective$1 } from '@seniorsistemas/ng2-currency-mask';
|
|
23
23
|
import { user, service } from '@seniorsistemas/senior-platform-data';
|
|
24
|
-
import * as
|
|
24
|
+
import * as moment_ from 'moment';
|
|
25
25
|
import { CookieService } from 'ngx-cookie-service';
|
|
26
26
|
import { CurrencyMaskDirective } from 'ng2-currency-mask';
|
|
27
27
|
import { ButtonModule as ButtonModule$1 } from 'primeng/button';
|
|
@@ -1805,7 +1805,7 @@ var DEFAULT_NUMBER_LOCALE_OPTIONS = new NumberLocaleOptions();
|
|
|
1805
1805
|
*/
|
|
1806
1806
|
var DEFAULT_LOCALE_OPTIONS = new LocaleOptions();
|
|
1807
1807
|
|
|
1808
|
-
var moment =
|
|
1808
|
+
var moment = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
1809
1809
|
var LocaleService = /** @class */ (function () {
|
|
1810
1810
|
function LocaleService(http, cookieService) {
|
|
1811
1811
|
this.http = http;
|
|
@@ -1980,7 +1980,7 @@ var LocalizedCurrencyImpurePipe = /** @class */ (function (_super) {
|
|
|
1980
1980
|
return LocalizedCurrencyImpurePipe;
|
|
1981
1981
|
}(LocalizedCurrencyPipe));
|
|
1982
1982
|
|
|
1983
|
-
var moment$1 =
|
|
1983
|
+
var moment$1 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
1984
1984
|
var LocalizedDatePipe = /** @class */ (function () {
|
|
1985
1985
|
function LocalizedDatePipe(localeService) {
|
|
1986
1986
|
this.localeService = localeService;
|
|
@@ -2040,7 +2040,7 @@ var LocalizedNumberPipe = /** @class */ (function () {
|
|
|
2040
2040
|
return LocalizedNumberPipe;
|
|
2041
2041
|
}());
|
|
2042
2042
|
|
|
2043
|
-
var moment$2 =
|
|
2043
|
+
var moment$2 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2044
2044
|
var LocalizedTimePipe = /** @class */ (function () {
|
|
2045
2045
|
function LocalizedTimePipe(localeService) {
|
|
2046
2046
|
this.localeService = localeService;
|
|
@@ -3914,6 +3914,7 @@ var FileUploadService = /** @class */ (function () {
|
|
|
3914
3914
|
return FileUploadService;
|
|
3915
3915
|
}());
|
|
3916
3916
|
|
|
3917
|
+
var moment$3 = moment_;
|
|
3917
3918
|
var FileUploadComponent = /** @class */ (function () {
|
|
3918
3919
|
function FileUploadComponent(sanitizer, fileUploadService, translate) {
|
|
3919
3920
|
this.sanitizer = sanitizer;
|
|
@@ -4080,11 +4081,11 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
4080
4081
|
.then(function (metadata) { return _this.setModifiedDate(metadata); });
|
|
4081
4082
|
};
|
|
4082
4083
|
FileUploadComponent.prototype.setModifiedDate = function (metadata) {
|
|
4083
|
-
var hour = moment$
|
|
4084
|
-
var minutes = moment$
|
|
4085
|
-
var day = moment$
|
|
4086
|
-
var month = moment$
|
|
4087
|
-
var fullYear = moment$
|
|
4084
|
+
var hour = moment$3(metadata.modified).format("HH");
|
|
4085
|
+
var minutes = moment$3(metadata.modified).format("mm");
|
|
4086
|
+
var day = moment$3(metadata.modified).format("DD");
|
|
4087
|
+
var month = moment$3(metadata.modified).format("MM");
|
|
4088
|
+
var fullYear = moment$3(metadata.modified).format("YYYY");
|
|
4088
4089
|
this.modifiedDate = this.translate.instant("platform.angular_components.date_modified_custom_blob", { hour: hour, minutes: minutes, day: day, month: month, fullYear: fullYear });
|
|
4089
4090
|
};
|
|
4090
4091
|
var FileUploadComponent_1;
|
|
@@ -4179,7 +4180,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
4179
4180
|
Component({
|
|
4180
4181
|
selector: "s-file-upload",
|
|
4181
4182
|
template: "<div\n [id]=\"id\"\n class=\"s-fileupload\">\n <div class=\"s-fileupload-choose\">\n <input\n #inputUpload\n [id]=\"id+'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)\"> \n <s-button\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled\"\n [auxiliary]=\"false\">\n </s-button>\n </div>\n\n <section\n *ngIf=\"files.length\" \n [id]=\"id + 'fileupload-list'\"\n class=\"s-fileupload-list\"\n role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\">\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\">\n <ng-container *ngTemplateOutlet=\"file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }\">\n </ng-container>\n <span *ngIf=\"modifiedDate\" class=\"s-fileupload-list-file-name-date\">{{ modifiedDate }}</span>\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\">\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress\">\n </p-progressBar>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress\">\n </span>\n <span\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip\"\n [pTooltip]=\"successTooltip\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n <span\n *ngIf=\"file.error?.message\" \n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\">\n <a\n *ngIf=\"file.isUploading\"\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\">\n {{cancelLabel}}\n </a>\n <a\n *ngIf=\"!file.isUploading && !(disabled || !!formGroup?.disabled)\"\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"ariaLabelRemove || removeLabel\">\n {{removeLabel}}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}\n </a>\n <a\n style=\"display: none;\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
|
|
4182
|
-
styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:center
|
|
4183
|
+
styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:center;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name .s-fileupload-list-file-name-date{font-size:.75rem;color:#999}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name>a{cursor:pointer;text-decoration:none}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-fileupload-list .s-fileupload-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-check{color:#0c9348;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-times{color:#c13018;font-size:12px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin-top:15px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:100%}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action{text-decoration:none;color:#428bca}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :focus,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :visited,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action:hover{text-decoration:none}@media (min-width:768px){.s-fileupload-list .s-fileupload-list-file{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;-ms-flex-positive:2;flex-grow:2}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{margin:0 15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin:0;width:auto}}"]
|
|
4183
4184
|
})
|
|
4184
4185
|
], FileUploadComponent);
|
|
4185
4186
|
return FileUploadComponent;
|
|
@@ -5658,6 +5659,7 @@ var EnumBadgeColors;
|
|
|
5658
5659
|
EnumBadgeColors["BLUE"] = "sds-semantic-blue";
|
|
5659
5660
|
})(EnumBadgeColors || (EnumBadgeColors = {}));
|
|
5660
5661
|
|
|
5662
|
+
var moment$4 = moment_;
|
|
5661
5663
|
var TableColumnsComponent = /** @class */ (function () {
|
|
5662
5664
|
function TableColumnsComponent(viewContainerRef, translate, hostProjectConfigs) {
|
|
5663
5665
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -5971,6 +5973,7 @@ var TokenListModule = /** @class */ (function () {
|
|
|
5971
5973
|
return TokenListModule;
|
|
5972
5974
|
}());
|
|
5973
5975
|
|
|
5976
|
+
var moment$5 = moment_;
|
|
5974
5977
|
var TablePagingComponent = /** @class */ (function () {
|
|
5975
5978
|
function TablePagingComponent(translate, hostProjectConfigs) {
|
|
5976
5979
|
this.translate = translate;
|
|
@@ -6130,7 +6133,7 @@ var TablePagingComponent = /** @class */ (function () {
|
|
|
6130
6133
|
TablePagingComponent.prototype.getExportFileName = function () {
|
|
6131
6134
|
var _a;
|
|
6132
6135
|
var fileName = (_a = this.exportFileName) !== null && _a !== void 0 ? _a : "download";
|
|
6133
|
-
var currentDate = moment$
|
|
6136
|
+
var currentDate = moment$5(new Date()).format("DD-MM-YYYY[_]HH:mm");
|
|
6134
6137
|
return fileName + "_" + currentDate;
|
|
6135
6138
|
};
|
|
6136
6139
|
TablePagingComponent.prototype.exportCurrentPage = function () {
|
|
@@ -7747,7 +7750,7 @@ var CustomFieldType;
|
|
|
7747
7750
|
CustomFieldType["Any"] = "Any";
|
|
7748
7751
|
CustomFieldType["Enum"] = "Enum";
|
|
7749
7752
|
})(CustomFieldType || (CustomFieldType = {}));
|
|
7750
|
-
var moment$
|
|
7753
|
+
var moment$6 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
7751
7754
|
var CustomFieldsComponent = /** @class */ (function () {
|
|
7752
7755
|
function CustomFieldsComponent(customFieldsService, localeService, sanitizer, translateService, controlContainer) {
|
|
7753
7756
|
this.customFieldsService = customFieldsService;
|
|
@@ -7926,16 +7929,16 @@ var CustomFieldsComponent = /** @class */ (function () {
|
|
|
7926
7929
|
return;
|
|
7927
7930
|
switch (type) {
|
|
7928
7931
|
case FieldType.Date:
|
|
7929
|
-
parsedValues[name] = moment$
|
|
7932
|
+
parsedValues[name] = moment$6(value).toDate();
|
|
7930
7933
|
break;
|
|
7931
7934
|
case FieldType.DateTime:
|
|
7932
|
-
parsedValues[name] = moment$
|
|
7935
|
+
parsedValues[name] = moment$6(value).toDate();
|
|
7933
7936
|
break;
|
|
7934
7937
|
case FieldType.LocalDateTime:
|
|
7935
|
-
parsedValues[name] = moment$
|
|
7938
|
+
parsedValues[name] = moment$6(value, "YYYY-MM-DD[T]HH:mm:ss.SSS").toDate();
|
|
7936
7939
|
break;
|
|
7937
7940
|
case FieldType.Time:
|
|
7938
|
-
parsedValues[name] = moment$
|
|
7941
|
+
parsedValues[name] = moment$6(value, "HH:mm:ss").toDate();
|
|
7939
7942
|
break;
|
|
7940
7943
|
}
|
|
7941
7944
|
});
|
|
@@ -7968,16 +7971,16 @@ var CustomFieldsComponent = /** @class */ (function () {
|
|
|
7968
7971
|
value = new BigNumber(value).toFixed(scale).toString();
|
|
7969
7972
|
break;
|
|
7970
7973
|
case FieldType.Date:
|
|
7971
|
-
value = moment$
|
|
7974
|
+
value = moment$6(value).format("YYYY-MM-DD");
|
|
7972
7975
|
break;
|
|
7973
7976
|
case FieldType.DateTime:
|
|
7974
|
-
value = moment$
|
|
7977
|
+
value = moment$6(value).format();
|
|
7975
7978
|
break;
|
|
7976
7979
|
case FieldType.LocalDateTime:
|
|
7977
|
-
value = moment$
|
|
7980
|
+
value = moment$6(value).format("YYYY-MM-DD[T]HH:mm:ss.SSS");
|
|
7978
7981
|
break;
|
|
7979
7982
|
case FieldType.Time:
|
|
7980
|
-
value = moment$
|
|
7983
|
+
value = moment$6(value).format("HH:mm:ss");
|
|
7981
7984
|
break;
|
|
7982
7985
|
}
|
|
7983
7986
|
}
|
|
@@ -9794,7 +9797,7 @@ var RangeLineComponent = /** @class */ (function () {
|
|
|
9794
9797
|
Component({
|
|
9795
9798
|
selector: "s-range-line",
|
|
9796
9799
|
template: "<div class=\"range-line\">\n <div class=\"range-line__horizontal\"></div>\n <div class=\"range-line__vertical\"></div>\n <div class=\"range-line__horizontal\"></div>\n</div>\n",
|
|
9797
|
-
styles: [".range-line{-ms-flex-item-align:stretch
|
|
9800
|
+
styles: [".range-line{-ms-flex-item-align:stretch;align-self:stretch;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:20px;height:100%}.range-line .range-line__horizontal{background-color:#ccc;height:3px;width:100%}.range-line .range-line__vertical{background-color:#ccc;height:100%;width:3px}s-range-line{background-color:#add8e6}"]
|
|
9798
9801
|
})
|
|
9799
9802
|
], RangeLineComponent);
|
|
9800
9803
|
return RangeLineComponent;
|
|
@@ -11892,6 +11895,10 @@ var WorkspaceSwitchComponent = /** @class */ (function () {
|
|
|
11892
11895
|
WorkspaceSwitchComponent.prototype.onKeydown = function (event) {
|
|
11893
11896
|
if (event.key === "Enter" || event.key === " ") {
|
|
11894
11897
|
if (this.open) {
|
|
11898
|
+
var workspace = this.workspaces[this.selectedItemIndex];
|
|
11899
|
+
if (workspace.disabled) {
|
|
11900
|
+
return;
|
|
11901
|
+
}
|
|
11895
11902
|
this.selectedItemIndex = this.currentItemIndex;
|
|
11896
11903
|
this.selected.emit(this.workspaces[this.selectedItemIndex]);
|
|
11897
11904
|
}
|
|
@@ -11926,6 +11933,9 @@ var WorkspaceSwitchComponent = /** @class */ (function () {
|
|
|
11926
11933
|
this.currentItemIndex = this.selectedItemIndex;
|
|
11927
11934
|
};
|
|
11928
11935
|
WorkspaceSwitchComponent.prototype.onSelectItem = function (workspace) {
|
|
11936
|
+
if (workspace.disabled) {
|
|
11937
|
+
return;
|
|
11938
|
+
}
|
|
11929
11939
|
this.open = false;
|
|
11930
11940
|
this.selectedItemIndex = this.workspaces.indexOf(workspace);
|
|
11931
11941
|
this.currentItemIndex = this.selectedItemIndex;
|
|
@@ -11968,8 +11978,8 @@ var WorkspaceSwitchComponent = /** @class */ (function () {
|
|
|
11968
11978
|
WorkspaceSwitchComponent = __decorate([
|
|
11969
11979
|
Component({
|
|
11970
11980
|
selector: "s-workspace-switch",
|
|
11971
|
-
template: "<div\n class=\"workspace-switch\"\n [ngClass]=\"{ 'workspace-switch--disabled': disabled }\"\n (blur)=\"buttonOnBlur()\">\n <div class=\"button\" (click)=\"open = !open\">\n <div class=\"item\">\n <span class=\"title\">{{ workspaces[selectedItemIndex].title }}</span>\n <span class=\"subtitle\">{{ workspaces[selectedItemIndex].subtitle }}</span>\n </div>\n <div class=\"icons\">\n <span class=\"fas fa-chevron-up\"></span>\n <span class=\"fas fa-chevron-down\"></span>\n </div>\n </div>\n <div *ngIf=\"!disabled && open\" class=\"select\">\n <div\n *ngFor=\"let workspace of workspaces; let i = index\"\n class=\"
|
|
11972
|
-
styles: [".workspace-switch{border-radius:4px;border:1px solid transparent;width:324px}.workspace-switch .button{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-ms-user-select:none;user-select:none}.workspace-switch .button .icons{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;margin:0 12px}.workspace-switch .select{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.25);cursor:pointer;margin:20px 0;padding-top:4px;position:absolute;width:324px}.workspace-switch .select .
|
|
11981
|
+
template: "<div\n class=\"workspace-switch\"\n [ngClass]=\"{ 'workspace-switch--disabled': disabled }\"\n (blur)=\"buttonOnBlur()\">\n <div class=\"button\" (click)=\"open = !open\">\n <div class=\"item\">\n <span class=\"title\">{{ workspaces[selectedItemIndex].title }}</span>\n <span class=\"subtitle\">{{ workspaces[selectedItemIndex].subtitle }}</span>\n </div>\n <div class=\"icons\">\n <span class=\"fas fa-chevron-up\"></span>\n <span class=\"fas fa-chevron-down\"></span>\n </div>\n </div>\n <div *ngIf=\"!disabled && open\" class=\"select\">\n <div\n *ngFor=\"let workspace of workspaces; let i = index\"\n class=\"workspace\"\n [ngClass]=\"{\n 'workspace--focused': i == currentItemIndex && !workspace.disabled,\n 'workspace--disabled': workspace.disabled\n }\"\n (click)=\"onSelectItem(workspace)\">\n <div class=\"item\">\n <span class=\"title\">{{ workspace.title }}</span>\n <span class=\"subtitle\">{{ workspace.subtitle }}</span>\n </div>\n <span *ngIf=\"i === selectedItemIndex\" class=\"active-icon fas fa-check\"></span>\n </div>\n <div *ngIf=\"showFooterButton\" class=\"footer\">\n <div class=\"footer__button\" (click)=\"onFooterButtonClick()\">\n <span class=\"footer__button__icon fas fa-plus\"></span>\n <span class=\"footer__button__title\">{{ footerButtonLabel }}</span>\n </div>\n </div>\n </div>\n</div>",
|
|
11982
|
+
styles: [".workspace-switch{border-radius:4px;border:1px solid transparent;width:324px}.workspace-switch .button{-ms-flex-align:center;align-items:center;background-color:#fff;border:none;border-radius:3px;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:100%}.workspace-switch .button .icons{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;margin:0 12px}.workspace-switch .select{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.25);cursor:pointer;margin:20px 0;padding-top:4px;position:absolute;width:324px}.workspace-switch .select .workspace{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-ms-user-select:none;user-select:none}.workspace-switch .select .workspace .active-icon{color:#7892a1;font-size:12px;margin:0 12px}.workspace-switch .select .workspace--focused{background-color:#f1f7f8}.workspace-switch .select .workspace--disabled .item .subtitle,.workspace-switch .select .workspace--disabled .item .title{color:#c1c1cc}.workspace-switch .select .workspace:hover:not(.workspace--disabled){background-color:#f1f7f8}.workspace-switch .select .footer{border-top:1px solid #ccc;padding:12px}.workspace-switch .select .footer .footer__button{-ms-flex-align:center;align-items:center;border:1px solid #d8d8d8;border-radius:4px;padding:8px 12px;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.workspace-switch .select .footer .footer__button .footer__button__icon{color:#333;margin-right:8px}.workspace-switch .select .footer .footer__button:active{border:1px solid #428bca}.workspace-switch .item{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;padding:12px}.workspace-switch .item .title{color:#333;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:700;line-height:150%;text-transform:uppercase}.workspace-switch .item .subtitle{color:#999;font-family:\"Open Sans\",sans-serif;font-size:12px;font-weight:400;line-height:150%}.workspace-switch:focus{border:1px solid #428bca}.workspace-switch--disabled .button{cursor:default}.workspace-switch--disabled .button .icons,.workspace-switch--disabled .item .subtitle,.workspace-switch--disabled .item .title{color:#ccc}"]
|
|
11973
11983
|
})
|
|
11974
11984
|
], WorkspaceSwitchComponent);
|
|
11975
11985
|
return WorkspaceSwitchComponent;
|