Browse Source

Merge branch 'develop' into feat/export-types

Nathan Walters 3 years ago
parent
commit
aec4bafe80

+ 56 - 0
.github/workflows/deploy.yml

@@ -0,0 +1,56 @@
+name: Deploy Site
+
+on:
+  push:
+    branches:
+      - master
+
+jobs:
+  deploy:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+
+      - uses: actions/setup-node@v3
+        with:
+          node-version: 16
+          cache: 'yarn'
+          cache-dependency-path: site/_themes/yarn.lock
+
+      - name: Build theme with node
+        run: |
+          cd ${{ github.workspace }}/site/_themes
+          yarn install --frozen-lockfile
+          yarn build
+          mv dist/js ../assets/js/themes
+          cd ../assets/js/themes
+          FILE=../../../_includes/themes.html
+          echo "" > $FILE
+          for f in *.js; do
+            echo "<script src=/assets/js/themes/$f></script>" >> $FILE
+          done
+
+      - uses: ruby/setup-ruby@v1
+        with:
+          ruby-version: 2.6
+          bundler-cache: true
+
+      - name: Build page with Jekyll
+        run: bundle exec jekyll build
+
+      - name: Checkout gh-pages branch
+        uses: actions/checkout@v3
+        with:
+          ref: 'gh-pages'
+          path: './gh-pages'
+
+      - name: Move versions to _gh_pages
+        run: |
+          mv gh-pages/versions _gh_pages
+          rm -rf gh-pages
+
+      - name: Deploy to GitHub Pages
+        uses: JamesIves/github-pages-deploy-action@v4.3.3
+        with:
+          branch: gh-pages
+          folder: _gh_pages

+ 31 - 0
.github/workflows/test.yml

@@ -0,0 +1,31 @@
+name: Test
+
+on:
+  pull_request:
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+
+      - uses: actions/setup-node@v3
+        with:
+          node-version: 16
+          cache: 'yarn'
+
+      - uses: actions/checkout@v3
+        with:
+          repository: 'wenzhixin/bootstrap-table-examples'
+          path: './tools/bootstrap-table-examples'
+
+      - name: Lint src and check docs
+        run: |
+          yarn install --frozen-lockfile
+          yarn pre-commit
+
+      - name: Cypress Test
+        run: |
+          mv ./tools/bootstrap-table-examples cypress/html
+          yarn css:build:src
+          yarn test

+ 1 - 1
.gitignore

@@ -21,8 +21,8 @@ check.js
 # Common IDE files
 nbproject
 .~lock.*
+Gemfile.lock
 package-lock.json
-*.lock
 .buildpath
 .idea
 .project

+ 0 - 51
.travis.yml

@@ -1,51 +0,0 @@
-stages:
-  - test
-  - deploy
-
-jobs:
-  include:
-    - stage: test
-      language: node_js
-      node_js:
-        - 14
-      name: "Lint src and check docs"
-      cache:
-        npm: true
-        directories:
-          - ~/.cache
-      script:
-        - cd tools
-        - git clone --depth=1 https://github.com/wenzhixin/bootstrap-table-examples
-        - npm run pre-commit
-      if: branch != master AND type = pull_request
-
-    - stage: test
-      language: node_js
-      node_js:
-        - 14
-      name: "Cypress Test"
-      cache:
-        npm: true
-        directories:
-          - ~/.cache
-      script:
-        - git clone --depth=1 https://github.com/wenzhixin/bootstrap-table-examples cypress/html
-        - npm run css:build:src
-        - npm run test
-      if: branch != master AND type = pull_request
-
-    - stage: deploy
-      name: "Deploy docs"
-      language: ruby
-      rvm:
-        - 2.4.1
-      before_install:
-        - nvm install 14
-      script: ./deploy.sh
-      if: branch = master AND type = push
-      cache: bundler
-
-env:
-  global:
-  - ENCRYPTION_LABEL: "5453d0fdf68a"
-  - COMMIT_AUTHOR_EMAIL: "wenzhixin2010@gmail.com"

+ 0 - 78
deploy.sh

