@vc-shell/framework 2.5.0-pr340.cb4c9dd → 2.5.0-pr342.db2c5a8

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.
@@ -0,0 +1,23 @@
1
+ import type { IBaseProperty } from "./types";
2
+ /**
3
+ * Which control `VcDynamicProperty` renders for a property.
4
+ *
5
+ * This exists because the choice was encoded twice: once here in effect, as a
6
+ * chain of sixteen ordered `v-else-if` conditions in the template, and once in
7
+ * `resolveStrategy`, which decides how the value is read and written. The two
8
+ * chains had opposite precedence — the template tested `dictionary` first,
9
+ * `resolveStrategy` tests `Measure` first — so they disagreed.
10
+ *
11
+ * A `Measure` property carrying a dictionary got the dictionary `VcSelect`,
12
+ * while `measureStrategy` read `values[0].value` and wrote
13
+ * `{ value, unitOfMeasureId }`. The select works in `valueId`, so it showed
14
+ * nothing selected and stored no dictionary reference, and the unit could not
15
+ * be set at all. `Boolean` with a dictionary diverged the same way.
16
+ *
17
+ * Precedence here mirrors `resolveStrategy` exactly. The strategy is the data
18
+ * contract — non-UI code reads through it — so the control follows it, not the
19
+ * other way round.
20
+ */
21
+ export type ControlKind = "dictionary" | "measure" | "boolean" | "datetime" | "long-text" | "number" | "number-multivalue" | "integer" | "integer-multivalue" | "short-text" | "short-text-multivalue" | "multivalue-dictionary" | "color" | "color-dictionary" | "color-multivalue" | "color-multivalue-dictionary" | "unsupported";
22
+ export declare function resolveControlKind(property: IBaseProperty): ControlKind;
23
+ //# sourceMappingURL=resolveControlKind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveControlKind.d.ts","sourceRoot":"","sources":["../../../../core/composables/useDynamicProperties/resolveControlKind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,SAAS,GACT,SAAS,GACT,UAAU,GACV,WAAW,GACX,QAAQ,GACR,mBAAmB,GACnB,SAAS,GACT,oBAAoB,GACpB,YAAY,GACZ,uBAAuB,GACvB,uBAAuB,GACvB,OAAO,GACP,kBAAkB,GAClB,kBAAkB,GAClB,6BAA6B,GAC7B,aAAa,CAAC;AAElB,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,aAAa,GAAG,WAAW,CAwCvE"}