@m4l/components 9.59.1-beta-hotfix-semantic-width-dynamicform.0 → 9.59.1-beta-pkg-758-update-screen-device.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.
Files changed (39) hide show
  1. package/components/CheckableList/slots/styled.d.ts +3 -3
  2. package/components/DynamicForm/DynamicForm.styles.d.ts.map +1 -1
  3. package/components/DynamicForm/DynamicForm.styles.js +72 -165
  4. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.d.ts.map +1 -1
  5. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.js +11 -21
  6. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/textFieldStrategy.js +38 -38
  7. package/components/DynamicForm/helpers/resolveFieldComponent/types.d.ts +1 -1
  8. package/components/DynamicForm/helpers/resolveFieldContractAliases/resolveFieldContractAliases.d.ts +5 -1
  9. package/components/DynamicForm/helpers/resolveFieldContractAliases/resolveFieldContractAliases.d.ts.map +1 -1
  10. package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.d.ts.map +1 -1
  11. package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.js +120 -132
  12. package/components/DynamicForm/types.d.ts +14 -13
  13. package/components/DynamicForm/types.d.ts.map +1 -1
  14. package/components/Label/Label.d.ts.map +1 -1
  15. package/components/Label/Label.js +26 -40
  16. package/components/Label/Label.styles.d.ts.map +1 -1
  17. package/components/Label/Label.styles.js +53 -59
  18. package/components/Label/types.d.ts +0 -2
  19. package/components/Label/types.d.ts.map +1 -1
  20. package/components/PropertyValue/PropertyValue.d.ts.map +1 -1
  21. package/components/PropertyValue/PropertyValue.js +57 -82
  22. package/components/PropertyValue/PropertyValue.styles.d.ts.map +1 -1
  23. package/components/PropertyValue/PropertyValue.styles.js +100 -100
  24. package/components/PropertyValue/constants.d.ts +0 -1
  25. package/components/PropertyValue/constants.d.ts.map +1 -1
  26. package/components/PropertyValue/constants.js +4 -10
  27. package/components/PropertyValue/types.d.ts +1 -5
  28. package/components/PropertyValue/types.d.ts.map +1 -1
  29. package/components/Stepper/helpers/focusFirstErrorField/index.d.ts +5 -6
  30. package/components/Stepper/helpers/focusFirstErrorField/index.d.ts.map +1 -1
  31. package/components/Stepper/helpers/focusFirstErrorField/index.js +10 -8
  32. package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
  33. package/package.json +5 -5
  34. package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts +0 -49
  35. package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.d.ts.map +0 -1
  36. package/components/DynamicForm/helpers/resolveAdaptiveFieldLayout/resolveAdaptiveFieldLayout.js +0 -174
  37. package/components/PropertyValue/semanticWidth.d.ts +0 -7
  38. package/components/PropertyValue/semanticWidth.d.ts.map +0 -1
  39. package/components/PropertyValue/semanticWidth.js +0 -31
