xmlui 0.9.15 → 0.9.16
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/{apiInterceptorWorker-DHw39GG3.mjs → apiInterceptorWorker-E5ylKYVg.mjs} +1 -1
- package/dist/{index-DFC3vDn-.mjs → index-BjVxVHb3.mjs} +75 -48
- package/dist/scripts/src/components/Select/Select.js +5 -2
- package/dist/scripts/src/components/Select/SelectNative.js +3 -3
- package/dist/scripts/src/components-core/InspectorContext.js +4 -2
- package/dist/scripts/src/components-core/loader/ApiLoader.js +2 -2
- package/dist/scripts/src/components-core/loader/DataLoader.js +5 -4
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +2 -2
- package/dist/scripts/src/components-core/loader/Loader.js +3 -8
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +3 -3
- package/dist/scripts/src/components-core/loader/PageableLoader.js +3 -7
- package/dist/scripts/src/components-core/rendering/renderChild.js +2 -1
- package/dist/scripts/src/components-core/theming/layout-resolver.js +4 -4
- package/dist/scripts/src/components-core/utils/extractParam.js +7 -0
- package/dist/xmlui-metadata.mjs +14 -8
- package/dist/xmlui-metadata.umd.js +14 -8
- package/dist/xmlui-standalone.umd.js +77 -50
- package/dist/xmlui.d.ts +1 -0
- package/dist/xmlui.mjs +1 -1
- package/package.json +1 -1
|
@@ -16,19 +16,18 @@ const immer_1 = require("immer");
|
|
|
16
16
|
const extractParam_1 = require("../utils/extractParam");
|
|
17
17
|
const AppContext_1 = require("../AppContext");
|
|
18
18
|
const hooks_1 = require("../utils/hooks");
|
|
19
|
-
function Loader({ state, loader, loaderFn, queryId, pollIntervalInSeconds, registerComponentApi, onLoaded, loaderLoaded, loaderInProgressChanged, loaderIsRefetchingChanged, loaderError, transformResult, }) {
|
|
19
|
+
function Loader({ state, loader, loaderFn, queryId, pollIntervalInSeconds, registerComponentApi, onLoaded, loaderLoaded, loaderInProgressChanged, loaderIsRefetchingChanged, loaderError, transformResult, structuralSharing = true }) {
|
|
20
20
|
const { uid } = loader;
|
|
21
21
|
const appContext = (0, AppContext_1.useAppContext)();
|
|
22
|
-
const [isRefetching, setIsRefetching] = (0, react_1.useState)(false);
|
|
23
22
|
// --- Rely on react-query to decide when data fetching should use the cache or when is should fetch the data from
|
|
24
23
|
// --- its data source.
|
|
25
24
|
// --- data: The data obtained by the query
|
|
26
25
|
// --- status: Query execution status
|
|
27
26
|
// --- error: Error information about the current query error (in "error" state)
|
|
28
27
|
// --- refetch: The function that can be used to re-fetch the data (because of data/state changes)
|
|
29
|
-
const { data, status, isFetching, error, refetch } = (0, react_query_1.useQuery)({
|
|
28
|
+
const { data, status, isFetching, error, refetch, isRefetching } = (0, react_query_1.useQuery)({
|
|
30
29
|
queryKey: (0, react_1.useMemo)(() => (queryId ? queryId : [uid, (0, extractParam_1.extractParam)(state, loader.props, appContext)]), [appContext, loader.props, queryId, state, uid]),
|
|
31
|
-
structuralSharing
|
|
30
|
+
structuralSharing,
|
|
32
31
|
queryFn: (0, react_1.useCallback)((_a) => __awaiter(this, [_a], void 0, function* ({ signal }) {
|
|
33
32
|
// console.log("[Loader queryFn] Starting to fetch data...");
|
|
34
33
|
try {
|
|
@@ -66,7 +65,6 @@ function Loader({ state, loader, loaderFn, queryId, pollIntervalInSeconds, regis
|
|
|
66
65
|
let intervalId;
|
|
67
66
|
if (pollIntervalInSeconds) {
|
|
68
67
|
intervalId = setInterval(() => {
|
|
69
|
-
setIsRefetching(true);
|
|
70
68
|
refetch();
|
|
71
69
|
}, pollIntervalInSeconds * 1000);
|
|
72
70
|
}
|
|
@@ -100,13 +98,11 @@ function Loader({ state, loader, loaderFn, queryId, pollIntervalInSeconds, regis
|
|
|
100
98
|
// console.log("[Loader] Calling onLoaded with data:", data);
|
|
101
99
|
// console.log("[Loader] onLoaded function exists:", !!onLoaded);
|
|
102
100
|
onLoaded === null || onLoaded === void 0 ? void 0 : onLoaded(data, isRefetching);
|
|
103
|
-
setIsRefetching(false);
|
|
104
101
|
}, 0);
|
|
105
102
|
}
|
|
106
103
|
else if (status === "error" && error !== prevError) {
|
|
107
104
|
// console.log("[Loader] Calling loaderError with error:", error);
|
|
108
105
|
loaderError(error);
|
|
109
|
-
setIsRefetching(false);
|
|
110
106
|
}
|
|
111
107
|
}, [data, error, loaderError, loaderLoaded, onLoaded, prevData, prevError, status, isRefetching]);
|
|
112
108
|
(0, react_1.useLayoutEffect)(() => {
|
|
@@ -117,7 +113,6 @@ function Loader({ state, loader, loaderFn, queryId, pollIntervalInSeconds, regis
|
|
|
117
113
|
(0, react_1.useEffect)(() => {
|
|
118
114
|
registerComponentApi === null || registerComponentApi === void 0 ? void 0 : registerComponentApi({
|
|
119
115
|
refetch: (options) => __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
setIsRefetching(true);
|
|
121
116
|
refetch(options);
|
|
122
117
|
}),
|
|
123
118
|
update: (updater) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -18,7 +18,7 @@ const extractParam_1 = require("../utils/extractParam");
|
|
|
18
18
|
const renderers_1 = require("../renderers");
|
|
19
19
|
const AppContext_1 = require("../AppContext");
|
|
20
20
|
const Loader_1 = require("./Loader");
|
|
21
|
-
function
|
|
21
|
+
function MockLoader({ loader, loaderInProgressChanged, loaderIsRefetchingChanged, loaderError, loaderLoaded, state, structuralSharing }) {
|
|
22
22
|
const appContext = (0, AppContext_1.useAppContext)();
|
|
23
23
|
const waitTime = (0, extractParam_1.extractParam)(state, loader.props.waitTime, appContext);
|
|
24
24
|
const responseObj = (0, extractParam_1.extractParam)(state, loader.props.data, appContext);
|
|
@@ -26,7 +26,7 @@ function ApiLoader({ loader, loaderInProgressChanged, loaderIsRefetchingChanged,
|
|
|
26
26
|
waitTime && (yield (0, misc_1.asyncWait)(waitTime));
|
|
27
27
|
return responseObj;
|
|
28
28
|
}), [responseObj, waitTime]);
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(Loader_1.Loader, { state: state, loader: loader, loaderInProgressChanged: loaderInProgressChanged, loaderIsRefetchingChanged: loaderIsRefetchingChanged, loaderLoaded: loaderLoaded, loaderError: loaderError, loaderFn: doLoad }));
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(Loader_1.Loader, { state: state, loader: loader, loaderInProgressChanged: loaderInProgressChanged, loaderIsRefetchingChanged: loaderIsRefetchingChanged, loaderLoaded: loaderLoaded, loaderError: loaderError, loaderFn: doLoad, structuralSharing: structuralSharing }));
|
|
30
30
|
}
|
|
31
31
|
exports.MockLoaderMd = (0, ComponentDefs_1.createMetadata)({
|
|
32
32
|
description: "A loader that simulates a delay and returns a predefined response",
|
|
@@ -36,5 +36,5 @@ exports.MockLoaderMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
36
36
|
},
|
|
37
37
|
});
|
|
38
38
|
exports.mockLoaderRenderer = (0, renderers_1.createLoaderRenderer)("MockLoader", ({ loader, state, loaderInProgressChanged, loaderLoaded, loaderError }) => {
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(MockLoader, { loader: loader, state: state, loaderInProgressChanged: loaderInProgressChanged, loaderIsRefetchingChanged: loaderInProgressChanged, loaderLoaded: loaderLoaded, loaderError: loaderError }));
|
|
40
40
|
}, exports.MockLoaderMd);
|
|
@@ -49,12 +49,11 @@ const immer_1 = __importStar(require("immer"));
|
|
|
49
49
|
const extractParam_1 = require("../utils/extractParam");
|
|
50
50
|
const AppContext_1 = require("../AppContext");
|
|
51
51
|
const hooks_1 = require("../utils/hooks");
|
|
52
|
-
function PageableLoader({ state, loader, loaderFn, queryId, registerComponentApi, pollIntervalInSeconds, onLoaded, loaderInProgressChanged, loaderIsRefetchingChanged, loaderLoaded, loaderError, transformResult, }) {
|
|
52
|
+
function PageableLoader({ state, loader, loaderFn, queryId, registerComponentApi, pollIntervalInSeconds, onLoaded, loaderInProgressChanged, loaderIsRefetchingChanged, loaderLoaded, loaderError, transformResult, structuralSharing = true, }) {
|
|
53
53
|
const { uid } = loader;
|
|
54
54
|
const appContext = (0, AppContext_1.useAppContext)();
|
|
55
55
|
const queryKey = (0, react_1.useMemo)(() => (queryId ? queryId : [uid, (0, extractParam_1.extractParam)(state, loader.props, appContext)]), [appContext, loader.props, queryId, state, uid]);
|
|
56
56
|
const thizRef = (0, react_1.useRef)(queryKey);
|
|
57
|
-
const [isRefetching, setIsRefetching] = (0, react_1.useState)(false);
|
|
58
57
|
const getPreviousPageParam = (0, react_1.useCallback)((firstPage) => {
|
|
59
58
|
let prevPageParam = undefined;
|
|
60
59
|
const prevPageSelector = loader.props.prevPageSelector;
|
|
@@ -84,11 +83,12 @@ function PageableLoader({ state, loader, loaderFn, queryId, registerComponentApi
|
|
|
84
83
|
// useEffect(()=>{
|
|
85
84
|
// console.log("TRANSFORM RESULT CHANGED", transformResult);
|
|
86
85
|
// }, [transformResult]);
|
|
87
|
-
const { data, status, error, hasNextPage, isFetchingNextPage, hasPreviousPage, isFetchingPreviousPage, isFetching, refetch, fetchPreviousPage, fetchNextPage, } = (0, react_query_1.useInfiniteQuery)({
|
|
86
|
+
const { data, status, error, hasNextPage, isFetchingNextPage, hasPreviousPage, isFetchingPreviousPage, isFetching, refetch, fetchPreviousPage, fetchNextPage, isRefetching, } = (0, react_query_1.useInfiniteQuery)({
|
|
88
87
|
queryKey,
|
|
89
88
|
queryFn: (0, react_1.useCallback)((_a) => __awaiter(this, [_a], void 0, function* ({ signal, pageParam }) {
|
|
90
89
|
return yield loaderFn(signal, pageParam);
|
|
91
90
|
}), [loaderFn]),
|
|
91
|
+
structuralSharing,
|
|
92
92
|
select: (0, react_1.useCallback)((data) => {
|
|
93
93
|
let result = [];
|
|
94
94
|
if (data) {
|
|
@@ -156,12 +156,10 @@ function PageableLoader({ state, loader, loaderFn, queryId, registerComponentApi
|
|
|
156
156
|
// access to the latest loader value
|
|
157
157
|
setTimeout(() => {
|
|
158
158
|
onLoaded === null || onLoaded === void 0 ? void 0 : onLoaded(data, isRefetching);
|
|
159
|
-
setIsRefetching(false);
|
|
160
159
|
}, 0);
|
|
161
160
|
}
|
|
162
161
|
else if (status === "error" && prevError !== error) {
|
|
163
162
|
loaderError(error);
|
|
164
|
-
setIsRefetching(false);
|
|
165
163
|
}
|
|
166
164
|
}, [
|
|
167
165
|
data,
|
|
@@ -179,7 +177,6 @@ function PageableLoader({ state, loader, loaderFn, queryId, registerComponentApi
|
|
|
179
177
|
let intervalId;
|
|
180
178
|
if (pollIntervalInSeconds) {
|
|
181
179
|
intervalId = setInterval(() => {
|
|
182
|
-
setIsRefetching(true);
|
|
183
180
|
refetch();
|
|
184
181
|
}, pollIntervalInSeconds * 1000);
|
|
185
182
|
}
|
|
@@ -200,7 +197,6 @@ function PageableLoader({ state, loader, loaderFn, queryId, registerComponentApi
|
|
|
200
197
|
fetchPrevPage,
|
|
201
198
|
fetchNextPage: stableFetchNextPage,
|
|
202
199
|
refetch: (options) => __awaiter(this, void 0, void 0, function* () {
|
|
203
|
-
setIsRefetching(true);
|
|
204
200
|
refetch(options);
|
|
205
201
|
}),
|
|
206
202
|
update: (updater) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -32,7 +32,8 @@ function renderChild({ node, state, dispatch, appContext, lookupAction, lookupSy
|
|
|
32
32
|
}
|
|
33
33
|
// --- A TextNode value may contain nexted expressions, so we extract it.
|
|
34
34
|
if (node.type === "TextNode") {
|
|
35
|
-
|
|
35
|
+
const extractedValue = (0, extractParam_1.extractParam)(state, nodeValue, appContext, true);
|
|
36
|
+
return typeof extractedValue === "boolean" ? extractedValue.toString() : extractedValue;
|
|
36
37
|
}
|
|
37
38
|
// --- Rendering a Slot requires some preparations, as TextNode and
|
|
38
39
|
// --- TextNodeCData are virtual nodes. Also, slots may have default templates
|
|
@@ -25,7 +25,7 @@ function resolveLayoutProps(layoutProps = constants_1.EMPTY_OBJECT, layoutContex
|
|
|
25
25
|
}
|
|
26
26
|
// --- Dimensions
|
|
27
27
|
collectCss("width");
|
|
28
|
-
const horizontalStarSize =
|
|
28
|
+
const horizontalStarSize = getHorizontalStarSize(result.cssProps.width, layoutContext);
|
|
29
29
|
if (horizontalStarSize !== null) {
|
|
30
30
|
// --- We use "flex" when width is in start-size and allow shrinking
|
|
31
31
|
result.cssProps.flex = horizontalStarSize;
|
|
@@ -34,7 +34,7 @@ function resolveLayoutProps(layoutProps = constants_1.EMPTY_OBJECT, layoutContex
|
|
|
34
34
|
collectCss("minWidth");
|
|
35
35
|
collectCss("maxWidth");
|
|
36
36
|
collectCss("height");
|
|
37
|
-
const verticalStarSize =
|
|
37
|
+
const verticalStarSize = getVerticalStarSize(result.cssProps.height, layoutContext);
|
|
38
38
|
if (verticalStarSize !== null) {
|
|
39
39
|
// --- We use "flex" when width is in start-size and allow shrinking
|
|
40
40
|
result.cssProps.flex = verticalStarSize;
|
|
@@ -236,7 +236,7 @@ function resolveLayoutProps(layoutProps = constants_1.EMPTY_OBJECT, layoutContex
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
// --- Checks if the specified size is a star size and the orientation is horizontal
|
|
239
|
-
function
|
|
239
|
+
function getHorizontalStarSize(size, layoutContext) {
|
|
240
240
|
if (!size)
|
|
241
241
|
return null;
|
|
242
242
|
const orientation = getOrientation(layoutContext);
|
|
@@ -245,7 +245,7 @@ function resolveLayoutProps(layoutProps = constants_1.EMPTY_OBJECT, layoutContex
|
|
|
245
245
|
: null;
|
|
246
246
|
}
|
|
247
247
|
// --- Checks if the specified size is a star size and the orientation is vertical
|
|
248
|
-
function
|
|
248
|
+
function getVerticalStarSize(size, layoutContext) {
|
|
249
249
|
if (!size)
|
|
250
250
|
return null;
|
|
251
251
|
const orientation = getOrientation(layoutContext);
|
|
@@ -188,6 +188,13 @@ function resolveAndCleanProps(props, extractValue, layoutCss = {}, resourceExtra
|
|
|
188
188
|
delete resultProps.radiusTopRight;
|
|
189
189
|
delete resultProps.radiusBottomLeft;
|
|
190
190
|
delete resultProps.radiusBottomRight;
|
|
191
|
+
// --- Delete pseudo CSS properties
|
|
192
|
+
delete resultProps.paddingHorizontal;
|
|
193
|
+
delete resultProps.paddingVertical;
|
|
194
|
+
delete resultProps.marginHorizontal;
|
|
195
|
+
delete resultProps.marginVertical;
|
|
196
|
+
delete resultProps.borderHorizontal;
|
|
197
|
+
delete resultProps.borderVertical;
|
|
191
198
|
return result;
|
|
192
199
|
}
|
|
193
200
|
/**
|
package/dist/xmlui-metadata.mjs
CHANGED
|
@@ -5224,7 +5224,7 @@ function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
|
5224
5224
|
result.cssProps.flexShrink = 0;
|
|
5225
5225
|
}
|
|
5226
5226
|
collectCss("width");
|
|
5227
|
-
const horizontalStarSize =
|
|
5227
|
+
const horizontalStarSize = getHorizontalStarSize(result.cssProps.width, layoutContext);
|
|
5228
5228
|
if (horizontalStarSize !== null) {
|
|
5229
5229
|
result.cssProps.flex = horizontalStarSize;
|
|
5230
5230
|
result.cssProps.flexShrink = 1;
|
|
@@ -5232,7 +5232,7 @@ function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
|
5232
5232
|
collectCss("minWidth");
|
|
5233
5233
|
collectCss("maxWidth");
|
|
5234
5234
|
collectCss("height");
|
|
5235
|
-
const verticalStarSize =
|
|
5235
|
+
const verticalStarSize = getVerticalStarSize(result.cssProps.height, layoutContext);
|
|
5236
5236
|
if (verticalStarSize !== null) {
|
|
5237
5237
|
result.cssProps.flex = verticalStarSize;
|
|
5238
5238
|
result.cssProps.flexShrink = 1;
|
|
@@ -5416,12 +5416,12 @@ function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
|
5416
5416
|
result.cssProps[propCssName || prop] = value;
|
|
5417
5417
|
}
|
|
5418
5418
|
}
|
|
5419
|
-
function
|
|
5419
|
+
function getHorizontalStarSize(size, layoutContext2) {
|
|
5420
5420
|
if (!size) return null;
|
|
5421
5421
|
const orientation = getOrientation(layoutContext2);
|
|
5422
5422
|
return orientation === "horizontal" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
5423
5423
|
}
|
|
5424
|
-
function
|
|
5424
|
+
function getVerticalStarSize(size, layoutContext2) {
|
|
5425
5425
|
if (!size) return null;
|
|
5426
5426
|
const orientation = getOrientation(layoutContext2);
|
|
5427
5427
|
return orientation === "vertical" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
@@ -12680,7 +12680,7 @@ const ComboboxOption = forwardRef(function Combobox(option, forwardedRef) {
|
|
|
12680
12680
|
},
|
|
12681
12681
|
"data-state": selected2 ? "checked" : void 0,
|
|
12682
12682
|
keywords,
|
|
12683
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$o.multiComboboxOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2, keywords }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12683
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$o.multiComboboxOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2, keywords }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12684
12684
|
optionLabelRenderer ? optionLabelRenderer({ label: label2, value }) : label2,
|
|
12685
12685
|
selected2 && /* @__PURE__ */ jsx(Icon, { name: "checkmark" })
|
|
12686
12686
|
] }) })
|
|
@@ -12708,7 +12708,7 @@ const SelectOption = React__default.forwardRef(
|
|
|
12708
12708
|
(option, ref) => {
|
|
12709
12709
|
const { value, label: label2, enabled: enabled2 = true } = option;
|
|
12710
12710
|
const { onOptionRemove, onOptionAdd } = useOption();
|
|
12711
|
-
const { optionLabelRenderer, optionRenderer } = useSelect();
|
|
12711
|
+
const { optionLabelRenderer, optionRenderer, value: selectedValue } = useSelect();
|
|
12712
12712
|
useLayoutEffect(() => {
|
|
12713
12713
|
onOptionAdd(option);
|
|
12714
12714
|
return () => onOptionRemove(option);
|
|
@@ -12717,7 +12717,7 @@ const SelectOption = React__default.forwardRef(
|
|
|
12717
12717
|
label: label2,
|
|
12718
12718
|
value,
|
|
12719
12719
|
enabled: enabled2
|
|
12720
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12720
|
+
}, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12721
12721
|
/* @__PURE__ */ jsx(ItemText, { className: styles$o.selectItemContent, children: optionLabelRenderer ? optionLabelRenderer({ value, label: label2 }) : label2 }),
|
|
12722
12722
|
/* @__PURE__ */ jsx("span", { className: styles$o.selectItemIndicator, children: /* @__PURE__ */ jsx(ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, { name: "checkmark" }) }) })
|
|
12723
12723
|
] }) }) });
|
|
@@ -18297,6 +18297,10 @@ const DataSourceMd = createMetadata({
|
|
|
18297
18297
|
},
|
|
18298
18298
|
nextPageSelector: {
|
|
18299
18299
|
description: `When using \`${COMP$a}\` with paging, the response may contain information about the previous and next page. This property defines the selector that extracts the next page information from the response deserialized to an object.`
|
|
18300
|
+
},
|
|
18301
|
+
structuralSharing: {
|
|
18302
|
+
description: "This property allows structural sharing. When turned on, `DataSource` will keep the original reference if nothing has changed in the data. If a subset has changed, `DataSource` will keep the unchanged parts and only replace the changed parts. If you do not need this behavior, set this property to `false`.",
|
|
18303
|
+
defaultValue: "true"
|
|
18300
18304
|
}
|
|
18301
18305
|
},
|
|
18302
18306
|
events: {
|
|
@@ -18306,7 +18310,9 @@ const DataSourceMd = createMetadata({
|
|
|
18306
18310
|
error: d(`This event fires when a request results in an error.`)
|
|
18307
18311
|
},
|
|
18308
18312
|
apis: {
|
|
18309
|
-
value: d(
|
|
18313
|
+
value: d(
|
|
18314
|
+
"This property retrieves the data queried from the source after optional transformations."
|
|
18315
|
+
),
|
|
18310
18316
|
inProgress: d("This property indicates if the data is being fetched."),
|
|
18311
18317
|
isRefetching: d("This property indicates if the data is being re-fetched."),
|
|
18312
18318
|
loaded: d("This property indicates if the data has been loaded."),
|
|
@@ -5221,7 +5221,7 @@
|
|
|
5221
5221
|
result.cssProps.flexShrink = 0;
|
|
5222
5222
|
}
|
|
5223
5223
|
collectCss("width");
|
|
5224
|
-
const horizontalStarSize =
|
|
5224
|
+
const horizontalStarSize = getHorizontalStarSize(result.cssProps.width, layoutContext);
|
|
5225
5225
|
if (horizontalStarSize !== null) {
|
|
5226
5226
|
result.cssProps.flex = horizontalStarSize;
|
|
5227
5227
|
result.cssProps.flexShrink = 1;
|
|
@@ -5229,7 +5229,7 @@
|
|
|
5229
5229
|
collectCss("minWidth");
|
|
5230
5230
|
collectCss("maxWidth");
|
|
5231
5231
|
collectCss("height");
|
|
5232
|
-
const verticalStarSize =
|
|
5232
|
+
const verticalStarSize = getVerticalStarSize(result.cssProps.height, layoutContext);
|
|
5233
5233
|
if (verticalStarSize !== null) {
|
|
5234
5234
|
result.cssProps.flex = verticalStarSize;
|
|
5235
5235
|
result.cssProps.flexShrink = 1;
|
|
@@ -5413,12 +5413,12 @@
|
|
|
5413
5413
|
result.cssProps[propCssName || prop] = value;
|
|
5414
5414
|
}
|
|
5415
5415
|
}
|
|
5416
|
-
function
|
|
5416
|
+
function getHorizontalStarSize(size, layoutContext2) {
|
|
5417
5417
|
if (!size) return null;
|
|
5418
5418
|
const orientation = getOrientation(layoutContext2);
|
|
5419
5419
|
return orientation === "horizontal" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
5420
5420
|
}
|
|
5421
|
-
function
|
|
5421
|
+
function getVerticalStarSize(size, layoutContext2) {
|
|
5422
5422
|
if (!size) return null;
|
|
5423
5423
|
const orientation = getOrientation(layoutContext2);
|
|
5424
5424
|
return orientation === "vertical" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
@@ -12677,7 +12677,7 @@
|
|
|
12677
12677
|
},
|
|
12678
12678
|
"data-state": selected2 ? "checked" : void 0,
|
|
12679
12679
|
keywords,
|
|
12680
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$o.multiComboboxOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2, keywords }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12680
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$o.multiComboboxOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2, keywords }, selectedValue, false) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12681
12681
|
optionLabelRenderer ? optionLabelRenderer({ label: label2, value }) : label2,
|
|
12682
12682
|
selected2 && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "checkmark" })
|
|
12683
12683
|
] }) })
|
|
@@ -12705,7 +12705,7 @@
|
|
|
12705
12705
|
(option, ref) => {
|
|
12706
12706
|
const { value, label: label2, enabled: enabled2 = true } = option;
|
|
12707
12707
|
const { onOptionRemove, onOptionAdd } = useOption();
|
|
12708
|
-
const { optionLabelRenderer, optionRenderer } = useSelect();
|
|
12708
|
+
const { optionLabelRenderer, optionRenderer, value: selectedValue } = useSelect();
|
|
12709
12709
|
React.useLayoutEffect(() => {
|
|
12710
12710
|
onOptionAdd(option);
|
|
12711
12711
|
return () => onOptionRemove(option);
|
|
@@ -12714,7 +12714,7 @@
|
|
|
12714
12714
|
label: label2,
|
|
12715
12715
|
value,
|
|
12716
12716
|
enabled: enabled2
|
|
12717
|
-
}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12717
|
+
}, selectedValue, false) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12718
12718
|
/* @__PURE__ */ jsxRuntime.jsx(reactSelect.ItemText, { className: styles$o.selectItemContent, children: optionLabelRenderer ? optionLabelRenderer({ value, label: label2 }) : label2 }),
|
|
12719
12719
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$o.selectItemIndicator, children: /* @__PURE__ */ jsxRuntime.jsx(reactSelect.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "checkmark" }) }) })
|
|
12720
12720
|
] }) }) });
|
|
@@ -18294,6 +18294,10 @@
|
|
|
18294
18294
|
},
|
|
18295
18295
|
nextPageSelector: {
|
|
18296
18296
|
description: `When using \`${COMP$a}\` with paging, the response may contain information about the previous and next page. This property defines the selector that extracts the next page information from the response deserialized to an object.`
|
|
18297
|
+
},
|
|
18298
|
+
structuralSharing: {
|
|
18299
|
+
description: "This property allows structural sharing. When turned on, `DataSource` will keep the original reference if nothing has changed in the data. If a subset has changed, `DataSource` will keep the unchanged parts and only replace the changed parts. If you do not need this behavior, set this property to `false`.",
|
|
18300
|
+
defaultValue: "true"
|
|
18297
18301
|
}
|
|
18298
18302
|
},
|
|
18299
18303
|
events: {
|
|
@@ -18303,7 +18307,9 @@
|
|
|
18303
18307
|
error: d(`This event fires when a request results in an error.`)
|
|
18304
18308
|
},
|
|
18305
18309
|
apis: {
|
|
18306
|
-
value: d(
|
|
18310
|
+
value: d(
|
|
18311
|
+
"This property retrieves the data queried from the source after optional transformations."
|
|
18312
|
+
),
|
|
18307
18313
|
inProgress: d("This property indicates if the data is being fetched."),
|
|
18308
18314
|
isRefetching: d("This property indicates if the data is being re-fetched."),
|
|
18309
18315
|
loaded: d("This property indicates if the data has been loaded."),
|