@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
|
@@ -1436,30 +1436,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1436
1436
|
}]
|
|
1437
1437
|
}] });
|
|
1438
1438
|
|
|
1439
|
-
var DefaultTruncateCharCount;
|
|
1440
|
-
(function (DefaultTruncateCharCount) {
|
|
1441
|
-
DefaultTruncateCharCount[DefaultTruncateCharCount["MAX"] = 500] = "MAX";
|
|
1442
|
-
DefaultTruncateCharCount[DefaultTruncateCharCount["MIN"] = 300] = "MIN";
|
|
1443
|
-
})(DefaultTruncateCharCount || (DefaultTruncateCharCount = {}));
|
|
1444
1439
|
class TruncateDirective {
|
|
1445
1440
|
/** @hidden */
|
|
1446
|
-
constructor(_elementRef
|
|
1441
|
+
constructor(_elementRef) {
|
|
1447
1442
|
this._elementRef = _elementRef;
|
|
1448
|
-
this._renderer = _renderer;
|
|
1449
1443
|
/**
|
|
1450
1444
|
* Truncating state
|
|
1451
1445
|
*/
|
|
1452
1446
|
this.fdTruncateState = false;
|
|
1453
|
-
/**
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
this.charCountUpdate = new EventEmitter();
|
|
1447
|
+
/** @hidden */
|
|
1448
|
+
this._customWidthCount = 200;
|
|
1449
|
+
this.takeDefaultStyleOnce = true;
|
|
1457
1450
|
}
|
|
1458
1451
|
/**
|
|
1459
|
-
*
|
|
1452
|
+
* Width in pixel for truncation of an element , by default
|
|
1460
1453
|
*/
|
|
1461
|
-
set
|
|
1462
|
-
this.
|
|
1454
|
+
set fdTruncateWidth(value) {
|
|
1455
|
+
this._customWidthCount = coerceNumberProperty(value);
|
|
1463
1456
|
}
|
|
1464
1457
|
/**
|
|
1465
1458
|
* Root native element
|
|
@@ -1467,107 +1460,47 @@ class TruncateDirective {
|
|
|
1467
1460
|
get rootElement() {
|
|
1468
1461
|
return this._elementRef.nativeElement;
|
|
1469
1462
|
}
|
|
1470
|
-
/**
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
next: () => this._checkWidth()
|
|
1478
|
-
});
|
|
1479
|
-
this.refreshTruncate();
|
|
1463
|
+
/**
|
|
1464
|
+
* Method saves default style of target element before first truncate.
|
|
1465
|
+
*/
|
|
1466
|
+
setDefaultStyle() {
|
|
1467
|
+
if (this.takeDefaultStyleOnce) {
|
|
1468
|
+
this._defaultStyle = this._truncateTarget.style.cssText;
|
|
1469
|
+
this.takeDefaultStyleOnce = false;
|
|
1480
1470
|
}
|
|
1481
1471
|
}
|
|
1482
1472
|
/** @hidden */
|
|
1483
|
-
|
|
1484
|
-
if (this.
|
|
1485
|
-
this.
|
|
1473
|
+
ngAfterViewInit() {
|
|
1474
|
+
if (this.rootElement) {
|
|
1475
|
+
this._truncate();
|
|
1486
1476
|
}
|
|
1487
1477
|
}
|
|
1488
1478
|
/** @hidden */
|
|
1489
1479
|
ngOnChanges() {
|
|
1490
|
-
this.
|
|
1491
|
-
this.reset();
|
|
1492
|
-
this.refreshTruncate();
|
|
1493
|
-
}
|
|
1494
|
-
reset() {
|
|
1495
|
-
if (this._truncateTarget && this._originalText) {
|
|
1496
|
-
this._truncateTarget.textContent = this._originalText + ' ';
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
refreshTarget(event) {
|
|
1500
|
-
this._truncateTarget = event.rootElement;
|
|
1501
|
-
this._originalText = event.fdTruncateTargetText;
|
|
1502
|
-
this.reset();
|
|
1503
|
-
this.refreshTruncate();
|
|
1480
|
+
this._truncate();
|
|
1504
1481
|
}
|
|
1505
|
-
refreshTruncate() {
|
|
1506
|
-
if (this.fdTruncateState && this._hasMore) {
|
|
1507
|
-
this._toggleTruncate();
|
|
1508
|
-
}
|
|
1509
|
-
}
|
|
1510
|
-
/** @hidden
|
|
1511
|
-
* Initialising truncate properties
|
|
1512
|
-
*/
|
|
1513
|
-
_initTruncate() {
|
|
1514
|
-
const style = window.getComputedStyle(this.rootElement, null);
|
|
1515
|
-
this._widthCount = parseInt(style.getPropertyValue('font-size'), 10) * 25;
|
|
1516
|
-
this._checkWidth();
|
|
1517
|
-
if (this._originalText && this._originalText.length > this._maxChars) {
|
|
1518
|
-
this._hasMore = true;
|
|
1519
|
-
this.charCountUpdate.emit(this._hasMore);
|
|
1520
|
-
this._truncate();
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
/** @hidden
|
|
1524
|
-
* Toggle present text
|
|
1525
|
-
*/
|
|
1526
|
-
_toggleTruncate() {
|
|
1527
|
-
this._truncateTarget.textContent = this.fdTruncateState ? this._truncatedText : this._originalText;
|
|
1528
|
-
}
|
|
1529
|
-
/** @hidden
|
|
1530
|
-
* Truncate text in the target box, if the target exceeds the number of characters
|
|
1531
|
-
*/
|
|
1532
1482
|
_truncate() {
|
|
1483
|
+
this._truncateTarget = this.rootElement;
|
|
1533
1484
|
if (!this._truncateTarget) {
|
|
1534
1485
|
return;
|
|
1535
1486
|
}
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
}
|
|
1540
|
-
this._truncatedText = this._truncateTarget.textContent = ellipsisTextArray.join('') + ' … ';
|
|
1541
|
-
}
|
|
1542
|
-
/** @hidden */
|
|
1543
|
-
_checkWidth() {
|
|
1544
|
-
const width = this.rootElement.offsetWidth;
|
|
1545
|
-
this._maxChars = this._customCharCount
|
|
1546
|
-
? this._customCharCount
|
|
1547
|
-
: width >= this._widthCount
|
|
1548
|
-
? DefaultTruncateCharCount.MAX
|
|
1549
|
-
: DefaultTruncateCharCount.MIN;
|
|
1550
|
-
if (this.fdTruncateState && this._hasMore) {
|
|
1551
|
-
this._truncate();
|
|
1552
|
-
}
|
|
1487
|
+
this.setDefaultStyle();
|
|
1488
|
+
this._truncationStyle = `${this._defaultStyle} max-width: ${this._customWidthCount}px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;`;
|
|
1489
|
+
this._truncateTarget.style.cssText = this.fdTruncateState ? this._truncationStyle : this._defaultStyle;
|
|
1553
1490
|
}
|
|
1554
1491
|
}
|
|
1555
|
-
TruncateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncateDirective, deps: [{ token: i0.ElementRef }
|
|
1556
|
-
TruncateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: TruncateDirective, selector: "[fd-truncate]", inputs: {
|
|
1492
|
+
TruncateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncateDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1493
|
+
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 });
|
|
1557
1494
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncateDirective, decorators: [{
|
|
1558
1495
|
type: Directive,
|
|
1559
1496
|
args: [{
|
|
1560
1497
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1561
1498
|
selector: '[fd-truncate]'
|
|
1562
1499
|
}]
|
|
1563
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }
|
|
1564
|
-
type: Input
|
|
1565
|
-
}], fdTruncateChars: [{
|
|
1500
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { fdTruncateWidth: [{
|
|
1566
1501
|
type: Input
|
|
1567
1502
|
}], fdTruncateState: [{
|
|
1568
1503
|
type: Input
|
|
1569
|
-
}], charCountUpdate: [{
|
|
1570
|
-
type: Output
|
|
1571
1504
|
}] } });
|
|
1572
1505
|
|
|
1573
1506
|
class TruncateModule {
|
|
@@ -1864,16 +1797,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1864
1797
|
args: [{ name: 'isCompactDensity' }]
|
|
1865
1798
|
}] });
|
|
1866
1799
|
|
|
1800
|
+
class TruncatePipe {
|
|
1801
|
+
transform(value, limit = 500) {
|
|
1802
|
+
return value && value.length > limit ? value.substring(0, limit) + '...' : value;
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1806
|
+
TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: TruncatePipe, name: "truncate" });
|
|
1807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
1808
|
+
type: Pipe,
|
|
1809
|
+
args: [{
|
|
1810
|
+
name: 'truncate'
|
|
1811
|
+
}]
|
|
1812
|
+
}] });
|
|
1813
|
+
|
|
1867
1814
|
class PipeModule {
|
|
1868
1815
|
}
|
|
1869
1816
|
PipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1870
|
-
PipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, declarations: [DisplayFnPipe,
|
|
1817
|
+
PipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, declarations: [DisplayFnPipe,
|
|
1818
|
+
SearchHighlightPipe,
|
|
1819
|
+
TwoDigitsPipe,
|
|
1820
|
+
SafePipe,
|
|
1821
|
+
ValueByPathPipe,
|
|
1822
|
+
IsCompactDensityPipe,
|
|
1823
|
+
TruncatePipe], exports: [DisplayFnPipe,
|
|
1824
|
+
SearchHighlightPipe,
|
|
1825
|
+
TwoDigitsPipe,
|
|
1826
|
+
SafePipe,
|
|
1827
|
+
ValueByPathPipe,
|
|
1828
|
+
IsCompactDensityPipe,
|
|
1829
|
+
TruncatePipe] });
|
|
1871
1830
|
PipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PipeModule });
|
|
1872
1831
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, decorators: [{
|
|
1873
1832
|
type: NgModule,
|
|
1874
1833
|
args: [{
|
|
1875
|
-
declarations: [
|
|
1876
|
-
|
|
1834
|
+
declarations: [
|
|
1835
|
+
DisplayFnPipe,
|
|
1836
|
+
SearchHighlightPipe,
|
|
1837
|
+
TwoDigitsPipe,
|
|
1838
|
+
SafePipe,
|
|
1839
|
+
ValueByPathPipe,
|
|
1840
|
+
IsCompactDensityPipe,
|
|
1841
|
+
TruncatePipe
|
|
1842
|
+
],
|
|
1843
|
+
exports: [
|
|
1844
|
+
DisplayFnPipe,
|
|
1845
|
+
SearchHighlightPipe,
|
|
1846
|
+
TwoDigitsPipe,
|
|
1847
|
+
SafePipe,
|
|
1848
|
+
ValueByPathPipe,
|
|
1849
|
+
IsCompactDensityPipe,
|
|
1850
|
+
TruncatePipe
|
|
1851
|
+
]
|
|
1877
1852
|
}]
|
|
1878
1853
|
}] });
|
|
1879
1854
|
|
|
@@ -3363,5 +3338,5 @@ function applyMixins(derivedCtor, baseCtors) {
|
|
|
3363
3338
|
* Generated bundle index. Do not edit.
|
|
3364
3339
|
*/
|
|
3365
3340
|
|
|
3366
|
-
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,
|
|
3341
|
+
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 };
|
|
3367
3342
|
//# sourceMappingURL=fundamental-ngx-core-utils.mjs.map
|