@stonecrop/aform 0.21.0 → 0.23.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/aform.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import ABadge from './components/form/ABadge.vue';
1
2
  import ACheckbox from './components/form/ACheckbox.vue';
2
3
  import ACurrencyInput from './components/form/ACurrencyInput.vue';
3
4
  import ADate from './components/form/ADate.vue';
@@ -5,6 +6,7 @@ import ADatePicker from './components/form/ADatePicker.vue';
5
6
  import ADateRange from './components/form/ADateRange.vue';
6
7
  import ADateSelection from './components/form/ADateSelection.vue';
7
8
  import ADateTime from './components/form/ADateTime.vue';
9
+ import ADateTimeInput from './components/form/ADateTimeInput.vue';
8
10
  import ADropdown from './components/form/ADropdown.vue';
9
11
  import ADuration from './components/form/ADuration.vue';
10
12
  import AFieldset from './components/form/AFieldset.vue';
@@ -17,13 +19,17 @@ import type { App } from 'vue';
17
19
  import AQuantityInput from './components/form/AQuantityInput.vue';
18
20
  import ATextboxInput from './components/form/ATextboxInput.vue';
19
21
  import ATextInput from './components/form/ATextInput.vue';
22
+ import type { BadgeDescriptor } from '@stonecrop/schema';
20
23
  import type { ColumnSchema } from '@stonecrop/schema';
24
+ import type { FieldOptions } from '@stonecrop/schema';
21
25
  import type { FieldValidation } from '@stonecrop/schema';
22
26
  import { InteractionMode } from '@stonecrop/schema';
23
27
  import Login from './components/utilities/Login.vue';
24
28
  import type { TableViewConfig } from '@stonecrop/schema';
25
29
  import type { ValueField } from '@stonecrop/schema';
26
30
 
31
+ export { ABadge }
32
+
27
33
  export { ACheckbox }
28
34
 
29
35
  export { ACurrencyInput }
@@ -38,6 +44,8 @@ export { ADateSelection }
38
44
 
39
45
  export { ADateTime }
40
46
 
47
+ export { ADateTimeInput }
48
+
41
49
  export { ADropdown }
42
50
 
43
51
  export { ADuration }
@@ -95,6 +103,27 @@ export { ATextboxInput }
95
103
 
96
104
  export { ATextInput }
97
105
 
106
+ /**
107
+ * Row context passed to badge `format` functions in form fields.
108
+ * @public
109
+ */
110
+ export declare type BadgeFormatContext = {
111
+ record?: Record<string, unknown>;
112
+ row?: Record<string, unknown>;
113
+ };
114
+
115
+ /**
116
+ * Badge-aware field `format` function signature.
117
+ * @public
118
+ */
119
+ export declare type BadgeFormatFn = (value: unknown, context: BadgeFormatContext) => string | BadgeDescriptor;
120
+
121
+ /**
122
+ * CSS custom properties for input-accent styling on a native input.
123
+ * @public
124
+ */
125
+ export declare function badgeInputAccentStyle(descriptor: BadgeDescriptor | undefined): Record<string, string> | undefined;
126
+
98
127
  /**
99
128
  * Defined props for AForm components
100
129
  * @public
@@ -366,6 +395,12 @@ export declare interface ResolvedTable {
366
395
  validation?: FieldValidation;
367
396
  }
368
397
 
398
+ /**
399
+ * Resolve a field value to a badge descriptor using format (if present) then options map.
400
+ * @public
401
+ */
402
+ export declare function resolveFieldBadge(value: unknown, options: FieldOptions | undefined, format: string | BadgeFormatFn | undefined, context?: BadgeFormatContext): BadgeDescriptor | undefined;
403
+
369
404
 
370
405
  export * from "@stonecrop/atable/types";
371
406