@picteus/extension-sdk 0.16.0 → 0.18.0
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/dist/generated/viewKit.d.ts +547 -505
- package/dist/generated/viewKit.js +505 -512
- package/dist/picteus-ws-client/apis/AdministrationApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/AdministrationApi.js +1 -1
- package/dist/picteus-ws-client/apis/ApiSecretApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/ApiSecretApi.js +1 -1
- package/dist/picteus-ws-client/apis/CollectionApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/CollectionApi.js +1 -1
- package/dist/picteus-ws-client/apis/ExtensionApi.d.ts +5 -3
- package/dist/picteus-ws-client/apis/ExtensionApi.js +2 -2
- package/dist/picteus-ws-client/apis/ImageApi.d.ts +40 -5
- package/dist/picteus-ws-client/apis/ImageApi.js +50 -3
- package/dist/picteus-ws-client/apis/ImageAttachmentApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/ImageAttachmentApi.js +1 -1
- package/dist/picteus-ws-client/apis/MiscellaneousApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/MiscellaneousApi.js +1 -1
- package/dist/picteus-ws-client/apis/RepositoryApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/RepositoryApi.js +1 -1
- package/dist/picteus-ws-client/apis/SettingsApi.d.ts +1 -1
- package/dist/picteus-ws-client/apis/SettingsApi.js +1 -1
- package/dist/picteus-ws-client/models/ApiSecret.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApiSecret.js +1 -1
- package/dist/picteus-ws-client/models/ApiSecretSummary.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApiSecretSummary.js +1 -1
- package/dist/picteus-ws-client/models/ApiSecretType.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApiSecretType.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationConfiguration.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApplicationConfiguration.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadata.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadata.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadataItem.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadataItem.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationMetadataItemValue.d.ts +4 -2
- package/dist/picteus-ws-client/models/ApplicationMetadataItemValue.js +1 -1
- package/dist/picteus-ws-client/models/ApplicationSettings.d.ts +1 -1
- package/dist/picteus-ws-client/models/ApplicationSettings.js +1 -1
- package/dist/picteus-ws-client/models/Collection.d.ts +1 -1
- package/dist/picteus-ws-client/models/Collection.js +1 -1
- package/dist/picteus-ws-client/models/CommandEntity.d.ts +1 -1
- package/dist/picteus-ws-client/models/CommandEntity.js +1 -1
- package/dist/picteus-ws-client/models/ComputedImageFormat.d.ts +1 -1
- package/dist/picteus-ws-client/models/ComputedImageFormat.js +1 -1
- package/dist/picteus-ws-client/models/ConfigurationCapability.d.ts +1 -1
- package/dist/picteus-ws-client/models/ConfigurationCapability.js +1 -1
- package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.d.ts +1 -1
- package/dist/picteus-ws-client/models/ConfigurationExtensionCommand.js +1 -1
- package/dist/picteus-ws-client/models/ConstantsRegistry.d.ts +1 -1
- package/dist/picteus-ws-client/models/ConstantsRegistry.js +1 -1
- package/dist/picteus-ws-client/models/Dates.d.ts +1 -1
- package/dist/picteus-ws-client/models/Dates.js +1 -1
- package/dist/picteus-ws-client/models/Extension.d.ts +1 -1
- package/dist/picteus-ws-client/models/Extension.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionActivity.d.ts +23 -5
- package/dist/picteus-ws-client/models/ExtensionActivity.js +17 -5
- package/dist/picteus-ws-client/models/ExtensionActivityState.d.ts +25 -0
- package/dist/picteus-ws-client/models/ExtensionActivityState.js +43 -0
- package/dist/picteus-ws-client/models/ExtensionAndManual.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionAndManual.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionCategory.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionCategory.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionGenerationOptions.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionGenerationOptions.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionIdImageEmbeddingName.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionIdImageEmbeddingName.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageEmbeddings.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeature.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeature.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeatureName.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeatureName.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeaturesAttribute.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageFeaturesAttribute.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTag.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTag.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTagsAttribute.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionImageTagsAttribute.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionManual.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionManual.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionSettings.d.ts +5 -3
- package/dist/picteus-ws-client/models/ExtensionSettings.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionState.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionState.js +1 -1
- package/dist/picteus-ws-client/models/ExtensionsConfiguration.d.ts +1 -1
- package/dist/picteus-ws-client/models/ExtensionsConfiguration.js +1 -1
- package/dist/picteus-ws-client/models/GenerationRecipe.d.ts +13 -1
- package/dist/picteus-ws-client/models/GenerationRecipe.js +5 -1
- package/dist/picteus-ws-client/models/GenerationRecipePrompt.d.ts +1 -1
- package/dist/picteus-ws-client/models/GenerationRecipePrompt.js +1 -1
- package/dist/picteus-ws-client/models/Image.d.ts +1 -1
- package/dist/picteus-ws-client/models/Image.js +1 -1
- package/dist/picteus-ws-client/models/ImageDimensions.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageDimensions.js +1 -1
- package/dist/picteus-ws-client/models/ImageDistance.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageDistance.js +1 -1
- package/dist/picteus-ws-client/models/ImageEmbedding.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageEmbedding.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeature.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeature.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureFormat.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureFormat.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureNullValue.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureNullValue.js +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureType.d.ts +2 -1
- package/dist/picteus-ws-client/models/ImageFeatureType.js +2 -1
- package/dist/picteus-ws-client/models/ImageFeatureValue.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFeatureValue.js +1 -1
- package/dist/picteus-ws-client/models/ImageFormat.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageFormat.js +1 -1
- package/dist/picteus-ws-client/models/ImageMediaUrl.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageMediaUrl.js +1 -1
- package/dist/picteus-ws-client/models/ImageMetadata.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageMetadata.js +1 -1
- package/dist/picteus-ws-client/models/ImageResizeRender.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageResizeRender.js +1 -1
- package/dist/picteus-ws-client/models/ImageSummary.d.ts +1 -1
- package/dist/picteus-ws-client/models/ImageSummary.js +1 -1
- package/dist/picteus-ws-client/models/InstructionsPrompt.d.ts +5 -3
- package/dist/picteus-ws-client/models/InstructionsPrompt.js +1 -1
- package/dist/picteus-ws-client/models/Manifest.d.ts +5 -3
- package/dist/picteus-ws-client/models/Manifest.js +1 -1
- package/dist/picteus-ws-client/models/ManifestCapability.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestCapability.js +1 -1
- package/dist/picteus-ws-client/models/ManifestCapabilityId.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestCapabilityId.js +1 -1
- package/dist/picteus-ws-client/models/ManifestEvent.d.ts +1 -3
- package/dist/picteus-ws-client/models/ManifestEvent.js +1 -3
- package/dist/picteus-ws-client/models/ManifestExecution.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExecution.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommand.d.ts +5 -3
- package/dist/picteus-ws-client/models/ManifestExtensionCommand.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandOn.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandSpecification.js +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandUi.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestExtensionCommandUi.js +1 -1
- package/dist/picteus-ws-client/models/ManifestInstructions.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestInstructions.js +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElement.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElement.js +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElementIntegration.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestInterfaceElementIntegration.js +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntime.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntime.js +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestRuntimeEnvironment.js +1 -1
- package/dist/picteus-ws-client/models/ManifestThrottlingPolicy.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestThrottlingPolicy.js +1 -1
- package/dist/picteus-ws-client/models/ManifestUserInterface.d.ts +1 -1
- package/dist/picteus-ws-client/models/ManifestUserInterface.js +1 -1
- package/dist/picteus-ws-client/models/PromptKind.d.ts +1 -1
- package/dist/picteus-ws-client/models/PromptKind.js +1 -1
- package/dist/picteus-ws-client/models/Repository.d.ts +1 -1
- package/dist/picteus-ws-client/models/Repository.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivity.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivity.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivityKind.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryActivityKind.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryLocationType.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryLocationType.js +1 -1
- package/dist/picteus-ws-client/models/RepositoryState.d.ts +1 -1
- package/dist/picteus-ws-client/models/RepositoryState.js +1 -1
- package/dist/picteus-ws-client/models/RunCommandParameters.d.ts +5 -3
- package/dist/picteus-ws-client/models/RunCommandParameters.js +1 -1
- package/dist/picteus-ws-client/models/SearchCriteria.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchCriteria.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureComparisonOperator.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureComparisonOperator.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureCondition.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureCondition.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureConditionValue.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureConditionValue.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureLogicalOperator.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatureLogicalOperator.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeatures.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeatures.js +1 -1
- package/dist/picteus-ws-client/models/SearchFeaturesResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFeaturesResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchFilter.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFilter.js +1 -1
- package/dist/picteus-ws-client/models/SearchFilterOrigin.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchFilterOrigin.js +1 -1
- package/dist/picteus-ws-client/models/SearchImageIdResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchImageIdResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchImageResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchImageResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchImageSummaryResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchImageSummaryResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchImagesOrigin.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchImagesOrigin.js +1 -1
- package/dist/picteus-ws-client/models/SearchKeyword.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchKeyword.js +1 -1
- package/dist/picteus-ws-client/models/SearchMediaUrlResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchMediaUrlResult.js +1 -1
- package/dist/picteus-ws-client/models/SearchOriginNature.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchOriginNature.js +1 -1
- package/dist/picteus-ws-client/models/SearchParameters.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchParameters.js +1 -1
- package/dist/picteus-ws-client/models/SearchProperties.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchProperties.js +1 -1
- package/dist/picteus-ws-client/models/SearchPropertyRange.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchPropertyRange.js +1 -1
- package/dist/picteus-ws-client/models/SearchRange.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchRange.js +1 -1
- package/dist/picteus-ws-client/models/SearchRepositoriesOrigin.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchRepositoriesOrigin.js +1 -1
- package/dist/picteus-ws-client/models/SearchSorting.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchSorting.js +1 -1
- package/dist/picteus-ws-client/models/SearchSortingProperty.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchSortingProperty.js +1 -1
- package/dist/picteus-ws-client/models/SearchTags.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchTags.js +1 -1
- package/dist/picteus-ws-client/models/SearchTagsResult.d.ts +1 -1
- package/dist/picteus-ws-client/models/SearchTagsResult.js +1 -1
- package/dist/picteus-ws-client/models/Software.d.ts +1 -1
- package/dist/picteus-ws-client/models/Software.js +1 -1
- package/dist/picteus-ws-client/models/TextualPrompt.d.ts +1 -1
- package/dist/picteus-ws-client/models/TextualPrompt.js +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceAnchor.d.ts +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceAnchor.js +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceSidebarIntegration.d.ts +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceSidebarIntegration.js +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceWindowIntegration.d.ts +1 -1
- package/dist/picteus-ws-client/models/UserInterfaceWindowIntegration.js +1 -1
- package/dist/picteus-ws-client/models/index.d.ts +1 -1
- package/dist/picteus-ws-client/models/index.js +1 -1
- package/dist/picteus-ws-client/runtime.d.ts +1 -1
- package/dist/picteus-ws-client/runtime.js +1 -1
- package/dist/picteusExtension.d.ts +1 -1
- package/dist/picteusExtension.js +1 -1
- package/package.json +1 -1
|
@@ -58,14 +58,50 @@ export var TextIntensity;
|
|
|
58
58
|
// High visual contrast / intense text color
|
|
59
59
|
TextIntensity["high"] = "high";
|
|
60
60
|
})(TextIntensity || (TextIntensity = {}));
|
|
61
|
-
/**
|
|
62
|
-
export var
|
|
63
|
-
(function (
|
|
64
|
-
//
|
|
65
|
-
|
|
61
|
+
/** Geometric shape representation for visual containers and indicators. */
|
|
62
|
+
export var Shape;
|
|
63
|
+
(function (Shape) {
|
|
64
|
+
// Circular container shape
|
|
65
|
+
Shape["circle"] = "circle";
|
|
66
|
+
// Square container shape
|
|
67
|
+
Shape["square"] = "square";
|
|
68
|
+
})(Shape || (Shape = {}));
|
|
69
|
+
/** Relative sizing scale for visual elements and indicators. */
|
|
70
|
+
export var Size;
|
|
71
|
+
(function (Size) {
|
|
72
|
+
// Compact small size
|
|
73
|
+
Size["small"] = "small";
|
|
74
|
+
// Standard medium size
|
|
75
|
+
Size["medium"] = "medium";
|
|
76
|
+
// Prominent large size
|
|
77
|
+
Size["large"] = "large";
|
|
78
|
+
})(Size || (Size = {}));
|
|
79
|
+
/** Visual presentation style for string values. */
|
|
80
|
+
export var StringRepresentation;
|
|
81
|
+
(function (StringRepresentation) {
|
|
82
|
+
// Standard inline text rendering
|
|
83
|
+
StringRepresentation["plain"] = "plain";
|
|
66
84
|
// Visual chip / tag pill representation
|
|
67
|
-
|
|
68
|
-
|
|
85
|
+
StringRepresentation["chip"] = "chip";
|
|
86
|
+
// Multiline text with preserved whitespace and line breaks
|
|
87
|
+
StringRepresentation["multiline"] = "multiline";
|
|
88
|
+
})(StringRepresentation || (StringRepresentation = {}));
|
|
89
|
+
/** Visual separator rendered between sequential elements or items. */
|
|
90
|
+
export var Separator;
|
|
91
|
+
(function (Separator) {
|
|
92
|
+
// Vertical dividing bar
|
|
93
|
+
Separator["bar"] = "bar";
|
|
94
|
+
// Comma separator
|
|
95
|
+
Separator["comma"] = "comma";
|
|
96
|
+
// Bullet dot separator
|
|
97
|
+
Separator["dot"] = "dot";
|
|
98
|
+
// Forward slash separator
|
|
99
|
+
Separator["slash"] = "slash";
|
|
100
|
+
// Dash separator
|
|
101
|
+
Separator["dash"] = "dash";
|
|
102
|
+
// Space separator
|
|
103
|
+
Separator["space"] = "space";
|
|
104
|
+
})(Separator || (Separator = {}));
|
|
69
105
|
/** Supported syntax highlighting languages for formatted code blocks. */
|
|
70
106
|
export var CodeLanguage;
|
|
71
107
|
(function (CodeLanguage) {
|
|
@@ -76,6 +112,14 @@ export var CodeLanguage;
|
|
|
76
112
|
// YAML format syntax
|
|
77
113
|
CodeLanguage["yaml"] = "yaml";
|
|
78
114
|
})(CodeLanguage || (CodeLanguage = {}));
|
|
115
|
+
/** Visual presentation style for boolean values. */
|
|
116
|
+
export var BooleanRepresentation;
|
|
117
|
+
(function (BooleanRepresentation) {
|
|
118
|
+
// Standard inline text rendering (e.g. "true" / "false" or custom labels)
|
|
119
|
+
BooleanRepresentation["plain"] = "plain";
|
|
120
|
+
// Visual badge pill representation
|
|
121
|
+
BooleanRepresentation["badge"] = "badge";
|
|
122
|
+
})(BooleanRepresentation || (BooleanRepresentation = {}));
|
|
79
123
|
/** Visual color tone variants for badge pill representations. */
|
|
80
124
|
export var BadgeVariant;
|
|
81
125
|
(function (BadgeVariant) {
|
|
@@ -92,7 +136,7 @@ export var BadgeVariant;
|
|
|
92
136
|
export var TimestampFormat;
|
|
93
137
|
(function (TimestampFormat) {
|
|
94
138
|
// Complete date and time display
|
|
95
|
-
TimestampFormat["
|
|
139
|
+
TimestampFormat["datetime"] = "datetime";
|
|
96
140
|
// Date-only display
|
|
97
141
|
TimestampFormat["date"] = "date";
|
|
98
142
|
// Time-only display
|
|
@@ -122,6 +166,14 @@ export var TableColumnAlign;
|
|
|
122
166
|
// Right-aligned text
|
|
123
167
|
TableColumnAlign["right"] = "right";
|
|
124
168
|
})(TableColumnAlign || (TableColumnAlign = {}));
|
|
169
|
+
/** Width mode for table columns. */
|
|
170
|
+
export var TableColumnWidthMode;
|
|
171
|
+
(function (TableColumnWidthMode) {
|
|
172
|
+
// Fixed width constraint
|
|
173
|
+
TableColumnWidthMode["fixed"] = "fixed";
|
|
174
|
+
// Maximum width upper bound constraint
|
|
175
|
+
TableColumnWidthMode["maximum"] = "maximum";
|
|
176
|
+
})(TableColumnWidthMode || (TableColumnWidthMode = {}));
|
|
125
177
|
/** Visual styling variants for hairline dividers. */
|
|
126
178
|
export var DividerStyle;
|
|
127
179
|
(function (DividerStyle) {
|
|
@@ -229,31 +281,31 @@ export class PrimitiveModifiersClass extends ViewKitNode {
|
|
|
229
281
|
}
|
|
230
282
|
}
|
|
231
283
|
/**
|
|
232
|
-
* Class implementation of the `
|
|
284
|
+
* Class implementation of the `StringElement` interface.
|
|
233
285
|
*
|
|
234
286
|
* @remarks
|
|
235
|
-
*
|
|
236
|
-
* Supports plain text
|
|
287
|
+
* Universal textual string primitive element.
|
|
288
|
+
* Supports plain text, compact chip pill, or multiline pre-wrapped presentation.
|
|
237
289
|
*/
|
|
238
|
-
export class
|
|
290
|
+
export class StringElementClass extends BaseUiElement {
|
|
239
291
|
/**
|
|
240
|
-
* Discriminator identifier for `
|
|
292
|
+
* Discriminator identifier for `StringElement`.
|
|
241
293
|
*
|
|
242
|
-
* @defaultValue "string
|
|
294
|
+
* @defaultValue "string"
|
|
243
295
|
*/
|
|
244
|
-
type = "string
|
|
296
|
+
type = "string";
|
|
245
297
|
/** Text value */
|
|
246
298
|
value;
|
|
247
299
|
/**
|
|
248
300
|
* Display representation mode
|
|
249
301
|
*
|
|
250
|
-
* @defaultValue
|
|
302
|
+
* @defaultValue StringRepresentation.plain
|
|
251
303
|
*/
|
|
252
304
|
representation;
|
|
253
305
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
254
306
|
modifiers;
|
|
255
307
|
/**
|
|
256
|
-
* Constructs a new `
|
|
308
|
+
* Constructs a new `StringElementClass` instance.
|
|
257
309
|
*
|
|
258
310
|
* @param value - Text value
|
|
259
311
|
* @param options - Optional component settings. (representation (defaults to `plain`), modifiers).
|
|
@@ -261,36 +313,47 @@ export class StringShortElementClass extends BaseUiElement {
|
|
|
261
313
|
constructor(value, options) {
|
|
262
314
|
super();
|
|
263
315
|
this.value = value;
|
|
264
|
-
this.representation = options?.representation ??
|
|
316
|
+
this.representation = options?.representation ?? StringRepresentation.plain;
|
|
265
317
|
this.modifiers = options?.modifiers;
|
|
266
318
|
}
|
|
267
319
|
}
|
|
268
320
|
/**
|
|
269
|
-
* Class implementation of the `
|
|
321
|
+
* Class implementation of the `StringsElement` interface.
|
|
270
322
|
*
|
|
271
323
|
* @remarks
|
|
272
|
-
*
|
|
324
|
+
* Collection of textual string values rendered as a sequence of inline items or chips.
|
|
325
|
+
* Supports visual separators (comma, dot, slash, bar, dash, space) and copyable affordance.
|
|
273
326
|
*/
|
|
274
|
-
export class
|
|
327
|
+
export class StringsElementClass extends BaseUiElement {
|
|
275
328
|
/**
|
|
276
|
-
* Discriminator identifier for `
|
|
329
|
+
* Discriminator identifier for `StringsElement`.
|
|
277
330
|
*
|
|
278
|
-
* @defaultValue "
|
|
331
|
+
* @defaultValue "strings"
|
|
279
332
|
*/
|
|
280
|
-
type = "
|
|
281
|
-
/**
|
|
282
|
-
|
|
333
|
+
type = "strings";
|
|
334
|
+
/** Array of string values */
|
|
335
|
+
values;
|
|
336
|
+
/**
|
|
337
|
+
* Display representation mode (plain text or visual chips)
|
|
338
|
+
*
|
|
339
|
+
* @defaultValue StringRepresentation.plain
|
|
340
|
+
*/
|
|
341
|
+
representation;
|
|
342
|
+
/** Optional visual separator rendered between sequential values */
|
|
343
|
+
separator;
|
|
283
344
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
284
345
|
modifiers;
|
|
285
346
|
/**
|
|
286
|
-
* Constructs a new `
|
|
347
|
+
* Constructs a new `StringsElementClass` instance.
|
|
287
348
|
*
|
|
288
|
-
* @param
|
|
289
|
-
* @param options - Optional component settings. (modifiers).
|
|
349
|
+
* @param values - Array of string values
|
|
350
|
+
* @param options - Optional component settings. (representation (defaults to `plain`), separator, modifiers).
|
|
290
351
|
*/
|
|
291
|
-
constructor(
|
|
352
|
+
constructor(values, options) {
|
|
292
353
|
super();
|
|
293
|
-
this.
|
|
354
|
+
this.values = values ? [...values] : [];
|
|
355
|
+
this.representation = options?.representation ?? StringRepresentation.plain;
|
|
356
|
+
this.separator = options?.separator;
|
|
294
357
|
this.modifiers = options?.modifiers;
|
|
295
358
|
}
|
|
296
359
|
}
|
|
@@ -458,14 +521,14 @@ export class RatioElementClass extends BaseUiElement {
|
|
|
458
521
|
* @defaultValue "ratio"
|
|
459
522
|
*/
|
|
460
523
|
type = "ratio";
|
|
461
|
-
/** Aspect ratio
|
|
524
|
+
/** Aspect ratio numerical expression */
|
|
462
525
|
value;
|
|
463
526
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
464
527
|
modifiers;
|
|
465
528
|
/**
|
|
466
529
|
* Constructs a new `RatioElementClass` instance.
|
|
467
530
|
*
|
|
468
|
-
* @param value - Aspect ratio
|
|
531
|
+
* @param value - Aspect ratio numerical expression
|
|
469
532
|
* @param options - Optional component settings. (modifiers).
|
|
470
533
|
*/
|
|
471
534
|
constructor(value, options) {
|
|
@@ -474,32 +537,89 @@ export class RatioElementClass extends BaseUiElement {
|
|
|
474
537
|
this.modifiers = options?.modifiers;
|
|
475
538
|
}
|
|
476
539
|
}
|
|
540
|
+
/**
|
|
541
|
+
* Class implementation of the `DimensionsElement` interface.
|
|
542
|
+
*
|
|
543
|
+
* @remarks
|
|
544
|
+
* Image dimensions representation displaying formatted width and height in pixels.
|
|
545
|
+
*/
|
|
546
|
+
export class DimensionsElementClass extends BaseUiElement {
|
|
547
|
+
/**
|
|
548
|
+
* Discriminator identifier for `DimensionsElement`.
|
|
549
|
+
*
|
|
550
|
+
* @defaultValue "dimensions"
|
|
551
|
+
*/
|
|
552
|
+
type = "dimensions";
|
|
553
|
+
/** Width in pixels */
|
|
554
|
+
width;
|
|
555
|
+
/** Height in pixels */
|
|
556
|
+
height;
|
|
557
|
+
/** Optional visual modifiers (copyable) */
|
|
558
|
+
modifiers;
|
|
559
|
+
/**
|
|
560
|
+
* Constructs a new `DimensionsElementClass` instance.
|
|
561
|
+
*
|
|
562
|
+
* @param width - Width in pixels
|
|
563
|
+
* @param height - Height in pixels
|
|
564
|
+
* @param options - Optional component settings. (modifiers).
|
|
565
|
+
*/
|
|
566
|
+
constructor(width, height, options) {
|
|
567
|
+
super();
|
|
568
|
+
this.width = width;
|
|
569
|
+
this.height = height;
|
|
570
|
+
this.modifiers = options?.modifiers;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
477
573
|
/**
|
|
478
574
|
* Class implementation of the `ColourElement` interface.
|
|
479
575
|
*
|
|
480
576
|
* @remarks
|
|
481
|
-
* Single color
|
|
577
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
482
578
|
*/
|
|
483
579
|
export class ColourElementClass extends BaseUiElement {
|
|
484
580
|
/**
|
|
485
581
|
* Discriminator identifier for `ColourElement`.
|
|
486
582
|
*
|
|
487
|
-
* @defaultValue "color
|
|
583
|
+
* @defaultValue "color"
|
|
488
584
|
*/
|
|
489
|
-
type = "color
|
|
585
|
+
type = "color";
|
|
490
586
|
/** Hexadecimal color code */
|
|
491
587
|
value;
|
|
588
|
+
/** Optional descriptive color name label */
|
|
589
|
+
label;
|
|
590
|
+
/**
|
|
591
|
+
* Whether to display the textual color code or label next to the swatch
|
|
592
|
+
*
|
|
593
|
+
* @defaultValue true
|
|
594
|
+
*/
|
|
595
|
+
showText;
|
|
596
|
+
/**
|
|
597
|
+
* Visual shape of the color indicator
|
|
598
|
+
*
|
|
599
|
+
* @defaultValue Shape.circle
|
|
600
|
+
*/
|
|
601
|
+
shape;
|
|
602
|
+
/**
|
|
603
|
+
* Visual size of the color indicator
|
|
604
|
+
*
|
|
605
|
+
* @defaultValue Size.medium
|
|
606
|
+
*/
|
|
607
|
+
size;
|
|
492
608
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
493
609
|
modifiers;
|
|
494
610
|
/**
|
|
495
611
|
* Constructs a new `ColourElementClass` instance.
|
|
496
612
|
*
|
|
497
613
|
* @param value - Hexadecimal color code
|
|
498
|
-
* @param options - Optional component settings. (modifiers).
|
|
614
|
+
* @param options - Optional component settings. (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
499
615
|
*/
|
|
500
616
|
constructor(value, options) {
|
|
501
617
|
super();
|
|
502
618
|
this.value = value;
|
|
619
|
+
this.label = options?.label;
|
|
620
|
+
this.showText = options?.showText ?? true;
|
|
621
|
+
this.shape = options?.shape ?? Shape.circle;
|
|
622
|
+
this.size = options?.size ?? Size.medium;
|
|
503
623
|
this.modifiers = options?.modifiers;
|
|
504
624
|
}
|
|
505
625
|
}
|
|
@@ -609,49 +729,27 @@ export class NumberBoundedMeterElementClass extends BaseUiElement {
|
|
|
609
729
|
}
|
|
610
730
|
}
|
|
611
731
|
/**
|
|
612
|
-
* Class implementation of the `
|
|
732
|
+
* Class implementation of the `BooleanElement` interface.
|
|
613
733
|
*
|
|
614
734
|
* @remarks
|
|
615
|
-
*
|
|
735
|
+
* Universal boolean primitive element.
|
|
736
|
+
* Supports standard plain text or badge pill presentation with customizable labels and variants.
|
|
616
737
|
*/
|
|
617
|
-
export class
|
|
738
|
+
export class BooleanElementClass extends BaseUiElement {
|
|
618
739
|
/**
|
|
619
|
-
* Discriminator identifier for `
|
|
740
|
+
* Discriminator identifier for `BooleanElement`.
|
|
620
741
|
*
|
|
621
|
-
* @defaultValue "boolean
|
|
742
|
+
* @defaultValue "boolean"
|
|
622
743
|
*/
|
|
623
|
-
type = "boolean
|
|
744
|
+
type = "boolean";
|
|
624
745
|
/** Boolean state value */
|
|
625
746
|
value;
|
|
626
|
-
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
627
|
-
modifiers;
|
|
628
|
-
/**
|
|
629
|
-
* Constructs a new `BooleanPlainElementClass` instance.
|
|
630
|
-
*
|
|
631
|
-
* @param value - Boolean state value
|
|
632
|
-
* @param options - Optional component settings. (modifiers).
|
|
633
|
-
*/
|
|
634
|
-
constructor(value, options) {
|
|
635
|
-
super();
|
|
636
|
-
this.value = value;
|
|
637
|
-
this.modifiers = options?.modifiers;
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* Class implementation of the `BooleanBadgeElement` interface.
|
|
642
|
-
*
|
|
643
|
-
* @remarks
|
|
644
|
-
* Visual badge pill representation of a boolean state.
|
|
645
|
-
*/
|
|
646
|
-
export class BooleanBadgeElementClass extends BaseUiElement {
|
|
647
747
|
/**
|
|
648
|
-
*
|
|
748
|
+
* Display representation mode
|
|
649
749
|
*
|
|
650
|
-
* @defaultValue
|
|
750
|
+
* @defaultValue BooleanRepresentation.plain
|
|
651
751
|
*/
|
|
652
|
-
|
|
653
|
-
/** Boolean state value */
|
|
654
|
-
value;
|
|
752
|
+
representation;
|
|
655
753
|
/**
|
|
656
754
|
* Custom display label when true (defaults to "true")
|
|
657
755
|
*
|
|
@@ -665,7 +763,7 @@ export class BooleanBadgeElementClass extends BaseUiElement {
|
|
|
665
763
|
*/
|
|
666
764
|
falseLabel;
|
|
667
765
|
/**
|
|
668
|
-
* Badge color tone
|
|
766
|
+
* Badge color tone when rendered as badge
|
|
669
767
|
*
|
|
670
768
|
* @defaultValue BadgeVariant.neutral
|
|
671
769
|
*/
|
|
@@ -673,14 +771,15 @@ export class BooleanBadgeElementClass extends BaseUiElement {
|
|
|
673
771
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
674
772
|
modifiers;
|
|
675
773
|
/**
|
|
676
|
-
* Constructs a new `
|
|
774
|
+
* Constructs a new `BooleanElementClass` instance.
|
|
677
775
|
*
|
|
678
776
|
* @param value - Boolean state value
|
|
679
|
-
* @param options - Optional component settings. (trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
777
|
+
* @param options - Optional component settings. (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
680
778
|
*/
|
|
681
779
|
constructor(value, options) {
|
|
682
780
|
super();
|
|
683
781
|
this.value = value;
|
|
782
|
+
this.representation = options?.representation ?? BooleanRepresentation.plain;
|
|
684
783
|
this.trueLabel = options?.trueLabel ?? "true";
|
|
685
784
|
this.falseLabel = options?.falseLabel ?? "false";
|
|
686
785
|
this.variant = options?.variant ?? BadgeVariant.neutral;
|
|
@@ -700,12 +799,12 @@ export class TimestampElementClass extends BaseUiElement {
|
|
|
700
799
|
* @defaultValue "timestamp"
|
|
701
800
|
*/
|
|
702
801
|
type = "timestamp";
|
|
703
|
-
/**
|
|
802
|
+
/** The timestamp in milliseconds */
|
|
704
803
|
value;
|
|
705
804
|
/**
|
|
706
805
|
* Presentation date/time format
|
|
707
806
|
*
|
|
708
|
-
* @defaultValue TimestampFormat.
|
|
807
|
+
* @defaultValue TimestampFormat.datetime
|
|
709
808
|
*/
|
|
710
809
|
format;
|
|
711
810
|
/** Optional visual modifiers (copyable, truncate, emphasis, monospace) */
|
|
@@ -713,13 +812,13 @@ export class TimestampElementClass extends BaseUiElement {
|
|
|
713
812
|
/**
|
|
714
813
|
* Constructs a new `TimestampElementClass` instance.
|
|
715
814
|
*
|
|
716
|
-
* @param value -
|
|
717
|
-
* @param options - Optional component settings. (format (defaults to `
|
|
815
|
+
* @param value - The timestamp in milliseconds
|
|
816
|
+
* @param options - Optional component settings. (format (defaults to `datetime`), modifiers).
|
|
718
817
|
*/
|
|
719
818
|
constructor(value, options) {
|
|
720
819
|
super();
|
|
721
820
|
this.value = value;
|
|
722
|
-
this.format = options?.format ?? TimestampFormat.
|
|
821
|
+
this.format = options?.format ?? TimestampFormat.datetime;
|
|
723
822
|
this.modifiers = options?.modifiers;
|
|
724
823
|
}
|
|
725
824
|
}
|
|
@@ -762,31 +861,6 @@ export class ImageReferenceElementClass extends BaseUiElement {
|
|
|
762
861
|
this.placeholder = options?.placeholder;
|
|
763
862
|
}
|
|
764
863
|
}
|
|
765
|
-
/**
|
|
766
|
-
* Class implementation of the `DominantColourSetElement` interface.
|
|
767
|
-
*
|
|
768
|
-
* @remarks
|
|
769
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
770
|
-
*/
|
|
771
|
-
export class DominantColourSetElementClass extends BaseUiElement {
|
|
772
|
-
/**
|
|
773
|
-
* Discriminator identifier for `DominantColourSetElement`.
|
|
774
|
-
*
|
|
775
|
-
* @defaultValue "color-set"
|
|
776
|
-
*/
|
|
777
|
-
type = "color-set";
|
|
778
|
-
/** List of hexadecimal color strings in descending priority */
|
|
779
|
-
colors;
|
|
780
|
-
/**
|
|
781
|
-
* Constructs a new `DominantColourSetElementClass` instance.
|
|
782
|
-
*
|
|
783
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
784
|
-
*/
|
|
785
|
-
constructor(colors) {
|
|
786
|
-
super();
|
|
787
|
-
this.colors = colors ? [...colors] : [];
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
864
|
/**
|
|
791
865
|
* Class implementation of the `ButtonActionElement` interface.
|
|
792
866
|
*
|
|
@@ -938,7 +1012,7 @@ export class SlotClass extends ViewKitNode {
|
|
|
938
1012
|
content;
|
|
939
1013
|
/** Optional slot label (e.g. "Slot A") */
|
|
940
1014
|
label;
|
|
941
|
-
/**
|
|
1015
|
+
/** Width percentage (1-100) */
|
|
942
1016
|
width;
|
|
943
1017
|
/**
|
|
944
1018
|
* Constructs a new `SlotClass` instance.
|
|
@@ -954,45 +1028,70 @@ export class SlotClass extends ViewKitNode {
|
|
|
954
1028
|
}
|
|
955
1029
|
}
|
|
956
1030
|
/**
|
|
957
|
-
* Class implementation of the `
|
|
1031
|
+
* Class implementation of the `MultiSlotElement` interface.
|
|
958
1032
|
*
|
|
959
1033
|
* @remarks
|
|
960
|
-
* Multi-slot horizontal row
|
|
961
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
1034
|
+
* Multi-slot horizontal row layout comprising slots with individual widths.
|
|
962
1035
|
*/
|
|
963
|
-
export class
|
|
1036
|
+
export class MultiSlotElementClass extends BaseUiElement {
|
|
964
1037
|
/**
|
|
965
|
-
* Discriminator identifier for `
|
|
1038
|
+
* Discriminator identifier for `MultiSlotElement`.
|
|
966
1039
|
*
|
|
967
1040
|
* @defaultValue "multi-slot"
|
|
968
1041
|
*/
|
|
969
1042
|
type = "multi-slot";
|
|
970
1043
|
/** List of slots comprising the row */
|
|
971
1044
|
slots;
|
|
972
|
-
/** Proportions descriptor (e.g. "1/3 + 2/3", "equal", "1/4 + 3/4") */
|
|
973
|
-
proportions;
|
|
974
1045
|
/**
|
|
975
|
-
* Constructs a new `
|
|
1046
|
+
* Constructs a new `MultiSlotElementClass` instance.
|
|
976
1047
|
*
|
|
977
1048
|
* @param slots - List of slots comprising the row
|
|
978
|
-
* @param options - Optional component settings. (proportions).
|
|
979
1049
|
*/
|
|
980
|
-
constructor(slots
|
|
1050
|
+
constructor(slots) {
|
|
981
1051
|
super();
|
|
982
1052
|
this.slots = slots ? [...slots] : [];
|
|
983
|
-
this.proportions = options?.proportions;
|
|
984
1053
|
}
|
|
985
1054
|
}
|
|
986
1055
|
/**
|
|
987
|
-
* Class implementation of the `
|
|
1056
|
+
* Class implementation of the `FlowingElement` interface.
|
|
1057
|
+
*
|
|
1058
|
+
* @remarks
|
|
1059
|
+
* Flowing inline layout container with automatic line wrapping.
|
|
1060
|
+
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
1061
|
+
*/
|
|
1062
|
+
export class FlowingElementClass extends BaseUiElement {
|
|
1063
|
+
/**
|
|
1064
|
+
* Discriminator identifier for `FlowingElement`.
|
|
1065
|
+
*
|
|
1066
|
+
* @defaultValue "flowing"
|
|
1067
|
+
*/
|
|
1068
|
+
type = "flowing";
|
|
1069
|
+
/** List of child elements rendered sequentially with line wrapping */
|
|
1070
|
+
elements;
|
|
1071
|
+
/** Optional visual separator rendered between sequential child elements */
|
|
1072
|
+
separator;
|
|
1073
|
+
/**
|
|
1074
|
+
* Constructs a new `FlowingElementClass` instance.
|
|
1075
|
+
*
|
|
1076
|
+
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
1077
|
+
* @param options - Optional component settings. (separator).
|
|
1078
|
+
*/
|
|
1079
|
+
constructor(elements, options) {
|
|
1080
|
+
super();
|
|
1081
|
+
this.elements = elements ? [...elements] : [];
|
|
1082
|
+
this.separator = options?.separator;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Class implementation of the `LabelValueElement` interface.
|
|
988
1087
|
*
|
|
989
1088
|
* @remarks
|
|
990
1089
|
* Standard label and value row.
|
|
991
1090
|
* Displays a muted label on the left and value representation on the right with a vertical dividing line.
|
|
992
1091
|
*/
|
|
993
|
-
export class
|
|
1092
|
+
export class LabelValueElementClass extends BaseUiElement {
|
|
994
1093
|
/**
|
|
995
|
-
* Discriminator identifier for `
|
|
1094
|
+
* Discriminator identifier for `LabelValueElement`.
|
|
996
1095
|
*
|
|
997
1096
|
* @defaultValue "label-value"
|
|
998
1097
|
*/
|
|
@@ -1008,7 +1107,7 @@ export class LabelValueRowElementClass extends BaseUiElement {
|
|
|
1008
1107
|
*/
|
|
1009
1108
|
withDivider;
|
|
1010
1109
|
/**
|
|
1011
|
-
* Constructs a new `
|
|
1110
|
+
* Constructs a new `LabelValueElementClass` instance.
|
|
1012
1111
|
*
|
|
1013
1112
|
* @param label - Key or descriptive label displayed muted on the left
|
|
1014
1113
|
* @param value - Rendered value element on the right
|
|
@@ -1036,18 +1135,25 @@ export class TableColumnClass extends ViewKitNode {
|
|
|
1036
1135
|
* @defaultValue TableColumnAlign.left
|
|
1037
1136
|
*/
|
|
1038
1137
|
align;
|
|
1039
|
-
/**
|
|
1138
|
+
/** Width percentage (1-100) */
|
|
1040
1139
|
width;
|
|
1140
|
+
/**
|
|
1141
|
+
* Sizing mode for the provided width
|
|
1142
|
+
*
|
|
1143
|
+
* @defaultValue TableColumnWidthMode.fixed
|
|
1144
|
+
*/
|
|
1145
|
+
widthMode;
|
|
1041
1146
|
/**
|
|
1042
1147
|
* Constructs a new `TableColumnClass` instance.
|
|
1043
1148
|
*
|
|
1044
|
-
* @param options - Optional component settings. (header, align (defaults to `left`), width).
|
|
1149
|
+
* @param options - Optional component settings. (header, align (defaults to `left`), width, widthMode (defaults to `fixed`)).
|
|
1045
1150
|
*/
|
|
1046
1151
|
constructor(options) {
|
|
1047
1152
|
super();
|
|
1048
1153
|
this.header = options?.header;
|
|
1049
1154
|
this.align = options?.align ?? TableColumnAlign.left;
|
|
1050
1155
|
this.width = options?.width;
|
|
1156
|
+
this.widthMode = options?.widthMode ?? TableColumnWidthMode.fixed;
|
|
1051
1157
|
}
|
|
1052
1158
|
}
|
|
1053
1159
|
/**
|
|
@@ -1085,12 +1191,6 @@ export class TableElementClass extends BaseUiElement {
|
|
|
1085
1191
|
type = "table";
|
|
1086
1192
|
/** Tabular data rows */
|
|
1087
1193
|
rows;
|
|
1088
|
-
/**
|
|
1089
|
-
* Whether to render a column header row
|
|
1090
|
-
*
|
|
1091
|
-
* @defaultValue true
|
|
1092
|
-
*/
|
|
1093
|
-
hasHeader;
|
|
1094
1194
|
/**
|
|
1095
1195
|
* Whether to render alternating row background colors
|
|
1096
1196
|
*
|
|
@@ -1115,12 +1215,11 @@ export class TableElementClass extends BaseUiElement {
|
|
|
1115
1215
|
* Constructs a new `TableElementClass` instance.
|
|
1116
1216
|
*
|
|
1117
1217
|
* @param rows - Tabular data rows
|
|
1118
|
-
* @param options - Optional component settings. (
|
|
1218
|
+
* @param options - Optional component settings. (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
1119
1219
|
*/
|
|
1120
1220
|
constructor(rows, options) {
|
|
1121
1221
|
super();
|
|
1122
1222
|
this.rows = rows ? [...rows] : [];
|
|
1123
|
-
this.hasHeader = options?.hasHeader ?? true;
|
|
1124
1223
|
this.isStriped = options?.isStriped ?? false;
|
|
1125
1224
|
this.withColumnSeparators = options?.withColumnSeparators ?? false;
|
|
1126
1225
|
this.withRowSeparators = options?.withRowSeparators ?? false;
|
|
@@ -1371,31 +1470,32 @@ export class UiContainerBuilder {
|
|
|
1371
1470
|
return this;
|
|
1372
1471
|
}
|
|
1373
1472
|
/**
|
|
1374
|
-
* Appends a `
|
|
1473
|
+
* Appends a `StringElement` component.
|
|
1375
1474
|
*
|
|
1376
1475
|
* @remarks
|
|
1377
|
-
*
|
|
1378
|
-
* Supports plain text
|
|
1476
|
+
* Universal textual string primitive element.
|
|
1477
|
+
* Supports plain text, compact chip pill, or multiline pre-wrapped presentation.
|
|
1379
1478
|
*
|
|
1380
1479
|
* @param value - Text value
|
|
1381
1480
|
* @param options - Optional component settings (representation (defaults to `plain`), modifiers).
|
|
1382
1481
|
* @returns This builder instance for method chaining.
|
|
1383
1482
|
*/
|
|
1384
|
-
|
|
1385
|
-
return this.add(
|
|
1483
|
+
addString(value, options) {
|
|
1484
|
+
return this.add(string(value, options));
|
|
1386
1485
|
}
|
|
1387
1486
|
/**
|
|
1388
|
-
* Appends a `
|
|
1487
|
+
* Appends a `StringsElement` component.
|
|
1389
1488
|
*
|
|
1390
1489
|
* @remarks
|
|
1391
|
-
*
|
|
1490
|
+
* Collection of textual string values rendered as a sequence of inline items or chips.
|
|
1491
|
+
* Supports visual separators (comma, dot, slash, bar, dash, space) and copyable affordance.
|
|
1392
1492
|
*
|
|
1393
|
-
* @param
|
|
1394
|
-
* @param options - Optional component settings (modifiers).
|
|
1493
|
+
* @param values - Array of string values
|
|
1494
|
+
* @param options - Optional component settings (representation (defaults to `plain`), separator, modifiers).
|
|
1395
1495
|
* @returns This builder instance for method chaining.
|
|
1396
1496
|
*/
|
|
1397
|
-
|
|
1398
|
-
return this.add(
|
|
1497
|
+
addStrings(values, options) {
|
|
1498
|
+
return this.add(strings(values, options));
|
|
1399
1499
|
}
|
|
1400
1500
|
/**
|
|
1401
1501
|
* Appends a `StringCodeElement` component.
|
|
@@ -1468,21 +1568,35 @@ export class UiContainerBuilder {
|
|
|
1468
1568
|
* @remarks
|
|
1469
1569
|
* Aspect ratio representation (e.g. "16:9", "4:3", "1:1").
|
|
1470
1570
|
*
|
|
1471
|
-
* @param value - Aspect ratio
|
|
1571
|
+
* @param value - Aspect ratio numerical expression
|
|
1472
1572
|
* @param options - Optional component settings (modifiers).
|
|
1473
1573
|
* @returns This builder instance for method chaining.
|
|
1474
1574
|
*/
|
|
1475
1575
|
addRatio(value, options) {
|
|
1476
1576
|
return this.add(ratio(value, options));
|
|
1477
1577
|
}
|
|
1578
|
+
/**
|
|
1579
|
+
* Appends a `DimensionsElement` component.
|
|
1580
|
+
*
|
|
1581
|
+
* @remarks
|
|
1582
|
+
* Image dimensions representation displaying formatted width and height in pixels.
|
|
1583
|
+
*
|
|
1584
|
+
* @param width - Width in pixels
|
|
1585
|
+
* @param height - Height in pixels
|
|
1586
|
+
* @param options - Optional component settings (modifiers).
|
|
1587
|
+
* @returns This builder instance for method chaining.
|
|
1588
|
+
*/
|
|
1589
|
+
addDimensions(width, height, options) {
|
|
1590
|
+
return this.add(dimensions(width, height, options));
|
|
1591
|
+
}
|
|
1478
1592
|
/**
|
|
1479
1593
|
* Appends a `ColourElement` component.
|
|
1480
1594
|
*
|
|
1481
1595
|
* @remarks
|
|
1482
|
-
* Single color
|
|
1596
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
1483
1597
|
*
|
|
1484
1598
|
* @param value - Hexadecimal color code
|
|
1485
|
-
* @param options - Optional component settings (modifiers).
|
|
1599
|
+
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
1486
1600
|
* @returns This builder instance for method chaining.
|
|
1487
1601
|
*/
|
|
1488
1602
|
addColour(value, options) {
|
|
@@ -1492,14 +1606,14 @@ export class UiContainerBuilder {
|
|
|
1492
1606
|
* Appends a `ColourElement` component.
|
|
1493
1607
|
*
|
|
1494
1608
|
* @remarks
|
|
1495
|
-
* Single color
|
|
1609
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
1496
1610
|
*
|
|
1497
1611
|
* @param value - Hexadecimal color code
|
|
1498
|
-
* @param options - Optional component settings (modifiers).
|
|
1612
|
+
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
1499
1613
|
* @returns This builder instance for method chaining.
|
|
1500
1614
|
*/
|
|
1501
|
-
|
|
1502
|
-
return this.add(
|
|
1615
|
+
addColor(value, options) {
|
|
1616
|
+
return this.add(color(value, options));
|
|
1503
1617
|
}
|
|
1504
1618
|
/**
|
|
1505
1619
|
* Appends a `NumberUnboundedElement` component.
|
|
@@ -1567,30 +1681,18 @@ export class UiContainerBuilder {
|
|
|
1567
1681
|
return this.add(numberMeter(value, options));
|
|
1568
1682
|
}
|
|
1569
1683
|
/**
|
|
1570
|
-
* Appends a `
|
|
1571
|
-
*
|
|
1572
|
-
* @remarks
|
|
1573
|
-
* Plain boolean value representation (textual "true" / "false").
|
|
1574
|
-
*
|
|
1575
|
-
* @param value - Boolean state value
|
|
1576
|
-
* @param options - Optional component settings (modifiers).
|
|
1577
|
-
* @returns This builder instance for method chaining.
|
|
1578
|
-
*/
|
|
1579
|
-
addBooleanPlain(value, options) {
|
|
1580
|
-
return this.add(booleanPlain(value, options));
|
|
1581
|
-
}
|
|
1582
|
-
/**
|
|
1583
|
-
* Appends a `BooleanBadgeElement` component.
|
|
1684
|
+
* Appends a `BooleanElement` component.
|
|
1584
1685
|
*
|
|
1585
1686
|
* @remarks
|
|
1586
|
-
*
|
|
1687
|
+
* Universal boolean primitive element.
|
|
1688
|
+
* Supports standard plain text or badge pill presentation with customizable labels and variants.
|
|
1587
1689
|
*
|
|
1588
1690
|
* @param value - Boolean state value
|
|
1589
|
-
* @param options - Optional component settings (trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
1691
|
+
* @param options - Optional component settings (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
1590
1692
|
* @returns This builder instance for method chaining.
|
|
1591
1693
|
*/
|
|
1592
|
-
|
|
1593
|
-
return this.add(
|
|
1694
|
+
addBoolean(value, options) {
|
|
1695
|
+
return this.add(boolean(value, options));
|
|
1594
1696
|
}
|
|
1595
1697
|
/**
|
|
1596
1698
|
* Appends a `TimestampElement` component.
|
|
@@ -1598,8 +1700,8 @@ export class UiContainerBuilder {
|
|
|
1598
1700
|
* @remarks
|
|
1599
1701
|
* Formatted date and time representation.
|
|
1600
1702
|
*
|
|
1601
|
-
* @param value -
|
|
1602
|
-
* @param options - Optional component settings (format (defaults to `
|
|
1703
|
+
* @param value - The timestamp in milliseconds
|
|
1704
|
+
* @param options - Optional component settings (format (defaults to `datetime`), modifiers).
|
|
1603
1705
|
* @returns This builder instance for method chaining.
|
|
1604
1706
|
*/
|
|
1605
1707
|
addTimestamp(value, options) {
|
|
@@ -1631,30 +1733,6 @@ export class UiContainerBuilder {
|
|
|
1631
1733
|
addImageRef(src, options) {
|
|
1632
1734
|
return this.add(imageRef(src, options));
|
|
1633
1735
|
}
|
|
1634
|
-
/**
|
|
1635
|
-
* Appends a `DominantColourSetElement` component.
|
|
1636
|
-
*
|
|
1637
|
-
* @remarks
|
|
1638
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
1639
|
-
*
|
|
1640
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
1641
|
-
* @returns This builder instance for method chaining.
|
|
1642
|
-
*/
|
|
1643
|
-
addDominantColourSet(colors) {
|
|
1644
|
-
return this.add(dominantColourSet(colors));
|
|
1645
|
-
}
|
|
1646
|
-
/**
|
|
1647
|
-
* Appends a `DominantColourSetElement` component.
|
|
1648
|
-
*
|
|
1649
|
-
* @remarks
|
|
1650
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
1651
|
-
*
|
|
1652
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
1653
|
-
* @returns This builder instance for method chaining.
|
|
1654
|
-
*/
|
|
1655
|
-
addDominantColors(colors) {
|
|
1656
|
-
return this.add(dominantColors(colors));
|
|
1657
|
-
}
|
|
1658
1736
|
/**
|
|
1659
1737
|
* Appends a `MarkdownBlockElement` component.
|
|
1660
1738
|
*
|
|
@@ -1708,50 +1786,33 @@ export class UiContainerBuilder {
|
|
|
1708
1786
|
return this.add(html(content, options));
|
|
1709
1787
|
}
|
|
1710
1788
|
/**
|
|
1711
|
-
* Appends a `
|
|
1789
|
+
* Appends a `MultiSlotElement` component.
|
|
1712
1790
|
*
|
|
1713
1791
|
* @remarks
|
|
1714
|
-
* Multi-slot horizontal row
|
|
1715
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
1792
|
+
* Multi-slot horizontal row layout comprising slots with individual widths.
|
|
1716
1793
|
*
|
|
1717
1794
|
* @param slots - List of slots comprising the row
|
|
1718
|
-
* @param options - Optional component settings (proportions).
|
|
1719
1795
|
* @returns This builder instance for method chaining.
|
|
1720
1796
|
*/
|
|
1721
|
-
|
|
1722
|
-
return this.add(
|
|
1797
|
+
addMultiSlot(slots) {
|
|
1798
|
+
return this.add(multiSlot(slots));
|
|
1723
1799
|
}
|
|
1724
1800
|
/**
|
|
1725
|
-
* Appends a `
|
|
1801
|
+
* Appends a `FlowingElement` component.
|
|
1726
1802
|
*
|
|
1727
1803
|
* @remarks
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1804
|
+
* Flowing inline layout container with automatic line wrapping.
|
|
1805
|
+
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
1730
1806
|
*
|
|
1731
|
-
* @param
|
|
1732
|
-
* @param options - Optional component settings (
|
|
1807
|
+
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
1808
|
+
* @param options - Optional component settings (separator).
|
|
1733
1809
|
* @returns This builder instance for method chaining.
|
|
1734
1810
|
*/
|
|
1735
|
-
|
|
1736
|
-
return this.add(
|
|
1811
|
+
addFlowing(elements, options) {
|
|
1812
|
+
return this.add(flowing(elements, options));
|
|
1737
1813
|
}
|
|
1738
1814
|
/**
|
|
1739
|
-
* Appends a `
|
|
1740
|
-
*
|
|
1741
|
-
* @remarks
|
|
1742
|
-
* Standard label and value row.
|
|
1743
|
-
* Displays a muted label on the left and value representation on the right with a vertical dividing line.
|
|
1744
|
-
*
|
|
1745
|
-
* @param label - Key or descriptive label displayed muted on the left
|
|
1746
|
-
* @param value - Rendered value element on the right
|
|
1747
|
-
* @param options - Optional component settings (withDivider (defaults to `false`)).
|
|
1748
|
-
* @returns This builder instance for method chaining.
|
|
1749
|
-
*/
|
|
1750
|
-
addLabelValueRow(label, value, options) {
|
|
1751
|
-
return this.add(labelValueRow(label, value, options));
|
|
1752
|
-
}
|
|
1753
|
-
/**
|
|
1754
|
-
* Appends a `LabelValueRowElement` component.
|
|
1815
|
+
* Appends a `LabelValueElement` component.
|
|
1755
1816
|
*
|
|
1756
1817
|
* @remarks
|
|
1757
1818
|
* Standard label and value row.
|
|
@@ -1773,7 +1834,7 @@ export class UiContainerBuilder {
|
|
|
1773
1834
|
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
1774
1835
|
*
|
|
1775
1836
|
* @param rows - Tabular data rows
|
|
1776
|
-
* @param options - Optional component settings (
|
|
1837
|
+
* @param options - Optional component settings (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
1777
1838
|
* @returns This builder instance for method chaining.
|
|
1778
1839
|
*/
|
|
1779
1840
|
addTable(rows, options) {
|
|
@@ -1976,31 +2037,32 @@ export class UiCardBuilder {
|
|
|
1976
2037
|
return this;
|
|
1977
2038
|
}
|
|
1978
2039
|
/**
|
|
1979
|
-
* Appends a `
|
|
2040
|
+
* Appends a `StringElement` component.
|
|
1980
2041
|
*
|
|
1981
2042
|
* @remarks
|
|
1982
|
-
*
|
|
1983
|
-
* Supports plain text
|
|
2043
|
+
* Universal textual string primitive element.
|
|
2044
|
+
* Supports plain text, compact chip pill, or multiline pre-wrapped presentation.
|
|
1984
2045
|
*
|
|
1985
2046
|
* @param value - Text value
|
|
1986
2047
|
* @param options - Optional component settings (representation (defaults to `plain`), modifiers).
|
|
1987
2048
|
* @returns This builder instance for method chaining.
|
|
1988
2049
|
*/
|
|
1989
|
-
|
|
1990
|
-
return this.add(
|
|
2050
|
+
addString(value, options) {
|
|
2051
|
+
return this.add(string(value, options));
|
|
1991
2052
|
}
|
|
1992
2053
|
/**
|
|
1993
|
-
* Appends a `
|
|
2054
|
+
* Appends a `StringsElement` component.
|
|
1994
2055
|
*
|
|
1995
2056
|
* @remarks
|
|
1996
|
-
*
|
|
2057
|
+
* Collection of textual string values rendered as a sequence of inline items or chips.
|
|
2058
|
+
* Supports visual separators (comma, dot, slash, bar, dash, space) and copyable affordance.
|
|
1997
2059
|
*
|
|
1998
|
-
* @param
|
|
1999
|
-
* @param options - Optional component settings (modifiers).
|
|
2060
|
+
* @param values - Array of string values
|
|
2061
|
+
* @param options - Optional component settings (representation (defaults to `plain`), separator, modifiers).
|
|
2000
2062
|
* @returns This builder instance for method chaining.
|
|
2001
2063
|
*/
|
|
2002
|
-
|
|
2003
|
-
return this.add(
|
|
2064
|
+
addStrings(values, options) {
|
|
2065
|
+
return this.add(strings(values, options));
|
|
2004
2066
|
}
|
|
2005
2067
|
/**
|
|
2006
2068
|
* Appends a `StringCodeElement` component.
|
|
@@ -2073,21 +2135,35 @@ export class UiCardBuilder {
|
|
|
2073
2135
|
* @remarks
|
|
2074
2136
|
* Aspect ratio representation (e.g. "16:9", "4:3", "1:1").
|
|
2075
2137
|
*
|
|
2076
|
-
* @param value - Aspect ratio
|
|
2138
|
+
* @param value - Aspect ratio numerical expression
|
|
2077
2139
|
* @param options - Optional component settings (modifiers).
|
|
2078
2140
|
* @returns This builder instance for method chaining.
|
|
2079
2141
|
*/
|
|
2080
2142
|
addRatio(value, options) {
|
|
2081
2143
|
return this.add(ratio(value, options));
|
|
2082
2144
|
}
|
|
2145
|
+
/**
|
|
2146
|
+
* Appends a `DimensionsElement` component.
|
|
2147
|
+
*
|
|
2148
|
+
* @remarks
|
|
2149
|
+
* Image dimensions representation displaying formatted width and height in pixels.
|
|
2150
|
+
*
|
|
2151
|
+
* @param width - Width in pixels
|
|
2152
|
+
* @param height - Height in pixels
|
|
2153
|
+
* @param options - Optional component settings (modifiers).
|
|
2154
|
+
* @returns This builder instance for method chaining.
|
|
2155
|
+
*/
|
|
2156
|
+
addDimensions(width, height, options) {
|
|
2157
|
+
return this.add(dimensions(width, height, options));
|
|
2158
|
+
}
|
|
2083
2159
|
/**
|
|
2084
2160
|
* Appends a `ColourElement` component.
|
|
2085
2161
|
*
|
|
2086
2162
|
* @remarks
|
|
2087
|
-
* Single color
|
|
2163
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
2088
2164
|
*
|
|
2089
2165
|
* @param value - Hexadecimal color code
|
|
2090
|
-
* @param options - Optional component settings (modifiers).
|
|
2166
|
+
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2091
2167
|
* @returns This builder instance for method chaining.
|
|
2092
2168
|
*/
|
|
2093
2169
|
addColour(value, options) {
|
|
@@ -2097,14 +2173,14 @@ export class UiCardBuilder {
|
|
|
2097
2173
|
* Appends a `ColourElement` component.
|
|
2098
2174
|
*
|
|
2099
2175
|
* @remarks
|
|
2100
|
-
* Single color
|
|
2176
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
2101
2177
|
*
|
|
2102
2178
|
* @param value - Hexadecimal color code
|
|
2103
|
-
* @param options - Optional component settings (modifiers).
|
|
2179
|
+
* @param options - Optional component settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2104
2180
|
* @returns This builder instance for method chaining.
|
|
2105
2181
|
*/
|
|
2106
|
-
|
|
2107
|
-
return this.add(
|
|
2182
|
+
addColor(value, options) {
|
|
2183
|
+
return this.add(color(value, options));
|
|
2108
2184
|
}
|
|
2109
2185
|
/**
|
|
2110
2186
|
* Appends a `NumberUnboundedElement` component.
|
|
@@ -2172,30 +2248,18 @@ export class UiCardBuilder {
|
|
|
2172
2248
|
return this.add(numberMeter(value, options));
|
|
2173
2249
|
}
|
|
2174
2250
|
/**
|
|
2175
|
-
* Appends a `
|
|
2251
|
+
* Appends a `BooleanElement` component.
|
|
2176
2252
|
*
|
|
2177
2253
|
* @remarks
|
|
2178
|
-
*
|
|
2254
|
+
* Universal boolean primitive element.
|
|
2255
|
+
* Supports standard plain text or badge pill presentation with customizable labels and variants.
|
|
2179
2256
|
*
|
|
2180
2257
|
* @param value - Boolean state value
|
|
2181
|
-
* @param options - Optional component settings (modifiers).
|
|
2182
|
-
* @returns This builder instance for method chaining.
|
|
2183
|
-
*/
|
|
2184
|
-
addBooleanPlain(value, options) {
|
|
2185
|
-
return this.add(booleanPlain(value, options));
|
|
2186
|
-
}
|
|
2187
|
-
/**
|
|
2188
|
-
* Appends a `BooleanBadgeElement` component.
|
|
2189
|
-
*
|
|
2190
|
-
* @remarks
|
|
2191
|
-
* Visual badge pill representation of a boolean state.
|
|
2192
|
-
*
|
|
2193
|
-
* @param value - Boolean state value
|
|
2194
|
-
* @param options - Optional component settings (trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
2258
|
+
* @param options - Optional component settings (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
2195
2259
|
* @returns This builder instance for method chaining.
|
|
2196
2260
|
*/
|
|
2197
|
-
|
|
2198
|
-
return this.add(
|
|
2261
|
+
addBoolean(value, options) {
|
|
2262
|
+
return this.add(boolean(value, options));
|
|
2199
2263
|
}
|
|
2200
2264
|
/**
|
|
2201
2265
|
* Appends a `TimestampElement` component.
|
|
@@ -2203,8 +2267,8 @@ export class UiCardBuilder {
|
|
|
2203
2267
|
* @remarks
|
|
2204
2268
|
* Formatted date and time representation.
|
|
2205
2269
|
*
|
|
2206
|
-
* @param value -
|
|
2207
|
-
* @param options - Optional component settings (format (defaults to `
|
|
2270
|
+
* @param value - The timestamp in milliseconds
|
|
2271
|
+
* @param options - Optional component settings (format (defaults to `datetime`), modifiers).
|
|
2208
2272
|
* @returns This builder instance for method chaining.
|
|
2209
2273
|
*/
|
|
2210
2274
|
addTimestamp(value, options) {
|
|
@@ -2236,30 +2300,6 @@ export class UiCardBuilder {
|
|
|
2236
2300
|
addImageRef(src, options) {
|
|
2237
2301
|
return this.add(imageRef(src, options));
|
|
2238
2302
|
}
|
|
2239
|
-
/**
|
|
2240
|
-
* Appends a `DominantColourSetElement` component.
|
|
2241
|
-
*
|
|
2242
|
-
* @remarks
|
|
2243
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
2244
|
-
*
|
|
2245
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
2246
|
-
* @returns This builder instance for method chaining.
|
|
2247
|
-
*/
|
|
2248
|
-
addDominantColourSet(colors) {
|
|
2249
|
-
return this.add(dominantColourSet(colors));
|
|
2250
|
-
}
|
|
2251
|
-
/**
|
|
2252
|
-
* Appends a `DominantColourSetElement` component.
|
|
2253
|
-
*
|
|
2254
|
-
* @remarks
|
|
2255
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
2256
|
-
*
|
|
2257
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
2258
|
-
* @returns This builder instance for method chaining.
|
|
2259
|
-
*/
|
|
2260
|
-
addDominantColors(colors) {
|
|
2261
|
-
return this.add(dominantColors(colors));
|
|
2262
|
-
}
|
|
2263
2303
|
/**
|
|
2264
2304
|
* Appends a `MarkdownBlockElement` component.
|
|
2265
2305
|
*
|
|
@@ -2313,50 +2353,33 @@ export class UiCardBuilder {
|
|
|
2313
2353
|
return this.add(html(content, options));
|
|
2314
2354
|
}
|
|
2315
2355
|
/**
|
|
2316
|
-
* Appends a `
|
|
2317
|
-
*
|
|
2318
|
-
* @remarks
|
|
2319
|
-
* Multi-slot horizontal row with declared column width proportions.
|
|
2320
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
2321
|
-
*
|
|
2322
|
-
* @param slots - List of slots comprising the row
|
|
2323
|
-
* @param options - Optional component settings (proportions).
|
|
2324
|
-
* @returns This builder instance for method chaining.
|
|
2325
|
-
*/
|
|
2326
|
-
addMultiSlotRow(slots, options) {
|
|
2327
|
-
return this.add(multiSlotRow(slots, options));
|
|
2328
|
-
}
|
|
2329
|
-
/**
|
|
2330
|
-
* Appends a `MultiSlotRowElement` component.
|
|
2356
|
+
* Appends a `MultiSlotElement` component.
|
|
2331
2357
|
*
|
|
2332
2358
|
* @remarks
|
|
2333
|
-
* Multi-slot horizontal row
|
|
2334
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
2359
|
+
* Multi-slot horizontal row layout comprising slots with individual widths.
|
|
2335
2360
|
*
|
|
2336
2361
|
* @param slots - List of slots comprising the row
|
|
2337
|
-
* @param options - Optional component settings (proportions).
|
|
2338
2362
|
* @returns This builder instance for method chaining.
|
|
2339
2363
|
*/
|
|
2340
|
-
addMultiSlot(slots
|
|
2341
|
-
return this.add(multiSlot(slots
|
|
2364
|
+
addMultiSlot(slots) {
|
|
2365
|
+
return this.add(multiSlot(slots));
|
|
2342
2366
|
}
|
|
2343
2367
|
/**
|
|
2344
|
-
* Appends a `
|
|
2368
|
+
* Appends a `FlowingElement` component.
|
|
2345
2369
|
*
|
|
2346
2370
|
* @remarks
|
|
2347
|
-
*
|
|
2348
|
-
*
|
|
2371
|
+
* Flowing inline layout container with automatic line wrapping.
|
|
2372
|
+
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
2349
2373
|
*
|
|
2350
|
-
* @param
|
|
2351
|
-
* @param
|
|
2352
|
-
* @param options - Optional component settings (withDivider (defaults to `false`)).
|
|
2374
|
+
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
2375
|
+
* @param options - Optional component settings (separator).
|
|
2353
2376
|
* @returns This builder instance for method chaining.
|
|
2354
2377
|
*/
|
|
2355
|
-
|
|
2356
|
-
return this.add(
|
|
2378
|
+
addFlowing(elements, options) {
|
|
2379
|
+
return this.add(flowing(elements, options));
|
|
2357
2380
|
}
|
|
2358
2381
|
/**
|
|
2359
|
-
* Appends a `
|
|
2382
|
+
* Appends a `LabelValueElement` component.
|
|
2360
2383
|
*
|
|
2361
2384
|
* @remarks
|
|
2362
2385
|
* Standard label and value row.
|
|
@@ -2378,7 +2401,7 @@ export class UiCardBuilder {
|
|
|
2378
2401
|
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
2379
2402
|
*
|
|
2380
2403
|
* @param rows - Tabular data rows
|
|
2381
|
-
* @param options - Optional component settings (
|
|
2404
|
+
* @param options - Optional component settings (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
2382
2405
|
* @returns This builder instance for method chaining.
|
|
2383
2406
|
*/
|
|
2384
2407
|
addTable(rows, options) {
|
|
@@ -2573,38 +2596,41 @@ export function primitiveModifiers(options) {
|
|
|
2573
2596
|
};
|
|
2574
2597
|
}
|
|
2575
2598
|
/**
|
|
2576
|
-
* Creates a `
|
|
2599
|
+
* Creates a `StringElement` component instance.
|
|
2577
2600
|
*
|
|
2578
2601
|
* @remarks
|
|
2579
|
-
*
|
|
2580
|
-
* Supports plain text
|
|
2602
|
+
* Universal textual string primitive element.
|
|
2603
|
+
* Supports plain text, compact chip pill, or multiline pre-wrapped presentation.
|
|
2581
2604
|
*
|
|
2582
2605
|
* @param value - Text value
|
|
2583
2606
|
* @param options - Optional settings (representation (defaults to `plain`), modifiers).
|
|
2584
|
-
* @returns A strongly-typed `
|
|
2607
|
+
* @returns A strongly-typed `StringElement` object.
|
|
2585
2608
|
*/
|
|
2586
|
-
export function
|
|
2609
|
+
export function string(value, options) {
|
|
2587
2610
|
return {
|
|
2588
|
-
type: "string
|
|
2611
|
+
type: "string",
|
|
2589
2612
|
value,
|
|
2590
|
-
representation: options?.representation ??
|
|
2613
|
+
representation: options?.representation ?? StringRepresentation.plain,
|
|
2591
2614
|
modifiers: options?.modifiers
|
|
2592
2615
|
};
|
|
2593
2616
|
}
|
|
2594
2617
|
/**
|
|
2595
|
-
* Creates a `
|
|
2618
|
+
* Creates a `StringsElement` component instance.
|
|
2596
2619
|
*
|
|
2597
2620
|
* @remarks
|
|
2598
|
-
*
|
|
2621
|
+
* Collection of textual string values rendered as a sequence of inline items or chips.
|
|
2622
|
+
* Supports visual separators (comma, dot, slash, bar, dash, space) and copyable affordance.
|
|
2599
2623
|
*
|
|
2600
|
-
* @param
|
|
2601
|
-
* @param options - Optional settings (modifiers).
|
|
2602
|
-
* @returns A strongly-typed `
|
|
2624
|
+
* @param values - Array of string values
|
|
2625
|
+
* @param options - Optional settings (representation (defaults to `plain`), separator, modifiers).
|
|
2626
|
+
* @returns A strongly-typed `StringsElement` object.
|
|
2603
2627
|
*/
|
|
2604
|
-
export function
|
|
2628
|
+
export function strings(values, options) {
|
|
2605
2629
|
return {
|
|
2606
|
-
type: "
|
|
2607
|
-
|
|
2630
|
+
type: "strings",
|
|
2631
|
+
values: [...values],
|
|
2632
|
+
representation: options?.representation ?? StringRepresentation.plain,
|
|
2633
|
+
separator: options?.separator,
|
|
2608
2634
|
modifiers: options?.modifiers
|
|
2609
2635
|
};
|
|
2610
2636
|
}
|
|
@@ -2701,7 +2727,7 @@ export function identifier(value, options) {
|
|
|
2701
2727
|
* @remarks
|
|
2702
2728
|
* Aspect ratio representation (e.g. "16:9", "4:3", "1:1").
|
|
2703
2729
|
*
|
|
2704
|
-
* @param value - Aspect ratio
|
|
2730
|
+
* @param value - Aspect ratio numerical expression
|
|
2705
2731
|
* @param options - Optional settings (modifiers).
|
|
2706
2732
|
* @returns A strongly-typed `RatioElement` object.
|
|
2707
2733
|
*/
|
|
@@ -2712,20 +2738,43 @@ export function ratio(value, options) {
|
|
|
2712
2738
|
modifiers: options?.modifiers
|
|
2713
2739
|
};
|
|
2714
2740
|
}
|
|
2741
|
+
/**
|
|
2742
|
+
* Creates a `DimensionsElement` component instance.
|
|
2743
|
+
*
|
|
2744
|
+
* @remarks
|
|
2745
|
+
* Image dimensions representation displaying formatted width and height in pixels.
|
|
2746
|
+
*
|
|
2747
|
+
* @param width - Width in pixels
|
|
2748
|
+
* @param height - Height in pixels
|
|
2749
|
+
* @param options - Optional settings (modifiers).
|
|
2750
|
+
* @returns A strongly-typed `DimensionsElement` object.
|
|
2751
|
+
*/
|
|
2752
|
+
export function dimensions(width, height, options) {
|
|
2753
|
+
return {
|
|
2754
|
+
type: "dimensions",
|
|
2755
|
+
width,
|
|
2756
|
+
height,
|
|
2757
|
+
modifiers: options?.modifiers
|
|
2758
|
+
};
|
|
2759
|
+
}
|
|
2715
2760
|
/**
|
|
2716
2761
|
* Creates a `ColourElement` component instance.
|
|
2717
2762
|
*
|
|
2718
2763
|
* @remarks
|
|
2719
|
-
* Single color
|
|
2764
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
2720
2765
|
*
|
|
2721
2766
|
* @param value - Hexadecimal color code
|
|
2722
|
-
* @param options - Optional settings (modifiers).
|
|
2767
|
+
* @param options - Optional settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2723
2768
|
* @returns A strongly-typed `ColourElement` object.
|
|
2724
2769
|
*/
|
|
2725
2770
|
export function colour(value, options) {
|
|
2726
2771
|
return {
|
|
2727
|
-
type: "color
|
|
2772
|
+
type: "color",
|
|
2728
2773
|
value,
|
|
2774
|
+
label: options?.label,
|
|
2775
|
+
showText: options?.showText ?? true,
|
|
2776
|
+
shape: options?.shape ?? Shape.circle,
|
|
2777
|
+
size: options?.size ?? Size.medium,
|
|
2729
2778
|
modifiers: options?.modifiers
|
|
2730
2779
|
};
|
|
2731
2780
|
}
|
|
@@ -2733,16 +2782,20 @@ export function colour(value, options) {
|
|
|
2733
2782
|
* Creates a `ColourElement` component instance.
|
|
2734
2783
|
*
|
|
2735
2784
|
* @remarks
|
|
2736
|
-
* Single color
|
|
2785
|
+
* Single color representation with hex value, shape/size styling, text display toggle, and copy affordance.
|
|
2737
2786
|
*
|
|
2738
2787
|
* @param value - Hexadecimal color code
|
|
2739
|
-
* @param options - Optional settings (modifiers).
|
|
2788
|
+
* @param options - Optional settings (label, showText (defaults to `true`), shape (defaults to `circle`), size (defaults to `medium`), modifiers).
|
|
2740
2789
|
* @returns A strongly-typed `ColourElement` object.
|
|
2741
2790
|
*/
|
|
2742
|
-
export function
|
|
2791
|
+
export function color(value, options) {
|
|
2743
2792
|
return {
|
|
2744
|
-
type: "color
|
|
2793
|
+
type: "color",
|
|
2745
2794
|
value,
|
|
2795
|
+
label: options?.label,
|
|
2796
|
+
showText: options?.showText ?? true,
|
|
2797
|
+
shape: options?.shape ?? Shape.circle,
|
|
2798
|
+
size: options?.size ?? Size.medium,
|
|
2746
2799
|
modifiers: options?.modifiers
|
|
2747
2800
|
};
|
|
2748
2801
|
}
|
|
@@ -2843,36 +2896,21 @@ export function numberMeter(value, options) {
|
|
|
2843
2896
|
};
|
|
2844
2897
|
}
|
|
2845
2898
|
/**
|
|
2846
|
-
* Creates a `
|
|
2899
|
+
* Creates a `BooleanElement` component instance.
|
|
2847
2900
|
*
|
|
2848
2901
|
* @remarks
|
|
2849
|
-
*
|
|
2902
|
+
* Universal boolean primitive element.
|
|
2903
|
+
* Supports standard plain text or badge pill presentation with customizable labels and variants.
|
|
2850
2904
|
*
|
|
2851
2905
|
* @param value - Boolean state value
|
|
2852
|
-
* @param options - Optional settings (modifiers).
|
|
2853
|
-
* @returns A strongly-typed `
|
|
2906
|
+
* @param options - Optional settings (representation (defaults to `plain`), trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
2907
|
+
* @returns A strongly-typed `BooleanElement` object.
|
|
2854
2908
|
*/
|
|
2855
|
-
export function
|
|
2909
|
+
export function boolean(value, options) {
|
|
2856
2910
|
return {
|
|
2857
|
-
type: "boolean
|
|
2858
|
-
value,
|
|
2859
|
-
modifiers: options?.modifiers
|
|
2860
|
-
};
|
|
2861
|
-
}
|
|
2862
|
-
/**
|
|
2863
|
-
* Creates a `BooleanBadgeElement` component instance.
|
|
2864
|
-
*
|
|
2865
|
-
* @remarks
|
|
2866
|
-
* Visual badge pill representation of a boolean state.
|
|
2867
|
-
*
|
|
2868
|
-
* @param value - Boolean state value
|
|
2869
|
-
* @param options - Optional settings (trueLabel (defaults to `true`), falseLabel (defaults to `false`), variant (defaults to `neutral`), modifiers).
|
|
2870
|
-
* @returns A strongly-typed `BooleanBadgeElement` object.
|
|
2871
|
-
*/
|
|
2872
|
-
export function booleanBadge(value, options) {
|
|
2873
|
-
return {
|
|
2874
|
-
type: "boolean-badge",
|
|
2911
|
+
type: "boolean",
|
|
2875
2912
|
value,
|
|
2913
|
+
representation: options?.representation ?? BooleanRepresentation.plain,
|
|
2876
2914
|
trueLabel: options?.trueLabel ?? "true",
|
|
2877
2915
|
falseLabel: options?.falseLabel ?? "false",
|
|
2878
2916
|
variant: options?.variant ?? BadgeVariant.neutral,
|
|
@@ -2885,15 +2923,15 @@ export function booleanBadge(value, options) {
|
|
|
2885
2923
|
* @remarks
|
|
2886
2924
|
* Formatted date and time representation.
|
|
2887
2925
|
*
|
|
2888
|
-
* @param value -
|
|
2889
|
-
* @param options - Optional settings (format (defaults to `
|
|
2926
|
+
* @param value - The timestamp in milliseconds
|
|
2927
|
+
* @param options - Optional settings (format (defaults to `datetime`), modifiers).
|
|
2890
2928
|
* @returns A strongly-typed `TimestampElement` object.
|
|
2891
2929
|
*/
|
|
2892
2930
|
export function timestamp(value, options) {
|
|
2893
2931
|
return {
|
|
2894
2932
|
type: "timestamp",
|
|
2895
2933
|
value,
|
|
2896
|
-
format: options?.format ?? TimestampFormat.
|
|
2934
|
+
format: options?.format ?? TimestampFormat.datetime,
|
|
2897
2935
|
modifiers: options?.modifiers
|
|
2898
2936
|
};
|
|
2899
2937
|
}
|
|
@@ -2935,36 +2973,6 @@ export function imageRef(src, options) {
|
|
|
2935
2973
|
placeholder: options?.placeholder
|
|
2936
2974
|
};
|
|
2937
2975
|
}
|
|
2938
|
-
/**
|
|
2939
|
-
* Creates a `DominantColourSetElement` component instance.
|
|
2940
|
-
*
|
|
2941
|
-
* @remarks
|
|
2942
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
2943
|
-
*
|
|
2944
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
2945
|
-
* @returns A strongly-typed `DominantColourSetElement` object.
|
|
2946
|
-
*/
|
|
2947
|
-
export function dominantColourSet(colors) {
|
|
2948
|
-
return {
|
|
2949
|
-
type: "color-set",
|
|
2950
|
-
colors: [...colors]
|
|
2951
|
-
};
|
|
2952
|
-
}
|
|
2953
|
-
/**
|
|
2954
|
-
* Creates a `DominantColourSetElement` component instance.
|
|
2955
|
-
*
|
|
2956
|
-
* @remarks
|
|
2957
|
-
* Dominant color set palette rendered in descending dominance order.
|
|
2958
|
-
*
|
|
2959
|
-
* @param colors - List of hexadecimal color strings in descending priority
|
|
2960
|
-
* @returns A strongly-typed `DominantColourSetElement` object.
|
|
2961
|
-
*/
|
|
2962
|
-
export function dominantColors(colors) {
|
|
2963
|
-
return {
|
|
2964
|
-
type: "color-set",
|
|
2965
|
-
colors: [...colors]
|
|
2966
|
-
};
|
|
2967
|
-
}
|
|
2968
2976
|
/**
|
|
2969
2977
|
* Creates a `ButtonActionElement` component instance.
|
|
2970
2978
|
*
|
|
@@ -3091,63 +3099,40 @@ export function slot(content, options) {
|
|
|
3091
3099
|
};
|
|
3092
3100
|
}
|
|
3093
3101
|
/**
|
|
3094
|
-
* Creates a `
|
|
3095
|
-
*
|
|
3096
|
-
* @remarks
|
|
3097
|
-
* Multi-slot horizontal row with declared column width proportions.
|
|
3098
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
3099
|
-
*
|
|
3100
|
-
* @param slots - List of slots comprising the row
|
|
3101
|
-
* @param options - Optional settings (proportions).
|
|
3102
|
-
* @returns A strongly-typed `MultiSlotRowElement` object.
|
|
3103
|
-
*/
|
|
3104
|
-
export function multiSlotRow(slots, options) {
|
|
3105
|
-
return {
|
|
3106
|
-
type: "multi-slot",
|
|
3107
|
-
slots: [...slots],
|
|
3108
|
-
proportions: options?.proportions
|
|
3109
|
-
};
|
|
3110
|
-
}
|
|
3111
|
-
/**
|
|
3112
|
-
* Creates a `MultiSlotRowElement` component instance.
|
|
3102
|
+
* Creates a `MultiSlotElement` component instance.
|
|
3113
3103
|
*
|
|
3114
3104
|
* @remarks
|
|
3115
|
-
* Multi-slot horizontal row
|
|
3116
|
-
* Examples: "1/3 + 2/3", "equal thirds", "1/4 + 3/4".
|
|
3105
|
+
* Multi-slot horizontal row layout comprising slots with individual widths.
|
|
3117
3106
|
*
|
|
3118
3107
|
* @param slots - List of slots comprising the row
|
|
3119
|
-
* @
|
|
3120
|
-
* @returns A strongly-typed `MultiSlotRowElement` object.
|
|
3108
|
+
* @returns A strongly-typed `MultiSlotElement` object.
|
|
3121
3109
|
*/
|
|
3122
|
-
export function multiSlot(slots
|
|
3110
|
+
export function multiSlot(slots) {
|
|
3123
3111
|
return {
|
|
3124
3112
|
type: "multi-slot",
|
|
3125
|
-
slots: [...slots]
|
|
3126
|
-
proportions: options?.proportions
|
|
3113
|
+
slots: [...slots]
|
|
3127
3114
|
};
|
|
3128
3115
|
}
|
|
3129
3116
|
/**
|
|
3130
|
-
* Creates a `
|
|
3117
|
+
* Creates a `FlowingElement` component instance.
|
|
3131
3118
|
*
|
|
3132
3119
|
* @remarks
|
|
3133
|
-
*
|
|
3134
|
-
*
|
|
3120
|
+
* Flowing inline layout container with automatic line wrapping.
|
|
3121
|
+
* Renders child elements horizontally in sequence, automatically wrapping to the next line when space runs out.
|
|
3135
3122
|
*
|
|
3136
|
-
* @param
|
|
3137
|
-
* @param
|
|
3138
|
-
* @
|
|
3139
|
-
* @returns A strongly-typed `LabelValueRowElement` object.
|
|
3123
|
+
* @param elements - List of child elements rendered sequentially with line wrapping
|
|
3124
|
+
* @param options - Optional settings (separator).
|
|
3125
|
+
* @returns A strongly-typed `FlowingElement` object.
|
|
3140
3126
|
*/
|
|
3141
|
-
export function
|
|
3127
|
+
export function flowing(elements, options) {
|
|
3142
3128
|
return {
|
|
3143
|
-
type: "
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
withDivider: options?.withDivider ?? false
|
|
3129
|
+
type: "flowing",
|
|
3130
|
+
elements: [...elements],
|
|
3131
|
+
separator: options?.separator
|
|
3147
3132
|
};
|
|
3148
3133
|
}
|
|
3149
3134
|
/**
|
|
3150
|
-
* Creates a `
|
|
3135
|
+
* Creates a `LabelValueElement` component instance.
|
|
3151
3136
|
*
|
|
3152
3137
|
* @remarks
|
|
3153
3138
|
* Standard label and value row.
|
|
@@ -3156,7 +3141,7 @@ export function labelValueRow(label, value, options) {
|
|
|
3156
3141
|
* @param label - Key or descriptive label displayed muted on the left
|
|
3157
3142
|
* @param value - Rendered value element on the right
|
|
3158
3143
|
* @param options - Optional settings (withDivider (defaults to `false`)).
|
|
3159
|
-
* @returns A strongly-typed `
|
|
3144
|
+
* @returns A strongly-typed `LabelValueElement` object.
|
|
3160
3145
|
*/
|
|
3161
3146
|
export function labelValue(label, value, options) {
|
|
3162
3147
|
return {
|
|
@@ -3172,14 +3157,15 @@ export function labelValue(label, value, options) {
|
|
|
3172
3157
|
* @remarks
|
|
3173
3158
|
* Column definition for structured tables.
|
|
3174
3159
|
*
|
|
3175
|
-
* @param options - Optional settings (header, align (defaults to `left`), width).
|
|
3160
|
+
* @param options - Optional settings (header, align (defaults to `left`), width, widthMode (defaults to `fixed`)).
|
|
3176
3161
|
* @returns A strongly-typed `TableColumn` object.
|
|
3177
3162
|
*/
|
|
3178
3163
|
export function tableColumn(options) {
|
|
3179
3164
|
return {
|
|
3180
3165
|
header: options?.header,
|
|
3181
3166
|
align: options?.align ?? TableColumnAlign.left,
|
|
3182
|
-
width: options?.width
|
|
3167
|
+
width: options?.width,
|
|
3168
|
+
widthMode: options?.widthMode ?? TableColumnWidthMode.fixed
|
|
3183
3169
|
};
|
|
3184
3170
|
}
|
|
3185
3171
|
/**
|
|
@@ -3204,14 +3190,13 @@ export function tableRow(cells) {
|
|
|
3204
3190
|
* Supports header/borderless modes, 2-column key-value tables, and 3-column data tables.
|
|
3205
3191
|
*
|
|
3206
3192
|
* @param rows - Tabular data rows
|
|
3207
|
-
* @param options - Optional settings (
|
|
3193
|
+
* @param options - Optional settings (isStriped (defaults to `false`), withColumnSeparators (defaults to `false`), withRowSeparators (defaults to `false`), columns).
|
|
3208
3194
|
* @returns A strongly-typed `TableElement` object.
|
|
3209
3195
|
*/
|
|
3210
3196
|
export function table(rows, options) {
|
|
3211
3197
|
return {
|
|
3212
3198
|
type: "table",
|
|
3213
3199
|
rows: [...rows],
|
|
3214
|
-
hasHeader: options?.hasHeader ?? true,
|
|
3215
3200
|
isStriped: options?.isStriped ?? false,
|
|
3216
3201
|
withColumnSeparators: options?.withColumnSeparators ?? false,
|
|
3217
3202
|
withRowSeparators: options?.withRowSeparators ?? false,
|
|
@@ -3374,7 +3359,7 @@ export function isSlot(value, withDeepValidation = false) {
|
|
|
3374
3359
|
}
|
|
3375
3360
|
const element = value;
|
|
3376
3361
|
return (element.label === undefined || typeof element.label === "string") &&
|
|
3377
|
-
(element.width === undefined || typeof element.width === "
|
|
3362
|
+
(element.width === undefined || typeof element.width === "number") &&
|
|
3378
3363
|
("content" in value && isUiElement(element.content, true));
|
|
3379
3364
|
}
|
|
3380
3365
|
/**
|
|
@@ -3394,7 +3379,8 @@ export function isTableColumn(value, withDeepValidation = false) {
|
|
|
3394
3379
|
const element = value;
|
|
3395
3380
|
return (element.header === undefined || typeof element.header === "string") &&
|
|
3396
3381
|
(element.align === undefined || Object.values(TableColumnAlign).includes(element.align)) &&
|
|
3397
|
-
(element.width === undefined || typeof element.width === "
|
|
3382
|
+
(element.width === undefined || typeof element.width === "number") &&
|
|
3383
|
+
(element.widthMode === undefined || Object.values(TableColumnWidthMode).includes(element.widthMode));
|
|
3398
3384
|
}
|
|
3399
3385
|
/**
|
|
3400
3386
|
* Type guard predicate verifying whether an unknown value conforms to `TableRow`.
|
|
@@ -3465,10 +3451,10 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3465
3451
|
}
|
|
3466
3452
|
const element = value;
|
|
3467
3453
|
switch (element.type) {
|
|
3468
|
-
case "string
|
|
3469
|
-
return
|
|
3470
|
-
case "
|
|
3471
|
-
return
|
|
3454
|
+
case "string":
|
|
3455
|
+
return isStringElement(element, true);
|
|
3456
|
+
case "strings":
|
|
3457
|
+
return isStringsElement(element, true);
|
|
3472
3458
|
case "string-code":
|
|
3473
3459
|
return isStringCodeElement(element, true);
|
|
3474
3460
|
case "xml":
|
|
@@ -3481,7 +3467,9 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3481
3467
|
return isIdentifierElement(element, true);
|
|
3482
3468
|
case "ratio":
|
|
3483
3469
|
return isRatioElement(element, true);
|
|
3484
|
-
case "
|
|
3470
|
+
case "dimensions":
|
|
3471
|
+
return isDimensionsElement(element, true);
|
|
3472
|
+
case "color":
|
|
3485
3473
|
return isColourElement(element, true);
|
|
3486
3474
|
case "number-unbounded":
|
|
3487
3475
|
return isNumberUnboundedElement(element, true);
|
|
@@ -3489,24 +3477,22 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3489
3477
|
return isNumberBoundedStarsElement(element, true);
|
|
3490
3478
|
case "number-meter":
|
|
3491
3479
|
return isNumberBoundedMeterElement(element, true);
|
|
3492
|
-
case "boolean
|
|
3493
|
-
return
|
|
3494
|
-
case "boolean-badge":
|
|
3495
|
-
return isBooleanBadgeElement(element, true);
|
|
3480
|
+
case "boolean":
|
|
3481
|
+
return isBooleanElement(element, true);
|
|
3496
3482
|
case "timestamp":
|
|
3497
3483
|
return isTimestampElement(element, true);
|
|
3498
3484
|
case "image-ref":
|
|
3499
3485
|
return isImageReferenceElement(element, true);
|
|
3500
|
-
case "color-set":
|
|
3501
|
-
return isDominantColourSetElement(element, true);
|
|
3502
3486
|
case "markdown":
|
|
3503
3487
|
return isMarkdownBlockElement(element, true);
|
|
3504
3488
|
case "html":
|
|
3505
3489
|
return isHtmlBlockElement(element, true);
|
|
3506
3490
|
case "multi-slot":
|
|
3507
|
-
return
|
|
3491
|
+
return isMultiSlotElement(element, true);
|
|
3492
|
+
case "flowing":
|
|
3493
|
+
return isFlowingElement(element, true);
|
|
3508
3494
|
case "label-value":
|
|
3509
|
-
return
|
|
3495
|
+
return isLabelValueElement(element, true);
|
|
3510
3496
|
case "table":
|
|
3511
3497
|
return isTableElement(element, true);
|
|
3512
3498
|
case "repeating-group":
|
|
@@ -3520,14 +3506,14 @@ export function isUiElement(value, withDeepValidation = false) {
|
|
|
3520
3506
|
}
|
|
3521
3507
|
}
|
|
3522
3508
|
/**
|
|
3523
|
-
* Type guard predicate narrowing a value to `
|
|
3509
|
+
* Type guard predicate narrowing a value to `StringElement`.
|
|
3524
3510
|
*
|
|
3525
3511
|
* @param value - The value to inspect.
|
|
3526
3512
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3527
|
-
* @returns `true` if the value is a `
|
|
3513
|
+
* @returns `true` if the value is a `StringElement` (type = "string"), otherwise `false`.
|
|
3528
3514
|
*/
|
|
3529
|
-
export function
|
|
3530
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "string
|
|
3515
|
+
export function isStringElement(value, withDeepValidation = false) {
|
|
3516
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "string") {
|
|
3531
3517
|
return false;
|
|
3532
3518
|
}
|
|
3533
3519
|
if (!withDeepValidation) {
|
|
@@ -3535,25 +3521,27 @@ export function isStringShortElement(value, withDeepValidation = false) {
|
|
|
3535
3521
|
}
|
|
3536
3522
|
const element = value;
|
|
3537
3523
|
return ("value" in value && typeof element.value === "string") &&
|
|
3538
|
-
(element.representation === undefined || Object.values(
|
|
3524
|
+
(element.representation === undefined || Object.values(StringRepresentation).includes(element.representation)) &&
|
|
3539
3525
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3540
3526
|
}
|
|
3541
3527
|
/**
|
|
3542
|
-
* Type guard predicate narrowing a value to `
|
|
3528
|
+
* Type guard predicate narrowing a value to `StringsElement`.
|
|
3543
3529
|
*
|
|
3544
3530
|
* @param value - The value to inspect.
|
|
3545
3531
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3546
|
-
* @returns `true` if the value is a `
|
|
3532
|
+
* @returns `true` if the value is a `StringsElement` (type = "strings"), otherwise `false`.
|
|
3547
3533
|
*/
|
|
3548
|
-
export function
|
|
3549
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "
|
|
3534
|
+
export function isStringsElement(value, withDeepValidation = false) {
|
|
3535
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "strings") {
|
|
3550
3536
|
return false;
|
|
3551
3537
|
}
|
|
3552
3538
|
if (!withDeepValidation) {
|
|
3553
3539
|
return true;
|
|
3554
3540
|
}
|
|
3555
3541
|
const element = value;
|
|
3556
|
-
return ("
|
|
3542
|
+
return ("values" in value && (Array.isArray(element.values) && element.values.every((item) => typeof item === "string"))) &&
|
|
3543
|
+
(element.representation === undefined || Object.values(StringRepresentation).includes(element.representation)) &&
|
|
3544
|
+
(element.separator === undefined || Object.values(Separator).includes(element.separator)) &&
|
|
3557
3545
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3558
3546
|
}
|
|
3559
3547
|
/**
|
|
@@ -3663,18 +3651,37 @@ export function isRatioElement(value, withDeepValidation = false) {
|
|
|
3663
3651
|
return true;
|
|
3664
3652
|
}
|
|
3665
3653
|
const element = value;
|
|
3666
|
-
return ("value" in value && typeof element.value === "
|
|
3654
|
+
return ("value" in value && typeof element.value === "number") &&
|
|
3667
3655
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3668
3656
|
}
|
|
3657
|
+
/**
|
|
3658
|
+
* Type guard predicate narrowing a value to `DimensionsElement`.
|
|
3659
|
+
*
|
|
3660
|
+
* @param value - The value to inspect.
|
|
3661
|
+
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3662
|
+
* @returns `true` if the value is a `DimensionsElement` (type = "dimensions"), otherwise `false`.
|
|
3663
|
+
*/
|
|
3664
|
+
export function isDimensionsElement(value, withDeepValidation = false) {
|
|
3665
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "dimensions") {
|
|
3666
|
+
return false;
|
|
3667
|
+
}
|
|
3668
|
+
if (!withDeepValidation) {
|
|
3669
|
+
return true;
|
|
3670
|
+
}
|
|
3671
|
+
const element = value;
|
|
3672
|
+
return ("width" in value && typeof element.width === "number") &&
|
|
3673
|
+
("height" in value && typeof element.height === "number") &&
|
|
3674
|
+
(element.modifiers === undefined || isBaseModifiers(element.modifiers, true));
|
|
3675
|
+
}
|
|
3669
3676
|
/**
|
|
3670
3677
|
* Type guard predicate narrowing a value to `ColourElement`.
|
|
3671
3678
|
*
|
|
3672
3679
|
* @param value - The value to inspect.
|
|
3673
3680
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3674
|
-
* @returns `true` if the value is a `ColourElement` (type = "color
|
|
3681
|
+
* @returns `true` if the value is a `ColourElement` (type = "color"), otherwise `false`.
|
|
3675
3682
|
*/
|
|
3676
3683
|
export function isColourElement(value, withDeepValidation = false) {
|
|
3677
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "color
|
|
3684
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "color") {
|
|
3678
3685
|
return false;
|
|
3679
3686
|
}
|
|
3680
3687
|
if (!withDeepValidation) {
|
|
@@ -3682,6 +3689,10 @@ export function isColourElement(value, withDeepValidation = false) {
|
|
|
3682
3689
|
}
|
|
3683
3690
|
const element = value;
|
|
3684
3691
|
return ("value" in value && typeof element.value === "string") &&
|
|
3692
|
+
(element.label === undefined || typeof element.label === "string") &&
|
|
3693
|
+
(element.showText === undefined || typeof element.showText === "boolean") &&
|
|
3694
|
+
(element.shape === undefined || Object.values(Shape).includes(element.shape)) &&
|
|
3695
|
+
(element.size === undefined || Object.values(Size).includes(element.size)) &&
|
|
3685
3696
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3686
3697
|
}
|
|
3687
3698
|
/**
|
|
@@ -3745,32 +3756,14 @@ export function isNumberBoundedMeterElement(value, withDeepValidation = false) {
|
|
|
3745
3756
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3746
3757
|
}
|
|
3747
3758
|
/**
|
|
3748
|
-
* Type guard predicate narrowing a value to `
|
|
3759
|
+
* Type guard predicate narrowing a value to `BooleanElement`.
|
|
3749
3760
|
*
|
|
3750
3761
|
* @param value - The value to inspect.
|
|
3751
3762
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3752
|
-
* @returns `true` if the value is a `
|
|
3763
|
+
* @returns `true` if the value is a `BooleanElement` (type = "boolean"), otherwise `false`.
|
|
3753
3764
|
*/
|
|
3754
|
-
export function
|
|
3755
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "boolean
|
|
3756
|
-
return false;
|
|
3757
|
-
}
|
|
3758
|
-
if (!withDeepValidation) {
|
|
3759
|
-
return true;
|
|
3760
|
-
}
|
|
3761
|
-
const element = value;
|
|
3762
|
-
return ("value" in value && typeof element.value === "boolean") &&
|
|
3763
|
-
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3764
|
-
}
|
|
3765
|
-
/**
|
|
3766
|
-
* Type guard predicate narrowing a value to `BooleanBadgeElement`.
|
|
3767
|
-
*
|
|
3768
|
-
* @param value - The value to inspect.
|
|
3769
|
-
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3770
|
-
* @returns `true` if the value is a `BooleanBadgeElement` (type = "boolean-badge"), otherwise `false`.
|
|
3771
|
-
*/
|
|
3772
|
-
export function isBooleanBadgeElement(value, withDeepValidation = false) {
|
|
3773
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "boolean-badge") {
|
|
3765
|
+
export function isBooleanElement(value, withDeepValidation = false) {
|
|
3766
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "boolean") {
|
|
3774
3767
|
return false;
|
|
3775
3768
|
}
|
|
3776
3769
|
if (!withDeepValidation) {
|
|
@@ -3778,6 +3771,7 @@ export function isBooleanBadgeElement(value, withDeepValidation = false) {
|
|
|
3778
3771
|
}
|
|
3779
3772
|
const element = value;
|
|
3780
3773
|
return ("value" in value && typeof element.value === "boolean") &&
|
|
3774
|
+
(element.representation === undefined || Object.values(BooleanRepresentation).includes(element.representation)) &&
|
|
3781
3775
|
(element.trueLabel === undefined || typeof element.trueLabel === "string") &&
|
|
3782
3776
|
(element.falseLabel === undefined || typeof element.falseLabel === "string") &&
|
|
3783
3777
|
(element.variant === undefined || Object.values(BadgeVariant).includes(element.variant)) &&
|
|
@@ -3798,7 +3792,7 @@ export function isTimestampElement(value, withDeepValidation = false) {
|
|
|
3798
3792
|
return true;
|
|
3799
3793
|
}
|
|
3800
3794
|
const element = value;
|
|
3801
|
-
return ("value" in value && typeof element.value === "
|
|
3795
|
+
return ("value" in value && typeof element.value === "number") &&
|
|
3802
3796
|
(element.format === undefined || Object.values(TimestampFormat).includes(element.format)) &&
|
|
3803
3797
|
(element.modifiers === undefined || isPrimitiveModifiers(element.modifiers, true));
|
|
3804
3798
|
}
|
|
@@ -3823,31 +3817,32 @@ export function isImageReferenceElement(value, withDeepValidation = false) {
|
|
|
3823
3817
|
(element.placeholder === undefined || typeof element.placeholder === "string");
|
|
3824
3818
|
}
|
|
3825
3819
|
/**
|
|
3826
|
-
* Type guard predicate narrowing a value to `
|
|
3820
|
+
* Type guard predicate narrowing a value to `MarkdownBlockElement`.
|
|
3827
3821
|
*
|
|
3828
3822
|
* @param value - The value to inspect.
|
|
3829
3823
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3830
|
-
* @returns `true` if the value is a `
|
|
3824
|
+
* @returns `true` if the value is a `MarkdownBlockElement` (type = "markdown"), otherwise `false`.
|
|
3831
3825
|
*/
|
|
3832
|
-
export function
|
|
3833
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "
|
|
3826
|
+
export function isMarkdownBlockElement(value, withDeepValidation = false) {
|
|
3827
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "markdown") {
|
|
3834
3828
|
return false;
|
|
3835
3829
|
}
|
|
3836
3830
|
if (!withDeepValidation) {
|
|
3837
3831
|
return true;
|
|
3838
3832
|
}
|
|
3839
3833
|
const element = value;
|
|
3840
|
-
return ("
|
|
3834
|
+
return ("content" in value && typeof element.content === "string") &&
|
|
3835
|
+
(element.modifiers === undefined || isBaseModifiers(element.modifiers, true));
|
|
3841
3836
|
}
|
|
3842
3837
|
/**
|
|
3843
|
-
* Type guard predicate narrowing a value to `
|
|
3838
|
+
* Type guard predicate narrowing a value to `HtmlBlockElement`.
|
|
3844
3839
|
*
|
|
3845
3840
|
* @param value - The value to inspect.
|
|
3846
3841
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3847
|
-
* @returns `true` if the value is a `
|
|
3842
|
+
* @returns `true` if the value is a `HtmlBlockElement` (type = "html"), otherwise `false`.
|
|
3848
3843
|
*/
|
|
3849
|
-
export function
|
|
3850
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "
|
|
3844
|
+
export function isHtmlBlockElement(value, withDeepValidation = false) {
|
|
3845
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "html") {
|
|
3851
3846
|
return false;
|
|
3852
3847
|
}
|
|
3853
3848
|
if (!withDeepValidation) {
|
|
@@ -3858,49 +3853,48 @@ export function isMarkdownBlockElement(value, withDeepValidation = false) {
|
|
|
3858
3853
|
(element.modifiers === undefined || isBaseModifiers(element.modifiers, true));
|
|
3859
3854
|
}
|
|
3860
3855
|
/**
|
|
3861
|
-
* Type guard predicate narrowing a value to `
|
|
3856
|
+
* Type guard predicate narrowing a value to `MultiSlotElement`.
|
|
3862
3857
|
*
|
|
3863
3858
|
* @param value - The value to inspect.
|
|
3864
3859
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3865
|
-
* @returns `true` if the value is a `
|
|
3860
|
+
* @returns `true` if the value is a `MultiSlotElement` (type = "multi-slot"), otherwise `false`.
|
|
3866
3861
|
*/
|
|
3867
|
-
export function
|
|
3868
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "
|
|
3862
|
+
export function isMultiSlotElement(value, withDeepValidation = false) {
|
|
3863
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "multi-slot") {
|
|
3869
3864
|
return false;
|
|
3870
3865
|
}
|
|
3871
3866
|
if (!withDeepValidation) {
|
|
3872
3867
|
return true;
|
|
3873
3868
|
}
|
|
3874
3869
|
const element = value;
|
|
3875
|
-
return ("
|
|
3876
|
-
(element.modifiers === undefined || isBaseModifiers(element.modifiers, true));
|
|
3870
|
+
return ("slots" in value && (Array.isArray(element.slots) && element.slots.every((item) => isSlot(item, true))));
|
|
3877
3871
|
}
|
|
3878
3872
|
/**
|
|
3879
|
-
* Type guard predicate narrowing a value to `
|
|
3873
|
+
* Type guard predicate narrowing a value to `FlowingElement`.
|
|
3880
3874
|
*
|
|
3881
3875
|
* @param value - The value to inspect.
|
|
3882
3876
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3883
|
-
* @returns `true` if the value is a `
|
|
3877
|
+
* @returns `true` if the value is a `FlowingElement` (type = "flowing"), otherwise `false`.
|
|
3884
3878
|
*/
|
|
3885
|
-
export function
|
|
3886
|
-
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "
|
|
3879
|
+
export function isFlowingElement(value, withDeepValidation = false) {
|
|
3880
|
+
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "flowing") {
|
|
3887
3881
|
return false;
|
|
3888
3882
|
}
|
|
3889
3883
|
if (!withDeepValidation) {
|
|
3890
3884
|
return true;
|
|
3891
3885
|
}
|
|
3892
3886
|
const element = value;
|
|
3893
|
-
return (element.
|
|
3894
|
-
("
|
|
3887
|
+
return (element.separator === undefined || Object.values(Separator).includes(element.separator)) &&
|
|
3888
|
+
("elements" in value && (Array.isArray(element.elements) && element.elements.every((item) => isUiElement(item, true))));
|
|
3895
3889
|
}
|
|
3896
3890
|
/**
|
|
3897
|
-
* Type guard predicate narrowing a value to `
|
|
3891
|
+
* Type guard predicate narrowing a value to `LabelValueElement`.
|
|
3898
3892
|
*
|
|
3899
3893
|
* @param value - The value to inspect.
|
|
3900
3894
|
* @param withDeepValidation - Whether to recursively validate all properties.
|
|
3901
|
-
* @returns `true` if the value is a `
|
|
3895
|
+
* @returns `true` if the value is a `LabelValueElement` (type = "label-value"), otherwise `false`.
|
|
3902
3896
|
*/
|
|
3903
|
-
export function
|
|
3897
|
+
export function isLabelValueElement(value, withDeepValidation = false) {
|
|
3904
3898
|
if (typeof value !== "object" || value === null || !("type" in value) || value.type !== "label-value") {
|
|
3905
3899
|
return false;
|
|
3906
3900
|
}
|
|
@@ -3927,8 +3921,7 @@ export function isTableElement(value, withDeepValidation = false) {
|
|
|
3927
3921
|
return true;
|
|
3928
3922
|
}
|
|
3929
3923
|
const element = value;
|
|
3930
|
-
return (element.
|
|
3931
|
-
(element.isStriped === undefined || typeof element.isStriped === "boolean") &&
|
|
3924
|
+
return (element.isStriped === undefined || typeof element.isStriped === "boolean") &&
|
|
3932
3925
|
(element.withColumnSeparators === undefined || typeof element.withColumnSeparators === "boolean") &&
|
|
3933
3926
|
(element.withRowSeparators === undefined || typeof element.withRowSeparators === "boolean") &&
|
|
3934
3927
|
(element.columns === undefined || (Array.isArray(element.columns) && element.columns.every((item) => isTableColumn(item, true)))) &&
|