@fundamental-ngx/core 0.36.0-rc.19 → 0.36.0-rc.21
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/action-bar/package.json +1 -1
- package/action-sheet/package.json +1 -1
- package/alert/package.json +1 -1
- package/avatar/package.json +1 -1
- package/avatar-group/package.json +1 -1
- package/bar/package.json +1 -1
- package/breadcrumb/package.json +1 -1
- package/busy-indicator/package.json +1 -1
- package/button/package.json +1 -1
- package/calendar/package.json +1 -1
- package/card/package.json +1 -1
- package/carousel/package.json +1 -1
- package/checkbox/package.json +1 -1
- package/combobox/package.json +1 -1
- package/content-density/package.json +2 -2
- package/date-picker/package.json +1 -1
- package/datetime/package.json +1 -1
- package/datetime-picker/package.json +1 -1
- package/dialog/package.json +1 -1
- package/dynamic-page/package.json +1 -1
- package/dynamic-side-content/package.json +1 -1
- package/esm2020/feed-list-item/components/item/feed-list-item.component.mjs +23 -13
- package/esm2020/feed-list-item/components/list/feed-list.component.mjs +5 -1
- package/esm2020/feed-list-item/feed-list-item.module.mjs +4 -5
- package/esm2020/utils/directives/truncate/truncate.directive.mjs +27 -96
- package/esm2020/utils/pipes/pipe.module.mjs +33 -4
- package/esm2020/utils/pipes/truncate.pipe.mjs +16 -0
- package/esm2020/utils/public_api.mjs +2 -1
- package/facets/package.json +1 -1
- package/feed-input/package.json +1 -1
- package/feed-list-item/components/item/feed-list-item.component.d.ts +6 -6
- package/feed-list-item/esm2020/components/item/feed-list-item.component.mjs +23 -13
- package/feed-list-item/esm2020/components/list/feed-list.component.mjs +5 -1
- package/feed-list-item/esm2020/feed-list-item.module.mjs +4 -5
- package/feed-list-item/feed-list-item.module.d.ts +1 -1
- package/feed-list-item/fesm2015/fundamental-ngx-core-feed-list-item.mjs +29 -15
- package/feed-list-item/fesm2015/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/feed-list-item/fesm2020/fundamental-ngx-core-feed-list-item.mjs +29 -15
- package/feed-list-item/fesm2020/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/feed-list-item/package.json +1 -1
- package/fesm2015/fundamental-ngx-core-feed-list-item.mjs +29 -15
- package/fesm2015/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-utils.mjs +71 -96
- package/fesm2015/fundamental-ngx-core-utils.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-feed-list-item.mjs +29 -15
- package/fesm2020/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-utils.mjs +71 -96
- package/fesm2020/fundamental-ngx-core-utils.mjs.map +1 -1
- package/file-uploader/package.json +1 -1
- package/fixed-card-layout/package.json +1 -1
- package/flexible-column-layout/package.json +1 -1
- package/form/package.json +1 -1
- package/formatted-text/package.json +1 -1
- package/grid-list/package.json +1 -1
- package/icon/package.json +1 -1
- package/illustrated-message/package.json +1 -1
- package/infinite-scroll/package.json +1 -1
- package/info-label/package.json +1 -1
- package/inline-help/package.json +1 -1
- package/input-group/package.json +1 -1
- package/layout-grid/package.json +1 -1
- package/layout-panel/package.json +1 -1
- package/link/package.json +1 -1
- package/list/package.json +1 -1
- package/menu/package.json +1 -1
- package/message-box/package.json +1 -1
- package/message-strip/package.json +1 -1
- package/message-toast/package.json +1 -1
- package/micro-process-flow/package.json +1 -1
- package/mobile-mode/package.json +1 -1
- package/multi-input/package.json +1 -1
- package/nested-list/package.json +1 -1
- package/notification/package.json +1 -1
- package/object-identifier/package.json +1 -1
- package/object-marker/package.json +1 -1
- package/object-number/package.json +1 -1
- package/object-status/package.json +1 -1
- package/overflow-layout/package.json +4 -4
- package/package.json +2 -2
- package/pagination/package.json +1 -1
- package/panel/package.json +1 -1
- package/popover/package.json +1 -1
- package/product-switch/package.json +1 -1
- package/progress-indicator/package.json +1 -1
- package/quick-view/package.json +1 -1
- package/radio/package.json +1 -1
- package/rating-indicator/package.json +1 -1
- package/resizable-card-layout/package.json +1 -1
- package/scroll-spy/package.json +1 -1
- package/scrollbar/package.json +1 -1
- package/segmented-button/package.json +1 -1
- package/select/package.json +1 -1
- package/shared/package.json +1 -1
- package/shellbar/package.json +1 -1
- package/side-navigation/package.json +1 -1
- package/slider/package.json +1 -1
- package/split-button/package.json +1 -1
- package/splitter/package.json +1 -1
- package/status-indicator/package.json +1 -1
- package/step-input/package.json +1 -1
- package/switch/package.json +1 -1
- package/table/package.json +1 -1
- package/tabs/package.json +1 -1
- package/text/package.json +1 -1
- package/theming/package.json +1 -1
- package/tile/package.json +1 -1
- package/time/package.json +1 -1
- package/time-picker/package.json +1 -1
- package/timeline/package.json +1 -1
- package/title/package.json +1 -1
- package/token/package.json +1 -1
- package/toolbar/package.json +1 -1
- package/tree/package.json +1 -1
- package/upload-collection/package.json +1 -1
- package/utils/directives/truncate/truncate.directive.d.ts +21 -51
- package/utils/esm2020/directives/truncate/truncate.directive.mjs +27 -96
- package/utils/esm2020/pipes/pipe.module.mjs +33 -4
- package/utils/esm2020/pipes/truncate.pipe.mjs +16 -0
- package/utils/esm2020/public_api.mjs +2 -1
- package/utils/fesm2015/fundamental-ngx-core-utils.mjs +71 -96
- package/utils/fesm2015/fundamental-ngx-core-utils.mjs.map +1 -1
- package/utils/fesm2020/fundamental-ngx-core-utils.mjs +71 -96
- package/utils/fesm2020/fundamental-ngx-core-utils.mjs.map +1 -1
- package/utils/package.json +1 -1
- package/utils/pipes/pipe.module.d.ts +2 -1
- package/utils/pipes/truncate.pipe.d.ts +7 -0
- package/utils/public_api.d.ts +1 -0
- package/vertical-navigation/package.json +1 -1
- package/wizard/package.json +1 -1
|
@@ -1425,30 +1425,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1425
1425
|
}]
|
|
1426
1426
|
}] });
|
|
1427
1427
|
|
|
1428
|
-
var DefaultTruncateCharCount;
|
|
1429
|
-
(function (DefaultTruncateCharCount) {
|
|
1430
|
-
DefaultTruncateCharCount[DefaultTruncateCharCount["MAX"] = 500] = "MAX";
|
|
1431
|
-
DefaultTruncateCharCount[DefaultTruncateCharCount["MIN"] = 300] = "MIN";
|
|
1432
|
-
})(DefaultTruncateCharCount || (DefaultTruncateCharCount = {}));
|
|
1433
1428
|
class TruncateDirective {
|
|
1434
1429
|
/** @hidden */
|
|
1435
|
-
constructor(_elementRef
|
|
1430
|
+
constructor(_elementRef) {
|
|
1436
1431
|
this._elementRef = _elementRef;
|
|
1437
|
-
this._renderer = _renderer;
|
|
1438
1432
|
/**
|
|
1439
1433
|
* Truncating state
|
|
1440
1434
|
*/
|
|
1441
1435
|
this.fdTruncateState = false;
|
|
1442
|
-
/**
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
this.charCountUpdate = new EventEmitter();
|
|
1436
|
+
/** @hidden */
|
|
1437
|
+
this._customWidthCount = 200;
|
|
1438
|
+
this.takeDefaultStyleOnce = true;
|
|
1446
1439
|
}
|
|
1447
1440
|
/**
|
|
1448
|
-
*
|
|
1441
|
+
* Width in pixel for truncation of an element , by default
|
|
1449
1442
|
*/
|
|
1450
|
-
set
|
|
1451
|
-
this.
|
|
1443
|
+
set fdTruncateWidth(value) {
|
|
1444
|
+
this._customWidthCount = coerceNumberProperty(value);
|
|
1452
1445
|
}
|
|
1453
1446
|
/**
|
|
1454
1447
|
* Root native element
|
|
@@ -1456,107 +1449,47 @@ class TruncateDirective {
|
|
|
1456
1449
|
get rootElement() {
|
|
1457
1450
|
return this._elementRef.nativeElement;
|
|
1458
1451
|
}
|
|
1459
|
-
/**
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
next: () => this._checkWidth()
|
|
1467
|
-
});
|
|
1468
|
-
this.refreshTruncate();
|
|
1452
|
+
/**
|
|
1453
|
+
* Method saves default style of target element before first truncate.
|
|
1454
|
+
*/
|
|
1455
|
+
setDefaultStyle() {
|
|
1456
|
+
if (this.takeDefaultStyleOnce) {
|
|
1457
|
+
this._defaultStyle = this._truncateTarget.style.cssText;
|
|
1458
|
+
this.takeDefaultStyleOnce = false;
|
|
1469
1459
|
}
|
|
1470
1460
|
}
|
|
1471
1461
|
/** @hidden */
|
|
1472
|
-
|
|
1473
|
-
if (this.
|
|
1474
|
-
this.
|
|
1462
|
+
ngAfterViewInit() {
|
|
1463
|
+
if (this.rootElement) {
|
|
1464
|
+
this._truncate();
|
|
1475
1465
|
}
|
|
1476
1466
|
}
|
|
1477
1467
|
/** @hidden */
|
|
1478
1468
|
ngOnChanges() {
|
|
1479
|
-
this.
|
|
1480
|
-
this.reset();
|
|
1481
|
-
this.refreshTruncate();
|
|
1482
|
-
}
|
|
1483
|
-
reset() {
|
|
1484
|
-
if (this._truncateTarget && this._originalText) {
|
|
1485
|
-
this._truncateTarget.textContent = this._originalText + ' ';
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
|
-
refreshTarget(event) {
|
|
1489
|
-
this._truncateTarget = event.rootElement;
|
|
1490
|
-
this._originalText = event.fdTruncateTargetText;
|
|
1491
|
-
this.reset();
|
|
1492
|
-
this.refreshTruncate();
|
|
1469
|
+
this._truncate();
|
|
1493
1470
|
}
|
|
1494
|
-
refreshTruncate() {
|
|
1495
|
-
if (this.fdTruncateState && this._hasMore) {
|
|
1496
|
-
this._toggleTruncate();
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
/** @hidden
|
|
1500
|
-
* Initialising truncate properties
|
|
1501
|
-
*/
|
|
1502
|
-
_initTruncate() {
|
|
1503
|
-
const style = window.getComputedStyle(this.rootElement, null);
|
|
1504
|
-
this._widthCount = parseInt(style.getPropertyValue('font-size'), 10) * 25;
|
|
1505
|
-
this._checkWidth();
|
|
1506
|
-
if (this._originalText && this._originalText.length > this._maxChars) {
|
|
1507
|
-
this._hasMore = true;
|
|
1508
|
-
this.charCountUpdate.emit(this._hasMore);
|
|
1509
|
-
this._truncate();
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
/** @hidden
|
|
1513
|
-
* Toggle present text
|
|
1514
|
-
*/
|
|
1515
|
-
_toggleTruncate() {
|
|
1516
|
-
this._truncateTarget.textContent = this.fdTruncateState ? this._truncatedText : this._originalText;
|
|
1517
|
-
}
|
|
1518
|
-
/** @hidden
|
|
1519
|
-
* Truncate text in the target box, if the target exceeds the number of characters
|
|
1520
|
-
*/
|
|
1521
1471
|
_truncate() {
|
|
1472
|
+
this._truncateTarget = this.rootElement;
|
|
1522
1473
|
if (!this._truncateTarget) {
|
|
1523
1474
|
return;
|
|
1524
1475
|
}
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
}
|
|
1529
|
-
this._truncatedText = this._truncateTarget.textContent = ellipsisTextArray.join('') + ' … ';
|
|
1530
|
-
}
|
|
1531
|
-
/** @hidden */
|
|
1532
|
-
_checkWidth() {
|
|
1533
|
-
const width = this.rootElement.offsetWidth;
|
|
1534
|
-
this._maxChars = this._customCharCount
|
|
1535
|
-
? this._customCharCount
|
|
1536
|
-
: width >= this._widthCount
|
|
1537
|
-
? DefaultTruncateCharCount.MAX
|
|
1538
|
-
: DefaultTruncateCharCount.MIN;
|
|
1539
|
-
if (this.fdTruncateState && this._hasMore) {
|
|
1540
|
-
this._truncate();
|
|
1541
|
-
}
|
|
1476
|
+
this.setDefaultStyle();
|
|
1477
|
+
this._truncationStyle = `${this._defaultStyle} max-width: ${this._customWidthCount}px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;`;
|
|
1478
|
+
this._truncateTarget.style.cssText = this.fdTruncateState ? this._truncationStyle : this._defaultStyle;
|
|
1542
1479
|
}
|
|
1543
1480
|
}
|
|
1544
|
-
TruncateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncateDirective, deps: [{ token: i0.ElementRef }
|
|
1545
|
-
TruncateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: TruncateDirective, selector: "[fd-truncate]", inputs: {
|
|
1481
|
+
TruncateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncateDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1482
|
+
TruncateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: TruncateDirective, selector: "[fd-truncate]", inputs: { fdTruncateWidth: "fdTruncateWidth", fdTruncateState: "fdTruncateState" }, usesOnChanges: true, ngImport: i0 });
|
|
1546
1483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncateDirective, decorators: [{
|
|
1547
1484
|
type: Directive,
|
|
1548
1485
|
args: [{
|
|
1549
1486
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1550
1487
|
selector: '[fd-truncate]'
|
|
1551
1488
|
}]
|
|
1552
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }
|
|
1553
|
-
type: Input
|
|
1554
|
-
}], fdTruncateChars: [{
|
|
1489
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { fdTruncateWidth: [{
|
|
1555
1490
|
type: Input
|
|
1556
1491
|
}], fdTruncateState: [{
|
|
1557
1492
|
type: Input
|
|
1558
|
-
}], charCountUpdate: [{
|
|
1559
|
-
type: Output
|
|
1560
1493
|
}] } });
|
|
1561
1494
|
|
|
1562
1495
|
class TruncateModule {
|
|
@@ -1846,16 +1779,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1846
1779
|
args: [{ name: 'isCompactDensity' }]
|
|
1847
1780
|
}] });
|
|
1848
1781
|
|
|
1782
|
+
class TruncatePipe {
|
|
1783
|
+
transform(value, limit = 500) {
|
|
1784
|
+
return value && value.length > limit ? value.substring(0, limit) + '...' : value;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1788
|
+
TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: TruncatePipe, name: "truncate" });
|
|
1789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
1790
|
+
type: Pipe,
|
|
1791
|
+
args: [{
|
|
1792
|
+
name: 'truncate'
|
|
1793
|
+
}]
|
|
1794
|
+
}] });
|
|
1795
|
+
|
|
1849
1796
|
class PipeModule {
|
|
1850
1797
|
}
|
|
1851
1798
|
PipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1852
|
-
PipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, declarations: [DisplayFnPipe,
|
|
1799
|
+
PipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, declarations: [DisplayFnPipe,
|
|
1800
|
+
SearchHighlightPipe,
|
|
1801
|
+
TwoDigitsPipe,
|
|
1802
|
+
SafePipe,
|
|
1803
|
+
ValueByPathPipe,
|
|
1804
|
+
IsCompactDensityPipe,
|
|
1805
|
+
TruncatePipe], exports: [DisplayFnPipe,
|
|
1806
|
+
SearchHighlightPipe,
|
|
1807
|
+
TwoDigitsPipe,
|
|
1808
|
+
SafePipe,
|
|
1809
|
+
ValueByPathPipe,
|
|
1810
|
+
IsCompactDensityPipe,
|
|
1811
|
+
TruncatePipe] });
|
|
1853
1812
|
PipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PipeModule });
|
|
1854
1813
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, decorators: [{
|
|
1855
1814
|
type: NgModule,
|
|
1856
1815
|
args: [{
|
|
1857
|
-
declarations: [
|
|
1858
|
-
|
|
1816
|
+
declarations: [
|
|
1817
|
+
DisplayFnPipe,
|
|
1818
|
+
SearchHighlightPipe,
|
|
1819
|
+
TwoDigitsPipe,
|
|
1820
|
+
SafePipe,
|
|
1821
|
+
ValueByPathPipe,
|
|
1822
|
+
IsCompactDensityPipe,
|
|
1823
|
+
TruncatePipe
|
|
1824
|
+
],
|
|
1825
|
+
exports: [
|
|
1826
|
+
DisplayFnPipe,
|
|
1827
|
+
SearchHighlightPipe,
|
|
1828
|
+
TwoDigitsPipe,
|
|
1829
|
+
SafePipe,
|
|
1830
|
+
ValueByPathPipe,
|
|
1831
|
+
IsCompactDensityPipe,
|
|
1832
|
+
TruncatePipe
|
|
1833
|
+
]
|
|
1859
1834
|
}]
|
|
1860
1835
|
}] });
|
|
1861
1836
|
|
|
@@ -3337,5 +3312,5 @@ function applyMixins(derivedCtor, baseCtors) {
|
|
|
3337
3312
|
* Generated bundle index. Do not edit.
|
|
3338
3313
|
*/
|
|
3339
3314
|
|
|
3340
|
-
export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AutoCompleteDirective, AutoCompleteModule, ContentDensityEnum, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY,
|
|
3315
|
+
export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AutoCompleteDirective, AutoCompleteModule, ContentDensityEnum, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY, DestroyedService, DisplayFnPipe, DndItemDirective, DndKeyboardGroupDirective, DndKeyboardItemDirective, DndListDirective, DragAndDropModule, DynamicComponentContainer, DynamicComponentInjector, DynamicComponentService, ELEMENT_REF_EXCEPTION, FocusKeyManagerHelpersModule, FocusKeyManagerItemDirective, FocusKeyManagerListDirective, FocusTrapService, INVALID_DATE_ERROR, IgnoreClickOnSelectionDirective, IgnoreClickOnSelectionModule, InitialFocusDirective, InitialFocusModule, IsCompactDensityPipe, KeyUtil, KeyboardSupportService, LETTERS_UNICODE_RANGE, LIST_ITEM_COMPONENT, LineClampDirective, LineClampModule, LineClampTargetDirective, LocalStorageService, MOBILE_CONFIG_ERROR, ModuleDeprecations, OVERFLOW_PRIORITY_SCORE, OnlyDigitsDirective, OnlyDigitsModule, OverflowListDirective, OverflowListItemDirective, OverflowListModule, PipeModule, RTL_LANGUAGE, RangeSelector, ResizeDirective, ResizeHandleDirective, ResizeModule, ResizeObserverFactory, ResizeObserverService, RtlService, SafePipe, SearchHighlightPipe, THEME_SWITCHER_ROUTER_MISSING_ERROR, TemplateDirective, TemplateModule, ThemesService, TruncateDirective, TruncateModule, TruncatePipe, TwoDigitsPipe, UtilsModule, ValueByPathPipe, applyCssClass, applyCssStyle, applyMixins, consumerProviderFactory, getDocumentFontSize, getElementCapacity, getElementWidth, getRandomColorAccent, intersectionObservable, isCompactDensity, isValidContentDensity, moduleDeprecationsFactory, moduleDeprecationsProvider, parserFileSize, pxToNum, resizeObservable, scrollTop, toNativeElement, uuidv4 };
|
|
3341
3316
|
//# sourceMappingURL=fundamental-ngx-core-utils.mjs.map
|