@masterteam/components 0.0.274 → 0.0.276
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/assets/common.css +1 -1
- package/fesm2022/masterteam-components-entities.mjs +19 -7
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +18 -2
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-entities.d.ts +13 -3
- package/types/masterteam-components-table.d.ts +19 -0
package/package.json
CHANGED
|
@@ -180,6 +180,10 @@ interface EntitySectionConfig extends EntityBaseConfig {
|
|
|
180
180
|
label?: EntitySectionLabel;
|
|
181
181
|
}
|
|
182
182
|
type EntityConfiguration = EntityBaseConfig | EntityUserConfig | EntityPercentageConfig | EntityLeafDetailsConfig | EntityConnectionConfig | EntitySectionConfig;
|
|
183
|
+
/** Value shape for a translatable Text/LongText property: `{ display, ar?, en? }`. */
|
|
184
|
+
interface EntityTranslatableTextValue extends EntitySectionLabel {
|
|
185
|
+
display: string;
|
|
186
|
+
}
|
|
183
187
|
interface EntityStatusValue {
|
|
184
188
|
key: string;
|
|
185
189
|
display: string;
|
|
@@ -370,7 +374,7 @@ interface EntityData {
|
|
|
370
374
|
* props have no label and no view type to render with.
|
|
371
375
|
*/
|
|
372
376
|
nestedProperties?: EntityNestedPropertyMeta[];
|
|
373
|
-
value: string | EntityStatusValue | EntityUserValue | EntityMultiUserValue | EntityLookupValue | EntityMultiLookupValue | EntityPhaseGateValue | EntityAttachmentValue | EntityLocationValue | EntityConnectionValue | EntityScheduleItemValue[] | EntityLookupCheckListValue | EntityLookupCheckListItem[] | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
|
|
377
|
+
value: string | EntityTranslatableTextValue | EntityStatusValue | EntityUserValue | EntityMultiUserValue | EntityLookupValue | EntityMultiLookupValue | EntityPhaseGateValue | EntityAttachmentValue | EntityLocationValue | EntityConnectionValue | EntityScheduleItemValue[] | EntityLookupCheckListValue | EntityLookupCheckListItem[] | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
|
|
374
378
|
viewType: EntityViewType;
|
|
375
379
|
type?: string;
|
|
376
380
|
configuration?: EntityConfiguration;
|
|
@@ -396,6 +400,12 @@ declare function isValueMissing(value: unknown): boolean;
|
|
|
396
400
|
*/
|
|
397
401
|
declare function serializeEntityRawValue(raw: unknown): string | undefined;
|
|
398
402
|
declare function displayOrPlaceholder(value: unknown): string;
|
|
403
|
+
/**
|
|
404
|
+
* Text/LongText values are a plain string, except for translatable
|
|
405
|
+
* properties, where the backend sends `{ display, ar?, en? }` instead.
|
|
406
|
+
* Unwraps either shape to the string to render.
|
|
407
|
+
*/
|
|
408
|
+
declare function extractDisplayText(value: unknown): string | null;
|
|
399
409
|
declare function isEntityLabelHidden(configuration?: EntityConfiguration | null): boolean;
|
|
400
410
|
declare function isEntityAlignEnd(configuration?: EntityConfiguration | null): boolean;
|
|
401
411
|
/**
|
|
@@ -1261,5 +1271,5 @@ declare class FitText {
|
|
|
1261
1271
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FitText, "[mtFitText]", never, { "mtFitText": { "alias": "mtFitText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1262
1272
|
}
|
|
1263
1273
|
|
|
1264
|
-
export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, getEntitySectionTitle, groupEntitiesIntoSections, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, resolveConnectionLevelName, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, splitConnectionKey };
|
|
1265
|
-
export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|
|
1274
|
+
export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, resolveConnectionLevelName, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, splitConnectionKey };
|
|
1275
|
+
export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityTranslatableTextValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|
|
@@ -163,6 +163,14 @@ interface ColumnDef {
|
|
|
163
163
|
*/
|
|
164
164
|
shrink?: boolean;
|
|
165
165
|
filterOnly?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Opts the column out of the filter UI entirely, whatever its type would
|
|
168
|
+
* otherwise allow. Use it on lazy tables whose backend has no query
|
|
169
|
+
* parameter for the column: lazy mode never filters locally, so a filter the
|
|
170
|
+
* host cannot translate into a backend parameter renders a control that
|
|
171
|
+
* silently does nothing. Defaults to filterable.
|
|
172
|
+
*/
|
|
173
|
+
filterable?: boolean;
|
|
166
174
|
/**
|
|
167
175
|
* Opts a `custom` column into export/print. Custom columns are excluded by
|
|
168
176
|
* default because their template may render purely visual content with no
|
|
@@ -621,6 +629,17 @@ declare class TableValueResolver {
|
|
|
621
629
|
*/
|
|
622
630
|
static matchesSearchTerm(value: unknown, searchTerm: string, depth?: number): boolean;
|
|
623
631
|
static getColumnFilterType(column: ColumnDef, row?: Record<string, unknown>): FilterConfig['type'] | null;
|
|
632
|
+
/**
|
|
633
|
+
* Whether the filter UI should offer a control for this column.
|
|
634
|
+
*
|
|
635
|
+
* Deliberately separate from {@link getColumnFilterType}, which also drives
|
|
636
|
+
* export, sort and grouping resolution — opting a column out of the filter
|
|
637
|
+
* panel must not change how its value is exported. Hosts opt out with
|
|
638
|
+
* `filterable: false`, most usefully on lazy tables: those never filter
|
|
639
|
+
* locally, so a filter the host cannot map onto a backend query parameter
|
|
640
|
+
* would render a control that does nothing at all.
|
|
641
|
+
*/
|
|
642
|
+
static isColumnFilterable(column: ColumnDef, row?: Record<string, unknown>): boolean;
|
|
624
643
|
/**
|
|
625
644
|
* Returns a column with its filterConfig normalized for rendering:
|
|
626
645
|
* - `type` is resolved via `getColumnFilterType`
|