@superblocksteam/library 2.0.0-next.32 → 2.0.0-next.33
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/{allPaths-BDjfzn82.js → allPaths-BVrg1pz2.js} +2 -2
- package/dist/{allPaths-BDjfzn82.js.map → allPaths-BVrg1pz2.js.map} +1 -1
- package/dist/{allPaths-BpeB2CxS.js → allPaths-EKlKXcmC.js} +2 -2
- package/dist/{allPaths-BpeB2CxS.js.map → allPaths-EKlKXcmC.js.map} +1 -1
- package/dist/{allPathsLoader-CnJzd6Xx.js → allPathsLoader-BY9j7WyS.js} +3 -3
- package/dist/{allPathsLoader-CnJzd6Xx.js.map → allPathsLoader-BY9j7WyS.js.map} +1 -1
- package/dist/{allPathsLoader-V4FREx0I.js → allPathsLoader-CwKpLPZa.js} +3 -3
- package/dist/{allPathsLoader-V4FREx0I.js.map → allPathsLoader-CwKpLPZa.js.map} +1 -1
- package/dist/{index-RG7SFiT3.js → index-BrVR4QxR.js} +280 -45
- package/dist/{index-RG7SFiT3.js.map → index-BrVR4QxR.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-ZzgI9e09.js → splitPathsBySizeLoader-BLG5xgfE.js} +2 -2
- package/dist/{splitPathsBySizeLoader-ZzgI9e09.js.map → splitPathsBySizeLoader-BLG5xgfE.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-D_n88SPK.js → splitPathsBySizeLoader-BcyuYAqD.js} +2 -2
- package/dist/{splitPathsBySizeLoader-D_n88SPK.js.map → splitPathsBySizeLoader-BcyuYAqD.js.map} +1 -1
- package/dist-types/edit-mode/default-table-data.d.ts +64 -0
- package/dist-types/lib/user-facing/components/table/components/table-data-download.d.ts +2 -2
- package/dist-types/lib/user-facing/components/table/components/table-footer.d.ts +2 -2
- package/dist-types/lib/user-facing/components/table/index.d.ts +6 -6
- package/dist-types/lib/user-facing/components/table/props.d.ts +6 -6
- package/dist-types/lib/user-facing/components/table/table-component.d.ts +1 -1
- package/dist-types/lib/user-facing/components/table/table-styles.d.ts +0 -1
- package/dist-types/lib/user-facing/components/table/types.d.ts +2 -4
- package/package.json +2 -2
|
@@ -2690,14 +2690,14 @@ function getLoaderFn$1(options) {
|
|
|
2690
2690
|
if (!(loader === "all")) return [3, 3];
|
|
2691
2691
|
return [4, import(
|
|
2692
2692
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
2693
|
-
"./allPathsLoader-
|
|
2693
|
+
"./allPathsLoader-BY9j7WyS.js"
|
|
2694
2694
|
)];
|
|
2695
2695
|
case 2:
|
|
2696
2696
|
return [2, _b2.sent().allPathsLoader];
|
|
2697
2697
|
case 3:
|
|
2698
2698
|
return [4, import(
|
|
2699
2699
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
2700
|
-
"./splitPathsBySizeLoader-
|
|
2700
|
+
"./splitPathsBySizeLoader-BLG5xgfE.js"
|
|
2701
2701
|
)];
|
|
2702
2702
|
case 4:
|
|
2703
2703
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -114804,6 +114804,178 @@ var KeyValuePropertyType = /* @__PURE__ */ ((KeyValuePropertyType2) => {
|
|
|
114804
114804
|
KeyValuePropertyType2["EMAIL"] = "email";
|
|
114805
114805
|
return KeyValuePropertyType2;
|
|
114806
114806
|
})(KeyValuePropertyType || {});
|
|
114807
|
+
const DEFAULT_TABLE_DATA = [
|
|
114808
|
+
{
|
|
114809
|
+
photo: "https://cdn.superblocks.com/sample-data/rachel_kim",
|
|
114810
|
+
name: "Rachel Kim",
|
|
114811
|
+
email: "rachel.kim89@gmail.com",
|
|
114812
|
+
role: "Vendor Partner",
|
|
114813
|
+
company: "Urban Threads Co.",
|
|
114814
|
+
status: "Active",
|
|
114815
|
+
date_joined: "2023-04-12",
|
|
114816
|
+
last_activity: "2025-06-07T16:20:00Z"
|
|
114817
|
+
},
|
|
114818
|
+
{
|
|
114819
|
+
photo: "https://cdn.superblocks.com/sample-data/daniel_vargas",
|
|
114820
|
+
name: "Daniel Vargas",
|
|
114821
|
+
email: "dvargas1984@yahoo.com",
|
|
114822
|
+
role: "Logistics Contact",
|
|
114823
|
+
company: "Vargas Freight Ltd.",
|
|
114824
|
+
status: "Pending",
|
|
114825
|
+
date_joined: "2024-01-23",
|
|
114826
|
+
last_activity: "2025-05-30T13:45:00Z"
|
|
114827
|
+
},
|
|
114828
|
+
{
|
|
114829
|
+
photo: "https://cdn.superblocks.com/sample-data/sophie_liu",
|
|
114830
|
+
name: "Sophie Liu",
|
|
114831
|
+
email: "sophie.liu.personal@gmail.com",
|
|
114832
|
+
role: "Retail Manager",
|
|
114833
|
+
company: "Modern Goods",
|
|
114834
|
+
status: "Active",
|
|
114835
|
+
date_joined: "2022-09-10",
|
|
114836
|
+
last_activity: "2025-06-08T09:03:00Z"
|
|
114837
|
+
},
|
|
114838
|
+
{
|
|
114839
|
+
photo: "https://cdn.superblocks.com/sample-data/omar_el-sayed",
|
|
114840
|
+
name: "Omar El-Sayed",
|
|
114841
|
+
email: "omarsayed78@hotmail.com",
|
|
114842
|
+
role: "Accounts Payable",
|
|
114843
|
+
company: "Sayed Textiles",
|
|
114844
|
+
status: "Inactive",
|
|
114845
|
+
date_joined: "2021-06-05",
|
|
114846
|
+
last_activity: "2024-12-18T11:40:00Z"
|
|
114847
|
+
},
|
|
114848
|
+
{
|
|
114849
|
+
photo: "https://cdn.superblocks.com/sample-data/grace_nguyen",
|
|
114850
|
+
name: "Grace Nguyen",
|
|
114851
|
+
email: "gracenguyen23@icloud.com",
|
|
114852
|
+
role: "Product Supplier",
|
|
114853
|
+
company: "Green Earth Supplies",
|
|
114854
|
+
status: "Active",
|
|
114855
|
+
date_joined: "2023-11-03",
|
|
114856
|
+
last_activity: "2025-06-08T17:28:00Z"
|
|
114857
|
+
},
|
|
114858
|
+
{
|
|
114859
|
+
photo: "https://cdn.superblocks.com/sample-data/alex_romero",
|
|
114860
|
+
name: "Alex Romero",
|
|
114861
|
+
email: "alex.romero@gmail.com",
|
|
114862
|
+
role: "Client Account Owner",
|
|
114863
|
+
company: "Romero & Co.",
|
|
114864
|
+
status: "Suspended",
|
|
114865
|
+
date_joined: "2022-02-28",
|
|
114866
|
+
last_activity: "2025-03-11T08:20:00Z"
|
|
114867
|
+
},
|
|
114868
|
+
{
|
|
114869
|
+
photo: "https://cdn.superblocks.com/sample-data/lena_schmidt",
|
|
114870
|
+
name: "Lena Schmidt",
|
|
114871
|
+
email: "lena_schmidt92@gmx.de",
|
|
114872
|
+
role: "Wholesale Contact",
|
|
114873
|
+
company: "Schmidt Imports",
|
|
114874
|
+
status: "Active",
|
|
114875
|
+
date_joined: "2021-12-01",
|
|
114876
|
+
last_activity: "2025-06-06T21:10:00Z"
|
|
114877
|
+
},
|
|
114878
|
+
{
|
|
114879
|
+
photo: "https://cdn.superblocks.com/sample-data/devon_price",
|
|
114880
|
+
name: "Devon Price",
|
|
114881
|
+
email: "devon.price22@aol.com",
|
|
114882
|
+
role: "Fulfillment Liaison",
|
|
114883
|
+
company: "DepotLink",
|
|
114884
|
+
status: "Active",
|
|
114885
|
+
date_joined: "2024-05-17",
|
|
114886
|
+
last_activity: "2025-06-08T10:42:00Z"
|
|
114887
|
+
},
|
|
114888
|
+
{
|
|
114889
|
+
photo: "https://cdn.superblocks.com/sample-data/isabella_rossi",
|
|
114890
|
+
name: "Isabella Rossi",
|
|
114891
|
+
email: "bella.rossi@gmail.com",
|
|
114892
|
+
role: "Procurement Agent",
|
|
114893
|
+
company: "Rossi Global Sourcing",
|
|
114894
|
+
status: "Pending",
|
|
114895
|
+
date_joined: "2023-07-19",
|
|
114896
|
+
last_activity: "2025-05-29T14:05:00Z"
|
|
114897
|
+
},
|
|
114898
|
+
{
|
|
114899
|
+
photo: "https://cdn.superblocks.com/sample-data/tariq_khan",
|
|
114900
|
+
name: "Tariq Khan",
|
|
114901
|
+
email: "tariq.khan92@protonmail.com",
|
|
114902
|
+
role: "International Ops Lead",
|
|
114903
|
+
company: "CrossPort Trade Inc.",
|
|
114904
|
+
status: "Active",
|
|
114905
|
+
date_joined: "2022-11-08",
|
|
114906
|
+
last_activity: "2025-06-08T16:11:00Z"
|
|
114907
|
+
},
|
|
114908
|
+
{
|
|
114909
|
+
photo: "https://cdn.superblocks.com/sample-data/emily_zhang",
|
|
114910
|
+
name: "Emily Zhang",
|
|
114911
|
+
email: "emilyzhang.home@gmail.com",
|
|
114912
|
+
role: "Logistics Coordinator",
|
|
114913
|
+
company: "Zhang Export Ltd.",
|
|
114914
|
+
status: "Active",
|
|
114915
|
+
date_joined: "2023-03-12",
|
|
114916
|
+
last_activity: "2025-06-08T19:02:00Z"
|
|
114917
|
+
}
|
|
114918
|
+
];
|
|
114919
|
+
const DEFAULT_TABLE_COLUMNS = {
|
|
114920
|
+
name: {
|
|
114921
|
+
columnType: "text",
|
|
114922
|
+
label: "Name"
|
|
114923
|
+
},
|
|
114924
|
+
email: {
|
|
114925
|
+
columnType: "email",
|
|
114926
|
+
label: "Email"
|
|
114927
|
+
},
|
|
114928
|
+
role: {
|
|
114929
|
+
columnType: "text",
|
|
114930
|
+
label: "Role"
|
|
114931
|
+
},
|
|
114932
|
+
company: {
|
|
114933
|
+
columnType: "text",
|
|
114934
|
+
label: "Company"
|
|
114935
|
+
},
|
|
114936
|
+
status: {
|
|
114937
|
+
columnType: "tags",
|
|
114938
|
+
tagDisplayConfig: {
|
|
114939
|
+
Active: {
|
|
114940
|
+
color: "#14CDB733"
|
|
114941
|
+
},
|
|
114942
|
+
Pending: {
|
|
114943
|
+
color: "#FF9F3533"
|
|
114944
|
+
},
|
|
114945
|
+
Inactive: {
|
|
114946
|
+
color: "#a6a0a033"
|
|
114947
|
+
},
|
|
114948
|
+
Suspended: {
|
|
114949
|
+
color: "#FF62A433"
|
|
114950
|
+
}
|
|
114951
|
+
},
|
|
114952
|
+
label: "Status"
|
|
114953
|
+
},
|
|
114954
|
+
date_joined: {
|
|
114955
|
+
columnType: "date",
|
|
114956
|
+
inputFormat: "YYYY-MM-DD",
|
|
114957
|
+
outputFormat: "MM-DD-YYYY",
|
|
114958
|
+
label: "Date joined"
|
|
114959
|
+
},
|
|
114960
|
+
last_activity: {
|
|
114961
|
+
columnType: "date",
|
|
114962
|
+
inputFormat: "YYYY-MM-DDTHH:mm:ssZ",
|
|
114963
|
+
outputFormat: "MM-DD-YYYY",
|
|
114964
|
+
label: "Last activity"
|
|
114965
|
+
},
|
|
114966
|
+
photo: {
|
|
114967
|
+
columnType: "image",
|
|
114968
|
+
label: "Photo"
|
|
114969
|
+
}
|
|
114970
|
+
};
|
|
114971
|
+
const DEFAULT_TABLE_KEYS = Object.keys(DEFAULT_TABLE_COLUMNS);
|
|
114972
|
+
const CLEARED_TABLE_COLUMNS = DEFAULT_TABLE_KEYS.reduce(
|
|
114973
|
+
(acc, key2) => {
|
|
114974
|
+
acc[key2] = void 0;
|
|
114975
|
+
return acc;
|
|
114976
|
+
},
|
|
114977
|
+
{}
|
|
114978
|
+
);
|
|
114807
114979
|
function getParentInfo(parent) {
|
|
114808
114980
|
const parentComponentMeta = getEditStore().runtimeEntitiesManager.getAnyEditorWidgetMeta(parent.id);
|
|
114809
114981
|
const isParentGridLike = isWidgetGrid(parentComponentMeta);
|
|
@@ -115049,6 +115221,12 @@ function getComponentBaseProperties(componentType, parentInfo) {
|
|
|
115049
115221
|
case "SbSection":
|
|
115050
115222
|
children = getSectionChildren();
|
|
115051
115223
|
break;
|
|
115224
|
+
case "SbTable":
|
|
115225
|
+
properties2.tableData = Property.Static(DEFAULT_TABLE_DATA);
|
|
115226
|
+
properties2.columns = Property.Static(DEFAULT_TABLE_COLUMNS);
|
|
115227
|
+
properties2.header = Property.Static("Customers");
|
|
115228
|
+
properties2.searchPlaceholder = Property.Static("Search...");
|
|
115229
|
+
break;
|
|
115052
115230
|
}
|
|
115053
115231
|
return {
|
|
115054
115232
|
properties: properties2,
|
|
@@ -136644,10 +136822,6 @@ const HeaderCellContentWrapper = qe$1.div`
|
|
|
136644
136822
|
var _a2, _b2;
|
|
136645
136823
|
return ((_a2 = props == null ? void 0 : props.columnProperties) == null ? void 0 : _a2.horizontalAlign) && JUSTIFY_CONTENT[(_b2 = props == null ? void 0 : props.columnProperties) == null ? void 0 : _b2.horizontalAlign];
|
|
136646
136824
|
}};
|
|
136647
|
-
|
|
136648
|
-
span {
|
|
136649
|
-
${({ shouldCapitalize }) => shouldCapitalize && `text-transform: capitalize;`}
|
|
136650
|
-
}
|
|
136651
136825
|
`;
|
|
136652
136826
|
const TableIconWrapper = qe$1.div`
|
|
136653
136827
|
width: ${(props) => props.tableSizes.TABLE_FOOTER_HEIGHT}px;
|
|
@@ -143842,14 +144016,14 @@ function getLoaderFn(options) {
|
|
|
143842
144016
|
if (!(loader === "all")) return [3, 3];
|
|
143843
144017
|
return [4, import(
|
|
143844
144018
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
143845
|
-
"./allPathsLoader-
|
|
144019
|
+
"./allPathsLoader-CwKpLPZa.js"
|
|
143846
144020
|
)];
|
|
143847
144021
|
case 2:
|
|
143848
144022
|
return [2, _b2.sent().allPathsLoader];
|
|
143849
144023
|
case 3:
|
|
143850
144024
|
return [4, import(
|
|
143851
144025
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
143852
|
-
"./splitPathsBySizeLoader-
|
|
144026
|
+
"./splitPathsBySizeLoader-BcyuYAqD.js"
|
|
143853
144027
|
)];
|
|
143854
144028
|
case 4:
|
|
143855
144029
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -154822,7 +154996,7 @@ function getPageSize(props) {
|
|
|
154822
154996
|
const compactMode = getCompactMode(props.compactMode);
|
|
154823
154997
|
const componentHeight = ((_a2 = props == null ? void 0 : props.height) == null ? void 0 : _a2.mode) === "px" ? (_b2 = props == null ? void 0 : props.height) == null ? void 0 : _b2.value : (((_c2 = props == null ? void 0 : props.height) == null ? void 0 : _c2.value) ?? 0) * 12;
|
|
154824
154998
|
const tableSizes = TABLE_SIZES[compactMode];
|
|
154825
|
-
const headerHeight = props.isSearchable || props.
|
|
154999
|
+
const headerHeight = props.isSearchable || props.header || ((_d2 = props.hiddenColumns) == null ? void 0 : _d2.length) > 0 ? tableSizes.TABLE_HEADER_HEIGHT : 0;
|
|
154826
155000
|
const scrollbarSize = 8;
|
|
154827
155001
|
const mainHeight = (componentHeight ?? 100) - headerHeight - scrollbarSize - tableSizes.TABLE_FOOTER_HEIGHT - tableSizes.COLUMN_HEADER_HEIGHT;
|
|
154828
155002
|
const pageSize = Math.floor(mainHeight / (tableSizes.ROW_HEIGHT + 1));
|
|
@@ -155024,20 +155198,22 @@ function getFilteredTableData(props) {
|
|
|
155024
155198
|
});
|
|
155025
155199
|
}
|
|
155026
155200
|
};
|
|
155201
|
+
const searchText = props.searchText ?? "";
|
|
155027
155202
|
const getSearchKey = () => {
|
|
155028
|
-
if (
|
|
155029
|
-
return
|
|
155203
|
+
if (searchText && props.enableClientSideSearch !== false) {
|
|
155204
|
+
return searchText.toLowerCase();
|
|
155030
155205
|
}
|
|
155031
155206
|
return "";
|
|
155032
155207
|
};
|
|
155208
|
+
const filters = props.filters;
|
|
155033
155209
|
const finalTableData = sortedTableData.filter((item) => {
|
|
155034
155210
|
var _a3;
|
|
155035
155211
|
const searchFound = getSearchKey() ? Object.values(item).join(", ").toLowerCase().includes(getSearchKey()) : true;
|
|
155036
155212
|
if (!searchFound) return false;
|
|
155037
155213
|
for (const [columnName, { byValue, condition }] of Object.entries(
|
|
155038
|
-
(
|
|
155214
|
+
(filters == null ? void 0 : filters.byColumn) ?? {}
|
|
155039
155215
|
)) {
|
|
155040
|
-
const column2 = props.columns[columnName];
|
|
155216
|
+
const column2 = ((_a3 = props.columns) == null ? void 0 : _a3[columnName]) ?? {};
|
|
155041
155217
|
const value = item[columnName];
|
|
155042
155218
|
if (byValue) {
|
|
155043
155219
|
const columnType = column2 && column2.columnType ? column2.columnType : "text";
|
|
@@ -155145,12 +155321,53 @@ function getFilteredTableData(props) {
|
|
|
155145
155321
|
}
|
|
155146
155322
|
const propertiesDefinition$9 = {
|
|
155147
155323
|
general: Section.category(PropsPanelCategory.Content).children({
|
|
155148
|
-
|
|
155324
|
+
header: Prop.string().readAndWrite().default("").propertiesPanel({
|
|
155149
155325
|
label: "Header",
|
|
155150
155326
|
placeholder: "Table name",
|
|
155151
155327
|
helpText: "A header displayed at the top of the table"
|
|
155152
155328
|
}),
|
|
155153
|
-
tableData: Prop.array().
|
|
155329
|
+
tableData: Prop.array().onEdit(({ sourceId, updates, widgetMeta }) => {
|
|
155330
|
+
try {
|
|
155331
|
+
const [previousWidget, newWidget] = getPreviousAndCurrentWidgetProps(updates, widgetMeta);
|
|
155332
|
+
if (lodashExports.isEqual(previousWidget == null ? void 0 : previousWidget.tableData, DEFAULT_TABLE_DATA)) {
|
|
155333
|
+
let updatedTableData = newWidget == null ? void 0 : newWidget.tableData;
|
|
155334
|
+
if (typeof updatedTableData === "string") {
|
|
155335
|
+
updatedTableData = JSON.parse(updatedTableData);
|
|
155336
|
+
}
|
|
155337
|
+
if (!Array.isArray(updatedTableData) || typeof updatedTableData[0] !== "object") {
|
|
155338
|
+
return {
|
|
155339
|
+
[sourceId]: {
|
|
155340
|
+
props: {
|
|
155341
|
+
columns: Property.Static({})
|
|
155342
|
+
},
|
|
155343
|
+
meta: {}
|
|
155344
|
+
}
|
|
155345
|
+
};
|
|
155346
|
+
}
|
|
155347
|
+
const colKeys = Object.keys(updatedTableData[0] ?? {});
|
|
155348
|
+
if (!lodashExports.isEqual(colKeys, DEFAULT_TABLE_KEYS)) {
|
|
155349
|
+
return {
|
|
155350
|
+
[sourceId]: {
|
|
155351
|
+
props: {
|
|
155352
|
+
columns: Property.Static(CLEARED_TABLE_COLUMNS)
|
|
155353
|
+
},
|
|
155354
|
+
meta: {}
|
|
155355
|
+
}
|
|
155356
|
+
};
|
|
155357
|
+
}
|
|
155358
|
+
}
|
|
155359
|
+
return {};
|
|
155360
|
+
} catch (_e2) {
|
|
155361
|
+
return {
|
|
155362
|
+
[sourceId]: {
|
|
155363
|
+
props: {
|
|
155364
|
+
columns: Property.Static(CLEARED_TABLE_COLUMNS)
|
|
155365
|
+
},
|
|
155366
|
+
meta: {}
|
|
155367
|
+
}
|
|
155368
|
+
};
|
|
155369
|
+
}
|
|
155370
|
+
}).readable().propertiesPanel({
|
|
155154
155371
|
label: "Data",
|
|
155155
155372
|
placeholder: '[{ "col1": "val1" }]',
|
|
155156
155373
|
isJSConvertible: false,
|
|
@@ -155183,8 +155400,15 @@ const propertiesDefinition$9 = {
|
|
|
155183
155400
|
helpText: "Enable per column filtering"
|
|
155184
155401
|
}),
|
|
155185
155402
|
defaultFilters: Prop.any().readAndWrite().propertiesPanel({
|
|
155186
|
-
|
|
155187
|
-
|
|
155403
|
+
controlType: "COMPUTED_CODE_EDITOR",
|
|
155404
|
+
label: "Default filters",
|
|
155405
|
+
visibility: "SHOW_NAME",
|
|
155406
|
+
isJSConvertible: false,
|
|
155407
|
+
isRemovable: true,
|
|
155408
|
+
helpText: "Allows specifying the filters that will be used on page load",
|
|
155409
|
+
isVisible: function() {
|
|
155410
|
+
return this.isFilterable && this.pageType !== PaginationTypes.SERVER_SIDE;
|
|
155411
|
+
}
|
|
155188
155412
|
}),
|
|
155189
155413
|
// enableRowInsertion: Prop.boolean()
|
|
155190
155414
|
// .readAndWrite()
|
|
@@ -155235,14 +155459,17 @@ const propertiesDefinition$9 = {
|
|
|
155235
155459
|
]
|
|
155236
155460
|
}),
|
|
155237
155461
|
defaultSort: Prop.composite({
|
|
155238
|
-
|
|
155239
|
-
column: Prop.string().default("name").propertiesPanel({
|
|
155462
|
+
column: Prop.string().propertiesPanel({
|
|
155240
155463
|
label: "Column",
|
|
155241
155464
|
controlType: "SELECT_TABLE_COLUMN"
|
|
155242
155465
|
}),
|
|
155243
155466
|
asc: Prop.boolean().default(true).propertiesPanel({
|
|
155244
155467
|
label: "Order",
|
|
155245
|
-
controlType: "RADIO_BUTTON_GROUP"
|
|
155468
|
+
controlType: "RADIO_BUTTON_GROUP",
|
|
155469
|
+
options: [
|
|
155470
|
+
{ label: "Ascending", value: true },
|
|
155471
|
+
{ label: "Descending", value: false }
|
|
155472
|
+
]
|
|
155246
155473
|
})
|
|
155247
155474
|
}).propertiesPanel({
|
|
155248
155475
|
label: "Default sort",
|
|
@@ -155255,7 +155482,10 @@ const propertiesDefinition$9 = {
|
|
|
155255
155482
|
}),
|
|
155256
155483
|
defaultSearchText: Prop.string().readAndWrite().propertiesPanel({
|
|
155257
155484
|
label: "Default search",
|
|
155258
|
-
helpText: "Sets the default search text"
|
|
155485
|
+
helpText: "Sets the default search text",
|
|
155486
|
+
isVisible: function() {
|
|
155487
|
+
return this.enableClientSideSearch !== false;
|
|
155488
|
+
}
|
|
155259
155489
|
}),
|
|
155260
155490
|
searchPlaceholder: Prop.string().readAndWrite().propertiesPanel({
|
|
155261
155491
|
label: "Search placeholder",
|
|
@@ -155410,12 +155640,20 @@ const propertiesDefinition$9 = {
|
|
|
155410
155640
|
// editedRowIndices: Prop.any().readable().default(getEditedRowIndices),
|
|
155411
155641
|
}),
|
|
155412
155642
|
meta: Section.category(PropsPanelCategory.Meta).children({
|
|
155413
|
-
selectedRowIndex: Prop.number().readable()
|
|
155643
|
+
selectedRowIndex: Prop.number().readable().default(function() {
|
|
155644
|
+
return this.defaultSelectedRow;
|
|
155645
|
+
}),
|
|
155414
155646
|
selectedRowIndices: Prop.any().readable(),
|
|
155415
155647
|
pageNo: Prop.number().readable().default(() => 1),
|
|
155416
|
-
sortedColumn: Prop.any().readable()
|
|
155417
|
-
|
|
155418
|
-
|
|
155648
|
+
sortedColumn: Prop.any().readable().default(function() {
|
|
155649
|
+
return this.defaultSort;
|
|
155650
|
+
}),
|
|
155651
|
+
searchText: Prop.string().readable().default(function() {
|
|
155652
|
+
return this.defaultSearchText ?? "";
|
|
155653
|
+
}),
|
|
155654
|
+
filters: Prop.any().readable().default(function() {
|
|
155655
|
+
return this.defaultFilters;
|
|
155656
|
+
}),
|
|
155419
155657
|
hiddenColumns: Prop.any().readable(),
|
|
155420
155658
|
columnFreezes: Prop.any().readable(),
|
|
155421
155659
|
tagsColorAssignment: Prop.any().readable()
|
|
@@ -164887,11 +165125,11 @@ const TableDataDownload = ({
|
|
|
164887
165125
|
columns,
|
|
164888
165126
|
tableSizes,
|
|
164889
165127
|
widgetName,
|
|
164890
|
-
|
|
165128
|
+
header,
|
|
164891
165129
|
tableCellTextStyle
|
|
164892
165130
|
}) => {
|
|
164893
165131
|
const [selected, setSelected] = React__default.useState(false);
|
|
164894
|
-
const tableName =
|
|
165132
|
+
const tableName = header ? header : widgetName;
|
|
164895
165133
|
const fileName = tableName;
|
|
164896
165134
|
const handleSelectMenu = useCallback(() => {
|
|
164897
165135
|
setSelected(true);
|
|
@@ -165228,7 +165466,7 @@ const TableFooter = ({
|
|
|
165228
165466
|
tableColumns,
|
|
165229
165467
|
tableData,
|
|
165230
165468
|
filteredOrderMap,
|
|
165231
|
-
|
|
165469
|
+
header,
|
|
165232
165470
|
tableSizes,
|
|
165233
165471
|
borderColor,
|
|
165234
165472
|
updatePageNo,
|
|
@@ -165392,7 +165630,7 @@ const TableFooter = ({
|
|
|
165392
165630
|
columns: tableColumns,
|
|
165393
165631
|
widgetName,
|
|
165394
165632
|
tableSizes,
|
|
165395
|
-
|
|
165633
|
+
header,
|
|
165396
165634
|
tableCellTextStyle
|
|
165397
165635
|
}
|
|
165398
165636
|
),
|
|
@@ -167493,7 +167731,7 @@ const DescendingIcon = qe$1(SvgSort)`
|
|
|
167493
167731
|
}
|
|
167494
167732
|
`;
|
|
167495
167733
|
const TableHeaderCell = (props) => {
|
|
167496
|
-
var _a2
|
|
167734
|
+
var _a2;
|
|
167497
167735
|
const { column: column2, selectRows } = props;
|
|
167498
167736
|
const resizingColumnId = useRef("");
|
|
167499
167737
|
const handleSortColumn = () => {
|
|
@@ -167510,7 +167748,6 @@ const TableHeaderCell = (props) => {
|
|
|
167510
167748
|
defaultTextStyleVariant: TABLE_COLUMN_HEADER_DEFAULT_TYPOGRAPHY,
|
|
167511
167749
|
textStyle: props.columnHeaderProps
|
|
167512
167750
|
});
|
|
167513
|
-
const columnHeaderTextStyleHasTextTransform = ((_a2 = columnHeaderStyleProps == null ? void 0 : columnHeaderStyleProps.style) == null ? void 0 : _a2.textTransform) !== void 0 && ((_b2 = columnHeaderStyleProps == null ? void 0 : columnHeaderStyleProps.style) == null ? void 0 : _b2.textTransform) !== "none";
|
|
167514
167751
|
const { setColumnFilter } = props;
|
|
167515
167752
|
const setFilter = useCallback(
|
|
167516
167753
|
(filter2) => {
|
|
@@ -167572,7 +167809,6 @@ const TableHeaderCell = (props) => {
|
|
|
167572
167809
|
HeaderCellContentWrapper,
|
|
167573
167810
|
{
|
|
167574
167811
|
columnProperties: props.columnProperties,
|
|
167575
|
-
shouldCapitalize: !columnHeaderTextStyleHasTextTransform && props.columnName === column2.id,
|
|
167576
167812
|
style: columnHeaderStyleProps.style,
|
|
167577
167813
|
className: `${getTextCssClassFromVariant(
|
|
167578
167814
|
columnHeaderStyleProps.textStyleVariant
|
|
@@ -167598,23 +167834,23 @@ const TableHeaderCell = (props) => {
|
|
|
167598
167834
|
e3.stopPropagation();
|
|
167599
167835
|
},
|
|
167600
167836
|
onDragOver: (e3) => {
|
|
167601
|
-
var _a3,
|
|
167837
|
+
var _a3, _b2;
|
|
167602
167838
|
if (props.columnIndex !== props.mutableHeaderDragRef.current && props.mutableHeaderDragRef.current !== -1) {
|
|
167603
167839
|
if (props.mutableHeaderDragRef.current > props.columnIndex) {
|
|
167604
167840
|
(_a3 = parentRef.current) == null ? void 0 : _a3.classList.add("highlight-left");
|
|
167605
167841
|
} else if (props.mutableHeaderDragRef.current < props.columnIndex) {
|
|
167606
|
-
(
|
|
167842
|
+
(_b2 = parentRef.current) == null ? void 0 : _b2.classList.add("highlight-right");
|
|
167607
167843
|
}
|
|
167608
167844
|
}
|
|
167609
167845
|
e3.preventDefault();
|
|
167610
167846
|
},
|
|
167611
167847
|
onDragEnter: (e3) => {
|
|
167612
|
-
var _a3,
|
|
167848
|
+
var _a3, _b2;
|
|
167613
167849
|
if (props.columnIndex !== props.mutableHeaderDragRef.current && props.mutableHeaderDragRef.current !== -1) {
|
|
167614
167850
|
if (props.mutableHeaderDragRef.current > props.columnIndex) {
|
|
167615
167851
|
(_a3 = parentRef.current) == null ? void 0 : _a3.classList.add("highlight-left");
|
|
167616
167852
|
} else if (props.mutableHeaderDragRef.current < props.columnIndex) {
|
|
167617
|
-
(
|
|
167853
|
+
(_b2 = parentRef.current) == null ? void 0 : _b2.classList.add("highlight-right");
|
|
167618
167854
|
}
|
|
167619
167855
|
}
|
|
167620
167856
|
e3.preventDefault();
|
|
@@ -167666,7 +167902,7 @@ const TableHeaderCell = (props) => {
|
|
|
167666
167902
|
isFrozen: getIsColumnFrozen(
|
|
167667
167903
|
props.column.id,
|
|
167668
167904
|
props.columnFreezes,
|
|
167669
|
-
(
|
|
167905
|
+
(_a2 = props.columnProperties) == null ? void 0 : _a2.isFrozen
|
|
167670
167906
|
),
|
|
167671
167907
|
theme: props.theme,
|
|
167672
167908
|
updateProperty: props.updateProperty
|
|
@@ -168281,7 +168517,7 @@ const Table = (props) => {
|
|
|
168281
168517
|
const selectedRowIndices = props.selectedRowIndices || [];
|
|
168282
168518
|
const canDelete = props.isDeletionEnabled && (selectedRowIndices.length > 0 || selectedRowIndex != null && selectedRowIndex >= 0);
|
|
168283
168519
|
const hasFooter = props.pageType !== PaginationTypes.NONE || props.isDownloadable || props.numEdits != null && props.numEdits > 0 || props.isInsertionEnabled || canDelete;
|
|
168284
|
-
const hasHeader = props.isSearchable || !lodashExports.isEmpty(props.
|
|
168520
|
+
const hasHeader = props.isSearchable || !lodashExports.isEmpty(props.header) || props.hiddenColumns && ((_a2 = props.hiddenColumns) == null ? void 0 : _a2.length) > 0;
|
|
168285
168521
|
const pageSize = props.pageType === PaginationTypes.NONE ? props.tableData.length : props.pageSize;
|
|
168286
168522
|
const pageCount = Math.ceil(props.tableData.length / pageSize) || 1;
|
|
168287
168523
|
const currentPageIndex = props.pageNo < pageCount ? props.pageNo : 0;
|
|
@@ -168879,7 +169115,7 @@ const Table = (props) => {
|
|
|
168879
169115
|
searchKey: props.searchKey,
|
|
168880
169116
|
tableSizes,
|
|
168881
169117
|
compactMode: getCompactMode(props.compactMode),
|
|
168882
|
-
title: props.
|
|
169118
|
+
title: props.header,
|
|
168883
169119
|
columns: props.columns,
|
|
168884
169120
|
hiddenColumns: props.hiddenColumns,
|
|
168885
169121
|
searchPlaceholder: props.searchPlaceholder,
|
|
@@ -169032,7 +169268,7 @@ const Table = (props) => {
|
|
|
169032
169268
|
tableColumns: props.columns,
|
|
169033
169269
|
tableData: props.tableData,
|
|
169034
169270
|
filteredOrderMap: props.filteredOrderMap,
|
|
169035
|
-
|
|
169271
|
+
header: props.header,
|
|
169036
169272
|
tableSizes,
|
|
169037
169273
|
updatePageNo: props.updatePageNo,
|
|
169038
169274
|
widgetName: props.widgetName,
|
|
@@ -170657,7 +170893,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
170657
170893
|
isSearchable: this.props.isSearchable,
|
|
170658
170894
|
isDownloadable: this.props.isDownloadable,
|
|
170659
170895
|
isFilterable: this.props.isFilterable,
|
|
170660
|
-
|
|
170896
|
+
header: this.props.header,
|
|
170661
170897
|
hiddenColumns: this.props.hiddenColumns ?? [],
|
|
170662
170898
|
columnFreezes: this.props.columnFreezes ?? {},
|
|
170663
170899
|
numEdits,
|
|
@@ -170951,13 +171187,12 @@ const SbTable = registerSbComponent(
|
|
|
170951
171187
|
...props,
|
|
170952
171188
|
enableRowInsertion: false,
|
|
170953
171189
|
enableRowDeletion: false,
|
|
170954
|
-
defaultSearchText: props.defaultSearchText ?? "",
|
|
170955
171190
|
searchPlaceholder: props.searchPlaceholder ?? "",
|
|
170956
171191
|
searchText: props.searchText ?? "",
|
|
170957
171192
|
pageType: props.pageType,
|
|
170958
171193
|
columns: transformedColumns,
|
|
170959
|
-
|
|
170960
|
-
|
|
171194
|
+
filters: props.filters ?? EMPTY_OBJ,
|
|
171195
|
+
header: props.header ?? "",
|
|
170961
171196
|
tableData: props.tableData ?? EMPTY_ARRAY,
|
|
170962
171197
|
currentEditDropdownSearchText: props.currentEditDropdownSearchText,
|
|
170963
171198
|
selectedRowIndices: props.selectedRowIndices ?? EMPTY_ARRAY,
|
|
@@ -190292,4 +190527,4 @@ export {
|
|
|
190292
190527
|
copyToClipboard as y,
|
|
190293
190528
|
navigateTo as z
|
|
190294
190529
|
};
|
|
190295
|
-
//# sourceMappingURL=index-
|
|
190530
|
+
//# sourceMappingURL=index-BrVR4QxR.js.map
|