@openmfp/ngx 0.13.1 → 0.14.1
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/fesm2022/openmfp-ngx.mjs +40 -30
- package/fesm2022/openmfp-ngx.mjs.map +1 -1
- package/package.json +1 -1
- package/types/openmfp-ngx.d.ts +17 -4
package/package.json
CHANGED
package/types/openmfp-ngx.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ interface UiSettings {
|
|
|
49
49
|
cssCustomization?: Partial<CSSStyleDeclaration>;
|
|
50
50
|
/** Conditional CSS rules evaluated against the cell value at render time. */
|
|
51
51
|
cssRules?: CssRule[];
|
|
52
|
+
/** Conditional value rules evaluated at render time. First match replaces the displayed value; raw value shown when none match. */
|
|
53
|
+
valueRules?: ValueRule[];
|
|
52
54
|
/** Fixed column width including unit (e.g. `'200px'`, `'20%'`). */
|
|
53
55
|
columnWidth?: string;
|
|
54
56
|
align?: 'start' | 'center' | 'end';
|
|
@@ -83,18 +85,28 @@ interface ModalSettings {
|
|
|
83
85
|
/** Explicit height override. */
|
|
84
86
|
height?: string;
|
|
85
87
|
}
|
|
86
|
-
/** Comparison operator used in
|
|
87
|
-
type
|
|
88
|
+
/** Comparison operator used in conditional CSS and value rules. */
|
|
89
|
+
type RuleCondition = 'equals' | 'notEquals' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual' | 'contains';
|
|
88
90
|
/** Conditional CSS rule: applies `styles` to the cell when `if` evaluates to `true`. */
|
|
89
91
|
interface CssRule {
|
|
90
92
|
/** Condition evaluated against the cell's string value. */
|
|
91
93
|
if: {
|
|
92
|
-
condition:
|
|
94
|
+
condition: RuleCondition;
|
|
93
95
|
value: string;
|
|
94
96
|
};
|
|
95
97
|
/** CSS properties applied when the condition is met. */
|
|
96
98
|
styles: Partial<CSSStyleDeclaration>;
|
|
97
99
|
}
|
|
100
|
+
/** Conditional value rule: when `if` evaluates to `true`, the cell renders `then` instead of the raw value. First match wins. */
|
|
101
|
+
interface ValueRule {
|
|
102
|
+
/** Condition evaluated against the cell's string value. */
|
|
103
|
+
if: {
|
|
104
|
+
condition: RuleCondition;
|
|
105
|
+
value: string;
|
|
106
|
+
};
|
|
107
|
+
/** Display string used when the condition is met. */
|
|
108
|
+
then: string;
|
|
109
|
+
}
|
|
98
110
|
/** Event payload emitted when a button inside a table cell is clicked. */
|
|
99
111
|
interface ResourceFieldButtonClickEvent<T extends GenericResource> {
|
|
100
112
|
/** Original DOM click event. */
|
|
@@ -1146,6 +1158,7 @@ declare class ResourceField<T extends GenericResource, F extends FieldDefinition
|
|
|
1146
1158
|
setProperty?: ((property: string, value: string | null, priority?: string) => void) | undefined;
|
|
1147
1159
|
[Symbol.iterator]?: (() => ArrayIterator<string>) | undefined;
|
|
1148
1160
|
}>;
|
|
1161
|
+
displayValue: _angular_core.Signal<string>;
|
|
1149
1162
|
isBoolLike: _angular_core.Signal<boolean>;
|
|
1150
1163
|
isUrlValue: _angular_core.Signal<boolean>;
|
|
1151
1164
|
testId: _angular_core.Signal<string>;
|
|
@@ -1257,4 +1270,4 @@ declare class WhatsNew {
|
|
|
1257
1270
|
}
|
|
1258
1271
|
|
|
1259
1272
|
export { BooleanValue, CARD_TYPES, Dashboard, DeclarativeForm, DeclarativeTable, DeclarativeTableCard, Favorites, LinkValue, ResourceField, SecretValue, ServiceStatusCard, TagListValue, VisitedServiceCard, WhatsNew };
|
|
1260
|
-
export type { ButtonSettings, CardConfig, CardsType, CssRule,
|
|
1273
|
+
export type { ButtonSettings, CardConfig, CardsType, CssRule, DashboardButtonsSettings, DashboardConfig, DeleteResourceConfirmationConfig, FieldDefinition, FormFieldChangeEvent, FormFieldDefinition, FormFieldErrors, GenericResource, IconDesignType, ModalSettings, PropertyField, ResourceFieldButtonClickEvent, ResourceFormConfig, RuleCondition, SectionConfig, ServiceStatusItem, ServiceStatusValue, TableCardButtonSettings, TableCardConfig, TableCardFormState, TableConfig, TableFieldDefinition, TransformType, UiSettings, ValueRule };
|