Skip to content

Commit

Permalink
Merge pull request #82 from poirazis:develop
Browse files Browse the repository at this point in the history
2.0.33-alpha
  • Loading branch information
poirazis authored Aug 14, 2024
2 parents 3cbd0b1 + 5297f98 commit a794f14
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 48 deletions.
Binary file modified bun.lockb
Binary file not shown.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bb-component-SuperTable",
"version": "2.0.32-alpha",
"version": "2.0.33-alpha",
"description": "A Fully Customizable Budibase Table Component",
"author": "Michael Poirazi",
"license": "MIT",
Expand All @@ -14,21 +14,21 @@
"@crownframework/svelte-error-boundary": "^1.0.3",
"svelte": "^4.2.18",
"svelte-fsm": "^1.2.0",
"svelte-legos": "^0.2.3"
"svelte-legos": "^0.2.4"
},
"devDependencies": {
"@budibase/backend-core": "^2.29.28",
"@budibase/bbui": "^2.29.28",
"@budibase/frontend-core": "^2.29.28",
"@budibase/shared-core": "^2.29.28",
"@budibase/backend-core": "^2.30.3",
"@budibase/bbui": "^2.30.3",
"@budibase/frontend-core": "^2.30.3",
"@budibase/shared-core": "^2.30.3",
"@rollup/plugin-commonjs": "^25.0.8",
"@rollup/plugin-image": "^3.0.3",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@spectrum-css/actionbar": "6.0.65",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.40",
"postcss": "^8.4.41",
"rollup": "^2.79.1",
"rollup-plugin-copy2": "^0.3.1",
"rollup-plugin-polyfill-node": "^0.8.0",
Expand Down
65 changes: 25 additions & 40 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,6 @@
"type": "select",
"key": "canInsert",
"label": "Add Row",
"showInBar": true,
"barStyle": "buttons",
"barTitle": "Add Row",
"options": [
{ "label": "Off", "value": false, "barIcon": "Add" },
{
Expand All @@ -259,9 +256,6 @@
"dependsOn": "isTable",
"key": "canEdit",
"label": "Edit Row",
"showInBar": true,
"barStyle": "buttons",
"barTitle": "Editing",
"options": [
{
"label": "Off",
Expand All @@ -281,9 +275,6 @@
"type": "select",
"key": "canDelete",
"label": "Delete Row",
"showInBar": true,
"barStyle": "buttons",
"barTitle": "Delete Row",
"options": [
{ "label": "Off", "value": false, "barIcon": "DeleteOutline" },
{ "label": "Direct", "value": "simple", "barIcon": "FlashAuto" },
Expand Down Expand Up @@ -317,14 +308,7 @@
"barStyle": "buttons",
"barIcon": "SortOrderDown",
"barTitle": "Sortable"
}
]
},
{
"section": true,
"name": "Column Settings",
"collapsed": true,
"settings": [
},
{
"type": "boolean",
"key": "autocolumns",
Expand Down Expand Up @@ -355,12 +339,33 @@
"label": "Resize Columns",
"defaultValue": true
},
{
"type": "boolean",
"key": "numberingColumn",
"label": "Numbering",
"showInBar": true,
"barStyle": "buttons",
"barIcon": "123",
"barTitle": "Numbering",
"defaultValue": true
},
{
"type": "boolean",
"key": "selectionColumn",
"label": "Selection Column",
"dependsOn": "rowSelectMode",
"resetOn": "rowSelectMode",
"defaultValue": true
},
{
"type": "boolean",
"key": "stickFirstColumn",
"label": "Pin 1st Column",
"showInBar": true,
"barStyle": "buttons",
"barIcon": "PinOff",
"barTitle": "Pin 1st Column",
"defaultValue": false
}
]
},
Expand All @@ -375,32 +380,12 @@
"label": "Row Menu",
"options": [
{ "label": "Disabled", "value": false },
{ "label": "Column", "value": "actionColumn" }
{ "label": "Column - Left", "value": "columnLeft" },
{ "label": "Column - Right", "value": "columnRight" },
{ "label": "Context Menu", "value": "contextMenu" }
],
"defaultValue": false
},
{
"type": "select",
"key": "rowMenuPosition",
"label": "Menu Position",
"barStyle": "buttons",
"dependsOn": "rowMenu",
"options": [
{
"label": "First",
"value": "first",
"barIcon": "PaddingLeft",
"barTitle": "First"
},
{
"label": "Last",
"value": "last",
"barIcon": "PaddingRight",
"barTitle": "Last"
}
],
"defaultValue": "first"
},
{
"dependsOn": "rowMenu",
"type": "icon",
Expand Down
16 changes: 15 additions & 1 deletion src/Component.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,21 @@
export let rowSelectMode;
export let rowMenu = false;
export let rowMenuItems;
export let rowMenuIcon = "ri-more-fill";
export let selectionMenu = false;
export let selectionMenuItems;
export let menuItemsVisible;
export let preselectedId;
export let preselectedIds;
export let selectionColumn;
export let selectionLimit;
export let numberingColumn = true;
export let stickFirstColumn = false;
export let columnSizing = "flex";
export let columnMinWidth = "6rem";
export let columnMaxWidth = "auto";
export let columnFixedWidth = "6rem";
export let columnFixedWidth = "8rem";
export let headerFontSize, headerColor, headerBgColor, headerAlign;
export let dividers, dividersColor;
Expand Down Expand Up @@ -91,6 +94,14 @@
) {
builderStore.actions.updateProp("isTable", localIsTable);
}
$: $component.styles = {
...$component.styles,
normal: {
width: "100%",
overflow: "hidden",
},
};
</script>

<div use:styleable={$component.styles}>
Expand Down Expand Up @@ -126,6 +137,7 @@
{rowSelectMode}
{rowMenu}
{rowMenuItems}
{rowMenuIcon}
{menuItemsVisible}
{selectionMenu}
{selectionMenuItems}
Expand Down Expand Up @@ -168,6 +180,8 @@
{onInsert}
{onDelete}
{onEdit}
{numberingColumn}
{stickFirstColumn}
>
<slot />
</SuperTable>
Expand Down

0 comments on commit a794f14

Please sign in to comment.