@meshmakers/octo-ui 3.3.760 → 3.3.780
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Component, Injectable, EventEmitter, Output, Input, ElementRef, forwardRef, ViewChild, signal, computed, Directive, input, output, effect, InjectionToken, HostListener, makeEnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { inject, Component, Injectable, EventEmitter, Output, Input, ChangeDetectionStrategy, ElementRef, forwardRef, ViewChild, signal, computed, Directive, input, output, effect, InjectionToken, HostListener, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
|
4
4
|
import { AttributeSelectorService, AttributeValueTypeDto as AttributeValueTypeDto$1, CkTypeSelectorService, CkTypeAttributeService, GetEntitiesByCkTypeDtoGQL, RuntimeEntitySelectDataSource, RuntimeEntityDialogDataSource, SearchFilterTypesDto, SortOrdersDto, FieldFilterOperatorsDto, GraphDirectionDto, GraphQL, AssociationModOptionsDto, GetCkTypesDtoGQL, GetCkModelByIdDtoGQL, LevelMetaData, RtAssociationMetaData, CkTypeMetaData, provideOctoServices } from '@meshmakers/octo-services';
|
|
5
5
|
import { Roles, provideMmSharedAuth } from '@meshmakers/shared-auth';
|
|
@@ -1487,6 +1487,18 @@ class PropertyValueDisplayComponent {
|
|
|
1487
1487
|
binaryDownload = new EventEmitter();
|
|
1488
1488
|
// Expansion state
|
|
1489
1489
|
isExpanded = false;
|
|
1490
|
+
// Pre-computed template properties (computed once in ngOnInit)
|
|
1491
|
+
expandableRecord = false;
|
|
1492
|
+
complexType = false;
|
|
1493
|
+
binaryLinkedWithDownload = false;
|
|
1494
|
+
formattedValue = '';
|
|
1495
|
+
recordSummary = '';
|
|
1496
|
+
typeIndicator = '';
|
|
1497
|
+
typeDescription = '';
|
|
1498
|
+
binaryFilename = null;
|
|
1499
|
+
binarySize = null;
|
|
1500
|
+
binaryContentType = null;
|
|
1501
|
+
formattedBinarySize = '';
|
|
1490
1502
|
PropertyDisplayMode = PropertyDisplayMode;
|
|
1491
1503
|
AttributeValueTypeDto = AttributeValueTypeDto;
|
|
1492
1504
|
Array = Array;
|
|
@@ -1494,19 +1506,22 @@ class PropertyValueDisplayComponent {
|
|
|
1494
1506
|
chevronDownIcon = chevronDownIcon;
|
|
1495
1507
|
downloadIcon = downloadIcon;
|
|
1496
1508
|
ngOnInit() {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1509
|
+
this.expandableRecord = this.computeIsExpandableRecord();
|
|
1510
|
+
this.complexType = this.computeIsComplexType();
|
|
1511
|
+
this.binaryLinkedWithDownload = this.computeIsBinaryLinkedWithDownload();
|
|
1512
|
+
this.formattedValue = this.computeFormattedValue();
|
|
1513
|
+
this.recordSummary = this.computeRecordSummary();
|
|
1514
|
+
this.typeIndicator = this.computeTypeIndicator();
|
|
1515
|
+
this.typeDescription = this.computeTypeDescription();
|
|
1516
|
+
if (this.binaryLinkedWithDownload) {
|
|
1517
|
+
const bv = this.value;
|
|
1518
|
+
this.binaryFilename = bv?.filename || null;
|
|
1519
|
+
this.binarySize = bv?.size || null;
|
|
1520
|
+
this.binaryContentType = bv?.contentType || null;
|
|
1521
|
+
this.formattedBinarySize = this.formatFileSize(this.binarySize);
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
computeFormattedValue() {
|
|
1510
1525
|
if (this.value === null) {
|
|
1511
1526
|
return '<null>';
|
|
1512
1527
|
}
|
|
@@ -1545,49 +1560,13 @@ class PropertyValueDisplayComponent {
|
|
|
1545
1560
|
return String(this.value);
|
|
1546
1561
|
}
|
|
1547
1562
|
}
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
// Comprehensive debug logging
|
|
1553
|
-
console.log('PropertyValueDisplay: isExpandableRecord check:', {
|
|
1554
|
-
type: this.type,
|
|
1555
|
-
typeString: String(this.type),
|
|
1556
|
-
typeOf: typeof this.type,
|
|
1557
|
-
AttributeValueTypeDtoRecordDto: AttributeValueTypeDto.RecordDto,
|
|
1558
|
-
AttributeValueTypeDtoRecordArrayDto: AttributeValueTypeDto.RecordArrayDto,
|
|
1559
|
-
typeIsRecordDto: this.type === AttributeValueTypeDto.RecordDto,
|
|
1560
|
-
typeIsRecordDtoString: this.type === 'RECORD',
|
|
1561
|
-
typeIsRecordArrayDto: this.type === AttributeValueTypeDto.RecordArrayDto,
|
|
1562
|
-
value: this.value,
|
|
1563
|
-
valueType: typeof this.value,
|
|
1564
|
-
valueIsNull: this.value == null,
|
|
1565
|
-
valueKeys: this.value && typeof this.value === 'object' ? Object.keys(this.value) : 'not object'
|
|
1566
|
-
});
|
|
1567
|
-
// Check for record types
|
|
1568
|
-
const isRecordDto = this.type === AttributeValueTypeDto.RecordDto;
|
|
1569
|
-
const isRecordArrayDto = this.type === AttributeValueTypeDto.RecordArrayDto;
|
|
1570
|
-
const isRecordType = isRecordDto || isRecordArrayDto;
|
|
1571
|
-
// Simple check: does it have a value?
|
|
1572
|
-
const hasValue = this.value != null;
|
|
1573
|
-
// Simple check: is it an object or array?
|
|
1574
|
-
const isObjectLike = typeof this.value === 'object' && this.value != null;
|
|
1575
|
-
const result = isRecordType && hasValue && isObjectLike;
|
|
1576
|
-
console.log('PropertyValueDisplay: Expandable result:', {
|
|
1577
|
-
isRecordDto,
|
|
1578
|
-
isRecordArrayDto,
|
|
1579
|
-
isRecordType,
|
|
1580
|
-
hasValue,
|
|
1581
|
-
isObjectLike,
|
|
1582
|
-
finalResult: result
|
|
1583
|
-
});
|
|
1584
|
-
return result;
|
|
1563
|
+
computeIsExpandableRecord() {
|
|
1564
|
+
const isRecordType = this.type === AttributeValueTypeDto.RecordDto
|
|
1565
|
+
|| this.type === AttributeValueTypeDto.RecordArrayDto;
|
|
1566
|
+
return isRecordType && this.value != null && typeof this.value === 'object';
|
|
1585
1567
|
}
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
*/
|
|
1589
|
-
isComplexType() {
|
|
1590
|
-
return [
|
|
1568
|
+
computeIsComplexType() {
|
|
1569
|
+
const isComplexDataType = [
|
|
1591
1570
|
AttributeValueTypeDto.RecordDto,
|
|
1592
1571
|
AttributeValueTypeDto.RecordArrayDto,
|
|
1593
1572
|
AttributeValueTypeDto.StringArrayDto,
|
|
@@ -1596,11 +1575,13 @@ class PropertyValueDisplayComponent {
|
|
|
1596
1575
|
AttributeValueTypeDto.BinaryDto,
|
|
1597
1576
|
AttributeValueTypeDto.BinaryLinkedDto
|
|
1598
1577
|
].includes(this.type);
|
|
1578
|
+
// Only show inline type indicator when the value is actually complex
|
|
1579
|
+
// (not when a simple string is passed for a complex-typed property)
|
|
1580
|
+
if (!isComplexDataType)
|
|
1581
|
+
return false;
|
|
1582
|
+
return this.value != null && typeof this.value === 'object';
|
|
1599
1583
|
}
|
|
1600
|
-
|
|
1601
|
-
* Get type indicator text
|
|
1602
|
-
*/
|
|
1603
|
-
getTypeIndicator() {
|
|
1584
|
+
computeTypeIndicator() {
|
|
1604
1585
|
switch (this.type) {
|
|
1605
1586
|
case AttributeValueTypeDto.RecordDto:
|
|
1606
1587
|
return 'RECORD';
|
|
@@ -1618,10 +1599,7 @@ class PropertyValueDisplayComponent {
|
|
|
1618
1599
|
return this.type.replace('_DTO', '').replace('DTO', '');
|
|
1619
1600
|
}
|
|
1620
1601
|
}
|
|
1621
|
-
|
|
1622
|
-
* Get type description for tooltip
|
|
1623
|
-
*/
|
|
1624
|
-
getTypeDescription() {
|
|
1602
|
+
computeTypeDescription() {
|
|
1625
1603
|
switch (this.type) {
|
|
1626
1604
|
case AttributeValueTypeDto.RecordDto:
|
|
1627
1605
|
return 'Complex object';
|
|
@@ -1723,14 +1701,13 @@ class PropertyValueDisplayComponent {
|
|
|
1723
1701
|
this.isExpanded = !this.isExpanded;
|
|
1724
1702
|
}
|
|
1725
1703
|
/**
|
|
1726
|
-
*
|
|
1704
|
+
* Compute summary text for record header
|
|
1727
1705
|
*/
|
|
1728
|
-
|
|
1706
|
+
computeRecordSummary() {
|
|
1729
1707
|
if (this.type === AttributeValueTypeDto.RecordArrayDto && Array.isArray(this.value)) {
|
|
1730
1708
|
return `Array with ${this.value.length} item${this.value.length !== 1 ? 's' : ''}`;
|
|
1731
1709
|
}
|
|
1732
1710
|
if (typeof this.value === 'object' && this.value !== null) {
|
|
1733
|
-
// Handle regular objects
|
|
1734
1711
|
const keys = Object.keys(this.value);
|
|
1735
1712
|
return `Object with ${keys.length} propert${keys.length !== 1 ? 'ies' : 'y'}`;
|
|
1736
1713
|
}
|
|
@@ -1744,13 +1721,11 @@ class PropertyValueDisplayComponent {
|
|
|
1744
1721
|
return [];
|
|
1745
1722
|
}
|
|
1746
1723
|
if (Array.isArray(obj) && obj.length > 0 && typeof obj[0] === 'object' && obj[0] !== null && 'id' in obj[0] && obj[0].id === 'ckRecordId') {
|
|
1747
|
-
// Handle array of records
|
|
1748
1724
|
return obj.map((item) => ({
|
|
1749
1725
|
key: String(item['name']),
|
|
1750
1726
|
value: item['value']
|
|
1751
1727
|
}));
|
|
1752
1728
|
}
|
|
1753
|
-
// Handle regular objects
|
|
1754
1729
|
const record = obj;
|
|
1755
1730
|
return Object.keys(record).map(key => ({
|
|
1756
1731
|
key,
|
|
@@ -1771,7 +1746,6 @@ class PropertyValueDisplayComponent {
|
|
|
1771
1746
|
return Number.isInteger(value) ? AttributeValueTypeDto.IntegerDto : AttributeValueTypeDto.DoubleDto;
|
|
1772
1747
|
}
|
|
1773
1748
|
if (typeof value === 'string') {
|
|
1774
|
-
// Check if it looks like a date
|
|
1775
1749
|
if (value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/)) {
|
|
1776
1750
|
return AttributeValueTypeDto.DateTimeDto;
|
|
1777
1751
|
}
|
|
@@ -1790,48 +1764,17 @@ class PropertyValueDisplayComponent {
|
|
|
1790
1764
|
if (value.length > 0 && typeof value[0] === 'number') {
|
|
1791
1765
|
return AttributeValueTypeDto.IntegerArrayDto;
|
|
1792
1766
|
}
|
|
1793
|
-
return AttributeValueTypeDto.StringArrayDto;
|
|
1767
|
+
return AttributeValueTypeDto.StringArrayDto;
|
|
1794
1768
|
}
|
|
1795
1769
|
return AttributeValueTypeDto.StringDto;
|
|
1796
1770
|
}
|
|
1797
1771
|
// ========== Binary Linked Methods ==========
|
|
1798
|
-
|
|
1799
|
-
* Check if this is a BINARY_LINKED type with download capability
|
|
1800
|
-
*/
|
|
1801
|
-
isBinaryLinkedWithDownload() {
|
|
1772
|
+
computeIsBinaryLinkedWithDownload() {
|
|
1802
1773
|
if (this.type !== AttributeValueTypeDto.BinaryLinkedDto) {
|
|
1803
1774
|
return false;
|
|
1804
1775
|
}
|
|
1805
|
-
// Check if value has binaryId or downloadUri (LargeBinaryInfo structure)
|
|
1806
1776
|
return !!this.value && typeof this.value === 'object' && ('binaryId' in this.value || 'downloadUri' in this.value);
|
|
1807
1777
|
}
|
|
1808
|
-
/**
|
|
1809
|
-
* Get the filename from binary info
|
|
1810
|
-
*/
|
|
1811
|
-
getBinaryFilename() {
|
|
1812
|
-
if (!this.value || typeof this.value !== 'object') {
|
|
1813
|
-
return null;
|
|
1814
|
-
}
|
|
1815
|
-
return this.value.filename || null;
|
|
1816
|
-
}
|
|
1817
|
-
/**
|
|
1818
|
-
* Get the file size from binary info
|
|
1819
|
-
*/
|
|
1820
|
-
getBinarySize() {
|
|
1821
|
-
if (!this.value || typeof this.value !== 'object') {
|
|
1822
|
-
return null;
|
|
1823
|
-
}
|
|
1824
|
-
return this.value.size || null;
|
|
1825
|
-
}
|
|
1826
|
-
/**
|
|
1827
|
-
* Get the content type from binary info
|
|
1828
|
-
*/
|
|
1829
|
-
getBinaryContentType() {
|
|
1830
|
-
if (!this.value || typeof this.value !== 'object') {
|
|
1831
|
-
return null;
|
|
1832
|
-
}
|
|
1833
|
-
return this.value.contentType || null;
|
|
1834
|
-
}
|
|
1835
1778
|
/**
|
|
1836
1779
|
* Format file size to human readable format
|
|
1837
1780
|
*/
|
|
@@ -1853,16 +1796,13 @@ class PropertyValueDisplayComponent {
|
|
|
1853
1796
|
*/
|
|
1854
1797
|
onDownload() {
|
|
1855
1798
|
if (!this.value || typeof this.value !== 'object') {
|
|
1856
|
-
console.warn('No binary value available');
|
|
1857
1799
|
return;
|
|
1858
1800
|
}
|
|
1859
1801
|
const binaryValue = this.value;
|
|
1860
|
-
// If downloadUri is available, open directly
|
|
1861
1802
|
if (binaryValue.downloadUri) {
|
|
1862
1803
|
window.open(binaryValue.downloadUri, '_blank', 'noopener,noreferrer');
|
|
1863
1804
|
return;
|
|
1864
1805
|
}
|
|
1865
|
-
// Otherwise, emit event for parent to handle (needs to load downloadUri)
|
|
1866
1806
|
if (binaryValue.binaryId) {
|
|
1867
1807
|
const event = {
|
|
1868
1808
|
binaryId: binaryValue.binaryId,
|
|
@@ -1871,15 +1811,12 @@ class PropertyValueDisplayComponent {
|
|
|
1871
1811
|
};
|
|
1872
1812
|
this.binaryDownload.emit(event);
|
|
1873
1813
|
}
|
|
1874
|
-
else {
|
|
1875
|
-
console.warn('No binaryId or downloadUri available');
|
|
1876
|
-
}
|
|
1877
1814
|
}
|
|
1878
1815
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyValueDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1879
1816
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: PropertyValueDisplayComponent, isStandalone: true, selector: "mm-property-value-display", inputs: { value: "value", type: "type", displayMode: "displayMode" }, outputs: { binaryDownload: "binaryDownload" }, ngImport: i0, template: `
|
|
1880
1817
|
<div class="property-value-display" [ngClass]="'type-' + type.toLowerCase()">
|
|
1881
1818
|
|
|
1882
|
-
@if (
|
|
1819
|
+
@if (expandableRecord) {
|
|
1883
1820
|
<div class="expandable-record">
|
|
1884
1821
|
<!-- Expand/Collapse Button and Summary -->
|
|
1885
1822
|
<div class="record-header" (click)="toggleExpansion()">
|
|
@@ -1887,9 +1824,9 @@ class PropertyValueDisplayComponent {
|
|
|
1887
1824
|
[icon]="isExpanded ? chevronDownIcon : chevronRightIcon"
|
|
1888
1825
|
class="expand-icon">
|
|
1889
1826
|
</kendo-svgicon>
|
|
1890
|
-
<span class="record-summary">{{
|
|
1891
|
-
<span class="type-indicator" [title]="
|
|
1892
|
-
{{
|
|
1827
|
+
<span class="record-summary">{{ recordSummary }}</span>
|
|
1828
|
+
<span class="type-indicator" [title]="typeDescription">
|
|
1829
|
+
{{ typeIndicator }}
|
|
1893
1830
|
</span>
|
|
1894
1831
|
</div>
|
|
1895
1832
|
|
|
@@ -1929,18 +1866,18 @@ class PropertyValueDisplayComponent {
|
|
|
1929
1866
|
</div>
|
|
1930
1867
|
}
|
|
1931
1868
|
</div>
|
|
1932
|
-
} @else if (
|
|
1869
|
+
} @else if (binaryLinkedWithDownload) {
|
|
1933
1870
|
<!-- Binary Linked with download capability -->
|
|
1934
1871
|
<div class="binary-linked-display">
|
|
1935
1872
|
<div class="binary-info">
|
|
1936
|
-
@if (
|
|
1937
|
-
<span class="filename">{{
|
|
1873
|
+
@if (binaryFilename) {
|
|
1874
|
+
<span class="filename">{{ binaryFilename }}</span>
|
|
1938
1875
|
}
|
|
1939
|
-
@if (
|
|
1940
|
-
<span class="file-size">({{
|
|
1876
|
+
@if (binarySize) {
|
|
1877
|
+
<span class="file-size">({{ formattedBinarySize }})</span>
|
|
1941
1878
|
}
|
|
1942
|
-
@if (
|
|
1943
|
-
<span class="content-type">{{
|
|
1879
|
+
@if (binaryContentType) {
|
|
1880
|
+
<span class="content-type">{{ binaryContentType }}</span>
|
|
1944
1881
|
}
|
|
1945
1882
|
</div>
|
|
1946
1883
|
<button
|
|
@@ -1957,31 +1894,31 @@ class PropertyValueDisplayComponent {
|
|
|
1957
1894
|
<!-- Non-expandable value display -->
|
|
1958
1895
|
@switch (displayMode) {
|
|
1959
1896
|
@case (PropertyDisplayMode.Json) {
|
|
1960
|
-
<pre class="json-display">{{
|
|
1897
|
+
<pre class="json-display">{{ formattedValue }}</pre>
|
|
1961
1898
|
}
|
|
1962
1899
|
@case (PropertyDisplayMode.Text) {
|
|
1963
|
-
<span class="text-display" [innerHTML]="
|
|
1900
|
+
<span class="text-display" [innerHTML]="formattedValue"></span>
|
|
1964
1901
|
}
|
|
1965
1902
|
@default {
|
|
1966
|
-
<span class="default-display">{{
|
|
1903
|
+
<span class="default-display">{{ formattedValue }}</span>
|
|
1967
1904
|
}
|
|
1968
1905
|
}
|
|
1969
1906
|
|
|
1970
|
-
@if (
|
|
1971
|
-
<span class="type-indicator" [title]="
|
|
1972
|
-
{{
|
|
1907
|
+
@if (complexType && !expandableRecord) {
|
|
1908
|
+
<span class="type-indicator" [title]="typeDescription">
|
|
1909
|
+
{{ typeIndicator }}
|
|
1973
1910
|
</span>
|
|
1974
1911
|
}
|
|
1975
1912
|
}
|
|
1976
1913
|
</div>
|
|
1977
|
-
`, isInline: true, styles: [".property-value-display{display:flex;align-items:flex-start;gap:8px;
|
|
1914
|
+
`, isInline: true, styles: [".property-value-display{display:flex;align-items:flex-start;gap:8px;width:100%;min-width:0}.text-display,.default-display{word-break:break-word;white-space:pre-wrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.json-display{font-family:Roboto Mono,monospace;font-size:.8em;white-space:pre-wrap;word-break:break-word;margin:0;flex:1;min-width:0}.type-indicator{font-family:Roboto Mono,monospace;font-size:.7em;padding:1px 5px;background:var(--kendo-color-base-subtle);border-radius:3px;color:var(--kendo-color-subtle);white-space:nowrap;flex-shrink:0}.expandable-record{width:100%}.record-header{display:flex;align-items:center;gap:6px;cursor:pointer;padding:2px 0;border-radius:3px;transition:background-color .15s ease}.record-header:hover{background-color:var(--kendo-color-base-subtle, rgba(0,0,0,.04))}.expand-icon{flex-shrink:0;width:14px;height:14px;color:var(--kendo-color-subtle)}.record-summary{color:var(--kendo-color-subtle);font-size:.85em;font-style:italic;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record-content{margin-left:20px;padding-left:8px;border-left:1px solid var(--kendo-color-border, #dee2e6)}.array-item{margin:4px 0}.array-index{font-family:Roboto Mono,monospace;font-size:.8em;color:var(--kendo-color-subtle)}.nested-properties{margin-left:8px}.nested-property{display:flex;align-items:flex-start;gap:8px;padding:2px 0}.property-key{font-weight:500;white-space:nowrap;flex-shrink:0;color:var(--kendo-color-subtle);font-size:.85em}.binary-linked-display{display:flex;align-items:center;gap:12px;width:100%}.binary-info{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.filename{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-size{font-size:.85em;color:var(--kendo-color-subtle);flex-shrink:0}.content-type{font-size:.75em;padding:2px 6px;background:var(--kendo-color-base-subtle);border-radius:3px;color:var(--kendo-color-subtle);flex-shrink:0}\n"], dependencies: [{ kind: "component", type: PropertyValueDisplayComponent, selector: "mm-property-value-display", inputs: ["value", "type", "displayMode"], outputs: ["binaryDownload"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: SVGIconModule }, { kind: "component", type: i5$1.SVGIconComponent, selector: "kendo-svg-icon, kendo-svgicon", inputs: ["icon"], exportAs: ["kendoSVGIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i3$1.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1978
1915
|
}
|
|
1979
1916
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyValueDisplayComponent, decorators: [{
|
|
1980
1917
|
type: Component,
|
|
1981
|
-
args: [{ selector: 'mm-property-value-display', standalone: true, imports: [CommonModule, SVGIconModule, ButtonModule], template: `
|
|
1918
|
+
args: [{ selector: 'mm-property-value-display', standalone: true, imports: [CommonModule, SVGIconModule, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1982
1919
|
<div class="property-value-display" [ngClass]="'type-' + type.toLowerCase()">
|
|
1983
1920
|
|
|
1984
|
-
@if (
|
|
1921
|
+
@if (expandableRecord) {
|
|
1985
1922
|
<div class="expandable-record">
|
|
1986
1923
|
<!-- Expand/Collapse Button and Summary -->
|
|
1987
1924
|
<div class="record-header" (click)="toggleExpansion()">
|
|
@@ -1989,9 +1926,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
|
|
|
1989
1926
|
[icon]="isExpanded ? chevronDownIcon : chevronRightIcon"
|
|
1990
1927
|
class="expand-icon">
|
|
1991
1928
|
</kendo-svgicon>
|
|
1992
|
-
<span class="record-summary">{{
|
|
1993
|
-
<span class="type-indicator" [title]="
|
|
1994
|
-
{{
|
|
1929
|
+
<span class="record-summary">{{ recordSummary }}</span>
|
|
1930
|
+
<span class="type-indicator" [title]="typeDescription">
|
|
1931
|
+
{{ typeIndicator }}
|
|
1995
1932
|
</span>
|
|
1996
1933
|
</div>
|
|
1997
1934
|
|
|
@@ -2031,18 +1968,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
|
|
|
2031
1968
|
</div>
|
|
2032
1969
|
}
|
|
2033
1970
|
</div>
|
|
2034
|
-
} @else if (
|
|
1971
|
+
} @else if (binaryLinkedWithDownload) {
|
|
2035
1972
|
<!-- Binary Linked with download capability -->
|
|
2036
1973
|
<div class="binary-linked-display">
|
|
2037
1974
|
<div class="binary-info">
|
|
2038
|
-
@if (
|
|
2039
|
-
<span class="filename">{{
|
|
1975
|
+
@if (binaryFilename) {
|
|
1976
|
+
<span class="filename">{{ binaryFilename }}</span>
|
|
2040
1977
|
}
|
|
2041
|
-
@if (
|
|
2042
|
-
<span class="file-size">({{
|
|
1978
|
+
@if (binarySize) {
|
|
1979
|
+
<span class="file-size">({{ formattedBinarySize }})</span>
|
|
2043
1980
|
}
|
|
2044
|
-
@if (
|
|
2045
|
-
<span class="content-type">{{
|
|
1981
|
+
@if (binaryContentType) {
|
|
1982
|
+
<span class="content-type">{{ binaryContentType }}</span>
|
|
2046
1983
|
}
|
|
2047
1984
|
</div>
|
|
2048
1985
|
<button
|
|
@@ -2059,24 +1996,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
|
|
|
2059
1996
|
<!-- Non-expandable value display -->
|
|
2060
1997
|
@switch (displayMode) {
|
|
2061
1998
|
@case (PropertyDisplayMode.Json) {
|
|
2062
|
-
<pre class="json-display">{{
|
|
1999
|
+
<pre class="json-display">{{ formattedValue }}</pre>
|
|
2063
2000
|
}
|
|
2064
2001
|
@case (PropertyDisplayMode.Text) {
|
|
2065
|
-
<span class="text-display" [innerHTML]="
|
|
2002
|
+
<span class="text-display" [innerHTML]="formattedValue"></span>
|
|
2066
2003
|
}
|
|
2067
2004
|
@default {
|
|
2068
|
-
<span class="default-display">{{
|
|
2005
|
+
<span class="default-display">{{ formattedValue }}</span>
|
|
2069
2006
|
}
|
|
2070
2007
|
}
|
|
2071
2008
|
|
|
2072
|
-
@if (
|
|
2073
|
-
<span class="type-indicator" [title]="
|
|
2074
|
-
{{
|
|
2009
|
+
@if (complexType && !expandableRecord) {
|
|
2010
|
+
<span class="type-indicator" [title]="typeDescription">
|
|
2011
|
+
{{ typeIndicator }}
|
|
2075
2012
|
</span>
|
|
2076
2013
|
}
|
|
2077
2014
|
}
|
|
2078
2015
|
</div>
|
|
2079
|
-
`, styles: [".property-value-display{display:flex;align-items:flex-start;gap:8px;
|
|
2016
|
+
`, styles: [".property-value-display{display:flex;align-items:flex-start;gap:8px;width:100%;min-width:0}.text-display,.default-display{word-break:break-word;white-space:pre-wrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.json-display{font-family:Roboto Mono,monospace;font-size:.8em;white-space:pre-wrap;word-break:break-word;margin:0;flex:1;min-width:0}.type-indicator{font-family:Roboto Mono,monospace;font-size:.7em;padding:1px 5px;background:var(--kendo-color-base-subtle);border-radius:3px;color:var(--kendo-color-subtle);white-space:nowrap;flex-shrink:0}.expandable-record{width:100%}.record-header{display:flex;align-items:center;gap:6px;cursor:pointer;padding:2px 0;border-radius:3px;transition:background-color .15s ease}.record-header:hover{background-color:var(--kendo-color-base-subtle, rgba(0,0,0,.04))}.expand-icon{flex-shrink:0;width:14px;height:14px;color:var(--kendo-color-subtle)}.record-summary{color:var(--kendo-color-subtle);font-size:.85em;font-style:italic;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record-content{margin-left:20px;padding-left:8px;border-left:1px solid var(--kendo-color-border, #dee2e6)}.array-item{margin:4px 0}.array-index{font-family:Roboto Mono,monospace;font-size:.8em;color:var(--kendo-color-subtle)}.nested-properties{margin-left:8px}.nested-property{display:flex;align-items:flex-start;gap:8px;padding:2px 0}.property-key{font-weight:500;white-space:nowrap;flex-shrink:0;color:var(--kendo-color-subtle);font-size:.85em}.binary-linked-display{display:flex;align-items:center;gap:12px;width:100%}.binary-info{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.filename{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-size{font-size:.85em;color:var(--kendo-color-subtle);flex-shrink:0}.content-type{font-size:.75em;padding:2px 6px;background:var(--kendo-color-base-subtle);border-radius:3px;color:var(--kendo-color-subtle);flex-shrink:0}\n"] }]
|
|
2080
2017
|
}], propDecorators: { value: [{
|
|
2081
2018
|
type: Input
|
|
2082
2019
|
}], type: [{
|