@@ -1,78 +0,0 @@
-#!/bin/bash
-set -e # Exit with nonzero exit code if anything fails
-
-SOURCE_BRANCH="master"
-TARGET_BRANCH="gh-pages"
-
-function doCompile {
-    cd site/_themes
-    yarn
-    yarn build
-    mv dist/js ../assets/js/themes
-    cd ../assets/js/themes
-    FILE=../../../_includes/themes.html
-    echo "" > $FILE
-    for f in *.js; do
-        echo "<script src=/assets/js/themes/$f></script>" >> $FILE
-    done
-    cd ../../../../
-    bundle exec jekyll build
-}
-
-# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
-if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
-    echo "Skipping deploy; just doing a build."
-    doCompile
-    exit 0
-fi
-
-# Save some useful information
-REPO=`git config remote.origin.url`
-SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
-SHA=`git rev-parse --verify HEAD`
-OUT=_gh_pages
-
-# Clone the existing gh-pages for this repo into dist/
-# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deply)
-git clone $REPO $OUT
-cd $OUT
-git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
-
-# Clean out existing contents except versions
-mv versions ..
-ls | xargs rm -rf
-cd ..
-
-# Run our compile script
-doCompile
-
-mv versions $OUT
-
-# Now let's go have some fun with the cloned repo
-cd $OUT
-git config user.name "Travis CI"
-git config user.email "$COMMIT_AUTHOR_EMAIL"
-
-# If there are no changes to the compiled dist (e.g. this is a README update) then just bail.
-if git diff --quiet; then
-    echo "No changes to the output on this push; exiting."
-    exit 0
-fi
-
-# Commit the "changes", i.e. the new version.
-# The delta will show diffs between new and old versions.
-git add -A .
-git commit -m "Deploy to GitHub Pages: ${SHA}"
-
-# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
-ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
-ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
-ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
-ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
-openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ../deploy_key.enc -out ../deploy_key -d
-chmod 600 ../deploy_key
-eval `ssh-agent -s`
-ssh-add ../deploy_key
-
-# Now that we're all set up, we can push.
-git push $SSH_REPO $TARGET_BRANCH

BIN
deploy_key.enc


+ 293 - 252
index.d.ts

