asma-ui-core 3.28.0 → 3.29.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/asma-ui-core.css +1 -1
- package/dist/components/custom/module/header-layout/DynamicToolbar.js +156 -154
- package/dist/components/custom/module/header-layout/ToolbarRows.js +38 -33
- package/dist/components/custom/module/header-layout/estimateToolbarLayout.js +55 -58
- package/dist/components/custom/widget/widget-title/StyledWidgetTitle.js +10 -7
- package/dist/src/components/custom/widget/widget-title/StyledWidgetTitle.d.ts +5 -1
- package/package.json +1 -1
|
@@ -1,52 +1,54 @@
|
|
|
1
|
-
import { resolveToolbarActionWidth as
|
|
2
|
-
var l = 8,
|
|
3
|
-
function
|
|
1
|
+
import { resolveToolbarActionWidth as C } from "./planToolbarActions.js";
|
|
2
|
+
var l = 8, g = 12, G = 160, H = 44, Y = 92, D = 44, V = 148, J = 44, K = 168, j = 9, q = 56, E = 360, z = 12;
|
|
3
|
+
function L(t) {
|
|
4
4
|
return {
|
|
5
|
-
leading: t?.leadingUtilityWidthPx ??
|
|
6
|
-
search: t?.searchWidthPx ??
|
|
7
|
-
selectionIndicator: t?.selectionIndicatorWidthPx ??
|
|
8
|
-
filter: (i) => i ? t?.filterIconWidthPx ??
|
|
9
|
-
trailing: (i) => i ? t?.trailingIconWidthPx ??
|
|
5
|
+
leading: t?.leadingUtilityWidthPx ?? H,
|
|
6
|
+
search: t?.searchWidthPx ?? G,
|
|
7
|
+
selectionIndicator: t?.selectionIndicatorWidthPx ?? K,
|
|
8
|
+
filter: (i) => i ? t?.filterIconWidthPx ?? D : t?.filterLabelWidthPx ?? Y,
|
|
9
|
+
trailing: (i) => i ? t?.trailingIconWidthPx ?? J : t?.trailingLabelWidthPx ?? V
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return t ? typeof t == "string" ? t.length :
|
|
12
|
+
function Q(t) {
|
|
13
|
+
return t ? typeof t == "string" ? t.length : z : 0;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const i =
|
|
17
|
-
|
|
15
|
+
function k(t) {
|
|
16
|
+
const i = Q(t);
|
|
17
|
+
if (i === 0) return 0;
|
|
18
|
+
const e = i > 0 ? i * j + 24 : 0;
|
|
19
|
+
return Math.min(E, Math.max(q, e));
|
|
18
20
|
}
|
|
19
|
-
function
|
|
20
|
-
return i != null && i > 0 ? Math.min(
|
|
21
|
+
function Z(t, i) {
|
|
22
|
+
return typeof t == "string" ? k(t) : i != null && i > 0 ? Math.min(E, i) : k(t);
|
|
21
23
|
}
|
|
22
|
-
function
|
|
24
|
+
function T(t, i, e) {
|
|
23
25
|
const n = t.filter((r) => !r.hidden);
|
|
24
|
-
return n.length ? n.reduce((r, c) => r +
|
|
26
|
+
return n.length ? n.reduce((r, c) => r + C(c, i, e) + l, 0) - l : 0;
|
|
25
27
|
}
|
|
26
|
-
function
|
|
28
|
+
function F(t, i, e) {
|
|
27
29
|
const n = t.filter((s) => !s.hidden).sort((s, u) => (u.priority ?? 0) - (s.priority ?? 0));
|
|
28
30
|
if (!n.length) return 0;
|
|
29
|
-
const r = n.slice(0, i), c =
|
|
31
|
+
const r = n.slice(0, i), c = T(r, !0, e);
|
|
30
32
|
return n.length === r.length ? c : c + (r.length ? l : 0) + 40;
|
|
31
33
|
}
|
|
32
|
-
function
|
|
33
|
-
return t > 0 ? t :
|
|
34
|
+
function it(t, i, e, n = 3) {
|
|
35
|
+
return t > 0 ? t : F(i, n, e);
|
|
34
36
|
}
|
|
35
|
-
function
|
|
36
|
-
const { hasLeadingUtility: i, hasFilter: e, hasSearch: n, hasTrailingUtility: r, showPageActions: c, showBulkActions: s, filterIconOnly: u, trailingIconOnly: h, pageActionsWidthPx: I, bulkActionsWidthPx: O, searchBeforeFilter: W = !1, measured:
|
|
37
|
+
function B(t) {
|
|
38
|
+
const { hasLeadingUtility: i, hasFilter: e, hasSearch: n, hasTrailingUtility: r, showPageActions: c, showBulkActions: s, filterIconOnly: u, trailingIconOnly: h, pageActionsWidthPx: I, bulkActionsWidthPx: O, searchBeforeFilter: W = !1, measured: y } = t, d = L(y);
|
|
37
39
|
let o = 0;
|
|
38
40
|
c && i && (o += d.leading + l);
|
|
39
41
|
const f = e ? d.filter(u) + l : 0, p = n ? d.search + l : 0;
|
|
40
42
|
return W ? o += p + f : o += f + p, c && (I > 0 && (o += I + l), r && (o += d.trailing(h) + l)), s && O > 0 && (o += O + l), Math.max(0, o - l);
|
|
41
43
|
}
|
|
42
|
-
function
|
|
43
|
-
const { containerWidth: i, isMobile: e, isSelectionMode: n, compactBreakpointPx: r, reserveBulkActionsWidthPx: c, title: s, hasLeadingUtility: u, hasFilter: h, hasSearch: I, hasTrailingUtility: O, pageActions: W, bulkActions:
|
|
44
|
+
function nt(t) {
|
|
45
|
+
const { containerWidth: i, isMobile: e, isSelectionMode: n, compactBreakpointPx: r, reserveBulkActionsWidthPx: c, title: s, hasLeadingUtility: u, hasFilter: h, hasSearch: I, hasTrailingUtility: O, pageActions: W, bulkActions: y, maxVisibleBulkActions: d = 2, measured: o } = t, f = i > 0 ? i : Number.POSITIVE_INFINITY, p = !n, M = n, N = n ? 0 : c, v = L(o), _ = Z(s, o?.titleWidthPx), P = T(W, !0, o?.actionWidthPx), b = T(W, !1, o?.actionWidthPx), S = F(y, d, o?.actionWidthPx), A = (a) => B({
|
|
44
46
|
hasLeadingUtility: u,
|
|
45
47
|
hasFilter: h,
|
|
46
48
|
hasSearch: I,
|
|
47
49
|
hasTrailingUtility: O,
|
|
48
50
|
showPageActions: p,
|
|
49
|
-
showBulkActions:
|
|
51
|
+
showBulkActions: M,
|
|
50
52
|
bulkActionsWidthPx: 0,
|
|
51
53
|
measured: o,
|
|
52
54
|
...a
|
|
@@ -55,7 +57,7 @@ function it(t) {
|
|
|
55
57
|
const a = (x) => f >= A({
|
|
56
58
|
...x,
|
|
57
59
|
searchBeforeFilter: !0
|
|
58
|
-
}),
|
|
60
|
+
}), m = (x) => n ? !0 : x;
|
|
59
61
|
return a({
|
|
60
62
|
filterIconOnly: !1,
|
|
61
63
|
trailingIconOnly: !1,
|
|
@@ -63,7 +65,7 @@ function it(t) {
|
|
|
63
65
|
}) ? {
|
|
64
66
|
mode: "compact",
|
|
65
67
|
filterIconOnly: !1,
|
|
66
|
-
trailingIconOnly:
|
|
68
|
+
trailingIconOnly: m(!1)
|
|
67
69
|
} : a({
|
|
68
70
|
filterIconOnly: !1,
|
|
69
71
|
trailingIconOnly: !0,
|
|
@@ -75,7 +77,7 @@ function it(t) {
|
|
|
75
77
|
} : a({
|
|
76
78
|
filterIconOnly: !1,
|
|
77
79
|
trailingIconOnly: !0,
|
|
78
|
-
pageActionsWidthPx:
|
|
80
|
+
pageActionsWidthPx: b
|
|
79
81
|
}) ? {
|
|
80
82
|
mode: "compact",
|
|
81
83
|
filterIconOnly: !1,
|
|
@@ -87,33 +89,33 @@ function it(t) {
|
|
|
87
89
|
};
|
|
88
90
|
}
|
|
89
91
|
if (n) {
|
|
90
|
-
const a = (
|
|
92
|
+
const a = (w) => B({
|
|
91
93
|
hasLeadingUtility: !1,
|
|
92
94
|
hasFilter: h,
|
|
93
95
|
hasSearch: I,
|
|
94
96
|
hasTrailingUtility: !1,
|
|
95
97
|
showPageActions: !1,
|
|
96
98
|
showBulkActions: !1,
|
|
97
|
-
filterIconOnly:
|
|
99
|
+
filterIconOnly: w,
|
|
98
100
|
trailingIconOnly: !0,
|
|
99
101
|
pageActionsWidthPx: 0,
|
|
100
102
|
bulkActionsWidthPx: 0,
|
|
101
103
|
measured: o
|
|
102
|
-
});
|
|
103
|
-
if (f >= _ +
|
|
104
|
+
}), m = s ? g : 0;
|
|
105
|
+
if (f >= _ + v.selectionIndicator + m + A({
|
|
104
106
|
filterIconOnly: !1,
|
|
105
107
|
trailingIconOnly: !0,
|
|
106
108
|
pageActionsWidthPx: 0,
|
|
107
|
-
bulkActionsWidthPx:
|
|
108
|
-
}) +
|
|
109
|
+
bulkActionsWidthPx: S
|
|
110
|
+
}) + g) return {
|
|
109
111
|
mode: "inline",
|
|
110
112
|
filterIconOnly: !1,
|
|
111
113
|
trailingIconOnly: !0
|
|
112
114
|
};
|
|
113
|
-
const
|
|
114
|
-
return f >= Math.max(
|
|
115
|
+
const x = _ + a(!1) + g, U = v.selectionIndicator + S + g;
|
|
116
|
+
return f >= Math.max(x, U) ? {
|
|
115
117
|
mode: "selection-split",
|
|
116
|
-
filterIconOnly: f < _ + a(!0) +
|
|
118
|
+
filterIconOnly: f < _ + a(!0) + g,
|
|
117
119
|
trailingIconOnly: !0
|
|
118
120
|
} : {
|
|
119
121
|
mode: "compact",
|
|
@@ -121,7 +123,7 @@ function it(t) {
|
|
|
121
123
|
trailingIconOnly: !0
|
|
122
124
|
};
|
|
123
125
|
}
|
|
124
|
-
const
|
|
126
|
+
const X = (a) => f >= _ + A(a) + N + g, R = [
|
|
125
127
|
{
|
|
126
128
|
filterIconOnly: !1,
|
|
127
129
|
trailingIconOnly: !1,
|
|
@@ -132,18 +134,13 @@ function it(t) {
|
|
|
132
134
|
trailingIconOnly: !0,
|
|
133
135
|
pageActionsWidthPx: P
|
|
134
136
|
},
|
|
135
|
-
{
|
|
136
|
-
filterIconOnly: !1,
|
|
137
|
-
trailingIconOnly: !0,
|
|
138
|
-
pageActionsWidthPx: L
|
|
139
|
-
},
|
|
140
137
|
{
|
|
141
138
|
filterIconOnly: !0,
|
|
142
139
|
trailingIconOnly: !0,
|
|
143
|
-
pageActionsWidthPx:
|
|
140
|
+
pageActionsWidthPx: P
|
|
144
141
|
}
|
|
145
142
|
];
|
|
146
|
-
for (const a of
|
|
143
|
+
for (const a of R) if (X(a)) return {
|
|
147
144
|
mode: "inline",
|
|
148
145
|
filterIconOnly: a.filterIconOnly,
|
|
149
146
|
trailingIconOnly: a.trailingIconOnly
|
|
@@ -160,7 +157,7 @@ function it(t) {
|
|
|
160
157
|
} : f >= A({
|
|
161
158
|
filterIconOnly: !0,
|
|
162
159
|
trailingIconOnly: !0,
|
|
163
|
-
pageActionsWidthPx:
|
|
160
|
+
pageActionsWidthPx: b,
|
|
164
161
|
searchBeforeFilter: !0
|
|
165
162
|
}) ? {
|
|
166
163
|
mode: "stacked",
|
|
@@ -172,18 +169,18 @@ function it(t) {
|
|
|
172
169
|
trailingIconOnly: !0
|
|
173
170
|
};
|
|
174
171
|
}
|
|
175
|
-
function nt(t) {
|
|
176
|
-
const { layoutMode: i, containerWidth: e, titleWidth: n, filterIconOnly: r, trailingIconOnly: c, hasFilter: s, hasSearch: u, hasLeadingUtility: h, hasTrailingUtility: I, reserveBulkActionsWidthPx: O, measured: W } = t, g = m(W), d = (h ? g.leading + l : 0) + (s ? g.filter(r) + l : 0) + (u ? g.search + l : 0) + (I ? g.trailing(c) + l : 0);
|
|
177
|
-
return i === "stacked" || i === "compact" ? Math.max(80, e - d) : Math.max(80, e - n - d - y - O);
|
|
178
|
-
}
|
|
179
172
|
function et(t) {
|
|
180
|
-
const { layoutMode: i, containerWidth: e, titleWidth: n, filterIconOnly: r,
|
|
181
|
-
return i === "
|
|
173
|
+
const { layoutMode: i, containerWidth: e, titleWidth: n, filterIconOnly: r, trailingIconOnly: c, hasFilter: s, hasSearch: u, hasLeadingUtility: h, hasTrailingUtility: I, reserveBulkActionsWidthPx: O, measured: W } = t, y = L(W), d = (h ? y.leading + l : 0) + (s ? y.filter(r) + l : 0) + (u ? y.search + l : 0) + (I ? y.trailing(c) + l : 0);
|
|
174
|
+
return i === "stacked" || i === "compact" ? Math.max(80, e - d) : Math.max(80, e - n - d - g - O);
|
|
175
|
+
}
|
|
176
|
+
function lt(t) {
|
|
177
|
+
const { layoutMode: i, containerWidth: e, titleWidth: n, filterIconOnly: r, hasFilter: c, hasSearch: s, measured: u } = t, h = L(u), I = (c ? h.filter(r) + l : 0) + (s ? h.search + l : 0);
|
|
178
|
+
return i === "inline" ? Math.max(120, e - n - h.selectionIndicator - I - g * 2) : Math.max(120, e - h.selectionIndicator - g);
|
|
182
179
|
}
|
|
183
180
|
export {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
lt as resolveBulkActionsAvailableWidth,
|
|
182
|
+
et as resolvePageActionsAvailableWidth,
|
|
183
|
+
it as resolveReserveBulkActionsWidthPx,
|
|
184
|
+
Z as resolveTitleAreaWidth,
|
|
185
|
+
nt as resolveToolbarLayout
|
|
189
186
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { cn as i } from "../../../../helpers/cn.js";
|
|
2
|
+
import r from "./StyledWidgetTitle.module.js";
|
|
3
|
+
import { forwardRef as d } from "react";
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
var n = d(function(e, t) {
|
|
6
|
+
return /* @__PURE__ */ l("div", {
|
|
7
|
+
ref: t,
|
|
8
|
+
className: i(r["styled-widget-title"], e.className),
|
|
6
9
|
children: e.children
|
|
7
10
|
});
|
|
8
|
-
};
|
|
11
|
+
});
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
n as StyledWidgetTitle
|
|
11
14
|
};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export declare const StyledWidgetTitle:
|
|
1
|
+
export declare const StyledWidgetTitle: import('node_modules/@types/react').ForwardRefExoticComponent<{
|
|
2
|
+
className?: string;
|
|
3
|
+
} & {
|
|
4
|
+
children?: import('node_modules/@types/react').ReactNode | undefined;
|
|
5
|
+
} & import('node_modules/@types/react').RefAttributes<HTMLDivElement>>;
|