@fctc/sme-widget-ui 2.7.5 → 2.7.6
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/index.js +19 -2
- package/dist/index.mjs +19 -2
- package/dist/widgets.js +19 -2
- package/dist/widgets.mjs +19 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15678,7 +15678,7 @@ var PopupFilter = ({
|
|
|
15678
15678
|
right: 0,
|
|
15679
15679
|
zIndex: 33
|
|
15680
15680
|
},
|
|
15681
|
-
className: "popup-filter w-full overflow-x-auto rounded-lg border bg-white
|
|
15681
|
+
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
15682
15682
|
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
15683
15683
|
"div",
|
|
15684
15684
|
{
|
|
@@ -16031,8 +16031,9 @@ var Search = ({
|
|
|
16031
16031
|
const searchDefaults = Object.entries(context || {}).filter(
|
|
16032
16032
|
([key]) => key.startsWith("search_default_")
|
|
16033
16033
|
);
|
|
16034
|
+
const defaultGroupBy = context ? Object.entries(context).filter(([key]) => key.includes("group_by")) : [];
|
|
16034
16035
|
const hasGroupBy = viewData?.views?.search?.filters_by?.length > 0;
|
|
16035
|
-
if (searchDefaults.length === 0 && !hasGroupBy) {
|
|
16036
|
+
if (searchDefaults.length === 0 && !hasGroupBy && defaultGroupBy?.length === 0) {
|
|
16036
16037
|
setIsReadyFormatDomain(true);
|
|
16037
16038
|
setDidInit(true);
|
|
16038
16039
|
return;
|
|
@@ -16053,7 +16054,23 @@ var Search = ({
|
|
|
16053
16054
|
}
|
|
16054
16055
|
return item;
|
|
16055
16056
|
});
|
|
16057
|
+
const updatedGroupBy = groupBy?.map((item) => {
|
|
16058
|
+
const defaultGroupByItem = defaultGroupBy.find(
|
|
16059
|
+
([_2, value]) => item?.context?.includes(value)
|
|
16060
|
+
);
|
|
16061
|
+
if (defaultGroupByItem && typeof handleAddTagSearch == "function") {
|
|
16062
|
+
handleAddTagSearch({
|
|
16063
|
+
name: item?.name,
|
|
16064
|
+
value: item?.string,
|
|
16065
|
+
type: SearchType.GROUP,
|
|
16066
|
+
context: JSON.parse(item?.context.replace(/'/g, '"'))
|
|
16067
|
+
});
|
|
16068
|
+
return { ...item, active: true };
|
|
16069
|
+
}
|
|
16070
|
+
return item;
|
|
16071
|
+
});
|
|
16056
16072
|
if (updatedFilter) setFilterBy(updatedFilter);
|
|
16073
|
+
if (updatedGroupBy) setGroupBy(updatedGroupBy);
|
|
16057
16074
|
if (hasGroupBy) {
|
|
16058
16075
|
viewData?.views?.search?.filters_by?.forEach((item, idx) => {
|
|
16059
16076
|
const groupCtx = evalJSONContext(item?.context);
|
package/dist/index.mjs
CHANGED
|
@@ -15551,7 +15551,7 @@ var PopupFilter = ({
|
|
|
15551
15551
|
right: 0,
|
|
15552
15552
|
zIndex: 33
|
|
15553
15553
|
},
|
|
15554
|
-
className: "popup-filter w-full overflow-x-auto rounded-lg border bg-white
|
|
15554
|
+
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
15555
15555
|
children: /* @__PURE__ */ jsxs38(
|
|
15556
15556
|
"div",
|
|
15557
15557
|
{
|
|
@@ -15904,8 +15904,9 @@ var Search = ({
|
|
|
15904
15904
|
const searchDefaults = Object.entries(context || {}).filter(
|
|
15905
15905
|
([key]) => key.startsWith("search_default_")
|
|
15906
15906
|
);
|
|
15907
|
+
const defaultGroupBy = context ? Object.entries(context).filter(([key]) => key.includes("group_by")) : [];
|
|
15907
15908
|
const hasGroupBy = viewData?.views?.search?.filters_by?.length > 0;
|
|
15908
|
-
if (searchDefaults.length === 0 && !hasGroupBy) {
|
|
15909
|
+
if (searchDefaults.length === 0 && !hasGroupBy && defaultGroupBy?.length === 0) {
|
|
15909
15910
|
setIsReadyFormatDomain(true);
|
|
15910
15911
|
setDidInit(true);
|
|
15911
15912
|
return;
|
|
@@ -15926,7 +15927,23 @@ var Search = ({
|
|
|
15926
15927
|
}
|
|
15927
15928
|
return item;
|
|
15928
15929
|
});
|
|
15930
|
+
const updatedGroupBy = groupBy?.map((item) => {
|
|
15931
|
+
const defaultGroupByItem = defaultGroupBy.find(
|
|
15932
|
+
([_2, value]) => item?.context?.includes(value)
|
|
15933
|
+
);
|
|
15934
|
+
if (defaultGroupByItem && typeof handleAddTagSearch == "function") {
|
|
15935
|
+
handleAddTagSearch({
|
|
15936
|
+
name: item?.name,
|
|
15937
|
+
value: item?.string,
|
|
15938
|
+
type: SearchType.GROUP,
|
|
15939
|
+
context: JSON.parse(item?.context.replace(/'/g, '"'))
|
|
15940
|
+
});
|
|
15941
|
+
return { ...item, active: true };
|
|
15942
|
+
}
|
|
15943
|
+
return item;
|
|
15944
|
+
});
|
|
15929
15945
|
if (updatedFilter) setFilterBy(updatedFilter);
|
|
15946
|
+
if (updatedGroupBy) setGroupBy(updatedGroupBy);
|
|
15930
15947
|
if (hasGroupBy) {
|
|
15931
15948
|
viewData?.views?.search?.filters_by?.forEach((item, idx) => {
|
|
15932
15949
|
const groupCtx = evalJSONContext(item?.context);
|
package/dist/widgets.js
CHANGED
|
@@ -14681,7 +14681,7 @@ var PopupFilter = ({
|
|
|
14681
14681
|
right: 0,
|
|
14682
14682
|
zIndex: 33
|
|
14683
14683
|
},
|
|
14684
|
-
className: "popup-filter w-full overflow-x-auto rounded-lg border bg-white
|
|
14684
|
+
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
14685
14685
|
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
14686
14686
|
"div",
|
|
14687
14687
|
{
|
|
@@ -15280,8 +15280,9 @@ var Search = ({
|
|
|
15280
15280
|
const searchDefaults = Object.entries(context || {}).filter(
|
|
15281
15281
|
([key]) => key.startsWith("search_default_")
|
|
15282
15282
|
);
|
|
15283
|
+
const defaultGroupBy = context ? Object.entries(context).filter(([key]) => key.includes("group_by")) : [];
|
|
15283
15284
|
const hasGroupBy = viewData?.views?.search?.filters_by?.length > 0;
|
|
15284
|
-
if (searchDefaults.length === 0 && !hasGroupBy) {
|
|
15285
|
+
if (searchDefaults.length === 0 && !hasGroupBy && defaultGroupBy?.length === 0) {
|
|
15285
15286
|
setIsReadyFormatDomain(true);
|
|
15286
15287
|
setDidInit(true);
|
|
15287
15288
|
return;
|
|
@@ -15302,7 +15303,23 @@ var Search = ({
|
|
|
15302
15303
|
}
|
|
15303
15304
|
return item;
|
|
15304
15305
|
});
|
|
15306
|
+
const updatedGroupBy = groupBy?.map((item) => {
|
|
15307
|
+
const defaultGroupByItem = defaultGroupBy.find(
|
|
15308
|
+
([_2, value]) => item?.context?.includes(value)
|
|
15309
|
+
);
|
|
15310
|
+
if (defaultGroupByItem && typeof handleAddTagSearch == "function") {
|
|
15311
|
+
handleAddTagSearch({
|
|
15312
|
+
name: item?.name,
|
|
15313
|
+
value: item?.string,
|
|
15314
|
+
type: SearchType.GROUP,
|
|
15315
|
+
context: JSON.parse(item?.context.replace(/'/g, '"'))
|
|
15316
|
+
});
|
|
15317
|
+
return { ...item, active: true };
|
|
15318
|
+
}
|
|
15319
|
+
return item;
|
|
15320
|
+
});
|
|
15305
15321
|
if (updatedFilter) setFilterBy(updatedFilter);
|
|
15322
|
+
if (updatedGroupBy) setGroupBy(updatedGroupBy);
|
|
15306
15323
|
if (hasGroupBy) {
|
|
15307
15324
|
viewData?.views?.search?.filters_by?.forEach((item, idx) => {
|
|
15308
15325
|
const groupCtx = evalJSONContext(item?.context);
|
package/dist/widgets.mjs
CHANGED
|
@@ -14618,7 +14618,7 @@ var PopupFilter = ({
|
|
|
14618
14618
|
right: 0,
|
|
14619
14619
|
zIndex: 33
|
|
14620
14620
|
},
|
|
14621
|
-
className: "popup-filter w-full overflow-x-auto rounded-lg border bg-white
|
|
14621
|
+
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
14622
14622
|
children: /* @__PURE__ */ jsxs38(
|
|
14623
14623
|
"div",
|
|
14624
14624
|
{
|
|
@@ -15217,8 +15217,9 @@ var Search = ({
|
|
|
15217
15217
|
const searchDefaults = Object.entries(context || {}).filter(
|
|
15218
15218
|
([key]) => key.startsWith("search_default_")
|
|
15219
15219
|
);
|
|
15220
|
+
const defaultGroupBy = context ? Object.entries(context).filter(([key]) => key.includes("group_by")) : [];
|
|
15220
15221
|
const hasGroupBy = viewData?.views?.search?.filters_by?.length > 0;
|
|
15221
|
-
if (searchDefaults.length === 0 && !hasGroupBy) {
|
|
15222
|
+
if (searchDefaults.length === 0 && !hasGroupBy && defaultGroupBy?.length === 0) {
|
|
15222
15223
|
setIsReadyFormatDomain(true);
|
|
15223
15224
|
setDidInit(true);
|
|
15224
15225
|
return;
|
|
@@ -15239,7 +15240,23 @@ var Search = ({
|
|
|
15239
15240
|
}
|
|
15240
15241
|
return item;
|
|
15241
15242
|
});
|
|
15243
|
+
const updatedGroupBy = groupBy?.map((item) => {
|
|
15244
|
+
const defaultGroupByItem = defaultGroupBy.find(
|
|
15245
|
+
([_2, value]) => item?.context?.includes(value)
|
|
15246
|
+
);
|
|
15247
|
+
if (defaultGroupByItem && typeof handleAddTagSearch == "function") {
|
|
15248
|
+
handleAddTagSearch({
|
|
15249
|
+
name: item?.name,
|
|
15250
|
+
value: item?.string,
|
|
15251
|
+
type: SearchType.GROUP,
|
|
15252
|
+
context: JSON.parse(item?.context.replace(/'/g, '"'))
|
|
15253
|
+
});
|
|
15254
|
+
return { ...item, active: true };
|
|
15255
|
+
}
|
|
15256
|
+
return item;
|
|
15257
|
+
});
|
|
15242
15258
|
if (updatedFilter) setFilterBy(updatedFilter);
|
|
15259
|
+
if (updatedGroupBy) setGroupBy(updatedGroupBy);
|
|
15243
15260
|
if (hasGroupBy) {
|
|
15244
15261
|
viewData?.views?.search?.filters_by?.forEach((item, idx) => {
|
|
15245
15262
|
const groupCtx = evalJSONContext(item?.context);
|