diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae7f2cf3..13a2cc2e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,28 +7,30 @@ env: jobs: publish: - runs-on: self-hosted + runs-on: [self-hosted, common] steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16' + node-version: "20" - uses: actions/setup-python@v4 + with: + python-version: "3.10" - name: Setup npm run: npm install npm@latest -g - run: npm ci - name: Release env: GITHUB_TOKEN: ${{ secrets.REPOS_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: npm run semantic-release build-and-push: - runs-on: self-hosted + runs-on: [self-hosted, common] if: contains(' - refs/heads/develop - refs/heads/master - refs/heads/main' - , github.ref) + refs/heads/develop + refs/heads/master + refs/heads/main' + , github.ref) steps: - uses: actions/checkout@v3 - name: Login to BIMData Docker Registry @@ -43,7 +45,7 @@ jobs: with: branch: ${{ github.ref }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: . file: etc/Dockerfile @@ -52,9 +54,9 @@ jobs: tags: | docker-registry.bimdata.io/bimdata/${{ env.app }}:${{ github.sha }} docker-registry.bimdata.io/bimdata/${{ env.app }}:${{ env.tag }} - + deploy: - runs-on: self-hosted + runs-on: [self-hosted, common] needs: build-and-push steps: - name: Login to BIMData Docker Registry @@ -74,5 +76,3 @@ jobs: inventory: ${{ env.tag }} app: ${{ env.app }} vault-pass: ${{ secrets.ANSIBLE_VAULT_PASSWD }} - - diff --git a/package-lock.json b/package-lock.json index 2773827c..8c0d737d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bimdata/design-system", - "version": "1.4.0-rc.92", + "version": "2.0.0-rc.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@bimdata/design-system", - "version": "1.4.0-rc.92", + "version": "2.0.0-rc.16", "devDependencies": { "@babel/preset-env": "^7.19.4", "@bimdata/typescript-fetch-api-client": "9.5.0", diff --git a/package.json b/package.json index 3fbc4e0a..3dabff18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bimdata/design-system", - "version": "1.4.0-rc.92", + "version": "2.0.0-rc.16", "main": "./dist/js/BIMDataComponents/index.js", "module": "./dist/js/BIMDataComponents/index.js", "files": [ diff --git a/src/BIMDataComponents/BIMDataColorSelector/BIMDataColorSelector.vue b/src/BIMDataComponents/BIMDataColorSelector/BIMDataColorSelector.vue index 8011da8e..70838373 100644 --- a/src/BIMDataComponents/BIMDataColorSelector/BIMDataColorSelector.vue +++ b/src/BIMDataComponents/BIMDataColorSelector/BIMDataColorSelector.vue @@ -13,7 +13,7 @@ :key="`colorElement${j}ofColorLine${i}`" :style="`background-color: #${colorValue}`" :title="colorName" - @click="$emit('update:modelValue', colorValue)" + @click.stop="$emit('update:modelValue', colorValue)" > diff --git a/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue b/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue index a1f5d62c..0e649228 100644 --- a/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue +++ b/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue @@ -26,24 +26,40 @@ - - - +
+ + + + +
@@ -105,11 +121,20 @@ export default { type: String, default: "36px", }, + search: { + type: Boolean, + default: false, + }, + searchPlaceholder: { + type: String, + default: "Search", + }, }, emits: ["element-click"], data() { return { displayed: false, + searchText: "", }; }, computed: { @@ -122,6 +147,16 @@ export default { iconRotation() { return this.displayed ? (this.directionClass === "up" ? -90 : 90) : 0; }, + filteredList() { + if (this.searchText === "") { + return this.list; + } else { + const lowerCaseSearchText = this.searchText.toLowerCase(); + return this.list.filter(element => + element.toLowerCase().includes(lowerCaseSearchText), + ); + } + }, }, methods: { onHeaderClick() { diff --git a/src/BIMDataComponents/BIMDataDropdownMenu/BIMDataDropdownMenu.vue b/src/BIMDataComponents/BIMDataDropdownMenu/BIMDataDropdownMenu.vue index 72b454cb..5c334f85 100644 --- a/src/BIMDataComponents/BIMDataDropdownMenu/BIMDataDropdownMenu.vue +++ b/src/BIMDataComponents/BIMDataDropdownMenu/BIMDataDropdownMenu.vue @@ -6,8 +6,7 @@ @click="onHeaderClick" :style="style" > - - + diff --git a/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Key.vue b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Key.vue index a173dc2c..37d6b9df 100644 --- a/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Key.vue +++ b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Key.vue @@ -2,6 +2,6 @@ diff --git a/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Pipette.vue b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Pipette.vue new file mode 100644 index 00000000..37e38de2 --- /dev/null +++ b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Pipette.vue @@ -0,0 +1,7 @@ + diff --git a/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Smartview.vue b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Smartview.vue new file mode 100644 index 00000000..a6e930a4 --- /dev/null +++ b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Smartview.vue @@ -0,0 +1,14 @@ + diff --git a/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Spacing.vue b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Spacing.vue new file mode 100644 index 00000000..4f947e4c --- /dev/null +++ b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Spacing.vue @@ -0,0 +1,25 @@ + diff --git a/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Translate.vue b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Translate.vue new file mode 100644 index 00000000..415ea966 --- /dev/null +++ b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Translate.vue @@ -0,0 +1,22 @@ + diff --git a/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Upload.vue b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Upload.vue new file mode 100644 index 00000000..ea842c90 --- /dev/null +++ b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Upload.vue @@ -0,0 +1,28 @@ + diff --git a/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/index.js b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/index.js index c0b4f5ad..d757e2c7 100644 --- a/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/index.js +++ b/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/index.js @@ -81,6 +81,7 @@ import organization from "./Organization.vue"; import parameters from "./Parameters.vue"; import path from "./Path.vue"; import pieGraph from "./PieGraph.vue"; +import pipette from "./Pipette.vue"; import plus from "./Plus.vue"; import project from "./Project.vue"; import quickSelect from "./QuickSelect.vue"; @@ -102,8 +103,10 @@ import settings from "./Settings.vue"; import share from "./Share.vue"; import show from "./Show.vue"; import showSelected from "./ShowSelected.vue"; +import smartview from "./Smartview.vue"; import socotec from "./Socotec.vue"; import space from "./Space.vue"; +import spacing from "./Spacing.vue"; import split from "./Split.vue"; import storey from "./Storey.vue"; import success from "./Success.vue"; @@ -112,11 +115,13 @@ import swap from "./Swap.vue"; import synchro2d from "./Synchro2D.vue"; import system from "./System.vue"; import tag from "./Tag.vue"; +import translate from "./Translate.vue"; import tree from "./Tree.vue"; import unarchive from "./Unarchive.vue"; import undo from "./Undo.vue"; import union from "./Union.vue"; import up from "./Up.vue"; +import upload from "./Upload.vue"; import user from "./User.vue"; import validate from "./Validate.vue"; import validatedFile from "./ValidatedFile.vue"; @@ -233,6 +238,7 @@ export default { parameters, path, pieGraph, + pipette, plus, project, quickSelect, @@ -254,8 +260,10 @@ export default { share, show, showSelected, + smartview, socotec, space, + spacing, split, storey, success, @@ -264,11 +272,13 @@ export default { synchro2d, system, tag, + translate, tree, unarchive, undo, union, up, + upload, user, validate, validatedFile, diff --git a/src/BIMDataComponents/BIMDataMenu/BIMDataMenu.vue b/src/BIMDataComponents/BIMDataMenu/BIMDataMenu.vue index 97ee726d..6735eee0 100644 --- a/src/BIMDataComponents/BIMDataMenu/BIMDataMenu.vue +++ b/src/BIMDataComponents/BIMDataMenu/BIMDataMenu.vue @@ -7,90 +7,78 @@ }" v-clickaway="away" > -
-
- +
+ {{ item.groupTitle }}
-
  • - + - @@ -126,71 +114,38 @@ export default { type: String, default: "200px", }, - isClickAway: { - type: Boolean, - default: true, - }, childrenLeft: { type: Boolean, default: false, }, }, - emits: ["hover"], data() { return { - isItemHover: false, - currentItemKey: null, - displayed: false, + hoveredItemKey: null, + clickedItemKey: null, }; }, methods: { - getChildrenStyle(item) { - if (this.currentItemKey !== item.key) return { display: "none" }; - - const itemPos = this.$refs["item-" + item.key][0].getBoundingClientRect(); - return { - width: this.subListWidth, - maxHeight: this.subListMaxHeight, - top: `${itemPos.top}px`, - left: `${ - this.childrenLeft - ? itemPos.x - - parseInt(this.subListWidth.replace(/[a-zA-Z]/g, ""), 10) - : itemPos.x + itemPos.width - }px`, - }; + isItemActive(item) { + return ( + (item.children?.length > 0 && + this.hoveredItemKey === item.key && + !this.clickedItemKey) || + this.clickedItemKey === item.key + ); }, - handleCurrentItem(itemKey) { - if (itemKey) { - this.isItemHover = true; - this.currentItemKey = itemKey; + away() { + this.clickedItemKey = null; + }, + onItemClick(item) { + if (!item.children || item.key === this.clickedItemKey) { + this.clickedItemKey = null; } else { - this.isItemHover = false; - this.currentItemKey = null; + this.clickedItemKey = item.key; } }, - onClick(item) { - if (this.hasNoChildren(item) || !item.action) return; - item.action(); - }, - onMouseOver(item) { - const itemPos = this.$refs["item-" + item.key][0].getBoundingClientRect(); - this.handleCurrentItem(item.key); - this.$emit("hover", { ...item, itemPos }); - }, - onMouseLeave() { - this.handleCurrentItem(); - this.$emit("hover"); - }, - hasNoChildren(item) { - const { children } = item; - return children && children.list.length === 0; - }, - away() { - if (this.isClickAway) { - this.displayed = false; - } + this.hoveredItemKey = item.key; }, }, }; diff --git a/src/BIMDataComponents/BIMDataMenu/_BIMDataMenu.scss b/src/BIMDataComponents/BIMDataMenu/_BIMDataMenu.scss index c0e41285..d33071e1 100644 --- a/src/BIMDataComponents/BIMDataMenu/_BIMDataMenu.scss +++ b/src/BIMDataComponents/BIMDataMenu/_BIMDataMenu.scss @@ -2,7 +2,6 @@ padding: var(--spacing-unit) 0; background-color: var(--color-white); box-shadow: var(--box-shadow); - overflow-y: auto; &__item { display: flex; flex-direction: column; @@ -10,23 +9,26 @@ justify-content: center; font-size: 12px; &:not(:empty) { - li { + .bimdata-menu__item__content { padding: 0 var(--spacing-unit); height: 29px; width: 100%; position: relative; display: flex; align-items: center; + cursor: pointer; & > span { width: 100%; } &:hover { background-color: var(--color-silver-light); - cursor: pointer; + } + &--active { + background-color: #f0f5ff; } } } - &--title { + &__title { padding: 0 var(--spacing-unit); height: 25px; display: flex; @@ -35,33 +37,34 @@ color: var(--color-granite); font-size: 11px; } - &--divider { + &__divider { .divider { margin: calc(var(--spacing-unit) / 2) auto; width: 90%; border-bottom: 1px solid #f2f2f2; } } - &--title, - &--divider { + &__title, + &__divider { &:hover { cursor: default; background-color: transparent; } } - &--no-children { - color: var(--color-silver-dark); - } &__children { - overflow: auto; - position: fixed; + position: absolute; + top: 0; padding: calc(var(--spacing-unit) / 2) 0; background-color: var(--color-white); border: 1px solid transparent; box-shadow: var(--box-shadow); - - &--list { - padding-left: 0; + ul { + li { + height: 29px; + &:hover { + background-color: var(--color-silver-light); + } + } } } } diff --git a/src/BIMDataComponents/BIMDataPaginatedList/BIMDataPaginatedList.vue b/src/BIMDataComponents/BIMDataPaginatedList/BIMDataPaginatedList.vue index 09e73556..c31302d5 100644 --- a/src/BIMDataComponents/BIMDataPaginatedList/BIMDataPaginatedList.vue +++ b/src/BIMDataComponents/BIMDataPaginatedList/BIMDataPaginatedList.vue @@ -8,6 +8,8 @@ v-for="element of page" :key="elementKey ? element[elementKey] : element" @click="$emit('element-click', element)" + ref="elements" + :class="{ 'active-element': isElementActive(element) }" > {{ element && element.toString() }} @@ -56,6 +58,7 @@ export default { }, elementKey: { type: String, + default: "", }, loading: { type: Boolean, @@ -77,6 +80,9 @@ export default { type: String, default: "var(--color-white)", }, + activeElement: { + type: [String, Number, Object], + }, }, emits: ["element-click"], data() { @@ -104,11 +110,48 @@ export default { deep: true, immediate: true, }, + activeElement: { + handler(value) { + if (value) { + this.showElement(value); + } + }, + immediate: true, + }, }, methods: { onPageChange(pageNumber) { this.currentPage = pageNumber; }, + compareElements(elementA, elementB) { + if (this.elementKey) { + return elementA[this.elementKey] === elementB[this.elementKey]; + } else { + return elementA === elementB; + } + }, + isElementActive(element) { + if (!this.activeElement) return false; + return this.compareElements(element, this.activeElement); + }, + async showElement(elem) { + const elementIndex = this.list.findIndex(listElement => + this.compareElements(elem, listElement) + ); + if (elementIndex === -1) return; + const startIndex = this.perPage * (this.currentPage - 1); + const endIndex = startIndex + this.perPage; + const isElementInCurrentPage = + elementIndex >= startIndex && elementIndex < endIndex; + if (!isElementInCurrentPage) { + const elementPage = Math.ceil((elementIndex + 1) / this.perPage); + this.currentPage = elementPage; + } + await this.$nextTick(); + const elementIndexOnPage = elementIndex % this.perPage; + const domElement = this.$refs.elements[elementIndexOnPage]; + domElement.scrollIntoView({ block: "center" }); + }, }, }; diff --git a/src/BIMDataComponents/BIMDataPaginatedList/_BIMDataPaginatedList.scss b/src/BIMDataComponents/BIMDataPaginatedList/_BIMDataPaginatedList.scss index 3e1bc466..d5743771 100644 --- a/src/BIMDataComponents/BIMDataPaginatedList/_BIMDataPaginatedList.scss +++ b/src/BIMDataComponents/BIMDataPaginatedList/_BIMDataPaginatedList.scss @@ -32,6 +32,14 @@ height: auto; } + &__elements { + li { + &.active-element { + font-weight: bold; + } + } + } + .bimdata-spinner { padding: 12px 0; justify-content: center; diff --git a/src/BIMDataComponents/BIMDataTable/BIMDataTable.vue b/src/BIMDataComponents/BIMDataTable/BIMDataTable.vue index af80e03c..781bfab5 100644 --- a/src/BIMDataComponents/BIMDataTable/BIMDataTable.vue +++ b/src/BIMDataComponents/BIMDataTable/BIMDataTable.vue @@ -35,13 +35,17 @@ - + false, + }, }, emits: [ "update:selection", @@ -249,6 +257,23 @@ export default { { immediate: true } ); + const onDrop = (data, event) => { + if (props.canDragOverRow(data)) { + emit("row-drop", { data, event }); + dragOveredRowKey.value = null; + } + }; + const dragOveredRowKey = ref(null); + const onDragover = (key, data, event) => { + if (props.canDragOverRow(data)) { + event.preventDefault(); + dragOveredRowKey.value = key; + } + }; + const onDragleave = () => { + dragOveredRowKey.value = null; + }; + return { // References computedRows, @@ -257,7 +282,11 @@ export default { pageIndexEnd, pageIndexStart, rowSelection, + dragOveredRowKey, // Methods + onDrop, + onDragover, + onDragleave, toggleAll, toggleRow, }; diff --git a/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.scss b/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.scss index 2d152a20..9eb16695 100644 --- a/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.scss +++ b/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.scss @@ -68,6 +68,14 @@ } } + &__pdf-page-selector { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + &__modal { position: absolute; top: 0px; diff --git a/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.vue b/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.vue index c91dfe3f..a468b123 100644 --- a/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.vue +++ b/src/BIMDataSmartComponents/BIMDataFileManager/BIMDataFileManager.vue @@ -119,6 +119,7 @@ @loaded="onFileLoaded(file, $event)" :writeAccess="currentFolder.user_permission >= 100" :viewPdf="viewPdf" + :pdfModelLoading="pdfModelLoading === file.id" />
  • @@ -130,6 +131,16 @@
    +
    + +
    selectedFile !== file + ({ document }) => document !== file ); } else { if (!this.multi) { this.selectedFiles = []; } - this.selectedFiles.push(file); + + let pdfPage = null; + if (this.pdfPageSelect && file.model_type === "PDF") { + // If 'pdfPageSelect' mode is on and the selected file is a PDF model + // fetch the corresponding model to check its children (pages) + this.pdfModelLoading = file.id; + const model = await this.apiClient.modelApi.getModel( + this.spaceId, + file.model_id, + this.projectId + ); + this.pdfModelLoading = null; + if (model.children?.length > 0) { + // If this is a multipage PDF open the page selector + this.pdfModel = model; + this.pdfPageSelectorDisplayed = true; + pdfPage = await new Promise(res => (this.selectPdfPage = res)); + this.pdfPageSelectorDisplayed = false; + this.pdfModel = null; + if (!pdfPage) return; // If no page has been selected then the file is not selected + } + } + + this.selectedFiles.push({ document: file, pdfPage }); } this.$emit("selection-change", this.selectedFiles); }, isFileSelected(file) { - return this.selectedFiles.includes(file); + return this.selectedFiles.some(({ document }) => file === document); }, onBreadcrumClick(step) { this.currentFolder = step; diff --git a/src/BIMDataSmartComponents/BIMDataFileManager/components/FileCard.vue b/src/BIMDataSmartComponents/BIMDataFileManager/components/FileCard.vue index cca78351..0fb5e93c 100644 --- a/src/BIMDataSmartComponents/BIMDataFileManager/components/FileCard.vue +++ b/src/BIMDataSmartComponents/BIMDataFileManager/components/FileCard.vue @@ -36,19 +36,24 @@
    - - + +
    @@ -175,9 +194,11 @@ export default { checkboxDisabledChecked: false, checkboxLoadingChecked: false, checkboxCloseOnElementClickChecked: false, + checkboxSearchChecked: false, checkboxHeaderChecked: true, checkboxAfterBtnChecked: false, checkboxElementChecked: false, + checkboxEmptyChecked: false, customListCheckbox: false, dropdownOptions: { transition: ["up", "down"], @@ -305,6 +326,11 @@ export default { `; } }, + getEmpty() { + if (this.checkboxEmptyChecked) { + return ""; + } + }, }, }; diff --git a/src/web/views/Components/DropdownMenu/DropdownMenu.vue b/src/web/views/Components/DropdownMenu/DropdownMenu.vue index 75ae9e67..86617487 100644 --- a/src/web/views/Components/DropdownMenu/DropdownMenu.vue +++ b/src/web/views/Components/DropdownMenu/DropdownMenu.vue @@ -14,11 +14,13 @@ :menuItems="checkboxTwoLevelChecked ? multiLevelList : []" :header="checkboxDisabledHeader" > - @@ -132,6 +129,7 @@ import BIMDataCheckbox from "../../../../../src/BIMDataComponents/BIMDataCheckbo import BIMDataRadio from "../../../../../src/BIMDataComponents/BIMDataRadio/BIMDataRadio.vue"; import BIMDataTable from "../../../../../src/BIMDataComponents/BIMDataTable/BIMDataTable.vue"; import BIMDataText from "../../../../../src/BIMDataComponents/BIMDataText/BIMDataText.vue"; +import BIMDataIcon from "../../../../../src/BIMDataComponents/BIMDataIcon/BIMDataIcon.vue"; import BIMDataDropdownMenu from "../../../../../src/BIMDataComponents/BIMDataDropdownMenu/BIMDataDropdownMenu.vue"; export default { @@ -142,6 +140,7 @@ export default { BIMDataTable, BIMDataText, BIMDataDropdownMenu, + BIMDataIcon, }, data() { return { @@ -236,10 +235,9 @@ export default { ], slotData: [ ["Slot name", "Description"], - ["header", "Use this slot for add content "], [ - "contentAfterHeader", - "Use this slot for add content after the header slot", + "header", + "Use this slot to add title content. Available slot props : isOpen (true when the menu is open)", ], [ "element", @@ -251,16 +249,13 @@ export default { methods: { getHeader() { if (this.checkboxHeaderChecked) { - return ` - `; - } - }, - getContentAfterBtn() { - if (this.checkboxAfterHeaderChecked) { - return ` {{ item.text }} + + + @@ -39,11 +63,13 @@ {{ formatMenuItem(item) }}, ]" @item-click="itemClick" + :childrenLeft="{{isChildrenLeft}}" > <template #item="{ item }"> {{ getIcons() }} <span>{{ "{{ item.text }" + "}" }}</span> </template> + {{getChildren()}} </BIMDataMenu> @@ -95,15 +121,17 @@ export default { if (this.isChildren) { opts[1] = { ...opts[1], - children: { - list: [ - { - text: "Child item 1", - action: () => console.log("child clicked"), - }, - { text: "Child item 2" }, - ], - }, + children: [ + { + text: "Child item 1", + action: () => console.log("child clicked"), + }, + { text: "Child item 2" }, + ], + }; + opts[2] = { + ...opts[2], + children: [{ data: "Item 03 children" }], }; } return opts; @@ -120,6 +148,30 @@ export default { />`; } }, + getChildren() { + if (this.isChildren) { + return ` + + `; + } + }, itemClick($event) { console.log($event); }, diff --git a/src/web/views/Components/Menu/props-basic-menu.js b/src/web/views/Components/Menu/props-basic-menu.js index 24e487ba..ac93fe33 100644 --- a/src/web/views/Components/Menu/props-basic-menu.js +++ b/src/web/views/Components/Menu/props-basic-menu.js @@ -28,9 +28,9 @@ export default [ "Use this props to custom width of BIMDataMenu component.", ], [ - "isClickAway", + "childrenLeft", "Boolean", - "true", - "If false, the menu component does not close when you click outside.", + "false", + "If true, the child menu opens to the left of the menu.", ], ]; diff --git a/src/web/views/Components/Menu/slots-basic-menu.js b/src/web/views/Components/Menu/slots-basic-menu.js index eeb15930..d97b67b9 100644 --- a/src/web/views/Components/Menu/slots-basic-menu.js +++ b/src/web/views/Components/Menu/slots-basic-menu.js @@ -3,7 +3,5 @@ export default [ ["groupTitle", "Use this slot for custom group title."], ["item", "Use this slot for custom items menu."], ["children", "Use this slot for custom children of menu items."], - ["child-header", "Use this slot for custom child header."], - ["child-item", "Use this slot for custom child items."], - ["child-footer", "Use this slot for custom child footer."], + ["child-item", "Use this slot for custom list elements of child items."], ]; diff --git a/src/web/views/Components/Pagination/Pagination.vue b/src/web/views/Components/Pagination/Pagination.vue index 9d9f3eec..f2327206 100644 --- a/src/web/views/Components/Pagination/Pagination.vue +++ b/src/web/views/Components/Pagination/Pagination.vue @@ -7,10 +7,18 @@ @@ -20,9 +28,20 @@ placeholder="Number of items per page" type="number" > - + + complex pagination + + + @@ -34,9 +53,11 @@ @@ -66,12 +87,15 @@ + + diff --git a/src/web/views/Components/Pagination/option-sets.js b/src/web/views/Components/Pagination/option-sets.js new file mode 100644 index 00000000..542b69a4 --- /dev/null +++ b/src/web/views/Components/Pagination/option-sets.js @@ -0,0 +1,72 @@ +const basicPagination = [ + "item 01", + "item 02", + "item 03", + "item 04", + "item 05", + "item 06", + "item 07", + "item 08", + "item 09", + "item 10", + "item 11", + "item 12", +]; + +const complexPagination = [ + { id: 1, text: "item 01" }, + { id: 2, text: "item 02" }, + { id: 3, text: "item 03" }, + { id: 4, text: "item 04" }, + { id: 5, text: "item 05" }, + { id: 6, text: "item 06" }, + { id: 7, text: "item 07" }, + { id: 8, text: "item 08" }, + { id: 9, text: "item 09" }, + { id: 10, text: "item 10" }, + { id: 11, text: "item 11" }, + { id: 12, text: "item 12" }, + { id: 13, text: "item 13" }, + { id: 14, text: "item 14" }, + { id: 15, text: "item 15" }, + { id: 16, text: "item 16" }, + { id: 17, text: "item 17" }, + { id: 18, text: "item 18" }, + { id: 19, text: "item 19" }, + { id: 20, text: "item 20" }, + { id: 21, text: "item 21" }, + { id: 22, text: "item 22" }, + { id: 23, text: "item 23" }, + { id: 24, text: "item 24" }, + { id: 25, text: "item 25" }, + { id: 26, text: "item 26" }, + { id: 27, text: "item 27" }, + { id: 28, text: "item 28" }, + { id: 29, text: "item 29" }, + { id: 30, text: "item 30" }, + { id: 31, text: "item 31" }, + { id: 32, text: "item 32" }, + { id: 33, text: "item 33" }, + { id: 34, text: "item 34" }, + { id: 35, text: "item 35" }, + { id: 36, text: "item 36" }, + { id: 37, text: "item 37" }, + { id: 38, text: "item 38" }, + { id: 39, text: "item 39" }, + { id: 40, text: "item 40" }, + { id: 41, text: "item 41" }, + { id: 42, text: "item 42" }, + { id: 43, text: "item 43" }, + { id: 44, text: "item 44" }, + { id: 45, text: "item 45" }, + { id: 46, text: "item 46" }, + { id: 47, text: "item 47" }, + { id: 48, text: "item 48" }, + { id: 49, text: "item 49" }, + { id: 50, text: "item 50" }, + { id: 51, text: "item 51" }, + { id: 52, text: "item 52" }, + { id: 53, text: "item 53" }, +]; + +export { basicPagination, complexPagination }; diff --git a/src/web/views/Components/Table/props-data.js b/src/web/views/Components/Table/props-data.js index 8cd555f5..9e250f4a 100644 --- a/src/web/views/Components/Table/props-data.js +++ b/src/web/views/Components/Table/props-data.js @@ -96,4 +96,12 @@ export default [ "Use this prop to set table-layout css property (e.g. 'auto' or 'fixed').", "", ], + [ + "canDragOverRow", + "Function", + "", + "row => false", + "If returns true, a 'bimdata-table__row--drag-overed' class is added on the row on drag over, and the `row-drop` event is emitted on drop.", + "", + ], ]; diff --git a/src/web/views/SmartComponents/FileManager/FileManager.vue b/src/web/views/SmartComponents/FileManager/FileManager.vue index 9e31e399..123676f1 100644 --- a/src/web/views/SmartComponents/FileManager/FileManager.vue +++ b/src/web/views/SmartComponents/FileManager/FileManager.vue @@ -1,174 +1,157 @@