@energycap/components 0.27.2-ECAPID-381-Title-Updates.20220120-1043 → 0.27.3-ECAPID-377-Implement-Sidebar.20220125-1124
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/energycap-components.umd.js +50 -5
- package/bundles/energycap-components.umd.js.map +1 -1
- package/bundles/energycap-components.umd.min.js +1 -1
- package/bundles/energycap-components.umd.min.js.map +1 -1
- package/energycap-components.metadata.json +1 -1
- package/esm2015/lib/components.module.js +8 -4
- package/esm2015/lib/controls/menu/menu.component.js +16 -3
- package/esm2015/lib/display/hierarchy/hierarchy-base.js +1 -1
- package/esm2015/lib/shared/display/pipes/highlight-text.pipe.js +26 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/energycap-components.js +47 -6
- package/fesm2015/energycap-components.js.map +1 -1
- package/lib/controls/menu/menu.component.d.ts +6 -0
- package/lib/display/hierarchy/hierarchy-base.d.ts +5 -0
- package/lib/shared/display/pipes/highlight-text.pipe.d.ts +6 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -2653,6 +2653,12 @@
|
|
|
2653
2653
|
* Item currently highlighted by keyboard navigation
|
|
2654
2654
|
*/
|
|
2655
2655
|
this.highlightedItem = null;
|
|
2656
|
+
/**
|
|
2657
|
+
* Tells the menu to maintain the selected/lastSelected item. Turning this off is useful for
|
|
2658
|
+
* action type menus that are displayed on the screen at all times and you do not
|
|
2659
|
+
* want the item to be selected when clicked.
|
|
2660
|
+
*/
|
|
2661
|
+
this.maintainSelectedItem = true;
|
|
2656
2662
|
/**
|
|
2657
2663
|
* Emitted when `selected` is changed. Emits the referenced object.
|
|
2658
2664
|
*
|
|
@@ -2755,8 +2761,14 @@
|
|
|
2755
2761
|
else {
|
|
2756
2762
|
this.onSelection(item);
|
|
2757
2763
|
}
|
|
2758
|
-
this.
|
|
2759
|
-
|
|
2764
|
+
if (this.maintainSelectedItem) {
|
|
2765
|
+
this.selected = item;
|
|
2766
|
+
this.lastSelected = item;
|
|
2767
|
+
}
|
|
2768
|
+
else {
|
|
2769
|
+
this.selected = null;
|
|
2770
|
+
this.lastSelected = null;
|
|
2771
|
+
}
|
|
2760
2772
|
}
|
|
2761
2773
|
};
|
|
2762
2774
|
/**
|
|
@@ -3000,6 +3012,7 @@
|
|
|
3000
3012
|
noDataText: [{ type: i0.Input }],
|
|
3001
3013
|
enableKeyNav: [{ type: i0.Input }],
|
|
3002
3014
|
highlightedItem: [{ type: i0.Input }],
|
|
3015
|
+
maintainSelectedItem: [{ type: i0.Input }],
|
|
3003
3016
|
selectedChanged: [{ type: i0.Output }],
|
|
3004
3017
|
menuClosed: [{ type: i0.Output }],
|
|
3005
3018
|
labelTemplate: [{ type: i0.ViewChild, args: ['label', { static: true },] }],
|
|
@@ -8146,6 +8159,34 @@
|
|
|
8146
8159
|
width: [{ type: i0.Input, args: ['ecIfViewportWidth',] }]
|
|
8147
8160
|
};
|
|
8148
8161
|
|
|
8162
|
+
var HighlightTextPipe = /** @class */ (function () {
|
|
8163
|
+
function HighlightTextPipe() {
|
|
8164
|
+
}
|
|
8165
|
+
HighlightTextPipe.prototype.transform = function (value, searchText) {
|
|
8166
|
+
var transformedValue = '';
|
|
8167
|
+
if (value && searchText) {
|
|
8168
|
+
var regex = new RegExp(this.escapeRegex(searchText), 'gi');
|
|
8169
|
+
transformedValue = value.replace(regex, this.strongWrap);
|
|
8170
|
+
}
|
|
8171
|
+
else {
|
|
8172
|
+
transformedValue = value;
|
|
8173
|
+
}
|
|
8174
|
+
return transformedValue;
|
|
8175
|
+
};
|
|
8176
|
+
HighlightTextPipe.prototype.strongWrap = function (match) {
|
|
8177
|
+
return "<strong class=\"text-highlight\">" + match + "</strong>";
|
|
8178
|
+
};
|
|
8179
|
+
HighlightTextPipe.prototype.escapeRegex = function (value) {
|
|
8180
|
+
return value.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
8181
|
+
};
|
|
8182
|
+
return HighlightTextPipe;
|
|
8183
|
+
}());
|
|
8184
|
+
HighlightTextPipe.decorators = [
|
|
8185
|
+
{ type: i0.Pipe, args: [{
|
|
8186
|
+
name: 'highlightText'
|
|
8187
|
+
},] }
|
|
8188
|
+
];
|
|
8189
|
+
|
|
8149
8190
|
/**
|
|
8150
8191
|
* Format a time to the user's preference for display
|
|
8151
8192
|
*/
|
|
@@ -8629,7 +8670,8 @@
|
|
|
8629
8670
|
HierarchyTreeComponent,
|
|
8630
8671
|
TreeComponent,
|
|
8631
8672
|
RelativeDatePipe,
|
|
8632
|
-
ResizableComponent
|
|
8673
|
+
ResizableComponent,
|
|
8674
|
+
HighlightTextPipe
|
|
8633
8675
|
],
|
|
8634
8676
|
imports: [
|
|
8635
8677
|
common.CommonModule,
|
|
@@ -8647,7 +8689,8 @@
|
|
|
8647
8689
|
TimeDisplayPipe,
|
|
8648
8690
|
MockDateDisplayPipe,
|
|
8649
8691
|
RowCountPipe,
|
|
8650
|
-
RelativeDatePipe
|
|
8692
|
+
RelativeDatePipe,
|
|
8693
|
+
HighlightTextPipe
|
|
8651
8694
|
],
|
|
8652
8695
|
exports: [
|
|
8653
8696
|
ButtonComponent,
|
|
@@ -8702,7 +8745,8 @@
|
|
|
8702
8745
|
HierarchyTreeComponent,
|
|
8703
8746
|
TreeComponent,
|
|
8704
8747
|
RelativeDatePipe,
|
|
8705
|
-
ResizableComponent
|
|
8748
|
+
ResizableComponent,
|
|
8749
|
+
HighlightTextPipe
|
|
8706
8750
|
]
|
|
8707
8751
|
},] }
|
|
8708
8752
|
];
|
|
@@ -9846,6 +9890,7 @@
|
|
|
9846
9890
|
exports.HierarchyBaseTestInjectorFactory = HierarchyBaseTestInjectorFactory;
|
|
9847
9891
|
exports.HierarchyItem = HierarchyItem;
|
|
9848
9892
|
exports.HierarchyTreeComponent = HierarchyTreeComponent;
|
|
9893
|
+
exports.HighlightTextPipe = HighlightTextPipe;
|
|
9849
9894
|
exports.IfViewportWidthDirective = IfViewportWidthDirective;
|
|
9850
9895
|
exports.ItemDisplayComponent = ItemDisplayComponent;
|
|
9851
9896
|
exports.JsonDisplayComponent = JsonDisplayComponent;
|