Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #593 from ergonode/release/v1.0.0-beta.4
Browse files Browse the repository at this point in the history
Release/v1.0.0 beta.4
  • Loading branch information
derpdead authored Nov 18, 2020
2 parents fa09258 + cd470fa commit 6f30b56
Show file tree
Hide file tree
Showing 97 changed files with 5,743 additions and 5,117 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Tests
on:
pull_request:
branches: [ master, develop ]
jobs:
test_pull_request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12'
check-latest: true
- name: Installing project dependencies
run: npm ci
- name: Setting up modules
run: npm run modules:all
- name: Running unit tests
run: npm run test
- name: Running linters
run: npm run lint

11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## CHANGELOG FOR v1.0.0-beta.4
- feature - add DOM virtualization to select kind components
- feature - add github actions
- feature - search for sidebar list with categories
- refactor - expose Grid pagination
- bugfix - Grid filtering
- bugfix - sidebar list languages

## CHANGELOG FOR v1.0.0-beta.3
- feature - add axios cancel request support for each request
- feature - replace a custom redirect with native Vue router redirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:data-count="filtered"
:rows="rows"
:filters="filterValues"
:pagination="pagination"
:extended-columns="extendedColumns"
:extended-data-cells="extendedDataCells"
:extended-data-filter-cells="extendedDataFilterCells"
Expand All @@ -18,7 +19,8 @@
:is-prefetching-data="isPrefetchingData"
:is-basic-filter="true"
:is-border="true"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
:multiselect="true"
:searchable="true"
:clearable="true"
:sticky-search="true"
:disabled="!isAllowedToUpdate"
:error-messages="errors[groupsFieldKey]"
href="attributes/groups/autocomplete"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:data-count="filtered"
:rows="rows"
:filters="filterValues"
:pagination="pagination"
:placeholder="noDataPlaceholder"
:extended-columns="extendedColumns"
:extended-data-cells="extendedDataCells"
Expand All @@ -23,7 +24,8 @@
@edit-row="onEditRow"
@preview-row="onEditRow"
@delete-row="onRemoveRow"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
:columns="columns"
:data-count="filtered"
:rows="rows"
:pagination="pagination"
:filters="filterValues"
:extended-columns="extendedColumns"
:extended-data-cells="extendedDataCells"
Expand All @@ -22,7 +23,8 @@
@edit-row="onEditRow"
@preview-row="onEditRow"
@delete-row="onRemoveRow"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
:value="defaultTextAttribute"
label="Default label attribute"
:searchable="true"
:sticky-search="true"
:disabled="disabled"
filter-type="TEXT"
href="attributes/autocomplete"
Expand Down Expand Up @@ -37,7 +36,6 @@
label="Default image attribute"
:searchable="true"
:clearable="true"
:sticky-search="true"
:disabled="disabled"
filter-type="IMAGE"
:error-messages="errors.defaultImage"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:data-count="filtered"
:rows="rows"
:filters="filterValues"
:pagination="pagination"
:extended-columns="extendedColumns"
:extended-data-cells="extendedDataCells"
:extended-data-filter-cells="extendedDataFilterCells"
Expand All @@ -22,7 +23,8 @@
@edit-row="onEditRow"
@preview-row="onEditRow"
@delete-row="onRemoveRow"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
:multiselect="true"
:clearable="true"
:searchable="true"
:sticky-search="true"
label="Category"
:disabled="disabled"
:error-messages="errors[categoryFieldKey]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
* Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved.
* See LICENSE for license details.
*/
export default () => ({});
export default () => ({
categories: [],
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:data-count="filtered"
:rows="rows"
:filters="filterValues"
:pagination="pagination"
:placeholder="noDataPlaceholder"
:extended-columns="extendedColumns"
:extended-data-cells="extendedDataCells"
Expand All @@ -23,7 +24,8 @@
@edit-row="onEditRow"
@preview-row="onEditRow"
@delete-row="onRemoveRow"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
<VerticalTabBarList>
<ListSearchHeader
title="Categories"
searchable
@search-result="onSearch" />
<List>
<Preloader v-if="isPrefetchingData" />
<ListScrollableContainer v-else>
<CategoriesListElement
v-for="item in items[userLanguageCode]"
v-for="item in items[defaultLanguageCode]"
:key="item.id"
:item="item"
:is-draggable="isAllowedToUpdate"
:language-code="userLanguageCode" />
:language-code="defaultLanguageCode" />
</ListScrollableContainer>
</List>
<Fab
Expand Down Expand Up @@ -76,9 +77,9 @@ export default {
};
},
computed: {
...mapState('authentication', {
userLanguageCode: state => state.user.language,
}),
...mapState('core', [
'defaultLanguageCode',
]),
isAllowedToUpdate() {
return this.$hasAccess([
PRIVILEGES.CATEGORY_TREE.update,
Expand Down Expand Up @@ -107,7 +108,7 @@ export default {
this.onCloseModal();
try {
this.getItems(this.userLanguageCode);
this.getItems(this.defaultLanguageCode);
} catch (e) {
if (this.$axios.isCancel(e)) {
return;
Expand All @@ -121,7 +122,7 @@ export default {
},
onSearch(value) {
this.codeFilter = value;
this.getItems(this.userLanguageCode);
this.getItems(this.defaultLanguageCode);
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:columns="columns"
:data-count="filtered"
:rows="rows"
:pagination="pagination"
:filters="filterValues"
:extended-columns="extendedColumns"
:extended-data-cells="extendedDataCells"
Expand All @@ -20,7 +21,8 @@
:is-prefetching-data="isPrefetchingData"
:is-header-visible="true"
:is-basic-filter="true"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters">
<template #actionsHeader>
Expand Down Expand Up @@ -52,6 +54,7 @@ import {
} from '@Core/defaults/alerts';
import {
DEFAULT_GRID_FETCH_PARAMS,
DEFAULT_GRID_PAGINATION,
} from '@Core/defaults/grid';
import {
SIZE,
Expand Down Expand Up @@ -109,6 +112,8 @@ export default {
isPrefetchingData: true,
details: [],
downloadLink: '',
localParams: DEFAULT_GRID_FETCH_PARAMS,
pagination: DEFAULT_GRID_PAGINATION,
};
},
computed: {
Expand All @@ -131,6 +136,13 @@ export default {
...mapActions('channel', [
'getExportDetails',
]),
onPaginationChange(pagination) {
this.pagination = pagination;
this.localParams.limit = pagination.itemsPerPage;
this.localParams.offset = (pagination.page - 1) * pagination.itemsPerPage;
this.onFetchData();
},
onGetExportDetailsSuccess({
details,
links,
Expand All @@ -145,21 +157,28 @@ export default {
},
onRemoveAllFilters() {
this.filterValues = {};
this.pagination.page = 1;
this.localParams.filter = {};
this.localParams.offset = 0;
this.onFetchData({
...this.localParams,
filter: {},
});
this.onFetchData();
},
onFilterChange(filters) {
this.filterValues = filters;
this.pagination.page = 1;
this.localParams.filter = filters;
this.localParams.offset = (this.pagination.page - 1) * this.pagination.itemsPerPage;
this.onFetchData({
...this.localParams,
filter: this.filterValues,
});
this.onFetchData();
},
async onFetchData(params = DEFAULT_GRID_FETCH_PARAMS) {
onColumnSortChange(sortedColumn) {
this.localParams.sortedColumn = sortedColumn;
this.onFetchData();
},
async onFetchData(params = this.localParams) {
this.localParams = params;
await getGridData({
$route: this.$route,
$cookies: this.$cookies,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
this.fetchGridData = true;
this.$addAlert({
type: ALERT_TYPE.SUCCESS,
message: 'Completed generating export file',
message: 'Export has been finished',
});
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:data-count="filtered"
:rows="rows"
:filters="filterValues"
:pagination="pagination"
:extended-columns="extendedColumns"
:extended-data-cells="extendedDataCells"
:extended-data-filter-cells="extendedDataFilterCells"
Expand All @@ -22,7 +23,8 @@
@edit-row="onEditRow"
@preview-row="onEditRow"
@delete-row="onRemoveRow"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:data-count="filtered"
:rows="rows"
:filters="filterValues"
:pagination="pagination"
:extended-columns="extendedColumns"
:extended-data-cells="extendedDataCells"
:extended-data-filter-cells="extendedDataFilterCells"
Expand All @@ -19,7 +20,8 @@
:is-basic-filter="true"
:is-border="true"
@preview-row="onPreviewRow"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters" />
<ExportDetailsModalGrid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:data-count="filtered"
:rows="rows"
:filters="filterValues"
:pagination="pagination"
:extended-columns="extendedColumns"
:extended-data-cells="extendedDataCells"
:extended-data-filter-cells="extendedDataFilterCells"
Expand All @@ -22,7 +23,8 @@
@edit-row="onEditRow"
@preview-row="onEditRow"
@delete-row="onRemoveRow"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:data-count="filtered"
:rows="rows"
:drafts="drafts"
:pagination="pagination"
:filters="filterValues"
:collection-cell-binding="collectionCellBinding"
:extended-columns="extendedColumns"
Expand All @@ -25,7 +26,8 @@
:is-border="true"
@cell-value="onCellValueChange"
@delete-row="onRemoveRow"
@fetch-data="onFetchData"
@pagination="onPaginationChange"
@column-sort="onColumnSortChange"
@filter="onFilterChange"
@remove-all-filters="onRemoveAllFilters">
<template #actionsHeader>
Expand Down
Loading

0 comments on commit 6f30b56

Please sign in to comment.