@porscheinformatik/clr-addons 12.3.0 → 12.4.1
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/esm2020/flow-bar/flow-bar.mjs +3 -2
- package/esm2020/flow-bar/flow-bar.module.mjs +6 -5
- package/esm2020/history/history.mjs +4 -3
- package/esm2020/history/history.module.mjs +6 -5
- package/esm2020/location-bar/location-bar-node/location-bar-node.component.mjs +5 -4
- package/esm2020/location-bar/location-bar.module.mjs +5 -4
- package/esm2020/multilingual/abstract-multilingual.mjs +74 -4
- package/esm2020/multilingual/multilingual-input/multilingual-input.mjs +3 -3
- package/esm2020/multilingual/multilingual-selector.mjs +4 -3
- package/esm2020/multilingual/multilingual-textarea/multilingual-textarea.mjs +3 -3
- package/esm2020/multilingual/multilingual.module.mjs +6 -5
- package/fesm2015/clr-addons.mjs +194 -123
- package/fesm2015/clr-addons.mjs.map +1 -1
- package/fesm2020/clr-addons.mjs +193 -123
- package/fesm2020/clr-addons.mjs.map +1 -1
- package/flow-bar/flow-bar.module.d.ts +2 -1
- package/history/history.module.d.ts +2 -1
- package/location-bar/location-bar.module.d.ts +2 -1
- package/multilingual/abstract-multilingual.d.ts +11 -1
- package/multilingual/multilingual.module.d.ts +2 -1
- package/package.json +1 -1
- package/src/components.clr-addons.scss +3 -0
- package/src/components.variables.clr-addons.scss +1 -0
- package/src/view-edit-section/view-edit-section.scss +1 -1
- package/styles/clr-addons-phs.css +5 -1
- package/styles/clr-addons-phs.css.map +1 -1
- package/styles/clr-addons-phs.min.css +1 -1
- package/styles/clr-addons-phs.min.css.map +1 -1
package/fesm2020/clr-addons.mjs
CHANGED
|
@@ -635,6 +635,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
635
635
|
}]
|
|
636
636
|
}] });
|
|
637
637
|
|
|
638
|
+
/*
|
|
639
|
+
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
640
|
+
* This software is released under MIT license.
|
|
641
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
642
|
+
*/
|
|
643
|
+
class ClrDropdownOverflowDirective {
|
|
644
|
+
constructor(elRef) {
|
|
645
|
+
this.elRef = elRef;
|
|
646
|
+
this.defaultItemMinHeightRem = 1.5;
|
|
647
|
+
this.marginBottomRem = 0.1;
|
|
648
|
+
}
|
|
649
|
+
ngAfterViewInit() {
|
|
650
|
+
this.calculateDropdownMenu();
|
|
651
|
+
}
|
|
652
|
+
calculateDropdownMenu() {
|
|
653
|
+
// the vertical position of our element in the current window
|
|
654
|
+
const y = this.elRef.nativeElement.getBoundingClientRect().y;
|
|
655
|
+
const itemMinHeightPx = this.getItemMinHeight(this.clrDropdownMenuItemMinHeight);
|
|
656
|
+
// see https://stackoverflow.com/questions/22754315/for-loop-for-htmlcollection-elements
|
|
657
|
+
for (const item of this.elRef.nativeElement.getElementsByClassName('dropdown-item')) {
|
|
658
|
+
item.style.minHeight = itemMinHeightPx + 'px';
|
|
659
|
+
}
|
|
660
|
+
this.elRef.nativeElement.style.maxHeight =
|
|
661
|
+
this.getMenuMaxHeight(this.clrDropdownMenuMaxHeight, window.innerHeight - y - this.convertRemToPixels(this.marginBottomRem)) + 'px';
|
|
662
|
+
this.elRef.nativeElement.style.overflowY = 'auto';
|
|
663
|
+
}
|
|
664
|
+
getMenuMaxHeight(menuMaxHeightProvided, menuMaxHeightPx) {
|
|
665
|
+
if (menuMaxHeightProvided) {
|
|
666
|
+
const maxHeightPx = this.convertToPixels(menuMaxHeightProvided);
|
|
667
|
+
return maxHeightPx > menuMaxHeightPx ? menuMaxHeightPx : maxHeightPx;
|
|
668
|
+
}
|
|
669
|
+
return menuMaxHeightPx;
|
|
670
|
+
}
|
|
671
|
+
getItemMinHeight(itemMinHeightProvided) {
|
|
672
|
+
if (itemMinHeightProvided) {
|
|
673
|
+
return this.convertToPixels(itemMinHeightProvided);
|
|
674
|
+
}
|
|
675
|
+
return this.convertRemToPixels(this.defaultItemMinHeightRem);
|
|
676
|
+
}
|
|
677
|
+
convertToPixels(value) {
|
|
678
|
+
if (typeof value === 'string') {
|
|
679
|
+
if (value.endsWith('px')) {
|
|
680
|
+
return parseFloat(value.replace('px', ''));
|
|
681
|
+
}
|
|
682
|
+
else if (value.endsWith('rem')) {
|
|
683
|
+
return this.convertRemToPixels(parseFloat(value.replace('rem', '')));
|
|
684
|
+
}
|
|
685
|
+
else if (value.endsWith('vh')) {
|
|
686
|
+
return this.convertVhToPixels(parseFloat(value.replace('vh', '')));
|
|
687
|
+
}
|
|
688
|
+
return parseFloat(value);
|
|
689
|
+
}
|
|
690
|
+
return value;
|
|
691
|
+
}
|
|
692
|
+
convertRemToPixels(rem) {
|
|
693
|
+
return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
694
|
+
}
|
|
695
|
+
convertVhToPixels(vh) {
|
|
696
|
+
const pxPerVhUnit = window.innerHeight / 100;
|
|
697
|
+
return vh * pxPerVhUnit;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
ClrDropdownOverflowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
701
|
+
ClrDropdownOverflowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: { clrDropdownMenuMaxHeight: "clrDropdownMenuMaxHeight", clrDropdownMenuItemMinHeight: "clrDropdownMenuItemMinHeight" }, ngImport: i0 });
|
|
702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowDirective, decorators: [{
|
|
703
|
+
type: Directive,
|
|
704
|
+
args: [{ selector: 'clr-dropdown-menu' }]
|
|
705
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { clrDropdownMenuMaxHeight: [{
|
|
706
|
+
type: Input
|
|
707
|
+
}], clrDropdownMenuItemMinHeight: [{
|
|
708
|
+
type: Input
|
|
709
|
+
}] } });
|
|
710
|
+
|
|
638
711
|
/*
|
|
639
712
|
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
640
713
|
* This software is released under MIT license.
|
|
@@ -774,7 +847,7 @@ class ClrFlowBar {
|
|
|
774
847
|
}
|
|
775
848
|
}
|
|
776
849
|
ClrFlowBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrFlowBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
777
|
-
ClrFlowBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: ClrFlowBar, selector: "clr-flow-bar", inputs: { _steps: ["clrSteps", "_steps"], _activeStep: ["clrActiveStep", "_activeStep"] }, outputs: { _activeStepChange: "clrActiveStepChange" }, host: { properties: { "class.flow-bar": "true" } }, ngImport: i0, template: "<div class=\"flow-bar-wrapper\">\n <ng-container *ngFor=\"let step of _steps; let index = index; let last = last\">\n <div class=\"flow-bar-step\" [class.active]=\"step === _activeStep\">\n <button\n class=\"btn btn-link flow-bar-btn\"\n [disabled]=\"!step.enabled\"\n [class.active]=\"step === _activeStep\"\n (click)=\"changeActiveStep(step)\"\n >\n {{index + 1}}. {{(step.title | async)}}\n </button>\n <clr-icon shape=\"caret right\" *ngIf=\"!last\"></clr-icon>\n </div>\n </ng-container>\n</div>\n<clr-dropdown class=\"flow-bar-dropdown clr-flex-fill\">\n <button type=\"button\" class=\"btn btn-outline-primary\" clrDropdownTrigger>\n {{_steps.indexOf(_activeStep) + 1}}. {{_activeStep?.title | async}}\n <clr-icon shape=\"caret down\"></clr-icon>\n </button>\n <clr-dropdown-menu>\n <ng-container *ngFor=\"let step of _steps; let index = index; let last = last\">\n <button clrDropdownItem type=\"button\" class=\"btn\" [disabled]=\"!step.enabled\" (click)=\"changeActiveStep(step)\">\n {{index + 1}}. {{step.title | async}}\n </button>\n </ng-container>\n </clr-dropdown-menu>\n</clr-dropdown>\n", components: [{ type: i1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { type: i1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ClrIconCustomTag, selector: "clr-icon" }, { type: i1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { type: i1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "disabled", "id"] }], pipes: { "async": i2.AsyncPipe } });
|
|
850
|
+
ClrFlowBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: ClrFlowBar, selector: "clr-flow-bar", inputs: { _steps: ["clrSteps", "_steps"], _activeStep: ["clrActiveStep", "_activeStep"] }, outputs: { _activeStepChange: "clrActiveStepChange" }, host: { properties: { "class.flow-bar": "true" } }, ngImport: i0, template: "<div class=\"flow-bar-wrapper\">\n <ng-container *ngFor=\"let step of _steps; let index = index; let last = last\">\n <div class=\"flow-bar-step\" [class.active]=\"step === _activeStep\">\n <button\n class=\"btn btn-link flow-bar-btn\"\n [disabled]=\"!step.enabled\"\n [class.active]=\"step === _activeStep\"\n (click)=\"changeActiveStep(step)\"\n >\n {{index + 1}}. {{(step.title | async)}}\n </button>\n <clr-icon shape=\"caret right\" *ngIf=\"!last\"></clr-icon>\n </div>\n </ng-container>\n</div>\n<clr-dropdown class=\"flow-bar-dropdown clr-flex-fill\">\n <button type=\"button\" class=\"btn btn-outline-primary\" clrDropdownTrigger>\n {{_steps.indexOf(_activeStep) + 1}}. {{_activeStep?.title | async}}\n <clr-icon shape=\"caret down\"></clr-icon>\n </button>\n <clr-dropdown-menu>\n <ng-container *ngFor=\"let step of _steps; let index = index; let last = last\">\n <button clrDropdownItem type=\"button\" class=\"btn\" [disabled]=\"!step.enabled\" (click)=\"changeActiveStep(step)\">\n {{index + 1}}. {{step.title | async}}\n </button>\n </ng-container>\n </clr-dropdown-menu>\n</clr-dropdown>\n", components: [{ type: i1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { type: i1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ClrIconCustomTag, selector: "clr-icon" }, { type: i1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: ["clrDropdownMenuMaxHeight", "clrDropdownMenuItemMinHeight"] }, { type: i1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "disabled", "id"] }], pipes: { "async": i2.AsyncPipe } });
|
|
778
851
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrFlowBar, decorators: [{
|
|
779
852
|
type: Component,
|
|
780
853
|
args: [{ selector: 'clr-flow-bar', host: {
|
|
@@ -792,19 +865,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
792
865
|
}] } });
|
|
793
866
|
|
|
794
867
|
/*
|
|
795
|
-
* Copyright (c) 2018-
|
|
868
|
+
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
869
|
+
* This software is released under MIT license.
|
|
870
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
871
|
+
*/
|
|
872
|
+
class ClrDropdownOverflowModule {
|
|
873
|
+
}
|
|
874
|
+
ClrDropdownOverflowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
875
|
+
ClrDropdownOverflowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowModule, declarations: [ClrDropdownOverflowDirective], exports: [ClrDropdownOverflowDirective] });
|
|
876
|
+
ClrDropdownOverflowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowModule });
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowModule, decorators: [{
|
|
878
|
+
type: NgModule,
|
|
879
|
+
args: [{
|
|
880
|
+
declarations: [ClrDropdownOverflowDirective],
|
|
881
|
+
exports: [ClrDropdownOverflowDirective],
|
|
882
|
+
}]
|
|
883
|
+
}] });
|
|
884
|
+
|
|
885
|
+
/*
|
|
886
|
+
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
887
|
+
* This software is released under MIT license.
|
|
888
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
889
|
+
*/
|
|
890
|
+
|
|
891
|
+
/*
|
|
892
|
+
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
796
893
|
* This software is released under MIT license.
|
|
797
894
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
798
895
|
*/
|
|
799
896
|
class ClrFlowBarModule {
|
|
800
897
|
}
|
|
801
898
|
ClrFlowBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrFlowBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
802
|
-
ClrFlowBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrFlowBarModule, declarations: [ClrFlowBar], imports: [CommonModule, ClarityModule, FormsModule], exports: [ClrFlowBar] });
|
|
803
|
-
ClrFlowBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrFlowBarModule, imports: [[CommonModule, ClarityModule, FormsModule]] });
|
|
899
|
+
ClrFlowBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrFlowBarModule, declarations: [ClrFlowBar], imports: [CommonModule, ClarityModule, FormsModule, ClrDropdownOverflowModule], exports: [ClrFlowBar] });
|
|
900
|
+
ClrFlowBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrFlowBarModule, imports: [[CommonModule, ClarityModule, FormsModule, ClrDropdownOverflowModule]] });
|
|
804
901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrFlowBarModule, decorators: [{
|
|
805
902
|
type: NgModule,
|
|
806
903
|
args: [{
|
|
807
|
-
imports: [CommonModule, ClarityModule, FormsModule],
|
|
904
|
+
imports: [CommonModule, ClarityModule, FormsModule, ClrDropdownOverflowModule],
|
|
808
905
|
declarations: [ClrFlowBar],
|
|
809
906
|
exports: [ClrFlowBar],
|
|
810
907
|
}]
|
|
@@ -1403,7 +1500,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
1403
1500
|
}] } });
|
|
1404
1501
|
|
|
1405
1502
|
/*
|
|
1406
|
-
* Copyright (c) 2018-
|
|
1503
|
+
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
1407
1504
|
* This software is released under MIT license.
|
|
1408
1505
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
1409
1506
|
*/
|
|
@@ -1412,18 +1509,79 @@ class ClrMultilingualAbstract extends ClrAbstractFormComponent {
|
|
|
1412
1509
|
super(injector);
|
|
1413
1510
|
this.multi = true;
|
|
1414
1511
|
this.controlClasses = 'clr-col-md-10';
|
|
1512
|
+
this.missingPrefix = '';
|
|
1513
|
+
}
|
|
1514
|
+
set fallbackLanguage(fallbackLang) {
|
|
1515
|
+
this.fallbackLang = fallbackLang;
|
|
1516
|
+
this.updateShownTexts();
|
|
1517
|
+
}
|
|
1518
|
+
set missingPre(missingPrefix) {
|
|
1519
|
+
this.missingPrefix = missingPrefix;
|
|
1520
|
+
this.updateShownTexts();
|
|
1521
|
+
}
|
|
1522
|
+
set langs(languages) {
|
|
1523
|
+
this.languages = languages;
|
|
1524
|
+
this.updateShownTexts();
|
|
1415
1525
|
}
|
|
1416
1526
|
writeValue(value) {
|
|
1417
1527
|
if (value) {
|
|
1418
1528
|
this.texts = new Map(value);
|
|
1419
1529
|
}
|
|
1530
|
+
this.updateShownTexts();
|
|
1420
1531
|
}
|
|
1421
1532
|
setText(key, value) {
|
|
1422
1533
|
this.texts.set(key, value);
|
|
1423
1534
|
this.onChange(new Map(this.texts));
|
|
1535
|
+
this.updateShownTexts(key);
|
|
1536
|
+
}
|
|
1537
|
+
updateShownTexts(currentlyEditingLang) {
|
|
1538
|
+
if (this.texts) {
|
|
1539
|
+
if (this.languages) {
|
|
1540
|
+
this.shownTexts = this.applyMissingPrefix(new Map(this.languages.map(lang => [lang, this.texts.get(lang) || ''])), currentlyEditingLang);
|
|
1541
|
+
}
|
|
1542
|
+
else {
|
|
1543
|
+
this.shownTexts = this.applyMissingPrefix(new Map(this.texts), currentlyEditingLang);
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
applyMissingPrefix(texts, currentlyEditingLang) {
|
|
1548
|
+
if (!this.missingPrefix) {
|
|
1549
|
+
return texts;
|
|
1550
|
+
}
|
|
1551
|
+
let fallbackText = this.determineFallbackText();
|
|
1552
|
+
if (!fallbackText) {
|
|
1553
|
+
return texts;
|
|
1554
|
+
}
|
|
1555
|
+
fallbackText = this.missingPrefix + fallbackText;
|
|
1556
|
+
for (const lang of texts.keys()) {
|
|
1557
|
+
if (!texts.get(lang) && lang !== currentlyEditingLang) {
|
|
1558
|
+
texts.set(lang, fallbackText);
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
return texts;
|
|
1562
|
+
}
|
|
1563
|
+
determineFallbackText() {
|
|
1564
|
+
const fallbackText = this.fallbackLang && this.texts.get(this.fallbackLang);
|
|
1565
|
+
if (fallbackText) {
|
|
1566
|
+
return fallbackText;
|
|
1567
|
+
}
|
|
1568
|
+
const languages = [...(this.languages || [])].sort();
|
|
1569
|
+
const nonEmptyTextFromShownTexts = languages.map(lang => this.texts.get(lang)).find(text => text);
|
|
1570
|
+
if (nonEmptyTextFromShownTexts) {
|
|
1571
|
+
return nonEmptyTextFromShownTexts;
|
|
1572
|
+
}
|
|
1573
|
+
const nonEmptyTextFromHiddenTexts = [...this.texts.keys()]
|
|
1574
|
+
.sort()
|
|
1575
|
+
.filter(lang => !languages.includes(lang))
|
|
1576
|
+
.map(lang => this.texts.get(lang))
|
|
1577
|
+
.find(text => text);
|
|
1578
|
+
if (nonEmptyTextFromHiddenTexts) {
|
|
1579
|
+
return nonEmptyTextFromHiddenTexts;
|
|
1580
|
+
}
|
|
1581
|
+
return undefined;
|
|
1424
1582
|
}
|
|
1425
1583
|
showLanguageSelector() {
|
|
1426
|
-
return
|
|
1584
|
+
return this.shownTexts?.size > 1 || this.showSingleLanguageSelector;
|
|
1427
1585
|
}
|
|
1428
1586
|
changeLanguage(lang) {
|
|
1429
1587
|
// need as the click for closing the menu is registered on a single item
|
|
@@ -1435,7 +1593,7 @@ class ClrMultilingualAbstract extends ClrAbstractFormComponent {
|
|
|
1435
1593
|
}
|
|
1436
1594
|
}
|
|
1437
1595
|
ClrMultilingualAbstract.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrMultilingualAbstract, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1438
|
-
ClrMultilingualAbstract.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: ClrMultilingualAbstract, inputs: { controlClasses: ["clrControlClasses", "controlClasses"], selectedLang: ["clrSelectedLang", "selectedLang"], readonly: "readonly", maxlength: "maxlength", showSingleLanguageSelector: ["clrShowSingleLanguageSelector", "showSingleLanguageSelector"] }, host: { properties: { "class.clr-multilingual": "this.multi" } }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
1596
|
+
ClrMultilingualAbstract.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: ClrMultilingualAbstract, inputs: { controlClasses: ["clrControlClasses", "controlClasses"], selectedLang: ["clrSelectedLang", "selectedLang"], readonly: "readonly", maxlength: "maxlength", showSingleLanguageSelector: ["clrShowSingleLanguageSelector", "showSingleLanguageSelector"], fallbackLanguage: ["clrFallbackLang", "fallbackLanguage"], missingPre: ["clrMissingPrefix", "missingPre"], langs: ["clrLanguages", "langs"] }, host: { properties: { "class.clr-multilingual": "this.multi" } }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
1439
1597
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrMultilingualAbstract, decorators: [{
|
|
1440
1598
|
type: Directive
|
|
1441
1599
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { multi: [{
|
|
@@ -1457,6 +1615,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
1457
1615
|
}], inputElement: [{
|
|
1458
1616
|
type: ViewChild,
|
|
1459
1617
|
args: ['input']
|
|
1618
|
+
}], fallbackLanguage: [{
|
|
1619
|
+
type: Input,
|
|
1620
|
+
args: ['clrFallbackLang']
|
|
1621
|
+
}], missingPre: [{
|
|
1622
|
+
type: Input,
|
|
1623
|
+
args: ['clrMissingPrefix']
|
|
1624
|
+
}], langs: [{
|
|
1625
|
+
type: Input,
|
|
1626
|
+
args: ['clrLanguages']
|
|
1460
1627
|
}] } });
|
|
1461
1628
|
|
|
1462
1629
|
class ClrMultilingualSelector {
|
|
@@ -1492,7 +1659,7 @@ ClrMultilingualSelector.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1492
1659
|
</clr-dropdown-menu>
|
|
1493
1660
|
</clr-dropdown>
|
|
1494
1661
|
</div>
|
|
1495
|
-
`, isInline: true, components: [{ type: i1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { type: i1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }], directives: [{ type: i1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { type: i1.ClrIconCustomTag, selector: "clr-icon" }, { type: i1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "disabled", "id"] }], pipes: { "keyvalue": i2.KeyValuePipe } });
|
|
1662
|
+
`, isInline: true, components: [{ type: i1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { type: i1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }], directives: [{ type: i1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { type: i1.ClrIconCustomTag, selector: "clr-icon" }, { type: i1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: ["clrDropdownMenuMaxHeight", "clrDropdownMenuItemMinHeight"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "disabled", "id"] }], pipes: { "keyvalue": i2.KeyValuePipe } });
|
|
1496
1663
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrMultilingualSelector, decorators: [{
|
|
1497
1664
|
type: Component,
|
|
1498
1665
|
args: [{
|
|
@@ -1554,7 +1721,7 @@ ClrMultilingualInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
1554
1721
|
multi: true,
|
|
1555
1722
|
},
|
|
1556
1723
|
ControlIdService,
|
|
1557
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"
|
|
1724
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"shownTexts\"\n [selectedLang]=\"selectedLang\"\n (selectedLangChange)=\"changeLanguage($event)\"\n >\n </clr-multilingual-selector>\n <div class=\"clr-multi-input-wrapper\">\n <div class=\"clr-input-wrapper\">\n <input\n class=\"clr-input\"\n type=\"text\"\n [id]=\"inputId\"\n [ngModel]=\"!!shownTexts && !!selectedLang ? shownTexts.get(selectedLang) : ''\"\n (ngModelChange)=\"setText(selectedLang, $event)\"\n (blur)=\"onTouch()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readonly === ''\"\n autocomplete=\"off\"\n [maxlength]=\"maxlength || null\"\n #input\n />\n <clr-icon *ngIf=\"showError\" class=\"clr-validate-icon\" shape=\"exclamation-circle\" aria-hidden=\"true\"></clr-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"!showError\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"showError\"></ng-content>\n </div>\n</div>\n", components: [{ type: ClrMultilingualSelector, selector: "clr-multilingual-selector", inputs: ["disabled", "texts", "selectedLang"], outputs: ["selectedLangChange"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i1.ClrIconCustomTag, selector: "clr-icon" }] });
|
|
1558
1725
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrMultilingualInput, decorators: [{
|
|
1559
1726
|
type: Component,
|
|
1560
1727
|
args: [{ selector: 'clr-multilingual-input', providers: [
|
|
@@ -1564,7 +1731,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
1564
1731
|
multi: true,
|
|
1565
1732
|
},
|
|
1566
1733
|
ControlIdService,
|
|
1567
|
-
], template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"
|
|
1734
|
+
], template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"shownTexts\"\n [selectedLang]=\"selectedLang\"\n (selectedLangChange)=\"changeLanguage($event)\"\n >\n </clr-multilingual-selector>\n <div class=\"clr-multi-input-wrapper\">\n <div class=\"clr-input-wrapper\">\n <input\n class=\"clr-input\"\n type=\"text\"\n [id]=\"inputId\"\n [ngModel]=\"!!shownTexts && !!selectedLang ? shownTexts.get(selectedLang) : ''\"\n (ngModelChange)=\"setText(selectedLang, $event)\"\n (blur)=\"onTouch()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readonly === ''\"\n autocomplete=\"off\"\n [maxlength]=\"maxlength || null\"\n #input\n />\n <clr-icon *ngIf=\"showError\" class=\"clr-validate-icon\" shape=\"exclamation-circle\" aria-hidden=\"true\"></clr-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"!showError\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"showError\"></ng-content>\n </div>\n</div>\n" }]
|
|
1568
1735
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
1569
1736
|
|
|
1570
1737
|
/*
|
|
@@ -1585,7 +1752,7 @@ ClrMultilingualTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1585
1752
|
multi: true,
|
|
1586
1753
|
},
|
|
1587
1754
|
ControlIdService,
|
|
1588
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"
|
|
1755
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"shownTexts\"\n [selectedLang]=\"selectedLang\"\n (selectedLangChange)=\"changeLanguage($event)\"\n >\n </clr-multilingual-selector>\n <div class=\"clr-multi-input-wrapper\">\n <div class=\"clr-textarea-wrapper\">\n <textarea\n class=\"clr-textarea\"\n [id]=\"inputId\"\n [ngModel]=\"!!shownTexts && !!selectedLang ? shownTexts.get(selectedLang) : ''\"\n (ngModelChange)=\"setText(selectedLang, $event)\"\n (blur)=\"onTouch()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readonly === ''\"\n [maxlength]=\"maxlength || null\"\n #input\n ></textarea>\n <clr-icon *ngIf=\"showError\" class=\"clr-validate-icon\" shape=\"exclamation-circle\" aria-hidden=\"true\"></clr-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"!showError\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"showError\"></ng-content>\n </div>\n</div>\n", components: [{ type: ClrMultilingualSelector, selector: "clr-multilingual-selector", inputs: ["disabled", "texts", "selectedLang"], outputs: ["selectedLangChange"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i1.ClrIconCustomTag, selector: "clr-icon" }] });
|
|
1589
1756
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrMultilingualTextarea, decorators: [{
|
|
1590
1757
|
type: Component,
|
|
1591
1758
|
args: [{ selector: 'clr-multilingual-textarea', providers: [
|
|
@@ -1595,11 +1762,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
1595
1762
|
multi: true,
|
|
1596
1763
|
},
|
|
1597
1764
|
ControlIdService,
|
|
1598
|
-
], template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"
|
|
1765
|
+
], template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"shownTexts\"\n [selectedLang]=\"selectedLang\"\n (selectedLangChange)=\"changeLanguage($event)\"\n >\n </clr-multilingual-selector>\n <div class=\"clr-multi-input-wrapper\">\n <div class=\"clr-textarea-wrapper\">\n <textarea\n class=\"clr-textarea\"\n [id]=\"inputId\"\n [ngModel]=\"!!shownTexts && !!selectedLang ? shownTexts.get(selectedLang) : ''\"\n (ngModelChange)=\"setText(selectedLang, $event)\"\n (blur)=\"onTouch()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readonly === ''\"\n [maxlength]=\"maxlength || null\"\n #input\n ></textarea>\n <clr-icon *ngIf=\"showError\" class=\"clr-validate-icon\" shape=\"exclamation-circle\" aria-hidden=\"true\"></clr-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"!showError\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"showError\"></ng-content>\n </div>\n</div>\n" }]
|
|
1599
1766
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
1600
1767
|
|
|
1601
1768
|
/*
|
|
1602
|
-
* Copyright (c) 2018-
|
|
1769
|
+
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
1603
1770
|
* This software is released under MIT license.
|
|
1604
1771
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
1605
1772
|
*/
|
|
@@ -1610,16 +1777,16 @@ ClrMultilingualModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", v
|
|
|
1610
1777
|
ClrMultilingualTextarea,
|
|
1611
1778
|
ClrRequiredOneMultilang,
|
|
1612
1779
|
ClrRequiredAllMultilang,
|
|
1613
|
-
ClrMultilingualSelector], imports: [CommonModule, ClarityModule, FormsModule], exports: [ClrMultilingualInput,
|
|
1780
|
+
ClrMultilingualSelector], imports: [CommonModule, ClarityModule, FormsModule, ClrDropdownOverflowModule], exports: [ClrMultilingualInput,
|
|
1614
1781
|
ClrMultilingualTextarea,
|
|
1615
1782
|
ClrRequiredOneMultilang,
|
|
1616
1783
|
ClrRequiredAllMultilang,
|
|
1617
1784
|
ClrMultilingualSelector] });
|
|
1618
|
-
ClrMultilingualModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrMultilingualModule, imports: [[CommonModule, ClarityModule, FormsModule]] });
|
|
1785
|
+
ClrMultilingualModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrMultilingualModule, imports: [[CommonModule, ClarityModule, FormsModule, ClrDropdownOverflowModule]] });
|
|
1619
1786
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrMultilingualModule, decorators: [{
|
|
1620
1787
|
type: NgModule,
|
|
1621
1788
|
args: [{
|
|
1622
|
-
imports: [CommonModule, ClarityModule, FormsModule],
|
|
1789
|
+
imports: [CommonModule, ClarityModule, FormsModule, ClrDropdownOverflowModule],
|
|
1623
1790
|
declarations: [
|
|
1624
1791
|
ClrMultilingualInput,
|
|
1625
1792
|
ClrMultilingualTextarea,
|
|
@@ -3927,7 +4094,7 @@ class ClrHistory {
|
|
|
3927
4094
|
}
|
|
3928
4095
|
}
|
|
3929
4096
|
ClrHistory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrHistory, deps: [{ token: ClrHistoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3930
|
-
ClrHistory.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: ClrHistory, selector: "clr-history", inputs: { username: ["clrUsername", "username"], context: ["clrContext", "context"], pinActive: ["clrPinActive", "pinActive"], dropdownHeader: ["clrDropdownHeader", "dropdownHeader"], dropdownPin: ["clrDropdownPin", "dropdownPin"], dropdownUnpin: ["clrDropdownUnpin", "dropdownUnpin"], domain: ["clrDomain", "domain"], position: ["clrPosition", "position"] }, ngImport: i0, template: "<clr-dropdown>\n <button type=\"button\" class=\"btn btn-icon btn-link\" clrDropdownTrigger>\n <clr-icon shape=\"history\" size=\"24\"></clr-icon>\n <clr-icon shape=\"caret down\" size=\"12\"></clr-icon>\n </button>\n <clr-dropdown-menu [clrPosition]=\"position\" *clrIfOpen>\n <label class=\"dropdown-header\" aria-hidden=\"true\">{{dropdownHeader}}</label>\n <button type=\"button\" clrDropdownItem *ngFor=\"let history of historyElements\" (click)=\"select(history)\">\n {{history.title}}\n </button>\n <div *ngIf=\"pinActive\" class=\"dropdown-divider\" role=\"separator\" aria-hidden=\"true\"></div>\n <button clrDropdownItem (click)=\"togglePinHistory()\">\n <span *ngIf=\"pinActive && !pinActivated\">{{dropdownPin}}</span>\n <span *ngIf=\"pinActive && pinActivated\">{{dropdownUnpin}}</span>\n </button>\n </clr-dropdown-menu>\n</clr-dropdown>\n", components: [{ type: i1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { type: i1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }], directives: [{ type: i1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { type: i1.ClrIconCustomTag, selector: "clr-icon" }, { type: i1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { type: i1.ClrLabel, selector: "label", inputs: ["for"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "disabled", "id"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4097
|
+
ClrHistory.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: ClrHistory, selector: "clr-history", inputs: { username: ["clrUsername", "username"], context: ["clrContext", "context"], pinActive: ["clrPinActive", "pinActive"], dropdownHeader: ["clrDropdownHeader", "dropdownHeader"], dropdownPin: ["clrDropdownPin", "dropdownPin"], dropdownUnpin: ["clrDropdownUnpin", "dropdownUnpin"], domain: ["clrDomain", "domain"], position: ["clrPosition", "position"] }, ngImport: i0, template: "<clr-dropdown>\n <button type=\"button\" class=\"btn btn-icon btn-link\" clrDropdownTrigger>\n <clr-icon shape=\"history\" size=\"24\"></clr-icon>\n <clr-icon shape=\"caret down\" size=\"12\"></clr-icon>\n </button>\n <clr-dropdown-menu [clrPosition]=\"position\" *clrIfOpen>\n <label class=\"dropdown-header\" aria-hidden=\"true\">{{dropdownHeader}}</label>\n <button type=\"button\" clrDropdownItem *ngFor=\"let history of historyElements\" (click)=\"select(history)\">\n {{history.title}}\n </button>\n <div *ngIf=\"pinActive\" class=\"dropdown-divider\" role=\"separator\" aria-hidden=\"true\"></div>\n <button clrDropdownItem (click)=\"togglePinHistory()\">\n <span *ngIf=\"pinActive && !pinActivated\">{{dropdownPin}}</span>\n <span *ngIf=\"pinActive && pinActivated\">{{dropdownUnpin}}</span>\n </button>\n </clr-dropdown-menu>\n</clr-dropdown>\n", components: [{ type: i1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { type: i1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }], directives: [{ type: i1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { type: i1.ClrIconCustomTag, selector: "clr-icon" }, { type: i1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: ["clrDropdownMenuMaxHeight", "clrDropdownMenuItemMinHeight"] }, { type: i1.ClrLabel, selector: "label", inputs: ["for"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "disabled", "id"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3931
4098
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrHistory, decorators: [{
|
|
3932
4099
|
type: Component,
|
|
3933
4100
|
args: [{ selector: 'clr-history', template: "<clr-dropdown>\n <button type=\"button\" class=\"btn btn-icon btn-link\" clrDropdownTrigger>\n <clr-icon shape=\"history\" size=\"24\"></clr-icon>\n <clr-icon shape=\"caret down\" size=\"12\"></clr-icon>\n </button>\n <clr-dropdown-menu [clrPosition]=\"position\" *clrIfOpen>\n <label class=\"dropdown-header\" aria-hidden=\"true\">{{dropdownHeader}}</label>\n <button type=\"button\" clrDropdownItem *ngFor=\"let history of historyElements\" (click)=\"select(history)\">\n {{history.title}}\n </button>\n <div *ngIf=\"pinActive\" class=\"dropdown-divider\" role=\"separator\" aria-hidden=\"true\"></div>\n <button clrDropdownItem (click)=\"togglePinHistory()\">\n <span *ngIf=\"pinActive && !pinActivated\">{{dropdownPin}}</span>\n <span *ngIf=\"pinActive && pinActivated\">{{dropdownUnpin}}</span>\n </button>\n </clr-dropdown-menu>\n</clr-dropdown>\n" }]
|
|
@@ -4002,19 +4169,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
4002
4169
|
}] } });
|
|
4003
4170
|
|
|
4004
4171
|
/*
|
|
4005
|
-
* Copyright (c) 2018-
|
|
4172
|
+
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
4006
4173
|
* This software is released under MIT license.
|
|
4007
4174
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
4008
4175
|
*/
|
|
4009
4176
|
class ClrHistoryModule {
|
|
4010
4177
|
}
|
|
4011
4178
|
ClrHistoryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrHistoryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4012
|
-
ClrHistoryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrHistoryModule, declarations: [ClrHistory, ClrHistoryPinned], imports: [CommonModule, ClarityModule, RouterModule], exports: [ClrHistory, ClrHistoryPinned] });
|
|
4013
|
-
ClrHistoryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrHistoryModule, imports: [[CommonModule, ClarityModule, RouterModule]] });
|
|
4179
|
+
ClrHistoryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrHistoryModule, declarations: [ClrHistory, ClrHistoryPinned], imports: [CommonModule, ClarityModule, RouterModule, ClrDropdownOverflowModule], exports: [ClrHistory, ClrHistoryPinned] });
|
|
4180
|
+
ClrHistoryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrHistoryModule, imports: [[CommonModule, ClarityModule, RouterModule, ClrDropdownOverflowModule]] });
|
|
4014
4181
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrHistoryModule, decorators: [{
|
|
4015
4182
|
type: NgModule,
|
|
4016
4183
|
args: [{
|
|
4017
|
-
imports: [CommonModule, ClarityModule, RouterModule],
|
|
4184
|
+
imports: [CommonModule, ClarityModule, RouterModule, ClrDropdownOverflowModule],
|
|
4018
4185
|
declarations: [ClrHistory, ClrHistoryPinned],
|
|
4019
4186
|
exports: [ClrHistory, ClrHistoryPinned],
|
|
4020
4187
|
}]
|
|
@@ -4277,7 +4444,7 @@ class LocationBarNodeComponent {
|
|
|
4277
4444
|
}
|
|
4278
4445
|
}
|
|
4279
4446
|
LocationBarNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: LocationBarNodeComponent, deps: [{ token: CONTENT_PROVIDER, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
4280
|
-
LocationBarNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: LocationBarNodeComponent, selector: "clr-location-bar-node", inputs: { parentNode: "parentNode" }, outputs: { selectionChanged: "selectionChanged" }, host: { properties: { "class.location-bar-node": "true" } }, ngImport: i0, template: "<ng-container *ngIf=\"parentNode\">\n <ng-content *ngIf=\"parentNode.getChildren()?.length > 0\"></ng-content>\n\n <ng-container\n *ngIf=\"\n (selectableChilds.length > 0 && !parentNode.getSelectedChild()) || selectableChilds.length > 1;\n else singleSelected\n \"\n >\n <clr-dropdown>\n <button class=\"btn btn-link btn-sm\" (blur)=\"focus = false\" (focus)=\"focus = true\" clrDropdownTrigger>\n <ng-container *ngIf=\"parentNode.getSelectedChild() as node; else unselected\">\n <span [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\" title=\"{{ node.label }}\">{{\n node.label\n }}</span>\n <cds-icon shape=\"angle\" direction=\"down\" size=\"xs\" class=\"caret-icon\"></cds-icon>\n </ng-container>\n <ng-template #unselected>\n <cds-icon class=\"unselected\" size=\"18\" [attr.solid]=\"focus\" shape=\"tree-view\"></cds-icon> ...\n </ng-template>\n </button>\n <clr-dropdown-menu [clrPosition]=\"'bottom-left'\" *clrIfOpen>\n <button\n *ngFor=\"let item of selectableChilds\"\n type=\"button\"\n clrDropdownItem\n class=\"text-truncate\"\n [class.selected-child]=\"item.id === parentNode.getSelectedChild()?.id\"\n (click)=\"selectNode(item)\"\n title=\"{{ item.label }}\"\n >\n {{ item.label }}\n </button>\n </clr-dropdown-menu>\n </clr-dropdown>\n </ng-container>\n\n <ng-template #singleSelected>\n <ng-container *ngIf=\"parentNode.getSelectedChild()\">\n <ng-container *ngIf=\"parentNode.getSelectedChild().selectable; else unselectable\">\n <button\n class=\"btn btn-link btn-sm\"\n (click)=\"selectNode(parentNode.getSelectedChild())\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </button>\n </ng-container>\n <ng-template #unselectable>\n <span\n class=\"unselectable-node\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </span>\n </ng-template>\n </ng-container>\n </ng-template>\n\n <clr-location-bar-node\n *ngIf=\"parentNode.getSelectedChild() && parentNode.getChildren().length > 0\"\n [parentNode]=\"parentNode.getSelectedChild()\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n >\n <span>/</span>\n </clr-location-bar-node>\n</ng-container>\n", components: [{ type: i1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { type: i1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }, { type: LocationBarNodeComponent, selector: "clr-location-bar-node", inputs: ["parentNode"], outputs: ["selectionChanged"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { type: i1.CdsIconCustomTag, selector: "cds-icon" }, { type: i1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "disabled", "id"] }] });
|
|
4447
|
+
LocationBarNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: LocationBarNodeComponent, selector: "clr-location-bar-node", inputs: { parentNode: "parentNode" }, outputs: { selectionChanged: "selectionChanged" }, host: { properties: { "class.location-bar-node": "true" } }, ngImport: i0, template: "<ng-container *ngIf=\"parentNode\">\n <ng-content *ngIf=\"parentNode.getChildren()?.length > 0\"></ng-content>\n\n <ng-container\n *ngIf=\"\n (selectableChilds.length > 0 && !parentNode.getSelectedChild()) || selectableChilds.length > 1;\n else singleSelected\n \"\n >\n <clr-dropdown>\n <button class=\"btn btn-link btn-sm\" (blur)=\"focus = false\" (focus)=\"focus = true\" clrDropdownTrigger>\n <ng-container *ngIf=\"parentNode.getSelectedChild() as node; else unselected\">\n <span [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\" title=\"{{ node.label }}\">{{\n node.label\n }}</span>\n <cds-icon shape=\"angle\" direction=\"down\" size=\"xs\" class=\"caret-icon\"></cds-icon>\n </ng-container>\n <ng-template #unselected>\n <cds-icon class=\"unselected\" size=\"18\" [attr.solid]=\"focus\" shape=\"tree-view\"></cds-icon> ...\n </ng-template>\n </button>\n <clr-dropdown-menu [clrPosition]=\"'bottom-left'\" *clrIfOpen>\n <button\n *ngFor=\"let item of selectableChilds\"\n type=\"button\"\n clrDropdownItem\n class=\"text-truncate\"\n [class.selected-child]=\"item.id === parentNode.getSelectedChild()?.id\"\n (click)=\"selectNode(item)\"\n title=\"{{ item.label }}\"\n >\n {{ item.label }}\n </button>\n </clr-dropdown-menu>\n </clr-dropdown>\n </ng-container>\n\n <ng-template #singleSelected>\n <ng-container *ngIf=\"parentNode.getSelectedChild()\">\n <ng-container *ngIf=\"parentNode.getSelectedChild().selectable; else unselectable\">\n <button\n class=\"btn btn-link btn-sm\"\n (click)=\"selectNode(parentNode.getSelectedChild())\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </button>\n </ng-container>\n <ng-template #unselectable>\n <span\n class=\"unselectable-node\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </span>\n </ng-template>\n </ng-container>\n </ng-template>\n\n <clr-location-bar-node\n *ngIf=\"parentNode.getSelectedChild() && parentNode.getChildren().length > 0\"\n [parentNode]=\"parentNode.getSelectedChild()\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n >\n <span>/</span>\n </clr-location-bar-node>\n</ng-container>\n", components: [{ type: i1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { type: i1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }, { type: LocationBarNodeComponent, selector: "clr-location-bar-node", inputs: ["parentNode"], outputs: ["selectionChanged"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { type: i1.CdsIconCustomTag, selector: "cds-icon" }, { type: i1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: ["clrDropdownMenuMaxHeight", "clrDropdownMenuItemMinHeight"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "disabled", "id"] }] });
|
|
4281
4448
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: LocationBarNodeComponent, decorators: [{
|
|
4282
4449
|
type: Component,
|
|
4283
4450
|
args: [{ selector: 'clr-location-bar-node', host: { '[class.location-bar-node]': 'true' }, template: "<ng-container *ngIf=\"parentNode\">\n <ng-content *ngIf=\"parentNode.getChildren()?.length > 0\"></ng-content>\n\n <ng-container\n *ngIf=\"\n (selectableChilds.length > 0 && !parentNode.getSelectedChild()) || selectableChilds.length > 1;\n else singleSelected\n \"\n >\n <clr-dropdown>\n <button class=\"btn btn-link btn-sm\" (blur)=\"focus = false\" (focus)=\"focus = true\" clrDropdownTrigger>\n <ng-container *ngIf=\"parentNode.getSelectedChild() as node; else unselected\">\n <span [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\" title=\"{{ node.label }}\">{{\n node.label\n }}</span>\n <cds-icon shape=\"angle\" direction=\"down\" size=\"xs\" class=\"caret-icon\"></cds-icon>\n </ng-container>\n <ng-template #unselected>\n <cds-icon class=\"unselected\" size=\"18\" [attr.solid]=\"focus\" shape=\"tree-view\"></cds-icon> ...\n </ng-template>\n </button>\n <clr-dropdown-menu [clrPosition]=\"'bottom-left'\" *clrIfOpen>\n <button\n *ngFor=\"let item of selectableChilds\"\n type=\"button\"\n clrDropdownItem\n class=\"text-truncate\"\n [class.selected-child]=\"item.id === parentNode.getSelectedChild()?.id\"\n (click)=\"selectNode(item)\"\n title=\"{{ item.label }}\"\n >\n {{ item.label }}\n </button>\n </clr-dropdown-menu>\n </clr-dropdown>\n </ng-container>\n\n <ng-template #singleSelected>\n <ng-container *ngIf=\"parentNode.getSelectedChild()\">\n <ng-container *ngIf=\"parentNode.getSelectedChild().selectable; else unselectable\">\n <button\n class=\"btn btn-link btn-sm\"\n (click)=\"selectNode(parentNode.getSelectedChild())\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </button>\n </ng-container>\n <ng-template #unselectable>\n <span\n class=\"unselectable-node\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </span>\n </ng-template>\n </ng-container>\n </ng-template>\n\n <clr-location-bar-node\n *ngIf=\"parentNode.getSelectedChild() && parentNode.getChildren().length > 0\"\n [parentNode]=\"parentNode.getSelectedChild()\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n >\n <span>/</span>\n </clr-location-bar-node>\n</ng-container>\n" }]
|
|
@@ -4334,13 +4501,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
4334
4501
|
class ClrLocationBarModule {
|
|
4335
4502
|
}
|
|
4336
4503
|
ClrLocationBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrLocationBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4337
|
-
ClrLocationBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrLocationBarModule, declarations: [LocationBarComponent, LocationBarNodeComponent], imports: [CommonModule, ClrIconModule, ClrDropdownModule], exports: [LocationBarComponent] });
|
|
4338
|
-
ClrLocationBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrLocationBarModule, imports: [[CommonModule, ClrIconModule, ClrDropdownModule]] });
|
|
4504
|
+
ClrLocationBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrLocationBarModule, declarations: [LocationBarComponent, LocationBarNodeComponent], imports: [CommonModule, ClrIconModule, ClrDropdownModule, ClrDropdownOverflowModule], exports: [LocationBarComponent] });
|
|
4505
|
+
ClrLocationBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrLocationBarModule, imports: [[CommonModule, ClrIconModule, ClrDropdownModule, ClrDropdownOverflowModule]] });
|
|
4339
4506
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrLocationBarModule, decorators: [{
|
|
4340
4507
|
type: NgModule,
|
|
4341
4508
|
args: [{
|
|
4342
4509
|
declarations: [LocationBarComponent, LocationBarNodeComponent],
|
|
4343
|
-
imports: [CommonModule, ClrIconModule, ClrDropdownModule],
|
|
4510
|
+
imports: [CommonModule, ClrIconModule, ClrDropdownModule, ClrDropdownOverflowModule],
|
|
4344
4511
|
exports: [LocationBarComponent],
|
|
4345
4512
|
}]
|
|
4346
4513
|
}] });
|
|
@@ -4395,103 +4562,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
4395
4562
|
}]
|
|
4396
4563
|
}] });
|
|
4397
4564
|
|
|
4398
|
-
/*
|
|
4399
|
-
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
4400
|
-
* This software is released under MIT license.
|
|
4401
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
4402
|
-
*/
|
|
4403
|
-
class ClrDropdownOverflowDirective {
|
|
4404
|
-
constructor(elRef) {
|
|
4405
|
-
this.elRef = elRef;
|
|
4406
|
-
this.defaultItemMinHeightRem = 1.5;
|
|
4407
|
-
this.marginBottomRem = 0.1;
|
|
4408
|
-
}
|
|
4409
|
-
ngAfterViewInit() {
|
|
4410
|
-
this.calculateDropdownMenu();
|
|
4411
|
-
}
|
|
4412
|
-
calculateDropdownMenu() {
|
|
4413
|
-
// the vertical position of our element in the current window
|
|
4414
|
-
const y = this.elRef.nativeElement.getBoundingClientRect().y;
|
|
4415
|
-
const itemMinHeightPx = this.getItemMinHeight(this.clrDropdownMenuItemMinHeight);
|
|
4416
|
-
// see https://stackoverflow.com/questions/22754315/for-loop-for-htmlcollection-elements
|
|
4417
|
-
for (const item of this.elRef.nativeElement.getElementsByClassName('dropdown-item')) {
|
|
4418
|
-
item.style.minHeight = itemMinHeightPx + 'px';
|
|
4419
|
-
}
|
|
4420
|
-
this.elRef.nativeElement.style.maxHeight =
|
|
4421
|
-
this.getMenuMaxHeight(this.clrDropdownMenuMaxHeight, window.innerHeight - y - this.convertRemToPixels(this.marginBottomRem)) + 'px';
|
|
4422
|
-
this.elRef.nativeElement.style.overflowY = 'auto';
|
|
4423
|
-
}
|
|
4424
|
-
getMenuMaxHeight(menuMaxHeightProvided, menuMaxHeightPx) {
|
|
4425
|
-
if (menuMaxHeightProvided) {
|
|
4426
|
-
const maxHeightPx = this.convertToPixels(menuMaxHeightProvided);
|
|
4427
|
-
return maxHeightPx > menuMaxHeightPx ? menuMaxHeightPx : maxHeightPx;
|
|
4428
|
-
}
|
|
4429
|
-
return menuMaxHeightPx;
|
|
4430
|
-
}
|
|
4431
|
-
getItemMinHeight(itemMinHeightProvided) {
|
|
4432
|
-
if (itemMinHeightProvided) {
|
|
4433
|
-
return this.convertToPixels(itemMinHeightProvided);
|
|
4434
|
-
}
|
|
4435
|
-
return this.convertRemToPixels(this.defaultItemMinHeightRem);
|
|
4436
|
-
}
|
|
4437
|
-
convertToPixels(value) {
|
|
4438
|
-
if (typeof value === 'string') {
|
|
4439
|
-
if (value.endsWith('px')) {
|
|
4440
|
-
return parseFloat(value.replace('px', ''));
|
|
4441
|
-
}
|
|
4442
|
-
else if (value.endsWith('rem')) {
|
|
4443
|
-
return this.convertRemToPixels(parseFloat(value.replace('rem', '')));
|
|
4444
|
-
}
|
|
4445
|
-
else if (value.endsWith('vh')) {
|
|
4446
|
-
return this.convertVhToPixels(parseFloat(value.replace('vh', '')));
|
|
4447
|
-
}
|
|
4448
|
-
return parseFloat(value);
|
|
4449
|
-
}
|
|
4450
|
-
return value;
|
|
4451
|
-
}
|
|
4452
|
-
convertRemToPixels(rem) {
|
|
4453
|
-
return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
4454
|
-
}
|
|
4455
|
-
convertVhToPixels(vh) {
|
|
4456
|
-
const pxPerVhUnit = window.innerHeight / 100;
|
|
4457
|
-
return vh * pxPerVhUnit;
|
|
4458
|
-
}
|
|
4459
|
-
}
|
|
4460
|
-
ClrDropdownOverflowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4461
|
-
ClrDropdownOverflowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: { clrDropdownMenuMaxHeight: "clrDropdownMenuMaxHeight", clrDropdownMenuItemMinHeight: "clrDropdownMenuItemMinHeight" }, ngImport: i0 });
|
|
4462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowDirective, decorators: [{
|
|
4463
|
-
type: Directive,
|
|
4464
|
-
args: [{ selector: 'clr-dropdown-menu' }]
|
|
4465
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { clrDropdownMenuMaxHeight: [{
|
|
4466
|
-
type: Input
|
|
4467
|
-
}], clrDropdownMenuItemMinHeight: [{
|
|
4468
|
-
type: Input
|
|
4469
|
-
}] } });
|
|
4470
|
-
|
|
4471
|
-
/*
|
|
4472
|
-
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
4473
|
-
* This software is released under MIT license.
|
|
4474
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
4475
|
-
*/
|
|
4476
|
-
class ClrDropdownOverflowModule {
|
|
4477
|
-
}
|
|
4478
|
-
ClrDropdownOverflowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4479
|
-
ClrDropdownOverflowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowModule, declarations: [ClrDropdownOverflowDirective], exports: [ClrDropdownOverflowDirective] });
|
|
4480
|
-
ClrDropdownOverflowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowModule });
|
|
4481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ClrDropdownOverflowModule, decorators: [{
|
|
4482
|
-
type: NgModule,
|
|
4483
|
-
args: [{
|
|
4484
|
-
declarations: [ClrDropdownOverflowDirective],
|
|
4485
|
-
exports: [ClrDropdownOverflowDirective],
|
|
4486
|
-
}]
|
|
4487
|
-
}] });
|
|
4488
|
-
|
|
4489
|
-
/*
|
|
4490
|
-
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
4491
|
-
* This software is released under MIT license.
|
|
4492
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
4493
|
-
*/
|
|
4494
|
-
|
|
4495
4565
|
/*
|
|
4496
4566
|
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
4497
4567
|
* This software is released under MIT license.
|