cabloy 5.1.10 → 5.1.12
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/CHANGELOG.md +13 -0
- package/lint-staged.config.mjs +92 -0
- package/oxfmt.config.ts +4 -1
- package/package.json +2 -11
- package/vona/packages-utils/lint/api/tsconfig.base.esm.json +30 -2
- package/vona/packages-utils/lint/package.json +40 -5
- package/vona/packages-utils/lint/src/index.ts +3 -0
- package/vona/packages-utils/lint/{oxc/format.js → src/oxc/format.ts} +4 -2
- package/vona/packages-utils/lint/{oxc/lint.js → src/oxc/lint.ts} +7 -7
- package/vona/packages-utils/lint/{oxc/lintVue.js → src/oxc/lintVue.ts} +4 -6
- package/vona/packages-utils/lint/tsconfig.json +14 -0
- package/vona/pnpm-lock.yaml +338 -17
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/index.ts +0 -78
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolOne.ts +3 -1
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolTwo.ts +3 -1
- package/zova/env/.env.ssr.cabloyBasicAdmin +0 -2
- package/zova/package.original.json +2 -8
- package/zova/packages-cli/cli/package.json +2 -2
- package/zova/packages-cli/cli-set-front/package.json +8 -8
- package/zova/packages-utils/babel-plugin-zova-bean-module/package.json +3 -3
- package/zova/packages-utils/babel-plugin-zova-bean-use/package.json +2 -2
- package/zova/packages-utils/babel-plugin-zova-behavior/package.json +2 -2
- package/zova/packages-utils/babel-plugin-zova-component/package.json +2 -2
- package/zova/packages-utils/logger/package.json +2 -2
- package/zova/packages-utils/mutate-on-copy/package.json +2 -2
- package/zova/packages-utils/quasar-app-extension-zova/package.json +3 -3
- package/zova/packages-utils/word-utils/package.json +2 -2
- package/zova/packages-utils/zova-jsx/package.json +4 -4
- package/zova/packages-utils/zova-openapi/package.json +2 -2
- package/zova/packages-utils/zova-vite/package.json +6 -6
- package/zova/packages-zova/zova/package.json +4 -4
- package/zova/packages-zova/zova-core/package.json +4 -4
- package/zova/pnpm-lock.yaml +67 -63
- package/zova/src/suite/a-demo/modules/demo-basic/package.json +1 -1
- package/zova/src/suite/a-demo/modules/demo-todo/package.json +1 -1
- package/zova/src/suite/a-demo/package.json +1 -1
- package/zova/src/suite/a-devui/modules/devui-adapter/package.json +1 -1
- package/zova/src/suite/a-devui/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-api/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-base/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-icon/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-index/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-layoutempty/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-layouttabs/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-login/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-passport/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-theme/package.json +1 -1
- package/zova/src/suite/a-home/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-adapter/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-captcha/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-commands/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-commandssync/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-currency/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-date/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-form/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-input/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-page/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-pageentry/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-select/package.json +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-table/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-text/package.json +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-api/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-app/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-bean/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-behavior/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-behaviors/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-boundary/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-command/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-fetch/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-icon/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-interceptor/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-logger/package.json +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-meta/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-model/package.json +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-router/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-routerstack/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-routertabs/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-ssrhmr/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-style/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-zod/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +5 -5
- package/zova/src/suite-vendor/a-zova/package.json +27 -27
- package/vona/packages-utils/lint/api/eslint.js +0 -41
- package/vona/packages-utils/lint/api/prettier.js +0 -8
- package/vona/packages-utils/lint/api/tsconfig.base.cjs.json +0 -32
- package/vona/packages-utils/lint/common/rules.js +0 -155
- package/vona/packages-utils/lint/common/rulesVue.js +0 -5
- package/vona/packages-utils/lint/front/eslint.js +0 -59
- package/vona/packages-utils/lint/front/prettier.js +0 -3
- package/vona/packages-utils/lint/front/tsconfig.base.cjs.json +0 -4
- package/vona/packages-utils/lint/front/tsconfig.base.esm.json +0 -9
- package/vona/packages-utils/lint/index.js +0 -3
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/-zova-config-CoKN49wO.js +0 -11
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-api-DmsK4zNw.js +0 -178
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-app-C7cTDV9C.js +0 -138
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-bean-qjOwLLml.js +0 -408
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-behavior-I9evY2QT.js +0 -454
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-behaviors-Dh8sE2AX.js +0 -58
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-boundary-DxeJURnH.js +0 -21
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-command-Duq9OGnp.js +0 -165
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-fetch-BsiDc5MA.js +0 -317
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-form-BSfvKLPu.js +0 -947
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-icon-Bx0yNmUB.js +0 -460
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-interceptor-CtK-mG6U.js +0 -256
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-logger-D6FVEo-2.js +0 -143
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-meta-DLAWtBzn.js +0 -47
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-model-Ds17NAa5.js +0 -887
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-openapi-Cu42a7Tj.js +0 -677
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-router-BEKs1P3y.js +0 -1009
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-routerstack-CNda3TvU.js +0 -239
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-routertabs-CA8KhmHx.js +0 -519
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-ssr-WZQfI3lD.js +0 -711
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-ssrhmr-DiG_2CbH.js +0 -97
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-style-Dcrophdv.js +0 -408
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-table-Cr0qHPMV.js +0 -464
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-zod-B5ZzHMKp.js +0 -87
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-zova-WAWkGLRj.js +0 -21
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/auth-Bjup4K84.svg +0 -8
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/axios-jFGAltpb.js +0 -3152
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-adapter-BzdgS83E.js +0 -68
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-captcha-gmlRJxbp.js +0 -209
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-commands-CmuoODyc.js +0 -179
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-commandssync-4uJoTYWO.js +0 -62
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-currency-ljdT_mJv.js +0 -159
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-date-CJtZtM5q.js +0 -251
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-form-Bi-Dm8Pp.js +0 -376
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-input-DugSctyu.js +0 -83
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-page-C0Mpx24A.js +0 -610
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-pageentry-De7Zvv7J.js +0 -443
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-select-WKCF4vyo.js +0 -186
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-table-B4Eyf7EC.js +0 -368
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-text-CRqjMEyr.js +0 -118
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/browser-C8cI94Tr.js +0 -2409
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/business-DQeTVrBD.svg +0 -12
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/daisy-BZm4lJOy.svg +0 -4
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/default-DxTAw1iv.svg +0 -118
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/demo-basic-CiW_uKMD.js +0 -1419
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/demo-student-DpiY4dnt.js +0 -69
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/demo-todo-CM3XdLlo.js +0 -427
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/devui-adapter-B2uiKP95.js +0 -95
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/dist.es2015-BMNhwNBy.js +0 -343
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/editor-CmZexDJp.svg +0 -32
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/emoji-CLaR2GZg.svg +0 -3
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/esm-Z9BncIrt.js +0 -2574
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/extends-BSP9iXrM.js +0 -27
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/fecha-DvkbkxAQ.js +0 -9849
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/flow-DCn4s91p.svg +0 -13
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-api-B1NjQp7i.js +0 -374
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-base-DRJdeGsg.js +0 -654
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-icon-65b9tDB5.js +0 -125
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-index-KrvUKcFR.js +0 -79
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-layoutempty-DP2peKfC.js +0 -87
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-layouttabs-CRIoszHS.js +0 -980
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-login-z4Url6WO.js +0 -302
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-passport-OqpwAU0M.js +0 -293
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-theme-BSua63Y_.js +0 -131
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/index-B5HTgis_.css +0 -26
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/index-Cd4EYYtZ.js +0 -1331
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/localforage-e6vl49GD.js +0 -1798
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/login-Qly1YUqs.svg +0 -7
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/openapi3-jIye4jNw.js +0 -23
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/outline-C6s9io8r.svg +0 -41
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/rest-resource-CN0Ontwm.js +0 -552
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/role-fXTNmWmb.svg +0 -10
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/rolldown-runtime-lkMnaVCm.js +0 -38
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/social-DosI14Uo.svg +0 -12
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/src-BRq8dtuS.js +0 -44
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/src-CBGuKzpF.js +0 -5996
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/src-CzJSxlnS.js +0 -496
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/src-YVxhoO6F.js +0 -65
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-form-CBq6dr_k.js +0 -122
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-query-BJk2jOuy.js +0 -2377
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-query-CBWe1LsT.js +0 -365
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-query-Ch18aWTP.js +0 -212
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-table-BvC3VgJj.js +0 -2241
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-table-D85qomSu.js +0 -123
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tools-Wk7SnIwE.svg +0 -4
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/typestyle-C2zp2284.js +0 -281
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-1Y5FbPzj.js +0 -3221
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-C-LVj1DU.js +0 -18
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-ChEE2n-Y.js +0 -598
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-CvF_GLFp.js +0 -190
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-DHzalQTI.js +0 -1308
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-router-COfHCB5q.js +0 -1775
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/wrapAsyncGenerator-zA6hqk-P.js +0 -155
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-6Abekb1F.js +0 -83
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-BHaXQJg22.js +0 -11
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-BYPEGx1T.js +0 -15586
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-BuxXrZHs.js +0 -24
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-C4pGJxwQ.js +0 -1227
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-CoRfsquu.js +0 -8
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-CzTANp3C.js +0 -380
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-DQbBsEtS.js +0 -4130
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-hmnYQoyt.js +0 -374
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/favicon.ico +0 -0
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/handler.js +0 -164729
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/index.js +0 -26236
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/quasar.manifest.json +0 -1
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/bean/ssrMenu.tools.ts +0 -32
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/bean/ssrMenuGroup.tools.ts +0 -18
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/bean/ssrSite.second.ts +0 -31
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/test/ssr.test.ts +0 -44
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/zovaRest/test-second/index.d.mts +0 -9107
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/zovaRest/test-second/index.mjs +0 -234
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/zovaRest/test-second/package.json +0 -40
|
@@ -1,2241 +0,0 @@
|
|
|
1
|
-
import { n as __esmMin } from "./rolldown-runtime-lkMnaVCm.js";
|
|
2
|
-
import { _ as init_toPropertyKey, d as _objectSpread2, f as init_objectSpread2, i as init_objectWithoutProperties, r as _objectWithoutProperties, v as toPropertyKey } from "./fecha-DvkbkxAQ.js";
|
|
3
|
-
//#region node_modules/.pnpm/@tanstack+table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.mjs
|
|
4
|
-
/**
|
|
5
|
-
* table-core
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) TanStack
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
11
|
-
*
|
|
12
|
-
* @license MIT
|
|
13
|
-
*/
|
|
14
|
-
function createColumnHelper() {
|
|
15
|
-
return {
|
|
16
|
-
accessor: (accessor, column) => {
|
|
17
|
-
return typeof accessor === "function" ? _objectSpread2(_objectSpread2({}, column), {}, { accessorFn: accessor }) : _objectSpread2(_objectSpread2({}, column), {}, { accessorKey: accessor });
|
|
18
|
-
},
|
|
19
|
-
display: (column) => column,
|
|
20
|
-
group: (column) => column
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function functionalUpdate(updater, input) {
|
|
24
|
-
return typeof updater === "function" ? updater(input) : updater;
|
|
25
|
-
}
|
|
26
|
-
function makeStateUpdater(key, instance) {
|
|
27
|
-
return (updater) => {
|
|
28
|
-
instance.setState((old) => {
|
|
29
|
-
return _objectSpread2(_objectSpread2({}, old), {}, { [key]: functionalUpdate(updater, old[key]) });
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function isFunction(d) {
|
|
34
|
-
return d instanceof Function;
|
|
35
|
-
}
|
|
36
|
-
function isNumberArray(d) {
|
|
37
|
-
return Array.isArray(d) && d.every((val) => typeof val === "number");
|
|
38
|
-
}
|
|
39
|
-
function flattenBy(arr, getChildren) {
|
|
40
|
-
const flat = [];
|
|
41
|
-
const recurse = (subArr) => {
|
|
42
|
-
subArr.forEach((item) => {
|
|
43
|
-
flat.push(item);
|
|
44
|
-
const children = getChildren(item);
|
|
45
|
-
if (children != null && children.length) recurse(children);
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
recurse(arr);
|
|
49
|
-
return flat;
|
|
50
|
-
}
|
|
51
|
-
function memo(getDeps, fn, opts) {
|
|
52
|
-
let deps = [];
|
|
53
|
-
let result;
|
|
54
|
-
return (depArgs) => {
|
|
55
|
-
let depTime;
|
|
56
|
-
if (opts.key && opts.debug) depTime = Date.now();
|
|
57
|
-
const newDeps = getDeps(depArgs);
|
|
58
|
-
if (!(newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep))) return result;
|
|
59
|
-
deps = newDeps;
|
|
60
|
-
let resultTime;
|
|
61
|
-
if (opts.key && opts.debug) resultTime = Date.now();
|
|
62
|
-
result = fn(...newDeps);
|
|
63
|
-
opts == null || opts.onChange == null || opts.onChange(result);
|
|
64
|
-
if (opts.key && opts.debug) {
|
|
65
|
-
if (opts != null && opts.debug()) {
|
|
66
|
-
const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
|
|
67
|
-
const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
|
|
68
|
-
const resultFpsPercentage = resultEndTime / 16;
|
|
69
|
-
const pad = (str, num) => {
|
|
70
|
-
str = String(str);
|
|
71
|
-
while (str.length < num) str = " " + str;
|
|
72
|
-
return str;
|
|
73
|
-
};
|
|
74
|
-
console.info(`%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`, `
|
|
75
|
-
font-size: .6rem;
|
|
76
|
-
font-weight: bold;
|
|
77
|
-
color: hsl(${Math.max(0, Math.min(120 - 120 * resultFpsPercentage, 120))}deg 100% 31%);`, opts == null ? void 0 : opts.key);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return result;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
function getMemoOptions(tableOptions, debugLevel, key, onChange) {
|
|
84
|
-
return {
|
|
85
|
-
debug: () => {
|
|
86
|
-
var _tableOptions$debugAl;
|
|
87
|
-
return (_tableOptions$debugAl = tableOptions == null ? void 0 : tableOptions.debugAll) != null ? _tableOptions$debugAl : tableOptions[debugLevel];
|
|
88
|
-
},
|
|
89
|
-
key: false,
|
|
90
|
-
onChange
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
function createCell(table, row, column, columnId) {
|
|
94
|
-
const getRenderValue = () => {
|
|
95
|
-
var _cell$getValue;
|
|
96
|
-
return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : table.options.renderFallbackValue;
|
|
97
|
-
};
|
|
98
|
-
const cell = {
|
|
99
|
-
id: `${row.id}_${column.id}`,
|
|
100
|
-
row,
|
|
101
|
-
column,
|
|
102
|
-
getValue: () => row.getValue(columnId),
|
|
103
|
-
renderValue: getRenderValue,
|
|
104
|
-
getContext: memo(() => [
|
|
105
|
-
table,
|
|
106
|
-
column,
|
|
107
|
-
row,
|
|
108
|
-
cell
|
|
109
|
-
], (table, column, row, cell) => ({
|
|
110
|
-
table,
|
|
111
|
-
column,
|
|
112
|
-
row,
|
|
113
|
-
cell,
|
|
114
|
-
getValue: cell.getValue,
|
|
115
|
-
renderValue: cell.renderValue
|
|
116
|
-
}), getMemoOptions(table.options, "debugCells", "cell.getContext"))
|
|
117
|
-
};
|
|
118
|
-
table._features.forEach((feature) => {
|
|
119
|
-
feature.createCell == null || feature.createCell(cell, column, row, table);
|
|
120
|
-
}, {});
|
|
121
|
-
return cell;
|
|
122
|
-
}
|
|
123
|
-
function createColumn(table, columnDef, depth, parent) {
|
|
124
|
-
var _ref, _resolvedColumnDef$id;
|
|
125
|
-
const resolvedColumnDef = _objectSpread2(_objectSpread2({}, table._getDefaultColumnDef()), columnDef);
|
|
126
|
-
const accessorKey = resolvedColumnDef.accessorKey;
|
|
127
|
-
let id = (_ref = (_resolvedColumnDef$id = resolvedColumnDef.id) != null ? _resolvedColumnDef$id : accessorKey ? typeof String.prototype.replaceAll === "function" ? accessorKey.replaceAll(".", "_") : accessorKey.replace(/\./g, "_") : void 0) != null ? _ref : typeof resolvedColumnDef.header === "string" ? resolvedColumnDef.header : void 0;
|
|
128
|
-
let accessorFn;
|
|
129
|
-
if (resolvedColumnDef.accessorFn) accessorFn = resolvedColumnDef.accessorFn;
|
|
130
|
-
else if (accessorKey) if (accessorKey.includes(".")) accessorFn = (originalRow) => {
|
|
131
|
-
let result = originalRow;
|
|
132
|
-
for (const key of accessorKey.split(".")) {
|
|
133
|
-
var _result;
|
|
134
|
-
result = (_result = result) == null ? void 0 : _result[key];
|
|
135
|
-
}
|
|
136
|
-
return result;
|
|
137
|
-
};
|
|
138
|
-
else accessorFn = (originalRow) => originalRow[resolvedColumnDef.accessorKey];
|
|
139
|
-
if (!id) throw new Error();
|
|
140
|
-
let column = {
|
|
141
|
-
id: `${String(id)}`,
|
|
142
|
-
accessorFn,
|
|
143
|
-
parent,
|
|
144
|
-
depth,
|
|
145
|
-
columnDef: resolvedColumnDef,
|
|
146
|
-
columns: [],
|
|
147
|
-
getFlatColumns: memo(() => [true], () => {
|
|
148
|
-
var _column$columns;
|
|
149
|
-
return [column, ...(_column$columns = column.columns) == null ? void 0 : _column$columns.flatMap((d) => d.getFlatColumns())];
|
|
150
|
-
}, getMemoOptions(table.options, "debugColumns", "column.getFlatColumns")),
|
|
151
|
-
getLeafColumns: memo(() => [table._getOrderColumnsFn()], (orderColumns) => {
|
|
152
|
-
var _column$columns2;
|
|
153
|
-
if ((_column$columns2 = column.columns) != null && _column$columns2.length) return orderColumns(column.columns.flatMap((column) => column.getLeafColumns()));
|
|
154
|
-
return [column];
|
|
155
|
-
}, getMemoOptions(table.options, "debugColumns", "column.getLeafColumns"))
|
|
156
|
-
};
|
|
157
|
-
for (const feature of table._features) feature.createColumn == null || feature.createColumn(column, table);
|
|
158
|
-
return column;
|
|
159
|
-
}
|
|
160
|
-
function createHeader(table, column, options) {
|
|
161
|
-
var _options$id;
|
|
162
|
-
let header = {
|
|
163
|
-
id: (_options$id = options.id) != null ? _options$id : column.id,
|
|
164
|
-
column,
|
|
165
|
-
index: options.index,
|
|
166
|
-
isPlaceholder: !!options.isPlaceholder,
|
|
167
|
-
placeholderId: options.placeholderId,
|
|
168
|
-
depth: options.depth,
|
|
169
|
-
subHeaders: [],
|
|
170
|
-
colSpan: 0,
|
|
171
|
-
rowSpan: 0,
|
|
172
|
-
headerGroup: null,
|
|
173
|
-
getLeafHeaders: () => {
|
|
174
|
-
const leafHeaders = [];
|
|
175
|
-
const recurseHeader = (h) => {
|
|
176
|
-
if (h.subHeaders && h.subHeaders.length) h.subHeaders.map(recurseHeader);
|
|
177
|
-
leafHeaders.push(h);
|
|
178
|
-
};
|
|
179
|
-
recurseHeader(header);
|
|
180
|
-
return leafHeaders;
|
|
181
|
-
},
|
|
182
|
-
getContext: () => ({
|
|
183
|
-
table,
|
|
184
|
-
header,
|
|
185
|
-
column
|
|
186
|
-
})
|
|
187
|
-
};
|
|
188
|
-
table._features.forEach((feature) => {
|
|
189
|
-
feature.createHeader == null || feature.createHeader(header, table);
|
|
190
|
-
});
|
|
191
|
-
return header;
|
|
192
|
-
}
|
|
193
|
-
function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
|
|
194
|
-
var _headerGroups$0$heade, _headerGroups$;
|
|
195
|
-
let maxDepth = 0;
|
|
196
|
-
const findMaxDepth = function(columns, depth) {
|
|
197
|
-
if (depth === void 0) depth = 1;
|
|
198
|
-
maxDepth = Math.max(maxDepth, depth);
|
|
199
|
-
columns.filter((column) => column.getIsVisible()).forEach((column) => {
|
|
200
|
-
var _column$columns;
|
|
201
|
-
if ((_column$columns = column.columns) != null && _column$columns.length) findMaxDepth(column.columns, depth + 1);
|
|
202
|
-
}, 0);
|
|
203
|
-
};
|
|
204
|
-
findMaxDepth(allColumns);
|
|
205
|
-
let headerGroups = [];
|
|
206
|
-
const createHeaderGroup = (headersToGroup, depth) => {
|
|
207
|
-
const headerGroup = {
|
|
208
|
-
depth,
|
|
209
|
-
id: [headerFamily, `${depth}`].filter(Boolean).join("_"),
|
|
210
|
-
headers: []
|
|
211
|
-
};
|
|
212
|
-
const pendingParentHeaders = [];
|
|
213
|
-
headersToGroup.forEach((headerToGroup) => {
|
|
214
|
-
const latestPendingParentHeader = [...pendingParentHeaders].reverse()[0];
|
|
215
|
-
const isLeafHeader = headerToGroup.column.depth === headerGroup.depth;
|
|
216
|
-
let column;
|
|
217
|
-
let isPlaceholder = false;
|
|
218
|
-
if (isLeafHeader && headerToGroup.column.parent) column = headerToGroup.column.parent;
|
|
219
|
-
else {
|
|
220
|
-
column = headerToGroup.column;
|
|
221
|
-
isPlaceholder = true;
|
|
222
|
-
}
|
|
223
|
-
if (latestPendingParentHeader && (latestPendingParentHeader == null ? void 0 : latestPendingParentHeader.column) === column) latestPendingParentHeader.subHeaders.push(headerToGroup);
|
|
224
|
-
else {
|
|
225
|
-
const header = createHeader(table, column, {
|
|
226
|
-
id: [
|
|
227
|
-
headerFamily,
|
|
228
|
-
depth,
|
|
229
|
-
column.id,
|
|
230
|
-
headerToGroup == null ? void 0 : headerToGroup.id
|
|
231
|
-
].filter(Boolean).join("_"),
|
|
232
|
-
isPlaceholder,
|
|
233
|
-
placeholderId: isPlaceholder ? `${pendingParentHeaders.filter((d) => d.column === column).length}` : void 0,
|
|
234
|
-
depth,
|
|
235
|
-
index: pendingParentHeaders.length
|
|
236
|
-
});
|
|
237
|
-
header.subHeaders.push(headerToGroup);
|
|
238
|
-
pendingParentHeaders.push(header);
|
|
239
|
-
}
|
|
240
|
-
headerGroup.headers.push(headerToGroup);
|
|
241
|
-
headerToGroup.headerGroup = headerGroup;
|
|
242
|
-
});
|
|
243
|
-
headerGroups.push(headerGroup);
|
|
244
|
-
if (depth > 0) createHeaderGroup(pendingParentHeaders, depth - 1);
|
|
245
|
-
};
|
|
246
|
-
createHeaderGroup(columnsToGroup.map((column, index) => createHeader(table, column, {
|
|
247
|
-
depth: maxDepth,
|
|
248
|
-
index
|
|
249
|
-
})), maxDepth - 1);
|
|
250
|
-
headerGroups.reverse();
|
|
251
|
-
const recurseHeadersForSpans = (headers) => {
|
|
252
|
-
return headers.filter((header) => header.column.getIsVisible()).map((header) => {
|
|
253
|
-
let colSpan = 0;
|
|
254
|
-
let rowSpan = 0;
|
|
255
|
-
let childRowSpans = [0];
|
|
256
|
-
if (header.subHeaders && header.subHeaders.length) {
|
|
257
|
-
childRowSpans = [];
|
|
258
|
-
recurseHeadersForSpans(header.subHeaders).forEach((_ref) => {
|
|
259
|
-
let { colSpan: childColSpan, rowSpan: childRowSpan } = _ref;
|
|
260
|
-
colSpan += childColSpan;
|
|
261
|
-
childRowSpans.push(childRowSpan);
|
|
262
|
-
});
|
|
263
|
-
} else colSpan = 1;
|
|
264
|
-
const minChildRowSpan = Math.min(...childRowSpans);
|
|
265
|
-
rowSpan = rowSpan + minChildRowSpan;
|
|
266
|
-
header.colSpan = colSpan;
|
|
267
|
-
header.rowSpan = rowSpan;
|
|
268
|
-
return {
|
|
269
|
-
colSpan,
|
|
270
|
-
rowSpan
|
|
271
|
-
};
|
|
272
|
-
});
|
|
273
|
-
};
|
|
274
|
-
recurseHeadersForSpans((_headerGroups$0$heade = (_headerGroups$ = headerGroups[0]) == null ? void 0 : _headerGroups$.headers) != null ? _headerGroups$0$heade : []);
|
|
275
|
-
return headerGroups;
|
|
276
|
-
}
|
|
277
|
-
function testFalsey(val) {
|
|
278
|
-
return val === void 0 || val === null || val === "";
|
|
279
|
-
}
|
|
280
|
-
function shouldAutoRemoveFilter(filterFn, value, column) {
|
|
281
|
-
return (filterFn && filterFn.autoRemove ? filterFn.autoRemove(value, column) : false) || typeof value === "undefined" || typeof value === "string" && !value;
|
|
282
|
-
}
|
|
283
|
-
function orderColumns(leafColumns, grouping, groupedColumnMode) {
|
|
284
|
-
if (!(grouping != null && grouping.length) || !groupedColumnMode) return leafColumns;
|
|
285
|
-
const nonGroupingColumns = leafColumns.filter((col) => !grouping.includes(col.id));
|
|
286
|
-
if (groupedColumnMode === "remove") return nonGroupingColumns;
|
|
287
|
-
return [...grouping.map((g) => leafColumns.find((col) => col.id === g)).filter(Boolean), ...nonGroupingColumns];
|
|
288
|
-
}
|
|
289
|
-
function safelyAccessDocument(_document) {
|
|
290
|
-
return _document || (typeof document !== "undefined" ? document : null);
|
|
291
|
-
}
|
|
292
|
-
function passiveEventSupported() {
|
|
293
|
-
if (typeof passiveSupported === "boolean") return passiveSupported;
|
|
294
|
-
let supported = false;
|
|
295
|
-
try {
|
|
296
|
-
const options = { get passive() {
|
|
297
|
-
supported = true;
|
|
298
|
-
return false;
|
|
299
|
-
} };
|
|
300
|
-
const noop = () => {};
|
|
301
|
-
window.addEventListener("test", noop, options);
|
|
302
|
-
window.removeEventListener("test", noop);
|
|
303
|
-
} catch (err) {
|
|
304
|
-
supported = false;
|
|
305
|
-
}
|
|
306
|
-
passiveSupported = supported;
|
|
307
|
-
return passiveSupported;
|
|
308
|
-
}
|
|
309
|
-
function isTouchStartEvent(e) {
|
|
310
|
-
return e.type === "touchstart";
|
|
311
|
-
}
|
|
312
|
-
function _getVisibleLeafColumns(table, position) {
|
|
313
|
-
return !position ? table.getVisibleLeafColumns() : position === "center" ? table.getCenterVisibleLeafColumns() : position === "left" ? table.getLeftVisibleLeafColumns() : table.getRightVisibleLeafColumns();
|
|
314
|
-
}
|
|
315
|
-
function selectRowsFn(table, rowModel) {
|
|
316
|
-
const rowSelection = table.getState().rowSelection;
|
|
317
|
-
const newSelectedFlatRows = [];
|
|
318
|
-
const newSelectedRowsById = {};
|
|
319
|
-
const recurseRows = function(rows, depth) {
|
|
320
|
-
return rows.map((row) => {
|
|
321
|
-
var _row$subRows2;
|
|
322
|
-
const isSelected = isRowSelected(row, rowSelection);
|
|
323
|
-
if (isSelected) {
|
|
324
|
-
newSelectedFlatRows.push(row);
|
|
325
|
-
newSelectedRowsById[row.id] = row;
|
|
326
|
-
}
|
|
327
|
-
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) row = _objectSpread2(_objectSpread2({}, row), {}, { subRows: recurseRows(row.subRows) });
|
|
328
|
-
if (isSelected) return row;
|
|
329
|
-
}).filter(Boolean);
|
|
330
|
-
};
|
|
331
|
-
return {
|
|
332
|
-
rows: recurseRows(rowModel.rows),
|
|
333
|
-
flatRows: newSelectedFlatRows,
|
|
334
|
-
rowsById: newSelectedRowsById
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
function isRowSelected(row, selection) {
|
|
338
|
-
var _selection$row$id;
|
|
339
|
-
return (_selection$row$id = selection[row.id]) != null ? _selection$row$id : false;
|
|
340
|
-
}
|
|
341
|
-
function isSubRowSelected(row, selection, table) {
|
|
342
|
-
var _row$subRows3;
|
|
343
|
-
if (!((_row$subRows3 = row.subRows) != null && _row$subRows3.length)) return false;
|
|
344
|
-
let allChildrenSelected = true;
|
|
345
|
-
let someSelected = false;
|
|
346
|
-
row.subRows.forEach((subRow) => {
|
|
347
|
-
if (someSelected && !allChildrenSelected) return;
|
|
348
|
-
if (subRow.getCanSelect()) if (isRowSelected(subRow, selection)) someSelected = true;
|
|
349
|
-
else allChildrenSelected = false;
|
|
350
|
-
if (subRow.subRows && subRow.subRows.length) {
|
|
351
|
-
const subRowChildrenSelected = isSubRowSelected(subRow, selection);
|
|
352
|
-
if (subRowChildrenSelected === "all") someSelected = true;
|
|
353
|
-
else if (subRowChildrenSelected === "some") {
|
|
354
|
-
someSelected = true;
|
|
355
|
-
allChildrenSelected = false;
|
|
356
|
-
} else allChildrenSelected = false;
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
return allChildrenSelected ? "all" : someSelected ? "some" : false;
|
|
360
|
-
}
|
|
361
|
-
function compareBasic(a, b) {
|
|
362
|
-
return a === b ? 0 : a > b ? 1 : -1;
|
|
363
|
-
}
|
|
364
|
-
function toString(a) {
|
|
365
|
-
if (typeof a === "number") {
|
|
366
|
-
if (isNaN(a) || a === Infinity || a === -Infinity) return "";
|
|
367
|
-
return String(a);
|
|
368
|
-
}
|
|
369
|
-
if (typeof a === "string") return a;
|
|
370
|
-
return "";
|
|
371
|
-
}
|
|
372
|
-
function compareAlphanumeric(aStr, bStr) {
|
|
373
|
-
const a = aStr.split(reSplitAlphaNumeric).filter(Boolean);
|
|
374
|
-
const b = bStr.split(reSplitAlphaNumeric).filter(Boolean);
|
|
375
|
-
while (a.length && b.length) {
|
|
376
|
-
const aa = a.shift();
|
|
377
|
-
const bb = b.shift();
|
|
378
|
-
const an = parseInt(aa, 10);
|
|
379
|
-
const bn = parseInt(bb, 10);
|
|
380
|
-
const combo = [an, bn].sort();
|
|
381
|
-
if (isNaN(combo[0])) {
|
|
382
|
-
if (aa > bb) return 1;
|
|
383
|
-
if (bb > aa) return -1;
|
|
384
|
-
continue;
|
|
385
|
-
}
|
|
386
|
-
if (isNaN(combo[1])) return isNaN(an) ? -1 : 1;
|
|
387
|
-
if (an > bn) return 1;
|
|
388
|
-
if (bn > an) return -1;
|
|
389
|
-
}
|
|
390
|
-
return a.length - b.length;
|
|
391
|
-
}
|
|
392
|
-
function createTable(options) {
|
|
393
|
-
var _options$_features, _options$initialState;
|
|
394
|
-
const _features = [...builtInFeatures, ...(_options$_features = options._features) != null ? _options$_features : []];
|
|
395
|
-
let table = { _features };
|
|
396
|
-
const defaultOptions = table._features.reduce((obj, feature) => {
|
|
397
|
-
return Object.assign(obj, feature.getDefaultOptions == null ? void 0 : feature.getDefaultOptions(table));
|
|
398
|
-
}, {});
|
|
399
|
-
const mergeOptions = (options) => {
|
|
400
|
-
if (table.options.mergeOptions) return table.options.mergeOptions(defaultOptions, options);
|
|
401
|
-
return _objectSpread2(_objectSpread2({}, defaultOptions), options);
|
|
402
|
-
};
|
|
403
|
-
let initialState = _objectSpread2(_objectSpread2({}, {}), (_options$initialState = options.initialState) != null ? _options$initialState : {});
|
|
404
|
-
table._features.forEach((feature) => {
|
|
405
|
-
var _feature$getInitialSt;
|
|
406
|
-
initialState = (_feature$getInitialSt = feature.getInitialState == null ? void 0 : feature.getInitialState(initialState)) != null ? _feature$getInitialSt : initialState;
|
|
407
|
-
});
|
|
408
|
-
const queued = [];
|
|
409
|
-
let queuedTimeout = false;
|
|
410
|
-
const coreInstance = {
|
|
411
|
-
_features,
|
|
412
|
-
options: _objectSpread2(_objectSpread2({}, defaultOptions), options),
|
|
413
|
-
initialState,
|
|
414
|
-
_queue: (cb) => {
|
|
415
|
-
queued.push(cb);
|
|
416
|
-
if (!queuedTimeout) {
|
|
417
|
-
queuedTimeout = true;
|
|
418
|
-
Promise.resolve().then(() => {
|
|
419
|
-
while (queued.length) queued.shift()();
|
|
420
|
-
queuedTimeout = false;
|
|
421
|
-
}).catch((error) => setTimeout(() => {
|
|
422
|
-
throw error;
|
|
423
|
-
}));
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
reset: () => {
|
|
427
|
-
table.setState(table.initialState);
|
|
428
|
-
},
|
|
429
|
-
setOptions: (updater) => {
|
|
430
|
-
table.options = mergeOptions(functionalUpdate(updater, table.options));
|
|
431
|
-
},
|
|
432
|
-
getState: () => {
|
|
433
|
-
return table.options.state;
|
|
434
|
-
},
|
|
435
|
-
setState: (updater) => {
|
|
436
|
-
table.options.onStateChange == null || table.options.onStateChange(updater);
|
|
437
|
-
},
|
|
438
|
-
_getRowId: (row, index, parent) => {
|
|
439
|
-
var _table$options$getRow;
|
|
440
|
-
return (_table$options$getRow = table.options.getRowId == null ? void 0 : table.options.getRowId(row, index, parent)) != null ? _table$options$getRow : `${parent ? [parent.id, index].join(".") : index}`;
|
|
441
|
-
},
|
|
442
|
-
getCoreRowModel: () => {
|
|
443
|
-
if (!table._getCoreRowModel) table._getCoreRowModel = table.options.getCoreRowModel(table);
|
|
444
|
-
return table._getCoreRowModel();
|
|
445
|
-
},
|
|
446
|
-
getRowModel: () => {
|
|
447
|
-
return table.getPaginationRowModel();
|
|
448
|
-
},
|
|
449
|
-
getRow: (id, searchAll) => {
|
|
450
|
-
let row = (searchAll ? table.getPrePaginationRowModel() : table.getRowModel()).rowsById[id];
|
|
451
|
-
if (!row) {
|
|
452
|
-
row = table.getCoreRowModel().rowsById[id];
|
|
453
|
-
if (!row) throw new Error();
|
|
454
|
-
}
|
|
455
|
-
return row;
|
|
456
|
-
},
|
|
457
|
-
_getDefaultColumnDef: memo(() => [table.options.defaultColumn], (defaultColumn) => {
|
|
458
|
-
var _defaultColumn;
|
|
459
|
-
defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
|
|
460
|
-
return _objectSpread2(_objectSpread2({
|
|
461
|
-
header: (props) => {
|
|
462
|
-
const resolvedColumnDef = props.header.column.columnDef;
|
|
463
|
-
if (resolvedColumnDef.accessorKey) return resolvedColumnDef.accessorKey;
|
|
464
|
-
if (resolvedColumnDef.accessorFn) return resolvedColumnDef.id;
|
|
465
|
-
return null;
|
|
466
|
-
},
|
|
467
|
-
cell: (props) => {
|
|
468
|
-
var _props$renderValue$to, _props$renderValue;
|
|
469
|
-
return (_props$renderValue$to = (_props$renderValue = props.renderValue()) == null || _props$renderValue.toString == null ? void 0 : _props$renderValue.toString()) != null ? _props$renderValue$to : null;
|
|
470
|
-
}
|
|
471
|
-
}, table._features.reduce((obj, feature) => {
|
|
472
|
-
return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());
|
|
473
|
-
}, {})), defaultColumn);
|
|
474
|
-
}, getMemoOptions(options, "debugColumns", "_getDefaultColumnDef")),
|
|
475
|
-
_getColumnDefs: () => table.options.columns,
|
|
476
|
-
getAllColumns: memo(() => [table._getColumnDefs()], (columnDefs) => {
|
|
477
|
-
const recurseColumns = function(columnDefs, parent, depth) {
|
|
478
|
-
if (depth === void 0) depth = 0;
|
|
479
|
-
return columnDefs.map((columnDef) => {
|
|
480
|
-
const column = createColumn(table, columnDef, depth, parent);
|
|
481
|
-
const groupingColumnDef = columnDef;
|
|
482
|
-
column.columns = groupingColumnDef.columns ? recurseColumns(groupingColumnDef.columns, column, depth + 1) : [];
|
|
483
|
-
return column;
|
|
484
|
-
});
|
|
485
|
-
};
|
|
486
|
-
return recurseColumns(columnDefs);
|
|
487
|
-
}, getMemoOptions(options, "debugColumns", "getAllColumns")),
|
|
488
|
-
getAllFlatColumns: memo(() => [table.getAllColumns()], (allColumns) => {
|
|
489
|
-
return allColumns.flatMap((column) => {
|
|
490
|
-
return column.getFlatColumns();
|
|
491
|
-
});
|
|
492
|
-
}, getMemoOptions(options, "debugColumns", "getAllFlatColumns")),
|
|
493
|
-
_getAllFlatColumnsById: memo(() => [table.getAllFlatColumns()], (flatColumns) => {
|
|
494
|
-
return flatColumns.reduce((acc, column) => {
|
|
495
|
-
acc[column.id] = column;
|
|
496
|
-
return acc;
|
|
497
|
-
}, {});
|
|
498
|
-
}, getMemoOptions(options, "debugColumns", "getAllFlatColumnsById")),
|
|
499
|
-
getAllLeafColumns: memo(() => [table.getAllColumns(), table._getOrderColumnsFn()], (allColumns, orderColumns) => {
|
|
500
|
-
return orderColumns(allColumns.flatMap((column) => column.getLeafColumns()));
|
|
501
|
-
}, getMemoOptions(options, "debugColumns", "getAllLeafColumns")),
|
|
502
|
-
getColumn: (columnId) => {
|
|
503
|
-
return table._getAllFlatColumnsById()[columnId];
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
Object.assign(table, coreInstance);
|
|
507
|
-
for (let index = 0; index < table._features.length; index++) {
|
|
508
|
-
const feature = table._features[index];
|
|
509
|
-
feature == null || feature.createTable == null || feature.createTable(table);
|
|
510
|
-
}
|
|
511
|
-
return table;
|
|
512
|
-
}
|
|
513
|
-
function getCoreRowModel() {
|
|
514
|
-
return (table) => memo(() => [table.options.data], (data) => {
|
|
515
|
-
const rowModel = {
|
|
516
|
-
rows: [],
|
|
517
|
-
flatRows: [],
|
|
518
|
-
rowsById: {}
|
|
519
|
-
};
|
|
520
|
-
const accessRows = function(originalRows, depth, parentRow) {
|
|
521
|
-
if (depth === void 0) depth = 0;
|
|
522
|
-
const rows = [];
|
|
523
|
-
for (let i = 0; i < originalRows.length; i++) {
|
|
524
|
-
const row = createRow(table, table._getRowId(originalRows[i], i, parentRow), originalRows[i], i, depth, void 0, parentRow == null ? void 0 : parentRow.id);
|
|
525
|
-
rowModel.flatRows.push(row);
|
|
526
|
-
rowModel.rowsById[row.id] = row;
|
|
527
|
-
rows.push(row);
|
|
528
|
-
if (table.options.getSubRows) {
|
|
529
|
-
var _row$originalSubRows;
|
|
530
|
-
row.originalSubRows = table.options.getSubRows(originalRows[i], i);
|
|
531
|
-
if ((_row$originalSubRows = row.originalSubRows) != null && _row$originalSubRows.length) row.subRows = accessRows(row.originalSubRows, depth + 1, row);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
return rows;
|
|
535
|
-
};
|
|
536
|
-
rowModel.rows = accessRows(data);
|
|
537
|
-
return rowModel;
|
|
538
|
-
}, getMemoOptions(table.options, "debugTable", "getRowModel", () => table._autoResetPageIndex()));
|
|
539
|
-
}
|
|
540
|
-
var debug, Headers, createRow, ColumnFaceting, includesString, includesStringSensitive, equalsString, arrIncludes, arrIncludesAll, arrIncludesSome, equals, weakEquals, inNumberRange, filterFns, ColumnFiltering, sum, min, max, extent, mean, median, unique, uniqueCount, count, aggregationFns, ColumnGrouping, ColumnOrdering, getDefaultColumnPinningState, ColumnPinning, defaultColumnSizing, getDefaultColumnSizingInfoState, ColumnSizing, passiveSupported, ColumnVisibility, GlobalFaceting, GlobalFiltering, RowExpanding, defaultPageIndex, defaultPageSize, getDefaultPaginationState, RowPagination, getDefaultRowPinningState, RowPinning, RowSelection, mutateRowIsSelected, reSplitAlphaNumeric, alphanumeric, alphanumericCaseSensitive, text, textCaseSensitive, datetime, basic, sortingFns, RowSorting, builtInFeatures;
|
|
541
|
-
var init_lib = __esmMin((() => {
|
|
542
|
-
init_objectSpread2();
|
|
543
|
-
init_toPropertyKey();
|
|
544
|
-
init_objectWithoutProperties();
|
|
545
|
-
debug = "debugHeaders";
|
|
546
|
-
Headers = { createTable: (table) => {
|
|
547
|
-
table.getHeaderGroups = memo(() => [
|
|
548
|
-
table.getAllColumns(),
|
|
549
|
-
table.getVisibleLeafColumns(),
|
|
550
|
-
table.getState().columnPinning.left,
|
|
551
|
-
table.getState().columnPinning.right
|
|
552
|
-
], (allColumns, leafColumns, left, right) => {
|
|
553
|
-
var _left$map$filter, _right$map$filter;
|
|
554
|
-
const leftColumns = (_left$map$filter = left == null ? void 0 : left.map((columnId) => leafColumns.find((d) => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];
|
|
555
|
-
const rightColumns = (_right$map$filter = right == null ? void 0 : right.map((columnId) => leafColumns.find((d) => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];
|
|
556
|
-
const centerColumns = leafColumns.filter((column) => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
|
|
557
|
-
return buildHeaderGroups(allColumns, [
|
|
558
|
-
...leftColumns,
|
|
559
|
-
...centerColumns,
|
|
560
|
-
...rightColumns
|
|
561
|
-
], table);
|
|
562
|
-
}, getMemoOptions(table.options, debug, "getHeaderGroups"));
|
|
563
|
-
table.getCenterHeaderGroups = memo(() => [
|
|
564
|
-
table.getAllColumns(),
|
|
565
|
-
table.getVisibleLeafColumns(),
|
|
566
|
-
table.getState().columnPinning.left,
|
|
567
|
-
table.getState().columnPinning.right
|
|
568
|
-
], (allColumns, leafColumns, left, right) => {
|
|
569
|
-
leafColumns = leafColumns.filter((column) => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
|
|
570
|
-
return buildHeaderGroups(allColumns, leafColumns, table, "center");
|
|
571
|
-
}, getMemoOptions(table.options, debug, "getCenterHeaderGroups"));
|
|
572
|
-
table.getLeftHeaderGroups = memo(() => [
|
|
573
|
-
table.getAllColumns(),
|
|
574
|
-
table.getVisibleLeafColumns(),
|
|
575
|
-
table.getState().columnPinning.left
|
|
576
|
-
], (allColumns, leafColumns, left) => {
|
|
577
|
-
var _left$map$filter2;
|
|
578
|
-
return buildHeaderGroups(allColumns, (_left$map$filter2 = left == null ? void 0 : left.map((columnId) => leafColumns.find((d) => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter2 : [], table, "left");
|
|
579
|
-
}, getMemoOptions(table.options, debug, "getLeftHeaderGroups"));
|
|
580
|
-
table.getRightHeaderGroups = memo(() => [
|
|
581
|
-
table.getAllColumns(),
|
|
582
|
-
table.getVisibleLeafColumns(),
|
|
583
|
-
table.getState().columnPinning.right
|
|
584
|
-
], (allColumns, leafColumns, right) => {
|
|
585
|
-
var _right$map$filter2;
|
|
586
|
-
return buildHeaderGroups(allColumns, (_right$map$filter2 = right == null ? void 0 : right.map((columnId) => leafColumns.find((d) => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter2 : [], table, "right");
|
|
587
|
-
}, getMemoOptions(table.options, debug, "getRightHeaderGroups"));
|
|
588
|
-
table.getFooterGroups = memo(() => [table.getHeaderGroups()], (headerGroups) => {
|
|
589
|
-
return [...headerGroups].reverse();
|
|
590
|
-
}, getMemoOptions(table.options, debug, "getFooterGroups"));
|
|
591
|
-
table.getLeftFooterGroups = memo(() => [table.getLeftHeaderGroups()], (headerGroups) => {
|
|
592
|
-
return [...headerGroups].reverse();
|
|
593
|
-
}, getMemoOptions(table.options, debug, "getLeftFooterGroups"));
|
|
594
|
-
table.getCenterFooterGroups = memo(() => [table.getCenterHeaderGroups()], (headerGroups) => {
|
|
595
|
-
return [...headerGroups].reverse();
|
|
596
|
-
}, getMemoOptions(table.options, debug, "getCenterFooterGroups"));
|
|
597
|
-
table.getRightFooterGroups = memo(() => [table.getRightHeaderGroups()], (headerGroups) => {
|
|
598
|
-
return [...headerGroups].reverse();
|
|
599
|
-
}, getMemoOptions(table.options, debug, "getRightFooterGroups"));
|
|
600
|
-
table.getFlatHeaders = memo(() => [table.getHeaderGroups()], (headerGroups) => {
|
|
601
|
-
return headerGroups.map((headerGroup) => {
|
|
602
|
-
return headerGroup.headers;
|
|
603
|
-
}).flat();
|
|
604
|
-
}, getMemoOptions(table.options, debug, "getFlatHeaders"));
|
|
605
|
-
table.getLeftFlatHeaders = memo(() => [table.getLeftHeaderGroups()], (left) => {
|
|
606
|
-
return left.map((headerGroup) => {
|
|
607
|
-
return headerGroup.headers;
|
|
608
|
-
}).flat();
|
|
609
|
-
}, getMemoOptions(table.options, debug, "getLeftFlatHeaders"));
|
|
610
|
-
table.getCenterFlatHeaders = memo(() => [table.getCenterHeaderGroups()], (left) => {
|
|
611
|
-
return left.map((headerGroup) => {
|
|
612
|
-
return headerGroup.headers;
|
|
613
|
-
}).flat();
|
|
614
|
-
}, getMemoOptions(table.options, debug, "getCenterFlatHeaders"));
|
|
615
|
-
table.getRightFlatHeaders = memo(() => [table.getRightHeaderGroups()], (left) => {
|
|
616
|
-
return left.map((headerGroup) => {
|
|
617
|
-
return headerGroup.headers;
|
|
618
|
-
}).flat();
|
|
619
|
-
}, getMemoOptions(table.options, debug, "getRightFlatHeaders"));
|
|
620
|
-
table.getCenterLeafHeaders = memo(() => [table.getCenterFlatHeaders()], (flatHeaders) => {
|
|
621
|
-
return flatHeaders.filter((header) => {
|
|
622
|
-
var _header$subHeaders;
|
|
623
|
-
return !((_header$subHeaders = header.subHeaders) != null && _header$subHeaders.length);
|
|
624
|
-
});
|
|
625
|
-
}, getMemoOptions(table.options, debug, "getCenterLeafHeaders"));
|
|
626
|
-
table.getLeftLeafHeaders = memo(() => [table.getLeftFlatHeaders()], (flatHeaders) => {
|
|
627
|
-
return flatHeaders.filter((header) => {
|
|
628
|
-
var _header$subHeaders2;
|
|
629
|
-
return !((_header$subHeaders2 = header.subHeaders) != null && _header$subHeaders2.length);
|
|
630
|
-
});
|
|
631
|
-
}, getMemoOptions(table.options, debug, "getLeftLeafHeaders"));
|
|
632
|
-
table.getRightLeafHeaders = memo(() => [table.getRightFlatHeaders()], (flatHeaders) => {
|
|
633
|
-
return flatHeaders.filter((header) => {
|
|
634
|
-
var _header$subHeaders3;
|
|
635
|
-
return !((_header$subHeaders3 = header.subHeaders) != null && _header$subHeaders3.length);
|
|
636
|
-
});
|
|
637
|
-
}, getMemoOptions(table.options, debug, "getRightLeafHeaders"));
|
|
638
|
-
table.getLeafHeaders = memo(() => [
|
|
639
|
-
table.getLeftHeaderGroups(),
|
|
640
|
-
table.getCenterHeaderGroups(),
|
|
641
|
-
table.getRightHeaderGroups()
|
|
642
|
-
], (left, center, right) => {
|
|
643
|
-
var _left$0$headers, _left$, _center$0$headers, _center$, _right$0$headers, _right$;
|
|
644
|
-
return [
|
|
645
|
-
...(_left$0$headers = (_left$ = left[0]) == null ? void 0 : _left$.headers) != null ? _left$0$headers : [],
|
|
646
|
-
...(_center$0$headers = (_center$ = center[0]) == null ? void 0 : _center$.headers) != null ? _center$0$headers : [],
|
|
647
|
-
...(_right$0$headers = (_right$ = right[0]) == null ? void 0 : _right$.headers) != null ? _right$0$headers : []
|
|
648
|
-
].map((header) => {
|
|
649
|
-
return header.getLeafHeaders();
|
|
650
|
-
}).flat();
|
|
651
|
-
}, getMemoOptions(table.options, debug, "getLeafHeaders"));
|
|
652
|
-
} };
|
|
653
|
-
createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {
|
|
654
|
-
let row = {
|
|
655
|
-
id,
|
|
656
|
-
index: rowIndex,
|
|
657
|
-
original,
|
|
658
|
-
depth,
|
|
659
|
-
parentId,
|
|
660
|
-
_valuesCache: {},
|
|
661
|
-
_uniqueValuesCache: {},
|
|
662
|
-
getValue: (columnId) => {
|
|
663
|
-
if (row._valuesCache.hasOwnProperty(columnId)) return row._valuesCache[columnId];
|
|
664
|
-
const column = table.getColumn(columnId);
|
|
665
|
-
if (!(column != null && column.accessorFn)) return;
|
|
666
|
-
row._valuesCache[columnId] = column.accessorFn(row.original, rowIndex);
|
|
667
|
-
return row._valuesCache[columnId];
|
|
668
|
-
},
|
|
669
|
-
getUniqueValues: (columnId) => {
|
|
670
|
-
if (row._uniqueValuesCache.hasOwnProperty(columnId)) return row._uniqueValuesCache[columnId];
|
|
671
|
-
const column = table.getColumn(columnId);
|
|
672
|
-
if (!(column != null && column.accessorFn)) return;
|
|
673
|
-
if (!column.columnDef.getUniqueValues) {
|
|
674
|
-
row._uniqueValuesCache[columnId] = [row.getValue(columnId)];
|
|
675
|
-
return row._uniqueValuesCache[columnId];
|
|
676
|
-
}
|
|
677
|
-
row._uniqueValuesCache[columnId] = column.columnDef.getUniqueValues(row.original, rowIndex);
|
|
678
|
-
return row._uniqueValuesCache[columnId];
|
|
679
|
-
},
|
|
680
|
-
renderValue: (columnId) => {
|
|
681
|
-
var _row$getValue;
|
|
682
|
-
return (_row$getValue = row.getValue(columnId)) != null ? _row$getValue : table.options.renderFallbackValue;
|
|
683
|
-
},
|
|
684
|
-
subRows: subRows != null ? subRows : [],
|
|
685
|
-
getLeafRows: () => flattenBy(row.subRows, (d) => d.subRows),
|
|
686
|
-
getParentRow: () => row.parentId ? table.getRow(row.parentId, true) : void 0,
|
|
687
|
-
getParentRows: () => {
|
|
688
|
-
let parentRows = [];
|
|
689
|
-
let currentRow = row;
|
|
690
|
-
while (true) {
|
|
691
|
-
const parentRow = currentRow.getParentRow();
|
|
692
|
-
if (!parentRow) break;
|
|
693
|
-
parentRows.push(parentRow);
|
|
694
|
-
currentRow = parentRow;
|
|
695
|
-
}
|
|
696
|
-
return parentRows.reverse();
|
|
697
|
-
},
|
|
698
|
-
getAllCells: memo(() => [table.getAllLeafColumns()], (leafColumns) => {
|
|
699
|
-
return leafColumns.map((column) => {
|
|
700
|
-
return createCell(table, row, column, column.id);
|
|
701
|
-
});
|
|
702
|
-
}, getMemoOptions(table.options, "debugRows", "getAllCells")),
|
|
703
|
-
_getAllCellsByColumnId: memo(() => [row.getAllCells()], (allCells) => {
|
|
704
|
-
return allCells.reduce((acc, cell) => {
|
|
705
|
-
acc[cell.column.id] = cell;
|
|
706
|
-
return acc;
|
|
707
|
-
}, {});
|
|
708
|
-
}, getMemoOptions(table.options, "debugRows", "getAllCellsByColumnId"))
|
|
709
|
-
};
|
|
710
|
-
for (let i = 0; i < table._features.length; i++) {
|
|
711
|
-
const feature = table._features[i];
|
|
712
|
-
feature == null || feature.createRow == null || feature.createRow(row, table);
|
|
713
|
-
}
|
|
714
|
-
return row;
|
|
715
|
-
};
|
|
716
|
-
ColumnFaceting = { createColumn: (column, table) => {
|
|
717
|
-
column._getFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, column.id);
|
|
718
|
-
column.getFacetedRowModel = () => {
|
|
719
|
-
if (!column._getFacetedRowModel) return table.getPreFilteredRowModel();
|
|
720
|
-
return column._getFacetedRowModel();
|
|
721
|
-
};
|
|
722
|
-
column._getFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, column.id);
|
|
723
|
-
column.getFacetedUniqueValues = () => {
|
|
724
|
-
if (!column._getFacetedUniqueValues) return /* @__PURE__ */ new Map();
|
|
725
|
-
return column._getFacetedUniqueValues();
|
|
726
|
-
};
|
|
727
|
-
column._getFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, column.id);
|
|
728
|
-
column.getFacetedMinMaxValues = () => {
|
|
729
|
-
if (!column._getFacetedMinMaxValues) return;
|
|
730
|
-
return column._getFacetedMinMaxValues();
|
|
731
|
-
};
|
|
732
|
-
} };
|
|
733
|
-
includesString = (row, columnId, filterValue) => {
|
|
734
|
-
var _filterValue$toString, _row$getValue;
|
|
735
|
-
const search = filterValue == null || (_filterValue$toString = filterValue.toString()) == null ? void 0 : _filterValue$toString.toLowerCase();
|
|
736
|
-
return Boolean((_row$getValue = row.getValue(columnId)) == null || (_row$getValue = _row$getValue.toString()) == null || (_row$getValue = _row$getValue.toLowerCase()) == null ? void 0 : _row$getValue.includes(search));
|
|
737
|
-
};
|
|
738
|
-
includesString.autoRemove = (val) => testFalsey(val);
|
|
739
|
-
includesStringSensitive = (row, columnId, filterValue) => {
|
|
740
|
-
var _row$getValue2;
|
|
741
|
-
return Boolean((_row$getValue2 = row.getValue(columnId)) == null || (_row$getValue2 = _row$getValue2.toString()) == null ? void 0 : _row$getValue2.includes(filterValue));
|
|
742
|
-
};
|
|
743
|
-
includesStringSensitive.autoRemove = (val) => testFalsey(val);
|
|
744
|
-
equalsString = (row, columnId, filterValue) => {
|
|
745
|
-
var _row$getValue3;
|
|
746
|
-
return ((_row$getValue3 = row.getValue(columnId)) == null || (_row$getValue3 = _row$getValue3.toString()) == null ? void 0 : _row$getValue3.toLowerCase()) === (filterValue == null ? void 0 : filterValue.toLowerCase());
|
|
747
|
-
};
|
|
748
|
-
equalsString.autoRemove = (val) => testFalsey(val);
|
|
749
|
-
arrIncludes = (row, columnId, filterValue) => {
|
|
750
|
-
var _row$getValue4;
|
|
751
|
-
return (_row$getValue4 = row.getValue(columnId)) == null ? void 0 : _row$getValue4.includes(filterValue);
|
|
752
|
-
};
|
|
753
|
-
arrIncludes.autoRemove = (val) => testFalsey(val);
|
|
754
|
-
arrIncludesAll = (row, columnId, filterValue) => {
|
|
755
|
-
return !filterValue.some((val) => {
|
|
756
|
-
var _row$getValue5;
|
|
757
|
-
return !((_row$getValue5 = row.getValue(columnId)) != null && _row$getValue5.includes(val));
|
|
758
|
-
});
|
|
759
|
-
};
|
|
760
|
-
arrIncludesAll.autoRemove = (val) => testFalsey(val) || !(val != null && val.length);
|
|
761
|
-
arrIncludesSome = (row, columnId, filterValue) => {
|
|
762
|
-
return filterValue.some((val) => {
|
|
763
|
-
var _row$getValue6;
|
|
764
|
-
return (_row$getValue6 = row.getValue(columnId)) == null ? void 0 : _row$getValue6.includes(val);
|
|
765
|
-
});
|
|
766
|
-
};
|
|
767
|
-
arrIncludesSome.autoRemove = (val) => testFalsey(val) || !(val != null && val.length);
|
|
768
|
-
equals = (row, columnId, filterValue) => {
|
|
769
|
-
return row.getValue(columnId) === filterValue;
|
|
770
|
-
};
|
|
771
|
-
equals.autoRemove = (val) => testFalsey(val);
|
|
772
|
-
weakEquals = (row, columnId, filterValue) => {
|
|
773
|
-
return row.getValue(columnId) == filterValue;
|
|
774
|
-
};
|
|
775
|
-
weakEquals.autoRemove = (val) => testFalsey(val);
|
|
776
|
-
inNumberRange = (row, columnId, filterValue) => {
|
|
777
|
-
let [min, max] = filterValue;
|
|
778
|
-
const rowValue = row.getValue(columnId);
|
|
779
|
-
return rowValue >= min && rowValue <= max;
|
|
780
|
-
};
|
|
781
|
-
inNumberRange.resolveFilterValue = (val) => {
|
|
782
|
-
let [unsafeMin, unsafeMax] = val;
|
|
783
|
-
let parsedMin = typeof unsafeMin !== "number" ? parseFloat(unsafeMin) : unsafeMin;
|
|
784
|
-
let parsedMax = typeof unsafeMax !== "number" ? parseFloat(unsafeMax) : unsafeMax;
|
|
785
|
-
let min = unsafeMin === null || Number.isNaN(parsedMin) ? -Infinity : parsedMin;
|
|
786
|
-
let max = unsafeMax === null || Number.isNaN(parsedMax) ? Infinity : parsedMax;
|
|
787
|
-
if (min > max) {
|
|
788
|
-
const temp = min;
|
|
789
|
-
min = max;
|
|
790
|
-
max = temp;
|
|
791
|
-
}
|
|
792
|
-
return [min, max];
|
|
793
|
-
};
|
|
794
|
-
inNumberRange.autoRemove = (val) => testFalsey(val) || testFalsey(val[0]) && testFalsey(val[1]);
|
|
795
|
-
filterFns = {
|
|
796
|
-
includesString,
|
|
797
|
-
includesStringSensitive,
|
|
798
|
-
equalsString,
|
|
799
|
-
arrIncludes,
|
|
800
|
-
arrIncludesAll,
|
|
801
|
-
arrIncludesSome,
|
|
802
|
-
equals,
|
|
803
|
-
weakEquals,
|
|
804
|
-
inNumberRange
|
|
805
|
-
};
|
|
806
|
-
ColumnFiltering = {
|
|
807
|
-
getDefaultColumnDef: () => {
|
|
808
|
-
return { filterFn: "auto" };
|
|
809
|
-
},
|
|
810
|
-
getInitialState: (state) => {
|
|
811
|
-
return _objectSpread2({ columnFilters: [] }, state);
|
|
812
|
-
},
|
|
813
|
-
getDefaultOptions: (table) => {
|
|
814
|
-
return {
|
|
815
|
-
onColumnFiltersChange: makeStateUpdater("columnFilters", table),
|
|
816
|
-
filterFromLeafRows: false,
|
|
817
|
-
maxLeafRowFilterDepth: 100
|
|
818
|
-
};
|
|
819
|
-
},
|
|
820
|
-
createColumn: (column, table) => {
|
|
821
|
-
column.getAutoFilterFn = () => {
|
|
822
|
-
const firstRow = table.getCoreRowModel().flatRows[0];
|
|
823
|
-
const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
|
|
824
|
-
if (typeof value === "string") return filterFns.includesString;
|
|
825
|
-
if (typeof value === "number") return filterFns.inNumberRange;
|
|
826
|
-
if (typeof value === "boolean") return filterFns.equals;
|
|
827
|
-
if (value !== null && typeof value === "object") return filterFns.equals;
|
|
828
|
-
if (Array.isArray(value)) return filterFns.arrIncludes;
|
|
829
|
-
return filterFns.weakEquals;
|
|
830
|
-
};
|
|
831
|
-
column.getFilterFn = () => {
|
|
832
|
-
var _table$options$filter, _table$options$filter2;
|
|
833
|
-
return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === "auto" ? column.getAutoFilterFn() : (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[column.columnDef.filterFn]) != null ? _table$options$filter : filterFns[column.columnDef.filterFn];
|
|
834
|
-
};
|
|
835
|
-
column.getCanFilter = () => {
|
|
836
|
-
var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
|
|
837
|
-
return ((_column$columnDef$ena = column.columnDef.enableColumnFilter) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnFilters) != null ? _table$options$enable : true) && ((_table$options$enable2 = table.options.enableFilters) != null ? _table$options$enable2 : true) && !!column.accessorFn;
|
|
838
|
-
};
|
|
839
|
-
column.getIsFiltered = () => column.getFilterIndex() > -1;
|
|
840
|
-
column.getFilterValue = () => {
|
|
841
|
-
var _table$getState$colum;
|
|
842
|
-
return (_table$getState$colum = table.getState().columnFilters) == null || (_table$getState$colum = _table$getState$colum.find((d) => d.id === column.id)) == null ? void 0 : _table$getState$colum.value;
|
|
843
|
-
};
|
|
844
|
-
column.getFilterIndex = () => {
|
|
845
|
-
var _table$getState$colum2, _table$getState$colum3;
|
|
846
|
-
return (_table$getState$colum2 = (_table$getState$colum3 = table.getState().columnFilters) == null ? void 0 : _table$getState$colum3.findIndex((d) => d.id === column.id)) != null ? _table$getState$colum2 : -1;
|
|
847
|
-
};
|
|
848
|
-
column.setFilterValue = (value) => {
|
|
849
|
-
table.setColumnFilters((old) => {
|
|
850
|
-
const filterFn = column.getFilterFn();
|
|
851
|
-
const previousFilter = old == null ? void 0 : old.find((d) => d.id === column.id);
|
|
852
|
-
const newFilter = functionalUpdate(value, previousFilter ? previousFilter.value : void 0);
|
|
853
|
-
if (shouldAutoRemoveFilter(filterFn, newFilter, column)) {
|
|
854
|
-
var _old$filter;
|
|
855
|
-
return (_old$filter = old == null ? void 0 : old.filter((d) => d.id !== column.id)) != null ? _old$filter : [];
|
|
856
|
-
}
|
|
857
|
-
const newFilterObj = {
|
|
858
|
-
id: column.id,
|
|
859
|
-
value: newFilter
|
|
860
|
-
};
|
|
861
|
-
if (previousFilter) {
|
|
862
|
-
var _old$map;
|
|
863
|
-
return (_old$map = old == null ? void 0 : old.map((d) => {
|
|
864
|
-
if (d.id === column.id) return newFilterObj;
|
|
865
|
-
return d;
|
|
866
|
-
})) != null ? _old$map : [];
|
|
867
|
-
}
|
|
868
|
-
if (old != null && old.length) return [...old, newFilterObj];
|
|
869
|
-
return [newFilterObj];
|
|
870
|
-
});
|
|
871
|
-
};
|
|
872
|
-
},
|
|
873
|
-
createRow: (row, _table) => {
|
|
874
|
-
row.columnFilters = {};
|
|
875
|
-
row.columnFiltersMeta = {};
|
|
876
|
-
},
|
|
877
|
-
createTable: (table) => {
|
|
878
|
-
table.setColumnFilters = (updater) => {
|
|
879
|
-
const leafColumns = table.getAllLeafColumns();
|
|
880
|
-
const updateFn = (old) => {
|
|
881
|
-
var _functionalUpdate;
|
|
882
|
-
return (_functionalUpdate = functionalUpdate(updater, old)) == null ? void 0 : _functionalUpdate.filter((filter) => {
|
|
883
|
-
const column = leafColumns.find((d) => d.id === filter.id);
|
|
884
|
-
if (column) {
|
|
885
|
-
if (shouldAutoRemoveFilter(column.getFilterFn(), filter.value, column)) return false;
|
|
886
|
-
}
|
|
887
|
-
return true;
|
|
888
|
-
});
|
|
889
|
-
};
|
|
890
|
-
table.options.onColumnFiltersChange == null || table.options.onColumnFiltersChange(updateFn);
|
|
891
|
-
};
|
|
892
|
-
table.resetColumnFilters = (defaultState) => {
|
|
893
|
-
var _table$initialState$c, _table$initialState;
|
|
894
|
-
table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
|
|
895
|
-
};
|
|
896
|
-
table.getPreFilteredRowModel = () => table.getCoreRowModel();
|
|
897
|
-
table.getFilteredRowModel = () => {
|
|
898
|
-
if (!table._getFilteredRowModel && table.options.getFilteredRowModel) table._getFilteredRowModel = table.options.getFilteredRowModel(table);
|
|
899
|
-
if (table.options.manualFiltering || !table._getFilteredRowModel) return table.getPreFilteredRowModel();
|
|
900
|
-
return table._getFilteredRowModel();
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
};
|
|
904
|
-
sum = (columnId, _leafRows, childRows) => {
|
|
905
|
-
return childRows.reduce((sum, next) => {
|
|
906
|
-
const nextValue = next.getValue(columnId);
|
|
907
|
-
return sum + (typeof nextValue === "number" ? nextValue : 0);
|
|
908
|
-
}, 0);
|
|
909
|
-
};
|
|
910
|
-
min = (columnId, _leafRows, childRows) => {
|
|
911
|
-
let min;
|
|
912
|
-
childRows.forEach((row) => {
|
|
913
|
-
const value = row.getValue(columnId);
|
|
914
|
-
if (value != null && (min > value || min === void 0 && value >= value)) min = value;
|
|
915
|
-
});
|
|
916
|
-
return min;
|
|
917
|
-
};
|
|
918
|
-
max = (columnId, _leafRows, childRows) => {
|
|
919
|
-
let max;
|
|
920
|
-
childRows.forEach((row) => {
|
|
921
|
-
const value = row.getValue(columnId);
|
|
922
|
-
if (value != null && (max < value || max === void 0 && value >= value)) max = value;
|
|
923
|
-
});
|
|
924
|
-
return max;
|
|
925
|
-
};
|
|
926
|
-
extent = (columnId, _leafRows, childRows) => {
|
|
927
|
-
let min;
|
|
928
|
-
let max;
|
|
929
|
-
childRows.forEach((row) => {
|
|
930
|
-
const value = row.getValue(columnId);
|
|
931
|
-
if (value != null) if (min === void 0) {
|
|
932
|
-
if (value >= value) min = max = value;
|
|
933
|
-
} else {
|
|
934
|
-
if (min > value) min = value;
|
|
935
|
-
if (max < value) max = value;
|
|
936
|
-
}
|
|
937
|
-
});
|
|
938
|
-
return [min, max];
|
|
939
|
-
};
|
|
940
|
-
mean = (columnId, leafRows) => {
|
|
941
|
-
let count = 0;
|
|
942
|
-
let sum = 0;
|
|
943
|
-
leafRows.forEach((row) => {
|
|
944
|
-
let value = row.getValue(columnId);
|
|
945
|
-
if (value != null && (value = +value) >= value) ++count, sum += value;
|
|
946
|
-
});
|
|
947
|
-
if (count) return sum / count;
|
|
948
|
-
};
|
|
949
|
-
median = (columnId, leafRows) => {
|
|
950
|
-
if (!leafRows.length) return;
|
|
951
|
-
const values = leafRows.map((row) => row.getValue(columnId));
|
|
952
|
-
if (!isNumberArray(values)) return;
|
|
953
|
-
if (values.length === 1) return values[0];
|
|
954
|
-
const mid = Math.floor(values.length / 2);
|
|
955
|
-
const nums = values.sort((a, b) => a - b);
|
|
956
|
-
return values.length % 2 !== 0 ? nums[mid] : (nums[mid - 1] + nums[mid]) / 2;
|
|
957
|
-
};
|
|
958
|
-
unique = (columnId, leafRows) => {
|
|
959
|
-
return Array.from(new Set(leafRows.map((d) => d.getValue(columnId))).values());
|
|
960
|
-
};
|
|
961
|
-
uniqueCount = (columnId, leafRows) => {
|
|
962
|
-
return new Set(leafRows.map((d) => d.getValue(columnId))).size;
|
|
963
|
-
};
|
|
964
|
-
count = (_columnId, leafRows) => {
|
|
965
|
-
return leafRows.length;
|
|
966
|
-
};
|
|
967
|
-
aggregationFns = {
|
|
968
|
-
sum,
|
|
969
|
-
min,
|
|
970
|
-
max,
|
|
971
|
-
extent,
|
|
972
|
-
mean,
|
|
973
|
-
median,
|
|
974
|
-
unique,
|
|
975
|
-
uniqueCount,
|
|
976
|
-
count
|
|
977
|
-
};
|
|
978
|
-
ColumnGrouping = {
|
|
979
|
-
getDefaultColumnDef: () => {
|
|
980
|
-
return {
|
|
981
|
-
aggregatedCell: (props) => {
|
|
982
|
-
var _toString, _props$getValue;
|
|
983
|
-
return (_toString = (_props$getValue = props.getValue()) == null || _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _toString : null;
|
|
984
|
-
},
|
|
985
|
-
aggregationFn: "auto"
|
|
986
|
-
};
|
|
987
|
-
},
|
|
988
|
-
getInitialState: (state) => {
|
|
989
|
-
return _objectSpread2({ grouping: [] }, state);
|
|
990
|
-
},
|
|
991
|
-
getDefaultOptions: (table) => {
|
|
992
|
-
return {
|
|
993
|
-
onGroupingChange: makeStateUpdater("grouping", table),
|
|
994
|
-
groupedColumnMode: "reorder"
|
|
995
|
-
};
|
|
996
|
-
},
|
|
997
|
-
createColumn: (column, table) => {
|
|
998
|
-
column.toggleGrouping = () => {
|
|
999
|
-
table.setGrouping((old) => {
|
|
1000
|
-
if (old != null && old.includes(column.id)) return old.filter((d) => d !== column.id);
|
|
1001
|
-
return [...old != null ? old : [], column.id];
|
|
1002
|
-
});
|
|
1003
|
-
};
|
|
1004
|
-
column.getCanGroup = () => {
|
|
1005
|
-
var _column$columnDef$ena, _table$options$enable;
|
|
1006
|
-
return ((_column$columnDef$ena = column.columnDef.enableGrouping) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableGrouping) != null ? _table$options$enable : true) && (!!column.accessorFn || !!column.columnDef.getGroupingValue);
|
|
1007
|
-
};
|
|
1008
|
-
column.getIsGrouped = () => {
|
|
1009
|
-
var _table$getState$group;
|
|
1010
|
-
return (_table$getState$group = table.getState().grouping) == null ? void 0 : _table$getState$group.includes(column.id);
|
|
1011
|
-
};
|
|
1012
|
-
column.getGroupedIndex = () => {
|
|
1013
|
-
var _table$getState$group2;
|
|
1014
|
-
return (_table$getState$group2 = table.getState().grouping) == null ? void 0 : _table$getState$group2.indexOf(column.id);
|
|
1015
|
-
};
|
|
1016
|
-
column.getToggleGroupingHandler = () => {
|
|
1017
|
-
const canGroup = column.getCanGroup();
|
|
1018
|
-
return () => {
|
|
1019
|
-
if (!canGroup) return;
|
|
1020
|
-
column.toggleGrouping();
|
|
1021
|
-
};
|
|
1022
|
-
};
|
|
1023
|
-
column.getAutoAggregationFn = () => {
|
|
1024
|
-
const firstRow = table.getCoreRowModel().flatRows[0];
|
|
1025
|
-
const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
|
|
1026
|
-
if (typeof value === "number") return aggregationFns.sum;
|
|
1027
|
-
if (Object.prototype.toString.call(value) === "[object Date]") return aggregationFns.extent;
|
|
1028
|
-
};
|
|
1029
|
-
column.getAggregationFn = () => {
|
|
1030
|
-
var _table$options$aggreg, _table$options$aggreg2;
|
|
1031
|
-
if (!column) throw new Error();
|
|
1032
|
-
return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === "auto" ? column.getAutoAggregationFn() : (_table$options$aggreg = (_table$options$aggreg2 = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg2[column.columnDef.aggregationFn]) != null ? _table$options$aggreg : aggregationFns[column.columnDef.aggregationFn];
|
|
1033
|
-
};
|
|
1034
|
-
},
|
|
1035
|
-
createTable: (table) => {
|
|
1036
|
-
table.setGrouping = (updater) => table.options.onGroupingChange == null ? void 0 : table.options.onGroupingChange(updater);
|
|
1037
|
-
table.resetGrouping = (defaultState) => {
|
|
1038
|
-
var _table$initialState$g, _table$initialState;
|
|
1039
|
-
table.setGrouping(defaultState ? [] : (_table$initialState$g = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.grouping) != null ? _table$initialState$g : []);
|
|
1040
|
-
};
|
|
1041
|
-
table.getPreGroupedRowModel = () => table.getFilteredRowModel();
|
|
1042
|
-
table.getGroupedRowModel = () => {
|
|
1043
|
-
if (!table._getGroupedRowModel && table.options.getGroupedRowModel) table._getGroupedRowModel = table.options.getGroupedRowModel(table);
|
|
1044
|
-
if (table.options.manualGrouping || !table._getGroupedRowModel) return table.getPreGroupedRowModel();
|
|
1045
|
-
return table._getGroupedRowModel();
|
|
1046
|
-
};
|
|
1047
|
-
},
|
|
1048
|
-
createRow: (row, table) => {
|
|
1049
|
-
row.getIsGrouped = () => !!row.groupingColumnId;
|
|
1050
|
-
row.getGroupingValue = (columnId) => {
|
|
1051
|
-
if (row._groupingValuesCache.hasOwnProperty(columnId)) return row._groupingValuesCache[columnId];
|
|
1052
|
-
const column = table.getColumn(columnId);
|
|
1053
|
-
if (!(column != null && column.columnDef.getGroupingValue)) return row.getValue(columnId);
|
|
1054
|
-
row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue(row.original);
|
|
1055
|
-
return row._groupingValuesCache[columnId];
|
|
1056
|
-
};
|
|
1057
|
-
row._groupingValuesCache = {};
|
|
1058
|
-
},
|
|
1059
|
-
createCell: (cell, column, row, table) => {
|
|
1060
|
-
cell.getIsGrouped = () => column.getIsGrouped() && column.id === row.groupingColumnId;
|
|
1061
|
-
cell.getIsPlaceholder = () => !cell.getIsGrouped() && column.getIsGrouped();
|
|
1062
|
-
cell.getIsAggregated = () => {
|
|
1063
|
-
var _row$subRows;
|
|
1064
|
-
return !cell.getIsGrouped() && !cell.getIsPlaceholder() && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
|
|
1065
|
-
};
|
|
1066
|
-
}
|
|
1067
|
-
};
|
|
1068
|
-
ColumnOrdering = {
|
|
1069
|
-
getInitialState: (state) => {
|
|
1070
|
-
return _objectSpread2({ columnOrder: [] }, state);
|
|
1071
|
-
},
|
|
1072
|
-
getDefaultOptions: (table) => {
|
|
1073
|
-
return { onColumnOrderChange: makeStateUpdater("columnOrder", table) };
|
|
1074
|
-
},
|
|
1075
|
-
createColumn: (column, table) => {
|
|
1076
|
-
column.getIndex = memo((position) => [_getVisibleLeafColumns(table, position)], (columns) => columns.findIndex((d) => d.id === column.id), getMemoOptions(table.options, "debugColumns", "getIndex"));
|
|
1077
|
-
column.getIsFirstColumn = (position) => {
|
|
1078
|
-
var _columns$;
|
|
1079
|
-
return ((_columns$ = _getVisibleLeafColumns(table, position)[0]) == null ? void 0 : _columns$.id) === column.id;
|
|
1080
|
-
};
|
|
1081
|
-
column.getIsLastColumn = (position) => {
|
|
1082
|
-
var _columns;
|
|
1083
|
-
const columns = _getVisibleLeafColumns(table, position);
|
|
1084
|
-
return ((_columns = columns[columns.length - 1]) == null ? void 0 : _columns.id) === column.id;
|
|
1085
|
-
};
|
|
1086
|
-
},
|
|
1087
|
-
createTable: (table) => {
|
|
1088
|
-
table.setColumnOrder = (updater) => table.options.onColumnOrderChange == null ? void 0 : table.options.onColumnOrderChange(updater);
|
|
1089
|
-
table.resetColumnOrder = (defaultState) => {
|
|
1090
|
-
var _table$initialState$c;
|
|
1091
|
-
table.setColumnOrder(defaultState ? [] : (_table$initialState$c = table.initialState.columnOrder) != null ? _table$initialState$c : []);
|
|
1092
|
-
};
|
|
1093
|
-
table._getOrderColumnsFn = memo(() => [
|
|
1094
|
-
table.getState().columnOrder,
|
|
1095
|
-
table.getState().grouping,
|
|
1096
|
-
table.options.groupedColumnMode
|
|
1097
|
-
], (columnOrder, grouping, groupedColumnMode) => (columns) => {
|
|
1098
|
-
let orderedColumns = [];
|
|
1099
|
-
if (!(columnOrder != null && columnOrder.length)) orderedColumns = columns;
|
|
1100
|
-
else {
|
|
1101
|
-
const columnOrderCopy = [...columnOrder];
|
|
1102
|
-
const columnsCopy = [...columns];
|
|
1103
|
-
while (columnsCopy.length && columnOrderCopy.length) {
|
|
1104
|
-
const targetColumnId = columnOrderCopy.shift();
|
|
1105
|
-
const foundIndex = columnsCopy.findIndex((d) => d.id === targetColumnId);
|
|
1106
|
-
if (foundIndex > -1) orderedColumns.push(columnsCopy.splice(foundIndex, 1)[0]);
|
|
1107
|
-
}
|
|
1108
|
-
orderedColumns = [...orderedColumns, ...columnsCopy];
|
|
1109
|
-
}
|
|
1110
|
-
return orderColumns(orderedColumns, grouping, groupedColumnMode);
|
|
1111
|
-
}, getMemoOptions(table.options, "debugTable", "_getOrderColumnsFn"));
|
|
1112
|
-
}
|
|
1113
|
-
};
|
|
1114
|
-
getDefaultColumnPinningState = () => ({
|
|
1115
|
-
left: [],
|
|
1116
|
-
right: []
|
|
1117
|
-
});
|
|
1118
|
-
ColumnPinning = {
|
|
1119
|
-
getInitialState: (state) => {
|
|
1120
|
-
return _objectSpread2({ columnPinning: getDefaultColumnPinningState() }, state);
|
|
1121
|
-
},
|
|
1122
|
-
getDefaultOptions: (table) => {
|
|
1123
|
-
return { onColumnPinningChange: makeStateUpdater("columnPinning", table) };
|
|
1124
|
-
},
|
|
1125
|
-
createColumn: (column, table) => {
|
|
1126
|
-
column.pin = (position) => {
|
|
1127
|
-
const columnIds = column.getLeafColumns().map((d) => d.id).filter(Boolean);
|
|
1128
|
-
table.setColumnPinning((old) => {
|
|
1129
|
-
var _old$left3, _old$right3;
|
|
1130
|
-
if (position === "right") {
|
|
1131
|
-
var _old$left, _old$right;
|
|
1132
|
-
return {
|
|
1133
|
-
left: ((_old$left = old == null ? void 0 : old.left) != null ? _old$left : []).filter((d) => !(columnIds != null && columnIds.includes(d))),
|
|
1134
|
-
right: [...((_old$right = old == null ? void 0 : old.right) != null ? _old$right : []).filter((d) => !(columnIds != null && columnIds.includes(d))), ...columnIds]
|
|
1135
|
-
};
|
|
1136
|
-
}
|
|
1137
|
-
if (position === "left") {
|
|
1138
|
-
var _old$left2, _old$right2;
|
|
1139
|
-
return {
|
|
1140
|
-
left: [...((_old$left2 = old == null ? void 0 : old.left) != null ? _old$left2 : []).filter((d) => !(columnIds != null && columnIds.includes(d))), ...columnIds],
|
|
1141
|
-
right: ((_old$right2 = old == null ? void 0 : old.right) != null ? _old$right2 : []).filter((d) => !(columnIds != null && columnIds.includes(d)))
|
|
1142
|
-
};
|
|
1143
|
-
}
|
|
1144
|
-
return {
|
|
1145
|
-
left: ((_old$left3 = old == null ? void 0 : old.left) != null ? _old$left3 : []).filter((d) => !(columnIds != null && columnIds.includes(d))),
|
|
1146
|
-
right: ((_old$right3 = old == null ? void 0 : old.right) != null ? _old$right3 : []).filter((d) => !(columnIds != null && columnIds.includes(d)))
|
|
1147
|
-
};
|
|
1148
|
-
});
|
|
1149
|
-
};
|
|
1150
|
-
column.getCanPin = () => {
|
|
1151
|
-
return column.getLeafColumns().some((d) => {
|
|
1152
|
-
var _d$columnDef$enablePi, _ref, _table$options$enable;
|
|
1153
|
-
return ((_d$columnDef$enablePi = d.columnDef.enablePinning) != null ? _d$columnDef$enablePi : true) && ((_ref = (_table$options$enable = table.options.enableColumnPinning) != null ? _table$options$enable : table.options.enablePinning) != null ? _ref : true);
|
|
1154
|
-
});
|
|
1155
|
-
};
|
|
1156
|
-
column.getIsPinned = () => {
|
|
1157
|
-
const leafColumnIds = column.getLeafColumns().map((d) => d.id);
|
|
1158
|
-
const { left, right } = table.getState().columnPinning;
|
|
1159
|
-
const isLeft = leafColumnIds.some((d) => left == null ? void 0 : left.includes(d));
|
|
1160
|
-
const isRight = leafColumnIds.some((d) => right == null ? void 0 : right.includes(d));
|
|
1161
|
-
return isLeft ? "left" : isRight ? "right" : false;
|
|
1162
|
-
};
|
|
1163
|
-
column.getPinnedIndex = () => {
|
|
1164
|
-
var _table$getState$colum, _table$getState$colum2;
|
|
1165
|
-
const position = column.getIsPinned();
|
|
1166
|
-
return position ? (_table$getState$colum = (_table$getState$colum2 = table.getState().columnPinning) == null || (_table$getState$colum2 = _table$getState$colum2[position]) == null ? void 0 : _table$getState$colum2.indexOf(column.id)) != null ? _table$getState$colum : -1 : 0;
|
|
1167
|
-
};
|
|
1168
|
-
},
|
|
1169
|
-
createRow: (row, table) => {
|
|
1170
|
-
row.getCenterVisibleCells = memo(() => [
|
|
1171
|
-
row._getAllVisibleCells(),
|
|
1172
|
-
table.getState().columnPinning.left,
|
|
1173
|
-
table.getState().columnPinning.right
|
|
1174
|
-
], (allCells, left, right) => {
|
|
1175
|
-
const leftAndRight = [...left != null ? left : [], ...right != null ? right : []];
|
|
1176
|
-
return allCells.filter((d) => !leftAndRight.includes(d.column.id));
|
|
1177
|
-
}, getMemoOptions(table.options, "debugRows", "getCenterVisibleCells"));
|
|
1178
|
-
row.getLeftVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left], (allCells, left) => {
|
|
1179
|
-
return (left != null ? left : []).map((columnId) => allCells.find((cell) => cell.column.id === columnId)).filter(Boolean).map((d) => _objectSpread2(_objectSpread2({}, d), {}, { position: "left" }));
|
|
1180
|
-
}, getMemoOptions(table.options, "debugRows", "getLeftVisibleCells"));
|
|
1181
|
-
row.getRightVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.right], (allCells, right) => {
|
|
1182
|
-
return (right != null ? right : []).map((columnId) => allCells.find((cell) => cell.column.id === columnId)).filter(Boolean).map((d) => _objectSpread2(_objectSpread2({}, d), {}, { position: "right" }));
|
|
1183
|
-
}, getMemoOptions(table.options, "debugRows", "getRightVisibleCells"));
|
|
1184
|
-
},
|
|
1185
|
-
createTable: (table) => {
|
|
1186
|
-
table.setColumnPinning = (updater) => table.options.onColumnPinningChange == null ? void 0 : table.options.onColumnPinningChange(updater);
|
|
1187
|
-
table.resetColumnPinning = (defaultState) => {
|
|
1188
|
-
var _table$initialState$c, _table$initialState;
|
|
1189
|
-
return table.setColumnPinning(defaultState ? getDefaultColumnPinningState() : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnPinning) != null ? _table$initialState$c : getDefaultColumnPinningState());
|
|
1190
|
-
};
|
|
1191
|
-
table.getIsSomeColumnsPinned = (position) => {
|
|
1192
|
-
var _pinningState$positio;
|
|
1193
|
-
const pinningState = table.getState().columnPinning;
|
|
1194
|
-
if (!position) {
|
|
1195
|
-
var _pinningState$left, _pinningState$right;
|
|
1196
|
-
return Boolean(((_pinningState$left = pinningState.left) == null ? void 0 : _pinningState$left.length) || ((_pinningState$right = pinningState.right) == null ? void 0 : _pinningState$right.length));
|
|
1197
|
-
}
|
|
1198
|
-
return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);
|
|
1199
|
-
};
|
|
1200
|
-
table.getLeftLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left], (allColumns, left) => {
|
|
1201
|
-
return (left != null ? left : []).map((columnId) => allColumns.find((column) => column.id === columnId)).filter(Boolean);
|
|
1202
|
-
}, getMemoOptions(table.options, "debugColumns", "getLeftLeafColumns"));
|
|
1203
|
-
table.getRightLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.right], (allColumns, right) => {
|
|
1204
|
-
return (right != null ? right : []).map((columnId) => allColumns.find((column) => column.id === columnId)).filter(Boolean);
|
|
1205
|
-
}, getMemoOptions(table.options, "debugColumns", "getRightLeafColumns"));
|
|
1206
|
-
table.getCenterLeafColumns = memo(() => [
|
|
1207
|
-
table.getAllLeafColumns(),
|
|
1208
|
-
table.getState().columnPinning.left,
|
|
1209
|
-
table.getState().columnPinning.right
|
|
1210
|
-
], (allColumns, left, right) => {
|
|
1211
|
-
const leftAndRight = [...left != null ? left : [], ...right != null ? right : []];
|
|
1212
|
-
return allColumns.filter((d) => !leftAndRight.includes(d.id));
|
|
1213
|
-
}, getMemoOptions(table.options, "debugColumns", "getCenterLeafColumns"));
|
|
1214
|
-
}
|
|
1215
|
-
};
|
|
1216
|
-
defaultColumnSizing = {
|
|
1217
|
-
size: 150,
|
|
1218
|
-
minSize: 20,
|
|
1219
|
-
maxSize: Number.MAX_SAFE_INTEGER
|
|
1220
|
-
};
|
|
1221
|
-
getDefaultColumnSizingInfoState = () => ({
|
|
1222
|
-
startOffset: null,
|
|
1223
|
-
startSize: null,
|
|
1224
|
-
deltaOffset: null,
|
|
1225
|
-
deltaPercentage: null,
|
|
1226
|
-
isResizingColumn: false,
|
|
1227
|
-
columnSizingStart: []
|
|
1228
|
-
});
|
|
1229
|
-
ColumnSizing = {
|
|
1230
|
-
getDefaultColumnDef: () => {
|
|
1231
|
-
return defaultColumnSizing;
|
|
1232
|
-
},
|
|
1233
|
-
getInitialState: (state) => {
|
|
1234
|
-
return _objectSpread2({
|
|
1235
|
-
columnSizing: {},
|
|
1236
|
-
columnSizingInfo: getDefaultColumnSizingInfoState()
|
|
1237
|
-
}, state);
|
|
1238
|
-
},
|
|
1239
|
-
getDefaultOptions: (table) => {
|
|
1240
|
-
return {
|
|
1241
|
-
columnResizeMode: "onEnd",
|
|
1242
|
-
columnResizeDirection: "ltr",
|
|
1243
|
-
onColumnSizingChange: makeStateUpdater("columnSizing", table),
|
|
1244
|
-
onColumnSizingInfoChange: makeStateUpdater("columnSizingInfo", table)
|
|
1245
|
-
};
|
|
1246
|
-
},
|
|
1247
|
-
createColumn: (column, table) => {
|
|
1248
|
-
column.getSize = () => {
|
|
1249
|
-
var _column$columnDef$min, _ref, _column$columnDef$max;
|
|
1250
|
-
const columnSize = table.getState().columnSizing[column.id];
|
|
1251
|
-
return Math.min(Math.max((_column$columnDef$min = column.columnDef.minSize) != null ? _column$columnDef$min : defaultColumnSizing.minSize, (_ref = columnSize != null ? columnSize : column.columnDef.size) != null ? _ref : defaultColumnSizing.size), (_column$columnDef$max = column.columnDef.maxSize) != null ? _column$columnDef$max : defaultColumnSizing.maxSize);
|
|
1252
|
-
};
|
|
1253
|
-
column.getStart = memo((position) => [
|
|
1254
|
-
position,
|
|
1255
|
-
_getVisibleLeafColumns(table, position),
|
|
1256
|
-
table.getState().columnSizing
|
|
1257
|
-
], (position, columns) => columns.slice(0, column.getIndex(position)).reduce((sum, column) => sum + column.getSize(), 0), getMemoOptions(table.options, "debugColumns", "getStart"));
|
|
1258
|
-
column.getAfter = memo((position) => [
|
|
1259
|
-
position,
|
|
1260
|
-
_getVisibleLeafColumns(table, position),
|
|
1261
|
-
table.getState().columnSizing
|
|
1262
|
-
], (position, columns) => columns.slice(column.getIndex(position) + 1).reduce((sum, column) => sum + column.getSize(), 0), getMemoOptions(table.options, "debugColumns", "getAfter"));
|
|
1263
|
-
column.resetSize = () => {
|
|
1264
|
-
table.setColumnSizing((_ref2) => {
|
|
1265
|
-
let _column$id = column.id, { [_column$id]: _ } = _ref2;
|
|
1266
|
-
return _objectWithoutProperties(_ref2, [_column$id].map(toPropertyKey));
|
|
1267
|
-
});
|
|
1268
|
-
};
|
|
1269
|
-
column.getCanResize = () => {
|
|
1270
|
-
var _column$columnDef$ena, _table$options$enable;
|
|
1271
|
-
return ((_column$columnDef$ena = column.columnDef.enableResizing) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnResizing) != null ? _table$options$enable : true);
|
|
1272
|
-
};
|
|
1273
|
-
column.getIsResizing = () => {
|
|
1274
|
-
return table.getState().columnSizingInfo.isResizingColumn === column.id;
|
|
1275
|
-
};
|
|
1276
|
-
},
|
|
1277
|
-
createHeader: (header, table) => {
|
|
1278
|
-
header.getSize = () => {
|
|
1279
|
-
let sum = 0;
|
|
1280
|
-
const recurse = (header) => {
|
|
1281
|
-
if (header.subHeaders.length) header.subHeaders.forEach(recurse);
|
|
1282
|
-
else {
|
|
1283
|
-
var _header$column$getSiz;
|
|
1284
|
-
sum += (_header$column$getSiz = header.column.getSize()) != null ? _header$column$getSiz : 0;
|
|
1285
|
-
}
|
|
1286
|
-
};
|
|
1287
|
-
recurse(header);
|
|
1288
|
-
return sum;
|
|
1289
|
-
};
|
|
1290
|
-
header.getStart = () => {
|
|
1291
|
-
if (header.index > 0) {
|
|
1292
|
-
const prevSiblingHeader = header.headerGroup.headers[header.index - 1];
|
|
1293
|
-
return prevSiblingHeader.getStart() + prevSiblingHeader.getSize();
|
|
1294
|
-
}
|
|
1295
|
-
return 0;
|
|
1296
|
-
};
|
|
1297
|
-
header.getResizeHandler = (_contextDocument) => {
|
|
1298
|
-
const column = table.getColumn(header.column.id);
|
|
1299
|
-
const canResize = column == null ? void 0 : column.getCanResize();
|
|
1300
|
-
return (e) => {
|
|
1301
|
-
if (!column || !canResize) return;
|
|
1302
|
-
e.persist == null || e.persist();
|
|
1303
|
-
if (isTouchStartEvent(e)) {
|
|
1304
|
-
if (e.touches && e.touches.length > 1) return;
|
|
1305
|
-
}
|
|
1306
|
-
const startSize = header.getSize();
|
|
1307
|
-
const columnSizingStart = header ? header.getLeafHeaders().map((d) => [d.column.id, d.column.getSize()]) : [[column.id, column.getSize()]];
|
|
1308
|
-
const clientX = isTouchStartEvent(e) ? Math.round(e.touches[0].clientX) : e.clientX;
|
|
1309
|
-
const newColumnSizing = {};
|
|
1310
|
-
const updateOffset = (eventType, clientXPos) => {
|
|
1311
|
-
if (typeof clientXPos !== "number") return;
|
|
1312
|
-
table.setColumnSizingInfo((old) => {
|
|
1313
|
-
var _old$startOffset, _old$startSize;
|
|
1314
|
-
const deltaDirection = table.options.columnResizeDirection === "rtl" ? -1 : 1;
|
|
1315
|
-
const deltaOffset = (clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0)) * deltaDirection;
|
|
1316
|
-
const deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -.999999);
|
|
1317
|
-
old.columnSizingStart.forEach((_ref3) => {
|
|
1318
|
-
let [columnId, headerSize] = _ref3;
|
|
1319
|
-
newColumnSizing[columnId] = Math.round(Math.max(headerSize + headerSize * deltaPercentage, 0) * 100) / 100;
|
|
1320
|
-
});
|
|
1321
|
-
return _objectSpread2(_objectSpread2({}, old), {}, {
|
|
1322
|
-
deltaOffset,
|
|
1323
|
-
deltaPercentage
|
|
1324
|
-
});
|
|
1325
|
-
});
|
|
1326
|
-
if (table.options.columnResizeMode === "onChange" || eventType === "end") table.setColumnSizing((old) => _objectSpread2(_objectSpread2({}, old), newColumnSizing));
|
|
1327
|
-
};
|
|
1328
|
-
const onMove = (clientXPos) => updateOffset("move", clientXPos);
|
|
1329
|
-
const onEnd = (clientXPos) => {
|
|
1330
|
-
updateOffset("end", clientXPos);
|
|
1331
|
-
table.setColumnSizingInfo((old) => _objectSpread2(_objectSpread2({}, old), {}, {
|
|
1332
|
-
isResizingColumn: false,
|
|
1333
|
-
startOffset: null,
|
|
1334
|
-
startSize: null,
|
|
1335
|
-
deltaOffset: null,
|
|
1336
|
-
deltaPercentage: null,
|
|
1337
|
-
columnSizingStart: []
|
|
1338
|
-
}));
|
|
1339
|
-
};
|
|
1340
|
-
const contextDocument = safelyAccessDocument(_contextDocument);
|
|
1341
|
-
const mouseEvents = {
|
|
1342
|
-
moveHandler: (e) => onMove(e.clientX),
|
|
1343
|
-
upHandler: (e) => {
|
|
1344
|
-
contextDocument == null || contextDocument.removeEventListener("mousemove", mouseEvents.moveHandler);
|
|
1345
|
-
contextDocument == null || contextDocument.removeEventListener("mouseup", mouseEvents.upHandler);
|
|
1346
|
-
onEnd(e.clientX);
|
|
1347
|
-
}
|
|
1348
|
-
};
|
|
1349
|
-
const touchEvents = {
|
|
1350
|
-
moveHandler: (e) => {
|
|
1351
|
-
if (e.cancelable) {
|
|
1352
|
-
e.preventDefault();
|
|
1353
|
-
e.stopPropagation();
|
|
1354
|
-
}
|
|
1355
|
-
onMove(e.touches[0].clientX);
|
|
1356
|
-
return false;
|
|
1357
|
-
},
|
|
1358
|
-
upHandler: (e) => {
|
|
1359
|
-
var _e$touches$;
|
|
1360
|
-
contextDocument == null || contextDocument.removeEventListener("touchmove", touchEvents.moveHandler);
|
|
1361
|
-
contextDocument == null || contextDocument.removeEventListener("touchend", touchEvents.upHandler);
|
|
1362
|
-
if (e.cancelable) {
|
|
1363
|
-
e.preventDefault();
|
|
1364
|
-
e.stopPropagation();
|
|
1365
|
-
}
|
|
1366
|
-
onEnd((_e$touches$ = e.touches[0]) == null ? void 0 : _e$touches$.clientX);
|
|
1367
|
-
}
|
|
1368
|
-
};
|
|
1369
|
-
const passiveIfSupported = passiveEventSupported() ? { passive: false } : false;
|
|
1370
|
-
if (isTouchStartEvent(e)) {
|
|
1371
|
-
contextDocument == null || contextDocument.addEventListener("touchmove", touchEvents.moveHandler, passiveIfSupported);
|
|
1372
|
-
contextDocument == null || contextDocument.addEventListener("touchend", touchEvents.upHandler, passiveIfSupported);
|
|
1373
|
-
} else {
|
|
1374
|
-
contextDocument == null || contextDocument.addEventListener("mousemove", mouseEvents.moveHandler, passiveIfSupported);
|
|
1375
|
-
contextDocument == null || contextDocument.addEventListener("mouseup", mouseEvents.upHandler, passiveIfSupported);
|
|
1376
|
-
}
|
|
1377
|
-
table.setColumnSizingInfo((old) => _objectSpread2(_objectSpread2({}, old), {}, {
|
|
1378
|
-
startOffset: clientX,
|
|
1379
|
-
startSize,
|
|
1380
|
-
deltaOffset: 0,
|
|
1381
|
-
deltaPercentage: 0,
|
|
1382
|
-
columnSizingStart,
|
|
1383
|
-
isResizingColumn: column.id
|
|
1384
|
-
}));
|
|
1385
|
-
};
|
|
1386
|
-
};
|
|
1387
|
-
},
|
|
1388
|
-
createTable: (table) => {
|
|
1389
|
-
table.setColumnSizing = (updater) => table.options.onColumnSizingChange == null ? void 0 : table.options.onColumnSizingChange(updater);
|
|
1390
|
-
table.setColumnSizingInfo = (updater) => table.options.onColumnSizingInfoChange == null ? void 0 : table.options.onColumnSizingInfoChange(updater);
|
|
1391
|
-
table.resetColumnSizing = (defaultState) => {
|
|
1392
|
-
var _table$initialState$c;
|
|
1393
|
-
table.setColumnSizing(defaultState ? {} : (_table$initialState$c = table.initialState.columnSizing) != null ? _table$initialState$c : {});
|
|
1394
|
-
};
|
|
1395
|
-
table.resetHeaderSizeInfo = (defaultState) => {
|
|
1396
|
-
var _table$initialState$c2;
|
|
1397
|
-
table.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : (_table$initialState$c2 = table.initialState.columnSizingInfo) != null ? _table$initialState$c2 : getDefaultColumnSizingInfoState());
|
|
1398
|
-
};
|
|
1399
|
-
table.getTotalSize = () => {
|
|
1400
|
-
var _table$getHeaderGroup, _table$getHeaderGroup2;
|
|
1401
|
-
return (_table$getHeaderGroup = (_table$getHeaderGroup2 = table.getHeaderGroups()[0]) == null ? void 0 : _table$getHeaderGroup2.headers.reduce((sum, header) => {
|
|
1402
|
-
return sum + header.getSize();
|
|
1403
|
-
}, 0)) != null ? _table$getHeaderGroup : 0;
|
|
1404
|
-
};
|
|
1405
|
-
table.getLeftTotalSize = () => {
|
|
1406
|
-
var _table$getLeftHeaderG, _table$getLeftHeaderG2;
|
|
1407
|
-
return (_table$getLeftHeaderG = (_table$getLeftHeaderG2 = table.getLeftHeaderGroups()[0]) == null ? void 0 : _table$getLeftHeaderG2.headers.reduce((sum, header) => {
|
|
1408
|
-
return sum + header.getSize();
|
|
1409
|
-
}, 0)) != null ? _table$getLeftHeaderG : 0;
|
|
1410
|
-
};
|
|
1411
|
-
table.getCenterTotalSize = () => {
|
|
1412
|
-
var _table$getCenterHeade, _table$getCenterHeade2;
|
|
1413
|
-
return (_table$getCenterHeade = (_table$getCenterHeade2 = table.getCenterHeaderGroups()[0]) == null ? void 0 : _table$getCenterHeade2.headers.reduce((sum, header) => {
|
|
1414
|
-
return sum + header.getSize();
|
|
1415
|
-
}, 0)) != null ? _table$getCenterHeade : 0;
|
|
1416
|
-
};
|
|
1417
|
-
table.getRightTotalSize = () => {
|
|
1418
|
-
var _table$getRightHeader, _table$getRightHeader2;
|
|
1419
|
-
return (_table$getRightHeader = (_table$getRightHeader2 = table.getRightHeaderGroups()[0]) == null ? void 0 : _table$getRightHeader2.headers.reduce((sum, header) => {
|
|
1420
|
-
return sum + header.getSize();
|
|
1421
|
-
}, 0)) != null ? _table$getRightHeader : 0;
|
|
1422
|
-
};
|
|
1423
|
-
}
|
|
1424
|
-
};
|
|
1425
|
-
passiveSupported = null;
|
|
1426
|
-
ColumnVisibility = {
|
|
1427
|
-
getInitialState: (state) => {
|
|
1428
|
-
return _objectSpread2({ columnVisibility: {} }, state);
|
|
1429
|
-
},
|
|
1430
|
-
getDefaultOptions: (table) => {
|
|
1431
|
-
return { onColumnVisibilityChange: makeStateUpdater("columnVisibility", table) };
|
|
1432
|
-
},
|
|
1433
|
-
createColumn: (column, table) => {
|
|
1434
|
-
column.toggleVisibility = (value) => {
|
|
1435
|
-
if (column.getCanHide()) table.setColumnVisibility((old) => _objectSpread2(_objectSpread2({}, old), {}, { [column.id]: value != null ? value : !column.getIsVisible() }));
|
|
1436
|
-
};
|
|
1437
|
-
column.getIsVisible = () => {
|
|
1438
|
-
var _ref, _table$getState$colum;
|
|
1439
|
-
const childColumns = column.columns;
|
|
1440
|
-
return (_ref = childColumns.length ? childColumns.some((c) => c.getIsVisible()) : (_table$getState$colum = table.getState().columnVisibility) == null ? void 0 : _table$getState$colum[column.id]) != null ? _ref : true;
|
|
1441
|
-
};
|
|
1442
|
-
column.getCanHide = () => {
|
|
1443
|
-
var _column$columnDef$ena, _table$options$enable;
|
|
1444
|
-
return ((_column$columnDef$ena = column.columnDef.enableHiding) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableHiding) != null ? _table$options$enable : true);
|
|
1445
|
-
};
|
|
1446
|
-
column.getToggleVisibilityHandler = () => {
|
|
1447
|
-
return (e) => {
|
|
1448
|
-
column.toggleVisibility == null || column.toggleVisibility(e.target.checked);
|
|
1449
|
-
};
|
|
1450
|
-
};
|
|
1451
|
-
},
|
|
1452
|
-
createRow: (row, table) => {
|
|
1453
|
-
row._getAllVisibleCells = memo(() => [row.getAllCells(), table.getState().columnVisibility], (cells) => {
|
|
1454
|
-
return cells.filter((cell) => cell.column.getIsVisible());
|
|
1455
|
-
}, getMemoOptions(table.options, "debugRows", "_getAllVisibleCells"));
|
|
1456
|
-
row.getVisibleCells = memo(() => [
|
|
1457
|
-
row.getLeftVisibleCells(),
|
|
1458
|
-
row.getCenterVisibleCells(),
|
|
1459
|
-
row.getRightVisibleCells()
|
|
1460
|
-
], (left, center, right) => [
|
|
1461
|
-
...left,
|
|
1462
|
-
...center,
|
|
1463
|
-
...right
|
|
1464
|
-
], getMemoOptions(table.options, "debugRows", "getVisibleCells"));
|
|
1465
|
-
},
|
|
1466
|
-
createTable: (table) => {
|
|
1467
|
-
const makeVisibleColumnsMethod = (key, getColumns) => {
|
|
1468
|
-
return memo(() => [getColumns(), getColumns().filter((d) => d.getIsVisible()).map((d) => d.id).join("_")], (columns) => {
|
|
1469
|
-
return columns.filter((d) => d.getIsVisible == null ? void 0 : d.getIsVisible());
|
|
1470
|
-
}, getMemoOptions(table.options, "debugColumns", key));
|
|
1471
|
-
};
|
|
1472
|
-
table.getVisibleFlatColumns = makeVisibleColumnsMethod("getVisibleFlatColumns", () => table.getAllFlatColumns());
|
|
1473
|
-
table.getVisibleLeafColumns = makeVisibleColumnsMethod("getVisibleLeafColumns", () => table.getAllLeafColumns());
|
|
1474
|
-
table.getLeftVisibleLeafColumns = makeVisibleColumnsMethod("getLeftVisibleLeafColumns", () => table.getLeftLeafColumns());
|
|
1475
|
-
table.getRightVisibleLeafColumns = makeVisibleColumnsMethod("getRightVisibleLeafColumns", () => table.getRightLeafColumns());
|
|
1476
|
-
table.getCenterVisibleLeafColumns = makeVisibleColumnsMethod("getCenterVisibleLeafColumns", () => table.getCenterLeafColumns());
|
|
1477
|
-
table.setColumnVisibility = (updater) => table.options.onColumnVisibilityChange == null ? void 0 : table.options.onColumnVisibilityChange(updater);
|
|
1478
|
-
table.resetColumnVisibility = (defaultState) => {
|
|
1479
|
-
var _table$initialState$c;
|
|
1480
|
-
table.setColumnVisibility(defaultState ? {} : (_table$initialState$c = table.initialState.columnVisibility) != null ? _table$initialState$c : {});
|
|
1481
|
-
};
|
|
1482
|
-
table.toggleAllColumnsVisible = (value) => {
|
|
1483
|
-
var _value;
|
|
1484
|
-
value = (_value = value) != null ? _value : !table.getIsAllColumnsVisible();
|
|
1485
|
-
table.setColumnVisibility(table.getAllLeafColumns().reduce((obj, column) => _objectSpread2(_objectSpread2({}, obj), {}, { [column.id]: !value ? !(column.getCanHide != null && column.getCanHide()) : value }), {}));
|
|
1486
|
-
};
|
|
1487
|
-
table.getIsAllColumnsVisible = () => !table.getAllLeafColumns().some((column) => !(column.getIsVisible != null && column.getIsVisible()));
|
|
1488
|
-
table.getIsSomeColumnsVisible = () => table.getAllLeafColumns().some((column) => column.getIsVisible == null ? void 0 : column.getIsVisible());
|
|
1489
|
-
table.getToggleAllColumnsVisibilityHandler = () => {
|
|
1490
|
-
return (e) => {
|
|
1491
|
-
var _target;
|
|
1492
|
-
table.toggleAllColumnsVisible((_target = e.target) == null ? void 0 : _target.checked);
|
|
1493
|
-
};
|
|
1494
|
-
};
|
|
1495
|
-
}
|
|
1496
|
-
};
|
|
1497
|
-
GlobalFaceting = { createTable: (table) => {
|
|
1498
|
-
table._getGlobalFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, "__global__");
|
|
1499
|
-
table.getGlobalFacetedRowModel = () => {
|
|
1500
|
-
if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) return table.getPreFilteredRowModel();
|
|
1501
|
-
return table._getGlobalFacetedRowModel();
|
|
1502
|
-
};
|
|
1503
|
-
table._getGlobalFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, "__global__");
|
|
1504
|
-
table.getGlobalFacetedUniqueValues = () => {
|
|
1505
|
-
if (!table._getGlobalFacetedUniqueValues) return /* @__PURE__ */ new Map();
|
|
1506
|
-
return table._getGlobalFacetedUniqueValues();
|
|
1507
|
-
};
|
|
1508
|
-
table._getGlobalFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, "__global__");
|
|
1509
|
-
table.getGlobalFacetedMinMaxValues = () => {
|
|
1510
|
-
if (!table._getGlobalFacetedMinMaxValues) return;
|
|
1511
|
-
return table._getGlobalFacetedMinMaxValues();
|
|
1512
|
-
};
|
|
1513
|
-
} };
|
|
1514
|
-
GlobalFiltering = {
|
|
1515
|
-
getInitialState: (state) => {
|
|
1516
|
-
return _objectSpread2({ globalFilter: void 0 }, state);
|
|
1517
|
-
},
|
|
1518
|
-
getDefaultOptions: (table) => {
|
|
1519
|
-
return {
|
|
1520
|
-
onGlobalFilterChange: makeStateUpdater("globalFilter", table),
|
|
1521
|
-
globalFilterFn: "auto",
|
|
1522
|
-
getColumnCanGlobalFilter: (column) => {
|
|
1523
|
-
var _table$getCoreRowMode;
|
|
1524
|
-
const value = (_table$getCoreRowMode = table.getCoreRowModel().flatRows[0]) == null || (_table$getCoreRowMode = _table$getCoreRowMode._getAllCellsByColumnId()[column.id]) == null ? void 0 : _table$getCoreRowMode.getValue();
|
|
1525
|
-
return typeof value === "string" || typeof value === "number";
|
|
1526
|
-
}
|
|
1527
|
-
};
|
|
1528
|
-
},
|
|
1529
|
-
createColumn: (column, table) => {
|
|
1530
|
-
column.getCanGlobalFilter = () => {
|
|
1531
|
-
var _column$columnDef$ena, _table$options$enable, _table$options$enable2, _table$options$getCol;
|
|
1532
|
-
return ((_column$columnDef$ena = column.columnDef.enableGlobalFilter) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableGlobalFilter) != null ? _table$options$enable : true) && ((_table$options$enable2 = table.options.enableFilters) != null ? _table$options$enable2 : true) && ((_table$options$getCol = table.options.getColumnCanGlobalFilter == null ? void 0 : table.options.getColumnCanGlobalFilter(column)) != null ? _table$options$getCol : true) && !!column.accessorFn;
|
|
1533
|
-
};
|
|
1534
|
-
},
|
|
1535
|
-
createTable: (table) => {
|
|
1536
|
-
table.getGlobalAutoFilterFn = () => {
|
|
1537
|
-
return filterFns.includesString;
|
|
1538
|
-
};
|
|
1539
|
-
table.getGlobalFilterFn = () => {
|
|
1540
|
-
var _table$options$filter, _table$options$filter2;
|
|
1541
|
-
const { globalFilterFn } = table.options;
|
|
1542
|
-
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === "auto" ? table.getGlobalAutoFilterFn() : (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[globalFilterFn]) != null ? _table$options$filter : filterFns[globalFilterFn];
|
|
1543
|
-
};
|
|
1544
|
-
table.setGlobalFilter = (updater) => {
|
|
1545
|
-
table.options.onGlobalFilterChange == null || table.options.onGlobalFilterChange(updater);
|
|
1546
|
-
};
|
|
1547
|
-
table.resetGlobalFilter = (defaultState) => {
|
|
1548
|
-
table.setGlobalFilter(defaultState ? void 0 : table.initialState.globalFilter);
|
|
1549
|
-
};
|
|
1550
|
-
}
|
|
1551
|
-
};
|
|
1552
|
-
RowExpanding = {
|
|
1553
|
-
getInitialState: (state) => {
|
|
1554
|
-
return _objectSpread2({ expanded: {} }, state);
|
|
1555
|
-
},
|
|
1556
|
-
getDefaultOptions: (table) => {
|
|
1557
|
-
return {
|
|
1558
|
-
onExpandedChange: makeStateUpdater("expanded", table),
|
|
1559
|
-
paginateExpandedRows: true
|
|
1560
|
-
};
|
|
1561
|
-
},
|
|
1562
|
-
createTable: (table) => {
|
|
1563
|
-
let registered = false;
|
|
1564
|
-
let queued = false;
|
|
1565
|
-
table._autoResetExpanded = () => {
|
|
1566
|
-
var _ref, _table$options$autoRe;
|
|
1567
|
-
if (!registered) {
|
|
1568
|
-
table._queue(() => {
|
|
1569
|
-
registered = true;
|
|
1570
|
-
});
|
|
1571
|
-
return;
|
|
1572
|
-
}
|
|
1573
|
-
if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetExpanded) != null ? _ref : !table.options.manualExpanding) {
|
|
1574
|
-
if (queued) return;
|
|
1575
|
-
queued = true;
|
|
1576
|
-
table._queue(() => {
|
|
1577
|
-
table.resetExpanded();
|
|
1578
|
-
queued = false;
|
|
1579
|
-
});
|
|
1580
|
-
}
|
|
1581
|
-
};
|
|
1582
|
-
table.setExpanded = (updater) => table.options.onExpandedChange == null ? void 0 : table.options.onExpandedChange(updater);
|
|
1583
|
-
table.toggleAllRowsExpanded = (expanded) => {
|
|
1584
|
-
if (expanded != null ? expanded : !table.getIsAllRowsExpanded()) table.setExpanded(true);
|
|
1585
|
-
else table.setExpanded({});
|
|
1586
|
-
};
|
|
1587
|
-
table.resetExpanded = (defaultState) => {
|
|
1588
|
-
var _table$initialState$e, _table$initialState;
|
|
1589
|
-
table.setExpanded(defaultState ? {} : (_table$initialState$e = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.expanded) != null ? _table$initialState$e : {});
|
|
1590
|
-
};
|
|
1591
|
-
table.getCanSomeRowsExpand = () => {
|
|
1592
|
-
return table.getPrePaginationRowModel().flatRows.some((row) => row.getCanExpand());
|
|
1593
|
-
};
|
|
1594
|
-
table.getToggleAllRowsExpandedHandler = () => {
|
|
1595
|
-
return (e) => {
|
|
1596
|
-
e.persist == null || e.persist();
|
|
1597
|
-
table.toggleAllRowsExpanded();
|
|
1598
|
-
};
|
|
1599
|
-
};
|
|
1600
|
-
table.getIsSomeRowsExpanded = () => {
|
|
1601
|
-
const expanded = table.getState().expanded;
|
|
1602
|
-
return expanded === true || Object.values(expanded).some(Boolean);
|
|
1603
|
-
};
|
|
1604
|
-
table.getIsAllRowsExpanded = () => {
|
|
1605
|
-
const expanded = table.getState().expanded;
|
|
1606
|
-
if (typeof expanded === "boolean") return expanded === true;
|
|
1607
|
-
if (!Object.keys(expanded).length) return false;
|
|
1608
|
-
if (table.getRowModel().flatRows.some((row) => !row.getIsExpanded())) return false;
|
|
1609
|
-
return true;
|
|
1610
|
-
};
|
|
1611
|
-
table.getExpandedDepth = () => {
|
|
1612
|
-
let maxDepth = 0;
|
|
1613
|
-
(table.getState().expanded === true ? Object.keys(table.getRowModel().rowsById) : Object.keys(table.getState().expanded)).forEach((id) => {
|
|
1614
|
-
const splitId = id.split(".");
|
|
1615
|
-
maxDepth = Math.max(maxDepth, splitId.length);
|
|
1616
|
-
});
|
|
1617
|
-
return maxDepth;
|
|
1618
|
-
};
|
|
1619
|
-
table.getPreExpandedRowModel = () => table.getSortedRowModel();
|
|
1620
|
-
table.getExpandedRowModel = () => {
|
|
1621
|
-
if (!table._getExpandedRowModel && table.options.getExpandedRowModel) table._getExpandedRowModel = table.options.getExpandedRowModel(table);
|
|
1622
|
-
if (table.options.manualExpanding || !table._getExpandedRowModel) return table.getPreExpandedRowModel();
|
|
1623
|
-
return table._getExpandedRowModel();
|
|
1624
|
-
};
|
|
1625
|
-
},
|
|
1626
|
-
createRow: (row, table) => {
|
|
1627
|
-
row.toggleExpanded = (expanded) => {
|
|
1628
|
-
table.setExpanded((old) => {
|
|
1629
|
-
var _expanded;
|
|
1630
|
-
const exists = old === true ? true : !!(old != null && old[row.id]);
|
|
1631
|
-
let oldExpanded = {};
|
|
1632
|
-
if (old === true) Object.keys(table.getRowModel().rowsById).forEach((rowId) => {
|
|
1633
|
-
oldExpanded[rowId] = true;
|
|
1634
|
-
});
|
|
1635
|
-
else oldExpanded = old;
|
|
1636
|
-
expanded = (_expanded = expanded) != null ? _expanded : !exists;
|
|
1637
|
-
if (!exists && expanded) return _objectSpread2(_objectSpread2({}, oldExpanded), {}, { [row.id]: true });
|
|
1638
|
-
if (exists && !expanded) {
|
|
1639
|
-
const _row$id = row.id, { [_row$id]: _ } = oldExpanded;
|
|
1640
|
-
return _objectWithoutProperties(oldExpanded, [_row$id].map(toPropertyKey));
|
|
1641
|
-
}
|
|
1642
|
-
return old;
|
|
1643
|
-
});
|
|
1644
|
-
};
|
|
1645
|
-
row.getIsExpanded = () => {
|
|
1646
|
-
var _table$options$getIsR;
|
|
1647
|
-
const expanded = table.getState().expanded;
|
|
1648
|
-
return !!((_table$options$getIsR = table.options.getIsRowExpanded == null ? void 0 : table.options.getIsRowExpanded(row)) != null ? _table$options$getIsR : expanded === true || (expanded == null ? void 0 : expanded[row.id]));
|
|
1649
|
-
};
|
|
1650
|
-
row.getCanExpand = () => {
|
|
1651
|
-
var _table$options$getRow, _table$options$enable, _row$subRows;
|
|
1652
|
-
return (_table$options$getRow = table.options.getRowCanExpand == null ? void 0 : table.options.getRowCanExpand(row)) != null ? _table$options$getRow : ((_table$options$enable = table.options.enableExpanding) != null ? _table$options$enable : true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
|
|
1653
|
-
};
|
|
1654
|
-
row.getIsAllParentsExpanded = () => {
|
|
1655
|
-
let isFullyExpanded = true;
|
|
1656
|
-
let currentRow = row;
|
|
1657
|
-
while (isFullyExpanded && currentRow.parentId) {
|
|
1658
|
-
currentRow = table.getRow(currentRow.parentId, true);
|
|
1659
|
-
isFullyExpanded = currentRow.getIsExpanded();
|
|
1660
|
-
}
|
|
1661
|
-
return isFullyExpanded;
|
|
1662
|
-
};
|
|
1663
|
-
row.getToggleExpandedHandler = () => {
|
|
1664
|
-
const canExpand = row.getCanExpand();
|
|
1665
|
-
return () => {
|
|
1666
|
-
if (!canExpand) return;
|
|
1667
|
-
row.toggleExpanded();
|
|
1668
|
-
};
|
|
1669
|
-
};
|
|
1670
|
-
}
|
|
1671
|
-
};
|
|
1672
|
-
defaultPageIndex = 0;
|
|
1673
|
-
defaultPageSize = 10;
|
|
1674
|
-
getDefaultPaginationState = () => ({
|
|
1675
|
-
pageIndex: defaultPageIndex,
|
|
1676
|
-
pageSize: defaultPageSize
|
|
1677
|
-
});
|
|
1678
|
-
RowPagination = {
|
|
1679
|
-
getInitialState: (state) => {
|
|
1680
|
-
return _objectSpread2(_objectSpread2({}, state), {}, { pagination: _objectSpread2(_objectSpread2({}, getDefaultPaginationState()), state == null ? void 0 : state.pagination) });
|
|
1681
|
-
},
|
|
1682
|
-
getDefaultOptions: (table) => {
|
|
1683
|
-
return { onPaginationChange: makeStateUpdater("pagination", table) };
|
|
1684
|
-
},
|
|
1685
|
-
createTable: (table) => {
|
|
1686
|
-
let registered = false;
|
|
1687
|
-
let queued = false;
|
|
1688
|
-
table._autoResetPageIndex = () => {
|
|
1689
|
-
var _ref, _table$options$autoRe;
|
|
1690
|
-
if (!registered) {
|
|
1691
|
-
table._queue(() => {
|
|
1692
|
-
registered = true;
|
|
1693
|
-
});
|
|
1694
|
-
return;
|
|
1695
|
-
}
|
|
1696
|
-
if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetPageIndex) != null ? _ref : !table.options.manualPagination) {
|
|
1697
|
-
if (queued) return;
|
|
1698
|
-
queued = true;
|
|
1699
|
-
table._queue(() => {
|
|
1700
|
-
table.resetPageIndex();
|
|
1701
|
-
queued = false;
|
|
1702
|
-
});
|
|
1703
|
-
}
|
|
1704
|
-
};
|
|
1705
|
-
table.setPagination = (updater) => {
|
|
1706
|
-
const safeUpdater = (old) => {
|
|
1707
|
-
return functionalUpdate(updater, old);
|
|
1708
|
-
};
|
|
1709
|
-
return table.options.onPaginationChange == null ? void 0 : table.options.onPaginationChange(safeUpdater);
|
|
1710
|
-
};
|
|
1711
|
-
table.resetPagination = (defaultState) => {
|
|
1712
|
-
var _table$initialState$p;
|
|
1713
|
-
table.setPagination(defaultState ? getDefaultPaginationState() : (_table$initialState$p = table.initialState.pagination) != null ? _table$initialState$p : getDefaultPaginationState());
|
|
1714
|
-
};
|
|
1715
|
-
table.setPageIndex = (updater) => {
|
|
1716
|
-
table.setPagination((old) => {
|
|
1717
|
-
let pageIndex = functionalUpdate(updater, old.pageIndex);
|
|
1718
|
-
const maxPageIndex = typeof table.options.pageCount === "undefined" || table.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : table.options.pageCount - 1;
|
|
1719
|
-
pageIndex = Math.max(0, Math.min(pageIndex, maxPageIndex));
|
|
1720
|
-
return _objectSpread2(_objectSpread2({}, old), {}, { pageIndex });
|
|
1721
|
-
});
|
|
1722
|
-
};
|
|
1723
|
-
table.resetPageIndex = (defaultState) => {
|
|
1724
|
-
var _table$initialState$p2, _table$initialState;
|
|
1725
|
-
table.setPageIndex(defaultState ? defaultPageIndex : (_table$initialState$p2 = (_table$initialState = table.initialState) == null || (_table$initialState = _table$initialState.pagination) == null ? void 0 : _table$initialState.pageIndex) != null ? _table$initialState$p2 : defaultPageIndex);
|
|
1726
|
-
};
|
|
1727
|
-
table.resetPageSize = (defaultState) => {
|
|
1728
|
-
var _table$initialState$p3, _table$initialState2;
|
|
1729
|
-
table.setPageSize(defaultState ? defaultPageSize : (_table$initialState$p3 = (_table$initialState2 = table.initialState) == null || (_table$initialState2 = _table$initialState2.pagination) == null ? void 0 : _table$initialState2.pageSize) != null ? _table$initialState$p3 : defaultPageSize);
|
|
1730
|
-
};
|
|
1731
|
-
table.setPageSize = (updater) => {
|
|
1732
|
-
table.setPagination((old) => {
|
|
1733
|
-
const pageSize = Math.max(1, functionalUpdate(updater, old.pageSize));
|
|
1734
|
-
const topRowIndex = old.pageSize * old.pageIndex;
|
|
1735
|
-
const pageIndex = Math.floor(topRowIndex / pageSize);
|
|
1736
|
-
return _objectSpread2(_objectSpread2({}, old), {}, {
|
|
1737
|
-
pageIndex,
|
|
1738
|
-
pageSize
|
|
1739
|
-
});
|
|
1740
|
-
});
|
|
1741
|
-
};
|
|
1742
|
-
table.setPageCount = (updater) => table.setPagination((old) => {
|
|
1743
|
-
var _table$options$pageCo;
|
|
1744
|
-
let newPageCount = functionalUpdate(updater, (_table$options$pageCo = table.options.pageCount) != null ? _table$options$pageCo : -1);
|
|
1745
|
-
if (typeof newPageCount === "number") newPageCount = Math.max(-1, newPageCount);
|
|
1746
|
-
return _objectSpread2(_objectSpread2({}, old), {}, { pageCount: newPageCount });
|
|
1747
|
-
});
|
|
1748
|
-
table.getPageOptions = memo(() => [table.getPageCount()], (pageCount) => {
|
|
1749
|
-
let pageOptions = [];
|
|
1750
|
-
if (pageCount && pageCount > 0) pageOptions = [...new Array(pageCount)].fill(null).map((_, i) => i);
|
|
1751
|
-
return pageOptions;
|
|
1752
|
-
}, getMemoOptions(table.options, "debugTable", "getPageOptions"));
|
|
1753
|
-
table.getCanPreviousPage = () => table.getState().pagination.pageIndex > 0;
|
|
1754
|
-
table.getCanNextPage = () => {
|
|
1755
|
-
const { pageIndex } = table.getState().pagination;
|
|
1756
|
-
const pageCount = table.getPageCount();
|
|
1757
|
-
if (pageCount === -1) return true;
|
|
1758
|
-
if (pageCount === 0) return false;
|
|
1759
|
-
return pageIndex < pageCount - 1;
|
|
1760
|
-
};
|
|
1761
|
-
table.previousPage = () => {
|
|
1762
|
-
return table.setPageIndex((old) => old - 1);
|
|
1763
|
-
};
|
|
1764
|
-
table.nextPage = () => {
|
|
1765
|
-
return table.setPageIndex((old) => {
|
|
1766
|
-
return old + 1;
|
|
1767
|
-
});
|
|
1768
|
-
};
|
|
1769
|
-
table.firstPage = () => {
|
|
1770
|
-
return table.setPageIndex(0);
|
|
1771
|
-
};
|
|
1772
|
-
table.lastPage = () => {
|
|
1773
|
-
return table.setPageIndex(table.getPageCount() - 1);
|
|
1774
|
-
};
|
|
1775
|
-
table.getPrePaginationRowModel = () => table.getExpandedRowModel();
|
|
1776
|
-
table.getPaginationRowModel = () => {
|
|
1777
|
-
if (!table._getPaginationRowModel && table.options.getPaginationRowModel) table._getPaginationRowModel = table.options.getPaginationRowModel(table);
|
|
1778
|
-
if (table.options.manualPagination || !table._getPaginationRowModel) return table.getPrePaginationRowModel();
|
|
1779
|
-
return table._getPaginationRowModel();
|
|
1780
|
-
};
|
|
1781
|
-
table.getPageCount = () => {
|
|
1782
|
-
var _table$options$pageCo2;
|
|
1783
|
-
return (_table$options$pageCo2 = table.options.pageCount) != null ? _table$options$pageCo2 : Math.ceil(table.getRowCount() / table.getState().pagination.pageSize);
|
|
1784
|
-
};
|
|
1785
|
-
table.getRowCount = () => {
|
|
1786
|
-
var _table$options$rowCou;
|
|
1787
|
-
return (_table$options$rowCou = table.options.rowCount) != null ? _table$options$rowCou : table.getPrePaginationRowModel().rows.length;
|
|
1788
|
-
};
|
|
1789
|
-
}
|
|
1790
|
-
};
|
|
1791
|
-
getDefaultRowPinningState = () => ({
|
|
1792
|
-
top: [],
|
|
1793
|
-
bottom: []
|
|
1794
|
-
});
|
|
1795
|
-
RowPinning = {
|
|
1796
|
-
getInitialState: (state) => {
|
|
1797
|
-
return _objectSpread2({ rowPinning: getDefaultRowPinningState() }, state);
|
|
1798
|
-
},
|
|
1799
|
-
getDefaultOptions: (table) => {
|
|
1800
|
-
return { onRowPinningChange: makeStateUpdater("rowPinning", table) };
|
|
1801
|
-
},
|
|
1802
|
-
createRow: (row, table) => {
|
|
1803
|
-
row.pin = (position, includeLeafRows, includeParentRows) => {
|
|
1804
|
-
const leafRowIds = includeLeafRows ? row.getLeafRows().map((_ref) => {
|
|
1805
|
-
let { id } = _ref;
|
|
1806
|
-
return id;
|
|
1807
|
-
}) : [];
|
|
1808
|
-
const parentRowIds = includeParentRows ? row.getParentRows().map((_ref2) => {
|
|
1809
|
-
let { id } = _ref2;
|
|
1810
|
-
return id;
|
|
1811
|
-
}) : [];
|
|
1812
|
-
const rowIds = new Set([
|
|
1813
|
-
...parentRowIds,
|
|
1814
|
-
row.id,
|
|
1815
|
-
...leafRowIds
|
|
1816
|
-
]);
|
|
1817
|
-
table.setRowPinning((old) => {
|
|
1818
|
-
var _old$top3, _old$bottom3;
|
|
1819
|
-
if (position === "bottom") {
|
|
1820
|
-
var _old$top, _old$bottom;
|
|
1821
|
-
return {
|
|
1822
|
-
top: ((_old$top = old == null ? void 0 : old.top) != null ? _old$top : []).filter((d) => !(rowIds != null && rowIds.has(d))),
|
|
1823
|
-
bottom: [...((_old$bottom = old == null ? void 0 : old.bottom) != null ? _old$bottom : []).filter((d) => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)]
|
|
1824
|
-
};
|
|
1825
|
-
}
|
|
1826
|
-
if (position === "top") {
|
|
1827
|
-
var _old$top2, _old$bottom2;
|
|
1828
|
-
return {
|
|
1829
|
-
top: [...((_old$top2 = old == null ? void 0 : old.top) != null ? _old$top2 : []).filter((d) => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)],
|
|
1830
|
-
bottom: ((_old$bottom2 = old == null ? void 0 : old.bottom) != null ? _old$bottom2 : []).filter((d) => !(rowIds != null && rowIds.has(d)))
|
|
1831
|
-
};
|
|
1832
|
-
}
|
|
1833
|
-
return {
|
|
1834
|
-
top: ((_old$top3 = old == null ? void 0 : old.top) != null ? _old$top3 : []).filter((d) => !(rowIds != null && rowIds.has(d))),
|
|
1835
|
-
bottom: ((_old$bottom3 = old == null ? void 0 : old.bottom) != null ? _old$bottom3 : []).filter((d) => !(rowIds != null && rowIds.has(d)))
|
|
1836
|
-
};
|
|
1837
|
-
});
|
|
1838
|
-
};
|
|
1839
|
-
row.getCanPin = () => {
|
|
1840
|
-
var _ref3;
|
|
1841
|
-
const { enableRowPinning, enablePinning } = table.options;
|
|
1842
|
-
if (typeof enableRowPinning === "function") return enableRowPinning(row);
|
|
1843
|
-
return (_ref3 = enableRowPinning != null ? enableRowPinning : enablePinning) != null ? _ref3 : true;
|
|
1844
|
-
};
|
|
1845
|
-
row.getIsPinned = () => {
|
|
1846
|
-
const rowIds = [row.id];
|
|
1847
|
-
const { top, bottom } = table.getState().rowPinning;
|
|
1848
|
-
const isTop = rowIds.some((d) => top == null ? void 0 : top.includes(d));
|
|
1849
|
-
const isBottom = rowIds.some((d) => bottom == null ? void 0 : bottom.includes(d));
|
|
1850
|
-
return isTop ? "top" : isBottom ? "bottom" : false;
|
|
1851
|
-
};
|
|
1852
|
-
row.getPinnedIndex = () => {
|
|
1853
|
-
var _ref4, _visiblePinnedRowIds$;
|
|
1854
|
-
const position = row.getIsPinned();
|
|
1855
|
-
if (!position) return -1;
|
|
1856
|
-
const visiblePinnedRowIds = (_ref4 = position === "top" ? table.getTopRows() : table.getBottomRows()) == null ? void 0 : _ref4.map((_ref5) => {
|
|
1857
|
-
let { id } = _ref5;
|
|
1858
|
-
return id;
|
|
1859
|
-
});
|
|
1860
|
-
return (_visiblePinnedRowIds$ = visiblePinnedRowIds == null ? void 0 : visiblePinnedRowIds.indexOf(row.id)) != null ? _visiblePinnedRowIds$ : -1;
|
|
1861
|
-
};
|
|
1862
|
-
},
|
|
1863
|
-
createTable: (table) => {
|
|
1864
|
-
table.setRowPinning = (updater) => table.options.onRowPinningChange == null ? void 0 : table.options.onRowPinningChange(updater);
|
|
1865
|
-
table.resetRowPinning = (defaultState) => {
|
|
1866
|
-
var _table$initialState$r, _table$initialState;
|
|
1867
|
-
return table.setRowPinning(defaultState ? getDefaultRowPinningState() : (_table$initialState$r = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.rowPinning) != null ? _table$initialState$r : getDefaultRowPinningState());
|
|
1868
|
-
};
|
|
1869
|
-
table.getIsSomeRowsPinned = (position) => {
|
|
1870
|
-
var _pinningState$positio;
|
|
1871
|
-
const pinningState = table.getState().rowPinning;
|
|
1872
|
-
if (!position) {
|
|
1873
|
-
var _pinningState$top, _pinningState$bottom;
|
|
1874
|
-
return Boolean(((_pinningState$top = pinningState.top) == null ? void 0 : _pinningState$top.length) || ((_pinningState$bottom = pinningState.bottom) == null ? void 0 : _pinningState$bottom.length));
|
|
1875
|
-
}
|
|
1876
|
-
return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);
|
|
1877
|
-
};
|
|
1878
|
-
table._getPinnedRows = (visibleRows, pinnedRowIds, position) => {
|
|
1879
|
-
var _table$options$keepPi;
|
|
1880
|
-
return (((_table$options$keepPi = table.options.keepPinnedRows) != null ? _table$options$keepPi : true) ? (pinnedRowIds != null ? pinnedRowIds : []).map((rowId) => {
|
|
1881
|
-
const row = table.getRow(rowId, true);
|
|
1882
|
-
return row.getIsAllParentsExpanded() ? row : null;
|
|
1883
|
-
}) : (pinnedRowIds != null ? pinnedRowIds : []).map((rowId) => visibleRows.find((row) => row.id === rowId))).filter(Boolean).map((d) => _objectSpread2(_objectSpread2({}, d), {}, { position }));
|
|
1884
|
-
};
|
|
1885
|
-
table.getTopRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.top], (allRows, topPinnedRowIds) => table._getPinnedRows(allRows, topPinnedRowIds, "top"), getMemoOptions(table.options, "debugRows", "getTopRows"));
|
|
1886
|
-
table.getBottomRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.bottom], (allRows, bottomPinnedRowIds) => table._getPinnedRows(allRows, bottomPinnedRowIds, "bottom"), getMemoOptions(table.options, "debugRows", "getBottomRows"));
|
|
1887
|
-
table.getCenterRows = memo(() => [
|
|
1888
|
-
table.getRowModel().rows,
|
|
1889
|
-
table.getState().rowPinning.top,
|
|
1890
|
-
table.getState().rowPinning.bottom
|
|
1891
|
-
], (allRows, top, bottom) => {
|
|
1892
|
-
const topAndBottom = new Set([...top != null ? top : [], ...bottom != null ? bottom : []]);
|
|
1893
|
-
return allRows.filter((d) => !topAndBottom.has(d.id));
|
|
1894
|
-
}, getMemoOptions(table.options, "debugRows", "getCenterRows"));
|
|
1895
|
-
}
|
|
1896
|
-
};
|
|
1897
|
-
RowSelection = {
|
|
1898
|
-
getInitialState: (state) => {
|
|
1899
|
-
return _objectSpread2({ rowSelection: {} }, state);
|
|
1900
|
-
},
|
|
1901
|
-
getDefaultOptions: (table) => {
|
|
1902
|
-
return {
|
|
1903
|
-
onRowSelectionChange: makeStateUpdater("rowSelection", table),
|
|
1904
|
-
enableRowSelection: true,
|
|
1905
|
-
enableMultiRowSelection: true,
|
|
1906
|
-
enableSubRowSelection: true
|
|
1907
|
-
};
|
|
1908
|
-
},
|
|
1909
|
-
createTable: (table) => {
|
|
1910
|
-
table.setRowSelection = (updater) => table.options.onRowSelectionChange == null ? void 0 : table.options.onRowSelectionChange(updater);
|
|
1911
|
-
table.resetRowSelection = (defaultState) => {
|
|
1912
|
-
var _table$initialState$r;
|
|
1913
|
-
return table.setRowSelection(defaultState ? {} : (_table$initialState$r = table.initialState.rowSelection) != null ? _table$initialState$r : {});
|
|
1914
|
-
};
|
|
1915
|
-
table.toggleAllRowsSelected = (value) => {
|
|
1916
|
-
table.setRowSelection((old) => {
|
|
1917
|
-
value = typeof value !== "undefined" ? value : !table.getIsAllRowsSelected();
|
|
1918
|
-
const rowSelection = _objectSpread2({}, old);
|
|
1919
|
-
const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows;
|
|
1920
|
-
if (value) preGroupedFlatRows.forEach((row) => {
|
|
1921
|
-
if (!row.getCanSelect()) return;
|
|
1922
|
-
rowSelection[row.id] = true;
|
|
1923
|
-
});
|
|
1924
|
-
else preGroupedFlatRows.forEach((row) => {
|
|
1925
|
-
delete rowSelection[row.id];
|
|
1926
|
-
});
|
|
1927
|
-
return rowSelection;
|
|
1928
|
-
});
|
|
1929
|
-
};
|
|
1930
|
-
table.toggleAllPageRowsSelected = (value) => table.setRowSelection((old) => {
|
|
1931
|
-
const resolvedValue = typeof value !== "undefined" ? value : !table.getIsAllPageRowsSelected();
|
|
1932
|
-
const rowSelection = _objectSpread2({}, old);
|
|
1933
|
-
table.getRowModel().rows.forEach((row) => {
|
|
1934
|
-
mutateRowIsSelected(rowSelection, row.id, resolvedValue, true, table);
|
|
1935
|
-
});
|
|
1936
|
-
return rowSelection;
|
|
1937
|
-
});
|
|
1938
|
-
table.getPreSelectedRowModel = () => table.getCoreRowModel();
|
|
1939
|
-
table.getSelectedRowModel = memo(() => [table.getState().rowSelection, table.getCoreRowModel()], (rowSelection, rowModel) => {
|
|
1940
|
-
if (!Object.keys(rowSelection).length) return {
|
|
1941
|
-
rows: [],
|
|
1942
|
-
flatRows: [],
|
|
1943
|
-
rowsById: {}
|
|
1944
|
-
};
|
|
1945
|
-
return selectRowsFn(table, rowModel);
|
|
1946
|
-
}, getMemoOptions(table.options, "debugTable", "getSelectedRowModel"));
|
|
1947
|
-
table.getFilteredSelectedRowModel = memo(() => [table.getState().rowSelection, table.getFilteredRowModel()], (rowSelection, rowModel) => {
|
|
1948
|
-
if (!Object.keys(rowSelection).length) return {
|
|
1949
|
-
rows: [],
|
|
1950
|
-
flatRows: [],
|
|
1951
|
-
rowsById: {}
|
|
1952
|
-
};
|
|
1953
|
-
return selectRowsFn(table, rowModel);
|
|
1954
|
-
}, getMemoOptions(table.options, "debugTable", "getFilteredSelectedRowModel"));
|
|
1955
|
-
table.getGroupedSelectedRowModel = memo(() => [table.getState().rowSelection, table.getSortedRowModel()], (rowSelection, rowModel) => {
|
|
1956
|
-
if (!Object.keys(rowSelection).length) return {
|
|
1957
|
-
rows: [],
|
|
1958
|
-
flatRows: [],
|
|
1959
|
-
rowsById: {}
|
|
1960
|
-
};
|
|
1961
|
-
return selectRowsFn(table, rowModel);
|
|
1962
|
-
}, getMemoOptions(table.options, "debugTable", "getGroupedSelectedRowModel"));
|
|
1963
|
-
table.getIsAllRowsSelected = () => {
|
|
1964
|
-
const preGroupedFlatRows = table.getFilteredRowModel().flatRows;
|
|
1965
|
-
const { rowSelection } = table.getState();
|
|
1966
|
-
let isAllRowsSelected = Boolean(preGroupedFlatRows.length && Object.keys(rowSelection).length);
|
|
1967
|
-
if (isAllRowsSelected) {
|
|
1968
|
-
if (preGroupedFlatRows.some((row) => row.getCanSelect() && !rowSelection[row.id])) isAllRowsSelected = false;
|
|
1969
|
-
}
|
|
1970
|
-
return isAllRowsSelected;
|
|
1971
|
-
};
|
|
1972
|
-
table.getIsAllPageRowsSelected = () => {
|
|
1973
|
-
const paginationFlatRows = table.getPaginationRowModel().flatRows.filter((row) => row.getCanSelect());
|
|
1974
|
-
const { rowSelection } = table.getState();
|
|
1975
|
-
let isAllPageRowsSelected = !!paginationFlatRows.length;
|
|
1976
|
-
if (isAllPageRowsSelected && paginationFlatRows.some((row) => !rowSelection[row.id])) isAllPageRowsSelected = false;
|
|
1977
|
-
return isAllPageRowsSelected;
|
|
1978
|
-
};
|
|
1979
|
-
table.getIsSomeRowsSelected = () => {
|
|
1980
|
-
var _table$getState$rowSe;
|
|
1981
|
-
const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
|
|
1982
|
-
return totalSelected > 0 && totalSelected < table.getFilteredRowModel().flatRows.length;
|
|
1983
|
-
};
|
|
1984
|
-
table.getIsSomePageRowsSelected = () => {
|
|
1985
|
-
const paginationFlatRows = table.getPaginationRowModel().flatRows;
|
|
1986
|
-
return table.getIsAllPageRowsSelected() ? false : paginationFlatRows.filter((row) => row.getCanSelect()).some((d) => d.getIsSelected() || d.getIsSomeSelected());
|
|
1987
|
-
};
|
|
1988
|
-
table.getToggleAllRowsSelectedHandler = () => {
|
|
1989
|
-
return (e) => {
|
|
1990
|
-
table.toggleAllRowsSelected(e.target.checked);
|
|
1991
|
-
};
|
|
1992
|
-
};
|
|
1993
|
-
table.getToggleAllPageRowsSelectedHandler = () => {
|
|
1994
|
-
return (e) => {
|
|
1995
|
-
table.toggleAllPageRowsSelected(e.target.checked);
|
|
1996
|
-
};
|
|
1997
|
-
};
|
|
1998
|
-
},
|
|
1999
|
-
createRow: (row, table) => {
|
|
2000
|
-
row.toggleSelected = (value, opts) => {
|
|
2001
|
-
const isSelected = row.getIsSelected();
|
|
2002
|
-
table.setRowSelection((old) => {
|
|
2003
|
-
var _opts$selectChildren;
|
|
2004
|
-
value = typeof value !== "undefined" ? value : !isSelected;
|
|
2005
|
-
if (row.getCanSelect() && isSelected === value) return old;
|
|
2006
|
-
const selectedRowIds = _objectSpread2({}, old);
|
|
2007
|
-
mutateRowIsSelected(selectedRowIds, row.id, value, (_opts$selectChildren = opts == null ? void 0 : opts.selectChildren) != null ? _opts$selectChildren : true, table);
|
|
2008
|
-
return selectedRowIds;
|
|
2009
|
-
});
|
|
2010
|
-
};
|
|
2011
|
-
row.getIsSelected = () => {
|
|
2012
|
-
const { rowSelection } = table.getState();
|
|
2013
|
-
return isRowSelected(row, rowSelection);
|
|
2014
|
-
};
|
|
2015
|
-
row.getIsSomeSelected = () => {
|
|
2016
|
-
const { rowSelection } = table.getState();
|
|
2017
|
-
return isSubRowSelected(row, rowSelection) === "some";
|
|
2018
|
-
};
|
|
2019
|
-
row.getIsAllSubRowsSelected = () => {
|
|
2020
|
-
const { rowSelection } = table.getState();
|
|
2021
|
-
return isSubRowSelected(row, rowSelection) === "all";
|
|
2022
|
-
};
|
|
2023
|
-
row.getCanSelect = () => {
|
|
2024
|
-
var _table$options$enable;
|
|
2025
|
-
if (typeof table.options.enableRowSelection === "function") return table.options.enableRowSelection(row);
|
|
2026
|
-
return (_table$options$enable = table.options.enableRowSelection) != null ? _table$options$enable : true;
|
|
2027
|
-
};
|
|
2028
|
-
row.getCanSelectSubRows = () => {
|
|
2029
|
-
var _table$options$enable2;
|
|
2030
|
-
if (typeof table.options.enableSubRowSelection === "function") return table.options.enableSubRowSelection(row);
|
|
2031
|
-
return (_table$options$enable2 = table.options.enableSubRowSelection) != null ? _table$options$enable2 : true;
|
|
2032
|
-
};
|
|
2033
|
-
row.getCanMultiSelect = () => {
|
|
2034
|
-
var _table$options$enable3;
|
|
2035
|
-
if (typeof table.options.enableMultiRowSelection === "function") return table.options.enableMultiRowSelection(row);
|
|
2036
|
-
return (_table$options$enable3 = table.options.enableMultiRowSelection) != null ? _table$options$enable3 : true;
|
|
2037
|
-
};
|
|
2038
|
-
row.getToggleSelectedHandler = () => {
|
|
2039
|
-
const canSelect = row.getCanSelect();
|
|
2040
|
-
return (e) => {
|
|
2041
|
-
var _target;
|
|
2042
|
-
if (!canSelect) return;
|
|
2043
|
-
row.toggleSelected((_target = e.target) == null ? void 0 : _target.checked);
|
|
2044
|
-
};
|
|
2045
|
-
};
|
|
2046
|
-
}
|
|
2047
|
-
};
|
|
2048
|
-
mutateRowIsSelected = (selectedRowIds, id, value, includeChildren, table) => {
|
|
2049
|
-
var _row$subRows;
|
|
2050
|
-
const row = table.getRow(id, true);
|
|
2051
|
-
if (value) {
|
|
2052
|
-
if (!row.getCanMultiSelect()) Object.keys(selectedRowIds).forEach((key) => delete selectedRowIds[key]);
|
|
2053
|
-
if (row.getCanSelect()) selectedRowIds[id] = true;
|
|
2054
|
-
} else delete selectedRowIds[id];
|
|
2055
|
-
if (includeChildren && (_row$subRows = row.subRows) != null && _row$subRows.length && row.getCanSelectSubRows()) row.subRows.forEach((row) => mutateRowIsSelected(selectedRowIds, row.id, value, includeChildren, table));
|
|
2056
|
-
};
|
|
2057
|
-
reSplitAlphaNumeric = /([0-9]+)/gm;
|
|
2058
|
-
alphanumeric = (rowA, rowB, columnId) => {
|
|
2059
|
-
return compareAlphanumeric(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());
|
|
2060
|
-
};
|
|
2061
|
-
alphanumericCaseSensitive = (rowA, rowB, columnId) => {
|
|
2062
|
-
return compareAlphanumeric(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));
|
|
2063
|
-
};
|
|
2064
|
-
text = (rowA, rowB, columnId) => {
|
|
2065
|
-
return compareBasic(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());
|
|
2066
|
-
};
|
|
2067
|
-
textCaseSensitive = (rowA, rowB, columnId) => {
|
|
2068
|
-
return compareBasic(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));
|
|
2069
|
-
};
|
|
2070
|
-
datetime = (rowA, rowB, columnId) => {
|
|
2071
|
-
const a = rowA.getValue(columnId);
|
|
2072
|
-
const b = rowB.getValue(columnId);
|
|
2073
|
-
return a > b ? 1 : a < b ? -1 : 0;
|
|
2074
|
-
};
|
|
2075
|
-
basic = (rowA, rowB, columnId) => {
|
|
2076
|
-
return compareBasic(rowA.getValue(columnId), rowB.getValue(columnId));
|
|
2077
|
-
};
|
|
2078
|
-
sortingFns = {
|
|
2079
|
-
alphanumeric,
|
|
2080
|
-
alphanumericCaseSensitive,
|
|
2081
|
-
text,
|
|
2082
|
-
textCaseSensitive,
|
|
2083
|
-
datetime,
|
|
2084
|
-
basic
|
|
2085
|
-
};
|
|
2086
|
-
RowSorting = {
|
|
2087
|
-
getInitialState: (state) => {
|
|
2088
|
-
return _objectSpread2({ sorting: [] }, state);
|
|
2089
|
-
},
|
|
2090
|
-
getDefaultColumnDef: () => {
|
|
2091
|
-
return {
|
|
2092
|
-
sortingFn: "auto",
|
|
2093
|
-
sortUndefined: 1
|
|
2094
|
-
};
|
|
2095
|
-
},
|
|
2096
|
-
getDefaultOptions: (table) => {
|
|
2097
|
-
return {
|
|
2098
|
-
onSortingChange: makeStateUpdater("sorting", table),
|
|
2099
|
-
isMultiSortEvent: (e) => {
|
|
2100
|
-
return e.shiftKey;
|
|
2101
|
-
}
|
|
2102
|
-
};
|
|
2103
|
-
},
|
|
2104
|
-
createColumn: (column, table) => {
|
|
2105
|
-
column.getAutoSortingFn = () => {
|
|
2106
|
-
const firstRows = table.getFilteredRowModel().flatRows.slice(10);
|
|
2107
|
-
let isString = false;
|
|
2108
|
-
for (const row of firstRows) {
|
|
2109
|
-
const value = row == null ? void 0 : row.getValue(column.id);
|
|
2110
|
-
if (Object.prototype.toString.call(value) === "[object Date]") return sortingFns.datetime;
|
|
2111
|
-
if (typeof value === "string") {
|
|
2112
|
-
isString = true;
|
|
2113
|
-
if (value.split(reSplitAlphaNumeric).length > 1) return sortingFns.alphanumeric;
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
if (isString) return sortingFns.text;
|
|
2117
|
-
return sortingFns.basic;
|
|
2118
|
-
};
|
|
2119
|
-
column.getAutoSortDir = () => {
|
|
2120
|
-
const firstRow = table.getFilteredRowModel().flatRows[0];
|
|
2121
|
-
if (typeof (firstRow == null ? void 0 : firstRow.getValue(column.id)) === "string") return "asc";
|
|
2122
|
-
return "desc";
|
|
2123
|
-
};
|
|
2124
|
-
column.getSortingFn = () => {
|
|
2125
|
-
var _table$options$sortin, _table$options$sortin2;
|
|
2126
|
-
if (!column) throw new Error();
|
|
2127
|
-
return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === "auto" ? column.getAutoSortingFn() : (_table$options$sortin = (_table$options$sortin2 = table.options.sortingFns) == null ? void 0 : _table$options$sortin2[column.columnDef.sortingFn]) != null ? _table$options$sortin : sortingFns[column.columnDef.sortingFn];
|
|
2128
|
-
};
|
|
2129
|
-
column.toggleSorting = (desc, multi) => {
|
|
2130
|
-
const nextSortingOrder = column.getNextSortingOrder();
|
|
2131
|
-
const hasManualValue = typeof desc !== "undefined" && desc !== null;
|
|
2132
|
-
table.setSorting((old) => {
|
|
2133
|
-
const existingSorting = old == null ? void 0 : old.find((d) => d.id === column.id);
|
|
2134
|
-
const existingIndex = old == null ? void 0 : old.findIndex((d) => d.id === column.id);
|
|
2135
|
-
let newSorting = [];
|
|
2136
|
-
let sortAction;
|
|
2137
|
-
let nextDesc = hasManualValue ? desc : nextSortingOrder === "desc";
|
|
2138
|
-
if (old != null && old.length && column.getCanMultiSort() && multi) if (existingSorting) sortAction = "toggle";
|
|
2139
|
-
else sortAction = "add";
|
|
2140
|
-
else if (old != null && old.length && existingIndex !== old.length - 1) sortAction = "replace";
|
|
2141
|
-
else if (existingSorting) sortAction = "toggle";
|
|
2142
|
-
else sortAction = "replace";
|
|
2143
|
-
if (sortAction === "toggle") {
|
|
2144
|
-
if (!hasManualValue) {
|
|
2145
|
-
if (!nextSortingOrder) sortAction = "remove";
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
if (sortAction === "add") {
|
|
2149
|
-
var _table$options$maxMul;
|
|
2150
|
-
newSorting = [...old, {
|
|
2151
|
-
id: column.id,
|
|
2152
|
-
desc: nextDesc
|
|
2153
|
-
}];
|
|
2154
|
-
newSorting.splice(0, newSorting.length - ((_table$options$maxMul = table.options.maxMultiSortColCount) != null ? _table$options$maxMul : Number.MAX_SAFE_INTEGER));
|
|
2155
|
-
} else if (sortAction === "toggle") newSorting = old.map((d) => {
|
|
2156
|
-
if (d.id === column.id) return _objectSpread2(_objectSpread2({}, d), {}, { desc: nextDesc });
|
|
2157
|
-
return d;
|
|
2158
|
-
});
|
|
2159
|
-
else if (sortAction === "remove") newSorting = old.filter((d) => d.id !== column.id);
|
|
2160
|
-
else newSorting = [{
|
|
2161
|
-
id: column.id,
|
|
2162
|
-
desc: nextDesc
|
|
2163
|
-
}];
|
|
2164
|
-
return newSorting;
|
|
2165
|
-
});
|
|
2166
|
-
};
|
|
2167
|
-
column.getFirstSortDir = () => {
|
|
2168
|
-
var _ref, _column$columnDef$sor;
|
|
2169
|
-
return ((_ref = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : table.options.sortDescFirst) != null ? _ref : column.getAutoSortDir() === "desc") ? "desc" : "asc";
|
|
2170
|
-
};
|
|
2171
|
-
column.getNextSortingOrder = (multi) => {
|
|
2172
|
-
var _table$options$enable, _table$options$enable2;
|
|
2173
|
-
const firstSortDirection = column.getFirstSortDir();
|
|
2174
|
-
const isSorted = column.getIsSorted();
|
|
2175
|
-
if (!isSorted) return firstSortDirection;
|
|
2176
|
-
if (isSorted !== firstSortDirection && ((_table$options$enable = table.options.enableSortingRemoval) != null ? _table$options$enable : true) && (multi ? (_table$options$enable2 = table.options.enableMultiRemove) != null ? _table$options$enable2 : true : true)) return false;
|
|
2177
|
-
return isSorted === "desc" ? "asc" : "desc";
|
|
2178
|
-
};
|
|
2179
|
-
column.getCanSort = () => {
|
|
2180
|
-
var _column$columnDef$ena, _table$options$enable3;
|
|
2181
|
-
return ((_column$columnDef$ena = column.columnDef.enableSorting) != null ? _column$columnDef$ena : true) && ((_table$options$enable3 = table.options.enableSorting) != null ? _table$options$enable3 : true) && !!column.accessorFn;
|
|
2182
|
-
};
|
|
2183
|
-
column.getCanMultiSort = () => {
|
|
2184
|
-
var _ref2, _column$columnDef$ena2;
|
|
2185
|
-
return (_ref2 = (_column$columnDef$ena2 = column.columnDef.enableMultiSort) != null ? _column$columnDef$ena2 : table.options.enableMultiSort) != null ? _ref2 : !!column.accessorFn;
|
|
2186
|
-
};
|
|
2187
|
-
column.getIsSorted = () => {
|
|
2188
|
-
var _table$getState$sorti;
|
|
2189
|
-
const columnSort = (_table$getState$sorti = table.getState().sorting) == null ? void 0 : _table$getState$sorti.find((d) => d.id === column.id);
|
|
2190
|
-
return !columnSort ? false : columnSort.desc ? "desc" : "asc";
|
|
2191
|
-
};
|
|
2192
|
-
column.getSortIndex = () => {
|
|
2193
|
-
var _table$getState$sorti2, _table$getState$sorti3;
|
|
2194
|
-
return (_table$getState$sorti2 = (_table$getState$sorti3 = table.getState().sorting) == null ? void 0 : _table$getState$sorti3.findIndex((d) => d.id === column.id)) != null ? _table$getState$sorti2 : -1;
|
|
2195
|
-
};
|
|
2196
|
-
column.clearSorting = () => {
|
|
2197
|
-
table.setSorting((old) => old != null && old.length ? old.filter((d) => d.id !== column.id) : []);
|
|
2198
|
-
};
|
|
2199
|
-
column.getToggleSortingHandler = () => {
|
|
2200
|
-
const canSort = column.getCanSort();
|
|
2201
|
-
return (e) => {
|
|
2202
|
-
if (!canSort) return;
|
|
2203
|
-
e.persist == null || e.persist();
|
|
2204
|
-
column.toggleSorting == null || column.toggleSorting(void 0, column.getCanMultiSort() ? table.options.isMultiSortEvent == null ? void 0 : table.options.isMultiSortEvent(e) : false);
|
|
2205
|
-
};
|
|
2206
|
-
};
|
|
2207
|
-
},
|
|
2208
|
-
createTable: (table) => {
|
|
2209
|
-
table.setSorting = (updater) => table.options.onSortingChange == null ? void 0 : table.options.onSortingChange(updater);
|
|
2210
|
-
table.resetSorting = (defaultState) => {
|
|
2211
|
-
var _table$initialState$s, _table$initialState;
|
|
2212
|
-
table.setSorting(defaultState ? [] : (_table$initialState$s = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.sorting) != null ? _table$initialState$s : []);
|
|
2213
|
-
};
|
|
2214
|
-
table.getPreSortedRowModel = () => table.getGroupedRowModel();
|
|
2215
|
-
table.getSortedRowModel = () => {
|
|
2216
|
-
if (!table._getSortedRowModel && table.options.getSortedRowModel) table._getSortedRowModel = table.options.getSortedRowModel(table);
|
|
2217
|
-
if (table.options.manualSorting || !table._getSortedRowModel) return table.getPreSortedRowModel();
|
|
2218
|
-
return table._getSortedRowModel();
|
|
2219
|
-
};
|
|
2220
|
-
}
|
|
2221
|
-
};
|
|
2222
|
-
builtInFeatures = [
|
|
2223
|
-
Headers,
|
|
2224
|
-
ColumnVisibility,
|
|
2225
|
-
ColumnOrdering,
|
|
2226
|
-
ColumnPinning,
|
|
2227
|
-
ColumnFaceting,
|
|
2228
|
-
ColumnFiltering,
|
|
2229
|
-
GlobalFaceting,
|
|
2230
|
-
GlobalFiltering,
|
|
2231
|
-
RowSorting,
|
|
2232
|
-
ColumnGrouping,
|
|
2233
|
-
RowExpanding,
|
|
2234
|
-
RowPagination,
|
|
2235
|
-
RowPinning,
|
|
2236
|
-
RowSelection,
|
|
2237
|
-
ColumnSizing
|
|
2238
|
-
];
|
|
2239
|
-
}));
|
|
2240
|
-
//#endregion
|
|
2241
|
-
export { init_lib as i, createTable as n, getCoreRowModel as r, createColumnHelper as t };
|