@@ -1,174 +0,0 @@
1
- import { isFullRowSemanticWidth as M, resolveSemanticWidthPx as _ } from "../../../PropertyValue/semanticWidth.js";
2
- const s = {
3
- narrow: 0.28,
4
- normal: 0.6,
5
- punctuation: 0.28,
6
- space: 0.26,
7
- thin: 0.38,
8
- uppercase: 0.68,
9
- wide: 0.86
10
- }, A = {
11
- small: {
12
- fontSize: 10,
13
- helperIcon: 18,
14
- letterSpacing: 0.8,
15
- mandatoryMarker: 9,
16
- safetyBuffer: 2
17
- },
18
- medium: {
19
- fontSize: 11,
20
- helperIcon: 20,
21
- letterSpacing: 0.8,
22
- mandatoryMarker: 10,
23
- safetyBuffer: 2
24
- }
25
- }, C = 796, l = 37, u = 16, m = 24, W = 0.06, H = [
26
- { columns: 22, maxContainerWidth: 1255 },
27
- { columns: 20, maxContainerWidth: 1149 },
28
- { columns: 18, maxContainerWidth: 1043 },
29
- { columns: 16, maxContainerWidth: 937 },
30
- { columns: 14, maxContainerWidth: 831 },
31
- { columns: 12, maxContainerWidth: 725 },
32
- { columns: 10, maxContainerWidth: 619 },
33
- { columns: 8, maxContainerWidth: 513 },
34
- { columns: 6, maxContainerWidth: 407 },
35
- { columns: 4, maxContainerWidth: 359 },
36
- { columns: 3, maxContainerWidth: 343 },
37
- { columns: 2, maxContainerWidth: 335 },
38
- { columns: 1, maxContainerWidth: 319 }
39
- ], p = "ijlI|!", I = ".,;:'", R = "ftr()[]{}/\\", N = "mwMW@%#&";
40
- function E(n) {
41
- const { hasHelperMessage: t = !1, label: e, mandatory: i = !1, size: o } = n, r = A[o], c = Array.from(e), S = c.reduce((f, h) => f + G(h), 0) * r.fontSize + c.length * r.letterSpacing;
42
- return Math.ceil(
43
- S + r.safetyBuffer + (i ? r.mandatoryMarker : 0) + (t ? r.helperIcon : 0)
44
- );
45
- }
46
- function L(n) {
47
- const { requestedSemanticWidth: t } = n, e = E(n), i = _(t);
48
- if (M(t))
49
- return {
50
- controlWidth: i,
51
- estimatedLabelWidth: e,
52
- gridColumnSpan: m,
53
- isFullWidth: !0,
54
- requestedSemanticWidth: t
55
- };
56
- if (!i || e > C)
57
- return {
58
- controlWidth: i,
59
- estimatedLabelWidth: e,
60
- gridColumnSpan: m,
61
- isFullWidth: !0,
62
- requestedSemanticWidth: t
63
- };
64
- const o = Math.max(i, e), r = e <= i ? i : F(o);
65
- return r ? {
66
- controlWidth: i,
67
- estimatedLabelWidth: e,
68
- gridColumnSpan: x(
69
- r,
70
- i
71
- ),
72
- isFullWidth: !1,
73
- labelWidth: r,
74
- requestedSemanticWidth: t,
75
- wrapperWidth: r
76
- } : {
77
- controlWidth: i,
78
- estimatedLabelWidth: e,
79
- gridColumnSpan: m,
80
- isFullWidth: !0,
81
- requestedSemanticWidth: t
82
- };
83
- }
84
- function F(n) {
85
- if (!(!Number.isFinite(n) || n <= 0) && !(n > C))
86
- return Math.ceil(n);
87
- }
88
- function x(n, t = n) {
89
- if (!Number.isFinite(n))
90
- return m;
91
- const e = a(
92
- Math.ceil(
93
- (n + u) / (l + u)
94
- )
95
- ), i = Number.isFinite(t) ? t : n, o = a(
96
- Math.ceil(
97
- (i + u) / (l + u)
98
- )
99
- ), r = Math.max(o, e - 1);
100
- return r < e && D(n, r) ? r : e;
101
- }
102
- function P(n, t) {
103
- return Math.min(
104
- a(n),
105
- a(t)
106
- );
107
- }
108
- function d(n) {
109
- const t = a(n);
110
- return t * l + (t - 1) * u;
111
- }
112
- function T(n, t, e) {
113
- const i = a(t), o = Math.min(
114
- a(n),
115
- i
116
- );
117
- if (!Number.isFinite(e) || e <= 0)
118
- return d(o);
119
- const r = (i - 1) * u, c = Math.max(0, e - r) / i;
120
- return o * c + (o - 1) * u;
121
- }
122
- function b(n, t, e) {
123
- if (!Number.isFinite(n) || n <= 0)
124
- return 0;
125
- const i = a(e), o = Math.min(
126
- a(t),
127
- i
128
- );
129
- return Math.ceil(
130
- (i * n + (i - o) * u) / o
131
- );
132
- }
133
- function z(n, t, e) {
134
- if (!Number.isFinite(n))
135
- return a(t);
136
- const i = a(t);
137
- for (let o = 1; o <= i; o += 1)
138
- if (T(
139
- o,
140
- i,
141
- e
142
- ) >= n)
143
- return o;
144
- return i;
145
- }
146
- function a(n) {
147
- return Number.isFinite(n) ? Math.min(
148
- m,
149
- Math.max(1, Math.ceil(n))
150
- ) : m;
151
- }
152
- function D(n, t) {
153
- const e = d(t);
154
- return e >= n ? !0 : (n - e) / n <= W;
155
- }
156
- function G(n) {
157
- return n.trim() === "" ? s.space : p.includes(n) ? s.narrow : I.includes(n) ? s.punctuation : R.includes(n) ? s.thin : N.includes(n) ? s.wide : n >= "A" && n <= "Z" ? s.uppercase : s.normal;
158
- }
159
- export {
160
- l as DYNAMIC_FORM_SEMANTIC_GRID_BASE_COLUMN_WIDTH,
161
- H as DYNAMIC_FORM_SEMANTIC_GRID_COLUMN_BREAKPOINTS,
162
- u as DYNAMIC_FORM_SEMANTIC_GRID_COLUMN_GAP,
163
- m as DYNAMIC_FORM_SEMANTIC_GRID_MAX_COLUMNS,
164
- W as DYNAMIC_FORM_SEMANTIC_GRID_SPAN_PRECISION_THRESHOLD,
165
- E as estimateLabelWidthPx,
166
- L as resolveAdaptiveFieldLayout,
167
- F as resolveAdaptiveFieldLayoutVisualTrackWidth,
168
- b as resolveSemanticGridContainerWidthForSpan,
169
- x as resolveSemanticGridFieldColumnSpan,
170
- P as resolveSemanticGridSpanForColumnCount,
171
- z as resolveSemanticGridSpanForContainerWidth,
172
- d as resolveSemanticGridSpanWidth,
173
- T as resolveSemanticGridSpanWidthForContainer
174
- };
@@ -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
- };