globuswebcomponents 2.18.3 → 2.18.5
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/cjs/{gb-accordion-card_86.cjs.entry.js → gb-accordion-card_78.cjs.entry.js} +2906 -6271
- package/dist/cjs/gb-approval-modal.cjs.entry.js +5 -1
- package/dist/cjs/gb-approval-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/gb-filter-modal.gb-pagination.gb-pagination-button-group-base.gb-pagination-number-base.gb-portal.gb-table-header.gb-toggle.gb-toggle-base.entry.cjs.js.map +1 -0
- package/dist/cjs/gb-filter-modal_8.cjs.entry.js +2253 -0
- package/dist/cjs/gb-table.cjs.entry.js +1240 -0
- package/dist/cjs/gb-table.entry.cjs.js.map +1 -0
- package/dist/cjs/globuscomponents.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/reusableModels-_LRAKnsh.js.map +1 -1
- package/dist/collection/components/gb-approval-modal/gb-approval-modal.js +19 -1
- package/dist/collection/components/gb-approval-modal/gb-approval-modal.js.map +1 -1
- package/dist/collection/components/gb-button/readme.md +7 -0
- package/dist/collection/components/gb-date-picker/gb-date-picker.js +5 -2
- package/dist/collection/components/gb-date-picker/gb-date-picker.js.map +1 -1
- package/dist/collection/components/gb-detail-cell/gb-detail-cell.js +1 -1
- package/dist/collection/components/gb-detail-cell/gb-detail-cell.js.map +1 -1
- package/dist/collection/components/gb-input-field/gb-input-field.js +59 -16
- package/dist/collection/components/gb-input-field/gb-input-field.js.map +1 -1
- package/dist/collection/components/gb-sidebar/gb-sidebar.css +1 -0
- package/dist/collection/components/gb-table/gb-table.css +7 -0
- package/dist/collection/components/gb-table/gb-table.js +26 -20
- package/dist/collection/components/gb-table/gb-table.js.map +1 -1
- package/dist/collection/models/reusableModels.js.map +1 -1
- package/dist/components/gb-approval-modal.js +5 -1
- package/dist/components/gb-approval-modal.js.map +1 -1
- package/dist/components/gb-date-picker.js +1 -1
- package/dist/components/gb-detail-cell.js +1 -1
- package/dist/components/gb-detail-cell.js.map +1 -1
- package/dist/components/gb-filter-modal.js +1 -1
- package/dist/components/gb-header.js +1 -1
- package/dist/components/gb-input-dropdown-test.js +1 -1
- package/dist/components/gb-input-dropdown.js +1 -1
- package/dist/components/gb-input-field.js +1 -1
- package/dist/components/gb-pagination.js +1 -1
- package/dist/components/gb-rich-text.js +3 -3
- package/dist/components/gb-sidebar.js +1 -1
- package/dist/components/gb-sidebar.js.map +1 -1
- package/dist/components/gb-table-header.js +1 -1
- package/dist/components/gb-table.js +1 -1
- package/dist/components/gb-wysiwyg-toolbar.js +1 -1
- package/dist/components/{p-DQBORnne.js → p-6aww0fa8.js} +3 -3
- package/dist/components/{p-DQBORnne.js.map → p-6aww0fa8.js.map} +1 -1
- package/dist/components/{p-DsN3hb33.js → p-BD74vctU.js} +4 -4
- package/dist/components/{p-DsN3hb33.js.map → p-BD74vctU.js.map} +1 -1
- package/dist/components/{p-CzePcMXF.js → p-C2nwKlIB.js} +4 -4
- package/dist/components/{p-CzePcMXF.js.map → p-C2nwKlIB.js.map} +1 -1
- package/dist/components/{p-CsyLoHd6.js → p-CTisVkYS.js} +7 -4
- package/dist/components/p-CTisVkYS.js.map +1 -0
- package/dist/components/{p-DQOaeODg.js → p-DQyU_YBJ.js} +26 -24
- package/dist/components/p-DQyU_YBJ.js.map +1 -0
- package/dist/components/{p-CITjyuOY.js → p-DYpvfQik.js} +4 -4
- package/dist/components/{p-CITjyuOY.js.map → p-DYpvfQik.js.map} +1 -1
- package/dist/components/{p-BF-N7J8c.js → p-JNQBEWGY.js} +3 -3
- package/dist/components/{p-BF-N7J8c.js.map → p-JNQBEWGY.js.map} +1 -1
- package/dist/components/p-cHn6O-Kf.js.map +1 -1
- package/dist/components/{p-DtJfuVIF.js → p-q1BXlX2S.js} +40 -17
- package/dist/components/p-q1BXlX2S.js.map +1 -0
- package/dist/components/test-wrapper.js +7 -7
- package/dist/docs.json +70 -11
- package/dist/esm/{gb-accordion-card_86.entry.js → gb-accordion-card_78.entry.js} +2906 -6263
- package/dist/esm/gb-approval-modal.entry.js +5 -1
- package/dist/esm/gb-approval-modal.entry.js.map +1 -1
- package/dist/esm/gb-filter-modal.gb-pagination.gb-pagination-button-group-base.gb-pagination-number-base.gb-portal.gb-table-header.gb-toggle.gb-toggle-base.entry.js.map +1 -0
- package/dist/esm/gb-filter-modal_8.entry.js +2244 -0
- package/dist/esm/gb-table.entry.js +1238 -0
- package/dist/esm/gb-table.entry.js.map +1 -0
- package/dist/esm/globuscomponents.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/reusableModels-cHn6O-Kf.js.map +1 -1
- package/dist/globuscomponents/gb-approval-modal.entry.esm.js.map +1 -1
- package/dist/globuscomponents/gb-filter-modal.gb-pagination.gb-pagination-button-group-base.gb-pagination-number-base.gb-portal.gb-table-header.gb-toggle.gb-toggle-base.entry.esm.js.map +1 -0
- package/dist/globuscomponents/gb-table.entry.esm.js.map +1 -0
- package/dist/globuscomponents/globuscomponents.esm.js +1 -1
- package/dist/globuscomponents/{p-80902514.entry.js → p-18789dc0.entry.js} +2 -2
- package/dist/globuscomponents/p-18789dc0.entry.js.map +1 -0
- package/dist/globuscomponents/p-7b3bf29c.entry.js +2 -0
- package/dist/globuscomponents/p-7b3bf29c.entry.js.map +1 -0
- package/dist/globuscomponents/{p-1a215393.entry.js → p-9a44bc13.entry.js} +2 -2
- package/dist/globuscomponents/p-9a44bc13.entry.js.map +1 -0
- package/dist/globuscomponents/p-cHn6O-Kf.js.map +1 -1
- package/dist/globuscomponents/p-dbc76ebb.entry.js +2 -0
- package/dist/globuscomponents/p-dbc76ebb.entry.js.map +1 -0
- package/dist/globuscomponents/readme.md +7 -0
- package/dist/types/components/gb-approval-modal/gb-approval-modal.d.ts +2 -0
- package/dist/types/components/gb-input-field/gb-input-field.d.ts +2 -0
- package/dist/types/components/gb-table/gb-table.d.ts +2 -1
- package/dist/types/components.d.ts +23 -7
- package/dist/types/models/reusableModels.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/gb-detail-cell.cjs.entry.js +0 -94
- package/dist/cjs/gb-detail-cell.entry.cjs.js.map +0 -1
- package/dist/components/p-CsyLoHd6.js.map +0 -1
- package/dist/components/p-DQOaeODg.js.map +0 -1
- package/dist/components/p-DtJfuVIF.js.map +0 -1
- package/dist/esm/gb-detail-cell.entry.js +0 -92
- package/dist/esm/gb-detail-cell.entry.js.map +0 -1
- package/dist/globuscomponents/gb-detail-cell.entry.esm.js.map +0 -1
- package/dist/globuscomponents/p-1a215393.entry.js.map +0 -1
- package/dist/globuscomponents/p-80902514.entry.js.map +0 -1
- package/dist/globuscomponents/p-fbf22caa.entry.js +0 -2
- package/dist/globuscomponents/p-fbf22caa.entry.js.map +0 -1
|
@@ -2740,10 +2740,17 @@ thead {
|
|
|
2740
2740
|
}
|
|
2741
2741
|
.body_text {
|
|
2742
2742
|
width: 100%;
|
|
2743
|
+
}
|
|
2744
|
+
.body_text.text_truncate {
|
|
2745
|
+
display: block;
|
|
2743
2746
|
white-space: nowrap;
|
|
2744
2747
|
overflow: hidden;
|
|
2745
2748
|
text-overflow: ellipsis;
|
|
2746
2749
|
}
|
|
2750
|
+
.table_detail.cell_truncate {
|
|
2751
|
+
max-width: 0;
|
|
2752
|
+
overflow: hidden;
|
|
2753
|
+
}
|
|
2747
2754
|
.text_and_supporting_text {
|
|
2748
2755
|
display: flex;
|
|
2749
2756
|
flex-direction: column;
|
|
@@ -4,7 +4,7 @@ export class GbTable {
|
|
|
4
4
|
constructor() {
|
|
5
5
|
this.loading = false;
|
|
6
6
|
this.columns = [
|
|
7
|
-
// { key: 'id', label: '#', width: '
|
|
7
|
+
// { key: 'id', label: '#', width: '10rem', sortable: true, sortType: 'string', truncate: true, mobile: { position: 'top_left' } },
|
|
8
8
|
// { key: 'date', label: 'Date', value: row => row.date.toLocaleString(), mobile: { position: 'bottom_left' } },
|
|
9
9
|
// {
|
|
10
10
|
// key: 'name',
|
|
@@ -29,9 +29,9 @@ export class GbTable {
|
|
|
29
29
|
// key: 'status',
|
|
30
30
|
// label: 'Status',
|
|
31
31
|
// cellComponent: 'gb-button',
|
|
32
|
-
// cellProps: row => ({
|
|
33
|
-
// hierarchy: 'link_gray',
|
|
34
|
-
// size: 'md',
|
|
32
|
+
// cellProps: row => ({
|
|
33
|
+
// hierarchy: 'link_gray',
|
|
34
|
+
// size: 'md',
|
|
35
35
|
// icon: 'default',
|
|
36
36
|
// iconLeading: true,
|
|
37
37
|
// iconLeadingSwap: 'assets/view.svg'
|
|
@@ -600,9 +600,9 @@ export class GbTable {
|
|
|
600
600
|
this.isScrollable = newScrollable; // only update if different
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
async handleAction(action, row) {
|
|
603
|
+
async handleAction(action, row, disabled) {
|
|
604
604
|
// console.log('Action clicked:', action, row);
|
|
605
|
-
this.rowActionClicked.emit({ action, row });
|
|
605
|
+
this.rowActionClicked.emit({ action, row, disabled });
|
|
606
606
|
}
|
|
607
607
|
renderCell(col, row) {
|
|
608
608
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -673,9 +673,9 @@ export class GbTable {
|
|
|
673
673
|
if (col.hasAvatar) {
|
|
674
674
|
const avatarInitials = typeof col.cellAvatar.slots.initials === 'function' ? col.cellAvatar.slots.initials(row) : col.cellAvatar.slots.initials;
|
|
675
675
|
const avatarImage = typeof col.cellAvatar.slots.image === 'function' ? getAssetPath(col.cellAvatar.slots.image(row)) : getAssetPath(col.cellAvatar.slots.image);
|
|
676
|
-
return (h("div", { class: "avatar_cell" }, h("gb-avatar", { size: "sm", text: avatarInitials ? true : avatarImage ? false : null, "show-border": "false" }, h("h1", { slot: "initials" }, avatarInitials), h("img", { slot: "image", src: avatarImage })), h("p", { class: `body_text text-sm-regular ${resolvedClass}`, style: resolvedStyle }, value)));
|
|
676
|
+
return (h("div", { class: "avatar_cell" }, h("gb-avatar", { size: "sm", text: avatarInitials ? true : avatarImage ? false : null, "show-border": "false" }, h("h1", { slot: "initials" }, avatarInitials), h("img", { slot: "image", src: avatarImage })), h("p", { class: `body_text text-sm-regular ${col.truncate ? 'text_truncate' : ''} ${resolvedClass}`, style: resolvedStyle, title: col.truncate ? String(value !== null && value !== void 0 ? value : '') : undefined }, value)));
|
|
677
677
|
}
|
|
678
|
-
return (h(Fragment, null, h("p", { class: `body_text text-sm-regular ${resolvedClass}`, style: resolvedStyle }, value), supporting && (h("div", { class: "supporting" }, h("p", { class: "text-xs-regular" }, supporting)))));
|
|
678
|
+
return (h(Fragment, null, h("p", { class: `body_text text-sm-regular ${col.truncate ? 'text_truncate' : ''} ${resolvedClass}`, style: resolvedStyle, title: col.truncate ? String(value !== null && value !== void 0 ? value : '') : undefined }, value), supporting && (h("div", { class: "supporting" }, h("p", { class: "text-xs-regular" }, supporting)))));
|
|
679
679
|
}
|
|
680
680
|
getCellValue(col, row) {
|
|
681
681
|
if (col.value) {
|
|
@@ -934,15 +934,17 @@ export class GbTable {
|
|
|
934
934
|
this.toggleRow(row);
|
|
935
935
|
} }))), this.internalColumns
|
|
936
936
|
.filter(col => col.visible)
|
|
937
|
-
.map((col, index) => (h(Fragment, null, h("td", { style: { textAlign: col.align || 'left' }, class: `table_detail ${this.stickyFirstColumn && index === 0 ? 'sticky_left' : ''} ${this.isScrollable ? 'has_border' : ''}` }, this.renderCell(col, row))))), this.showActionsColumn && (h("td", { class: { table_detail: true, actions_cell: true, sticky_right: this.stickyLastColumn, has_border: this.isScrollable }, style: { width: '50px' } }, h(Fragment, null, h("div", { class: "action_buttons" }, this.rowActions.map(action => (h(Fragment, null, action.type === 'dropdown' ? (h("gb-button", { id: `gb-table-trigger-${rowIndex}`, ref: el => (this.actionButtonRefs[rowIndex] = el), class: "dropdown_button", hierarchy: "tertiary_gray", size: "md", icon: "only", iconLeading: true, iconLeadingSwap: "assets/more-horizontal.svg", onClick: e => {
|
|
937
|
+
.map((col, index) => (h(Fragment, null, h("td", { style: { textAlign: col.align || 'left' }, class: `table_detail ${col.truncate ? 'cell_truncate' : ''} ${this.stickyFirstColumn && index === 0 ? 'sticky_left' : ''} ${this.isScrollable ? 'has_border' : ''}` }, this.renderCell(col, row))))), this.showActionsColumn && (h("td", { class: { table_detail: true, actions_cell: true, sticky_right: this.stickyLastColumn, has_border: this.isScrollable }, style: { width: '50px' } }, h(Fragment, null, h("div", { class: "action_buttons" }, this.rowActions.map(action => (h(Fragment, null, action.type === 'dropdown' ? (h("gb-button", { id: `gb-table-trigger-${rowIndex}`, ref: el => (this.actionButtonRefs[rowIndex] = el), class: "dropdown_button", hierarchy: "tertiary_gray", size: "md", icon: "only", iconLeading: true, iconLeadingSwap: "assets/more-horizontal.svg", onClick: e => {
|
|
938
938
|
e.stopPropagation();
|
|
939
939
|
this.toggleDropdown(rowIndex);
|
|
940
940
|
} })) : action.type === 'custom' ? (this.renderCustomAction(row)) : (h("gb-button", { hierarchy: "tertiary_gray", size: "md", icon: "only", destructive: action.destructive, iconLeading: true, iconLeadingSwap: action.icon, onClick: e => {
|
|
941
941
|
e.stopPropagation();
|
|
942
942
|
this.handleAction(action.action, row);
|
|
943
943
|
} })))))), h(Fragment, null, this.openRowIndex === rowIndex && (h("gb-portal", { "anchor-id": `gb-table-trigger-${rowIndex}`, placement: this.dropdownPlacement, anchorEl: this.currentAnchorEl, boundaryEl: this.scrollContainer, dropdownHeight: requestAnimationFrame(() => this.dropdownRef.scrollHeight), open: true }, h("div", { class: "portal_dropdown_wrapper", ref: el => (this.dropdownRef = el) }, this.dropdownOptions.map(action => (h("gb-dropdown-items-with-shortcut", { icon: action.icon ? true : false, state: action.disabled ? StateEnum.Disabled : StateEnum.Default, label: action.label, "icon-src": action.icon, onClick: () => {
|
|
944
|
-
|
|
945
|
-
|
|
944
|
+
if (!action.disabled) {
|
|
945
|
+
this.handleAction(action.action, row, action.disabled ? true : false);
|
|
946
|
+
this.openRowIndex = null;
|
|
947
|
+
}
|
|
946
948
|
} })))))))))))))))));
|
|
947
949
|
}
|
|
948
950
|
renderGridView() {
|
|
@@ -1158,16 +1160,16 @@ export class GbTable {
|
|
|
1158
1160
|
window.removeEventListener('resize', this.checkViewport);
|
|
1159
1161
|
}
|
|
1160
1162
|
render() {
|
|
1161
|
-
return (h("div", { key: '
|
|
1163
|
+
return (h("div", { key: '7a7d945137c7931afafaf113cc45a9319f892339', class: `table_wrapper ${this.currentTableLayout}` }, this.tableHeaderConfig && (h("div", { key: 'd894bcf70764a845479d3743c5edcf76845c7755', class: `table-header ${this.currentTableLayout}` }, h("gb-table-header", { key: '553cd6160919a3f0fae9e0e2aa2d658b679f81dc', type: this.tableHeaderConfig.type, mode: this.tableHeaderConfig.datePickerMode, "table-heading": this.tableHeaderConfig.tableHeading, "table-heading-label": this.tableHeaderConfig.tableHeadingLabel, "show-search": this.tableHeaderConfig.showSearch, "show-date-filter": this.tableHeaderConfig.showDateFilter, "show-filter": this.tableHeaderConfig.showFilter, "show-export": this.tableHeaderConfig.showExport, "show-column-options": this.tableHeaderConfig.showColumnOptions, "show-refresh-button": this.tableHeaderConfig.showRefreshButton, "input-placeholder": this.tableHeaderConfig.inputPlaceholder, "date-picker-placeholder": this.tableHeaderConfig.datePickerPlaceholder, "show-entire-data": this.tableHeaderConfig.showEntireData, "show-layout-toggle": this.tableHeaderConfig.showLayoutToggle, "filter-state": Object.keys(this.appliedFilterValues).length > 0 ? 'applied' : 'default', "filter-count": Object.keys(this.appliedFilterValues).length, "export-button-state": this.tableHeaderConfig.exportButtonState, "pdf-state": this.tableHeaderConfig.pdfState, "csv-state": this.tableHeaderConfig.csvState, "pdf-sub-dropdown": this.tableHeaderConfig.pdfSubDropdown, "csv-sub-dropdown": this.tableHeaderConfig.csvSubDropdown, onInputValueChanged: this.emitSearchValue.bind(this), onDateChange: this.emitDateChange.bind(this), onColumnOptionsButtonClicked: this.columnOptionsButtonClicked(), onExportClicked: e => this.exportButtonClicked(e), onFilterButtonClicked: () => this.openFilterModal(), onRefreshButtonClicked: () => this.onRefreshButtonClicked(), onLayoutButtonClicked: e => this.switchTableLayout(e), onTableControlClicked: e => this.emitTableContolClickedEvent(e) }))), this.showColumnsPanel && this.columns.length > 0 && (h("div", { key: '31c5fc8987f26c3605c7459a0a991eccc803e5d1', class: "dialog", style: {
|
|
1162
1164
|
transform: `translate(${this.modalPosition.x}px, ${this.modalPosition.y}px)`,
|
|
1163
|
-
} }, h("div", { key: '
|
|
1165
|
+
} }, h("div", { key: '9ca28599f58c771a6bf7e08eb47ed4a422713759', class: "column-modal" }, h("div", { key: '34ccfe595dddc0c83c087745efc159b962b01b3e', class: "modal_header" }, h("div", { key: '48f8227eafeef3882788bc6781deb712ae7f051c', class: "modal_header_content", onPointerDown: this.onModalPointerDown }, h("h4", { key: '18108400f492ecf1d15fda27443a7f1a9a870427', class: "heading display-xs-semi-bold" }, "Column Options"), h("gb-button-close", { key: '4c737ca0fa8ad27f9f719046d991ad9006e1c657', class: "close_button", color: "gray", size: "sm", onClick: () => (this.showColumnsPanel = false) }))), h("div", { key: '0c2eed39994de713dd8b51116e69472503d69601', class: "content_wrapper" }, h("div", { key: 'a116a5141c64a7adcc01a0f84d7f936c61daa485', class: "modal_content" }, this.internalColumns.map((col, index) => (h("div", { class: "column_option", draggable: true, onDragStart: () => (this.draggedIndex = index), onDragOver: e => e.preventDefault(), onDrop: () => {
|
|
1164
1166
|
if (this.draggedIndex !== null && this.draggedIndex !== index) {
|
|
1165
1167
|
this.reorderColumns(this.draggedIndex, index);
|
|
1166
1168
|
}
|
|
1167
1169
|
this.draggedIndex = null;
|
|
1168
1170
|
} }, h("div", { class: "label_and_dragger" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { d: "M8 6H8.00635M8 12H8.00635M8 18H8.00635M15.9937 6H16M15.9937 12H16M15.9937 18H16", stroke: "var(--color-icon, #4B5565)", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), h("p", { class: "label text-md-regular" }, col.label)), h("gb-toggle", { size: "sm", state: StateEnum.Default, position: "right", pressed: col.visible, text: false, onToggleClicked: e => {
|
|
1169
1171
|
this.toggleColumn(e, col.key);
|
|
1170
|
-
} })))), h("div", { key: '
|
|
1172
|
+
} })))), h("div", { key: '16ebf2a250eaa9d622344451ce1ed6f741c2cbf3', class: "modal-actions" })))))), this.showFilterModalInternal && this.filterConfig && (h("div", { key: 'b6c28aa9011a895e28b4378eff32521c915bc9dc', class: `filter_modal_wrapper ${this.isFilterModalVisible ? 'open' : 'closing'}` }, h("gb-filter-modal", { key: 'eebbb0e57b77ea6462e99c4b2865327cd25b3adf', class: "filter_modal", filterConfig: this.mergedFilterConfig, onClose: e => {
|
|
1171
1173
|
e.stopPropagation();
|
|
1172
1174
|
this.closeFilterModal();
|
|
1173
1175
|
}, onApplyFilters: e => this.onApplyFilters(e), onClearFilters: () => this.handleClearFilters() }))), this.internalLoading ? (
|
|
@@ -1214,7 +1216,7 @@ export class GbTable {
|
|
|
1214
1216
|
? this.renderDesktopView()
|
|
1215
1217
|
: this.currentTableLayout === 'grid'
|
|
1216
1218
|
? this.renderGridView()
|
|
1217
|
-
: null)), this.paginationConfig && (h("div", { key: '
|
|
1219
|
+
: null)), this.paginationConfig && (h("div", { key: '2514588eedcb7fbc2a823e0a15f975af414ee7a9', class: `pagination ${this.currentTableLayout}` }, h("gb-pagination", { key: 'fa371043084ebb51bd3e81f8a9079c8c43b85a33', "entries-dropdown-menu-position": this.paginationConfig.entriesDropdownMenuPosition, "page-size": this.paginationConfig.paginationMode === 'internal' ? this.internalPageSize : this.paginationConfig.pageSize, "current-page": this.paginationConfig.paginationMode === 'internal' ? this.internalCurrentPage : this.paginationConfig.currentPage, "total-pages": this.totalPages, onPageItemSelected: this.handlePageChange.bind(this) }))), this.showToast && (h("gb-toast", { key: '7e9e75ae2726ecc6284801dbaaafb080667cb9c8', class: `toast ${this.toastVisible ? 'visible' : ''}`, color: "information", "main-text": this.filterMessage, breakpoint: "desktop", size: "floating", onClose: () => this.hideToast() }))));
|
|
1218
1220
|
}
|
|
1219
1221
|
static get is() { return "gb-table"; }
|
|
1220
1222
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1272,7 +1274,7 @@ export class GbTable {
|
|
|
1272
1274
|
},
|
|
1273
1275
|
"getter": false,
|
|
1274
1276
|
"setter": false,
|
|
1275
|
-
"defaultValue": "[\r\n // { key: 'id', label: '#', width: '
|
|
1277
|
+
"defaultValue": "[\r\n // { key: 'id', label: '#', width: '10rem', sortable: true, sortType: 'string', truncate: true, mobile: { position: 'top_left' } },\r\n // { key: 'date', label: 'Date', value: row => row.date.toLocaleString(), mobile: { position: 'bottom_left' } },\r\n // {\r\n // key: 'name',\r\n // label: 'Name',\r\n // sortable: true,\r\n // sortType: 'string',\r\n // helpIcon: true,\r\n // searchable: true,\r\n // hasAvatar: true,\r\n // cellAvatar: {\r\n // // image: '',\r\n // slots: {\r\n // // initials: row => row.name.split(' ').map((nm: string) => nm.charAt(0)),\r\n // image: row => row.image,\r\n // },\r\n // },\r\n // mobile: { position: 'top_right' },\r\n // },\r\n // { key: 'role', label: 'Role', searchable: true },\r\n // { key: 'amount', label: 'Amount', align: 'right', sortable: true, sortType: 'number', cellStyle: row => ({ color: row.amount > 200 ? 'green' : '' }) },\r\n // {\r\n // key: 'status',\r\n // label: 'Status',\r\n // cellComponent: 'gb-button',\r\n // cellProps: row => ({\r\n // hierarchy: 'link_gray',\r\n // size: 'md',\r\n // icon: 'default',\r\n // iconLeading: true,\r\n // iconLeadingSwap: 'assets/view.svg'\r\n // }),\r\n // cellEvent: 'buttonClicked',\r\n // cellSlots: {\r\n // default: {\r\n // tag: 'p',\r\n // content: row => row.status,\r\n // },\r\n // },\r\n // },\r\n ]"
|
|
1276
1278
|
},
|
|
1277
1279
|
"data": {
|
|
1278
1280
|
"type": "unknown",
|
|
@@ -1676,8 +1678,8 @@ export class GbTable {
|
|
|
1676
1678
|
"text": ""
|
|
1677
1679
|
},
|
|
1678
1680
|
"complexType": {
|
|
1679
|
-
"original": "{ action: string; row: any }",
|
|
1680
|
-
"resolved": "{ action: string; row: any; }",
|
|
1681
|
+
"original": "{ action: string; row: any; disabled: boolean }",
|
|
1682
|
+
"resolved": "{ action: string; row: any; disabled: boolean; }",
|
|
1681
1683
|
"references": {}
|
|
1682
1684
|
}
|
|
1683
1685
|
}, {
|
|
@@ -1856,7 +1858,7 @@ export class GbTable {
|
|
|
1856
1858
|
"text": ""
|
|
1857
1859
|
},
|
|
1858
1860
|
"complexType": {
|
|
1859
|
-
"original": "{ row: any
|
|
1861
|
+
"original": "{ row: any }",
|
|
1860
1862
|
"resolved": "{ row: any; }",
|
|
1861
1863
|
"references": {}
|
|
1862
1864
|
}
|
|
@@ -1866,7 +1868,7 @@ export class GbTable {
|
|
|
1866
1868
|
return {
|
|
1867
1869
|
"handleAction": {
|
|
1868
1870
|
"complexType": {
|
|
1869
|
-
"signature": "(action: string, row: any) => Promise<void>",
|
|
1871
|
+
"signature": "(action: string, row: any, disabled?: boolean) => Promise<void>",
|
|
1870
1872
|
"parameters": [{
|
|
1871
1873
|
"name": "action",
|
|
1872
1874
|
"type": "string",
|
|
@@ -1875,6 +1877,10 @@ export class GbTable {
|
|
|
1875
1877
|
"name": "row",
|
|
1876
1878
|
"type": "any",
|
|
1877
1879
|
"docs": ""
|
|
1880
|
+
}, {
|
|
1881
|
+
"name": "disabled",
|
|
1882
|
+
"type": "boolean",
|
|
1883
|
+
"docs": ""
|
|
1878
1884
|
}],
|
|
1879
1885
|
"references": {
|
|
1880
1886
|
"Promise": {
|