@m4l/components 9.57.1-beta-hotfix-semantic-width-dynamicform.1 → 9.57.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/components/CheckableList/slots/styled.d.ts +3 -3
- package/components/DynamicForm/DynamicForm.styles.d.ts.map +1 -1
- package/components/DynamicForm/DynamicForm.styles.js +61 -54
- package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.d.ts.map +1 -1
- package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.js +124 -137
- package/components/Label/Label.d.ts.map +1 -1
- package/components/Label/Label.js +26 -40
- package/components/Label/Label.styles.d.ts.map +1 -1
- package/components/Label/Label.styles.js +52 -52
- package/components/Label/types.d.ts +0 -2
- package/components/Label/types.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.js +57 -82
- package/components/PropertyValue/PropertyValue.styles.d.ts.map +1 -1
- package/components/PropertyValue/PropertyValue.styles.js +91 -87
- package/components/PropertyValue/types.d.ts +1 -5
- package/components/PropertyValue/types.d.ts.map +1 -1
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
- package/package.json +6 -6
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts +0 -29
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts.map +0 -1
- package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.js +0 -82
- package/components/PropertyValue/semanticWidth.d.ts +0 -7
- package/components/PropertyValue/semanticWidth.d.ts.map +0 -1
- package/components/PropertyValue/semanticWidth.js +0 -31
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAdaptiveFieldLayout.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,KAAK,uBAAuB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAclD,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,uBAAuB,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,gCACf,SAAQ,0BAA0B;IAClC,sBAAsB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACtD;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA+BD,eAAO,MAAM,yCAAyC,6CAQ5C,CAAC;AAKX,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,0BAA0B,GACjC,MAAM,CAmBR;AAED,+FAA+F;AAC/F,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,gCAAgC,GACvC,mBAAmB,CA8CrB;AAED,yFAAyF;AACzF,wBAAgB,0CAA0C,CACxD,aAAa,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAIpB"}
|
package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { isFullRowSemanticWidth as f, resolveSemanticWidthPx as p } from "../../../PropertyValue/semanticWidth.js";
|
|
2
|
-
const W = {
|
|
3
|
-
small: {
|
|
4
|
-
buffer: 12,
|
|
5
|
-
helperIcon: 24,
|
|
6
|
-
mandatoryMarker: 8,
|
|
7
|
-
narrow: 4,
|
|
8
|
-
normal: 7,
|
|
9
|
-
punctuation: 3,
|
|
10
|
-
space: 4,
|
|
11
|
-
uppercase: 8,
|
|
12
|
-
wide: 10
|
|
13
|
-
},
|
|
14
|
-
medium: {
|
|
15
|
-
buffer: 16,
|
|
16
|
-
helperIcon: 28,
|
|
17
|
-
mandatoryMarker: 10,
|
|
18
|
-
narrow: 5,
|
|
19
|
-
normal: 8,
|
|
20
|
-
punctuation: 4,
|
|
21
|
-
space: 5,
|
|
22
|
-
uppercase: 9,
|
|
23
|
-
wide: 11
|
|
24
|
-
}
|
|
25
|
-
}, a = 796, A = [
|
|
26
|
-
90,
|
|
27
|
-
160,
|
|
28
|
-
240,
|
|
29
|
-
320,
|
|
30
|
-
400,
|
|
31
|
-
520,
|
|
32
|
-
a
|
|
33
|
-
], m = "ijlI1|!", h = ".,;:", I = "mwMW@%#&";
|
|
34
|
-
function T(t) {
|
|
35
|
-
const { hasHelperMessage: e = !1, label: r, mandatory: n = !1, size: u, symbol: i } = t, o = W[u], l = typeof i == "string" && i.trim() !== "" ? `${r} (${i.trim()})` : r, s = Array.from(l).reduce((d, c) => d + R(c, o), 0);
|
|
36
|
-
return Math.ceil(
|
|
37
|
-
s + o.buffer + (n ? o.mandatoryMarker : 0) + (e ? o.helperIcon : 0)
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
function C(t) {
|
|
41
|
-
const { requestedSemanticWidth: e } = t, r = T(t), n = p(e);
|
|
42
|
-
if (f(e))
|
|
43
|
-
return {
|
|
44
|
-
controlWidth: n,
|
|
45
|
-
estimatedLabelWidth: r,
|
|
46
|
-
isFullWidth: !0,
|
|
47
|
-
requestedSemanticWidth: e
|
|
48
|
-
};
|
|
49
|
-
if (!n || r > a)
|
|
50
|
-
return {
|
|
51
|
-
controlWidth: n,
|
|
52
|
-
estimatedLabelWidth: r,
|
|
53
|
-
isFullWidth: !0,
|
|
54
|
-
requestedSemanticWidth: e
|
|
55
|
-
};
|
|
56
|
-
const u = Math.max(n, r), i = r <= n ? n : _(u);
|
|
57
|
-
return i ? {
|
|
58
|
-
controlWidth: n,
|
|
59
|
-
estimatedLabelWidth: r,
|
|
60
|
-
isFullWidth: !1,
|
|
61
|
-
labelWidth: i,
|
|
62
|
-
requestedSemanticWidth: e,
|
|
63
|
-
wrapperWidth: i
|
|
64
|
-
} : {
|
|
65
|
-
controlWidth: n,
|
|
66
|
-
estimatedLabelWidth: r,
|
|
67
|
-
isFullWidth: !0,
|
|
68
|
-
requestedSemanticWidth: e
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function _(t) {
|
|
72
|
-
return A.find((e) => t <= e);
|
|
73
|
-
}
|
|
74
|
-
function R(t, e) {
|
|
75
|
-
return t.trim() === "" ? e.space : m.includes(t) ? e.narrow : h.includes(t) ? e.punctuation : I.includes(t) ? e.wide : t >= "A" && t <= "Z" ? e.uppercase : e.normal;
|
|
76
|
-
}
|
|
77
|
-
export {
|
|
78
|
-
A as ADAPTIVE_FIELD_LAYOUT_VISUAL_TRACK_WIDTHS,
|
|
79
|
-
T as estimateLabelWidthPx,
|
|
80
|
-
C as resolveAdaptiveFieldLayout,
|
|
81
|
-
_ as resolveAdaptiveFieldLayoutVisualTrackWidth
|
|
82
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SemanticWidthOptions } from './types';
|
|
2
|
-
export declare const SEMANTIC_WIDTH_PIXEL_VALUES: Record<SemanticWidthOptions, number | null>;
|
|
3
|
-
/** Resolve the finite pixel width assigned to a semantic width option. */
|
|
4
|
-
export declare function resolveSemanticWidthPx(semanticWidth: SemanticWidthOptions | null | undefined): number | undefined;
|
|
5
|
-
/** Determine whether a semantic width should occupy a full layout row. */
|
|
6
|
-
export declare function isFullRowSemanticWidth(semanticWidth: SemanticWidthOptions | null | undefined): boolean;
|
|
7
|
-
//# sourceMappingURL=semanticWidth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semanticWidth.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/PropertyValue/semanticWidth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAC9C,oBAAoB,EACpB,MAAM,GAAG,IAAI,CAiBd,CAAC;AAEF,0EAA0E;AAC1E,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,GACrD,MAAM,GAAG,SAAS,CAQpB;AAED,0EAA0E;AAC1E,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,GACrD,OAAO,CAET"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const r = {
|
|
2
|
-
email: 400,
|
|
3
|
-
shortName: 90,
|
|
4
|
-
mediumName: 260,
|
|
5
|
-
bigName: 520,
|
|
6
|
-
shortId: 44,
|
|
7
|
-
mediumId: 60,
|
|
8
|
-
bigId: 200,
|
|
9
|
-
shortDescription: 796,
|
|
10
|
-
mediumDescription: 1500,
|
|
11
|
-
bigDescription: null,
|
|
12
|
-
shortNumber: 50,
|
|
13
|
-
mediumNumber: 60,
|
|
14
|
-
bigNumber: 162,
|
|
15
|
-
percentNumber: 50,
|
|
16
|
-
fullWidth: null
|
|
17
|
-
};
|
|
18
|
-
function u(e) {
|
|
19
|
-
if (!e)
|
|
20
|
-
return;
|
|
21
|
-
const i = r[e];
|
|
22
|
-
return typeof i == "number" ? i : void 0;
|
|
23
|
-
}
|
|
24
|
-
function t(e) {
|
|
25
|
-
return !e || r[e] === null;
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
r as SEMANTIC_WIDTH_PIXEL_VALUES,
|
|
29
|
-
t as isFullRowSemanticWidth,
|
|
30
|
-
u as resolveSemanticWidthPx
|
|
31
|
-
};
|