@@ -1,294 +1,335 @@
 /// <reference types="jquery" />
 
 export interface BootstrapTableIcons {
-    toggleOff: string;
-    clearSearch: string;
-    detailOpen: string;
-    search: string;
-    fullscreen: string;
-    columns: string;
-    detailClose: string;
-    refresh: string;
-    paginationSwitchDown: string;
-    paginationSwitchUp: string;
-    toggleOn: string
+  toggleOff?: string;
+  clearSearch?: string;
+  detailOpen?: string;
+  search?: string;
+  fullscreen?: string;
+  columns?: string;
+  detailClose?: string;
+  refresh?: string;
+  paginationSwitchDown?: string;
+  paginationSwitchUp?: string;
+  toggleOn?: string;
+  autoRefresh?: string;
 }
 
 export interface BootstrapTableEvents {
-    'refresh.bs.table': string;
-    'load-error.bs.table': string;
-    'click-row.bs.table': string;
-    'dbl-click-row.bs.table': string;
-    'post-body.bs.table': string;
-    'collapse-row.bs.table': string;
-    'reset-view.bs.table': string;
-    'click-cell.bs.table': string;
-    'check-all.bs.table': string;
-    'post-footer.bs.table': string;
-    'uncheck.bs.table': string;
-    'check-some.bs.table': string;
-    'refresh-options.bs.table': string;
-    'pre-body.bs.table': string;
-    'uncheck-some.bs.table': string;
-    'expand-row.bs.table': string;
-    'all.bs.table': string;
-    'uncheck-all.bs.table': string;
-    'column-switch.bs.table': string;
-    'column-switch-all.bs.table': string;
-    'check.bs.table': string;
-    'search.bs.table': string;
-    'load-success.bs.table': string;
-    'dbl-click-cell.bs.table': string;
-    'page-change.bs.table': string;
-    'post-header.bs.table': string;
-    'toggle.bs.table': string;
-    'sort.bs.table': string;
-    'scroll-body.bs.table': string
+  'refresh.bs.table': string;
+  'load-error.bs.table': string;
+  'click-row.bs.table': string;
+  'dbl-click-row.bs.table': string;
+  'post-body.bs.table': string;
+  'collapse-row.bs.table': string;
+  'reset-view.bs.table': string;
+  'click-cell.bs.table': string;
+  'check-all.bs.table': string;
+  'post-footer.bs.table': string;
+  'uncheck.bs.table': string;
+  'check-some.bs.table': string;
+  'refresh-options.bs.table': string;
+  'pre-body.bs.table': string;
+  'uncheck-some.bs.table': string;
+  'expand-row.bs.table': string;
+  'all.bs.table': string;
+  'uncheck-all.bs.table': string;
+  'column-switch.bs.table': string;
+  'column-switch-all.bs.table': string;
+  'check.bs.table': string;
+  'search.bs.table': string;
+  'load-success.bs.table': string;
+  'dbl-click-cell.bs.table': string;
+  'page-change.bs.table': string;
+  'post-header.bs.table': string;
+  'toggle.bs.table': string;
+  'sort.bs.table': string;
+  'scroll-body.bs.table': string;
 }
 
 export interface BootstrapTableColumn {
-    sortName?: any;
-    widthUnit?: string;
-    sorter?: any;
-    searchFormatter?: boolean;
-    titleTooltip?: any;
-    falign?: any;
-    title?: any;
-    align?: any;
-    radio?: boolean;
-    colspan?: any;
-    showSelectTitle?: boolean;
-    rowspan?: any;
-    checkbox?: boolean;
-    halign?: any;
-    switchable?: boolean;
-    class?: any;
-    escape?: boolean;
-    events?: BootstrapTableEvents;
-    order?: string;
-    visible?: boolean;
-    detailFormatter?: any;
-    valign?: any;
-    sortable?: boolean;
-    cellStyle?: any;
-    searchable?: boolean;
-    footerFormatter?: any;
-    formatter?: any;
-    checkboxEnabled?: boolean;
-    field?: any;
-    width?: any;
-    clickToSelect?: boolean;
-    searchHighlightFormatter?: boolean;
-    cardVisible?: boolean
+  sortName?: any;
+  widthUnit?: string;
+  sorter?: any;
+  searchFormatter?: boolean;
+  titleTooltip?: any;
+  falign?: any;
+  title?: any;
+  align?: any;
+  radio?: boolean;
+  colspan?: any;
+  showSelectTitle?: boolean;
+  rowspan?: any;
+  checkbox?: boolean;
+  halign?: any;
+  switchable?: boolean;
+  class?: any;
+  escape?: boolean;
+  events?: BootstrapTableEvents;
+  order?: string;
+  visible?: boolean;
+  detailFormatter?: any;
+  valign?: any;
+  sortable?: boolean;
+  cellStyle?: any;
+  searchable?: boolean;
+  footerFormatter?: any;
+  formatter?: any;
+  checkboxEnabled?: boolean;
+  field?: any;
+  width?: any;
+  clickToSelect?: boolean;
+  searchHighlightFormatter?: boolean;
+  cardVisible?: boolean;
 }
 
 export interface BootstrapTableLocale {
-    formatPaginationSwitchDown?: () => string;
+  formatPaginationSwitchDown?: () => string;
+
+  formatColumns?: () => string;
 
-    formatColumns?: () => string;
+  formatAllRows?: () => string;
 
-    formatAllRows?: () => string;
+  formatLoadingMessage?: () => string;
 
-    formatLoadingMessage?: () => string;
+  formatSRPaginationPreText?: () => string;
 
-    formatSRPaginationPreText?: () => string;
+  formatPaginationSwitch?: () => string;
 
-    formatPaginationSwitch?: () => string;
+  formatDetailPagination?: (totalRows: number) => string;
 
-    formatDetailPagination?: (totalRows: number) => string;
+  formatNoMatches?: () => string;
 
-    formatNoMatches?: () => string;
+  formatSRPaginationNextText?: () => string;
 
-    formatSRPaginationNextText?: () => string;
+  formatSearch?: () => string;
 
-    formatSearch?: () => string;
+  formatFullscreen?: () => string;
 
-    formatFullscreen?: () => string;
+  formatShowingRows?: (
+    pageFrom: number,
+    pageTo: number,
+    totalRows: number,
+    totalNotFiltered: number
+  ) => string;
 
-    formatShowingRows?: (pageFrom: number, pageTo: number, totalRows: number, totalNotFiltered: number) => string;
-    formatSRPaginationPageText?: (page: number) => string;
+  formatSRPaginationPageText?: (page: number) => string;
 
-    formatClearSearch?: () => string;
+  formatClearSearch?: () => string;
 
-    formatPaginationSwitchUp?: () => string;
+  formatPaginationSwitchUp?: () => string;
 
-    formatToggle?: () => string;
+  formatToggle?: () => string;
 
-    formatToggleOff?: () => string;
+  formatToggleOff?: () => string;
 
-    formatColumnsToggleAll?: () => string;
+  formatColumnsToggleAll?: () => string;
 
-    formatRefresh?: () => string;
+  formatRefresh?: () => string;
 
-    formatToggleOn?: () => string;
+  formatToggleOn?: () => string;
 
-    formatRecordsPerPage(pageNumber: number): string
+  formatRecordsPerPage(pageNumber: number): string;
 }
 
 export interface BootstrapAjaxParams {
-    cache: boolean;
-    data: {
-        search: string;
-        offset: number;
-        limit: number;
-        sort?: any;
-        order?: any
-    };
-    dataType: string;
-    type: string;
-    contentType: string;
-    error: (jqXHR: JQueryXHR) => any;
-    success: (results: any, textStatus?: string, jqXHR?: JQueryXHR) => any;
+  cache: boolean;
+  data: {
+    search: string;
+    offset: number;
+    limit: number;
+    sort?: any;
+    order?: any;
+  };
+  dataType: string;
+  type: string;
+  contentType: string;
+  error: (jqXHR: JQueryXHR) => any;
+  success: (results: any, textStatus?: string, jqXHR?: JQueryXHR) => any;
 }
 
 export interface BootstrapTableOptions {
-    onCheck?: (row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
-    loadingFontSize?: string;
-    onDblClickCell?: (field: string, value: any, row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
-    rowStyle?: (row: any, index: number) => {};
-    showColumnsToggleAll?: boolean;
-    footerStyle?: (column: BootstrapTableColumn) => {};
-    onUncheck?: (row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
-    pageSize?: number;
-    footerField?: string;
-    showFullscreen?: boolean;
-    sortStable?: boolean;
-    searchAlign?: string;
-    ajax?: (params: BootstrapAjaxParams) => any;
-    onAll?: (name: string, args: any) => boolean | undefined;
-    onClickRow?: (row: any, $element: JQuery<HTMLElement>, field: string) => boolean | undefined;
-    ajaxOptions?: {};
-    onCheckSome?: (rows: any[]) => boolean | undefined;
-    customSort?: any;
-    iconSize?: any;
-    onCollapseRow?: (index: number, row: any, detailView: any) => boolean | undefined;
-    searchHighlight?: boolean;
-    height?: any;
-    onUncheckSome?: (rows: any[]) => boolean | undefined;
-    onToggle?: (cardView: boolean) => boolean | undefined;
-    ignoreClickToSelectOn?: ({tagName}?: {tagName: any}) => any;
-    cache?: boolean;
-    method?: string;
-    onColumnSwitch?: (field: string, checked: boolean) => boolean | undefined;
-    searchSelector?: boolean;
-    strictSearch?: boolean;
-    multipleSelectRow?: boolean;
-    onLoadError?: (status: string, jqXHR: JQuery.jqXHR) => boolean | undefined;
-    buttonsToolbar?: any;
-    paginationVAlign?: string;
-    showColumnsSearch?: boolean;
-    queryParamsType?: string;
-    sortOrder?: any;
-    paginationDetailHAlign?: string;
-    customSearch?: any;
-    visibleSearch?: boolean;
-    showButtonText?: boolean;
-    sortName?: any;
-    columns?: BootstrapTableColumn[];
-    onScrollBody?: () => boolean | undefined;
-    iconsPrefix?: string;
-    onPostBody?: () => boolean | undefined;
-    search?: boolean;
-    searchOnEnterKey?: boolean;
-    searchText?: string;
-    responseHandler?: (res: any) => any;
-    toolbarAlign?: string;
-    paginationParts?: string[];
-    cardView?: boolean;
-    showSearchButton?: boolean;
-    escape?: boolean;
-    searchTimeOut?: number;
-    buttonsAlign?: string;
-    buttonsOrder?: string[];
-    detailFormatter?: (index: number, row: any, $element: JQuery<HTMLElement>) => string;
-    onDblClickRow?: (row: any, $element: JQuery<HTMLElement>, field: string) => boolean | undefined;
-    paginationNextText?: string;
-    buttonsPrefix?: string;
-    loadingTemplate?: (loadingMessage: string) => string;
-    theadClasses?: string;
-    onLoadSuccess?: (data: any, status: string, jqXHR: JQuery.jqXHR) => boolean | undefined;
-    url?: any;
-    toolbar?: any;
-    onPostHeader?: () => boolean | undefined;
-    sidePagination?: string;
-    clickToSelect?: boolean;
-    virtualScrollItemHeight?: any;
-    rowAttributes?: (row: any, index: number) => {};
-    dataField?: string;
-    idField?: string;
-    onSort?: (name: string, order: number) => boolean | undefined;
-    pageNumber?: number;
-    data?: any[];
-    totalNotFilteredField?: string;
-    undefinedText?: string;
-    onSearch?: (text: string) => boolean | undefined;
-    onPageChange?: (number: number, size: number) => boolean | undefined;
-    paginationUseIntermediate?: boolean;
-    searchAccentNeutralise?: boolean;
-    singleSelect?: boolean;
-    showButtonIcons?: boolean;
-    showPaginationSwitch?: boolean;
-    onPreBody?: (data: any) => boolean | undefined;
-    detailFilter?: (index: number, row: any) => boolean | undefined;
-    detailViewByClick?: boolean;
-    totalField?: string;
-    contentType?: string;
-    showColumns?: boolean;
-    totalNotFiltered?: number;
-    checkboxHeader?: boolean;
-    onRefresh?: (params: any[]) => boolean | undefined;
-    dataType?: string;
-    paginationPreText?: string;
-    showToggle?: boolean;
-    detailView?: boolean;
-    serverSort?: boolean;
-    totalRows?: number;
-    silentSort?: boolean;
-    onPostFooter?: () => boolean | undefined;
-    selectItemName?: string;
-    detailViewIcon?: boolean;
-    detailViewAlign?: string;
-    minimumCountColumns?: number;
-    uniqueId?: any;
-    onResetView?: () => boolean | undefined;
-    paginationHAlign?: string;
-    sortClass?: any;
-    pagination?: boolean;
-    queryParams?: (params: any) => any;
-    paginationSuccessivelySize?: number;
-    classes?: string;
-    rememberOrder?: boolean;
-    paginationPagesBySide?: number;
-    trimOnSearch?: boolean;
-    showRefresh?: boolean;
-    locale?: BootstrapTableLocale;
-    onCheckAll?: (rowsAfter: any[], rowsBefore: any[]) => boolean | undefined;
-    showFooter?: boolean;
-    headerStyle?: (column: BootstrapTableColumn) => {};
-    maintainMetaData?: boolean;
-    onRefreshOptions?: (options: BootstrapTableOptions) => boolean | undefined;
-    showExtendedPagination?: boolean;
-    smartDisplay?: boolean;
-    paginationLoop?: boolean;
-    virtualScroll?: boolean;
-    sortReset?: boolean;
-    filterOptions?: {filterAlgorithm: string};
-    onUncheckAll?: (rowsAfter: any[], rowsBefore: any[]) => boolean | undefined;
-    showSearchClearButton?: boolean;
-    buttons?: {};
-    showHeader?: boolean;
-    onClickCell?: (field: string, value: any, row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
-    sortable?: boolean;
-    icons?: BootstrapTableIcons;
-    onExpandRow?: (index: number, row: any, $detail: JQuery<HTMLElement>) => boolean | undefined;
-    buttonsClass?: string;
-    pageList?: number[];
+  onCheck?: (row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
+  loadingFontSize?: string;
+  onDblClickCell?: (
+    field: string,
+    value: any,
+    row: any,
+    $element: JQuery<HTMLElement>
+  ) => boolean | undefined;
+  rowStyle?: (row: any, index: number) => {};
+  showColumnsToggleAll?: boolean;
+  footerStyle?: (column: BootstrapTableColumn) => {};
+  onUncheck?: (row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
+  pageSize?: number;
+  footerField?: string;
+  showFullscreen?: boolean;
+  sortStable?: boolean;
+  searchAlign?: string;
+  ajax?: (params: BootstrapAjaxParams) => any;
+  onAll?: (name: string, args: any) => boolean | undefined;
+  onClickRow?: (
+    row: any,
+    $element: JQuery<HTMLElement>,
+    field: string
+  ) => boolean | undefined;
+  ajaxOptions?: {};
+  onCheckSome?: (rows: any[]) => boolean | undefined;
+  customSort?: any;
+  iconSize?: any;
+  onCollapseRow?: (
+    index: number,
+    row: any,
+    detailView: any
+  ) => boolean | undefined;
+  searchHighlight?: boolean;
+  height?: any;
+  onUncheckSome?: (rows: any[]) => boolean | undefined;
+  onToggle?: (cardView: boolean) => boolean | undefined;
+  ignoreClickToSelectOn?: ({ tagName }?: { tagName: any }) => any;
+  cache?: boolean;
+  method?: string;
+  onColumnSwitch?: (field: string, checked: boolean) => boolean | undefined;
+  searchSelector?: boolean;
+  strictSearch?: boolean;
+  multipleSelectRow?: boolean;
+  onLoadError?: (status: string, jqXHR: JQuery.jqXHR) => boolean | undefined;
+  buttonsToolbar?: any;
+  paginationVAlign?: string;
+  showColumnsSearch?: boolean;
+  queryParamsType?: string;
+  sortOrder?: any;
+  paginationDetailHAlign?: string;
+  customSearch?: any;
+  visibleSearch?: boolean;
+  showButtonText?: boolean;
+  sortName?: any;
+  columns?: BootstrapTableColumn[];
+  onScrollBody?: () => boolean | undefined;
+  iconsPrefix?: string;
+  onPostBody?: () => boolean | undefined;
+  search?: boolean;
+  searchOnEnterKey?: boolean;
+  searchText?: string;
+  responseHandler?: (res: any) => any;
+  toolbarAlign?: string;
+  paginationParts?: string[];
+  cardView?: boolean;
+  showSearchButton?: boolean;
+  escape?: boolean;
+  searchTimeOut?: number;
+  buttonsAlign?: string;
+  buttonsOrder?: string[];
+  detailFormatter?: (
+    index: number,
+    row: any,
+    $element: JQuery<HTMLElement>
+  ) => string;
+  onDblClickRow?: (
+    row: any,
+    $element: JQuery<HTMLElement>,
+    field: string
+  ) => boolean | undefined;
+  paginationNextText?: string;
+  buttonsPrefix?: string;
+  loadingTemplate?: (loadingMessage: string) => string;
+  theadClasses?: string;
+  onLoadSuccess?: (
+    data: any,
+    status: string,
+    jqXHR: JQuery.jqXHR
+  ) => boolean | undefined;
+  url?: any;
+  toolbar?: any;
+  onPostHeader?: () => boolean | undefined;
+  sidePagination?: string;
+  clickToSelect?: boolean;
+  virtualScrollItemHeight?: any;
+  rowAttributes?: (row: any, index: number) => {};
+  dataField?: string;
+  idField?: string;
+  onSort?: (name: string, order: number) => boolean | undefined;
+  pageNumber?: number;
+  data?: any[];
+  totalNotFilteredField?: string;
+  undefinedText?: string;
+  onSearch?: (text: string) => boolean | undefined;
+  onPageChange?: (number: number, size: number) => boolean | undefined;
+  paginationUseIntermediate?: boolean;
+  searchAccentNeutralise?: boolean;
+  singleSelect?: boolean;
+  showButtonIcons?: boolean;
+  showPaginationSwitch?: boolean;
+  onPreBody?: (data: any) => boolean | undefined;
+  detailFilter?: (index: number, row: any) => boolean | undefined;
+  detailViewByClick?: boolean;
+  totalField?: string;
+  contentType?: string;
+  showColumns?: boolean;
+  totalNotFiltered?: number;
+  checkboxHeader?: boolean;
+  onRefresh?: (params: any[]) => boolean | undefined;
+  dataType?: string;
+  paginationPreText?: string;
+  showToggle?: boolean;
+  detailView?: boolean;
+  serverSort?: boolean;
+  totalRows?: number;
+  silentSort?: boolean;
+  onPostFooter?: () => boolean | undefined;
+  selectItemName?: string;
+  detailViewIcon?: boolean;
+  detailViewAlign?: string;
+  minimumCountColumns?: number;
+  uniqueId?: any;
+  onResetView?: () => boolean | undefined;
+  paginationHAlign?: string;
+  sortClass?: any;
+  pagination?: boolean;
+  queryParams?: (params: any) => any;
+  paginationSuccessivelySize?: number;
+  classes?: string;
+  rememberOrder?: boolean;
+  paginationPagesBySide?: number;
+  trimOnSearch?: boolean;
+  showRefresh?: boolean;
+  locale?: BootstrapTableLocale;
+  onCheckAll?: (rowsAfter: any[], rowsBefore: any[]) => boolean | undefined;
+  showFooter?: boolean;
+  headerStyle?: (column: BootstrapTableColumn) => {};
+  maintainMetaData?: boolean;
+  onRefreshOptions?: (options: BootstrapTableOptions) => boolean | undefined;
+  showExtendedPagination?: boolean;
+  smartDisplay?: boolean;
+  paginationLoop?: boolean;
+  virtualScroll?: boolean;
+  sortReset?: boolean;
+  filterOptions?: { filterAlgorithm: string };
+  onUncheckAll?: (rowsAfter: any[], rowsBefore: any[]) => boolean | undefined;
+  showSearchClearButton?: boolean;
+  buttons?: {};
+  showHeader?: boolean;
+  onClickCell?: (
+    field: string,
+    value: any,
+    row: any,
+    $element: JQuery<HTMLElement>
+  ) => boolean | undefined;
+  sortable?: boolean;
+  icons?: BootstrapTableIcons;
+  onExpandRow?: (
+    index: number,
+    row: any,
+    $detail: JQuery<HTMLElement>
+  ) => boolean | undefined;
+  buttonsClass?: string;
+  pageList?: number[];
 }
 
 declare global {
-    interface JQuery {
-        bootstrapTable(options: BootstrapTableOptions): JQuery;
+  interface JQuery {
+    bootstrapTable(options: BootstrapTableOptions): JQuery;
 
-        bootstrapTable(method: string, ...parameters: any[]): JQuery | any;
-    }
+    bootstrapTable(method: string, ...parameters: any[]): JQuery | any;
+  }
 }

+ 2 - 2
package.json

@@ -33,8 +33,8 @@
     "rollup-plugin-node-resolve": "^5.0.4",
     "rollup-plugin-terser": "^7.0.0",
     "rollup-plugin-vue": "5.1.9",
-    "stylelint": "^13.13.1",
-    "stylelint-config-standard": "^22.0.0",
+    "stylelint": "^14.8.2",
+    "stylelint-config-standard": "^25.0.0",
     "vue-template-compiler": "^2.6.10"
   },
   "scripts": {

File diff suppressed because it is too large
+ 8075 - 0
site/_themes/yarn.lock


+ 4 - 4
site/docs/api/table-options.md

@@ -452,11 +452,11 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Detail:**
 
-  Set `true` to show a detailed view table.
+  Set `true` to show a detailed view table. You can set the `uniqueId` option to maintain the detail view state when refreshing the table.
 
 - **Default:** `false`
 
-- **Example:** [Detail View](https://examples.bootstrap-table.com/#options/detail-view.html)
+- **Example:** [Detail View UniqueId](https://examples.bootstrap-table.com/#options/detail-view-unique-id.html)
 
 ## detailViewAlign
 
@@ -1802,8 +1802,8 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Detail:**
 
-  Indicate a unique identifier for each row.   
-  The Unique id should always be safe for html e.g. alphanumeric, it should not contain chars which can break html e.g. `"`. 
+  Indicate a unique identifier for each row.
+  The Unique id should always be safe for html e.g. alphanumeric, it should not contain chars which can break html e.g. `"`.
 
 - **Default:** `undefined`
 

+ 5 - 5
src/bootstrap-table.js

@@ -43,6 +43,10 @@ class BootstrapTable {
     const iconsPrefix = Utils.getIconsPrefix($.fn.bootstrapTable.theme)
     const icons = Utils.getIcons(iconsPrefix)
 
+    if (typeof opts.icons === 'string') {
+      opts.icons = Utils.calculateObjectValue(null, opts.icons)
+    }
+
     opts.iconsPrefix = opts.iconsPrefix || $.fn.bootstrapTable.defaults.iconsPrefix || iconsPrefix
     opts.icons = Object.assign(icons, $.fn.bootstrapTable.defaults.icons, opts.icons)
 
@@ -59,10 +63,6 @@ class BootstrapTable {
     if (typeof this.buttons !== 'object') {
       this.buttons = {}
     }
-
-    if (typeof opts.icons === 'string') {
-      opts.icons = Utils.calculateObjectValue(null, opts.icons)
-    }
   }
 
   initLocale () {
@@ -263,7 +263,7 @@ class BootstrapTable {
       searchables: []
     }
 
-    Utils.updateFieldGroup(this.options.columns)
+    Utils.updateFieldGroup(this.options.columns, this.columns)
 
     this.options.columns.forEach((columns, i) => {
       const html = []

+ 4 - 0
src/extensions/cookie/bootstrap-table-cookie.js

@@ -307,6 +307,10 @@ $.BootstrapTable = class extends $.BootstrapTable {
   onMultipleSort (...args) {
     super.onMultipleSort(...args)
 
+    if (!this.options.cookie) {
+      return
+    }
+
     if (this.options.sortPriority === undefined) {
       UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority)
     } else {

+ 8 - 8
src/themes/_theme.scss

@@ -47,7 +47,7 @@
         padding: 3px 20px;
         clear: both;
         font-weight: normal;
-        line-height: 1.428571429;
+        line-height: 1.4286;
       }
     }
 
@@ -108,15 +108,15 @@
         }
 
         .both {
-          background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC');
+          background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC");
         }
 
         .asc {
-          background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==');
+          background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==");
         }
 
         .desc {
-          background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ');
+          background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ");
         }
       }
 
@@ -242,7 +242,7 @@
             content: "";
             animation-duration: 1.5s;
             animation-iteration-count: infinite;
-            animation-name: LOADING;
+            animation-name: loading;
             background: $color;
             border-radius: 50%;
             display: block;
@@ -320,11 +320,11 @@
         li.page-intermediate {
           a {
             &::before {
-              content: '\2B05';
+              content: "\2B05";
             }
 
             &::after {
-              content: '\27A1';
+              content: "\27A1";
             }
 
             color: #c8c8c8;
@@ -383,7 +383,7 @@ div.fixed-table-scroll-outer {
   overflow: hidden;
 }
 
-@keyframes LOADING {
+@keyframes loading {
   0% { opacity: 0; }
   50% { opacity: 1; }
   to { opacity: 0; }

+ 15 - 1
src/utils/index.js

@@ -207,7 +207,7 @@ export default {
     return value.normalize('NFD').replace(/[\u0300-\u036f]/g, '')
   },
 
-  updateFieldGroup (columns) {
+  updateFieldGroup (columns, fieldColumns) {
     const allColumns = [].concat(...columns)
 
     for (const c of columns) {
@@ -227,6 +227,20 @@ export default {
         }
       }
     }
+
+    if (columns.length < 2) {
+      return
+    }
+
+    for (const column of fieldColumns) {
+      const sameColumns = allColumns.filter(col => col.fieldIndex === column.fieldIndex)
+
+      if (sameColumns.length > 1) {
+        for (const c of sameColumns) {
+          c.visible = column.visible
+        }
+      }
+    }
   },
 
   getScrollBarWidth () {

File diff suppressed because it is too large
+ 6048 - 0
yarn.lock