@seniorsistemas/angular-components 17.8.9 → 17.8.11
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 +2108 -1975
- 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/configurations/fields/profile-picture.d.ts +2 -2
- package/components/dynamic-form/dynamic-form.d.ts +1 -0
- package/components/dynamic-form/dynamic-form.directive.d.ts +3 -2
- package/components/index.d.ts +1 -0
- package/components/navigation-button/index.d.ts +3 -0
- package/components/navigation-button/models/navigation-button-item.d.ts +5 -0
- package/components/navigation-button/navigation-button.component.d.ts +27 -0
- package/components/navigation-button/navigation-button.module.d.ts +2 -0
- package/components/profile-picture-picker/index.d.ts +1 -1
- package/esm2015/components/country-phone-picker/country-phone-picker.component.js +1 -1
- package/esm2015/components/dynamic-form/configurations/fields/profile-picture.js +1 -1
- package/esm2015/components/dynamic-form/dynamic-form.directive.js +5 -2
- package/esm2015/components/dynamic-form/dynamic-form.js +23 -4
- package/esm2015/components/index.js +2 -1
- package/esm2015/components/navigation-button/index.js +3 -0
- package/esm2015/components/navigation-button/models/navigation-button-item.js +1 -0
- package/esm2015/components/navigation-button/navigation-button.component.js +95 -0
- package/esm2015/components/navigation-button/navigation-button.module.js +17 -0
- package/esm2015/components/profile-picture-picker/index.js +1 -1
- package/esm2015/seniorsistemas-angular-components.js +14 -14
- package/esm5/components/country-phone-picker/country-phone-picker.component.js +1 -1
- package/esm5/components/dynamic-form/configurations/fields/profile-picture.js +1 -1
- package/esm5/components/dynamic-form/dynamic-form.directive.js +5 -2
- package/esm5/components/dynamic-form/dynamic-form.js +23 -4
- package/esm5/components/index.js +2 -1
- package/esm5/components/navigation-button/index.js +3 -0
- package/esm5/components/navigation-button/models/navigation-button-item.js +1 -0
- package/esm5/components/navigation-button/navigation-button.component.js +100 -0
- package/esm5/components/navigation-button/navigation-button.module.js +20 -0
- package/esm5/components/profile-picture-picker/index.js +1 -1
- package/esm5/seniorsistemas-angular-components.js +14 -14
- package/fesm2015/seniorsistemas-angular-components.js +1956 -1833
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +2087 -1956
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.d.ts +13 -13
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -4112,7 +4112,7 @@ CountryPhonePickerComponent = CountryPhonePickerComponent_1 = __decorate([
|
|
|
4112
4112
|
useExisting: forwardRef(() => CountryPhonePickerComponent_1),
|
|
4113
4113
|
multi: true,
|
|
4114
4114
|
}],
|
|
4115
|
-
styles: [".country-phone-picker .phone-input{background-color:#fff;border:1px solid #d8d8d8;border-radius:4px;display:-ms-flexbox;display:flex;line-height:normal}.country-phone-picker .phone-input .drop{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex}.country-phone-picker .phone-input .drop .drop-flag{margin-left:12px}.country-phone-picker .phone-input .drop .drop-icon{font-size:12px;margin:0 8px}.country-phone-picker .phone-input .phone-ddi{margin:8px 0}.country-phone-picker .phone-input input{border:none;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:150%;margin-left:8px}.country-phone-picker .phone-input input:focus{color:#697882;outline:0}.country-phone-picker .dropdown{background-color:#fff;border-radius:4px;box-shadow:0 4px 5px #00000033;padding:4px 0;position:absolute;margin:2px 0;z-index:999999}.country-phone-picker .dropdown .search{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:8px 12px}.country-phone-picker .dropdown .search .search-field{border:1px solid #d8d8d8;border-radius:4px;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;height:36px;line-height:150%;padding:0 32px 0 8px}.country-phone-picker .dropdown .search .search-icon{color:#333;font-size:12px;position:relative;right:24px}.country-phone-picker .dropdown .search .search-clear{color:#333;cursor:pointer;font-size:1rem}.country-phone-picker .dropdown .select-list{list-style:none;max-height:234px;min-width:360px;max-width:100vw;overflow:scroll;padding:0}.country-phone-picker .dropdown .select-list .select-option{cursor:pointer;display:-ms-flexbox;display:flex;padding:12px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.country-phone-picker .dropdown .select-list .select-option .select-option__flag{margin-right:12px}.country-phone-picker .dropdown .select-list .select-option .select-option__name{margin-right:.5rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.country-phone-picker .dropdown .select-list .select-option .select-option__ddi{color:#697882;font-size:14px;font-family:\"Open Sans\",sans-serif;font-weight:400;line-height:150%}.country-phone-picker .dropdown .select-list .select-option--focused,.country-phone-picker .dropdown .select-list .select-option:hover{background-color:#e5eaea}"]
|
|
4115
|
+
styles: [".country-phone-picker .phone-input{background-color:#fff;border:1px solid #d8d8d8;border-radius:4px;display:-ms-flexbox;display:flex;line-height:normal;overflow:hidden}.country-phone-picker .phone-input .drop{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex}.country-phone-picker .phone-input .drop .drop-flag{margin-left:12px}.country-phone-picker .phone-input .drop .drop-icon{font-size:12px;margin:0 8px}.country-phone-picker .phone-input .phone-ddi{margin:8px 0}.country-phone-picker .phone-input input{border:none;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:150%;margin-left:8px}.country-phone-picker .phone-input input:focus{color:#697882;outline:0}.country-phone-picker .dropdown{background-color:#fff;border-radius:4px;box-shadow:0 4px 5px #00000033;padding:4px 0;position:absolute;margin:2px 0;z-index:999999}.country-phone-picker .dropdown .search{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:8px 12px}.country-phone-picker .dropdown .search .search-field{border:1px solid #d8d8d8;border-radius:4px;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;height:36px;line-height:150%;padding:0 32px 0 8px}.country-phone-picker .dropdown .search .search-icon{color:#333;font-size:12px;position:relative;right:24px}.country-phone-picker .dropdown .search .search-clear{color:#333;cursor:pointer;font-size:1rem}.country-phone-picker .dropdown .select-list{list-style:none;max-height:234px;min-width:360px;max-width:100vw;overflow:scroll;padding:0}.country-phone-picker .dropdown .select-list .select-option{cursor:pointer;display:-ms-flexbox;display:flex;padding:12px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.country-phone-picker .dropdown .select-list .select-option .select-option__flag{margin-right:12px}.country-phone-picker .dropdown .select-list .select-option .select-option__name{margin-right:.5rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.country-phone-picker .dropdown .select-list .select-option .select-option__ddi{color:#697882;font-size:14px;font-family:\"Open Sans\",sans-serif;font-weight:400;line-height:150%}.country-phone-picker .dropdown .select-list .select-option--focused,.country-phone-picker .dropdown .select-list .select-option:hover{background-color:#e5eaea}"]
|
|
4116
4116
|
})
|
|
4117
4117
|
], CountryPhonePickerComponent);
|
|
4118
4118
|
|
|
@@ -9275,10 +9275,29 @@ class DynamicField extends DynamicForm {
|
|
|
9275
9275
|
component.instance.field = this.field;
|
|
9276
9276
|
// Must be this way because some teams use name like "e070emp.codemp"
|
|
9277
9277
|
component.instance.formControl = this.group["controls"][this.field.name];
|
|
9278
|
+
this._switchEmptyStringToNull(component);
|
|
9278
9279
|
component.instance.errorMessages = this.errorMessages;
|
|
9279
9280
|
this.setVariablesByType(component);
|
|
9280
9281
|
return component;
|
|
9281
9282
|
}
|
|
9283
|
+
_switchEmptyStringToNull(component) {
|
|
9284
|
+
switch (component.instance.field.type) {
|
|
9285
|
+
case FieldType.Password:
|
|
9286
|
+
case FieldType.String:
|
|
9287
|
+
case FieldType.Text:
|
|
9288
|
+
case FieldType.TextIA:
|
|
9289
|
+
const valueChanges$ = component.instance.formControl.valueChanges
|
|
9290
|
+
.subscribe((value) => {
|
|
9291
|
+
if (value === "") {
|
|
9292
|
+
component.instance.formControl.setValue(null, { emitEvent: false });
|
|
9293
|
+
}
|
|
9294
|
+
});
|
|
9295
|
+
component.onDestroy(() => {
|
|
9296
|
+
valueChanges$.unsubscribe();
|
|
9297
|
+
});
|
|
9298
|
+
return;
|
|
9299
|
+
}
|
|
9300
|
+
}
|
|
9282
9301
|
setVariablesByType(component) {
|
|
9283
9302
|
if (this.field.type == FieldType.Time) {
|
|
9284
9303
|
component.instance.timeOnly = true;
|
|
@@ -9447,6 +9466,9 @@ let DynamicFormDirective = class DynamicFormDirective {
|
|
|
9447
9466
|
this.component.instance.errorMessages = this.errorMessages;
|
|
9448
9467
|
}
|
|
9449
9468
|
}
|
|
9469
|
+
ngOnDestroy() {
|
|
9470
|
+
this.component.destroy();
|
|
9471
|
+
}
|
|
9450
9472
|
isField() {
|
|
9451
9473
|
return FieldType[this.config.type];
|
|
9452
9474
|
}
|
|
@@ -13764,2192 +13786,2293 @@ KanbanModule = __decorate([
|
|
|
13764
13786
|
})
|
|
13765
13787
|
], KanbanModule);
|
|
13766
13788
|
|
|
13767
|
-
var
|
|
13768
|
-
let
|
|
13789
|
+
var NavigationButtonComponent_1;
|
|
13790
|
+
let NavigationButtonComponent = NavigationButtonComponent_1 = class NavigationButtonComponent {
|
|
13769
13791
|
constructor() {
|
|
13770
|
-
this.
|
|
13771
|
-
this.
|
|
13792
|
+
this.stepChanged = new EventEmitter();
|
|
13793
|
+
this.currentIndex = 0;
|
|
13794
|
+
this.isDisabled = false;
|
|
13795
|
+
this.tieredMenuItems = [];
|
|
13796
|
+
}
|
|
13797
|
+
ngOnInit() {
|
|
13798
|
+
const index = this.steps.findIndex((step) => step.value === this._value);
|
|
13799
|
+
this.currentIndex = index !== -1 ? index : 0;
|
|
13800
|
+
this.stepChanged.emit({
|
|
13801
|
+
previous: undefined,
|
|
13802
|
+
current: this.steps[this.currentIndex],
|
|
13803
|
+
});
|
|
13804
|
+
this._createTieredMenuItems();
|
|
13805
|
+
}
|
|
13806
|
+
writeValue(value) {
|
|
13807
|
+
this._value = value;
|
|
13808
|
+
const index = this.steps.findIndex((step) => step.value === this._value);
|
|
13809
|
+
this.currentIndex = index !== -1 ? index : 0;
|
|
13810
|
+
}
|
|
13811
|
+
registerOnChange(onChange) {
|
|
13812
|
+
this._onChange = onChange;
|
|
13813
|
+
}
|
|
13814
|
+
registerOnTouched(onTouched) {
|
|
13815
|
+
this._onTouched = onTouched;
|
|
13816
|
+
}
|
|
13817
|
+
setDisabledState(isDisabled) {
|
|
13818
|
+
this.isDisabled = isDisabled;
|
|
13819
|
+
}
|
|
13820
|
+
onNext() {
|
|
13821
|
+
if (this.isDisabled)
|
|
13822
|
+
return;
|
|
13823
|
+
const previous = this.steps[this.currentIndex];
|
|
13824
|
+
if (this.currentIndex < this.steps.length - 1) {
|
|
13825
|
+
this.currentIndex++;
|
|
13826
|
+
}
|
|
13827
|
+
const current = this.steps[this.currentIndex];
|
|
13828
|
+
this._onTouched && this._onTouched();
|
|
13829
|
+
this._onChange && this._onChange(current.value);
|
|
13830
|
+
this.stepChanged.emit({ previous, current });
|
|
13831
|
+
}
|
|
13832
|
+
onPrevious() {
|
|
13833
|
+
if (this.isDisabled)
|
|
13834
|
+
return;
|
|
13835
|
+
const previous = this.steps[this.currentIndex];
|
|
13836
|
+
if (this.currentIndex > 0) {
|
|
13837
|
+
this.currentIndex--;
|
|
13838
|
+
}
|
|
13839
|
+
const current = this.steps[this.currentIndex];
|
|
13840
|
+
this._onTouched && this._onTouched();
|
|
13841
|
+
this._onChange && this._onChange(current.value);
|
|
13842
|
+
this.stepChanged.emit({ previous, current });
|
|
13843
|
+
}
|
|
13844
|
+
_createTieredMenuItems() {
|
|
13845
|
+
this.steps.forEach((step) => {
|
|
13846
|
+
this.tieredMenuItems.push({
|
|
13847
|
+
label: step.label,
|
|
13848
|
+
command: () => this.currentIndex = this.steps.findIndex(s => s === step),
|
|
13849
|
+
});
|
|
13850
|
+
});
|
|
13772
13851
|
}
|
|
13773
13852
|
};
|
|
13774
|
-
ObjectCardFieldComponent.nextId = 0;
|
|
13775
|
-
__decorate([
|
|
13776
|
-
Input()
|
|
13777
|
-
], ObjectCardFieldComponent.prototype, "id", void 0);
|
|
13778
|
-
__decorate([
|
|
13779
|
-
Input()
|
|
13780
|
-
], ObjectCardFieldComponent.prototype, "imageSource", void 0);
|
|
13781
|
-
__decorate([
|
|
13782
|
-
Input()
|
|
13783
|
-
], ObjectCardFieldComponent.prototype, "imageAlt", void 0);
|
|
13784
|
-
__decorate([
|
|
13785
|
-
Input()
|
|
13786
|
-
], ObjectCardFieldComponent.prototype, "iconClass", void 0);
|
|
13787
|
-
__decorate([
|
|
13788
|
-
Input()
|
|
13789
|
-
], ObjectCardFieldComponent.prototype, "label", void 0);
|
|
13790
13853
|
__decorate([
|
|
13791
13854
|
Input()
|
|
13792
|
-
],
|
|
13855
|
+
], NavigationButtonComponent.prototype, "steps", void 0);
|
|
13793
13856
|
__decorate([
|
|
13794
13857
|
Input()
|
|
13795
|
-
],
|
|
13858
|
+
], NavigationButtonComponent.prototype, "defaultValue", void 0);
|
|
13796
13859
|
__decorate([
|
|
13797
13860
|
Input()
|
|
13798
|
-
],
|
|
13861
|
+
], NavigationButtonComponent.prototype, "tooltip", void 0);
|
|
13799
13862
|
__decorate([
|
|
13800
13863
|
Output()
|
|
13801
|
-
],
|
|
13802
|
-
__decorate([
|
|
13803
|
-
ContentChild(ThumbnailComponent, { static: true })
|
|
13804
|
-
], ObjectCardFieldComponent.prototype, "thumbnailComponent", void 0);
|
|
13805
|
-
__decorate([
|
|
13806
|
-
ViewChild(TemplateRef, { static: true })
|
|
13807
|
-
], ObjectCardFieldComponent.prototype, "content", void 0);
|
|
13808
|
-
ObjectCardFieldComponent = ObjectCardFieldComponent_1 = __decorate([
|
|
13864
|
+
], NavigationButtonComponent.prototype, "stepChanged", void 0);
|
|
13865
|
+
NavigationButtonComponent = NavigationButtonComponent_1 = __decorate([
|
|
13809
13866
|
Component({
|
|
13810
|
-
selector: "s-
|
|
13811
|
-
template: "<
|
|
13812
|
-
|
|
13867
|
+
selector: "s-navigation-button",
|
|
13868
|
+
template: "<div class=\"navigation-button\" [ngClass]=\"{ 'navigation-button--disabled': isDisabled}\">\n <button\n class=\"option option--previous\"\n [ngClass]=\"{ 'option--disabled': currentIndex === 0 }\"\n (click)=\"onPrevious()\">\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n\n <ng-container *ngIf=\"steps[currentIndex].tooltip || tooltip; then tooltipBlock; else noTooltipBlock\"></ng-container>\n\n <ng-template #tooltipBlock>\n <button\n [sTooltip]=\"steps[currentIndex].tooltip || tooltip\"\n class=\"step\"\n sTieredMenu [items]=\"tieredMenuItems\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <ng-template #noTooltipBlock>\n <button class=\"step\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <button\n class=\"option option--next\"\n [ngClass]=\"{ 'option--disabled': currentIndex === steps.length - 1 }\"\n (click)=\"onNext()\">\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n</div>\n",
|
|
13869
|
+
providers: [
|
|
13870
|
+
{
|
|
13871
|
+
provide: NG_VALUE_ACCESSOR,
|
|
13872
|
+
useExisting: forwardRef(() => NavigationButtonComponent_1),
|
|
13873
|
+
multi: true,
|
|
13874
|
+
},
|
|
13875
|
+
],
|
|
13876
|
+
styles: [".navigation-button{display:-ms-inline-flexbox;display:inline-flex}.navigation-button .option,.navigation-button .step{background-color:#428bca;border:none;color:#fff}.navigation-button:not(.navigation-button--disabled) .step{cursor:pointer}.navigation-button:not(.navigation-button--disabled) .step:hover{background-color:#063951}.navigation-button .option{padding:8px 12px}.navigation-button .option--previous{border-radius:16px 0 0 16px}.navigation-button .option--next{border-radius:0 16px 16px 0}.navigation-button .option--disabled{opacity:.5}.navigation-button .option:not(.option--disabled):hover{cursor:pointer;background-color:#063951}.navigation-button .step{font-family:\"Open Sans\",sans-serif;font-size:14px;padding:8px 16px;text-align:center}.navigation-button--disabled{opacity:.5}"]
|
|
13813
13877
|
})
|
|
13814
|
-
],
|
|
13878
|
+
], NavigationButtonComponent);
|
|
13815
13879
|
|
|
13816
|
-
|
|
13817
|
-
|
|
13880
|
+
let TieredMenuDividerComponent = class TieredMenuDividerComponent {
|
|
13881
|
+
};
|
|
13882
|
+
TieredMenuDividerComponent = __decorate([
|
|
13883
|
+
Component({
|
|
13884
|
+
selector: "s-tiered-menu-divider",
|
|
13885
|
+
template: "<div class=\"divider\"></div>",
|
|
13886
|
+
styles: [".divider{margin:2px 0;height:1px;background-color:#ccc}"]
|
|
13887
|
+
})
|
|
13888
|
+
], TieredMenuDividerComponent);
|
|
13889
|
+
|
|
13890
|
+
let TieredMenuEventService = class TieredMenuEventService {
|
|
13818
13891
|
constructor() {
|
|
13819
|
-
this.
|
|
13820
|
-
this.
|
|
13821
|
-
this.
|
|
13822
|
-
this.
|
|
13823
|
-
this.
|
|
13824
|
-
this.
|
|
13825
|
-
this.
|
|
13826
|
-
}
|
|
13827
|
-
set thumbnailSize(value) {
|
|
13828
|
-
this._thumbnailSize = value;
|
|
13829
|
-
if (this.thumbnailComponent)
|
|
13830
|
-
this.thumbnailComponent.size = value;
|
|
13892
|
+
this.incrementCurrentItemEvent = new EventEmitter();
|
|
13893
|
+
this.decrementCurrentItemEvent = new EventEmitter();
|
|
13894
|
+
this.closeAllMenusEvent = new EventEmitter();
|
|
13895
|
+
this.selectItemEvent = new EventEmitter();
|
|
13896
|
+
this.openItemMenuEvent = new EventEmitter();
|
|
13897
|
+
this.closeItemMenuEvent = new EventEmitter();
|
|
13898
|
+
this.createMenuEvent = new EventEmitter();
|
|
13831
13899
|
}
|
|
13832
|
-
|
|
13833
|
-
|
|
13900
|
+
};
|
|
13901
|
+
TieredMenuEventService = __decorate([
|
|
13902
|
+
Injectable()
|
|
13903
|
+
], TieredMenuEventService);
|
|
13904
|
+
|
|
13905
|
+
let TieredMenuItemComponent = class TieredMenuItemComponent {
|
|
13906
|
+
constructor(_tieredMenuEventService) {
|
|
13907
|
+
this._tieredMenuEventService = _tieredMenuEventService;
|
|
13908
|
+
this.focused = false;
|
|
13909
|
+
this.highlight = false;
|
|
13910
|
+
this.triggerEvent = "click";
|
|
13911
|
+
this.closeOnClick = false;
|
|
13834
13912
|
}
|
|
13835
|
-
|
|
13836
|
-
this.
|
|
13913
|
+
onClick() {
|
|
13914
|
+
if (this.item.disabled)
|
|
13915
|
+
return;
|
|
13916
|
+
if (this.item.submenu) {
|
|
13917
|
+
if (!this.item.isOpen) {
|
|
13918
|
+
this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
|
|
13919
|
+
}
|
|
13920
|
+
else if (this.closeOnClick) {
|
|
13921
|
+
this._tieredMenuEventService.closeItemMenuEvent.emit(this.item);
|
|
13922
|
+
}
|
|
13923
|
+
}
|
|
13924
|
+
else {
|
|
13925
|
+
this._tieredMenuEventService.selectItemEvent.emit(this.item);
|
|
13926
|
+
}
|
|
13837
13927
|
}
|
|
13838
|
-
|
|
13839
|
-
this.
|
|
13928
|
+
onMouseEnter() {
|
|
13929
|
+
if (this.item.disabled)
|
|
13930
|
+
return;
|
|
13931
|
+
if (this.triggerEvent === "hover" && !this.item.isOpen) {
|
|
13932
|
+
this._showTimeout = window.setTimeout(() => {
|
|
13933
|
+
this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
|
|
13934
|
+
}, 300);
|
|
13935
|
+
}
|
|
13840
13936
|
}
|
|
13841
|
-
|
|
13842
|
-
|
|
13843
|
-
if (windowWidth <= Breakpoints.SM_MAX)
|
|
13844
|
-
this.thumbnailSize = ThumbnailSize.Small;
|
|
13845
|
-
else
|
|
13846
|
-
this.thumbnailSize = ThumbnailSize.Medium;
|
|
13937
|
+
onMouseLeave() {
|
|
13938
|
+
window.clearTimeout(this._showTimeout);
|
|
13847
13939
|
}
|
|
13848
13940
|
};
|
|
13849
|
-
|
|
13850
|
-
|
|
13851
|
-
|
|
13852
|
-
], ObjectCardMainComponent.prototype, "id", void 0);
|
|
13853
|
-
__decorate([
|
|
13854
|
-
Input()
|
|
13855
|
-
], ObjectCardMainComponent.prototype, "imageSource", void 0);
|
|
13856
|
-
__decorate([
|
|
13857
|
-
Input()
|
|
13858
|
-
], ObjectCardMainComponent.prototype, "imageFallback", void 0);
|
|
13859
|
-
__decorate([
|
|
13860
|
-
Input()
|
|
13861
|
-
], ObjectCardMainComponent.prototype, "imageAlt", void 0);
|
|
13862
|
-
__decorate([
|
|
13863
|
-
Input()
|
|
13864
|
-
], ObjectCardMainComponent.prototype, "iconClass", void 0);
|
|
13865
|
-
__decorate([
|
|
13866
|
-
Input()
|
|
13867
|
-
], ObjectCardMainComponent.prototype, "hasThumbnail", void 0);
|
|
13868
|
-
__decorate([
|
|
13869
|
-
Input()
|
|
13870
|
-
], ObjectCardMainComponent.prototype, "hasDescription", void 0);
|
|
13941
|
+
TieredMenuItemComponent.ctorParameters = () => [
|
|
13942
|
+
{ type: TieredMenuEventService }
|
|
13943
|
+
];
|
|
13871
13944
|
__decorate([
|
|
13872
13945
|
Input()
|
|
13873
|
-
],
|
|
13946
|
+
], TieredMenuItemComponent.prototype, "item", void 0);
|
|
13874
13947
|
__decorate([
|
|
13875
13948
|
Input()
|
|
13876
|
-
],
|
|
13949
|
+
], TieredMenuItemComponent.prototype, "focused", void 0);
|
|
13877
13950
|
__decorate([
|
|
13878
13951
|
Input()
|
|
13879
|
-
],
|
|
13952
|
+
], TieredMenuItemComponent.prototype, "highlight", void 0);
|
|
13880
13953
|
__decorate([
|
|
13881
13954
|
Input()
|
|
13882
|
-
],
|
|
13955
|
+
], TieredMenuItemComponent.prototype, "triggerEvent", void 0);
|
|
13883
13956
|
__decorate([
|
|
13884
13957
|
Input()
|
|
13885
|
-
],
|
|
13958
|
+
], TieredMenuItemComponent.prototype, "closeOnClick", void 0);
|
|
13886
13959
|
__decorate([
|
|
13887
|
-
|
|
13888
|
-
|
|
13960
|
+
HostListener("click"),
|
|
13961
|
+
HostListener("touchend")
|
|
13962
|
+
], TieredMenuItemComponent.prototype, "onClick", null);
|
|
13889
13963
|
__decorate([
|
|
13890
|
-
|
|
13891
|
-
],
|
|
13964
|
+
HostListener("mouseenter")
|
|
13965
|
+
], TieredMenuItemComponent.prototype, "onMouseEnter", null);
|
|
13892
13966
|
__decorate([
|
|
13893
|
-
HostListener("
|
|
13894
|
-
],
|
|
13895
|
-
|
|
13967
|
+
HostListener("mouseleave")
|
|
13968
|
+
], TieredMenuItemComponent.prototype, "onMouseLeave", null);
|
|
13969
|
+
TieredMenuItemComponent = __decorate([
|
|
13896
13970
|
Component({
|
|
13897
|
-
selector: "s-
|
|
13898
|
-
template: "<
|
|
13899
|
-
styles: ["
|
|
13971
|
+
selector: "s-tiered-menu-item",
|
|
13972
|
+
template: "<div\n [id]=\"item.id\"\n class=\"tiered-menu-item\"\n [ngClass]=\"{\n 'tiered-menu-item--open': item.isOpen,\n 'tiered-menu-item--focused': focused,\n 'tiered-menu-item--disabled': item.disabled\n }\">\n <div class=\"tiered-menu-item-content\">\n <span class=\"icon\" [ngClass]=\"item.iconClass\"></span>\n <span class=\"label\">{{ item.label }}</span>\n </div>\n <span\n *ngIf=\"item.submenu\"\n class=\"submenu-icon\"\n [ngClass]=\"{\n 'fas': true,\n 'fa-chevron-left': item.isOpen,\n 'fa-chevron-right': !item.isOpen\n }\">\n </span>\n</div>",
|
|
13973
|
+
styles: [".tiered-menu-item{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:8px 16px;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.tiered-menu-item .tiered-menu-item-content .label{margin:0 12px}.tiered-menu-item:hover{background-color:#e9e6e6}.tiered-menu-item--focused{background-color:#ccc!important}.tiered-menu-item--open{background-color:#e4e2e2}.tiered-menu-item--disabled{opacity:50%;cursor:default}"]
|
|
13900
13974
|
})
|
|
13901
|
-
],
|
|
13902
|
-
|
|
13903
|
-
var EnumSeverity;
|
|
13904
|
-
(function (EnumSeverity) {
|
|
13905
|
-
EnumSeverity["Default"] = "Default";
|
|
13906
|
-
EnumSeverity["Info"] = "Info";
|
|
13907
|
-
EnumSeverity["Warn"] = "Warn";
|
|
13908
|
-
EnumSeverity["Error"] = "Error";
|
|
13909
|
-
EnumSeverity["Success"] = "Success";
|
|
13910
|
-
})(EnumSeverity || (EnumSeverity = {}));
|
|
13975
|
+
], TieredMenuItemComponent);
|
|
13911
13976
|
|
|
13912
|
-
|
|
13913
|
-
|
|
13914
|
-
|
|
13915
|
-
|
|
13916
|
-
this.cdr = cdr;
|
|
13917
|
-
this.elementRef = elementRef;
|
|
13918
|
-
this.id = `s-object-card-${ObjectCardComponent_1.nextId++}`;
|
|
13919
|
-
this.expanded = false;
|
|
13920
|
-
this.expandTooltip = "Abrir painel";
|
|
13921
|
-
this.collapseTooltip = "Fechar painel";
|
|
13922
|
-
this.fieldsMinWidth = 200;
|
|
13923
|
-
this.expandedChange = new EventEmitter();
|
|
13924
|
-
this.maxVisibleFields = 0;
|
|
13925
|
-
this.severity = EnumSeverity.Default;
|
|
13926
|
-
this.EnumSeverity = EnumSeverity;
|
|
13977
|
+
let TieredMenuService = class TieredMenuService {
|
|
13978
|
+
constructor() {
|
|
13979
|
+
this.currentItems = [];
|
|
13980
|
+
this.items = [];
|
|
13927
13981
|
}
|
|
13928
|
-
|
|
13929
|
-
|
|
13930
|
-
|
|
13931
|
-
|
|
13932
|
-
|
|
13982
|
+
normalizeData(items, parent) {
|
|
13983
|
+
return items.map((i) => {
|
|
13984
|
+
const item = Object.assign({ visible: true }, i);
|
|
13985
|
+
if (item.submenu) {
|
|
13986
|
+
item.submenu = this.normalizeData(item.submenu, item);
|
|
13987
|
+
}
|
|
13988
|
+
item.id = this._generateId();
|
|
13989
|
+
item.parent = parent;
|
|
13990
|
+
item.isOpen = false;
|
|
13991
|
+
return item;
|
|
13933
13992
|
});
|
|
13934
|
-
|
|
13935
|
-
|
|
13993
|
+
}
|
|
13994
|
+
markAllItemsAsClosed(items) {
|
|
13995
|
+
return items.map((i) => {
|
|
13996
|
+
const item = Object.assign({}, i);
|
|
13997
|
+
if (item.submenu) {
|
|
13998
|
+
item.submenu = this.markAllItemsAsClosed(item.submenu);
|
|
13999
|
+
}
|
|
14000
|
+
item.isOpen = false;
|
|
14001
|
+
return item;
|
|
13936
14002
|
});
|
|
13937
|
-
erd.listenTo(this.elementRef.nativeElement, () => this.update());
|
|
13938
14003
|
}
|
|
13939
|
-
|
|
13940
|
-
|
|
13941
|
-
|
|
13942
|
-
|
|
13943
|
-
|
|
13944
|
-
|
|
13945
|
-
|
|
13946
|
-
for (const element of fieldElementList) {
|
|
13947
|
-
element.style.minWidth = `${this.fieldsMinWidth}px`;
|
|
14004
|
+
searchTheHierarchy(itemA, itemB) {
|
|
14005
|
+
let item = itemB;
|
|
14006
|
+
while (item) {
|
|
14007
|
+
if (item === itemA) {
|
|
14008
|
+
return true;
|
|
14009
|
+
}
|
|
14010
|
+
item = item.parent;
|
|
13948
14011
|
}
|
|
13949
|
-
|
|
13950
|
-
|
|
13951
|
-
|
|
13952
|
-
|
|
13953
|
-
|
|
13954
|
-
|
|
13955
|
-
|
|
14012
|
+
return false;
|
|
14013
|
+
}
|
|
14014
|
+
cloneItems(items) {
|
|
14015
|
+
return JSON.parse(JSON.stringify(items));
|
|
14016
|
+
}
|
|
14017
|
+
_generateId() {
|
|
14018
|
+
return `id-${Math.random().toString(36).substring(2, 9)}-${Math.random().toString(36).substring(2, 9)}-${Math.random().toString(36).substring(2, 9)}`;
|
|
14019
|
+
}
|
|
14020
|
+
};
|
|
14021
|
+
TieredMenuService = __decorate([
|
|
14022
|
+
Injectable()
|
|
14023
|
+
], TieredMenuService);
|
|
14024
|
+
|
|
14025
|
+
let TieredMenuNestedComponent = class TieredMenuNestedComponent {
|
|
14026
|
+
constructor(tieredMenuService, _tieredMenuEventService) {
|
|
14027
|
+
this.tieredMenuService = tieredMenuService;
|
|
14028
|
+
this._tieredMenuEventService = _tieredMenuEventService;
|
|
14029
|
+
this.top = 0;
|
|
14030
|
+
this.left = 0;
|
|
14031
|
+
this._unsubscribe$ = new Subject();
|
|
14032
|
+
}
|
|
14033
|
+
onResize() {
|
|
14034
|
+
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
14035
|
+
}
|
|
14036
|
+
onDocumentClick(event) {
|
|
14037
|
+
// Closing menu when clicked outside.
|
|
14038
|
+
const target = event.target;
|
|
14039
|
+
const clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
|
|
14040
|
+
if (!clickedInside) {
|
|
14041
|
+
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
13956
14042
|
}
|
|
13957
|
-
this.maxVisibleFields = maxFieldQtd;
|
|
13958
|
-
if (maxFieldQtd >= this.fields.length && this.expanded)
|
|
13959
|
-
this.collapse();
|
|
13960
14043
|
}
|
|
13961
|
-
|
|
13962
|
-
|
|
14044
|
+
onKeydownHandler(event) {
|
|
14045
|
+
switch (event.key) {
|
|
14046
|
+
case "Escape":
|
|
14047
|
+
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
14048
|
+
break;
|
|
14049
|
+
case " ":
|
|
14050
|
+
case "Enter":
|
|
14051
|
+
this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
|
|
14052
|
+
break;
|
|
14053
|
+
case "ArrowLeft":
|
|
14054
|
+
// When nested I need a reference to the current item's parent item, otherwise just the current item.
|
|
14055
|
+
this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem.parent);
|
|
14056
|
+
break;
|
|
14057
|
+
case "ArrowRight":
|
|
14058
|
+
this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
|
|
14059
|
+
break;
|
|
14060
|
+
case "ArrowUp":
|
|
14061
|
+
this._tieredMenuEventService.decrementCurrentItemEvent.emit();
|
|
14062
|
+
break;
|
|
14063
|
+
case "ArrowDown":
|
|
14064
|
+
this._tieredMenuEventService.incrementCurrentItemEvent.emit();
|
|
14065
|
+
break;
|
|
14066
|
+
}
|
|
13963
14067
|
}
|
|
13964
|
-
|
|
13965
|
-
this.
|
|
13966
|
-
this.
|
|
14068
|
+
ngOnInit() {
|
|
14069
|
+
this.tieredMenuService.currentItems = this.items;
|
|
14070
|
+
this._subscribeEvents();
|
|
13967
14071
|
}
|
|
13968
|
-
|
|
13969
|
-
this.
|
|
13970
|
-
this.
|
|
14072
|
+
ngOnDestroy() {
|
|
14073
|
+
this._unsubscribe$.next();
|
|
14074
|
+
this._unsubscribe$.complete();
|
|
13971
14075
|
}
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
|
|
13977
|
-
|
|
13978
|
-
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
else
|
|
13982
|
-
|
|
13983
|
-
|
|
14076
|
+
_incrementCurItem() {
|
|
14077
|
+
if (!this.tieredMenuService.currentItem) {
|
|
14078
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
|
|
14079
|
+
return;
|
|
14080
|
+
}
|
|
14081
|
+
const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
|
|
14082
|
+
if (curIndex < this.tieredMenuService.currentItems.length) {
|
|
14083
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
|
|
14084
|
+
}
|
|
14085
|
+
else {
|
|
14086
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
|
|
14087
|
+
}
|
|
14088
|
+
if (this.tieredMenuService.currentItem.divider) {
|
|
14089
|
+
this._incrementCurItem();
|
|
14090
|
+
}
|
|
14091
|
+
}
|
|
14092
|
+
_decrementCurItem() {
|
|
14093
|
+
if (!this.tieredMenuService.currentItem) {
|
|
14094
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
|
|
14095
|
+
return;
|
|
14096
|
+
}
|
|
14097
|
+
const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
|
|
14098
|
+
if (curIndex >= 0) {
|
|
14099
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
|
|
14100
|
+
}
|
|
14101
|
+
else {
|
|
14102
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
|
|
14103
|
+
}
|
|
14104
|
+
if (this.tieredMenuService.currentItem.divider) {
|
|
14105
|
+
this._decrementCurItem();
|
|
14106
|
+
}
|
|
14107
|
+
}
|
|
14108
|
+
_closeItem(item) {
|
|
14109
|
+
var _a;
|
|
14110
|
+
let itemAux = this._lastOpenItem;
|
|
14111
|
+
while (itemAux && itemAux != item) {
|
|
14112
|
+
itemAux.isOpen = false;
|
|
14113
|
+
itemAux = itemAux.parent;
|
|
14114
|
+
}
|
|
14115
|
+
item.isOpen = false;
|
|
14116
|
+
this.tieredMenuService.currentItem = itemAux !== null && itemAux !== void 0 ? itemAux : this.tieredMenuService.items[0];
|
|
14117
|
+
this.tieredMenuService.currentItems = ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.submenu) || this.tieredMenuService.items;
|
|
14118
|
+
}
|
|
14119
|
+
_openItem(item) {
|
|
14120
|
+
if (item === null || item === void 0 ? void 0 : item.submenu) {
|
|
14121
|
+
item.isOpen = true;
|
|
14122
|
+
this.tieredMenuService.currentItems = item.submenu;
|
|
14123
|
+
// Only has focus if there has already been interaction.
|
|
14124
|
+
if (this.tieredMenuService.currentItem) {
|
|
14125
|
+
this.tieredMenuService.currentItem = item.submenu[0];
|
|
14126
|
+
}
|
|
14127
|
+
this._lastOpenItem = item;
|
|
14128
|
+
}
|
|
14129
|
+
}
|
|
14130
|
+
_subscribeEvents() {
|
|
14131
|
+
this._tieredMenuEventService.incrementCurrentItemEvent
|
|
14132
|
+
.pipe(takeUntil(this._unsubscribe$))
|
|
14133
|
+
.subscribe(() => {
|
|
14134
|
+
this._incrementCurItem();
|
|
14135
|
+
});
|
|
14136
|
+
this._tieredMenuEventService.decrementCurrentItemEvent
|
|
14137
|
+
.pipe(takeUntil(this._unsubscribe$))
|
|
14138
|
+
.subscribe(() => {
|
|
14139
|
+
this._decrementCurItem();
|
|
14140
|
+
});
|
|
14141
|
+
this._tieredMenuEventService.selectItemEvent
|
|
14142
|
+
.pipe(takeUntil(this._unsubscribe$))
|
|
14143
|
+
.subscribe((item) => {
|
|
14144
|
+
if (item.command) {
|
|
14145
|
+
item.command();
|
|
14146
|
+
// Close all menus after the item was selected.
|
|
14147
|
+
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
14148
|
+
}
|
|
14149
|
+
});
|
|
14150
|
+
this._tieredMenuEventService.openItemMenuEvent
|
|
14151
|
+
.pipe(takeUntil(this._unsubscribe$))
|
|
14152
|
+
.subscribe((item) => {
|
|
14153
|
+
var _a, _b;
|
|
14154
|
+
if (!this.tieredMenuService.currentItems.includes(item)) {
|
|
14155
|
+
let itemAux = this._lastOpenItem;
|
|
14156
|
+
while ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.parent) {
|
|
14157
|
+
itemAux = itemAux.parent;
|
|
14158
|
+
}
|
|
14159
|
+
this._tieredMenuEventService.closeItemMenuEvent.emit((_b = itemAux.parent) !== null && _b !== void 0 ? _b : itemAux);
|
|
14160
|
+
}
|
|
14161
|
+
this._lastOpenItem = item;
|
|
14162
|
+
this._openItem(item);
|
|
14163
|
+
});
|
|
14164
|
+
this._tieredMenuEventService.closeItemMenuEvent
|
|
14165
|
+
.pipe(takeUntil(this._unsubscribe$))
|
|
14166
|
+
.subscribe((item) => {
|
|
14167
|
+
if (item) {
|
|
14168
|
+
this._closeItem(item);
|
|
14169
|
+
}
|
|
14170
|
+
});
|
|
13984
14171
|
}
|
|
13985
14172
|
};
|
|
13986
|
-
|
|
13987
|
-
|
|
13988
|
-
{ type:
|
|
13989
|
-
{ type: ElementRef }
|
|
14173
|
+
TieredMenuNestedComponent.ctorParameters = () => [
|
|
14174
|
+
{ type: TieredMenuService },
|
|
14175
|
+
{ type: TieredMenuEventService }
|
|
13990
14176
|
];
|
|
13991
14177
|
__decorate([
|
|
13992
|
-
|
|
13993
|
-
],
|
|
13994
|
-
__decorate([
|
|
13995
|
-
Input()
|
|
13996
|
-
], ObjectCardComponent.prototype, "expanded", void 0);
|
|
13997
|
-
__decorate([
|
|
13998
|
-
Input()
|
|
13999
|
-
], ObjectCardComponent.prototype, "expandTooltip", void 0);
|
|
14000
|
-
__decorate([
|
|
14001
|
-
Input()
|
|
14002
|
-
], ObjectCardComponent.prototype, "collapseTooltip", void 0);
|
|
14003
|
-
__decorate([
|
|
14004
|
-
Input()
|
|
14005
|
-
], ObjectCardComponent.prototype, "fieldsMinWidth", void 0);
|
|
14006
|
-
__decorate([
|
|
14007
|
-
Output()
|
|
14008
|
-
], ObjectCardComponent.prototype, "expandedChange", void 0);
|
|
14009
|
-
__decorate([
|
|
14010
|
-
ContentChild(ObjectCardMainComponent, { static: true })
|
|
14011
|
-
], ObjectCardComponent.prototype, "main", void 0);
|
|
14012
|
-
__decorate([
|
|
14013
|
-
ContentChildren(ObjectCardFieldComponent, { descendants: true })
|
|
14014
|
-
], ObjectCardComponent.prototype, "fields", void 0);
|
|
14178
|
+
HostListener("window:resize")
|
|
14179
|
+
], TieredMenuNestedComponent.prototype, "onResize", null);
|
|
14015
14180
|
__decorate([
|
|
14016
|
-
|
|
14017
|
-
],
|
|
14181
|
+
HostListener("document:click", ["$event"])
|
|
14182
|
+
], TieredMenuNestedComponent.prototype, "onDocumentClick", null);
|
|
14018
14183
|
__decorate([
|
|
14019
|
-
|
|
14020
|
-
],
|
|
14021
|
-
|
|
14184
|
+
HostListener("document:keydown", ["$event"])
|
|
14185
|
+
], TieredMenuNestedComponent.prototype, "onKeydownHandler", null);
|
|
14186
|
+
TieredMenuNestedComponent = __decorate([
|
|
14022
14187
|
Component({
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
animations: [
|
|
14026
|
-
trigger("expandableContent", [
|
|
14027
|
-
state("*", style$7({
|
|
14028
|
-
height: "0",
|
|
14029
|
-
})),
|
|
14030
|
-
state("false", style$7({
|
|
14031
|
-
height: "0",
|
|
14032
|
-
})),
|
|
14033
|
-
state("true", style$7({
|
|
14034
|
-
height: "*",
|
|
14035
|
-
})),
|
|
14036
|
-
transition("* => true", animate("200ms ease-out")),
|
|
14037
|
-
transition("false <=> true", animate("200ms ease-out")),
|
|
14038
|
-
]),
|
|
14039
|
-
trigger("BorderButtonAnimation", [
|
|
14040
|
-
transition(":enter", [
|
|
14041
|
-
style$7({ transform: "scaleY(0)", opacity: 0 }),
|
|
14042
|
-
animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
|
|
14043
|
-
]),
|
|
14044
|
-
transition(":leave", [
|
|
14045
|
-
style$7({ transform: "scaleY(1)", opacity: 1 }),
|
|
14046
|
-
animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
|
|
14047
|
-
]),
|
|
14048
|
-
]),
|
|
14049
|
-
],
|
|
14050
|
-
styles: [":host{display:block}.container{margin-bottom:20px;position:relative}.main-container{display:-ms-flexbox;display:flex}.expandable-container,.main-container{background-color:#fff;border:1px solid #ccc;position:relative;overflow:hidden;width:100%}.expandable-container--severity-default{border-color:#ccc;border-top:initial}.expandable-container--severity-info{transition:border-color .5s;border-color:#428bca;border-top:initial}.expandable-container--severity-warn{transition:border-color .5s;border-color:#f8931f;border-top:initial}.expandable-container--severity-error{transition:border-color .5s;border-color:#c13018;border-top:initial}.expandable-container--severity-success{transition:border-color .5s;border-color:#0c9348;border-top:initial}.main-container--severity-default{border-color:#ccc}.main-container--severity-info{transition:border-color .5s;border-color:#428bca}.main-container--severity-warn{transition:border-color .5s;border-color:#f8931f}.main-container--severity-error{transition:border-color .5s;border-color:#c13018}.main-container--severity-success{transition:border-color .5s;border-color:#0c9348}.object-card__border-button{position:absolute;top:-13px;right:15px;z-index:1}.expandable-container{border-top:none;box-shadow:inset 0 6px 4px -4px #ddd;margin-top:-1px}.expand-icon-container{display:none;text-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;width:25px;position:absolute;right:15px;height:25px;top:calc(50% - 12px)}.expand-icon{-ms-flex:1;flex:1}.object-content{display:-ms-flexbox;display:flex;width:100%}.s-object-card-main{-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:1;flex-grow:1;overflow:hidden;padding:15px}.main-container.with-visible-fields .s-object-card-main{max-width:30%}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.main-container.with-visible-fields .s-object-card-main{width:20%}}.s-object-card-field{overflow:hidden;height:100%}.main-container .s-object-card-field{padding:15px}.main-container .divider{width:1px;-ms-flex-negative:0;flex-shrink:0;background-color:#ccc;margin:15px -1px 15px 0}.main-container.with-hidden-fields .object-content{width:calc(100% - 35px)}.main-container.with-hidden-fields .expand-icon-container{display:-ms-flexbox;display:flex}::ng-deep .object-card-button{padding-left:0!important;padding-right:10px!important;border:none!important;height:auto!important;min-width:auto!important;text-align:left!important}@media (max-width:767px){.s-object-card-main{max-width:calc(100% - 50px)}}"]
|
|
14188
|
+
template: "<div\n class=\"menu menu--nested\"\n [ngStyle]=\"{\n 'top': top + 'px',\n 'left': left + 'px'\n }\">\n <ng-container *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: items }\"></ng-container>\n</div>\n\n<ng-template #itemsTemplate let-items>\n <div *ngFor=\"let item of items\">\n <s-tiered-menu-item\n *ngIf=\"item.visible && !item.divider\"\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [closeOnClick]=\"true\">\n </s-tiered-menu-item>\n\n <s-tiered-menu-divider *ngIf=\"item.divider\"></s-tiered-menu-divider>\n\n <div *ngIf=\"item.submenu && item.isOpen\">\n <div class=\"submenu\">\n <ng-container *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: item.submenu }\"></ng-container>\n </div>\n </div>\n </div>\n</ng-template>\n",
|
|
14189
|
+
styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;min-width:176px;padding:4px 0;position:absolute;z-index:9999;overflow:auto;width:calc(100vw - 8px)}.menu .submenu{margin-left:24px}"]
|
|
14051
14190
|
})
|
|
14052
|
-
],
|
|
14191
|
+
], TieredMenuNestedComponent);
|
|
14053
14192
|
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
this.
|
|
14058
|
-
this.
|
|
14193
|
+
var TieredMenuComponent_1;
|
|
14194
|
+
let TieredMenuComponent = TieredMenuComponent_1 = class TieredMenuComponent {
|
|
14195
|
+
constructor(_appRef, _componentFactoryResolver, _injector, _changeDetectorRef, tieredMenuService, _tieredMenuEventService) {
|
|
14196
|
+
this._appRef = _appRef;
|
|
14197
|
+
this._componentFactoryResolver = _componentFactoryResolver;
|
|
14198
|
+
this._injector = _injector;
|
|
14199
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
14200
|
+
this.tieredMenuService = tieredMenuService;
|
|
14201
|
+
this._tieredMenuEventService = _tieredMenuEventService;
|
|
14202
|
+
this.top = 0;
|
|
14203
|
+
this.left = 0;
|
|
14204
|
+
this.menuTriggerEvent = "hover";
|
|
14205
|
+
this._componentRef = null;
|
|
14206
|
+
this._unsubscribe$ = new Subject();
|
|
14207
|
+
this.destroyRequest = new EventEmitter();
|
|
14059
14208
|
}
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
Input()
|
|
14063
|
-
], BorderButtonComponent.prototype, "severity", void 0);
|
|
14064
|
-
__decorate([
|
|
14065
|
-
Input()
|
|
14066
|
-
], BorderButtonComponent.prototype, "options", void 0);
|
|
14067
|
-
BorderButtonComponent = __decorate([
|
|
14068
|
-
Component({
|
|
14069
|
-
selector: "s-border-button",
|
|
14070
|
-
template: "<button\n class=\"border-button\"\n [ngClass]=\"{\n 'border-button--severity-default': severity === EnumSeverity.Default,\n 'border-button--severity-info': severity === EnumSeverity.Info,\n 'border-button--severity-warn': severity === EnumSeverity.Warn,\n 'border-button--severity-error': severity === EnumSeverity.Error,\n 'border-button--severity-success': severity == EnumSeverity.Success,\n 'border-button--disabled': options?.disabled\n ? options?.disabled(severity)\n : false\n }\"\n (click)=\"options?.onClick ? options?.onClick(severity) : null\"\n [sTooltip]=\"options?.tooltip ? options?.tooltip(severity) : null\"\n [tooltipPosition]=\"TooltipPosition.Left\"\n [disabled]=\"options?.disabled ? options?.disabled(severity) : false\"\n>\n <span class=\"border-button__label\">\n {{ options?.label ? options?.label(severity) : null }}\n </span>\n <span\n *ngIf=\"options?.icon ? options?.icon(severity) : false\"\n class=\"border-button__icon {{ options?.icon(severity) }}\"\n ></span>\n</button>",
|
|
14071
|
-
styles: [".border-button{padding:0 8px;border:1px solid;border-radius:12px;height:23px;max-width:320px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.border-button__label{font-family:Open Sans,sans-serif;font-size:12px;line-height:150%;width:100%;display:block;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border-button__icon{font-size:12px;color:#333;margin-left:8px}.border-button--severity-default{border-color:#ccc;background-color:#fff}.border-button--severity-info{border-color:#428bca;background-color:#d5e8ec;transition:background-color .5s,border-color .5s}.border-button--severity-info:enabled:hover{background-color:#9ecad4;cursor:pointer}.border-button--severity-info:enabled:active{transition:none;background-color:#67acbc;border-color:#67acbc}.border-button--severity-warn{border-color:#f8931f;background-color:#fce3ba;transition:background-color .5s,border-color .5s}.border-button--severity-warn:enabled:hover{background-color:#f8bf5e;cursor:pointer}.border-button--severity-warn:enabled:active{transition:none;background-color:#f5a319;border-color:#f5a319}.border-button--severity-error{border-color:#c13018;background-color:#fcd2d2;transition:background-color .5s,border-color .5s}.border-button--severity-error:enabled:hover{background-color:#f89696;cursor:pointer}.border-button--severity-error:enabled:active{transition:none;background-color:#f45b5b;border-color:#f45b5b}.border-button--severity-success{border-color:#0c9348;background-color:#e6ffb3;transition:background-color .5s,border-color .5s}.border-button--severity-success:enabled:hover{background-color:#c8ff5c;cursor:pointer}.border-button--severity-success:enabled:active{transition:none;background-color:#ade500;border-color:#ade500}.border-button--disabled:disabled:hover{cursor:default}"]
|
|
14072
|
-
})
|
|
14073
|
-
], BorderButtonComponent);
|
|
14074
|
-
|
|
14075
|
-
let BorderButtonModule = class BorderButtonModule {
|
|
14076
|
-
};
|
|
14077
|
-
BorderButtonModule = __decorate([
|
|
14078
|
-
NgModule({
|
|
14079
|
-
imports: [CommonModule, TooltipModule],
|
|
14080
|
-
declarations: [BorderButtonComponent],
|
|
14081
|
-
exports: [BorderButtonComponent]
|
|
14082
|
-
})
|
|
14083
|
-
], BorderButtonModule);
|
|
14084
|
-
|
|
14085
|
-
let ObjectCardModule = class ObjectCardModule {
|
|
14086
|
-
};
|
|
14087
|
-
ObjectCardModule = __decorate([
|
|
14088
|
-
NgModule({
|
|
14089
|
-
imports: [CommonModule, TooltipModule$1, ThumbnailModule, ButtonModule, BorderButtonModule],
|
|
14090
|
-
declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
|
|
14091
|
-
exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
|
|
14092
|
-
})
|
|
14093
|
-
], ObjectCardModule);
|
|
14094
|
-
|
|
14095
|
-
var ProductHeaderComponent_1;
|
|
14096
|
-
let ProductHeaderComponent = ProductHeaderComponent_1 = class ProductHeaderComponent {
|
|
14097
|
-
constructor() {
|
|
14098
|
-
this.id = `s-product-header-${ProductHeaderComponent_1.nextId++}`;
|
|
14099
|
-
this.baseZIndex = 0;
|
|
14100
|
-
this.isHeaderFrame = true;
|
|
14209
|
+
onResize() {
|
|
14210
|
+
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
14101
14211
|
}
|
|
14102
|
-
|
|
14103
|
-
|
|
14104
|
-
|
|
14105
|
-
|
|
14106
|
-
|
|
14107
|
-
|
|
14108
|
-
this.container.nativeElement.style.borderTop = "1px solid $default-secondary-color";
|
|
14212
|
+
onDocumentClick(event) {
|
|
14213
|
+
// Closing menu when clicked outside.
|
|
14214
|
+
const target = event.target;
|
|
14215
|
+
const clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
|
|
14216
|
+
if (!clickedInside) {
|
|
14217
|
+
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
14109
14218
|
}
|
|
14110
14219
|
}
|
|
14111
|
-
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14124
|
-
|
|
14125
|
-
|
|
14126
|
-
|
|
14127
|
-
|
|
14128
|
-
|
|
14129
|
-
|
|
14130
|
-
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
|
|
14135
|
-
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
(function (ProgressBarColors) {
|
|
14148
|
-
ProgressBarColors["Blue"] = "blue";
|
|
14149
|
-
ProgressBarColors["Green"] = "green";
|
|
14150
|
-
ProgressBarColors["Red"] = "red";
|
|
14151
|
-
ProgressBarColors["Yellow"] = "yellow";
|
|
14152
|
-
})(ProgressBarColors || (ProgressBarColors = {}));
|
|
14153
|
-
|
|
14154
|
-
var ProgressBarMode;
|
|
14155
|
-
(function (ProgressBarMode) {
|
|
14156
|
-
ProgressBarMode["Determinate"] = "determinate";
|
|
14157
|
-
ProgressBarMode["Indeterminate"] = "indeterminate";
|
|
14158
|
-
})(ProgressBarMode || (ProgressBarMode = {}));
|
|
14159
|
-
|
|
14160
|
-
let ProgressBarComponent = class ProgressBarComponent {
|
|
14161
|
-
constructor() {
|
|
14162
|
-
this.numberFormatOptions = {
|
|
14163
|
-
style: "decimal",
|
|
14164
|
-
minimumFractionDigits: 0,
|
|
14165
|
-
maximumFractionDigits: 2,
|
|
14166
|
-
};
|
|
14167
|
-
this.showValue = true;
|
|
14168
|
-
this.mode = ProgressBarMode.Determinate;
|
|
14220
|
+
onKeydownHandler(event) {
|
|
14221
|
+
switch (event.key) {
|
|
14222
|
+
case "Escape":
|
|
14223
|
+
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
14224
|
+
break;
|
|
14225
|
+
case " ":
|
|
14226
|
+
case "Enter":
|
|
14227
|
+
if (!this.tieredMenuService.currentItem.disabled) {
|
|
14228
|
+
this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
|
|
14229
|
+
}
|
|
14230
|
+
break;
|
|
14231
|
+
case "ArrowLeft":
|
|
14232
|
+
if (this.items.includes(this.tieredMenuService.currentItem)) {
|
|
14233
|
+
this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem);
|
|
14234
|
+
this._changeDetectorRef.detectChanges();
|
|
14235
|
+
}
|
|
14236
|
+
break;
|
|
14237
|
+
case "ArrowRight":
|
|
14238
|
+
if (!this.tieredMenuService.currentItem.disabled && this.items.includes(this.tieredMenuService.currentItem)) {
|
|
14239
|
+
this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
|
|
14240
|
+
event.stopImmediatePropagation();
|
|
14241
|
+
}
|
|
14242
|
+
break;
|
|
14243
|
+
case "ArrowUp":
|
|
14244
|
+
if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
|
|
14245
|
+
this._tieredMenuEventService.decrementCurrentItemEvent.emit();
|
|
14246
|
+
event.stopImmediatePropagation();
|
|
14247
|
+
}
|
|
14248
|
+
break;
|
|
14249
|
+
case "ArrowDown":
|
|
14250
|
+
if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
|
|
14251
|
+
this._tieredMenuEventService.incrementCurrentItemEvent.emit();
|
|
14252
|
+
event.stopImmediatePropagation();
|
|
14253
|
+
}
|
|
14254
|
+
break;
|
|
14255
|
+
}
|
|
14169
14256
|
}
|
|
14170
14257
|
ngOnInit() {
|
|
14171
|
-
this.
|
|
14258
|
+
this.tieredMenuService.currentItems = this.items;
|
|
14259
|
+
this._subscribeEvents();
|
|
14172
14260
|
}
|
|
14173
|
-
|
|
14174
|
-
|
|
14175
|
-
|
|
14261
|
+
ngOnDestroy() {
|
|
14262
|
+
this._unsubscribe$.next();
|
|
14263
|
+
this._unsubscribe$.complete();
|
|
14264
|
+
}
|
|
14265
|
+
_incrementCurItem() {
|
|
14266
|
+
if (!this.tieredMenuService.currentItem) {
|
|
14267
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
|
|
14268
|
+
return;
|
|
14176
14269
|
}
|
|
14177
|
-
if (this.
|
|
14178
|
-
|
|
14270
|
+
else if (!this.items.includes(this.tieredMenuService.currentItem)) {
|
|
14271
|
+
// Checking if it is the current menu.
|
|
14272
|
+
return;
|
|
14179
14273
|
}
|
|
14180
|
-
|
|
14181
|
-
|
|
14274
|
+
const currentIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
|
|
14275
|
+
if (currentIndex < this.tieredMenuService.currentItems.length) {
|
|
14276
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[currentIndex];
|
|
14277
|
+
}
|
|
14278
|
+
else {
|
|
14279
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
|
|
14280
|
+
}
|
|
14281
|
+
if (this.tieredMenuService.currentItem.divider) {
|
|
14282
|
+
this._incrementCurItem();
|
|
14182
14283
|
}
|
|
14183
14284
|
}
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
|
|
14189
|
-
|
|
14190
|
-
|
|
14191
|
-
|
|
14192
|
-
|
|
14193
|
-
|
|
14194
|
-
|
|
14195
|
-
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
|
|
14199
|
-
|
|
14200
|
-
|
|
14201
|
-
|
|
14202
|
-
|
|
14203
|
-
__decorate([
|
|
14204
|
-
Input()
|
|
14205
|
-
], ProgressBarComponent.prototype, "showValue", void 0);
|
|
14206
|
-
__decorate([
|
|
14207
|
-
Input()
|
|
14208
|
-
], ProgressBarComponent.prototype, "mode", void 0);
|
|
14209
|
-
ProgressBarComponent = __decorate([
|
|
14210
|
-
Component({
|
|
14211
|
-
selector: "s-progressbar",
|
|
14212
|
-
template: "<ng-container *ngIf=\"mode === 'determinate'; then pbDeterminateTemplate else pbIndeterminateTemplate\"></ng-container>\n\n<ng-template #pbDeterminateTemplate>\n <s-progressbar-determinate\n [value]=\"value\"\n [numberFormatOptions]=\"numberFormatOptions\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\">\n </s-progressbar-determinate>\n</ng-template>\n\n<ng-template #pbIndeterminateTemplate>\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\">\n </s-progressbar-indeterminate>\n</ng-template>",
|
|
14213
|
-
styles: [".progress-bar{position:relative}.progress-bar .progress-bar-all{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progress-bar .progress-bar-all .progress-bar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progress-bar .progress-bar-all .progress-bar-active--blue{background-color:#428bca}.progress-bar .progress-bar-all .progress-bar-active--green{background-color:#0c9348}.progress-bar .progress-bar-all .progress-bar-active--red{background-color:#c13018}.progress-bar .progress-bar-all .progress-bar-active--yellow{background-color:#fcbf10}.progress-bar .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progress-bar .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progress-bar .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
|
|
14214
|
-
})
|
|
14215
|
-
], ProgressBarComponent);
|
|
14216
|
-
|
|
14217
|
-
let ProgressBarDeterminateComponent = class ProgressBarDeterminateComponent {
|
|
14218
|
-
constructor(localeService) {
|
|
14219
|
-
this.localeService = localeService;
|
|
14220
|
-
this.showValue = true;
|
|
14221
|
-
}
|
|
14222
|
-
ngOnInit() {
|
|
14223
|
-
this.validateValues();
|
|
14224
|
-
this.onGetLocale();
|
|
14285
|
+
_decrementCurItem() {
|
|
14286
|
+
if (!this.tieredMenuService.currentItem) {
|
|
14287
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
|
|
14288
|
+
return;
|
|
14289
|
+
// Checking if it is the current menu.
|
|
14290
|
+
}
|
|
14291
|
+
else if (!this.items.includes(this.tieredMenuService.currentItem)) {
|
|
14292
|
+
return;
|
|
14293
|
+
}
|
|
14294
|
+
const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
|
|
14295
|
+
if (curIndex >= 0) {
|
|
14296
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
|
|
14297
|
+
}
|
|
14298
|
+
else {
|
|
14299
|
+
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
|
|
14300
|
+
}
|
|
14301
|
+
if (this.tieredMenuService.currentItem.divider) {
|
|
14302
|
+
this._decrementCurItem();
|
|
14303
|
+
}
|
|
14225
14304
|
}
|
|
14226
|
-
|
|
14227
|
-
this.
|
|
14228
|
-
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
|
|
14305
|
+
_createMenu(items, position) {
|
|
14306
|
+
if (!this._componentRef && items) {
|
|
14307
|
+
const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent_1);
|
|
14308
|
+
this._componentRef = componentFactory.create(this._injector);
|
|
14309
|
+
this._appRef.attachView(this._componentRef.hostView);
|
|
14310
|
+
const domElem = this._componentRef.hostView.rootNodes[0];
|
|
14311
|
+
document.body.appendChild(domElem);
|
|
14312
|
+
// Setting the menu items.
|
|
14313
|
+
this._componentRef.instance.items = items;
|
|
14314
|
+
// Subscribe menu events.
|
|
14315
|
+
this._componentRef.instance.destroyRequest.subscribe((propagate) => {
|
|
14316
|
+
this._destroy(propagate);
|
|
14317
|
+
});
|
|
14318
|
+
this._menuDivElement = domElem.querySelector(".menu");
|
|
14319
|
+
this._setMenuPosition(position);
|
|
14320
|
+
}
|
|
14235
14321
|
}
|
|
14236
|
-
|
|
14237
|
-
if (this.
|
|
14238
|
-
|
|
14322
|
+
_destroy(propagate = true) {
|
|
14323
|
+
if (this._componentRef !== null) {
|
|
14324
|
+
this._appRef.detachView(this._componentRef.hostView);
|
|
14325
|
+
this._componentRef.destroy();
|
|
14326
|
+
this._componentRef = null;
|
|
14327
|
+
this._menuDivElement = null;
|
|
14239
14328
|
}
|
|
14240
|
-
if (
|
|
14241
|
-
|
|
14329
|
+
if (propagate) {
|
|
14330
|
+
this.destroyRequest.emit();
|
|
14331
|
+
}
|
|
14332
|
+
}
|
|
14333
|
+
_setMenuPosition(position) {
|
|
14334
|
+
var _a, _b;
|
|
14335
|
+
const ITEM_HEIGHT = 37;
|
|
14336
|
+
const DIVIDER_HEIGHT = 5;
|
|
14337
|
+
const PADDING = 8;
|
|
14338
|
+
if (this._componentRef !== null) {
|
|
14339
|
+
const { top, right, bottom, left } = position;
|
|
14340
|
+
const itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce((count, item) => {
|
|
14341
|
+
return !item.divider ? count + 1 : count;
|
|
14342
|
+
}, 0);
|
|
14343
|
+
const dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce((count, item) => {
|
|
14344
|
+
return item.divider ? count + 1 : count;
|
|
14345
|
+
}, 0);
|
|
14346
|
+
// I need to calculate the height of the component because the internal elements have not been created yet.
|
|
14347
|
+
const menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + 8;
|
|
14348
|
+
const menuWidth = this._menuDivElement.getBoundingClientRect().width;
|
|
14349
|
+
const rightFreeSpace = window.innerWidth - right;
|
|
14350
|
+
const bottomFreeSpace = window.innerHeight - bottom;
|
|
14351
|
+
if (rightFreeSpace > menuWidth) {
|
|
14352
|
+
this._componentRef.instance.left = right;
|
|
14353
|
+
}
|
|
14354
|
+
else {
|
|
14355
|
+
this._componentRef.instance.left = left - menuWidth;
|
|
14356
|
+
}
|
|
14357
|
+
if (bottomFreeSpace <= menuHeight) {
|
|
14358
|
+
this._componentRef.instance.top = Math.max(window.innerHeight - menuHeight, window.scrollY);
|
|
14359
|
+
}
|
|
14360
|
+
else {
|
|
14361
|
+
this._componentRef.instance.top = window.scrollY + top;
|
|
14362
|
+
}
|
|
14242
14363
|
}
|
|
14243
14364
|
}
|
|
14365
|
+
_subscribeEvents() {
|
|
14366
|
+
// Increment current item event.
|
|
14367
|
+
this._tieredMenuEventService.incrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
|
|
14368
|
+
this._incrementCurItem();
|
|
14369
|
+
});
|
|
14370
|
+
// Decrement current item event.
|
|
14371
|
+
this._tieredMenuEventService.decrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
|
|
14372
|
+
this._decrementCurItem();
|
|
14373
|
+
});
|
|
14374
|
+
// Select item event.
|
|
14375
|
+
this._tieredMenuEventService.selectItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe((item) => {
|
|
14376
|
+
if (item.submenu) {
|
|
14377
|
+
this._tieredMenuEventService.openItemMenuEvent.emit(item);
|
|
14378
|
+
}
|
|
14379
|
+
else if (item.command) {
|
|
14380
|
+
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
14381
|
+
item.command();
|
|
14382
|
+
}
|
|
14383
|
+
});
|
|
14384
|
+
// Close all menus event.
|
|
14385
|
+
this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
|
|
14386
|
+
this._destroy();
|
|
14387
|
+
this.tieredMenuService.currentItem = null;
|
|
14388
|
+
this.tieredMenuService.currentItems = this.tieredMenuService.items;
|
|
14389
|
+
this.tieredMenuService.markAllItemsAsClosed(this.tieredMenuService.items);
|
|
14390
|
+
});
|
|
14391
|
+
// Open item menu event.
|
|
14392
|
+
this._tieredMenuEventService.openItemMenuEvent.pipe(takeUntil(this._unsubscribe$)).subscribe((item) => {
|
|
14393
|
+
if (this.tieredMenuService.currentItem) {
|
|
14394
|
+
if (this.tieredMenuService.currentItem.parent === item) {
|
|
14395
|
+
return;
|
|
14396
|
+
}
|
|
14397
|
+
if (!this.tieredMenuService.searchTheHierarchy(this.tieredMenuService.currentItem.parent, item)) {
|
|
14398
|
+
let current = this.tieredMenuService.currentItem;
|
|
14399
|
+
current.isOpen = false;
|
|
14400
|
+
while ((current === null || current === void 0 ? void 0 : current.parent) !== item.parent) {
|
|
14401
|
+
this._tieredMenuEventService.closeItemMenuEvent.emit(current);
|
|
14402
|
+
this._changeDetectorRef.detectChanges();
|
|
14403
|
+
current = current.parent;
|
|
14404
|
+
}
|
|
14405
|
+
if (current) {
|
|
14406
|
+
current.isOpen = false;
|
|
14407
|
+
}
|
|
14408
|
+
}
|
|
14409
|
+
}
|
|
14410
|
+
if (item.submenu && !item.isOpen && this.items.includes(item)) {
|
|
14411
|
+
const { top, right, left, bottom } = document.querySelector(`#${item.id}`).getBoundingClientRect();
|
|
14412
|
+
const position = { top, right, left, bottom };
|
|
14413
|
+
this._createMenu(item.submenu, position);
|
|
14414
|
+
this.tieredMenuService.currentItems = item.submenu;
|
|
14415
|
+
this.tieredMenuService.currentItem = item.submenu[0];
|
|
14416
|
+
item.isOpen = true;
|
|
14417
|
+
}
|
|
14418
|
+
});
|
|
14419
|
+
// Close item menu event.
|
|
14420
|
+
this._tieredMenuEventService.closeItemMenuEvent
|
|
14421
|
+
.pipe(takeUntil(this._unsubscribe$))
|
|
14422
|
+
.subscribe((item) => {
|
|
14423
|
+
var _a, _b;
|
|
14424
|
+
if (this.items.some((i) => i.id === item.id)) {
|
|
14425
|
+
if (item.parent) {
|
|
14426
|
+
item.parent.isOpen = false;
|
|
14427
|
+
}
|
|
14428
|
+
this.tieredMenuService.currentItems = ((_b = (_a = item === null || item === void 0 ? void 0 : item.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.submenu) || this.tieredMenuService.items;
|
|
14429
|
+
this.tieredMenuService.currentItem = item.parent;
|
|
14430
|
+
this.destroyRequest.emit(false);
|
|
14431
|
+
}
|
|
14432
|
+
});
|
|
14433
|
+
}
|
|
14244
14434
|
};
|
|
14245
|
-
|
|
14246
|
-
{ type:
|
|
14435
|
+
TieredMenuComponent.ctorParameters = () => [
|
|
14436
|
+
{ type: ApplicationRef },
|
|
14437
|
+
{ type: ComponentFactoryResolver },
|
|
14438
|
+
{ type: Injector },
|
|
14439
|
+
{ type: ChangeDetectorRef },
|
|
14440
|
+
{ type: TieredMenuService },
|
|
14441
|
+
{ type: TieredMenuEventService }
|
|
14247
14442
|
];
|
|
14248
14443
|
__decorate([
|
|
14249
|
-
|
|
14250
|
-
],
|
|
14251
|
-
__decorate([
|
|
14252
|
-
Input()
|
|
14253
|
-
], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
|
|
14254
|
-
__decorate([
|
|
14255
|
-
Input()
|
|
14256
|
-
], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
|
|
14257
|
-
__decorate([
|
|
14258
|
-
Input()
|
|
14259
|
-
], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
|
|
14260
|
-
__decorate([
|
|
14261
|
-
Input()
|
|
14262
|
-
], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
|
|
14444
|
+
Output()
|
|
14445
|
+
], TieredMenuComponent.prototype, "destroyRequest", void 0);
|
|
14263
14446
|
__decorate([
|
|
14264
|
-
|
|
14265
|
-
],
|
|
14266
|
-
ProgressBarDeterminateComponent = __decorate([
|
|
14267
|
-
Component({
|
|
14268
|
-
selector: "s-progressbar-determinate",
|
|
14269
|
-
template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue' : activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n\n {{ showValue && value ? numberFormat.format(value) + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat.format(value) + '%' }}\n </span>\n </div>\n </div>\n",
|
|
14270
|
-
styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
|
|
14271
|
-
})
|
|
14272
|
-
], ProgressBarDeterminateComponent);
|
|
14273
|
-
|
|
14274
|
-
let ProgressBarIndeterminateComponent = class ProgressBarIndeterminateComponent {
|
|
14275
|
-
};
|
|
14447
|
+
HostListener("window:resize")
|
|
14448
|
+
], TieredMenuComponent.prototype, "onResize", null);
|
|
14276
14449
|
__decorate([
|
|
14277
|
-
|
|
14278
|
-
],
|
|
14450
|
+
HostListener("document:click", ["$event"])
|
|
14451
|
+
], TieredMenuComponent.prototype, "onDocumentClick", null);
|
|
14279
14452
|
__decorate([
|
|
14280
|
-
|
|
14281
|
-
],
|
|
14282
|
-
|
|
14453
|
+
HostListener("document:keydown", ["$event"])
|
|
14454
|
+
], TieredMenuComponent.prototype, "onKeydownHandler", null);
|
|
14455
|
+
TieredMenuComponent = TieredMenuComponent_1 = __decorate([
|
|
14283
14456
|
Component({
|
|
14284
|
-
selector: "s-
|
|
14285
|
-
template: "<div
|
|
14286
|
-
styles: [".
|
|
14457
|
+
selector: "s-tiered-menu",
|
|
14458
|
+
template: "<div\n class=\"menu\"\n [ngStyle]=\"{\n 'left': left + 'px',\n 'top': top + 'px'\n }\">\n\n <div *ngFor=\"let item of items\">\n <s-tiered-menu-item\n *ngIf=\"item.visible && !item.divider\"\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [highlight]=\"item.isOpen\"\n triggerEvent=\"hover\"\n [closeOnClick]=\"false\">\n </s-tiered-menu-item>\n <s-tiered-menu-divider *ngIf=\"item.divider\"></s-tiered-menu-divider>\n </div>\n</div>",
|
|
14459
|
+
styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;max-height:100vh;min-width:176px;padding:4px 0;overflow-y:auto;position:absolute;z-index:9999}"]
|
|
14287
14460
|
})
|
|
14288
|
-
],
|
|
14461
|
+
], TieredMenuComponent);
|
|
14289
14462
|
|
|
14290
|
-
let
|
|
14463
|
+
let TieredMenuGlobalService = class TieredMenuGlobalService {
|
|
14291
14464
|
};
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
declarations: [
|
|
14296
|
-
ProgressBarComponent,
|
|
14297
|
-
ProgressBarDeterminateComponent,
|
|
14298
|
-
ProgressBarIndeterminateComponent,
|
|
14299
|
-
],
|
|
14300
|
-
exports: [ProgressBarComponent],
|
|
14301
|
-
})
|
|
14302
|
-
], ProgressBarModule);
|
|
14465
|
+
TieredMenuGlobalService = __decorate([
|
|
14466
|
+
Injectable()
|
|
14467
|
+
], TieredMenuGlobalService);
|
|
14303
14468
|
|
|
14304
|
-
let
|
|
14305
|
-
constructor() {
|
|
14306
|
-
this.
|
|
14307
|
-
this.
|
|
14308
|
-
this.
|
|
14309
|
-
this.
|
|
14310
|
-
this.
|
|
14311
|
-
|
|
14312
|
-
|
|
14313
|
-
this.
|
|
14314
|
-
this.
|
|
14469
|
+
let TieredMenuDirective = class TieredMenuDirective {
|
|
14470
|
+
constructor(_elementRef, _appRef, _componentFactoryResolver, _injector, _tieredMenuEventService, _tieredMenuService, _tieredMenuGlobalService, _changeDetectorRef) {
|
|
14471
|
+
this._elementRef = _elementRef;
|
|
14472
|
+
this._appRef = _appRef;
|
|
14473
|
+
this._componentFactoryResolver = _componentFactoryResolver;
|
|
14474
|
+
this._injector = _injector;
|
|
14475
|
+
this._tieredMenuEventService = _tieredMenuEventService;
|
|
14476
|
+
this._tieredMenuService = _tieredMenuService;
|
|
14477
|
+
this._tieredMenuGlobalService = _tieredMenuGlobalService;
|
|
14478
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
14479
|
+
this.items = [];
|
|
14480
|
+
this.triggerEvent = "click";
|
|
14481
|
+
this._componentRef = null;
|
|
14482
|
+
this._isNested = false;
|
|
14483
|
+
this._isOpen = false;
|
|
14484
|
+
this._unsubscribe$ = new Subject();
|
|
14485
|
+
}
|
|
14486
|
+
onClick(event) {
|
|
14487
|
+
if (this.triggerEvent === "click" && !this._isOpen) {
|
|
14488
|
+
this._lastActiveElement = document.activeElement;
|
|
14489
|
+
this._createMenu();
|
|
14490
|
+
event.preventDefault();
|
|
14491
|
+
event.stopPropagation();
|
|
14492
|
+
}
|
|
14493
|
+
}
|
|
14494
|
+
ngOnInit() {
|
|
14495
|
+
this._subscribeEvents();
|
|
14496
|
+
}
|
|
14497
|
+
ngDoCheck() {
|
|
14498
|
+
if (!this.previousItems) {
|
|
14499
|
+
this.previousItems = this._tieredMenuService.cloneItems(this.items);
|
|
14500
|
+
}
|
|
14501
|
+
let hasChanges = false;
|
|
14502
|
+
if (this.items.length !== this.previousItems.length) {
|
|
14503
|
+
hasChanges = true;
|
|
14504
|
+
}
|
|
14505
|
+
else {
|
|
14506
|
+
for (let i = 0; i < this.items.length; i++) {
|
|
14507
|
+
if (!this._compareItems(this.items[i], this.previousItems[i])) {
|
|
14508
|
+
hasChanges = true;
|
|
14509
|
+
break;
|
|
14510
|
+
}
|
|
14511
|
+
}
|
|
14512
|
+
}
|
|
14513
|
+
if (hasChanges) {
|
|
14514
|
+
this._updateServiceItems();
|
|
14515
|
+
this._changeDetectorRef.detectChanges();
|
|
14516
|
+
this._rebuildMenu();
|
|
14517
|
+
}
|
|
14518
|
+
this.previousItems = this._tieredMenuService.cloneItems(this.items);
|
|
14519
|
+
}
|
|
14520
|
+
ngOnDestroy() {
|
|
14521
|
+
this._unsubscribe$.next();
|
|
14522
|
+
this._unsubscribe$.complete();
|
|
14523
|
+
this._destroy();
|
|
14524
|
+
}
|
|
14525
|
+
_createMenu() {
|
|
14526
|
+
var _a, _b, _c;
|
|
14527
|
+
this._updateServiceItems();
|
|
14528
|
+
if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
14529
|
+
(_b = this._tieredMenuGlobalService.lastInstance) === null || _b === void 0 ? void 0 : _b._destroy();
|
|
14530
|
+
this._tieredMenuGlobalService.lastInstance = this;
|
|
14531
|
+
(_c = this._lastActiveElement) === null || _c === void 0 ? void 0 : _c.blur();
|
|
14532
|
+
this._isOpen = true;
|
|
14533
|
+
this._isNested = document.body.clientWidth < 600;
|
|
14534
|
+
this._isNested ? this._createNestedMenu() : this._createTieredMenu();
|
|
14535
|
+
}
|
|
14536
|
+
}
|
|
14537
|
+
_createTieredMenu() {
|
|
14538
|
+
var _a;
|
|
14539
|
+
if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
14540
|
+
const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent);
|
|
14541
|
+
this._componentRef = componentFactory.create(this._injector);
|
|
14542
|
+
this._appRef.attachView(this._componentRef.hostView);
|
|
14543
|
+
const domElem = this._componentRef.hostView.rootNodes[0];
|
|
14544
|
+
document.body.appendChild(domElem);
|
|
14545
|
+
this._setMenuComponentProperties();
|
|
14546
|
+
this._componentRef.instance.destroyRequest.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
|
|
14547
|
+
this._destroy();
|
|
14548
|
+
});
|
|
14549
|
+
this._setMenuPosition();
|
|
14550
|
+
}
|
|
14551
|
+
}
|
|
14552
|
+
_createNestedMenu() {
|
|
14553
|
+
var _a;
|
|
14554
|
+
if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
14555
|
+
const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuNestedComponent);
|
|
14556
|
+
this._componentRef = componentFactory.create(this._injector);
|
|
14557
|
+
this._appRef.attachView(this._componentRef.hostView);
|
|
14558
|
+
const domElem = this._componentRef.hostView.rootNodes[0];
|
|
14559
|
+
document.body.appendChild(domElem);
|
|
14560
|
+
this._setMenuComponentProperties();
|
|
14561
|
+
this._setMenuPosition();
|
|
14562
|
+
}
|
|
14563
|
+
}
|
|
14564
|
+
_destroy() {
|
|
14565
|
+
if (this._componentRef) {
|
|
14566
|
+
this._isOpen = false;
|
|
14567
|
+
window.clearTimeout(this._showTimeout);
|
|
14568
|
+
this._appRef.detachView(this._componentRef.hostView);
|
|
14569
|
+
this._componentRef.destroy();
|
|
14570
|
+
this._componentRef = null;
|
|
14571
|
+
this._tieredMenuService.currentItems = this._tieredMenuService.items;
|
|
14572
|
+
this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
|
|
14573
|
+
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
14574
|
+
}
|
|
14575
|
+
}
|
|
14576
|
+
_setMenuPosition() {
|
|
14577
|
+
var _a, _b;
|
|
14578
|
+
const ITEM_HEIGHT = 37;
|
|
14579
|
+
const ITEM_WIDTH = 176;
|
|
14580
|
+
const DIVIDER_HEIGHT = 5;
|
|
14581
|
+
const PADDING = 8;
|
|
14582
|
+
const MARGIN = 4;
|
|
14583
|
+
if (this._componentRef !== null) {
|
|
14584
|
+
this._componentRef.instance.top = 8;
|
|
14585
|
+
let { bottom, left, right } = this._elementRef.nativeElement.getBoundingClientRect();
|
|
14586
|
+
const itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce((count, item) => {
|
|
14587
|
+
return !item.divider ? count + 1 : count;
|
|
14588
|
+
}, 0);
|
|
14589
|
+
const dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce((count, item) => {
|
|
14590
|
+
return item.divider ? count + 1 : count;
|
|
14591
|
+
}, 0);
|
|
14592
|
+
const menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + MARGIN;
|
|
14593
|
+
const rightFreeSpace = window.innerWidth - right;
|
|
14594
|
+
const bottomFreeSpace = window.innerHeight - bottom;
|
|
14595
|
+
this._componentRef.instance.top = bottom;
|
|
14596
|
+
this._componentRef.instance.left = left;
|
|
14597
|
+
if (bottomFreeSpace <= menuHeight) {
|
|
14598
|
+
this._componentRef.instance.top = Math.max(scrollY + bottom - menuHeight, 0);
|
|
14599
|
+
}
|
|
14600
|
+
else {
|
|
14601
|
+
this._componentRef.instance.top = window.scrollY + bottom + MARGIN;
|
|
14602
|
+
}
|
|
14603
|
+
if (rightFreeSpace > 176) {
|
|
14604
|
+
this._componentRef.instance.left = window.scrollX + left;
|
|
14605
|
+
}
|
|
14606
|
+
else {
|
|
14607
|
+
this._componentRef.instance.left = window.scrollX + right - ITEM_WIDTH;
|
|
14608
|
+
}
|
|
14609
|
+
if (this._isNested) {
|
|
14610
|
+
this._componentRef.instance.left = MARGIN;
|
|
14611
|
+
}
|
|
14612
|
+
}
|
|
14613
|
+
}
|
|
14614
|
+
_setMenuComponentProperties() {
|
|
14615
|
+
if (this._componentRef != null) {
|
|
14616
|
+
this._componentRef.instance.items = this._tieredMenuService.items;
|
|
14617
|
+
}
|
|
14618
|
+
}
|
|
14619
|
+
_subscribeEvents() {
|
|
14620
|
+
this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
|
|
14621
|
+
this._tieredMenuService.items = this._tieredMenuService.markAllItemsAsClosed(this._tieredMenuService.items);
|
|
14622
|
+
this._destroy();
|
|
14623
|
+
});
|
|
14624
|
+
}
|
|
14625
|
+
_compareItems(item1, item2) {
|
|
14626
|
+
return JSON.stringify(item1) === JSON.stringify(item2);
|
|
14627
|
+
}
|
|
14628
|
+
_rebuildMenu() {
|
|
14629
|
+
this._destroy();
|
|
14630
|
+
}
|
|
14631
|
+
_updateServiceItems() {
|
|
14632
|
+
this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
|
|
14633
|
+
this._tieredMenuService.currentItems = this._tieredMenuService.items;
|
|
14634
|
+
this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
|
|
14315
14635
|
}
|
|
14316
14636
|
};
|
|
14637
|
+
TieredMenuDirective.ctorParameters = () => [
|
|
14638
|
+
{ type: ElementRef },
|
|
14639
|
+
{ type: ApplicationRef },
|
|
14640
|
+
{ type: ComponentFactoryResolver },
|
|
14641
|
+
{ type: Injector },
|
|
14642
|
+
{ type: TieredMenuEventService },
|
|
14643
|
+
{ type: TieredMenuService },
|
|
14644
|
+
{ type: TieredMenuGlobalService },
|
|
14645
|
+
{ type: ChangeDetectorRef }
|
|
14646
|
+
];
|
|
14317
14647
|
__decorate([
|
|
14318
14648
|
Input()
|
|
14319
|
-
],
|
|
14320
|
-
__decorate([
|
|
14321
|
-
Input()
|
|
14322
|
-
], PanelComponent.prototype, "toggleable", void 0);
|
|
14323
|
-
__decorate([
|
|
14324
|
-
Input()
|
|
14325
|
-
], PanelComponent.prototype, "collapsed", void 0);
|
|
14326
|
-
__decorate([
|
|
14327
|
-
Input()
|
|
14328
|
-
], PanelComponent.prototype, "severity", void 0);
|
|
14649
|
+
], TieredMenuDirective.prototype, "items", void 0);
|
|
14329
14650
|
__decorate([
|
|
14330
14651
|
Input()
|
|
14331
|
-
],
|
|
14652
|
+
], TieredMenuDirective.prototype, "triggerEvent", void 0);
|
|
14332
14653
|
__decorate([
|
|
14333
|
-
|
|
14334
|
-
],
|
|
14335
|
-
|
|
14336
|
-
|
|
14337
|
-
selector: "
|
|
14338
|
-
|
|
14339
|
-
|
|
14340
|
-
|
|
14341
|
-
|
|
14342
|
-
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14348
|
-
]),
|
|
14349
|
-
]),
|
|
14654
|
+
HostListener("click", ["$event"])
|
|
14655
|
+
], TieredMenuDirective.prototype, "onClick", null);
|
|
14656
|
+
TieredMenuDirective = __decorate([
|
|
14657
|
+
Directive({
|
|
14658
|
+
selector: "[sTieredMenu]",
|
|
14659
|
+
providers: [TieredMenuEventService, TieredMenuService],
|
|
14660
|
+
})
|
|
14661
|
+
], TieredMenuDirective);
|
|
14662
|
+
|
|
14663
|
+
let TieredMenuModule = class TieredMenuModule {
|
|
14664
|
+
};
|
|
14665
|
+
TieredMenuModule = __decorate([
|
|
14666
|
+
NgModule({
|
|
14667
|
+
imports: [
|
|
14668
|
+
CommonModule,
|
|
14350
14669
|
],
|
|
14351
|
-
|
|
14670
|
+
declarations: [
|
|
14671
|
+
TieredMenuDirective,
|
|
14672
|
+
TieredMenuComponent,
|
|
14673
|
+
TieredMenuNestedComponent,
|
|
14674
|
+
TieredMenuItemComponent,
|
|
14675
|
+
TieredMenuDividerComponent,
|
|
14676
|
+
],
|
|
14677
|
+
exports: [TieredMenuDirective],
|
|
14678
|
+
providers: [TieredMenuGlobalService],
|
|
14352
14679
|
})
|
|
14353
|
-
],
|
|
14680
|
+
], TieredMenuModule);
|
|
14354
14681
|
|
|
14355
|
-
let
|
|
14682
|
+
let NavigationButtonModule = class NavigationButtonModule {
|
|
14356
14683
|
};
|
|
14357
|
-
|
|
14684
|
+
NavigationButtonModule = __decorate([
|
|
14358
14685
|
NgModule({
|
|
14359
|
-
imports: [CommonModule,
|
|
14360
|
-
declarations: [
|
|
14361
|
-
exports: [
|
|
14686
|
+
imports: [CommonModule, TieredMenuModule, TooltipModule],
|
|
14687
|
+
declarations: [NavigationButtonComponent],
|
|
14688
|
+
exports: [NavigationButtonComponent],
|
|
14362
14689
|
})
|
|
14363
|
-
],
|
|
14690
|
+
], NavigationButtonModule);
|
|
14364
14691
|
|
|
14365
|
-
var
|
|
14366
|
-
let
|
|
14692
|
+
var ObjectCardFieldComponent_1;
|
|
14693
|
+
let ObjectCardFieldComponent = ObjectCardFieldComponent_1 = class ObjectCardFieldComponent {
|
|
14367
14694
|
constructor() {
|
|
14368
|
-
this.
|
|
14369
|
-
|
|
14370
|
-
writeValue(value) {
|
|
14371
|
-
if (!this.disabled) {
|
|
14372
|
-
this.value = value;
|
|
14373
|
-
}
|
|
14374
|
-
}
|
|
14375
|
-
registerOnChange(onChange) {
|
|
14376
|
-
this._onChange = onChange;
|
|
14377
|
-
}
|
|
14378
|
-
registerOnTouched(onTouched) {
|
|
14379
|
-
this._onTouched = onTouched;
|
|
14380
|
-
}
|
|
14381
|
-
onSelect(rating) {
|
|
14382
|
-
this.value = rating;
|
|
14383
|
-
if (this._onChange) {
|
|
14384
|
-
this._onChange(this.value);
|
|
14385
|
-
}
|
|
14695
|
+
this.id = `s-object-card-field-${ObjectCardFieldComponent_1.nextId++}`;
|
|
14696
|
+
this.buttonClick = new EventEmitter();
|
|
14386
14697
|
}
|
|
14387
14698
|
};
|
|
14699
|
+
ObjectCardFieldComponent.nextId = 0;
|
|
14388
14700
|
__decorate([
|
|
14389
14701
|
Input()
|
|
14390
|
-
],
|
|
14702
|
+
], ObjectCardFieldComponent.prototype, "id", void 0);
|
|
14391
14703
|
__decorate([
|
|
14392
14704
|
Input()
|
|
14393
|
-
],
|
|
14705
|
+
], ObjectCardFieldComponent.prototype, "imageSource", void 0);
|
|
14394
14706
|
__decorate([
|
|
14395
14707
|
Input()
|
|
14396
|
-
],
|
|
14708
|
+
], ObjectCardFieldComponent.prototype, "imageAlt", void 0);
|
|
14397
14709
|
__decorate([
|
|
14398
14710
|
Input()
|
|
14399
|
-
],
|
|
14400
|
-
|
|
14711
|
+
], ObjectCardFieldComponent.prototype, "iconClass", void 0);
|
|
14712
|
+
__decorate([
|
|
14713
|
+
Input()
|
|
14714
|
+
], ObjectCardFieldComponent.prototype, "label", void 0);
|
|
14715
|
+
__decorate([
|
|
14716
|
+
Input()
|
|
14717
|
+
], ObjectCardFieldComponent.prototype, "description", void 0);
|
|
14718
|
+
__decorate([
|
|
14719
|
+
Input()
|
|
14720
|
+
], ObjectCardFieldComponent.prototype, "buttonLabel", void 0);
|
|
14721
|
+
__decorate([
|
|
14722
|
+
Input()
|
|
14723
|
+
], ObjectCardFieldComponent.prototype, "buttonModel", void 0);
|
|
14724
|
+
__decorate([
|
|
14725
|
+
Output()
|
|
14726
|
+
], ObjectCardFieldComponent.prototype, "buttonClick", void 0);
|
|
14727
|
+
__decorate([
|
|
14728
|
+
ContentChild(ThumbnailComponent, { static: true })
|
|
14729
|
+
], ObjectCardFieldComponent.prototype, "thumbnailComponent", void 0);
|
|
14730
|
+
__decorate([
|
|
14731
|
+
ViewChild(TemplateRef, { static: true })
|
|
14732
|
+
], ObjectCardFieldComponent.prototype, "content", void 0);
|
|
14733
|
+
ObjectCardFieldComponent = ObjectCardFieldComponent_1 = __decorate([
|
|
14401
14734
|
Component({
|
|
14402
|
-
selector: "s-
|
|
14403
|
-
template: "<
|
|
14404
|
-
|
|
14405
|
-
provide: NG_VALUE_ACCESSOR,
|
|
14406
|
-
useExisting: forwardRef(() => RatingScaleComponent_1),
|
|
14407
|
-
multi: true,
|
|
14408
|
-
}],
|
|
14409
|
-
styles: [".rating-scale{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.rating-scale .nodes{display:-ms-flexbox;display:flex}.rating-scale .nodes .node{-ms-flex-align:center;align-items:center;background-color:#fff;border-radius:6px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:center;justify-content:center;margin:0 2px;padding:8px;border:1px solid #7892a1}.rating-scale .nodes .node .icon{color:#6e7280;font-size:1rem}.rating-scale .nodes .node .label{color:#212533;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale .nodes .node .icon,.rating-scale .nodes .node .label{margin:6px}.rating-scale .nodes .node--selected{background-color:#d5e8ec;border-color:#428bca;color:#428bca}.rating-scale .nodes .node:first-child{margin-left:0}.rating-scale .nodes .node:last-child{margin-right:0}.rating-scale .labels{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px 0}.rating-scale .labels span{color:#080808;font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale--disabled{opacity:.5}.rating-scale:not(.rating-scale--disabled) .node{cursor:pointer}.rating-scale:not(.rating-scale--disabled) .node:hover{background-color:#dedce5}.rating-scale:not(.rating-scale--disabled) .node:focus{border-width:2px;outline:0}"]
|
|
14410
|
-
})
|
|
14411
|
-
], RatingScaleComponent);
|
|
14412
|
-
|
|
14413
|
-
let RatingScaleModule = class RatingScaleModule {
|
|
14414
|
-
};
|
|
14415
|
-
RatingScaleModule = __decorate([
|
|
14416
|
-
NgModule({
|
|
14417
|
-
imports: [
|
|
14418
|
-
CommonModule,
|
|
14419
|
-
ReactiveFormsModule,
|
|
14420
|
-
],
|
|
14421
|
-
declarations: [RatingScaleComponent],
|
|
14422
|
-
exports: [RatingScaleComponent],
|
|
14735
|
+
selector: "s-object-card-field",
|
|
14736
|
+
template: "<ng-template>\n <div class=\"container\">\n <ng-content select=\"s-thumbnail\"></ng-content>\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n *ngIf=\"!thumbnailComponent && (imageSource || iconClass)\"\n [imageSource]=\"imageSource\"\n [imageAlt]=\"imageAlt || label\"\n [iconClass]=\"iconClass\"\n size=\"small\"\n ></s-thumbnail>\n\n <div class=\"info-container\">\n <div #labelTemplate><ng-content select=\"[labelTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-label'\"\n *ngIf=\"!labelTemplate.children.length\"\n class=\"label\"\n [pTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select=\"[descriptionTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-description'\"\n *ngIf=\"!descriptionTemplate.children.length\"\n class=\"description\"\n [pTooltip]=\"description\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ description }}</span\n >\n\n <s-button\n [id]=\"id + '-button'\"\n *ngIf=\"buttonLabel\"\n styleClass=\"object-card-button\"\n priority=\"link\"\n [label]=\"buttonLabel\"\n [model]=\"buttonModel\"\n size=\"small\"\n (onClick)=\"buttonClick.emit($event)\"\n ></s-button>\n </div>\n </div>\n</ng-template>\n",
|
|
14737
|
+
styles: [".container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%}.info-container{margin-left:10px}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{color:#999;display:block}.info-container .description{display:block}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.info-container{-ms-flex:1;flex:1}}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}.info-container:only-child{margin-left:0}"]
|
|
14423
14738
|
})
|
|
14424
|
-
],
|
|
14739
|
+
], ObjectCardFieldComponent);
|
|
14425
14740
|
|
|
14426
|
-
var
|
|
14427
|
-
let
|
|
14741
|
+
var ObjectCardMainComponent_1;
|
|
14742
|
+
let ObjectCardMainComponent = ObjectCardMainComponent_1 = class ObjectCardMainComponent {
|
|
14428
14743
|
constructor() {
|
|
14429
|
-
this.
|
|
14430
|
-
this.
|
|
14431
|
-
this.
|
|
14432
|
-
this.
|
|
14433
|
-
this.
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
if (!value)
|
|
14437
|
-
return;
|
|
14438
|
-
this.activeItems.clear();
|
|
14439
|
-
if (Array.isArray(value)) {
|
|
14440
|
-
value.forEach((item) => {
|
|
14441
|
-
this.items.forEach((iItem) => {
|
|
14442
|
-
if (this._compareItems(item, iItem)) {
|
|
14443
|
-
this.activeItems.add(iItem);
|
|
14444
|
-
}
|
|
14445
|
-
});
|
|
14446
|
-
});
|
|
14447
|
-
}
|
|
14448
|
-
else {
|
|
14449
|
-
this.items.forEach((iItem) => {
|
|
14450
|
-
if (this._compareItems(value, iItem)) {
|
|
14451
|
-
this.activeItems.add(iItem);
|
|
14452
|
-
}
|
|
14453
|
-
});
|
|
14454
|
-
}
|
|
14744
|
+
this.id = `s-object-card-main-${ObjectCardMainComponent_1.nextId++}`;
|
|
14745
|
+
this.iconClass = "fa fa-picture-o";
|
|
14746
|
+
this.hasThumbnail = true;
|
|
14747
|
+
this.hasDescription = true;
|
|
14748
|
+
this.isBrand = false;
|
|
14749
|
+
this.buttonClick = new EventEmitter();
|
|
14750
|
+
this._thumbnailSize = ThumbnailSize.Medium;
|
|
14455
14751
|
}
|
|
14456
|
-
|
|
14457
|
-
this.
|
|
14752
|
+
set thumbnailSize(value) {
|
|
14753
|
+
this._thumbnailSize = value;
|
|
14754
|
+
if (this.thumbnailComponent)
|
|
14755
|
+
this.thumbnailComponent.size = value;
|
|
14458
14756
|
}
|
|
14459
|
-
|
|
14460
|
-
this.
|
|
14757
|
+
get thumbnailSize() {
|
|
14758
|
+
return this._thumbnailSize;
|
|
14461
14759
|
}
|
|
14462
|
-
|
|
14463
|
-
this.
|
|
14760
|
+
onResize() {
|
|
14761
|
+
this.update();
|
|
14464
14762
|
}
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
if (this.disabled || item.disabled)
|
|
14468
|
-
return;
|
|
14469
|
-
this.itemClicked.emit(item);
|
|
14470
|
-
if (!this.multiple) {
|
|
14471
|
-
this.activeItems.clear();
|
|
14472
|
-
}
|
|
14473
|
-
this.activeItems.add(item);
|
|
14474
|
-
this.itemSelected.emit([...this.activeItems]);
|
|
14475
|
-
(_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, [...this.activeItems]);
|
|
14476
|
-
(_b = this.onTouched) === null || _b === void 0 ? void 0 : _b.call(this, [...this.activeItems]);
|
|
14763
|
+
ngAfterContentInit() {
|
|
14764
|
+
this.update();
|
|
14477
14765
|
}
|
|
14478
|
-
|
|
14479
|
-
const
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
return false;
|
|
14485
|
-
}
|
|
14486
|
-
if (Array.isArray(a) !== Array.isArray(b)) {
|
|
14487
|
-
return false;
|
|
14488
|
-
}
|
|
14489
|
-
let keysA = Object.keys(a);
|
|
14490
|
-
let keysB = Object.keys(b);
|
|
14491
|
-
if (keysA.length !== keysB.length) {
|
|
14492
|
-
return false;
|
|
14493
|
-
}
|
|
14494
|
-
for (let key of keysA) {
|
|
14495
|
-
if (!keysB.includes(key) || !_compare(a[key], b[key])) {
|
|
14496
|
-
return false;
|
|
14497
|
-
}
|
|
14498
|
-
}
|
|
14499
|
-
for (let key in a) {
|
|
14500
|
-
if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {
|
|
14501
|
-
return false;
|
|
14502
|
-
}
|
|
14503
|
-
}
|
|
14504
|
-
return true;
|
|
14505
|
-
};
|
|
14506
|
-
return _compare(item1, item2);
|
|
14766
|
+
update() {
|
|
14767
|
+
const windowWidth = window.innerWidth;
|
|
14768
|
+
if (windowWidth <= Breakpoints.SM_MAX)
|
|
14769
|
+
this.thumbnailSize = ThumbnailSize.Small;
|
|
14770
|
+
else
|
|
14771
|
+
this.thumbnailSize = ThumbnailSize.Medium;
|
|
14507
14772
|
}
|
|
14508
14773
|
};
|
|
14774
|
+
ObjectCardMainComponent.nextId = 0;
|
|
14509
14775
|
__decorate([
|
|
14510
14776
|
Input()
|
|
14511
|
-
],
|
|
14777
|
+
], ObjectCardMainComponent.prototype, "id", void 0);
|
|
14512
14778
|
__decorate([
|
|
14513
14779
|
Input()
|
|
14514
|
-
],
|
|
14780
|
+
], ObjectCardMainComponent.prototype, "imageSource", void 0);
|
|
14515
14781
|
__decorate([
|
|
14516
|
-
|
|
14517
|
-
],
|
|
14782
|
+
Input()
|
|
14783
|
+
], ObjectCardMainComponent.prototype, "imageFallback", void 0);
|
|
14518
14784
|
__decorate([
|
|
14519
|
-
|
|
14520
|
-
],
|
|
14521
|
-
SelectButtonComponent = SelectButtonComponent_1 = __decorate([
|
|
14522
|
-
Component({
|
|
14523
|
-
selector: "s-select-button",
|
|
14524
|
-
template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n <s-select-button-item\n *ngFor=\"let item of items; index as i\"\n [label]=\"item.label\"\n [active]=\"activeItems?.has(item)\"\n [disabled]=\"disabled || item.disabled\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n</div>",
|
|
14525
|
-
providers: [
|
|
14526
|
-
{
|
|
14527
|
-
provide: NG_VALUE_ACCESSOR,
|
|
14528
|
-
useExisting: forwardRef(() => SelectButtonComponent_1),
|
|
14529
|
-
multi: true,
|
|
14530
|
-
},
|
|
14531
|
-
],
|
|
14532
|
-
styles: [".select-button{overflow:hidden}"]
|
|
14533
|
-
})
|
|
14534
|
-
], SelectButtonComponent);
|
|
14535
|
-
|
|
14536
|
-
let SelectButtonItemComponent = class SelectButtonItemComponent {
|
|
14537
|
-
constructor() {
|
|
14538
|
-
this.active = false;
|
|
14539
|
-
this.first = false;
|
|
14540
|
-
this.last = false;
|
|
14541
|
-
this.disabled = false;
|
|
14542
|
-
}
|
|
14543
|
-
};
|
|
14785
|
+
Input()
|
|
14786
|
+
], ObjectCardMainComponent.prototype, "imageAlt", void 0);
|
|
14544
14787
|
__decorate([
|
|
14545
14788
|
Input()
|
|
14546
|
-
],
|
|
14789
|
+
], ObjectCardMainComponent.prototype, "iconClass", void 0);
|
|
14547
14790
|
__decorate([
|
|
14548
14791
|
Input()
|
|
14549
|
-
],
|
|
14792
|
+
], ObjectCardMainComponent.prototype, "hasThumbnail", void 0);
|
|
14550
14793
|
__decorate([
|
|
14551
14794
|
Input()
|
|
14552
|
-
],
|
|
14795
|
+
], ObjectCardMainComponent.prototype, "hasDescription", void 0);
|
|
14553
14796
|
__decorate([
|
|
14554
14797
|
Input()
|
|
14555
|
-
],
|
|
14798
|
+
], ObjectCardMainComponent.prototype, "isBrand", void 0);
|
|
14556
14799
|
__decorate([
|
|
14557
14800
|
Input()
|
|
14558
|
-
],
|
|
14559
|
-
|
|
14801
|
+
], ObjectCardMainComponent.prototype, "label", void 0);
|
|
14802
|
+
__decorate([
|
|
14803
|
+
Input()
|
|
14804
|
+
], ObjectCardMainComponent.prototype, "description", void 0);
|
|
14805
|
+
__decorate([
|
|
14806
|
+
Input()
|
|
14807
|
+
], ObjectCardMainComponent.prototype, "buttonLabel", void 0);
|
|
14808
|
+
__decorate([
|
|
14809
|
+
Input()
|
|
14810
|
+
], ObjectCardMainComponent.prototype, "buttonModel", void 0);
|
|
14811
|
+
__decorate([
|
|
14812
|
+
Output()
|
|
14813
|
+
], ObjectCardMainComponent.prototype, "buttonClick", void 0);
|
|
14814
|
+
__decorate([
|
|
14815
|
+
ContentChild(ThumbnailComponent, { static: true })
|
|
14816
|
+
], ObjectCardMainComponent.prototype, "thumbnailComponent", void 0);
|
|
14817
|
+
__decorate([
|
|
14818
|
+
HostListener("window:resize")
|
|
14819
|
+
], ObjectCardMainComponent.prototype, "onResize", null);
|
|
14820
|
+
ObjectCardMainComponent = ObjectCardMainComponent_1 = __decorate([
|
|
14560
14821
|
Component({
|
|
14561
|
-
selector: "s-
|
|
14562
|
-
template: "<
|
|
14563
|
-
styles: ["
|
|
14564
|
-
})
|
|
14565
|
-
], SelectButtonItemComponent);
|
|
14566
|
-
|
|
14567
|
-
let SelectButtonModule = class SelectButtonModule {
|
|
14568
|
-
};
|
|
14569
|
-
SelectButtonModule = __decorate([
|
|
14570
|
-
NgModule({
|
|
14571
|
-
imports: [CommonModule],
|
|
14572
|
-
declarations: [
|
|
14573
|
-
SelectButtonComponent,
|
|
14574
|
-
SelectButtonItemComponent,
|
|
14575
|
-
],
|
|
14576
|
-
exports: [SelectButtonComponent],
|
|
14822
|
+
selector: "s-object-card-main",
|
|
14823
|
+
template: "<ng-container *ngIf=\"hasThumbnail\">\n <ng-content select=\"s-thumbnail\"></ng-content>\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n [imageSource]=\"imageSource\"\n [imageFallback]=\"imageFallback\"\n [imageAlt]=\"imageAlt || label\"\n [iconClass]=\"iconClass\"\n [size]=\"thumbnailSize\"\n *ngIf=\"!thumbnailComponent\"\n [isBrand]=\"isBrand\"\n ></s-thumbnail>\n</ng-container>\n\n<ng-container *ngIf=\"hasDescription\">\n <div class=\"info-container\">\n <div #labelTemplate><ng-content select=\"[labelTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-label'\"\n *ngIf=\"!labelTemplate.children.length\"\n class=\"label\"\n [pTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select=\"[descriptionTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-description'\"\n *ngIf=\"!descriptionTemplate.children.length\"\n class=\"description\"\n [pTooltip]=\"description\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ description }}</span\n >\n <s-button\n [id]=\"id + '-button'\"\n *ngIf=\"buttonLabel\"\n styleClass=\"object-card-button\"\n priority=\"link\"\n [label]=\"buttonLabel\"\n [model]=\"buttonModel\"\n size=\"small\"\n (onClick)=\"buttonClick.emit($event)\"\n ></s-button>\n </div>\n</ng-container>\n",
|
|
14824
|
+
styles: [":host{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;min-height:70px}.info-container{margin-left:10px;-ms-flex:1;flex:1}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{display:block;font-weight:700}.info-container .description{color:#999;display:block}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}"]
|
|
14577
14825
|
})
|
|
14578
|
-
],
|
|
14826
|
+
], ObjectCardMainComponent);
|
|
14579
14827
|
|
|
14580
|
-
var
|
|
14581
|
-
|
|
14582
|
-
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14828
|
+
var EnumSeverity;
|
|
14829
|
+
(function (EnumSeverity) {
|
|
14830
|
+
EnumSeverity["Default"] = "Default";
|
|
14831
|
+
EnumSeverity["Info"] = "Info";
|
|
14832
|
+
EnumSeverity["Warn"] = "Warn";
|
|
14833
|
+
EnumSeverity["Error"] = "Error";
|
|
14834
|
+
EnumSeverity["Success"] = "Success";
|
|
14835
|
+
})(EnumSeverity || (EnumSeverity = {}));
|
|
14836
|
+
|
|
14837
|
+
var ObjectCardComponent_1;
|
|
14838
|
+
const elementResizeDetectorMaker = elementResizeDetectorMaker_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
14839
|
+
let ObjectCardComponent = ObjectCardComponent_1 = class ObjectCardComponent {
|
|
14840
|
+
constructor(cdr, elementRef) {
|
|
14841
|
+
this.cdr = cdr;
|
|
14842
|
+
this.elementRef = elementRef;
|
|
14843
|
+
this.id = `s-object-card-${ObjectCardComponent_1.nextId++}`;
|
|
14844
|
+
this.expanded = false;
|
|
14845
|
+
this.expandTooltip = "Abrir painel";
|
|
14846
|
+
this.collapseTooltip = "Fechar painel";
|
|
14847
|
+
this.fieldsMinWidth = 200;
|
|
14848
|
+
this.expandedChange = new EventEmitter();
|
|
14849
|
+
this.maxVisibleFields = 0;
|
|
14850
|
+
this.severity = EnumSeverity.Default;
|
|
14851
|
+
this.EnumSeverity = EnumSeverity;
|
|
14589
14852
|
}
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14853
|
+
ngAfterViewInit() {
|
|
14854
|
+
this.update();
|
|
14855
|
+
this.cdr.detectChanges();
|
|
14856
|
+
this.fields.changes.subscribe(() => {
|
|
14857
|
+
this.update();
|
|
14858
|
+
});
|
|
14859
|
+
const erd = elementResizeDetectorMaker({
|
|
14860
|
+
strategy: "scroll",
|
|
14861
|
+
});
|
|
14862
|
+
erd.listenTo(this.elementRef.nativeElement, () => this.update());
|
|
14594
14863
|
}
|
|
14595
|
-
|
|
14596
|
-
|
|
14864
|
+
update() {
|
|
14865
|
+
const windowWidth = window.innerWidth;
|
|
14866
|
+
const containerWidth = this.elementRef.nativeElement.offsetWidth;
|
|
14867
|
+
const mainFieldWidth = containerWidth * 0.3 > 260 ? containerWidth * 0.3 : 260;
|
|
14868
|
+
const fieldsMinWidth = this.fieldsMinWidth;
|
|
14869
|
+
const expandIconWidth = 50;
|
|
14870
|
+
const fieldElementList = this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");
|
|
14871
|
+
for (const element of fieldElementList) {
|
|
14872
|
+
element.style.minWidth = `${this.fieldsMinWidth}px`;
|
|
14873
|
+
}
|
|
14874
|
+
let maxFieldQtd;
|
|
14875
|
+
if (windowWidth <= Breakpoints.SM_MAX)
|
|
14876
|
+
maxFieldQtd = 0;
|
|
14877
|
+
else
|
|
14878
|
+
maxFieldQtd = Math.floor((containerWidth - mainFieldWidth) / fieldsMinWidth);
|
|
14879
|
+
if (maxFieldQtd && maxFieldQtd < this.fields.length) {
|
|
14880
|
+
maxFieldQtd = Math.floor((containerWidth - mainFieldWidth - expandIconWidth) / fieldsMinWidth);
|
|
14881
|
+
}
|
|
14882
|
+
this.maxVisibleFields = maxFieldQtd;
|
|
14883
|
+
if (maxFieldQtd >= this.fields.length && this.expanded)
|
|
14884
|
+
this.collapse();
|
|
14597
14885
|
}
|
|
14598
|
-
|
|
14599
|
-
|
|
14600
|
-
|
|
14601
|
-
|
|
14886
|
+
toggle() {
|
|
14887
|
+
this.expanded ? this.collapse() : this.expand();
|
|
14888
|
+
}
|
|
14889
|
+
expand() {
|
|
14890
|
+
this.expanded = true;
|
|
14891
|
+
this.expandedChange.emit(this.expanded);
|
|
14892
|
+
}
|
|
14893
|
+
collapse() {
|
|
14894
|
+
this.expanded = false;
|
|
14895
|
+
this.expandedChange.emit(this.expanded);
|
|
14896
|
+
}
|
|
14897
|
+
getExpandedFieldWidth() {
|
|
14898
|
+
const containerWidth = this.elementRef.nativeElement.offsetWidth;
|
|
14899
|
+
let fieldsPerRow;
|
|
14900
|
+
if (containerWidth <= Breakpoints.SM_MAX)
|
|
14901
|
+
fieldsPerRow = 1;
|
|
14902
|
+
else if (containerWidth <= Breakpoints.MD_MAX)
|
|
14903
|
+
fieldsPerRow = 2;
|
|
14904
|
+
else if (containerWidth <= Breakpoints.LG_MAX)
|
|
14905
|
+
fieldsPerRow = 4;
|
|
14906
|
+
else
|
|
14907
|
+
fieldsPerRow = 6;
|
|
14908
|
+
return 12 / fieldsPerRow;
|
|
14602
14909
|
}
|
|
14603
14910
|
};
|
|
14604
|
-
|
|
14605
|
-
|
|
14606
|
-
{ type:
|
|
14911
|
+
ObjectCardComponent.nextId = 0;
|
|
14912
|
+
ObjectCardComponent.ctorParameters = () => [
|
|
14913
|
+
{ type: ChangeDetectorRef },
|
|
14914
|
+
{ type: ElementRef }
|
|
14607
14915
|
];
|
|
14608
14916
|
__decorate([
|
|
14609
14917
|
Input()
|
|
14610
|
-
],
|
|
14918
|
+
], ObjectCardComponent.prototype, "id", void 0);
|
|
14611
14919
|
__decorate([
|
|
14612
14920
|
Input()
|
|
14613
|
-
],
|
|
14921
|
+
], ObjectCardComponent.prototype, "expanded", void 0);
|
|
14614
14922
|
__decorate([
|
|
14615
14923
|
Input()
|
|
14616
|
-
],
|
|
14924
|
+
], ObjectCardComponent.prototype, "expandTooltip", void 0);
|
|
14617
14925
|
__decorate([
|
|
14618
14926
|
Input()
|
|
14619
|
-
],
|
|
14927
|
+
], ObjectCardComponent.prototype, "collapseTooltip", void 0);
|
|
14620
14928
|
__decorate([
|
|
14621
14929
|
Input()
|
|
14622
|
-
],
|
|
14930
|
+
], ObjectCardComponent.prototype, "fieldsMinWidth", void 0);
|
|
14623
14931
|
__decorate([
|
|
14624
14932
|
Output()
|
|
14625
|
-
],
|
|
14933
|
+
], ObjectCardComponent.prototype, "expandedChange", void 0);
|
|
14626
14934
|
__decorate([
|
|
14627
|
-
|
|
14628
|
-
],
|
|
14935
|
+
ContentChild(ObjectCardMainComponent, { static: true })
|
|
14936
|
+
], ObjectCardComponent.prototype, "main", void 0);
|
|
14629
14937
|
__decorate([
|
|
14630
|
-
|
|
14631
|
-
],
|
|
14938
|
+
ContentChildren(ObjectCardFieldComponent, { descendants: true })
|
|
14939
|
+
], ObjectCardComponent.prototype, "fields", void 0);
|
|
14632
14940
|
__decorate([
|
|
14633
|
-
|
|
14634
|
-
],
|
|
14635
|
-
|
|
14941
|
+
Input()
|
|
14942
|
+
], ObjectCardComponent.prototype, "severity", void 0);
|
|
14943
|
+
__decorate([
|
|
14944
|
+
Input()
|
|
14945
|
+
], ObjectCardComponent.prototype, "borderButtonOptions", void 0);
|
|
14946
|
+
ObjectCardComponent = ObjectCardComponent_1 = __decorate([
|
|
14636
14947
|
Component({
|
|
14637
|
-
selector: "s-
|
|
14638
|
-
template: "<
|
|
14639
|
-
|
|
14640
|
-
|
|
14948
|
+
selector: "s-object-card",
|
|
14949
|
+
template: "<div [id]=\"id\" class=\"container\">\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"object-card__border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n\n <div\n [id]=\"id + '-main-container'\"\n class=\"main-container\"\n [ngClass]=\"{\n 'with-hidden-fields': fields.length > maxVisibleFields,\n 'with-visible-fields': fields.length && maxVisibleFields,\n 'main-container--severity-default': severity === EnumSeverity.Default,\n 'main-container--severity-info': severity === EnumSeverity.Info,\n 'main-container--severity-warn': severity === EnumSeverity.Warn,\n 'main-container--severity-error': severity === EnumSeverity.Error,\n 'main-container--severity-success': severity == EnumSeverity.Success\n }\"\n >\n <div class=\"object-content\">\n <div class=\"s-object-card-main\"><ng-content select=\"s-object-card-main\"></ng-content></div>\n\n <div class=\"divider\" *ngIf=\"maxVisibleFields && fields.length\"></div>\n\n <div *ngFor=\"let field of (fields.toArray() | slice: 0:maxVisibleFields)\" class=\"s-object-card-field\">\n <ng-container *ngTemplateOutlet=\"field.content\"></ng-container>\n </div>\n </div>\n\n <div\n [id]=\"id + '-expand-icon-container'\"\n class=\"expand-icon-container\"\n (click)=\"toggle()\"\n [pTooltip]=\"expanded ? collapseTooltip : expandTooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n >\n <span [id]=\"id + '-expand-icon'\" class=\"expand-icon fa\" [ngClass]=\"{ 'fa-minus': expanded, 'fa-plus': !expanded }\"></span>\n </div>\n </div>\n\n <div\n [id]=\"id + '-expandable-container'\"\n [@expandableContent]=\"expanded\"\n class=\"expandable-container\"\n [ngClass]=\"{\n 'expandable-container--severity-default':\n severity === EnumSeverity.Default,\n 'expandable-container--severity-info': severity === EnumSeverity.Info,\n 'expandable-container--severity-warn': severity === EnumSeverity.Warn,\n 'expandable-container--severity-error': severity === EnumSeverity.Error,\n 'expandable-container--severity-success':\n severity == EnumSeverity.Success\n }\"\n >\n <div class=\"ui-g ui-g-12\">\n <ng-container\n *ngFor=\"\n let field of fields.toArray()\n | slice : maxVisibleFields : fields.length\n \"\n >\n <div class=\"ui-g-{{ getExpandedFieldWidth() }}\">\n <div class=\"s-object-card-field\">\n <ng-container\n *ngTemplateOutlet=\"field.content\"\n ></ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n",
|
|
14950
|
+
animations: [
|
|
14951
|
+
trigger("expandableContent", [
|
|
14952
|
+
state("*", style$7({
|
|
14953
|
+
height: "0",
|
|
14954
|
+
})),
|
|
14955
|
+
state("false", style$7({
|
|
14956
|
+
height: "0",
|
|
14957
|
+
})),
|
|
14958
|
+
state("true", style$7({
|
|
14959
|
+
height: "*",
|
|
14960
|
+
})),
|
|
14961
|
+
transition("* => true", animate("200ms ease-out")),
|
|
14962
|
+
transition("false <=> true", animate("200ms ease-out")),
|
|
14963
|
+
]),
|
|
14964
|
+
trigger("BorderButtonAnimation", [
|
|
14965
|
+
transition(":enter", [
|
|
14966
|
+
style$7({ transform: "scaleY(0)", opacity: 0 }),
|
|
14967
|
+
animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
|
|
14968
|
+
]),
|
|
14969
|
+
transition(":leave", [
|
|
14970
|
+
style$7({ transform: "scaleY(1)", opacity: 1 }),
|
|
14971
|
+
animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
|
|
14972
|
+
]),
|
|
14973
|
+
]),
|
|
14974
|
+
],
|
|
14975
|
+
styles: [":host{display:block}.container{margin-bottom:20px;position:relative}.main-container{display:-ms-flexbox;display:flex}.expandable-container,.main-container{background-color:#fff;border:1px solid #ccc;position:relative;overflow:hidden;width:100%}.expandable-container--severity-default{border-color:#ccc;border-top:initial}.expandable-container--severity-info{transition:border-color .5s;border-color:#428bca;border-top:initial}.expandable-container--severity-warn{transition:border-color .5s;border-color:#f8931f;border-top:initial}.expandable-container--severity-error{transition:border-color .5s;border-color:#c13018;border-top:initial}.expandable-container--severity-success{transition:border-color .5s;border-color:#0c9348;border-top:initial}.main-container--severity-default{border-color:#ccc}.main-container--severity-info{transition:border-color .5s;border-color:#428bca}.main-container--severity-warn{transition:border-color .5s;border-color:#f8931f}.main-container--severity-error{transition:border-color .5s;border-color:#c13018}.main-container--severity-success{transition:border-color .5s;border-color:#0c9348}.object-card__border-button{position:absolute;top:-13px;right:15px;z-index:1}.expandable-container{border-top:none;box-shadow:inset 0 6px 4px -4px #ddd;margin-top:-1px}.expand-icon-container{display:none;text-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;width:25px;position:absolute;right:15px;height:25px;top:calc(50% - 12px)}.expand-icon{-ms-flex:1;flex:1}.object-content{display:-ms-flexbox;display:flex;width:100%}.s-object-card-main{-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:1;flex-grow:1;overflow:hidden;padding:15px}.main-container.with-visible-fields .s-object-card-main{max-width:30%}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.main-container.with-visible-fields .s-object-card-main{width:20%}}.s-object-card-field{overflow:hidden;height:100%}.main-container .s-object-card-field{padding:15px}.main-container .divider{width:1px;-ms-flex-negative:0;flex-shrink:0;background-color:#ccc;margin:15px -1px 15px 0}.main-container.with-hidden-fields .object-content{width:calc(100% - 35px)}.main-container.with-hidden-fields .expand-icon-container{display:-ms-flexbox;display:flex}::ng-deep .object-card-button{padding-left:0!important;padding-right:10px!important;border:none!important;height:auto!important;min-width:auto!important;text-align:left!important}@media (max-width:767px){.s-object-card-main{max-width:calc(100% - 50px)}}"]
|
|
14641
14976
|
})
|
|
14642
|
-
],
|
|
14977
|
+
], ObjectCardComponent);
|
|
14643
14978
|
|
|
14644
|
-
let
|
|
14979
|
+
let BorderButtonComponent = class BorderButtonComponent {
|
|
14980
|
+
constructor() {
|
|
14981
|
+
this.severity = EnumSeverity.Default;
|
|
14982
|
+
this.EnumSeverity = EnumSeverity;
|
|
14983
|
+
this.TooltipPosition = TooltipPosition;
|
|
14984
|
+
}
|
|
14645
14985
|
};
|
|
14646
|
-
|
|
14986
|
+
__decorate([
|
|
14987
|
+
Input()
|
|
14988
|
+
], BorderButtonComponent.prototype, "severity", void 0);
|
|
14989
|
+
__decorate([
|
|
14990
|
+
Input()
|
|
14991
|
+
], BorderButtonComponent.prototype, "options", void 0);
|
|
14992
|
+
BorderButtonComponent = __decorate([
|
|
14993
|
+
Component({
|
|
14994
|
+
selector: "s-border-button",
|
|
14995
|
+
template: "<button\n class=\"border-button\"\n [ngClass]=\"{\n 'border-button--severity-default': severity === EnumSeverity.Default,\n 'border-button--severity-info': severity === EnumSeverity.Info,\n 'border-button--severity-warn': severity === EnumSeverity.Warn,\n 'border-button--severity-error': severity === EnumSeverity.Error,\n 'border-button--severity-success': severity == EnumSeverity.Success,\n 'border-button--disabled': options?.disabled\n ? options?.disabled(severity)\n : false\n }\"\n (click)=\"options?.onClick ? options?.onClick(severity) : null\"\n [sTooltip]=\"options?.tooltip ? options?.tooltip(severity) : null\"\n [tooltipPosition]=\"TooltipPosition.Left\"\n [disabled]=\"options?.disabled ? options?.disabled(severity) : false\"\n>\n <span class=\"border-button__label\">\n {{ options?.label ? options?.label(severity) : null }}\n </span>\n <span\n *ngIf=\"options?.icon ? options?.icon(severity) : false\"\n class=\"border-button__icon {{ options?.icon(severity) }}\"\n ></span>\n</button>",
|
|
14996
|
+
styles: [".border-button{padding:0 8px;border:1px solid;border-radius:12px;height:23px;max-width:320px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.border-button__label{font-family:Open Sans,sans-serif;font-size:12px;line-height:150%;width:100%;display:block;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border-button__icon{font-size:12px;color:#333;margin-left:8px}.border-button--severity-default{border-color:#ccc;background-color:#fff}.border-button--severity-info{border-color:#428bca;background-color:#d5e8ec;transition:background-color .5s,border-color .5s}.border-button--severity-info:enabled:hover{background-color:#9ecad4;cursor:pointer}.border-button--severity-info:enabled:active{transition:none;background-color:#67acbc;border-color:#67acbc}.border-button--severity-warn{border-color:#f8931f;background-color:#fce3ba;transition:background-color .5s,border-color .5s}.border-button--severity-warn:enabled:hover{background-color:#f8bf5e;cursor:pointer}.border-button--severity-warn:enabled:active{transition:none;background-color:#f5a319;border-color:#f5a319}.border-button--severity-error{border-color:#c13018;background-color:#fcd2d2;transition:background-color .5s,border-color .5s}.border-button--severity-error:enabled:hover{background-color:#f89696;cursor:pointer}.border-button--severity-error:enabled:active{transition:none;background-color:#f45b5b;border-color:#f45b5b}.border-button--severity-success{border-color:#0c9348;background-color:#e6ffb3;transition:background-color .5s,border-color .5s}.border-button--severity-success:enabled:hover{background-color:#c8ff5c;cursor:pointer}.border-button--severity-success:enabled:active{transition:none;background-color:#ade500;border-color:#ade500}.border-button--disabled:disabled:hover{cursor:default}"]
|
|
14997
|
+
})
|
|
14998
|
+
], BorderButtonComponent);
|
|
14999
|
+
|
|
15000
|
+
let BorderButtonModule = class BorderButtonModule {
|
|
15001
|
+
};
|
|
15002
|
+
BorderButtonModule = __decorate([
|
|
14647
15003
|
NgModule({
|
|
14648
|
-
imports: [CommonModule,
|
|
14649
|
-
declarations: [
|
|
14650
|
-
exports: [
|
|
15004
|
+
imports: [CommonModule, TooltipModule],
|
|
15005
|
+
declarations: [BorderButtonComponent],
|
|
15006
|
+
exports: [BorderButtonComponent]
|
|
14651
15007
|
})
|
|
14652
|
-
],
|
|
15008
|
+
], BorderButtonModule);
|
|
14653
15009
|
|
|
14654
|
-
let
|
|
15010
|
+
let ObjectCardModule = class ObjectCardModule {
|
|
15011
|
+
};
|
|
15012
|
+
ObjectCardModule = __decorate([
|
|
15013
|
+
NgModule({
|
|
15014
|
+
imports: [CommonModule, TooltipModule$1, ThumbnailModule, ButtonModule, BorderButtonModule],
|
|
15015
|
+
declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
|
|
15016
|
+
exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
|
|
15017
|
+
})
|
|
15018
|
+
], ObjectCardModule);
|
|
15019
|
+
|
|
15020
|
+
var ProductHeaderComponent_1;
|
|
15021
|
+
let ProductHeaderComponent = ProductHeaderComponent_1 = class ProductHeaderComponent {
|
|
14655
15022
|
constructor() {
|
|
14656
|
-
this.
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
const panelSubject = new Subject();
|
|
14660
|
-
this.modalCloseMap.set(id, panelSubject);
|
|
14661
|
-
return panelSubject.asObservable();
|
|
14662
|
-
}
|
|
14663
|
-
getModalCloseObservable(id) {
|
|
14664
|
-
return this.modalCloseMap.get(id).asObservable();
|
|
15023
|
+
this.id = `s-product-header-${ProductHeaderComponent_1.nextId++}`;
|
|
15024
|
+
this.baseZIndex = 0;
|
|
15025
|
+
this.isHeaderFrame = true;
|
|
14665
15026
|
}
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
if (
|
|
14669
|
-
|
|
15027
|
+
ngAfterViewInit() {
|
|
15028
|
+
this.container.nativeElement.style.zIndex = String(this.baseZIndex + ++DomHandler.zindex);
|
|
15029
|
+
if (this.isHeaderFrame) {
|
|
15030
|
+
this.container.nativeElement.style.borderBottom = "1px solid $default-secondary-color";
|
|
15031
|
+
}
|
|
15032
|
+
else {
|
|
15033
|
+
this.container.nativeElement.style.borderTop = "1px solid $default-secondary-color";
|
|
14670
15034
|
}
|
|
14671
15035
|
}
|
|
14672
15036
|
};
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
|
|
14692
|
-
|
|
14693
|
-
|
|
14694
|
-
|
|
14695
|
-
|
|
14696
|
-
|
|
14697
|
-
|
|
14698
|
-
|
|
15037
|
+
ProductHeaderComponent.nextId = 0;
|
|
15038
|
+
__decorate([
|
|
15039
|
+
Input()
|
|
15040
|
+
], ProductHeaderComponent.prototype, "id", void 0);
|
|
15041
|
+
__decorate([
|
|
15042
|
+
Input()
|
|
15043
|
+
], ProductHeaderComponent.prototype, "header", void 0);
|
|
15044
|
+
__decorate([
|
|
15045
|
+
Input()
|
|
15046
|
+
], ProductHeaderComponent.prototype, "baseZIndex", void 0);
|
|
15047
|
+
__decorate([
|
|
15048
|
+
Input()
|
|
15049
|
+
], ProductHeaderComponent.prototype, "isHeaderFrame", void 0);
|
|
15050
|
+
__decorate([
|
|
15051
|
+
ViewChild("headerContainer", { static: false })
|
|
15052
|
+
], ProductHeaderComponent.prototype, "container", void 0);
|
|
15053
|
+
ProductHeaderComponent = ProductHeaderComponent_1 = __decorate([
|
|
15054
|
+
Component({
|
|
15055
|
+
selector: "s-product-header",
|
|
15056
|
+
template: "<div [id]=\"id\" class=\"box\">\n <div\n #headerContainer\n class=\"sds-container\"\n [class]=\"isHeaderFrame ? 'header-frame' : 'primary-header'\"\n >\n <h1 [class]=\"isHeaderFrame ? 'title' : 'primary-title'\">{{ header }}</h1>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n",
|
|
15057
|
+
styles: [".box{position:relative;width:100%;height:70px}.header-frame{padding-top:15px;padding-bottom:15px;width:100%;top:0;left:0;height:70px;background-color:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;position:fixed}.title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{display:-ms-flexbox;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.primary-header{display:-ms-flexbox;display:flex;width:100%;height:70px;padding:15px 20px;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;border-bottom:1px solid #ddd;background-color:#fff;gap:24px}@media (max-width:768px){.primary-header{width:100%}}.primary-header .primary-title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis}"]
|
|
15058
|
+
})
|
|
15059
|
+
], ProductHeaderComponent);
|
|
15060
|
+
|
|
15061
|
+
let ProductHeaderModule = class ProductHeaderModule {
|
|
15062
|
+
};
|
|
15063
|
+
ProductHeaderModule = __decorate([
|
|
15064
|
+
NgModule({
|
|
15065
|
+
imports: [CommonModule, TooltipModule$1, ThumbnailModule],
|
|
15066
|
+
declarations: [ProductHeaderComponent],
|
|
15067
|
+
exports: [ProductHeaderComponent, ThumbnailModule],
|
|
15068
|
+
})
|
|
15069
|
+
], ProductHeaderModule);
|
|
15070
|
+
|
|
15071
|
+
var ProgressBarColors;
|
|
15072
|
+
(function (ProgressBarColors) {
|
|
15073
|
+
ProgressBarColors["Blue"] = "blue";
|
|
15074
|
+
ProgressBarColors["Green"] = "green";
|
|
15075
|
+
ProgressBarColors["Red"] = "red";
|
|
15076
|
+
ProgressBarColors["Yellow"] = "yellow";
|
|
15077
|
+
})(ProgressBarColors || (ProgressBarColors = {}));
|
|
15078
|
+
|
|
15079
|
+
var ProgressBarMode;
|
|
15080
|
+
(function (ProgressBarMode) {
|
|
15081
|
+
ProgressBarMode["Determinate"] = "determinate";
|
|
15082
|
+
ProgressBarMode["Indeterminate"] = "indeterminate";
|
|
15083
|
+
})(ProgressBarMode || (ProgressBarMode = {}));
|
|
15084
|
+
|
|
15085
|
+
let ProgressBarComponent = class ProgressBarComponent {
|
|
15086
|
+
constructor() {
|
|
15087
|
+
this.numberFormatOptions = {
|
|
15088
|
+
style: "decimal",
|
|
15089
|
+
minimumFractionDigits: 0,
|
|
15090
|
+
maximumFractionDigits: 2,
|
|
15091
|
+
};
|
|
15092
|
+
this.showValue = true;
|
|
15093
|
+
this.mode = ProgressBarMode.Determinate;
|
|
14699
15094
|
}
|
|
14700
15095
|
ngOnInit() {
|
|
14701
|
-
this.
|
|
14702
|
-
this.slidePanelService.createSlidePanel(this.id)
|
|
14703
|
-
.pipe(takeUntil(this._unsubscribe$))
|
|
14704
|
-
.subscribe(() => {
|
|
14705
|
-
this.isOpen = false;
|
|
14706
|
-
});
|
|
14707
|
-
}
|
|
14708
|
-
ngAfterViewInit() {
|
|
14709
|
-
queueMicrotask(() => {
|
|
14710
|
-
if (this.createOpen) {
|
|
14711
|
-
this.isOpen = true;
|
|
14712
|
-
}
|
|
14713
|
-
});
|
|
14714
|
-
}
|
|
14715
|
-
ngAfterViewChecked() {
|
|
14716
|
-
// to executed at a safe time prior to control returning to the browser's event loop
|
|
14717
|
-
queueMicrotask(() => {
|
|
14718
|
-
this._calculateSlideHeight();
|
|
14719
|
-
this._calculateSideContentWidth();
|
|
14720
|
-
this.isContentAnimationDisabled = false;
|
|
14721
|
-
});
|
|
14722
|
-
}
|
|
14723
|
-
ngOnDestroy() {
|
|
14724
|
-
this._unsubscribe$.next();
|
|
14725
|
-
this._unsubscribe$.complete();
|
|
15096
|
+
this.validateInputs();
|
|
14726
15097
|
}
|
|
14727
|
-
|
|
14728
|
-
if (this.
|
|
14729
|
-
|
|
15098
|
+
validateInputs() {
|
|
15099
|
+
if (this.value < 0 || this.value > 100) {
|
|
15100
|
+
throw new Error("Invalid value for value");
|
|
14730
15101
|
}
|
|
14731
|
-
this.
|
|
14732
|
-
|
|
14733
|
-
this.panelOpened.emit();
|
|
15102
|
+
if (this.targetValue < 0 || this.targetValue > 100) {
|
|
15103
|
+
throw new Error("Invalid value for targetValue");
|
|
14734
15104
|
}
|
|
14735
|
-
|
|
14736
|
-
|
|
15105
|
+
if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
|
|
15106
|
+
throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
|
|
14737
15107
|
}
|
|
14738
15108
|
}
|
|
14739
|
-
onContentAnimationStart() {
|
|
14740
|
-
this.isAnimating = true;
|
|
14741
|
-
}
|
|
14742
|
-
onContentAnimationDone() {
|
|
14743
|
-
this.isAnimating = false;
|
|
14744
|
-
this._calculateSideContentWidth();
|
|
14745
|
-
}
|
|
14746
|
-
_checkOverBehavior() {
|
|
14747
|
-
this.isSlideOver = window.innerWidth <= SMALL_DEVICE_BREAKPOINT;
|
|
14748
|
-
}
|
|
14749
|
-
_calculateSlideHeight() {
|
|
14750
|
-
this.slideHeight = this._sideContentRef.nativeElement.clientHeight;
|
|
14751
|
-
}
|
|
14752
|
-
_calculateSideContentWidth() {
|
|
14753
|
-
const slidePanelWidth = this._slidePanelRef.nativeElement.getBoundingClientRect().width;
|
|
14754
|
-
const slideContentWidth = this._slideContentRef.nativeElement.getBoundingClientRect().width;
|
|
14755
|
-
this.sideContentWidth = slidePanelWidth - slideContentWidth;
|
|
14756
|
-
}
|
|
14757
15109
|
};
|
|
14758
|
-
SlidePanelComponent.nextId = 0;
|
|
14759
|
-
SlidePanelComponent.ctorParameters = () => [
|
|
14760
|
-
{ type: SlidePanelService }
|
|
14761
|
-
];
|
|
14762
15110
|
__decorate([
|
|
14763
15111
|
Input()
|
|
14764
|
-
],
|
|
15112
|
+
], ProgressBarComponent.prototype, "value", void 0);
|
|
14765
15113
|
__decorate([
|
|
14766
15114
|
Input()
|
|
14767
|
-
],
|
|
15115
|
+
], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
|
|
14768
15116
|
__decorate([
|
|
14769
15117
|
Input()
|
|
14770
|
-
],
|
|
15118
|
+
], ProgressBarComponent.prototype, "targetValue", void 0);
|
|
14771
15119
|
__decorate([
|
|
14772
15120
|
Input()
|
|
14773
|
-
],
|
|
15121
|
+
], ProgressBarComponent.prototype, "label", void 0);
|
|
14774
15122
|
__decorate([
|
|
14775
15123
|
Input()
|
|
14776
|
-
],
|
|
14777
|
-
__decorate([
|
|
14778
|
-
Output()
|
|
14779
|
-
], SlidePanelComponent.prototype, "panelOpened", void 0);
|
|
14780
|
-
__decorate([
|
|
14781
|
-
Output()
|
|
14782
|
-
], SlidePanelComponent.prototype, "panelClosed", void 0);
|
|
14783
|
-
__decorate([
|
|
14784
|
-
ViewChild("slidePanel")
|
|
14785
|
-
], SlidePanelComponent.prototype, "_slidePanelRef", void 0);
|
|
15124
|
+
], ProgressBarComponent.prototype, "targetLabel", void 0);
|
|
14786
15125
|
__decorate([
|
|
14787
|
-
|
|
14788
|
-
],
|
|
15126
|
+
Input()
|
|
15127
|
+
], ProgressBarComponent.prototype, "activeColor", void 0);
|
|
14789
15128
|
__decorate([
|
|
14790
|
-
|
|
14791
|
-
],
|
|
15129
|
+
Input()
|
|
15130
|
+
], ProgressBarComponent.prototype, "showValue", void 0);
|
|
14792
15131
|
__decorate([
|
|
14793
|
-
|
|
14794
|
-
],
|
|
14795
|
-
|
|
15132
|
+
Input()
|
|
15133
|
+
], ProgressBarComponent.prototype, "mode", void 0);
|
|
15134
|
+
ProgressBarComponent = __decorate([
|
|
14796
15135
|
Component({
|
|
14797
|
-
selector: "s-
|
|
14798
|
-
template: "<
|
|
14799
|
-
|
|
14800
|
-
trigger("cachelessAnimation", [
|
|
14801
|
-
transition(":enter", [
|
|
14802
|
-
style$7({ width: "0" }),
|
|
14803
|
-
animate("200ms linear", style$7({ width: "*" })),
|
|
14804
|
-
]),
|
|
14805
|
-
transition(":leave", [
|
|
14806
|
-
style$7({ width: "*" }),
|
|
14807
|
-
animate("200ms linear", style$7({ width: "0" })),
|
|
14808
|
-
]),
|
|
14809
|
-
]),
|
|
14810
|
-
trigger("cacheAnimation", [
|
|
14811
|
-
state("true", style$7({ width: "*", padding: '0 16px' })),
|
|
14812
|
-
state("false", style$7({ width: '0px', padding: '0' })),
|
|
14813
|
-
transition("* => *", animate("200ms")),
|
|
14814
|
-
]),
|
|
14815
|
-
],
|
|
14816
|
-
styles: [".slide-panel{display:-ms-flexbox;display:flex;width:100%}.slide-panel .slide-content{display:-ms-flexbox;display:flex;position:relative}.slide-panel .slide-content .main-container{background-color:#eeebf2;display:-ms-flexbox;display:flex;border:1px solid #ccc;overflow:hidden;position:relative}.slide-panel .slide-content .main-container .content-container{overflow-y:auto;overflow-x:hidden;padding:16px}.slide-panel .slide-content .button{-ms-flex-align:center;align-items:center;background-color:#eeebf2;border:1px solid #ccc;border-left:none;border-radius:0 4px 4px 0;cursor:pointer;display:-ms-flexbox;display:flex;font-family:\"Font Awesome 5 Pro\";font-size:16px;height:32px;-ms-flex-pack:center;justify-content:center;position:absolute;right:-32px;top:16px;width:32px;z-index:99}.slide-panel .slide-content--closed .main-container{border:none}.slide-panel .slide-content--over{position:absolute}.slide-panel .side-content{display:-ms-flexbox;display:flex;height:-webkit-max-content;height:max-content;overflow:auto;transition:width .1s linear}"]
|
|
14817
|
-
})
|
|
14818
|
-
], SlidePanelComponent);
|
|
14819
|
-
|
|
14820
|
-
let SlidePanelModule = class SlidePanelModule {
|
|
14821
|
-
};
|
|
14822
|
-
SlidePanelModule = __decorate([
|
|
14823
|
-
NgModule({
|
|
14824
|
-
imports: [CommonModule],
|
|
14825
|
-
declarations: [SlidePanelComponent],
|
|
14826
|
-
exports: [SlidePanelComponent],
|
|
14827
|
-
providers: [SlidePanelService],
|
|
15136
|
+
selector: "s-progressbar",
|
|
15137
|
+
template: "<ng-container *ngIf=\"mode === 'determinate'; then pbDeterminateTemplate else pbIndeterminateTemplate\"></ng-container>\n\n<ng-template #pbDeterminateTemplate>\n <s-progressbar-determinate\n [value]=\"value\"\n [numberFormatOptions]=\"numberFormatOptions\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\">\n </s-progressbar-determinate>\n</ng-template>\n\n<ng-template #pbIndeterminateTemplate>\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\">\n </s-progressbar-indeterminate>\n</ng-template>",
|
|
15138
|
+
styles: [".progress-bar{position:relative}.progress-bar .progress-bar-all{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progress-bar .progress-bar-all .progress-bar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progress-bar .progress-bar-all .progress-bar-active--blue{background-color:#428bca}.progress-bar .progress-bar-all .progress-bar-active--green{background-color:#0c9348}.progress-bar .progress-bar-all .progress-bar-active--red{background-color:#c13018}.progress-bar .progress-bar-all .progress-bar-active--yellow{background-color:#fcbf10}.progress-bar .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progress-bar .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progress-bar .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
|
|
14828
15139
|
})
|
|
14829
|
-
],
|
|
14830
|
-
|
|
14831
|
-
var SplitButtonType;
|
|
14832
|
-
(function (SplitButtonType) {
|
|
14833
|
-
SplitButtonType["Primary"] = "primary";
|
|
14834
|
-
SplitButtonType["Secondary"] = "secondary";
|
|
14835
|
-
SplitButtonType["Default"] = "default";
|
|
14836
|
-
})(SplitButtonType || (SplitButtonType = {}));
|
|
15140
|
+
], ProgressBarComponent);
|
|
14837
15141
|
|
|
14838
|
-
let
|
|
14839
|
-
constructor(
|
|
14840
|
-
this.
|
|
14841
|
-
this.
|
|
14842
|
-
this.type = SplitButtonType.Primary;
|
|
14843
|
-
this.buttonClicked = new EventEmitter();
|
|
14844
|
-
this.open = false;
|
|
15142
|
+
let ProgressBarDeterminateComponent = class ProgressBarDeterminateComponent {
|
|
15143
|
+
constructor(localeService) {
|
|
15144
|
+
this.localeService = localeService;
|
|
15145
|
+
this.showValue = true;
|
|
14845
15146
|
}
|
|
14846
|
-
|
|
14847
|
-
|
|
14848
|
-
|
|
14849
|
-
}
|
|
15147
|
+
ngOnInit() {
|
|
15148
|
+
this.validateValues();
|
|
15149
|
+
this.onGetLocale();
|
|
14850
15150
|
}
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
|
|
15151
|
+
onGetLocale() {
|
|
15152
|
+
this.localeService.getLocale().subscribe({
|
|
15153
|
+
next: (locale) => {
|
|
15154
|
+
this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", this.numberFormatOptions);
|
|
15155
|
+
},
|
|
15156
|
+
error: () => {
|
|
15157
|
+
this.numberFormat = new Intl.NumberFormat("pt-BR", this.numberFormatOptions);
|
|
15158
|
+
},
|
|
15159
|
+
});
|
|
14856
15160
|
}
|
|
14857
|
-
|
|
14858
|
-
if (
|
|
14859
|
-
|
|
15161
|
+
validateValues() {
|
|
15162
|
+
if (this.value < 0 || this.value > 100) {
|
|
15163
|
+
throw new Error("Invalid value for value");
|
|
15164
|
+
}
|
|
15165
|
+
if (this.targetValue < 0 || this.targetValue > 100) {
|
|
15166
|
+
throw new Error("Invalid value for targetValue");
|
|
14860
15167
|
}
|
|
14861
|
-
}
|
|
14862
|
-
onOptionClick(option) {
|
|
14863
|
-
option.action && option.action();
|
|
14864
|
-
this.closeDropdown();
|
|
14865
|
-
}
|
|
14866
|
-
closeDropdown() {
|
|
14867
|
-
this.open = false;
|
|
14868
15168
|
}
|
|
14869
15169
|
};
|
|
14870
|
-
|
|
14871
|
-
{ type:
|
|
15170
|
+
ProgressBarDeterminateComponent.ctorParameters = () => [
|
|
15171
|
+
{ type: LocaleService }
|
|
14872
15172
|
];
|
|
14873
15173
|
__decorate([
|
|
14874
15174
|
Input()
|
|
14875
|
-
],
|
|
15175
|
+
], ProgressBarDeterminateComponent.prototype, "value", void 0);
|
|
14876
15176
|
__decorate([
|
|
14877
15177
|
Input()
|
|
14878
|
-
],
|
|
15178
|
+
], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
|
|
14879
15179
|
__decorate([
|
|
14880
15180
|
Input()
|
|
14881
|
-
],
|
|
15181
|
+
], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
|
|
14882
15182
|
__decorate([
|
|
14883
15183
|
Input()
|
|
14884
|
-
],
|
|
15184
|
+
], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
|
|
14885
15185
|
__decorate([
|
|
14886
15186
|
Input()
|
|
14887
|
-
],
|
|
15187
|
+
], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
|
|
14888
15188
|
__decorate([
|
|
14889
|
-
|
|
14890
|
-
],
|
|
15189
|
+
Input()
|
|
15190
|
+
], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
|
|
15191
|
+
ProgressBarDeterminateComponent = __decorate([
|
|
15192
|
+
Component({
|
|
15193
|
+
selector: "s-progressbar-determinate",
|
|
15194
|
+
template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue' : activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n\n {{ showValue && value ? numberFormat.format(value) + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat.format(value) + '%' }}\n </span>\n </div>\n </div>\n",
|
|
15195
|
+
styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
|
|
15196
|
+
})
|
|
15197
|
+
], ProgressBarDeterminateComponent);
|
|
15198
|
+
|
|
15199
|
+
let ProgressBarIndeterminateComponent = class ProgressBarIndeterminateComponent {
|
|
15200
|
+
};
|
|
14891
15201
|
__decorate([
|
|
14892
|
-
|
|
14893
|
-
],
|
|
14894
|
-
|
|
15202
|
+
Input()
|
|
15203
|
+
], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
|
|
15204
|
+
__decorate([
|
|
15205
|
+
Input()
|
|
15206
|
+
], ProgressBarIndeterminateComponent.prototype, "label", void 0);
|
|
15207
|
+
ProgressBarIndeterminateComponent = __decorate([
|
|
14895
15208
|
Component({
|
|
14896
|
-
selector: "s-
|
|
14897
|
-
template: "<div class=\"
|
|
14898
|
-
styles: [".
|
|
15209
|
+
selector: "s-progressbar-indeterminate",
|
|
15210
|
+
template: "<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n <span *ngIf=\"label\" class=\"progressbar-label\">{{ label }}</span>\n</div>\n",
|
|
15211
|
+
styles: [".progressbar-indeterminate{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.progressbar-indeterminate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;margin:8px 0;overflow:hidden;width:100%}.progressbar-indeterminate .indeterminate-bar{animation:5s infinite indeterminate-progress;background-color:#428bca;height:100%;width:40%}.progressbar-indeterminate .indeterminate-bar--blue{background-color:#428bca}.progressbar-indeterminate .indeterminate-bar--green{background-color:#0c9348}.progressbar-indeterminate .indeterminate-bar--red{background-color:#c13018}.progressbar-indeterminate .indeterminate-bar--yellow{background-color:#fcbf10}.progressbar-indeterminate .progressbar-label{font-family:\"Open Sans\" sans-serif;font-size:12px;line-height:150%;color:#212533}@keyframes indeterminate-progress{0%{transform:translateX(-250%)}100%{transform:translateX(250%)}}"]
|
|
14899
15212
|
})
|
|
14900
|
-
],
|
|
15213
|
+
], ProgressBarIndeterminateComponent);
|
|
14901
15214
|
|
|
14902
|
-
let
|
|
15215
|
+
let ProgressBarModule = class ProgressBarModule {
|
|
14903
15216
|
};
|
|
14904
|
-
|
|
15217
|
+
ProgressBarModule = __decorate([
|
|
14905
15218
|
NgModule({
|
|
14906
15219
|
imports: [CommonModule],
|
|
14907
|
-
declarations: [
|
|
14908
|
-
|
|
15220
|
+
declarations: [
|
|
15221
|
+
ProgressBarComponent,
|
|
15222
|
+
ProgressBarDeterminateComponent,
|
|
15223
|
+
ProgressBarIndeterminateComponent,
|
|
15224
|
+
],
|
|
15225
|
+
exports: [ProgressBarComponent],
|
|
14909
15226
|
})
|
|
14910
|
-
],
|
|
15227
|
+
], ProgressBarModule);
|
|
14911
15228
|
|
|
14912
|
-
|
|
14913
|
-
let StatsCardComponent = StatsCardComponent_1 = class StatsCardComponent {
|
|
15229
|
+
let PanelComponent = class PanelComponent {
|
|
14914
15230
|
constructor() {
|
|
14915
|
-
this.
|
|
14916
|
-
this.
|
|
14917
|
-
this.
|
|
14918
|
-
this.
|
|
14919
|
-
this.
|
|
14920
|
-
this.color = "#339966";
|
|
14921
|
-
this.animateNumbers = true;
|
|
14922
|
-
this.clickable = false;
|
|
14923
|
-
this.tooltip = "";
|
|
14924
|
-
this.onClick = new EventEmitter();
|
|
14925
|
-
this.ANIMATION_DURATION_MS = 200;
|
|
14926
|
-
this.STEP_DURATION_MS = 20;
|
|
14927
|
-
this.previousValue = "0";
|
|
14928
|
-
this._value = "0";
|
|
14929
|
-
}
|
|
14930
|
-
set value(value) {
|
|
14931
|
-
this.previousValue = this._value;
|
|
14932
|
-
this._value = String(value);
|
|
14933
|
-
if (this.animateNumbers)
|
|
14934
|
-
this.updateDisplayValue();
|
|
14935
|
-
else
|
|
14936
|
-
this.displayValue = this.value;
|
|
14937
|
-
}
|
|
14938
|
-
get value() {
|
|
14939
|
-
return this._value;
|
|
14940
|
-
}
|
|
14941
|
-
updateDisplayValue() {
|
|
14942
|
-
const animationDuration = new BigNumber$1(this.ANIMATION_DURATION_MS);
|
|
14943
|
-
const stepDuration = new BigNumber$1(this.STEP_DURATION_MS);
|
|
14944
|
-
const animationCount = animationDuration.dividedBy(stepDuration);
|
|
14945
|
-
const previousRawValue = new BigNumber$1(this.previousValue.replace(/\D/g, ""));
|
|
14946
|
-
const rawValue = new BigNumber$1(this.value.replace(/\D/g, ""));
|
|
14947
|
-
const incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(animationCount);
|
|
14948
|
-
const incremental = previousRawValue.isLessThan(rawValue);
|
|
14949
|
-
clearInterval(this.intervalId);
|
|
14950
|
-
this.displayValue = this.replaceNumericPositions(this.value);
|
|
14951
|
-
let counter = previousRawValue;
|
|
14952
|
-
this.intervalId = setInterval(() => {
|
|
14953
|
-
if (incremental && counter.isLessThan(rawValue)) {
|
|
14954
|
-
this.displayValue = this.replaceNumericPositions(this.displayValue, counter);
|
|
14955
|
-
counter = counter.plus(incrementValue);
|
|
14956
|
-
}
|
|
14957
|
-
else if (!incremental && counter.isGreaterThan(rawValue)) {
|
|
14958
|
-
this.displayValue = this.replaceNumericPositions(this.displayValue, counter);
|
|
14959
|
-
counter = counter.minus(incrementValue);
|
|
14960
|
-
}
|
|
14961
|
-
else {
|
|
14962
|
-
this.displayValue = this.value;
|
|
14963
|
-
clearInterval(this.intervalId);
|
|
14964
|
-
}
|
|
14965
|
-
}, this.STEP_DURATION_MS);
|
|
15231
|
+
this.toggleable = true;
|
|
15232
|
+
this.collapsed = false;
|
|
15233
|
+
this.severity = EnumSeverity.Default;
|
|
15234
|
+
this.collapsedChange = new EventEmitter();
|
|
15235
|
+
this.EnumSeverity = EnumSeverity;
|
|
14966
15236
|
}
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
const formattedNewValue = newValueString
|
|
14971
|
-
.toString()
|
|
14972
|
-
.replace(/\D/g, "")
|
|
14973
|
-
.padStart(rawValue.length, "0");
|
|
14974
|
-
let newValueIndex = 0;
|
|
14975
|
-
return value
|
|
14976
|
-
.split("")
|
|
14977
|
-
.map(char => {
|
|
14978
|
-
const number = Number(char);
|
|
14979
|
-
if (number || char === "0")
|
|
14980
|
-
return formattedNewValue[newValueIndex++];
|
|
14981
|
-
return char;
|
|
14982
|
-
})
|
|
14983
|
-
.join("");
|
|
15237
|
+
onCollapsedChange(collapsed) {
|
|
15238
|
+
this.collapsed = collapsed;
|
|
15239
|
+
this.collapsedChange.emit(this.collapsed);
|
|
14984
15240
|
}
|
|
14985
15241
|
};
|
|
14986
|
-
StatsCardComponent.nextId = 0;
|
|
14987
|
-
__decorate([
|
|
14988
|
-
Input()
|
|
14989
|
-
], StatsCardComponent.prototype, "id", void 0);
|
|
14990
|
-
__decorate([
|
|
14991
|
-
Input()
|
|
14992
|
-
], StatsCardComponent.prototype, "label", void 0);
|
|
14993
|
-
__decorate([
|
|
14994
|
-
Input()
|
|
14995
|
-
], StatsCardComponent.prototype, "alwaysWithBorder", void 0);
|
|
14996
|
-
__decorate([
|
|
14997
|
-
Input()
|
|
14998
|
-
], StatsCardComponent.prototype, "lightVersion", void 0);
|
|
14999
|
-
__decorate([
|
|
15000
|
-
Input()
|
|
15001
|
-
], StatsCardComponent.prototype, "lightMode", void 0);
|
|
15002
15242
|
__decorate([
|
|
15003
15243
|
Input()
|
|
15004
|
-
],
|
|
15005
|
-
__decorate([
|
|
15006
|
-
Input()
|
|
15007
|
-
], StatsCardComponent.prototype, "color", void 0);
|
|
15244
|
+
], PanelComponent.prototype, "header", void 0);
|
|
15008
15245
|
__decorate([
|
|
15009
15246
|
Input()
|
|
15010
|
-
],
|
|
15247
|
+
], PanelComponent.prototype, "toggleable", void 0);
|
|
15011
15248
|
__decorate([
|
|
15012
15249
|
Input()
|
|
15013
|
-
],
|
|
15250
|
+
], PanelComponent.prototype, "collapsed", void 0);
|
|
15014
15251
|
__decorate([
|
|
15015
15252
|
Input()
|
|
15016
|
-
],
|
|
15253
|
+
], PanelComponent.prototype, "severity", void 0);
|
|
15017
15254
|
__decorate([
|
|
15018
15255
|
Input()
|
|
15019
|
-
],
|
|
15256
|
+
], PanelComponent.prototype, "borderButtonOptions", void 0);
|
|
15020
15257
|
__decorate([
|
|
15021
15258
|
Output()
|
|
15022
|
-
],
|
|
15023
|
-
|
|
15259
|
+
], PanelComponent.prototype, "collapsedChange", void 0);
|
|
15260
|
+
PanelComponent = __decorate([
|
|
15024
15261
|
Component({
|
|
15025
|
-
selector: "s-
|
|
15026
|
-
template: "<
|
|
15027
|
-
|
|
15028
|
-
|
|
15262
|
+
selector: "s-panel",
|
|
15263
|
+
template: "<p-panel\n [toggleable]=\"toggleable\"\n [collapsed]=\"collapsed\"\n [ngClass]=\"{\n 'panel--severity-default': severity === EnumSeverity.Default,\n 'panel--severity-info': severity === EnumSeverity.Info,\n 'panel--severity-warn': severity === EnumSeverity.Warn,\n 'panel--severity-error': severity === EnumSeverity.Error,\n 'panel--severity-success': severity == EnumSeverity.Success\n }\"\n (collapsedChange)=\"onCollapsedChange($event)\"\n>\n <p-header>\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"panel__border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n <span>\n {{ header }}\n </span>\n </p-header>\n\n <ng-content></ng-content>\n</p-panel>",
|
|
15264
|
+
animations: [
|
|
15265
|
+
trigger("BorderButtonAnimation", [
|
|
15266
|
+
transition(":enter", [
|
|
15267
|
+
style$7({ transform: "scaleY(0)", opacity: 0 }),
|
|
15268
|
+
animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
|
|
15269
|
+
]),
|
|
15270
|
+
transition(":leave", [
|
|
15271
|
+
style$7({ transform: "scaleY(1)", opacity: 1 }),
|
|
15272
|
+
animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
|
|
15273
|
+
]),
|
|
15274
|
+
]),
|
|
15275
|
+
],
|
|
15276
|
+
styles: [":host{display:block}:host ::ng-deep .ui-panel{position:relative}:host ::ng-deep .panel--severity-default .ui-panel{border-color:#ccc}:host ::ng-deep .panel--severity-info .ui-panel{border-color:#428bca;transition:border-color .5s}:host ::ng-deep .panel--severity-warn .ui-panel{border-color:#f8931f;transition:border-color .5s}:host ::ng-deep .panel--severity-error .ui-panel{border-color:#c13018;transition:border-color .5s}:host ::ng-deep .panel--severity-success .ui-panel{border-color:#0c9348;transition:border-color .5s}.panel__border-button{position:absolute;top:-13px;right:15px;z-index:1}"]
|
|
15029
15277
|
})
|
|
15030
|
-
],
|
|
15278
|
+
], PanelComponent);
|
|
15031
15279
|
|
|
15032
|
-
let
|
|
15280
|
+
let PanelModule = class PanelModule {
|
|
15033
15281
|
};
|
|
15034
|
-
|
|
15282
|
+
PanelModule = __decorate([
|
|
15035
15283
|
NgModule({
|
|
15036
|
-
imports: [
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
],
|
|
15040
|
-
declarations: [
|
|
15041
|
-
StatsCardComponent,
|
|
15042
|
-
],
|
|
15043
|
-
exports: [
|
|
15044
|
-
StatsCardComponent,
|
|
15045
|
-
],
|
|
15284
|
+
imports: [CommonModule, PanelModule$1, BorderButtonModule],
|
|
15285
|
+
declarations: [PanelComponent],
|
|
15286
|
+
exports: [PanelComponent],
|
|
15046
15287
|
})
|
|
15047
|
-
],
|
|
15288
|
+
], PanelModule);
|
|
15048
15289
|
|
|
15049
|
-
var
|
|
15050
|
-
|
|
15051
|
-
(function (StepState) {
|
|
15052
|
-
StepState["Default"] = "default";
|
|
15053
|
-
StepState["Success"] = "success";
|
|
15054
|
-
StepState["Warning"] = "warning";
|
|
15055
|
-
})(StepState || (StepState = {}));
|
|
15056
|
-
let StepsComponent = StepsComponent_1 = class StepsComponent {
|
|
15290
|
+
var RatingScaleComponent_1;
|
|
15291
|
+
let RatingScaleComponent = RatingScaleComponent_1 = class RatingScaleComponent {
|
|
15057
15292
|
constructor() {
|
|
15058
|
-
this.
|
|
15059
|
-
this.activeIndex = 0;
|
|
15060
|
-
this.stepSelected = new EventEmitter();
|
|
15061
|
-
}
|
|
15062
|
-
stepClick(step, index, event) {
|
|
15063
|
-
if (step.disabled || index == this.activeIndex)
|
|
15064
|
-
return;
|
|
15065
|
-
this.stepSelected.emit({ step, index, event });
|
|
15293
|
+
this.disabled = false;
|
|
15066
15294
|
}
|
|
15067
|
-
|
|
15068
|
-
|
|
15295
|
+
writeValue(value) {
|
|
15296
|
+
if (!this.disabled) {
|
|
15297
|
+
this.value = value;
|
|
15298
|
+
}
|
|
15069
15299
|
}
|
|
15070
|
-
|
|
15071
|
-
|
|
15072
|
-
const activated = index === activeIndex;
|
|
15073
|
-
return visited || activated;
|
|
15300
|
+
registerOnChange(onChange) {
|
|
15301
|
+
this._onChange = onChange;
|
|
15074
15302
|
}
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
const activated = index === activeIndex - 1;
|
|
15078
|
-
return visited || activated;
|
|
15303
|
+
registerOnTouched(onTouched) {
|
|
15304
|
+
this._onTouched = onTouched;
|
|
15079
15305
|
}
|
|
15080
|
-
|
|
15081
|
-
|
|
15306
|
+
onSelect(rating) {
|
|
15307
|
+
this.value = rating;
|
|
15308
|
+
if (this._onChange) {
|
|
15309
|
+
this._onChange(this.value);
|
|
15310
|
+
}
|
|
15082
15311
|
}
|
|
15083
15312
|
};
|
|
15084
|
-
StepsComponent.nextId = 0;
|
|
15085
15313
|
__decorate([
|
|
15086
15314
|
Input()
|
|
15087
|
-
],
|
|
15315
|
+
], RatingScaleComponent.prototype, "nodes", void 0);
|
|
15088
15316
|
__decorate([
|
|
15089
15317
|
Input()
|
|
15090
|
-
],
|
|
15318
|
+
], RatingScaleComponent.prototype, "startLabel", void 0);
|
|
15091
15319
|
__decorate([
|
|
15092
15320
|
Input()
|
|
15093
|
-
],
|
|
15321
|
+
], RatingScaleComponent.prototype, "endLabel", void 0);
|
|
15094
15322
|
__decorate([
|
|
15095
|
-
|
|
15096
|
-
],
|
|
15097
|
-
|
|
15098
|
-
Component({
|
|
15099
|
-
selector: "s-
|
|
15100
|
-
template: "<div
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
|
-
trigger("beforeActiveDesative", [
|
|
15108
|
-
state("active", style$7({
|
|
15109
|
-
"background-position": "left bottom",
|
|
15110
|
-
})),
|
|
15111
|
-
state("desactive", style$7({
|
|
15112
|
-
"background-position": "right bottom",
|
|
15113
|
-
})),
|
|
15114
|
-
transition("active => desactive", [animate("50ms 100ms linear")]),
|
|
15115
|
-
transition("desactive => active", [animate("50ms 250ms linear")]),
|
|
15116
|
-
]),
|
|
15117
|
-
trigger("activeDesative", [
|
|
15118
|
-
state("active", style$7({
|
|
15119
|
-
"background-position": "left bottom",
|
|
15120
|
-
})),
|
|
15121
|
-
state("desactive", style$7({
|
|
15122
|
-
"background-position": "right bottom",
|
|
15123
|
-
})),
|
|
15124
|
-
transition("active => desactive", [animate("100ms 150ms linear")]),
|
|
15125
|
-
transition("desactive => active", [animate("100ms 150ms linear")]),
|
|
15126
|
-
]),
|
|
15127
|
-
trigger("afterActiveDesative", [
|
|
15128
|
-
state("active", style$7({
|
|
15129
|
-
"background-position": "left bottom",
|
|
15130
|
-
})),
|
|
15131
|
-
state("desactive", style$7({
|
|
15132
|
-
"background-position": "right bottom",
|
|
15133
|
-
})),
|
|
15134
|
-
transition("active => desactive", [animate("50ms 250ms linear")]),
|
|
15135
|
-
transition("desactive => active", [animate("50ms 100ms linear")]),
|
|
15136
|
-
]),
|
|
15137
|
-
],
|
|
15138
|
-
styles: ["@keyframes scale-up-center{0%{transform:scale(.5)}100%{transform:scale(1)}}.s-steps-container{display:-ms-flexbox;display:flex;white-space:nowrap;-ms-flex-align:start;align-items:flex-start;overflow:hidden;padding:15px 10px}.s-step-header{box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:66px}.s-step-header .s-step-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all;color:#999;font-size:14px;font-weight:400;padding-top:5px}.s-step-header .s-step-progress-bar-before{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;left:0}.s-step-header .s-step-progress-bar-before.s-step-active,.s-step-header .s-step-progress-bar-before.s-step-visited{background-position:left bottom}.s-step-header .s-step-progress-bar-after{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;right:0}.s-step-header .s-step-progress-bar-after.s-step-active,.s-step-header .s-step-progress-bar-after.s-step-visited{background-position:left bottom}.s-step-progress-bar{margin:0;position:relative;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:100%;background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%}.s-step-disabled{opacity:.5;filter:Alpha(Opacity=50)}.s-step-disabled,.s-step-disabled *{cursor:text!important}.s-step-active.s-step-disabled{opacity:1}.s-step-index{background-color:#fff;border:3px solid #ccc;border-radius:50%;color:#999;display:inline-block;font-weight:700;position:relative;transition:background-color .2s ease-out;height:40px;width:40px;-ms-flex:none;flex:none}.s-step-index .s-step-index-content{line-height:18px;font-size:18px;padding-top:8.5px;text-align:center;position:relative;cursor:pointer}.s-step-index:hover{background-color:#f7f7f7}.s-step-warning .s-step-index .s-step-index-content{padding-top:7px}.s-step-visited .s-step-index{border-color:#7892a1;animation:.1s ease-out alternate scale-up-center;background-color:#7892a1}.s-step-visited .s-step-index-content>span{color:#fff}.s-step-active.s-step-progress-bar,.s-step-visited.s-step-progress-bar{background-position:left bottom}.s-step-active .s-step-index{border-color:#7892a1;color:#7892a1;cursor:default}.s-step-active .s-step-label{color:#333;font-weight:700}@media (max-width:767px){.s-step-label{display:none}}"]
|
|
15323
|
+
Input()
|
|
15324
|
+
], RatingScaleComponent.prototype, "disabled", void 0);
|
|
15325
|
+
RatingScaleComponent = RatingScaleComponent_1 = __decorate([
|
|
15326
|
+
Component({
|
|
15327
|
+
selector: "s-rating-scale",
|
|
15328
|
+
template: "<div\n class=\"rating-scale\"\n [ngClass]=\"{ 'rating-scale--disabled': disabled }\">\n <div class=\"nodes\">\n <button\n *ngFor=\"let node of nodes; index as i\"\n class=\"node\"\n [ngClass]=\"{ 'node--selected': value?.id === node.id && !disabled }\"\n tabindex=\"0\"\n (click)=\"onSelect(node)\"> \n <span\n *ngIf=\"node.icon\"\n class=\"icon fas\"\n [ngClass]=\"node.icon\">\n </span>\n <span\n *ngIf=\"node.title\"\n class=\"label\">\n {{ node.title }}\n </span>\n </button>\n </div>\n <div class=\"labels\">\n <span>{{ startLabel }}</span>\n <span>{{ endLabel }}</span>\n </div>\n</div>",
|
|
15329
|
+
providers: [{
|
|
15330
|
+
provide: NG_VALUE_ACCESSOR,
|
|
15331
|
+
useExisting: forwardRef(() => RatingScaleComponent_1),
|
|
15332
|
+
multi: true,
|
|
15333
|
+
}],
|
|
15334
|
+
styles: [".rating-scale{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.rating-scale .nodes{display:-ms-flexbox;display:flex}.rating-scale .nodes .node{-ms-flex-align:center;align-items:center;background-color:#fff;border-radius:6px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:center;justify-content:center;margin:0 2px;padding:8px;border:1px solid #7892a1}.rating-scale .nodes .node .icon{color:#6e7280;font-size:1rem}.rating-scale .nodes .node .label{color:#212533;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale .nodes .node .icon,.rating-scale .nodes .node .label{margin:6px}.rating-scale .nodes .node--selected{background-color:#d5e8ec;border-color:#428bca;color:#428bca}.rating-scale .nodes .node:first-child{margin-left:0}.rating-scale .nodes .node:last-child{margin-right:0}.rating-scale .labels{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px 0}.rating-scale .labels span{color:#080808;font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale--disabled{opacity:.5}.rating-scale:not(.rating-scale--disabled) .node{cursor:pointer}.rating-scale:not(.rating-scale--disabled) .node:hover{background-color:#dedce5}.rating-scale:not(.rating-scale--disabled) .node:focus{border-width:2px;outline:0}"]
|
|
15139
15335
|
})
|
|
15140
|
-
],
|
|
15336
|
+
], RatingScaleComponent);
|
|
15141
15337
|
|
|
15142
|
-
let
|
|
15338
|
+
let RatingScaleModule = class RatingScaleModule {
|
|
15143
15339
|
};
|
|
15144
|
-
|
|
15340
|
+
RatingScaleModule = __decorate([
|
|
15145
15341
|
NgModule({
|
|
15146
|
-
imports: [
|
|
15147
|
-
|
|
15148
|
-
|
|
15342
|
+
imports: [
|
|
15343
|
+
CommonModule,
|
|
15344
|
+
ReactiveFormsModule,
|
|
15345
|
+
],
|
|
15346
|
+
declarations: [RatingScaleComponent],
|
|
15347
|
+
exports: [RatingScaleComponent],
|
|
15149
15348
|
})
|
|
15150
|
-
],
|
|
15151
|
-
|
|
15152
|
-
let TieredMenuEventService = class TieredMenuEventService {
|
|
15153
|
-
constructor() {
|
|
15154
|
-
this.incrementCurrentItemEvent = new EventEmitter();
|
|
15155
|
-
this.decrementCurrentItemEvent = new EventEmitter();
|
|
15156
|
-
this.closeAllMenusEvent = new EventEmitter();
|
|
15157
|
-
this.selectItemEvent = new EventEmitter();
|
|
15158
|
-
this.openItemMenuEvent = new EventEmitter();
|
|
15159
|
-
this.closeItemMenuEvent = new EventEmitter();
|
|
15160
|
-
this.createMenuEvent = new EventEmitter();
|
|
15161
|
-
}
|
|
15162
|
-
};
|
|
15163
|
-
TieredMenuEventService = __decorate([
|
|
15164
|
-
Injectable()
|
|
15165
|
-
], TieredMenuEventService);
|
|
15349
|
+
], RatingScaleModule);
|
|
15166
15350
|
|
|
15167
|
-
|
|
15351
|
+
var SelectButtonComponent_1;
|
|
15352
|
+
let SelectButtonComponent = SelectButtonComponent_1 = class SelectButtonComponent {
|
|
15168
15353
|
constructor() {
|
|
15169
|
-
this.
|
|
15170
|
-
this.
|
|
15171
|
-
|
|
15172
|
-
|
|
15173
|
-
|
|
15174
|
-
const item = Object.assign({ visible: true }, i);
|
|
15175
|
-
if (item.submenu) {
|
|
15176
|
-
item.submenu = this.normalizeData(item.submenu, item);
|
|
15177
|
-
}
|
|
15178
|
-
item.id = this._generateId();
|
|
15179
|
-
item.parent = parent;
|
|
15180
|
-
item.isOpen = false;
|
|
15181
|
-
return item;
|
|
15182
|
-
});
|
|
15183
|
-
}
|
|
15184
|
-
markAllItemsAsClosed(items) {
|
|
15185
|
-
return items.map((i) => {
|
|
15186
|
-
const item = Object.assign({}, i);
|
|
15187
|
-
if (item.submenu) {
|
|
15188
|
-
item.submenu = this.markAllItemsAsClosed(item.submenu);
|
|
15189
|
-
}
|
|
15190
|
-
item.isOpen = false;
|
|
15191
|
-
return item;
|
|
15192
|
-
});
|
|
15193
|
-
}
|
|
15194
|
-
searchTheHierarchy(itemA, itemB) {
|
|
15195
|
-
let item = itemB;
|
|
15196
|
-
while (item) {
|
|
15197
|
-
if (item === itemA) {
|
|
15198
|
-
return true;
|
|
15199
|
-
}
|
|
15200
|
-
item = item.parent;
|
|
15201
|
-
}
|
|
15202
|
-
return false;
|
|
15203
|
-
}
|
|
15204
|
-
cloneItems(items) {
|
|
15205
|
-
return JSON.parse(JSON.stringify(items));
|
|
15206
|
-
}
|
|
15207
|
-
_generateId() {
|
|
15208
|
-
return `id-${Math.random().toString(36).substring(2, 9)}-${Math.random().toString(36).substring(2, 9)}-${Math.random().toString(36).substring(2, 9)}`;
|
|
15209
|
-
}
|
|
15210
|
-
};
|
|
15211
|
-
TieredMenuService = __decorate([
|
|
15212
|
-
Injectable()
|
|
15213
|
-
], TieredMenuService);
|
|
15214
|
-
|
|
15215
|
-
let TieredMenuNestedComponent = class TieredMenuNestedComponent {
|
|
15216
|
-
constructor(tieredMenuService, _tieredMenuEventService) {
|
|
15217
|
-
this.tieredMenuService = tieredMenuService;
|
|
15218
|
-
this._tieredMenuEventService = _tieredMenuEventService;
|
|
15219
|
-
this.top = 0;
|
|
15220
|
-
this.left = 0;
|
|
15221
|
-
this._unsubscribe$ = new Subject();
|
|
15222
|
-
}
|
|
15223
|
-
onResize() {
|
|
15224
|
-
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
15354
|
+
this.multiple = false;
|
|
15355
|
+
this.itemSelected = new EventEmitter();
|
|
15356
|
+
this.itemClicked = new EventEmitter();
|
|
15357
|
+
this.disabled = false;
|
|
15358
|
+
this.activeItems = new Set();
|
|
15225
15359
|
}
|
|
15226
|
-
|
|
15227
|
-
|
|
15228
|
-
|
|
15229
|
-
|
|
15230
|
-
if (
|
|
15231
|
-
|
|
15360
|
+
writeValue(value) {
|
|
15361
|
+
if (!value)
|
|
15362
|
+
return;
|
|
15363
|
+
this.activeItems.clear();
|
|
15364
|
+
if (Array.isArray(value)) {
|
|
15365
|
+
value.forEach((item) => {
|
|
15366
|
+
this.items.forEach((iItem) => {
|
|
15367
|
+
if (this._compareItems(item, iItem)) {
|
|
15368
|
+
this.activeItems.add(iItem);
|
|
15369
|
+
}
|
|
15370
|
+
});
|
|
15371
|
+
});
|
|
15232
15372
|
}
|
|
15233
|
-
|
|
15234
|
-
|
|
15235
|
-
|
|
15236
|
-
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
case " ":
|
|
15240
|
-
case "Enter":
|
|
15241
|
-
this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
|
|
15242
|
-
break;
|
|
15243
|
-
case "ArrowLeft":
|
|
15244
|
-
// When nested I need a reference to the current item's parent item, otherwise just the current item.
|
|
15245
|
-
this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem.parent);
|
|
15246
|
-
break;
|
|
15247
|
-
case "ArrowRight":
|
|
15248
|
-
this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
|
|
15249
|
-
break;
|
|
15250
|
-
case "ArrowUp":
|
|
15251
|
-
this._tieredMenuEventService.decrementCurrentItemEvent.emit();
|
|
15252
|
-
break;
|
|
15253
|
-
case "ArrowDown":
|
|
15254
|
-
this._tieredMenuEventService.incrementCurrentItemEvent.emit();
|
|
15255
|
-
break;
|
|
15373
|
+
else {
|
|
15374
|
+
this.items.forEach((iItem) => {
|
|
15375
|
+
if (this._compareItems(value, iItem)) {
|
|
15376
|
+
this.activeItems.add(iItem);
|
|
15377
|
+
}
|
|
15378
|
+
});
|
|
15256
15379
|
}
|
|
15257
15380
|
}
|
|
15258
|
-
|
|
15259
|
-
this.
|
|
15260
|
-
this._subscribeEvents();
|
|
15381
|
+
registerOnChange(onChange) {
|
|
15382
|
+
this.onChange = onChange;
|
|
15261
15383
|
}
|
|
15262
|
-
|
|
15263
|
-
this.
|
|
15264
|
-
this._unsubscribe$.complete();
|
|
15384
|
+
registerOnTouched(onTouched) {
|
|
15385
|
+
this.onTouched = onTouched;
|
|
15265
15386
|
}
|
|
15266
|
-
|
|
15267
|
-
|
|
15268
|
-
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
|
|
15269
|
-
return;
|
|
15270
|
-
}
|
|
15271
|
-
const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
|
|
15272
|
-
if (curIndex < this.tieredMenuService.currentItems.length) {
|
|
15273
|
-
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
|
|
15274
|
-
}
|
|
15275
|
-
else {
|
|
15276
|
-
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
|
|
15277
|
-
}
|
|
15278
|
-
if (this.tieredMenuService.currentItem.divider) {
|
|
15279
|
-
this._incrementCurItem();
|
|
15280
|
-
}
|
|
15387
|
+
setDisabledState(disabled) {
|
|
15388
|
+
this.disabled = disabled;
|
|
15281
15389
|
}
|
|
15282
|
-
|
|
15283
|
-
|
|
15284
|
-
|
|
15390
|
+
onItemSelect(item) {
|
|
15391
|
+
var _a, _b;
|
|
15392
|
+
if (this.disabled || item.disabled)
|
|
15285
15393
|
return;
|
|
15394
|
+
this.itemClicked.emit(item);
|
|
15395
|
+
if (!this.multiple) {
|
|
15396
|
+
this.activeItems.clear();
|
|
15286
15397
|
}
|
|
15287
|
-
|
|
15288
|
-
|
|
15289
|
-
|
|
15290
|
-
|
|
15291
|
-
else {
|
|
15292
|
-
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
|
|
15293
|
-
}
|
|
15294
|
-
if (this.tieredMenuService.currentItem.divider) {
|
|
15295
|
-
this._decrementCurItem();
|
|
15296
|
-
}
|
|
15297
|
-
}
|
|
15298
|
-
_closeItem(item) {
|
|
15299
|
-
var _a;
|
|
15300
|
-
let itemAux = this._lastOpenItem;
|
|
15301
|
-
while (itemAux && itemAux != item) {
|
|
15302
|
-
itemAux.isOpen = false;
|
|
15303
|
-
itemAux = itemAux.parent;
|
|
15304
|
-
}
|
|
15305
|
-
item.isOpen = false;
|
|
15306
|
-
this.tieredMenuService.currentItem = itemAux !== null && itemAux !== void 0 ? itemAux : this.tieredMenuService.items[0];
|
|
15307
|
-
this.tieredMenuService.currentItems = ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.submenu) || this.tieredMenuService.items;
|
|
15398
|
+
this.activeItems.add(item);
|
|
15399
|
+
this.itemSelected.emit([...this.activeItems]);
|
|
15400
|
+
(_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, [...this.activeItems]);
|
|
15401
|
+
(_b = this.onTouched) === null || _b === void 0 ? void 0 : _b.call(this, [...this.activeItems]);
|
|
15308
15402
|
}
|
|
15309
|
-
|
|
15310
|
-
|
|
15311
|
-
|
|
15312
|
-
|
|
15313
|
-
// Only has focus if there has already been interaction.
|
|
15314
|
-
if (this.tieredMenuService.currentItem) {
|
|
15315
|
-
this.tieredMenuService.currentItem = item.submenu[0];
|
|
15403
|
+
_compareItems(item1, item2) {
|
|
15404
|
+
const _compare = (a, b) => {
|
|
15405
|
+
if (a === b) {
|
|
15406
|
+
return true;
|
|
15316
15407
|
}
|
|
15317
|
-
|
|
15318
|
-
|
|
15319
|
-
}
|
|
15320
|
-
_subscribeEvents() {
|
|
15321
|
-
this._tieredMenuEventService.incrementCurrentItemEvent
|
|
15322
|
-
.pipe(takeUntil(this._unsubscribe$))
|
|
15323
|
-
.subscribe(() => {
|
|
15324
|
-
this._incrementCurItem();
|
|
15325
|
-
});
|
|
15326
|
-
this._tieredMenuEventService.decrementCurrentItemEvent
|
|
15327
|
-
.pipe(takeUntil(this._unsubscribe$))
|
|
15328
|
-
.subscribe(() => {
|
|
15329
|
-
this._decrementCurItem();
|
|
15330
|
-
});
|
|
15331
|
-
this._tieredMenuEventService.selectItemEvent
|
|
15332
|
-
.pipe(takeUntil(this._unsubscribe$))
|
|
15333
|
-
.subscribe((item) => {
|
|
15334
|
-
if (item.command) {
|
|
15335
|
-
item.command();
|
|
15336
|
-
// Close all menus after the item was selected.
|
|
15337
|
-
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
15408
|
+
if (a === undefined || b === undefined || typeof a !== "object" || a === null || typeof b !== "object" || b === null) {
|
|
15409
|
+
return false;
|
|
15338
15410
|
}
|
|
15339
|
-
|
|
15340
|
-
|
|
15341
|
-
|
|
15342
|
-
.
|
|
15343
|
-
|
|
15344
|
-
if (
|
|
15345
|
-
|
|
15346
|
-
|
|
15347
|
-
|
|
15411
|
+
if (Array.isArray(a) !== Array.isArray(b)) {
|
|
15412
|
+
return false;
|
|
15413
|
+
}
|
|
15414
|
+
let keysA = Object.keys(a);
|
|
15415
|
+
let keysB = Object.keys(b);
|
|
15416
|
+
if (keysA.length !== keysB.length) {
|
|
15417
|
+
return false;
|
|
15418
|
+
}
|
|
15419
|
+
for (let key of keysA) {
|
|
15420
|
+
if (!keysB.includes(key) || !_compare(a[key], b[key])) {
|
|
15421
|
+
return false;
|
|
15348
15422
|
}
|
|
15349
|
-
this._tieredMenuEventService.closeItemMenuEvent.emit((_b = itemAux.parent) !== null && _b !== void 0 ? _b : itemAux);
|
|
15350
15423
|
}
|
|
15351
|
-
|
|
15352
|
-
|
|
15353
|
-
|
|
15354
|
-
|
|
15355
|
-
.pipe(takeUntil(this._unsubscribe$))
|
|
15356
|
-
.subscribe((item) => {
|
|
15357
|
-
if (item) {
|
|
15358
|
-
this._closeItem(item);
|
|
15424
|
+
for (let key in a) {
|
|
15425
|
+
if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {
|
|
15426
|
+
return false;
|
|
15427
|
+
}
|
|
15359
15428
|
}
|
|
15360
|
-
|
|
15429
|
+
return true;
|
|
15430
|
+
};
|
|
15431
|
+
return _compare(item1, item2);
|
|
15361
15432
|
}
|
|
15362
15433
|
};
|
|
15363
|
-
TieredMenuNestedComponent.ctorParameters = () => [
|
|
15364
|
-
{ type: TieredMenuService },
|
|
15365
|
-
{ type: TieredMenuEventService }
|
|
15366
|
-
];
|
|
15367
15434
|
__decorate([
|
|
15368
|
-
|
|
15369
|
-
],
|
|
15435
|
+
Input()
|
|
15436
|
+
], SelectButtonComponent.prototype, "items", void 0);
|
|
15370
15437
|
__decorate([
|
|
15371
|
-
|
|
15372
|
-
],
|
|
15438
|
+
Input()
|
|
15439
|
+
], SelectButtonComponent.prototype, "multiple", void 0);
|
|
15373
15440
|
__decorate([
|
|
15374
|
-
|
|
15375
|
-
],
|
|
15376
|
-
|
|
15441
|
+
Output()
|
|
15442
|
+
], SelectButtonComponent.prototype, "itemSelected", void 0);
|
|
15443
|
+
__decorate([
|
|
15444
|
+
Output()
|
|
15445
|
+
], SelectButtonComponent.prototype, "itemClicked", void 0);
|
|
15446
|
+
SelectButtonComponent = SelectButtonComponent_1 = __decorate([
|
|
15377
15447
|
Component({
|
|
15378
|
-
|
|
15379
|
-
|
|
15448
|
+
selector: "s-select-button",
|
|
15449
|
+
template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n <s-select-button-item\n *ngFor=\"let item of items; index as i\"\n [label]=\"item.label\"\n [active]=\"activeItems?.has(item)\"\n [disabled]=\"disabled || item.disabled\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n</div>",
|
|
15450
|
+
providers: [
|
|
15451
|
+
{
|
|
15452
|
+
provide: NG_VALUE_ACCESSOR,
|
|
15453
|
+
useExisting: forwardRef(() => SelectButtonComponent_1),
|
|
15454
|
+
multi: true,
|
|
15455
|
+
},
|
|
15456
|
+
],
|
|
15457
|
+
styles: [".select-button{overflow:hidden}"]
|
|
15380
15458
|
})
|
|
15381
|
-
],
|
|
15459
|
+
], SelectButtonComponent);
|
|
15382
15460
|
|
|
15383
|
-
|
|
15384
|
-
|
|
15385
|
-
|
|
15386
|
-
this.
|
|
15387
|
-
this.
|
|
15388
|
-
this.
|
|
15389
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
15390
|
-
this.tieredMenuService = tieredMenuService;
|
|
15391
|
-
this._tieredMenuEventService = _tieredMenuEventService;
|
|
15392
|
-
this.top = 0;
|
|
15393
|
-
this.left = 0;
|
|
15394
|
-
this.menuTriggerEvent = "hover";
|
|
15395
|
-
this._componentRef = null;
|
|
15396
|
-
this._unsubscribe$ = new Subject();
|
|
15397
|
-
this.destroyRequest = new EventEmitter();
|
|
15398
|
-
}
|
|
15399
|
-
onResize() {
|
|
15400
|
-
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
15401
|
-
}
|
|
15402
|
-
onDocumentClick(event) {
|
|
15403
|
-
// Closing menu when clicked outside.
|
|
15404
|
-
const target = event.target;
|
|
15405
|
-
const clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
|
|
15406
|
-
if (!clickedInside) {
|
|
15407
|
-
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
15408
|
-
}
|
|
15461
|
+
let SelectButtonItemComponent = class SelectButtonItemComponent {
|
|
15462
|
+
constructor() {
|
|
15463
|
+
this.active = false;
|
|
15464
|
+
this.first = false;
|
|
15465
|
+
this.last = false;
|
|
15466
|
+
this.disabled = false;
|
|
15409
15467
|
}
|
|
15410
|
-
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
|
|
15437
|
-
|
|
15438
|
-
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15468
|
+
};
|
|
15469
|
+
__decorate([
|
|
15470
|
+
Input()
|
|
15471
|
+
], SelectButtonItemComponent.prototype, "label", void 0);
|
|
15472
|
+
__decorate([
|
|
15473
|
+
Input()
|
|
15474
|
+
], SelectButtonItemComponent.prototype, "active", void 0);
|
|
15475
|
+
__decorate([
|
|
15476
|
+
Input()
|
|
15477
|
+
], SelectButtonItemComponent.prototype, "first", void 0);
|
|
15478
|
+
__decorate([
|
|
15479
|
+
Input()
|
|
15480
|
+
], SelectButtonItemComponent.prototype, "last", void 0);
|
|
15481
|
+
__decorate([
|
|
15482
|
+
Input()
|
|
15483
|
+
], SelectButtonItemComponent.prototype, "disabled", void 0);
|
|
15484
|
+
SelectButtonItemComponent = __decorate([
|
|
15485
|
+
Component({
|
|
15486
|
+
selector: "s-select-button-item",
|
|
15487
|
+
template: "<button\n class=\"select-button-item\"\n [ngClass]=\"{\n 'select-button-item--active': active,\n 'select-button-item--disabled': disabled,\n 'select-button-item--first': first,\n 'select-button-item--last': last\n }\">\n <span class=\"select-button-item__label\">{{ label }}</span>\n</button>",
|
|
15488
|
+
styles: [".select-button-item{padding:8px 12px;cursor:pointer;background-color:#fff;border:none;border-left:1px solid #c1c1cc;border-top:1px solid #c1c1cc;border-bottom:1px solid #c1c1cc}.select-button-item__label{font-family:\"Open Sans\" sans-serif;font-size:14px}.select-button-item:not(.select-button-item--disabled):not(.select-button-item--active):hover{background-color:#eeebf2}.select-button-item--active,.select-button-item--active:hover{background-color:#c1c1cc;font-weight:700}.select-button-item--disabled{opacity:.5;cursor:default}.select-button-item--first{border-top-left-radius:2px;border-bottom-left-radius:2px}.select-button-item--last{border-right:1px solid #c1c1cc;border-top-right-radius:2px;border-bottom-right-radius:2px}"]
|
|
15489
|
+
})
|
|
15490
|
+
], SelectButtonItemComponent);
|
|
15491
|
+
|
|
15492
|
+
let SelectButtonModule = class SelectButtonModule {
|
|
15493
|
+
};
|
|
15494
|
+
SelectButtonModule = __decorate([
|
|
15495
|
+
NgModule({
|
|
15496
|
+
imports: [CommonModule],
|
|
15497
|
+
declarations: [
|
|
15498
|
+
SelectButtonComponent,
|
|
15499
|
+
SelectButtonItemComponent,
|
|
15500
|
+
],
|
|
15501
|
+
exports: [SelectButtonComponent],
|
|
15502
|
+
})
|
|
15503
|
+
], SelectButtonModule);
|
|
15504
|
+
|
|
15505
|
+
var SidebarComponent_1;
|
|
15506
|
+
let SidebarComponent = SidebarComponent_1 = class SidebarComponent {
|
|
15507
|
+
constructor(focusTrapFactory) {
|
|
15508
|
+
this.focusTrapFactory = focusTrapFactory;
|
|
15509
|
+
this.id = `s-sidebar-${SidebarComponent_1.nextId++}`;
|
|
15510
|
+
this.visible = false;
|
|
15511
|
+
this.baseZIndex = 0;
|
|
15512
|
+
this.largeSized = false;
|
|
15513
|
+
this.visibleChange = new EventEmitter();
|
|
15446
15514
|
}
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
this.
|
|
15515
|
+
onShow() {
|
|
15516
|
+
DomHandler.addClass(document.body, "ui-overflow-hidden-sidebar");
|
|
15517
|
+
const focusTrap = this.focusTrapFactory.create(this.innerSidebar.containerViewChild.nativeElement, false);
|
|
15518
|
+
focusTrap.focusInitialElementWhenReady();
|
|
15450
15519
|
}
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
this._unsubscribe$.complete();
|
|
15520
|
+
onHide() {
|
|
15521
|
+
DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
|
|
15454
15522
|
}
|
|
15455
|
-
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
}
|
|
15460
|
-
else if (!this.items.includes(this.tieredMenuService.currentItem)) {
|
|
15461
|
-
// Checking if it is the current menu.
|
|
15462
|
-
return;
|
|
15463
|
-
}
|
|
15464
|
-
const currentIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
|
|
15465
|
-
if (currentIndex < this.tieredMenuService.currentItems.length) {
|
|
15466
|
-
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[currentIndex];
|
|
15467
|
-
}
|
|
15468
|
-
else {
|
|
15469
|
-
this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
|
|
15470
|
-
}
|
|
15471
|
-
if (this.tieredMenuService.currentItem.divider) {
|
|
15472
|
-
this._incrementCurItem();
|
|
15473
|
-
}
|
|
15523
|
+
close(event) {
|
|
15524
|
+
DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
|
|
15525
|
+
this.visibleChange.emit(false);
|
|
15526
|
+
event.preventDefault();
|
|
15474
15527
|
}
|
|
15475
|
-
|
|
15476
|
-
|
|
15477
|
-
|
|
15478
|
-
|
|
15479
|
-
|
|
15528
|
+
};
|
|
15529
|
+
SidebarComponent.nextId = 0;
|
|
15530
|
+
SidebarComponent.ctorParameters = () => [
|
|
15531
|
+
{ type: FocusTrapFactory }
|
|
15532
|
+
];
|
|
15533
|
+
__decorate([
|
|
15534
|
+
Input()
|
|
15535
|
+
], SidebarComponent.prototype, "id", void 0);
|
|
15536
|
+
__decorate([
|
|
15537
|
+
Input()
|
|
15538
|
+
], SidebarComponent.prototype, "visible", void 0);
|
|
15539
|
+
__decorate([
|
|
15540
|
+
Input()
|
|
15541
|
+
], SidebarComponent.prototype, "header", void 0);
|
|
15542
|
+
__decorate([
|
|
15543
|
+
Input()
|
|
15544
|
+
], SidebarComponent.prototype, "baseZIndex", void 0);
|
|
15545
|
+
__decorate([
|
|
15546
|
+
Input()
|
|
15547
|
+
], SidebarComponent.prototype, "largeSized", void 0);
|
|
15548
|
+
__decorate([
|
|
15549
|
+
Output()
|
|
15550
|
+
], SidebarComponent.prototype, "visibleChange", void 0);
|
|
15551
|
+
__decorate([
|
|
15552
|
+
ViewChild(Sidebar, { static: true })
|
|
15553
|
+
], SidebarComponent.prototype, "innerSidebar", void 0);
|
|
15554
|
+
__decorate([
|
|
15555
|
+
ContentChild(HeaderComponent, { static: true })
|
|
15556
|
+
], SidebarComponent.prototype, "headerSection", void 0);
|
|
15557
|
+
__decorate([
|
|
15558
|
+
ContentChild(FooterComponent, { static: true })
|
|
15559
|
+
], SidebarComponent.prototype, "footerSection", void 0);
|
|
15560
|
+
SidebarComponent = SidebarComponent_1 = __decorate([
|
|
15561
|
+
Component({
|
|
15562
|
+
selector: "s-sidebar",
|
|
15563
|
+
template: "<p-sidebar\n [id]=\"id\"\n [visible]=\"visible\"\n (visibleChange)=\"visibleChange.emit($event)\"\n [blockScroll]=\"true\"\n [baseZIndex]=\"baseZIndex\"\n [modal]=\"true\"\n [dismissible]=\"false\"\n [showCloseIcon]=\"false\"\n position=\"right\"\n appendTo=\"body\"\n [styleClass]=\"largeSized ? 's-sidebar-panel s-sidebar-panel-lg' : 's-sidebar-panel'\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\">\n <div\n [id]=\"id + '-container'\"\n class=\"s-sidebar-container\">\n <a\n href=\"#\"\n role=\"button\"\n class=\"s-sidebar-close\"\n (click)=\"close($event)\">\n <span\n class=\"fa fa-times\"\n aria-hidden=\"true\">\n </span></a>\n <div\n *ngIf=\"header && !headerSection\" \n [id]=\"id + '-header'\"\n class=\"s-sidebar-header\">\n <h2 class=\"sds-panel-title s-sidebar-header__title\">{{header}}</h2>\n </div>\n <div\n *ngIf=\"headerSection\" \n [id]=\"id + '-header'\"\n class=\"s-sidebar-header\">\n <ng-content select=\"s-header\"></ng-content>\n </div>\n <p-scrollPanel\n [id]=\"id + '-content-container'\"\n class=\"s-sidebar-content-container\"\n styleClass=\"s-sidebar-content\">\n <ng-content></ng-content>\n </p-scrollPanel>\n <div\n *ngIf=\"footerSection\"\n [id]=\"id + '-footer'\"\n class=\"s-sidebar-footer\">\n <ng-content select=\"s-footer\"></ng-content>\n </div>\n </div>\n</p-sidebar>\n",
|
|
15564
|
+
encapsulation: ViewEncapsulation.None,
|
|
15565
|
+
styles: [".ui-overflow-hidden-sidebar{overflow:hidden}body .ui-sidebar.s-sidebar-panel{width:50%;padding:0}@media (max-width:767px){body .ui-sidebar.s-sidebar-panel{width:100%}}@media (min-width:768px){body .ui-sidebar.s-sidebar-panel{width:75%}}@media (min-width:992px){body .ui-sidebar.s-sidebar-panel{width:50%}body .ui-sidebar.s-sidebar-panel.s-sidebar-panel-lg{width:75%}}body .ui-sidebar.s-sidebar-panel .s-sidebar-container{height:100%;width:100%;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}body .ui-sidebar.s-sidebar-panel .s-sidebar-close{position:absolute;right:20px;top:20px;color:#333}body .ui-sidebar.s-sidebar-panel .s-sidebar-header{border-bottom:1px solid #ccc;padding-bottom:15px;padding-right:20px;margin-bottom:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel .s-sidebar-content-container{-ms-flex:1;flex:1;overflow:hidden}body .ui-sidebar.s-sidebar-panel .s-sidebar-content{height:100%}body .ui-sidebar.s-sidebar-panel .s-sidebar-footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel p-scrollpanel{padding-top:30px}body .ui-sidebar.s-sidebar-panel .s-sidebar-header+p-scrollpanel{padding-top:0}p-scrollPanel{display:block}.s-sidebar-header__title{font-weight:400}"]
|
|
15566
|
+
})
|
|
15567
|
+
], SidebarComponent);
|
|
15568
|
+
|
|
15569
|
+
let SidebarModule = class SidebarModule {
|
|
15570
|
+
};
|
|
15571
|
+
SidebarModule = __decorate([
|
|
15572
|
+
NgModule({
|
|
15573
|
+
imports: [CommonModule, A11yModule, SidebarModule$1, ScrollPanelModule, StructureModule],
|
|
15574
|
+
declarations: [SidebarComponent],
|
|
15575
|
+
exports: [StructureModule, SidebarComponent],
|
|
15576
|
+
})
|
|
15577
|
+
], SidebarModule);
|
|
15578
|
+
|
|
15579
|
+
let SlidePanelService = class SlidePanelService {
|
|
15580
|
+
constructor() {
|
|
15581
|
+
this.modalCloseMap = new Map();
|
|
15582
|
+
}
|
|
15583
|
+
createSlidePanel(id) {
|
|
15584
|
+
const panelSubject = new Subject();
|
|
15585
|
+
this.modalCloseMap.set(id, panelSubject);
|
|
15586
|
+
return panelSubject.asObservable();
|
|
15587
|
+
}
|
|
15588
|
+
getModalCloseObservable(id) {
|
|
15589
|
+
return this.modalCloseMap.get(id).asObservable();
|
|
15590
|
+
}
|
|
15591
|
+
closeModal(id) {
|
|
15592
|
+
const subject = this.modalCloseMap.get(id);
|
|
15593
|
+
if (subject) {
|
|
15594
|
+
subject.next();
|
|
15480
15595
|
}
|
|
15481
|
-
|
|
15596
|
+
}
|
|
15597
|
+
};
|
|
15598
|
+
SlidePanelService = __decorate([
|
|
15599
|
+
Injectable()
|
|
15600
|
+
], SlidePanelService);
|
|
15601
|
+
|
|
15602
|
+
var SlidePanelComponent_1;
|
|
15603
|
+
const SMALL_DEVICE_BREAKPOINT = 420;
|
|
15604
|
+
let SlidePanelComponent = SlidePanelComponent_1 = class SlidePanelComponent {
|
|
15605
|
+
constructor(slidePanelService) {
|
|
15606
|
+
this.slidePanelService = slidePanelService;
|
|
15607
|
+
this.id = `slide-panel-${++SlidePanelComponent_1.nextId}`;
|
|
15608
|
+
this.openIcon = "fas fa-chevron-right";
|
|
15609
|
+
this.closeIcon = "fas fa-chevron-left";
|
|
15610
|
+
this.cache = false;
|
|
15611
|
+
this.createOpen = false;
|
|
15612
|
+
this.panelOpened = new EventEmitter();
|
|
15613
|
+
this.panelClosed = new EventEmitter();
|
|
15614
|
+
this.isOpen = false;
|
|
15615
|
+
this.isSlideOver = false;
|
|
15616
|
+
this.isAnimating = false;
|
|
15617
|
+
this.isContentAnimationDisabled = true;
|
|
15618
|
+
this.slideHeight = 0;
|
|
15619
|
+
this.sideContentWidth = 0;
|
|
15620
|
+
this._unsubscribe$ = new Subject();
|
|
15621
|
+
}
|
|
15622
|
+
onResize() {
|
|
15623
|
+
this._checkOverBehavior();
|
|
15624
|
+
}
|
|
15625
|
+
ngOnInit() {
|
|
15626
|
+
this._checkOverBehavior();
|
|
15627
|
+
this.slidePanelService.createSlidePanel(this.id)
|
|
15628
|
+
.pipe(takeUntil(this._unsubscribe$))
|
|
15629
|
+
.subscribe(() => {
|
|
15630
|
+
this.isOpen = false;
|
|
15631
|
+
});
|
|
15632
|
+
}
|
|
15633
|
+
ngAfterViewInit() {
|
|
15634
|
+
queueMicrotask(() => {
|
|
15635
|
+
if (this.createOpen) {
|
|
15636
|
+
this.isOpen = true;
|
|
15637
|
+
}
|
|
15638
|
+
});
|
|
15639
|
+
}
|
|
15640
|
+
ngAfterViewChecked() {
|
|
15641
|
+
// to executed at a safe time prior to control returning to the browser's event loop
|
|
15642
|
+
queueMicrotask(() => {
|
|
15643
|
+
this._calculateSlideHeight();
|
|
15644
|
+
this._calculateSideContentWidth();
|
|
15645
|
+
this.isContentAnimationDisabled = false;
|
|
15646
|
+
});
|
|
15647
|
+
}
|
|
15648
|
+
ngOnDestroy() {
|
|
15649
|
+
this._unsubscribe$.next();
|
|
15650
|
+
this._unsubscribe$.complete();
|
|
15651
|
+
}
|
|
15652
|
+
onClickButton() {
|
|
15653
|
+
if (this.isAnimating) {
|
|
15482
15654
|
return;
|
|
15483
15655
|
}
|
|
15484
|
-
|
|
15485
|
-
if (
|
|
15486
|
-
this.
|
|
15656
|
+
this.isOpen = !this.isOpen;
|
|
15657
|
+
if (this.isOpen) {
|
|
15658
|
+
this.panelOpened.emit();
|
|
15487
15659
|
}
|
|
15488
15660
|
else {
|
|
15489
|
-
this.
|
|
15490
|
-
}
|
|
15491
|
-
if (this.tieredMenuService.currentItem.divider) {
|
|
15492
|
-
this._decrementCurItem();
|
|
15661
|
+
this.panelClosed.emit();
|
|
15493
15662
|
}
|
|
15494
15663
|
}
|
|
15495
|
-
|
|
15496
|
-
|
|
15497
|
-
const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent_1);
|
|
15498
|
-
this._componentRef = componentFactory.create(this._injector);
|
|
15499
|
-
this._appRef.attachView(this._componentRef.hostView);
|
|
15500
|
-
const domElem = this._componentRef.hostView.rootNodes[0];
|
|
15501
|
-
document.body.appendChild(domElem);
|
|
15502
|
-
// Setting the menu items.
|
|
15503
|
-
this._componentRef.instance.items = items;
|
|
15504
|
-
// Subscribe menu events.
|
|
15505
|
-
this._componentRef.instance.destroyRequest.subscribe((propagate) => {
|
|
15506
|
-
this._destroy(propagate);
|
|
15507
|
-
});
|
|
15508
|
-
this._menuDivElement = domElem.querySelector(".menu");
|
|
15509
|
-
this._setMenuPosition(position);
|
|
15510
|
-
}
|
|
15664
|
+
onContentAnimationStart() {
|
|
15665
|
+
this.isAnimating = true;
|
|
15511
15666
|
}
|
|
15512
|
-
|
|
15513
|
-
|
|
15514
|
-
|
|
15515
|
-
|
|
15516
|
-
|
|
15517
|
-
|
|
15518
|
-
|
|
15519
|
-
|
|
15520
|
-
|
|
15667
|
+
onContentAnimationDone() {
|
|
15668
|
+
this.isAnimating = false;
|
|
15669
|
+
this._calculateSideContentWidth();
|
|
15670
|
+
}
|
|
15671
|
+
_checkOverBehavior() {
|
|
15672
|
+
this.isSlideOver = window.innerWidth <= SMALL_DEVICE_BREAKPOINT;
|
|
15673
|
+
}
|
|
15674
|
+
_calculateSlideHeight() {
|
|
15675
|
+
this.slideHeight = this._sideContentRef.nativeElement.clientHeight;
|
|
15676
|
+
}
|
|
15677
|
+
_calculateSideContentWidth() {
|
|
15678
|
+
const slidePanelWidth = this._slidePanelRef.nativeElement.getBoundingClientRect().width;
|
|
15679
|
+
const slideContentWidth = this._slideContentRef.nativeElement.getBoundingClientRect().width;
|
|
15680
|
+
this.sideContentWidth = slidePanelWidth - slideContentWidth;
|
|
15681
|
+
}
|
|
15682
|
+
};
|
|
15683
|
+
SlidePanelComponent.nextId = 0;
|
|
15684
|
+
SlidePanelComponent.ctorParameters = () => [
|
|
15685
|
+
{ type: SlidePanelService }
|
|
15686
|
+
];
|
|
15687
|
+
__decorate([
|
|
15688
|
+
Input()
|
|
15689
|
+
], SlidePanelComponent.prototype, "id", void 0);
|
|
15690
|
+
__decorate([
|
|
15691
|
+
Input()
|
|
15692
|
+
], SlidePanelComponent.prototype, "openIcon", void 0);
|
|
15693
|
+
__decorate([
|
|
15694
|
+
Input()
|
|
15695
|
+
], SlidePanelComponent.prototype, "closeIcon", void 0);
|
|
15696
|
+
__decorate([
|
|
15697
|
+
Input()
|
|
15698
|
+
], SlidePanelComponent.prototype, "cache", void 0);
|
|
15699
|
+
__decorate([
|
|
15700
|
+
Input()
|
|
15701
|
+
], SlidePanelComponent.prototype, "createOpen", void 0);
|
|
15702
|
+
__decorate([
|
|
15703
|
+
Output()
|
|
15704
|
+
], SlidePanelComponent.prototype, "panelOpened", void 0);
|
|
15705
|
+
__decorate([
|
|
15706
|
+
Output()
|
|
15707
|
+
], SlidePanelComponent.prototype, "panelClosed", void 0);
|
|
15708
|
+
__decorate([
|
|
15709
|
+
ViewChild("slidePanel")
|
|
15710
|
+
], SlidePanelComponent.prototype, "_slidePanelRef", void 0);
|
|
15711
|
+
__decorate([
|
|
15712
|
+
ViewChild("slideContent")
|
|
15713
|
+
], SlidePanelComponent.prototype, "_slideContentRef", void 0);
|
|
15714
|
+
__decorate([
|
|
15715
|
+
ViewChild("sideContent")
|
|
15716
|
+
], SlidePanelComponent.prototype, "_sideContentRef", void 0);
|
|
15717
|
+
__decorate([
|
|
15718
|
+
HostListener("window:resize")
|
|
15719
|
+
], SlidePanelComponent.prototype, "onResize", null);
|
|
15720
|
+
SlidePanelComponent = SlidePanelComponent_1 = __decorate([
|
|
15721
|
+
Component({
|
|
15722
|
+
selector: "s-slide-panel",
|
|
15723
|
+
template: "<div #slidePanel class=\"slide-panel\">\n <div\n #slideContent\n class=\"slide-content\"\n [ngClass]=\"{\n 'slide-content--closed': !isOpen,\n 'slide-content--over': isSlideOver\n }\">\n <div\n #mainContainer\n class=\"main-container\"\n [style.maxHeight]=\"slideHeight + 'px'\">\n <ng-container *ngIf=\"cache; then cacheTemplate else cachelessTemplate\"></ng-container>\n </div>\n <button\n class=\"button\"\n [ngClass]=\"isOpen ? closeIcon : openIcon\"\n (click)=\"onClickButton()\">\n </button>\n </div>\n <div \n #sideContent\n class=\"side-content\"\n [ngStyle]=\"{ 'width.px': sideContentWidth }\">\n <ng-content select=\"[side-content]\"></ng-content>\n </div>\n</div>\n\n<ng-template #cacheTemplate>\n <div\n class=\"content-container\"\n [@cacheAnimation]=\"isOpen\"\n [@.disabled]=\"isContentAnimationDisabled\"\n (@cacheAnimation.start)=\"onContentAnimationStart()\"\n (@cacheAnimation.done)=\"onContentAnimationDone()\">\n <ng-container [ngTemplateOutlet]=\"slideContentTemplate\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #cachelessTemplate>\n <div\n *ngIf=\"isOpen\"\n class=\"content-container\"\n @cachelessAnimation\n [@.disabled]=\"isContentAnimationDisabled\"\n (@cachelessAnimation.start)=\"onContentAnimationStart()\"\n (@cachelessAnimation.done)=\"onContentAnimationDone()\">\n <ng-container [ngTemplateOutlet]=\"slideContentTemplate\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #slideContentTemplate>\n <ng-content select=\"[slide-content]\"></ng-content>\n</ng-template>",
|
|
15724
|
+
animations: [
|
|
15725
|
+
trigger("cachelessAnimation", [
|
|
15726
|
+
transition(":enter", [
|
|
15727
|
+
style$7({ width: "0" }),
|
|
15728
|
+
animate("200ms linear", style$7({ width: "*" })),
|
|
15729
|
+
]),
|
|
15730
|
+
transition(":leave", [
|
|
15731
|
+
style$7({ width: "*" }),
|
|
15732
|
+
animate("200ms linear", style$7({ width: "0" })),
|
|
15733
|
+
]),
|
|
15734
|
+
]),
|
|
15735
|
+
trigger("cacheAnimation", [
|
|
15736
|
+
state("true", style$7({ width: "*", padding: '0 16px' })),
|
|
15737
|
+
state("false", style$7({ width: '0px', padding: '0' })),
|
|
15738
|
+
transition("* => *", animate("200ms")),
|
|
15739
|
+
]),
|
|
15740
|
+
],
|
|
15741
|
+
styles: [".slide-panel{display:-ms-flexbox;display:flex;width:100%}.slide-panel .slide-content{display:-ms-flexbox;display:flex;position:relative}.slide-panel .slide-content .main-container{background-color:#eeebf2;display:-ms-flexbox;display:flex;border:1px solid #ccc;overflow:hidden;position:relative}.slide-panel .slide-content .main-container .content-container{overflow-y:auto;overflow-x:hidden;padding:16px}.slide-panel .slide-content .button{-ms-flex-align:center;align-items:center;background-color:#eeebf2;border:1px solid #ccc;border-left:none;border-radius:0 4px 4px 0;cursor:pointer;display:-ms-flexbox;display:flex;font-family:\"Font Awesome 5 Pro\";font-size:16px;height:32px;-ms-flex-pack:center;justify-content:center;position:absolute;right:-32px;top:16px;width:32px;z-index:99}.slide-panel .slide-content--closed .main-container{border:none}.slide-panel .slide-content--over{position:absolute}.slide-panel .side-content{display:-ms-flexbox;display:flex;height:-webkit-max-content;height:max-content;overflow:auto;transition:width .1s linear}"]
|
|
15742
|
+
})
|
|
15743
|
+
], SlidePanelComponent);
|
|
15744
|
+
|
|
15745
|
+
let SlidePanelModule = class SlidePanelModule {
|
|
15746
|
+
};
|
|
15747
|
+
SlidePanelModule = __decorate([
|
|
15748
|
+
NgModule({
|
|
15749
|
+
imports: [CommonModule],
|
|
15750
|
+
declarations: [SlidePanelComponent],
|
|
15751
|
+
exports: [SlidePanelComponent],
|
|
15752
|
+
providers: [SlidePanelService],
|
|
15753
|
+
})
|
|
15754
|
+
], SlidePanelModule);
|
|
15755
|
+
|
|
15756
|
+
var SplitButtonType;
|
|
15757
|
+
(function (SplitButtonType) {
|
|
15758
|
+
SplitButtonType["Primary"] = "primary";
|
|
15759
|
+
SplitButtonType["Secondary"] = "secondary";
|
|
15760
|
+
SplitButtonType["Default"] = "default";
|
|
15761
|
+
})(SplitButtonType || (SplitButtonType = {}));
|
|
15762
|
+
|
|
15763
|
+
let SplitButtonComponent = class SplitButtonComponent {
|
|
15764
|
+
constructor(eRef) {
|
|
15765
|
+
this.eRef = eRef;
|
|
15766
|
+
this.disabled = false;
|
|
15767
|
+
this.type = SplitButtonType.Primary;
|
|
15768
|
+
this.buttonClicked = new EventEmitter();
|
|
15769
|
+
this.open = false;
|
|
15770
|
+
}
|
|
15771
|
+
onClickout(event) {
|
|
15772
|
+
if (!this.eRef.nativeElement.contains(event.target)) {
|
|
15773
|
+
this.closeDropdown();
|
|
15521
15774
|
}
|
|
15522
15775
|
}
|
|
15523
|
-
|
|
15524
|
-
|
|
15525
|
-
|
|
15526
|
-
|
|
15527
|
-
const PADDING = 8;
|
|
15528
|
-
if (this._componentRef !== null) {
|
|
15529
|
-
const { top, right, bottom, left } = position;
|
|
15530
|
-
const itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce((count, item) => {
|
|
15531
|
-
return !item.divider ? count + 1 : count;
|
|
15532
|
-
}, 0);
|
|
15533
|
-
const dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce((count, item) => {
|
|
15534
|
-
return item.divider ? count + 1 : count;
|
|
15535
|
-
}, 0);
|
|
15536
|
-
// I need to calculate the height of the component because the internal elements have not been created yet.
|
|
15537
|
-
const menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + 8;
|
|
15538
|
-
const menuWidth = this._menuDivElement.getBoundingClientRect().width;
|
|
15539
|
-
const rightFreeSpace = window.innerWidth - right;
|
|
15540
|
-
const bottomFreeSpace = window.innerHeight - bottom;
|
|
15541
|
-
if (rightFreeSpace > menuWidth) {
|
|
15542
|
-
this._componentRef.instance.left = right;
|
|
15543
|
-
}
|
|
15544
|
-
else {
|
|
15545
|
-
this._componentRef.instance.left = left - menuWidth;
|
|
15546
|
-
}
|
|
15547
|
-
if (bottomFreeSpace <= menuHeight) {
|
|
15548
|
-
this._componentRef.instance.top = Math.max(window.innerHeight - menuHeight, window.scrollY);
|
|
15549
|
-
}
|
|
15550
|
-
else {
|
|
15551
|
-
this._componentRef.instance.top = window.scrollY + top;
|
|
15552
|
-
}
|
|
15776
|
+
onButtonClick() {
|
|
15777
|
+
if (!this.disabled) {
|
|
15778
|
+
this.buttonClicked.emit();
|
|
15779
|
+
this.closeDropdown();
|
|
15553
15780
|
}
|
|
15554
15781
|
}
|
|
15555
|
-
|
|
15556
|
-
|
|
15557
|
-
|
|
15558
|
-
|
|
15559
|
-
});
|
|
15560
|
-
// Decrement current item event.
|
|
15561
|
-
this._tieredMenuEventService.decrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
|
|
15562
|
-
this._decrementCurItem();
|
|
15563
|
-
});
|
|
15564
|
-
// Select item event.
|
|
15565
|
-
this._tieredMenuEventService.selectItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe((item) => {
|
|
15566
|
-
if (item.submenu) {
|
|
15567
|
-
this._tieredMenuEventService.openItemMenuEvent.emit(item);
|
|
15568
|
-
}
|
|
15569
|
-
else if (item.command) {
|
|
15570
|
-
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
15571
|
-
item.command();
|
|
15572
|
-
}
|
|
15573
|
-
});
|
|
15574
|
-
// Close all menus event.
|
|
15575
|
-
this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
|
|
15576
|
-
this._destroy();
|
|
15577
|
-
this.tieredMenuService.currentItem = null;
|
|
15578
|
-
this.tieredMenuService.currentItems = this.tieredMenuService.items;
|
|
15579
|
-
this.tieredMenuService.markAllItemsAsClosed(this.tieredMenuService.items);
|
|
15580
|
-
});
|
|
15581
|
-
// Open item menu event.
|
|
15582
|
-
this._tieredMenuEventService.openItemMenuEvent.pipe(takeUntil(this._unsubscribe$)).subscribe((item) => {
|
|
15583
|
-
if (this.tieredMenuService.currentItem) {
|
|
15584
|
-
if (this.tieredMenuService.currentItem.parent === item) {
|
|
15585
|
-
return;
|
|
15586
|
-
}
|
|
15587
|
-
if (!this.tieredMenuService.searchTheHierarchy(this.tieredMenuService.currentItem.parent, item)) {
|
|
15588
|
-
let current = this.tieredMenuService.currentItem;
|
|
15589
|
-
current.isOpen = false;
|
|
15590
|
-
while ((current === null || current === void 0 ? void 0 : current.parent) !== item.parent) {
|
|
15591
|
-
this._tieredMenuEventService.closeItemMenuEvent.emit(current);
|
|
15592
|
-
this._changeDetectorRef.detectChanges();
|
|
15593
|
-
current = current.parent;
|
|
15594
|
-
}
|
|
15595
|
-
if (current) {
|
|
15596
|
-
current.isOpen = false;
|
|
15597
|
-
}
|
|
15598
|
-
}
|
|
15599
|
-
}
|
|
15600
|
-
if (item.submenu && !item.isOpen && this.items.includes(item)) {
|
|
15601
|
-
const { top, right, left, bottom } = document.querySelector(`#${item.id}`).getBoundingClientRect();
|
|
15602
|
-
const position = { top, right, left, bottom };
|
|
15603
|
-
this._createMenu(item.submenu, position);
|
|
15604
|
-
this.tieredMenuService.currentItems = item.submenu;
|
|
15605
|
-
this.tieredMenuService.currentItem = item.submenu[0];
|
|
15606
|
-
item.isOpen = true;
|
|
15607
|
-
}
|
|
15608
|
-
});
|
|
15609
|
-
// Close item menu event.
|
|
15610
|
-
this._tieredMenuEventService.closeItemMenuEvent
|
|
15611
|
-
.pipe(takeUntil(this._unsubscribe$))
|
|
15612
|
-
.subscribe((item) => {
|
|
15613
|
-
var _a, _b;
|
|
15614
|
-
if (this.items.some((i) => i.id === item.id)) {
|
|
15615
|
-
if (item.parent) {
|
|
15616
|
-
item.parent.isOpen = false;
|
|
15617
|
-
}
|
|
15618
|
-
this.tieredMenuService.currentItems = ((_b = (_a = item === null || item === void 0 ? void 0 : item.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.submenu) || this.tieredMenuService.items;
|
|
15619
|
-
this.tieredMenuService.currentItem = item.parent;
|
|
15620
|
-
this.destroyRequest.emit(false);
|
|
15621
|
-
}
|
|
15622
|
-
});
|
|
15782
|
+
onDropdownClick() {
|
|
15783
|
+
if (!this.disabled) {
|
|
15784
|
+
this.open = !this.open;
|
|
15785
|
+
}
|
|
15623
15786
|
}
|
|
15624
|
-
|
|
15625
|
-
|
|
15626
|
-
|
|
15627
|
-
|
|
15628
|
-
{
|
|
15629
|
-
|
|
15630
|
-
|
|
15631
|
-
|
|
15787
|
+
onOptionClick(option) {
|
|
15788
|
+
option.action && option.action();
|
|
15789
|
+
this.closeDropdown();
|
|
15790
|
+
}
|
|
15791
|
+
closeDropdown() {
|
|
15792
|
+
this.open = false;
|
|
15793
|
+
}
|
|
15794
|
+
};
|
|
15795
|
+
SplitButtonComponent.ctorParameters = () => [
|
|
15796
|
+
{ type: ElementRef }
|
|
15632
15797
|
];
|
|
15633
15798
|
__decorate([
|
|
15634
|
-
|
|
15635
|
-
],
|
|
15799
|
+
Input()
|
|
15800
|
+
], SplitButtonComponent.prototype, "disabled", void 0);
|
|
15636
15801
|
__decorate([
|
|
15637
|
-
|
|
15638
|
-
],
|
|
15802
|
+
Input()
|
|
15803
|
+
], SplitButtonComponent.prototype, "iconClass", void 0);
|
|
15639
15804
|
__decorate([
|
|
15640
|
-
|
|
15641
|
-
],
|
|
15805
|
+
Input()
|
|
15806
|
+
], SplitButtonComponent.prototype, "label", void 0);
|
|
15642
15807
|
__decorate([
|
|
15643
|
-
|
|
15644
|
-
],
|
|
15645
|
-
|
|
15808
|
+
Input()
|
|
15809
|
+
], SplitButtonComponent.prototype, "type", void 0);
|
|
15810
|
+
__decorate([
|
|
15811
|
+
Input()
|
|
15812
|
+
], SplitButtonComponent.prototype, "options", void 0);
|
|
15813
|
+
__decorate([
|
|
15814
|
+
Output()
|
|
15815
|
+
], SplitButtonComponent.prototype, "buttonClicked", void 0);
|
|
15816
|
+
__decorate([
|
|
15817
|
+
HostListener("document:click", ["$event"])
|
|
15818
|
+
], SplitButtonComponent.prototype, "onClickout", null);
|
|
15819
|
+
SplitButtonComponent = __decorate([
|
|
15646
15820
|
Component({
|
|
15647
|
-
selector: "s-
|
|
15648
|
-
template: "<div
|
|
15649
|
-
styles: [".
|
|
15821
|
+
selector: "s-split-button",
|
|
15822
|
+
template: "<div class=\"split-button\" [ngClass]=\"{\n 'split-button--primary': type == 'primary',\n 'split-button--secondary': type == 'secondary',\n 'split-button--default': type == 'default',\n 'split-button--disabled': disabled\n }\">\n <button class=\"button\" (click)=\"onButtonClick()\">\n <span class=\"button__icon\" [ngClass]=\"iconClass\"></span>\n <span class=\"button__label\">{{ label }}</span>\n </button>\n <button class=\"dropdown\" (click)=\"onDropdownClick()\">\n <span class=\"dropdown__icon\" [ngClass]=\"{\n 'far': true,\n 'fa-chevron-down': !open,\n 'fa-chevron-up': open\n }\">\n </span>\n </button>\n</div>\n\n<ul *ngIf=\"this.open\" class=\"options\">\n <li *ngFor=\"let option of options\" (click)=\"onOptionClick(option)\">\n {{ option.title }}\n </li>\n</ul>",
|
|
15823
|
+
styles: [".split-button{display:-ms-flexbox;display:flex;-webkit-user-select:none;-ms-user-select:none;user-select:none}.split-button .button{-ms-flex-align:center;align-items:center;border:none;border-radius:4px 0 0 4px;display:-ms-flexbox;display:flex;padding:8px 8px 8px 12px;transition:.3s ease-in-out}.split-button .button__icon{font-size:16px;padding:0 4px}.split-button .button__title{font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:21px}.split-button .dropdown{-ms-flex-align:center;align-items:center;border:none;border-left:1px solid #608190;border-radius:0 4px 4px 0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:12px 8px;transition:.3s ease-in-out}.split-button--disabled{opacity:.5}.split-button--primary .button,.split-button--primary .dropdown{background-color:#428bca;color:#fff}.split-button--primary:not(.split-button--primary--disabled) .button,.split-button--primary:not(.split-button--primary--disabled) .dropdown{cursor:pointer}.split-button--primary:not(.split-button--primary--disabled) .button:hover,.split-button--primary:not(.split-button--primary--disabled) .dropdown:hover{background-color:#063951}.split-button--secondary .button,.split-button--secondary .dropdown{background-color:#7892a1;color:#fff}.split-button--secondary:not(.split-button--secondary--disabled) .button,.split-button--secondary:not(.split-button--secondary--disabled) .dropdown{cursor:pointer}.split-button--secondary:not(.split-button--secondary--disabled) .button:hover,.split-button--secondary:not(.split-button--secondary--disabled) .dropdown:hover{background-color:#697882}.split-button--default .button,.split-button--default .dropdown{background-color:unset;border:1px solid #d8d8d8;color:#333}.split-button--default:not(.split-button--default--disabled) .button,.split-button--default:not(.split-button--default--disabled) .dropdown{cursor:pointer}.split-button--default:not(.split-button--default--disabled) .button:hover,.split-button--default:not(.split-button--default--disabled) .dropdown:hover{background-color:#d8d8d8}.options{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.25);display:inline-block;list-style:none;margin:2px 0;padding:8px 0;position:absolute;-webkit-user-select:none;-ms-user-select:none;user-select:none}.options li{color:#333;cursor:pointer;font-family:\"Open Sans\",sans-serif;font-weight:400;font-size:14px;line-height:21px;padding:8px 16px}.options li:hover{background-color:#d8d8d8}"]
|
|
15650
15824
|
})
|
|
15651
|
-
],
|
|
15825
|
+
], SplitButtonComponent);
|
|
15652
15826
|
|
|
15653
|
-
let
|
|
15827
|
+
let SplitButtonModule = class SplitButtonModule {
|
|
15654
15828
|
};
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
],
|
|
15829
|
+
SplitButtonModule = __decorate([
|
|
15830
|
+
NgModule({
|
|
15831
|
+
imports: [CommonModule],
|
|
15832
|
+
declarations: [SplitButtonComponent],
|
|
15833
|
+
exports: [SplitButtonComponent],
|
|
15834
|
+
})
|
|
15835
|
+
], SplitButtonModule);
|
|
15658
15836
|
|
|
15659
|
-
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
this.
|
|
15663
|
-
this.
|
|
15664
|
-
this.
|
|
15665
|
-
this.
|
|
15666
|
-
this.
|
|
15667
|
-
this.
|
|
15668
|
-
this.
|
|
15669
|
-
this.
|
|
15670
|
-
this.
|
|
15671
|
-
this.
|
|
15672
|
-
this.
|
|
15673
|
-
this.
|
|
15674
|
-
this.
|
|
15675
|
-
|
|
15676
|
-
onClick(event) {
|
|
15677
|
-
if (this.triggerEvent === "click" && !this._isOpen) {
|
|
15678
|
-
this._lastActiveElement = document.activeElement;
|
|
15679
|
-
this._createMenu();
|
|
15680
|
-
event.preventDefault();
|
|
15681
|
-
event.stopPropagation();
|
|
15682
|
-
}
|
|
15683
|
-
}
|
|
15684
|
-
ngOnInit() {
|
|
15685
|
-
this._subscribeEvents();
|
|
15686
|
-
}
|
|
15687
|
-
ngDoCheck() {
|
|
15688
|
-
if (!this.previousItems) {
|
|
15689
|
-
this.previousItems = this._tieredMenuService.cloneItems(this.items);
|
|
15690
|
-
}
|
|
15691
|
-
let hasChanges = false;
|
|
15692
|
-
if (this.items.length !== this.previousItems.length) {
|
|
15693
|
-
hasChanges = true;
|
|
15694
|
-
}
|
|
15695
|
-
else {
|
|
15696
|
-
for (let i = 0; i < this.items.length; i++) {
|
|
15697
|
-
if (!this._compareItems(this.items[i], this.previousItems[i])) {
|
|
15698
|
-
hasChanges = true;
|
|
15699
|
-
break;
|
|
15700
|
-
}
|
|
15701
|
-
}
|
|
15702
|
-
}
|
|
15703
|
-
if (hasChanges) {
|
|
15704
|
-
this._updateServiceItems();
|
|
15705
|
-
this._changeDetectorRef.detectChanges();
|
|
15706
|
-
this._rebuildMenu();
|
|
15707
|
-
}
|
|
15708
|
-
this.previousItems = this._tieredMenuService.cloneItems(this.items);
|
|
15709
|
-
}
|
|
15710
|
-
ngOnDestroy() {
|
|
15711
|
-
this._unsubscribe$.next();
|
|
15712
|
-
this._unsubscribe$.complete();
|
|
15713
|
-
this._destroy();
|
|
15714
|
-
}
|
|
15715
|
-
_createMenu() {
|
|
15716
|
-
var _a, _b, _c;
|
|
15717
|
-
this._updateServiceItems();
|
|
15718
|
-
if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
15719
|
-
(_b = this._tieredMenuGlobalService.lastInstance) === null || _b === void 0 ? void 0 : _b._destroy();
|
|
15720
|
-
this._tieredMenuGlobalService.lastInstance = this;
|
|
15721
|
-
(_c = this._lastActiveElement) === null || _c === void 0 ? void 0 : _c.blur();
|
|
15722
|
-
this._isOpen = true;
|
|
15723
|
-
this._isNested = document.body.clientWidth < 600;
|
|
15724
|
-
this._isNested ? this._createNestedMenu() : this._createTieredMenu();
|
|
15725
|
-
}
|
|
15726
|
-
}
|
|
15727
|
-
_createTieredMenu() {
|
|
15728
|
-
var _a;
|
|
15729
|
-
if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
15730
|
-
const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent);
|
|
15731
|
-
this._componentRef = componentFactory.create(this._injector);
|
|
15732
|
-
this._appRef.attachView(this._componentRef.hostView);
|
|
15733
|
-
const domElem = this._componentRef.hostView.rootNodes[0];
|
|
15734
|
-
document.body.appendChild(domElem);
|
|
15735
|
-
this._setMenuComponentProperties();
|
|
15736
|
-
this._componentRef.instance.destroyRequest.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
|
|
15737
|
-
this._destroy();
|
|
15738
|
-
});
|
|
15739
|
-
this._setMenuPosition();
|
|
15740
|
-
}
|
|
15837
|
+
var StatsCardComponent_1;
|
|
15838
|
+
let StatsCardComponent = StatsCardComponent_1 = class StatsCardComponent {
|
|
15839
|
+
constructor() {
|
|
15840
|
+
this.id = `s-stats-card-${StatsCardComponent_1.nextId++}`;
|
|
15841
|
+
this.alwaysWithBorder = false;
|
|
15842
|
+
this.lightVersion = false;
|
|
15843
|
+
this.lightMode = true;
|
|
15844
|
+
this.iconClass = "fa fa-bar-chart";
|
|
15845
|
+
this.color = "#339966";
|
|
15846
|
+
this.animateNumbers = true;
|
|
15847
|
+
this.clickable = false;
|
|
15848
|
+
this.tooltip = "";
|
|
15849
|
+
this.onClick = new EventEmitter();
|
|
15850
|
+
this.ANIMATION_DURATION_MS = 200;
|
|
15851
|
+
this.STEP_DURATION_MS = 20;
|
|
15852
|
+
this.previousValue = "0";
|
|
15853
|
+
this._value = "0";
|
|
15741
15854
|
}
|
|
15742
|
-
|
|
15743
|
-
|
|
15744
|
-
|
|
15745
|
-
|
|
15746
|
-
this.
|
|
15747
|
-
|
|
15748
|
-
|
|
15749
|
-
document.body.appendChild(domElem);
|
|
15750
|
-
this._setMenuComponentProperties();
|
|
15751
|
-
this._setMenuPosition();
|
|
15752
|
-
}
|
|
15855
|
+
set value(value) {
|
|
15856
|
+
this.previousValue = this._value;
|
|
15857
|
+
this._value = String(value);
|
|
15858
|
+
if (this.animateNumbers)
|
|
15859
|
+
this.updateDisplayValue();
|
|
15860
|
+
else
|
|
15861
|
+
this.displayValue = this.value;
|
|
15753
15862
|
}
|
|
15754
|
-
|
|
15755
|
-
|
|
15756
|
-
this._isOpen = false;
|
|
15757
|
-
window.clearTimeout(this._showTimeout);
|
|
15758
|
-
this._appRef.detachView(this._componentRef.hostView);
|
|
15759
|
-
this._componentRef.destroy();
|
|
15760
|
-
this._componentRef = null;
|
|
15761
|
-
this._tieredMenuService.currentItems = this._tieredMenuService.items;
|
|
15762
|
-
this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
|
|
15763
|
-
this._tieredMenuEventService.closeAllMenusEvent.emit();
|
|
15764
|
-
}
|
|
15863
|
+
get value() {
|
|
15864
|
+
return this._value;
|
|
15765
15865
|
}
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
const
|
|
15769
|
-
const
|
|
15770
|
-
const
|
|
15771
|
-
const
|
|
15772
|
-
const
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
}, 0);
|
|
15782
|
-
const menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + MARGIN;
|
|
15783
|
-
const rightFreeSpace = window.innerWidth - right;
|
|
15784
|
-
const bottomFreeSpace = window.innerHeight - bottom;
|
|
15785
|
-
this._componentRef.instance.top = bottom;
|
|
15786
|
-
this._componentRef.instance.left = left;
|
|
15787
|
-
if (bottomFreeSpace <= menuHeight) {
|
|
15788
|
-
this._componentRef.instance.top = Math.max(scrollY + bottom - menuHeight, 0);
|
|
15789
|
-
}
|
|
15790
|
-
else {
|
|
15791
|
-
this._componentRef.instance.top = window.scrollY + bottom + MARGIN;
|
|
15866
|
+
updateDisplayValue() {
|
|
15867
|
+
const animationDuration = new BigNumber$1(this.ANIMATION_DURATION_MS);
|
|
15868
|
+
const stepDuration = new BigNumber$1(this.STEP_DURATION_MS);
|
|
15869
|
+
const animationCount = animationDuration.dividedBy(stepDuration);
|
|
15870
|
+
const previousRawValue = new BigNumber$1(this.previousValue.replace(/\D/g, ""));
|
|
15871
|
+
const rawValue = new BigNumber$1(this.value.replace(/\D/g, ""));
|
|
15872
|
+
const incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(animationCount);
|
|
15873
|
+
const incremental = previousRawValue.isLessThan(rawValue);
|
|
15874
|
+
clearInterval(this.intervalId);
|
|
15875
|
+
this.displayValue = this.replaceNumericPositions(this.value);
|
|
15876
|
+
let counter = previousRawValue;
|
|
15877
|
+
this.intervalId = setInterval(() => {
|
|
15878
|
+
if (incremental && counter.isLessThan(rawValue)) {
|
|
15879
|
+
this.displayValue = this.replaceNumericPositions(this.displayValue, counter);
|
|
15880
|
+
counter = counter.plus(incrementValue);
|
|
15792
15881
|
}
|
|
15793
|
-
if (
|
|
15794
|
-
this.
|
|
15882
|
+
else if (!incremental && counter.isGreaterThan(rawValue)) {
|
|
15883
|
+
this.displayValue = this.replaceNumericPositions(this.displayValue, counter);
|
|
15884
|
+
counter = counter.minus(incrementValue);
|
|
15795
15885
|
}
|
|
15796
15886
|
else {
|
|
15797
|
-
this.
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
}
|
|
15802
|
-
}
|
|
15803
|
-
}
|
|
15804
|
-
_setMenuComponentProperties() {
|
|
15805
|
-
if (this._componentRef != null) {
|
|
15806
|
-
this._componentRef.instance.items = this._tieredMenuService.items;
|
|
15807
|
-
}
|
|
15808
|
-
}
|
|
15809
|
-
_subscribeEvents() {
|
|
15810
|
-
this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
|
|
15811
|
-
this._tieredMenuService.items = this._tieredMenuService.markAllItemsAsClosed(this._tieredMenuService.items);
|
|
15812
|
-
this._destroy();
|
|
15813
|
-
});
|
|
15814
|
-
}
|
|
15815
|
-
_compareItems(item1, item2) {
|
|
15816
|
-
return JSON.stringify(item1) === JSON.stringify(item2);
|
|
15817
|
-
}
|
|
15818
|
-
_rebuildMenu() {
|
|
15819
|
-
this._destroy();
|
|
15887
|
+
this.displayValue = this.value;
|
|
15888
|
+
clearInterval(this.intervalId);
|
|
15889
|
+
}
|
|
15890
|
+
}, this.STEP_DURATION_MS);
|
|
15820
15891
|
}
|
|
15821
|
-
|
|
15822
|
-
|
|
15823
|
-
|
|
15824
|
-
|
|
15892
|
+
replaceNumericPositions(value, newValue) {
|
|
15893
|
+
const rawValue = value.replace(/[^\d]/g, "");
|
|
15894
|
+
const newValueString = newValue ? newValue.toString() : "";
|
|
15895
|
+
const formattedNewValue = newValueString
|
|
15896
|
+
.toString()
|
|
15897
|
+
.replace(/\D/g, "")
|
|
15898
|
+
.padStart(rawValue.length, "0");
|
|
15899
|
+
let newValueIndex = 0;
|
|
15900
|
+
return value
|
|
15901
|
+
.split("")
|
|
15902
|
+
.map(char => {
|
|
15903
|
+
const number = Number(char);
|
|
15904
|
+
if (number || char === "0")
|
|
15905
|
+
return formattedNewValue[newValueIndex++];
|
|
15906
|
+
return char;
|
|
15907
|
+
})
|
|
15908
|
+
.join("");
|
|
15825
15909
|
}
|
|
15826
15910
|
};
|
|
15827
|
-
|
|
15828
|
-
{ type: ElementRef },
|
|
15829
|
-
{ type: ApplicationRef },
|
|
15830
|
-
{ type: ComponentFactoryResolver },
|
|
15831
|
-
{ type: Injector },
|
|
15832
|
-
{ type: TieredMenuEventService },
|
|
15833
|
-
{ type: TieredMenuService },
|
|
15834
|
-
{ type: TieredMenuGlobalService },
|
|
15835
|
-
{ type: ChangeDetectorRef }
|
|
15836
|
-
];
|
|
15911
|
+
StatsCardComponent.nextId = 0;
|
|
15837
15912
|
__decorate([
|
|
15838
15913
|
Input()
|
|
15839
|
-
],
|
|
15914
|
+
], StatsCardComponent.prototype, "id", void 0);
|
|
15840
15915
|
__decorate([
|
|
15841
15916
|
Input()
|
|
15842
|
-
],
|
|
15917
|
+
], StatsCardComponent.prototype, "label", void 0);
|
|
15843
15918
|
__decorate([
|
|
15844
|
-
|
|
15845
|
-
],
|
|
15846
|
-
TieredMenuDirective = __decorate([
|
|
15847
|
-
Directive({
|
|
15848
|
-
selector: "[sTieredMenu]",
|
|
15849
|
-
providers: [TieredMenuEventService, TieredMenuService],
|
|
15850
|
-
})
|
|
15851
|
-
], TieredMenuDirective);
|
|
15852
|
-
|
|
15853
|
-
let TieredMenuDividerComponent = class TieredMenuDividerComponent {
|
|
15854
|
-
};
|
|
15855
|
-
TieredMenuDividerComponent = __decorate([
|
|
15856
|
-
Component({
|
|
15857
|
-
selector: "s-tiered-menu-divider",
|
|
15858
|
-
template: "<div class=\"divider\"></div>",
|
|
15859
|
-
styles: [".divider{margin:2px 0;height:1px;background-color:#ccc}"]
|
|
15860
|
-
})
|
|
15861
|
-
], TieredMenuDividerComponent);
|
|
15862
|
-
|
|
15863
|
-
let TieredMenuItemComponent = class TieredMenuItemComponent {
|
|
15864
|
-
constructor(_tieredMenuEventService) {
|
|
15865
|
-
this._tieredMenuEventService = _tieredMenuEventService;
|
|
15866
|
-
this.focused = false;
|
|
15867
|
-
this.highlight = false;
|
|
15868
|
-
this.triggerEvent = "click";
|
|
15869
|
-
this.closeOnClick = false;
|
|
15870
|
-
}
|
|
15871
|
-
onClick() {
|
|
15872
|
-
if (this.item.disabled)
|
|
15873
|
-
return;
|
|
15874
|
-
if (this.item.submenu) {
|
|
15875
|
-
if (!this.item.isOpen) {
|
|
15876
|
-
this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
|
|
15877
|
-
}
|
|
15878
|
-
else if (this.closeOnClick) {
|
|
15879
|
-
this._tieredMenuEventService.closeItemMenuEvent.emit(this.item);
|
|
15880
|
-
}
|
|
15881
|
-
}
|
|
15882
|
-
else {
|
|
15883
|
-
this._tieredMenuEventService.selectItemEvent.emit(this.item);
|
|
15884
|
-
}
|
|
15885
|
-
}
|
|
15886
|
-
onMouseEnter() {
|
|
15887
|
-
if (this.item.disabled)
|
|
15888
|
-
return;
|
|
15889
|
-
if (this.triggerEvent === "hover" && !this.item.isOpen) {
|
|
15890
|
-
this._showTimeout = window.setTimeout(() => {
|
|
15891
|
-
this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
|
|
15892
|
-
}, 300);
|
|
15893
|
-
}
|
|
15894
|
-
}
|
|
15895
|
-
onMouseLeave() {
|
|
15896
|
-
window.clearTimeout(this._showTimeout);
|
|
15897
|
-
}
|
|
15898
|
-
};
|
|
15899
|
-
TieredMenuItemComponent.ctorParameters = () => [
|
|
15900
|
-
{ type: TieredMenuEventService }
|
|
15901
|
-
];
|
|
15919
|
+
Input()
|
|
15920
|
+
], StatsCardComponent.prototype, "alwaysWithBorder", void 0);
|
|
15902
15921
|
__decorate([
|
|
15903
15922
|
Input()
|
|
15904
|
-
],
|
|
15923
|
+
], StatsCardComponent.prototype, "lightVersion", void 0);
|
|
15905
15924
|
__decorate([
|
|
15906
15925
|
Input()
|
|
15907
|
-
],
|
|
15926
|
+
], StatsCardComponent.prototype, "lightMode", void 0);
|
|
15908
15927
|
__decorate([
|
|
15909
15928
|
Input()
|
|
15910
|
-
],
|
|
15929
|
+
], StatsCardComponent.prototype, "iconClass", void 0);
|
|
15911
15930
|
__decorate([
|
|
15912
15931
|
Input()
|
|
15913
|
-
],
|
|
15932
|
+
], StatsCardComponent.prototype, "color", void 0);
|
|
15914
15933
|
__decorate([
|
|
15915
15934
|
Input()
|
|
15916
|
-
],
|
|
15935
|
+
], StatsCardComponent.prototype, "animateNumbers", void 0);
|
|
15917
15936
|
__decorate([
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
], TieredMenuItemComponent.prototype, "onClick", null);
|
|
15937
|
+
Input()
|
|
15938
|
+
], StatsCardComponent.prototype, "clickable", void 0);
|
|
15921
15939
|
__decorate([
|
|
15922
|
-
|
|
15923
|
-
],
|
|
15940
|
+
Input()
|
|
15941
|
+
], StatsCardComponent.prototype, "value", null);
|
|
15924
15942
|
__decorate([
|
|
15925
|
-
|
|
15926
|
-
],
|
|
15927
|
-
|
|
15943
|
+
Input()
|
|
15944
|
+
], StatsCardComponent.prototype, "tooltip", void 0);
|
|
15945
|
+
__decorate([
|
|
15946
|
+
Output()
|
|
15947
|
+
], StatsCardComponent.prototype, "onClick", void 0);
|
|
15948
|
+
StatsCardComponent = StatsCardComponent_1 = __decorate([
|
|
15928
15949
|
Component({
|
|
15929
|
-
selector: "s-
|
|
15930
|
-
template: "<div\n [id]=\"
|
|
15931
|
-
|
|
15950
|
+
selector: "s-stats-card",
|
|
15951
|
+
template: "<div\n [id]=\"id\"\n class=\"s-stats-card\"\n [ngClass]=\"{\n 's-stats-card--always-border': alwaysWithBorder,\n 's-stats-card--light': lightMode,\n 's-stats-card--color': !lightMode,\n 's-stats-card--light-version': lightVersion,\n 's-stats-card--clickable': clickable\n }\"\n (click)=\"clickable && onClick.next($event)\">\n\n <div\n [id]=\"id + '-background'\"\n class=\"s-stats-card-background\"\n [ngStyle]=\"{ 'background-color': !lightMode && color || '' }\">\n </div>\n <div\n [id]=\"id + '-overlay'\"\n class=\"s-stats-card-overlay\">\n </div>\n\n <div\n [id]=\"id + '-info-container'\"\n class=\"s-stats-card-info-container\">\n <div class=\"s-stats-card-info-inner-container\">\n <div\n [id]=\"id + '-icon-container'\"\n class=\"s-stats-card-icon-container\"\n [ngStyle]=\"{ 'background-color': lightMode && color || '' }\">\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n [ngClass]=\"{ 's-stats-card-icon': true }\"\n [ngStyle]=\"{'color': !lightMode && color || ''}\"\n aria-hidden=\"true\"></span>\n </div>\n\n <div\n [id]=\"id + '-text-container'\"\n class=\"s-stats-card-text-container\">\n <h4\n [id]=\"id + '-label'\"\n class=\"s-stats-card-label\"\n [pTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n {{ label }}\n </h4>\n <span\n [id]=\"id + '-value'\"\n class=\"s-stats-card-value\"\n [pTooltip]=\"displayValue\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n {{ displayValue }}\n </span>\n </div>\n </div>\n <div class=\"s-stats-card-content-inner-container\">\n <div #content class=\"s-stats-card-content-container\">\n <ng-content></ng-content>\n </div>\n <div\n *ngIf=\"content.children.length\"\n class=\"s-stats-card-content-separator\">\n </div>\n </div>\n <span\n *ngIf=\"tooltip\"\n class=\"s-status-card-tooltip\"\n [pTooltip]=\"tooltip\"\n tooltipPosition=\"right\">\n <i class=\"fa fa-info-circle s-status-card-tooltip-icon\"></i>\n </span>\n </div>\n</div>\n",
|
|
15952
|
+
encapsulation: ViewEncapsulation.None,
|
|
15953
|
+
styles: ["s-stats-card{display:block;height:auto;position:relative}s-stats-card .s-stats-card{border:1px solid transparent;min-width:120px;overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-background,s-stats-card .s-stats-card .s-stats-card-overlay{height:calc(100% - 2px);left:1px;position:absolute;top:1px;width:calc(100% - 2px)}s-stats-card .s-stats-card .s-stats-card-background{background-color:#fff}s-stats-card .s-stats-card .s-stats-card-overlay{background-color:#000;opacity:0;transition:opacity .2s ease-out}s-stats-card .s-stats-card .s-stats-card-info-container{overflow:auto;padding:15px;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container{overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{float:left;font-size:24px;height:50px;line-height:50px;text-align:center;transition:width .2s ease-out;width:50px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{-ms-flex-align:start;align-items:flex-start;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;float:left;height:50px;-ms-flex-pack:center;justify-content:center;max-width:calc(100% - 65px);padding-left:15px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label{font-weight:400;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{display:inline-block;font-size:20px;font-weight:700;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-separator{border-top:1px solid #ccc;margin:15px 0;-ms-flex-order:1;order:1}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-container{-ms-flex-order:2;order:2}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip{font-size:1rem;line-height:0;margin:.3rem;position:absolute;right:0;top:0}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip .s-status-card-tooltip-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--color .s-stats-card-icon-container{background-color:#fff}s-stats-card .s-stats-card.s-stats-card--light *{color:#333}s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--light * .s-status-card-tooltip .s-status-card-tooltip-icon,s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-label{color:#999}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card.s-stats-card--clickable{cursor:pointer}s-stats-card .s-stats-card:hover .s-stats-card-overlay{opacity:.2}s-stats-card .s-stats-card.s-stats-card--light:hover .s-stats-card-overlay{opacity:.08}s-stats-card .s-stats-card.s-stats-card--light{border-color:#ccc}.s-sidebar-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),.ui-dialog-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),p-panel .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border){border-color:transparent}@media (max-width:767px){s-stats-card .s-stats-card{height:auto}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:visible;white-space:normal;word-break:break-all}}"]
|
|
15932
15954
|
})
|
|
15933
|
-
],
|
|
15955
|
+
], StatsCardComponent);
|
|
15934
15956
|
|
|
15935
|
-
let
|
|
15957
|
+
let StatsCardModule = class StatsCardModule {
|
|
15936
15958
|
};
|
|
15937
|
-
|
|
15959
|
+
StatsCardModule = __decorate([
|
|
15938
15960
|
NgModule({
|
|
15939
15961
|
imports: [
|
|
15940
15962
|
CommonModule,
|
|
15963
|
+
TooltipModule$1,
|
|
15941
15964
|
],
|
|
15942
15965
|
declarations: [
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
TieredMenuDividerComponent,
|
|
15966
|
+
StatsCardComponent,
|
|
15967
|
+
],
|
|
15968
|
+
exports: [
|
|
15969
|
+
StatsCardComponent,
|
|
15948
15970
|
],
|
|
15949
|
-
exports: [TieredMenuDirective],
|
|
15950
|
-
providers: [TieredMenuGlobalService],
|
|
15951
15971
|
})
|
|
15952
|
-
],
|
|
15972
|
+
], StatsCardModule);
|
|
15973
|
+
|
|
15974
|
+
var StepsComponent_1;
|
|
15975
|
+
var StepState;
|
|
15976
|
+
(function (StepState) {
|
|
15977
|
+
StepState["Default"] = "default";
|
|
15978
|
+
StepState["Success"] = "success";
|
|
15979
|
+
StepState["Warning"] = "warning";
|
|
15980
|
+
})(StepState || (StepState = {}));
|
|
15981
|
+
let StepsComponent = StepsComponent_1 = class StepsComponent {
|
|
15982
|
+
constructor() {
|
|
15983
|
+
this.id = `s-steps-${StepsComponent_1.nextId++}`;
|
|
15984
|
+
this.activeIndex = 0;
|
|
15985
|
+
this.stepSelected = new EventEmitter();
|
|
15986
|
+
}
|
|
15987
|
+
stepClick(step, index, event) {
|
|
15988
|
+
if (step.disabled || index == this.activeIndex)
|
|
15989
|
+
return;
|
|
15990
|
+
this.stepSelected.emit({ step, index, event });
|
|
15991
|
+
}
|
|
15992
|
+
get stepState() {
|
|
15993
|
+
return StepState;
|
|
15994
|
+
}
|
|
15995
|
+
barAnimation(index, activeIndex) {
|
|
15996
|
+
const visited = index < activeIndex;
|
|
15997
|
+
const activated = index === activeIndex;
|
|
15998
|
+
return visited || activated;
|
|
15999
|
+
}
|
|
16000
|
+
afterBarAnimation(index, activeIndex) {
|
|
16001
|
+
const visited = index < activeIndex;
|
|
16002
|
+
const activated = index === activeIndex - 1;
|
|
16003
|
+
return visited || activated;
|
|
16004
|
+
}
|
|
16005
|
+
get visibledStep() {
|
|
16006
|
+
return this.steps.filter((step) => !step.hidden);
|
|
16007
|
+
}
|
|
16008
|
+
};
|
|
16009
|
+
StepsComponent.nextId = 0;
|
|
16010
|
+
__decorate([
|
|
16011
|
+
Input()
|
|
16012
|
+
], StepsComponent.prototype, "id", void 0);
|
|
16013
|
+
__decorate([
|
|
16014
|
+
Input()
|
|
16015
|
+
], StepsComponent.prototype, "steps", void 0);
|
|
16016
|
+
__decorate([
|
|
16017
|
+
Input()
|
|
16018
|
+
], StepsComponent.prototype, "activeIndex", void 0);
|
|
16019
|
+
__decorate([
|
|
16020
|
+
Output()
|
|
16021
|
+
], StepsComponent.prototype, "stepSelected", void 0);
|
|
16022
|
+
StepsComponent = StepsComponent_1 = __decorate([
|
|
16023
|
+
Component({
|
|
16024
|
+
selector: "s-steps",
|
|
16025
|
+
template: "<div [id]=\"id\" class=\"s-steps-container\">\n <ng-container *ngFor=\"let step of visibledStep; let i = index; let isFirst = first; let isLast = last\">\n <div *ngIf=\"!isFirst\" class=\"s-step-progress-bar\"\n [@activeDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-disabled': step.disabled,\n 's-step-visited': (i < activeIndex),\n 's-step-active': (i === activeIndex)\n }\"></div>\n <div [id]=\"id + '-step-' + (step.id || i)\" class=\"s-step-header\" (click)=\"stepClick(step, i, $event)\" role=\"tab\"\n tabindex=\"0\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-controls]=\"step.ariaControls\"\n [attr.aria-labelledby]=\"!step.ariaLabel ? 'step-label-' + i : null\" [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"visibledStep.length\" [attr.aria-selected]=\"activeIndex == i\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-visited': (i < activeIndex),\n 's-step-active': (i === activeIndex),\n 's-step-previous': (i === activeIndex - 1)\n }\">\n <div *ngIf=\"!isFirst\"\n [@beforeActiveDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\"\n class=\"s-step-progress-bar-before\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-disabled': step.disabled,\n 's-step-visited': (i < activeIndex),\n 's-step-active': (i === activeIndex)\n }\"></div>\n <div *ngIf=\"!isLast\"\n [@afterActiveDesative]=\"afterBarAnimation(i, activeIndex) ? 'active': 'desactive'\"\n class=\"s-step-progress-bar-after\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-disabled': visibledStep[i + 1].disabled,\n 's-step-visited': ((i + 1) < activeIndex),\n 's-step-active': (i === (activeIndex - 1))\n }\"></div>\n <div\n class=\"s-step-index\"\n [ngClass]=\"{'s-step-disabled': step.disabled}\"\n [pTooltip]=\"step.tooltip\"\n tooltipPosition=\"top\">\n <div class=\"s-step-index-content\">\n <span\n *ngIf=\"step.state !== stepState.Warning && (step.state == stepState.Success || activeIndex > i)\"\n class=\"fas fa-check\"\n aria-hidden=\"true\"\n [attr.aria-label]=\"i + 1\"></span>\n <span\n *ngIf=\"step.state == stepState.Warning\"\n class=\"fas fa-exclamation-triangle\"\n aria-hidden=\"true\"\n [attr.aria-label]=\"i + 1\"></span>\n <span\n *ngIf=\"step.state != stepState.Success && step.state != stepState.Warning && activeIndex <= i\">\n {{i + 1}}\n </span>\n </div>\n </div>\n <div\n [id]=\"'step-label-' + i\"\n class=\"s-step-label\"\n [ngClass]=\"{'s-step-disabled': step.disabled}\">\n <span>\n {{step.label}}\n </span>\n </div>\n </div>\n </ng-container>\n</div>\n",
|
|
16026
|
+
host: {
|
|
16027
|
+
"aria-orientation": "horizontal",
|
|
16028
|
+
role: "tablist",
|
|
16029
|
+
"tab-index": "0",
|
|
16030
|
+
},
|
|
16031
|
+
animations: [
|
|
16032
|
+
trigger("beforeActiveDesative", [
|
|
16033
|
+
state("active", style$7({
|
|
16034
|
+
"background-position": "left bottom",
|
|
16035
|
+
})),
|
|
16036
|
+
state("desactive", style$7({
|
|
16037
|
+
"background-position": "right bottom",
|
|
16038
|
+
})),
|
|
16039
|
+
transition("active => desactive", [animate("50ms 100ms linear")]),
|
|
16040
|
+
transition("desactive => active", [animate("50ms 250ms linear")]),
|
|
16041
|
+
]),
|
|
16042
|
+
trigger("activeDesative", [
|
|
16043
|
+
state("active", style$7({
|
|
16044
|
+
"background-position": "left bottom",
|
|
16045
|
+
})),
|
|
16046
|
+
state("desactive", style$7({
|
|
16047
|
+
"background-position": "right bottom",
|
|
16048
|
+
})),
|
|
16049
|
+
transition("active => desactive", [animate("100ms 150ms linear")]),
|
|
16050
|
+
transition("desactive => active", [animate("100ms 150ms linear")]),
|
|
16051
|
+
]),
|
|
16052
|
+
trigger("afterActiveDesative", [
|
|
16053
|
+
state("active", style$7({
|
|
16054
|
+
"background-position": "left bottom",
|
|
16055
|
+
})),
|
|
16056
|
+
state("desactive", style$7({
|
|
16057
|
+
"background-position": "right bottom",
|
|
16058
|
+
})),
|
|
16059
|
+
transition("active => desactive", [animate("50ms 250ms linear")]),
|
|
16060
|
+
transition("desactive => active", [animate("50ms 100ms linear")]),
|
|
16061
|
+
]),
|
|
16062
|
+
],
|
|
16063
|
+
styles: ["@keyframes scale-up-center{0%{transform:scale(.5)}100%{transform:scale(1)}}.s-steps-container{display:-ms-flexbox;display:flex;white-space:nowrap;-ms-flex-align:start;align-items:flex-start;overflow:hidden;padding:15px 10px}.s-step-header{box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:66px}.s-step-header .s-step-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all;color:#999;font-size:14px;font-weight:400;padding-top:5px}.s-step-header .s-step-progress-bar-before{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;left:0}.s-step-header .s-step-progress-bar-before.s-step-active,.s-step-header .s-step-progress-bar-before.s-step-visited{background-position:left bottom}.s-step-header .s-step-progress-bar-after{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;right:0}.s-step-header .s-step-progress-bar-after.s-step-active,.s-step-header .s-step-progress-bar-after.s-step-visited{background-position:left bottom}.s-step-progress-bar{margin:0;position:relative;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:100%;background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%}.s-step-disabled{opacity:.5;filter:Alpha(Opacity=50)}.s-step-disabled,.s-step-disabled *{cursor:text!important}.s-step-active.s-step-disabled{opacity:1}.s-step-index{background-color:#fff;border:3px solid #ccc;border-radius:50%;color:#999;display:inline-block;font-weight:700;position:relative;transition:background-color .2s ease-out;height:40px;width:40px;-ms-flex:none;flex:none}.s-step-index .s-step-index-content{line-height:18px;font-size:18px;padding-top:8.5px;text-align:center;position:relative;cursor:pointer}.s-step-index:hover{background-color:#f7f7f7}.s-step-warning .s-step-index .s-step-index-content{padding-top:7px}.s-step-visited .s-step-index{border-color:#7892a1;animation:.1s ease-out alternate scale-up-center;background-color:#7892a1}.s-step-visited .s-step-index-content>span{color:#fff}.s-step-active.s-step-progress-bar,.s-step-visited.s-step-progress-bar{background-position:left bottom}.s-step-active .s-step-index{border-color:#7892a1;color:#7892a1;cursor:default}.s-step-active .s-step-label{color:#333;font-weight:700}@media (max-width:767px){.s-step-label{display:none}}"]
|
|
16064
|
+
})
|
|
16065
|
+
], StepsComponent);
|
|
16066
|
+
|
|
16067
|
+
let StepsModule = class StepsModule {
|
|
16068
|
+
};
|
|
16069
|
+
StepsModule = __decorate([
|
|
16070
|
+
NgModule({
|
|
16071
|
+
imports: [CommonModule, TooltipModule$1],
|
|
16072
|
+
declarations: [StepsComponent],
|
|
16073
|
+
exports: [StepsComponent],
|
|
16074
|
+
})
|
|
16075
|
+
], StepsModule);
|
|
15953
16076
|
|
|
15954
16077
|
var TileComponent_1;
|
|
15955
16078
|
let TileComponent = TileComponent_1 = class TileComponent {
|
|
@@ -16861,5 +16984,5 @@ const fallback = {
|
|
|
16861
16984
|
* Generated bundle index. Do not edit.
|
|
16862
16985
|
*/
|
|
16863
16986
|
|
|
16864
|
-
export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileUploadPermissions, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, convertToMomentDateFormat, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, TextFieldComponent as ɵba, NumberFieldModule as ɵbb, LocalizedNumberInputModule as ɵbc, NumberInputModule as ɵbd, NumberFieldComponent as ɵbe, CurrencyFieldModule as ɵbf, CurrencyFieldComponent as ɵbg, NumberFieldModule$1 as ɵbh, BignumberInputModule as ɵbi, BignumberFieldComponent as ɵbj, ProfilePictureModule as ɵbk, ThumbnailService as ɵbl, StructureModule as ɵbm, HeaderComponent as ɵbn, FooterComponent as ɵbo, ProfilePictureFieldComponent as ɵbp, AutocompleteFieldComponent as ɵbq, BooleanFieldComponent as ɵbr, BooleanSwitchFieldComponent as ɵbs, CalendarFieldComponent as ɵbt, ChipsFieldComponent as ɵbu, CountryPhonePickerFieldComponent as ɵbv, DynamicFieldComponent as ɵbw, DynamicFormDirective as ɵbx, FieldsetComponent as ɵby, FileUploadComponent$1 as ɵbz, TemplateDirective as ɵc, LookupFieldComponent as ɵca, RadioButtonComponent as ɵcb, RowComponent as ɵcc, SectionComponent as ɵcd, SelectFieldComponent as ɵce, SliderFieldComponent as ɵcf, TextAreaFieldComponent as ɵcg, TextAreaIAFieldComponent as ɵch, IAssistService as ɵci, DecimalField as ɵck, SideTableComponent as ɵcl, InfiniteScrollModule as ɵcm, InfiniteScrollDirective as ɵcn, IAInsightSidebarComponent as ɵco, IAInsightCardComponent as ɵcp, IAInsightCardLoaderComponent as ɵcq, KanbanEventService as ɵcr, KanbanItemComponent as ɵcs, KanbanColumnComponent as ɵct, KanbanItemDraggingComponent as ɵcu, NumberLocaleOptions as ɵcv,
|
|
16987
|
+
export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileUploadPermissions, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationButtonComponent, NavigationButtonModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, convertToMomentDateFormat, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, TextFieldComponent as ɵba, NumberFieldModule as ɵbb, LocalizedNumberInputModule as ɵbc, NumberInputModule as ɵbd, NumberFieldComponent as ɵbe, CurrencyFieldModule as ɵbf, CurrencyFieldComponent as ɵbg, NumberFieldModule$1 as ɵbh, BignumberInputModule as ɵbi, BignumberFieldComponent as ɵbj, ProfilePictureModule as ɵbk, ThumbnailService as ɵbl, StructureModule as ɵbm, HeaderComponent as ɵbn, FooterComponent as ɵbo, ProfilePictureFieldComponent as ɵbp, AutocompleteFieldComponent as ɵbq, BooleanFieldComponent as ɵbr, BooleanSwitchFieldComponent as ɵbs, CalendarFieldComponent as ɵbt, ChipsFieldComponent as ɵbu, CountryPhonePickerFieldComponent as ɵbv, DynamicFieldComponent as ɵbw, DynamicFormDirective as ɵbx, FieldsetComponent as ɵby, FileUploadComponent$1 as ɵbz, TemplateDirective as ɵc, LookupFieldComponent as ɵca, RadioButtonComponent as ɵcb, RowComponent as ɵcc, SectionComponent as ɵcd, SelectFieldComponent as ɵce, SliderFieldComponent as ɵcf, TextAreaFieldComponent as ɵcg, TextAreaIAFieldComponent as ɵch, IAssistService as ɵci, DecimalField as ɵck, SideTableComponent as ɵcl, InfiniteScrollModule as ɵcm, InfiniteScrollDirective as ɵcn, IAInsightSidebarComponent as ɵco, IAInsightCardComponent as ɵcp, IAInsightCardLoaderComponent as ɵcq, KanbanEventService as ɵcr, KanbanItemComponent as ɵcs, KanbanColumnComponent as ɵct, KanbanItemDraggingComponent as ɵcu, NumberLocaleOptions as ɵcv, TieredMenuEventService as ɵcw, TieredMenuService as ɵcx, TieredMenuGlobalService as ɵcy, TieredMenuComponent as ɵcz, TemplateModule as ɵd, TieredMenuNestedComponent as ɵda, TieredMenuItemComponent as ɵdb, TieredMenuDividerComponent as ɵdc, BorderButtonModule as ɵdd, BorderButtonComponent as ɵde, ProgressBarDeterminateComponent as ɵdf, ProgressBarIndeterminateComponent as ɵdg, SelectButtonItemComponent as ɵdh, SlidePanelService as ɵdi, TimelineItemModule as ɵdj, TimelineIconItemComponent as ɵdk, HorizontalTimelineModule as ɵdl, HorizontalTimelineComponent as ɵdm, VerticalTimelineModule as ɵdn, VerticalTimelineComponent as ɵdo, RangeLineComponent as ɵdp, CollapseOptionComponent as ɵdq, CollapsedItemsComponent as ɵdr, VerticalItemsComponent as ɵds, CustomTranslationsModule as ɵe, CodeEditorComponent as ɵf, CoreFacade as ɵg, CodeMirror6Core as ɵh, CountryPhonePickerService as ɵi, LocalizedCurrencyImpurePipe as ɵj, LocalizedBignumberPipe as ɵk, LocalizedBignumberImpurePipe as ɵl, NumericPipe as ɵm, NumericService as ɵn, EmptyStateGoBackComponent as ɵo, IAssistIconComponent as ɵp, SeniorIconComponent as ɵq, DotsIndicatorComponent as ɵr, LoadingIndicatorComponent as ɵs, FileUploadService as ɵt, InfoSignComponent as ɵu, TableColumnsComponent as ɵv, TablePagingComponent as ɵw, PasswordFieldModule as ɵx, PasswordFieldComponent as ɵy, TextFieldModule as ɵz };
|
|
16865
16988
|
//# sourceMappingURL=seniorsistemas-angular-components.js.map
|