@oj-module/cli 0.2.64 → 0.2.67
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/bin/.oj-version +1 -0
- package/bin/oj +4 -0
- package/devkit/README.md +18 -4
- package/devkit/SKILL.md +35 -3
- package/devkit/framework-dev.md +22 -11
- package/devkit/manual.md +161 -68
- package/devkit/menu-rules.md +4 -1
- package/devkit/publish-walkthrough.md +110 -37
- package/devkit/wecom-internal-app.md +7 -2
- package/devkit/wecom-multi-corp-links.md +163 -0
- package/package.json +3 -2
- package/shell-dist/assets/ahooks.2l850ymmh0.js +18 -0
- package/shell-dist/assets/antd-es-locale-zh_CN.1gjjsvxbf0.js +1 -0
- package/shell-dist/assets/antd-img-crop.196rkty480.js +99 -0
- package/shell-dist/assets/antd-locale-en_US.561tozx860.js +1 -0
- package/shell-dist/assets/antd-locale-zh_CN.1cmpmgzh70.js +1 -0
- package/shell-dist/assets/antd.uw1coq15l0.js +348 -0
- package/shell-dist/assets/clsx.jotilrt2e0.js +1 -0
- package/shell-dist/assets/contract-errors.2o17vz9u50.js +1 -0
- package/shell-dist/assets/contract.3h327o3mj0.js +57 -0
- package/shell-dist/assets/cssinjs.atgmhan7m0.js +3 -0
- package/shell-dist/assets/dayjs-plugin-advancedFormat.3vsyd2eis0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-customParseFormat.13xhghv1d0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-isoWeek.1fn1tw82p0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-localeData.2rwbjp9nk0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-quarterOfYear.2oqo1lcx80.js +1 -0
- package/shell-dist/assets/dayjs-plugin-relativeTime.2pqs3et4y0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekOfYear.gvn9iph080.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekYear.2u78l3ex10.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekday.2d56a4tml0.js +1 -0
- package/shell-dist/assets/dayjs.pa60l6wjo0.js +1 -0
- package/shell-dist/assets/dnd-kit-core.1xyreig6r0.js +5 -0
- package/shell-dist/assets/dnd-kit-sortable.s94qciuft0.js +1 -0
- package/shell-dist/assets/dnd-kit-utilities.1umw4xphb0.js +1 -0
- package/shell-dist/assets/i18next.33zqofapj0.js +1 -0
- package/shell-dist/assets/icons-es-components-Context.365qmflwg0.js +1 -0
- package/shell-dist/assets/icons.159wjwals0.js +57 -0
- package/shell-dist/assets/{index-xZhmujjM.js → index.6alqyx6ae0.js} +21 -1
- package/shell-dist/assets/jsx-dev-runtime.3uibuc82f0.js +14 -0
- package/shell-dist/assets/jsx-runtime.h40xu4o5b0.js +14 -0
- package/shell-dist/assets/keepalive-for-react.xenu5vam70.js +1 -0
- package/shell-dist/assets/kit.37kr8ui390.js +1 -0
- package/shell-dist/assets/ky.1cgch7gu60.js +6 -0
- package/shell-dist/assets/motion-react.pjsxytvjs0.js +12 -0
- package/shell-dist/assets/motion.21tciqutg0.js +4 -0
- package/shell-dist/assets/nprogress.2nz76n9ny0.js +7 -0
- package/shell-dist/assets/ojm-dayjs-locale-zh-cn.3vr3beiyp0.js +9 -0
- package/shell-dist/assets/pinyin-pro.3v0mnxczn0.js +1 -0
- package/shell-dist/assets/pro-components.2kyot1vcl0.js +83 -0
- package/shell-dist/assets/react-countup.2x8idnr8y0.js +10 -0
- package/shell-dist/assets/react-dom-client.ick0v05ob0.js +43 -0
- package/shell-dist/assets/react-dom.2so9uxg3f0.js +22 -0
- package/shell-dist/assets/react-error-boundary.2dncdfj3b0.js +1 -0
- package/shell-dist/assets/react-i18next.auhvjhqv00.js +1 -0
- package/shell-dist/assets/react-jss.1ei6dr9e00.js +29 -0
- package/shell-dist/assets/react-query.3rln45ow00.js +1 -0
- package/shell-dist/assets/react-router-dom.3c6zld8h40.js +44 -0
- package/shell-dist/assets/react-router.2h9rebcv50.js +56 -0
- package/shell-dist/assets/react.1ew63mwts0.js +14 -0
- package/shell-dist/assets/runtime.2dgstpjsu0.js +21702 -0
- package/shell-dist/assets/simplebar-react.2g739uvai0.js +1 -0
- package/shell-dist/assets/spin-delay.yjeyj6iwp0.js +9 -0
- package/shell-dist/assets/tailwind-merge.125ehiqjw0.js +1 -0
- package/shell-dist/assets/use-sync-external-store-shim.1nz1pi9bb0.js +22 -0
- package/shell-dist/assets/zustand-middleware.1xaxjueme0.js +6 -0
- package/shell-dist/assets/zustand-react-shallow.pybayv1hx0.js +1 -0
- package/shell-dist/assets/zustand-react.9fsl9brxy0.js +1 -0
- package/shell-dist/assets/zustand-shallow.6cz0yyv9x0.js +1 -0
- package/shell-dist/assets/zustand-vanilla-shallow.3424monv50.js +1 -0
- package/shell-dist/assets/zustand-vanilla.1mo3ka3g30.js +1 -0
- package/shell-dist/assets/zustand.3gjgzlnqo0.js +1 -0
- package/shell-dist/index.html +67 -118
- package/shell-dist/versions.json +3 -3
- package/src/__tests__/publish-keygen.test.ts +157 -0
- package/src/__tests__/templates-migration-schema-parity.test.ts +540 -0
- package/src/__tests__/templates-schema-columns.test.ts +15 -2
- package/src/__tests__/templates-tenant-scope.test.ts +6 -2
- package/src/bundle.ts +8 -3
- package/src/cli.ts +17 -5
- package/src/dev.ts +15 -10
- package/src/esm-exports.ts +152 -70
- package/src/install.ts +11 -4
- package/src/keygen.ts +54 -0
- package/src/lifecycle/__tests__/bundle.test.ts +21 -3
- package/src/lifecycle/__tests__/fixtures/fixture-valid/api/src/demo-solution/manifest.yaml +1 -1
- package/src/lifecycle/__tests__/fixtures/fixture-valid/api/src/demo-solution/migrations/0001__init.sql +2 -2
- package/src/lifecycle/__tests__/fixtures/fixture-valid/api/src/demo-solution/schema.yaml +5 -2
- package/src/lifecycle/__tests__/fixtures/fixture-valid/manifest.yaml +1 -1
- package/src/lifecycle/__tests__/manifest-contract.test.ts +75 -3
- package/src/lifecycle/__tests__/smoke.test.ts +2 -2
- package/src/manifest-contract.ts +91 -8
- package/src/market/bootstrap.ts +26 -2
- package/src/market/command.ts +1 -0
- package/src/market/publish.ts +5 -1
- package/src/market/walkthrough.ts +24 -8
- package/src/shared-deps.ts +69 -19
- package/src/site-base.ts +4 -0
- package/src/site.ts +2 -0
- package/src/usage.ts +8 -4
- package/src/vendor.ts +5 -1
- package/templates/config.yaml +4 -2
- package/templates/init.include.yaml +8 -3
- package/templates/openapi.json +460 -1
- package/templates/src/app/api/_platform/_lifecycle/compensate.ts +136 -0
- package/templates/src/app/api/_platform/_lifecycle/installer.ts +71 -22
- package/templates/src/app/api/_platform/_lifecycle/lock.ts +23 -0
- package/templates/src/app/api/_platform/_lifecycle/steps/deploy-web.ts +28 -0
- package/templates/src/app/api/_platform/_lifecycle/steps/preflight.ts +46 -0
- package/templates/src/app/api/_platform/_lifecycle/steps/reload.ts +100 -36
- package/templates/src/app/api/_platform/_lifecycle/steps/smoke.ts +7 -15
- package/templates/src/app/api/_platform/_lifecycle/text-edit.ts +71 -19
- package/templates/src/app/api/_platform/_lifecycle/types.ts +26 -2
- package/templates/src/app/api/_platform/_lifecycle/uninstall.ts +93 -14
- package/templates/src/app/api/_platform/_shared/service/domain/settings.ts +8 -4
- package/templates/src/app/api/_platform/manifest.yaml +1 -0
- package/templates/src/app/api/_platform/market/api.ts +235 -10
- package/templates/src/app/api/_platform/migrations/0001__baseline.mysql.sql +178 -0
- package/templates/src/app/api/_platform/migrations/0001__baseline.pg.sql +173 -0
- package/templates/src/app/api/_platform/migrations/0001__baseline.sql +188 -0
- package/templates/src/app/api/_platform/migrations/0002__market_release.mysql.sql +17 -0
- package/templates/src/app/api/_platform/migrations/0002__market_release.pg.sql +16 -0
- package/templates/src/app/api/_platform/migrations/0002__market_release.sql +33 -0
- package/templates/src/app/api/_platform/schema.yaml +18 -0
- package/templates/src/app/api/_platform/seed.mysql.sql +10 -0
- package/templates/src/app/api/_platform/seed.pg.sql +10 -0
- package/templates/src/app/api/auth/_shared/wecom/client.ts +24 -4
- package/templates/src/app/api/home/migrations/0001__create_home_tables.mysql.sql +14 -0
- package/templates/src/app/api/home/migrations/0001__create_home_tables.pg.sql +14 -0
- package/templates/src/app/api/home/migrations/0002__tenant.pg.sql +4 -0
- package/templates/src/app/api/home/seed.mysql.sql +71 -0
- package/templates/src/app/api/home/seed.pg.sql +71 -0
- package/templates/src/app/api/notification/_shared/notify.ts +6 -6
- package/templates/src/app/api/notification/migrations/0001__create_notifications.mysql.sql +11 -0
- package/templates/src/app/api/notification/migrations/0001__create_notifications.pg.sql +11 -0
- package/templates/src/app/api/notification/migrations/0002__notifications_user.mysql.sql +8 -0
- package/templates/src/app/api/notification/migrations/0003__notifications_broadcast.mysql.sql +21 -0
- package/templates/src/app/api/notification/migrations/0003__notifications_broadcast.pg.sql +22 -0
- package/templates/src/app/api/notification/migrations/0004__notifications_broadcast_hidden.mysql.sql +10 -0
- package/templates/src/app/api/notification/migrations/0004__notifications_broadcast_hidden.pg.sql +11 -0
- package/templates/src/app/api/notification/migrations/0005__tenant.pg.sql +6 -0
- package/templates/src/app/api/notification/seed.mysql.sql +8 -0
- package/templates/src/app/api/notification/seed.pg.sql +11 -0
- package/templates/src/app/api/publish/_shared/identity.ts +69 -0
- package/templates/src/app/api/publish/api.ts +349 -0
- package/templates/src/app/api/publish/manifest.yaml +8 -0
- package/templates/src/app/api/publish/migrations/0001__publish_credential.mysql.sql +23 -0
- package/templates/src/app/api/publish/migrations/0001__publish_credential.pg.sql +23 -0
- package/templates/src/app/api/publish/migrations/0001__publish_credential.sql +39 -0
- package/templates/src/app/api/publish/schema.yaml +33 -0
- package/templates/src/app/api/system/login-methods/api.ts +2 -1
- package/templates/src/app/web/_platform/__client/api.schemas.ts +15 -0
- package/templates/src/app/web/_platform/__client/index.ts +25 -1
- package/templates/src/app/web/entry.ts +9 -5
- package/templates/src/app/web/home/pages/components/bar-chart.tsx +5 -3
- package/templates/src/app/web/home/pages/components/echarts-setup.ts +30 -0
- package/templates/src/app/web/home/pages/components/line-chart.tsx +5 -3
- package/templates/src/app/web/home/pages/components/pie-chart.tsx +6 -3
- package/templates/src/app/web/home/pages/index.tsx +3 -2
- package/templates/src/app/web/home/routes.ts +8 -2
- package/templates/src/app/web/login/locales/en-US.json +7 -1
- package/templates/src/app/web/login/locales/zh-CN.json +7 -1
- package/templates/src/app/web/login/pages/login.tsx +79 -86
- package/templates/src/app/web/login/routes.ts +54 -1
- package/templates/src/app/web/personal-center/locales/en-US.json +1 -0
- package/templates/src/app/web/personal-center/locales/zh-CN.json +1 -0
- package/templates/src/app/web/personal-center/pages/my-profile/index.tsx +5 -0
- package/templates/src/app/web/system/__client/api.schemas.ts +2 -1
- package/templates/src/app/web/system/locales/en-US.json +1 -8
- package/templates/src/app/web/system/locales/zh-CN.json +1 -8
- package/templates/src/app/web/system/pages/settings/index.tsx +17 -4
- package/templates/src/app/web/system/routes.ts +0 -6
- package/templates/src/oj-market/web/__tests__/CardGrid.test.tsx +33 -0
- package/templates/src/oj-market/web/__tests__/DetailDrawer.test.tsx +69 -0
- package/templates/src/oj-market/web/__tests__/marketClient.fake.ts +7 -1
- package/templates/src/oj-market/web/api/client.ts +3 -0
- package/templates/src/oj-market/web/api/defaultClient.ts +5 -0
- package/templates/src/oj-market/web/components/CardItem.tsx +44 -1
- package/templates/src/oj-market/web/components/DetailDrawer.tsx +17 -1
- package/templates/src/oj-market/web/entry.ts +31 -2
- package/templates/src/oj-market/web/locales/en-US.json +5 -1
- package/templates/src/oj-market/web/locales/zh-CN.json +5 -1
- package/templates/src/oj-market/web/publish/__client/api.schemas.ts +61 -0
- package/templates/src/oj-market/web/publish/__client/index.ts +164 -0
- package/templates/src/oj-market/web/publish/locales/en-US.json +80 -0
- package/templates/src/oj-market/web/publish/locales/zh-CN.json +80 -0
- package/templates/src/oj-market/web/publish/pages/history.tsx +112 -0
- package/templates/src/oj-market/web/publish/pages/index.tsx +196 -0
- package/templates/src/oj-market/web/publish/pages/model.ts +52 -0
- package/templates/src/oj-market/web/publish/pages/token-modal.tsx +82 -0
- package/templates/src/oj-market/web/publish/routes.ts +41 -0
- package/templates/src/oj-market/web/types.ts +30 -0
- package/templates/tests/lifecycle/compensate.spec.ts +207 -0
- package/templates/tests/lifecycle/deploy-smoke.spec.ts +38 -14
- package/templates/tests/lifecycle/installer.spec.ts +28 -9
- package/templates/tests/lifecycle/market-api.spec.ts +164 -12
- package/templates/tests/lifecycle/preflight.spec.ts +68 -0
- package/templates/tests/lifecycle/role-title-translate.spec.ts +2 -32
- package/templates/tests/lifecycle/text-edit.spec.ts +45 -27
- package/templates/tests/lifecycle/uninstall.spec.ts +36 -0
- package/templates/tests/publish-credential.spec.ts +354 -0
- package/templates/tests/publish-identity.spec.ts +44 -0
- package/templates/tests/wecom-client-timeout.spec.ts +33 -3
- package/templates/tests/wecom-landing.spec.ts +63 -1
- package/templates/tsconfig.paths.json +1 -0
- package/templates/web.config.ts +6 -4
- package/vendor/host-versions.json +3 -3
- package/shell-dist/assets/ahooks.js +0 -6909
- package/shell-dist/assets/antd-es-locale-zh_CN.js +0 -257
- package/shell-dist/assets/antd-img-crop.js +0 -1495
- package/shell-dist/assets/antd-locale-en_US.js +0 -374
- package/shell-dist/assets/antd-locale-zh_CN.js +0 -379
- package/shell-dist/assets/antd.js +0 -106874
- package/shell-dist/assets/clsx.js +0 -33
- package/shell-dist/assets/contract-errors.js +0 -30
- package/shell-dist/assets/contract.js +0 -18900
- package/shell-dist/assets/cssinjs.js +0 -2595
- package/shell-dist/assets/dayjs-plugin-advancedFormat.js +0 -98
- package/shell-dist/assets/dayjs-plugin-customParseFormat.js +0 -173
- package/shell-dist/assets/dayjs-plugin-isoWeek.js +0 -77
- package/shell-dist/assets/dayjs-plugin-localeData.js +0 -126
- package/shell-dist/assets/dayjs-plugin-quarterOfYear.js +0 -77
- package/shell-dist/assets/dayjs-plugin-relativeTime.js +0 -92
- package/shell-dist/assets/dayjs-plugin-weekOfYear.js +0 -73
- package/shell-dist/assets/dayjs-plugin-weekYear.js +0 -63
- package/shell-dist/assets/dayjs-plugin-weekday.js +0 -63
- package/shell-dist/assets/dayjs.js +0 -326
- package/shell-dist/assets/dnd-kit-core.js +0 -3601
- package/shell-dist/assets/dnd-kit-sortable.js +0 -717
- package/shell-dist/assets/dnd-kit-utilities.js +0 -340
- package/shell-dist/assets/i18next.js +0 -2321
- package/shell-dist/assets/icons-es-components-Context.js +0 -20
- package/shell-dist/assets/icons.js +0 -34961
- package/shell-dist/assets/jsx-dev-runtime.js +0 -75
- package/shell-dist/assets/jsx-runtime.js +0 -97
- package/shell-dist/assets/keepalive-for-react.js +0 -283
- package/shell-dist/assets/kit.js +0 -151
- package/shell-dist/assets/ky.js +0 -1427
- package/shell-dist/assets/motion-react.js +0 -13589
- package/shell-dist/assets/motion.js +0 -9959
- package/shell-dist/assets/nprogress.js +0 -314
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-BarsOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CalendarOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretUpOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ClockCircleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CopyOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DeleteOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleLeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownloadOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EditOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EllipsisOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EnterOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ExclamationCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeInvisibleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileTextOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FilterFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOpenOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-HolderOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-InfoCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-LeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-LoadingOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusSquareOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PaperClipOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PictureOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusSquareOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-QuestionCircleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ReloadOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateLeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SearchOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-StarFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-UpOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-VerticalAlignTopOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-WarningFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomInOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomOutOutlined.js +0 -7
- package/shell-dist/assets/ojm-dayjs-locale-zh-cn.js +0 -81
- package/shell-dist/assets/pinyin-pro.js +0 -25175
- package/shell-dist/assets/pro-components.js +0 -44627
- package/shell-dist/assets/react-countup.js +0 -525
- package/shell-dist/assets/react-dom-client.js +0 -12134
- package/shell-dist/assets/react-dom.js +0 -266
- package/shell-dist/assets/react-error-boundary.js +0 -141
- package/shell-dist/assets/react-i18next.js +0 -1773
- package/shell-dist/assets/react-jss.js +0 -4089
- package/shell-dist/assets/react-query.js +0 -3072
- package/shell-dist/assets/react-router-dom.js +0 -9927
- package/shell-dist/assets/react-router.js +0 -14584
- package/shell-dist/assets/react.js +0 -590
- package/shell-dist/assets/runtime.js +0 -28311
- package/shell-dist/assets/simplebar-react.js +0 -1119
- package/shell-dist/assets/spin-delay.js +0 -111
- package/shell-dist/assets/tailwind-merge.js +0 -3364
- package/shell-dist/assets/use-sync-external-store-shim.js +0 -130
- package/shell-dist/assets/zustand-middleware.js +0 -513
- package/shell-dist/assets/zustand-react-shallow.js +0 -27
- package/shell-dist/assets/zustand-react.js +0 -39
- package/shell-dist/assets/zustand-shallow.js +0 -22
- package/shell-dist/assets/zustand-vanilla-shallow.js +0 -71
- package/shell-dist/assets/zustand-vanilla.js +0 -40
- package/shell-dist/assets/zustand.js +0 -32
- package/templates/seed.mysql.sql +0 -6
- package/templates/seed.pg.sql +0 -6
- package/templates/src/app/api/_platform/migrations/0001__create_users.mysql.sql +0 -9
- package/templates/src/app/api/_platform/migrations/0001__create_users.pg.sql +0 -9
- package/templates/src/app/api/_platform/migrations/0001__create_users.sql +0 -7
- package/templates/src/app/api/_platform/migrations/0002__add_users_avatar_base64.mysql.sql +0 -3
- package/templates/src/app/api/_platform/migrations/0002__add_users_avatar_base64.sql +0 -2
- package/templates/src/app/api/_platform/migrations/0003__users_source_display_name.mysql.sql +0 -5
- package/templates/src/app/api/_platform/migrations/0003__users_source_display_name.sql +0 -5
- package/templates/src/app/api/_platform/migrations/0004__sys_rbac.mysql.sql +0 -70
- package/templates/src/app/api/_platform/migrations/0004__sys_rbac.pg.sql +0 -67
- package/templates/src/app/api/_platform/migrations/0004__sys_rbac.sql +0 -67
- package/templates/src/app/api/_platform/migrations/0005__users_must_change.mysql.sql +0 -3
- package/templates/src/app/api/_platform/migrations/0005__users_must_change.sql +0 -2
- package/templates/src/app/api/_platform/migrations/0006__users_is_forbidden.mysql.sql +0 -3
- package/templates/src/app/api/_platform/migrations/0006__users_is_forbidden.sql +0 -3
- package/templates/src/app/api/_platform/migrations/0007__users_email.sql +0 -3
- package/templates/src/app/api/_platform/migrations/0008__sys_refresh_token.mysql.sql +0 -10
- package/templates/src/app/api/_platform/migrations/0008__sys_refresh_token.pg.sql +0 -10
- package/templates/src/app/api/_platform/migrations/0008__sys_refresh_token.sql +0 -11
- package/templates/src/app/api/_platform/migrations/0009__sys_throttle.mysql.sql +0 -12
- package/templates/src/app/api/_platform/migrations/0009__sys_throttle.pg.sql +0 -12
- package/templates/src/app/api/_platform/migrations/0009__sys_throttle.sql +0 -13
- package/templates/src/app/api/_platform/migrations/0010__sys_solution_route.mysql.sql +0 -17
- package/templates/src/app/api/_platform/migrations/0010__sys_solution_route.pg.sql +0 -16
- package/templates/src/app/api/_platform/migrations/0010__sys_solution_route.sql +0 -18
- package/templates/src/app/api/_platform/migrations/0011__sys_setting_group_label.mysql.sql +0 -2
- package/templates/src/app/api/_platform/migrations/0011__sys_setting_group_label.sql +0 -4
- package/templates/src/app/api/_platform/migrations/0012__market_history.mysql.sql +0 -13
- package/templates/src/app/api/_platform/migrations/0012__market_history.pg.sql +0 -12
- package/templates/src/app/api/_platform/migrations/0012__market_history.sql +0 -14
- package/templates/src/app/api/_platform/migrations/0013__users_profile.sql +0 -4
- package/templates/src/app/api/_platform/migrations/0014__reg_source_seq.mysql.sql +0 -9
- package/templates/src/app/api/_platform/migrations/0014__reg_source_seq.pg.sql +0 -7
- package/templates/src/app/api/_platform/migrations/0014__reg_source_seq.sql +0 -8
- package/templates/src/app/api/_platform/migrations/0015__tenant.mysql.sql +0 -12
- package/templates/src/app/api/_platform/migrations/0015__tenant.pg.sql +0 -11
- package/templates/src/app/api/_platform/migrations/0015__tenant.sql +0 -44
- package/templates/src/app/api/_platform/migrations/0016__org.mysql.sql +0 -41
- package/templates/src/app/api/_platform/migrations/0016__org.pg.sql +0 -40
- package/templates/src/app/api/_platform/migrations/0016__org.sql +0 -62
- package/templates/src/app/api/_platform/migrations/0017__users_employee_no.mysql.sql +0 -7
- package/templates/src/app/api/_platform/migrations/0017__users_employee_no.pg.sql +0 -4
- package/templates/src/app/api/_platform/migrations/0017__users_employee_no.sql +0 -8
- package/templates/src/app/api/_platform/migrations/0018__sys_role_title_key.mysql.sql +0 -3
- package/templates/src/app/api/_platform/migrations/0018__sys_role_title_key.pg.sql +0 -3
- package/templates/src/app/api/_platform/migrations/0018__sys_role_title_key.sql +0 -8
- package/templates/src/app/web/system/pages/login-methods/index.tsx +0 -30
- /package/shell-dist/assets/{nprogress-css.js → nprogress-css.1cq2pzkre0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-button.js → ojm-antd-es-button.2uriphio50.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-modal.js → ojm-antd-es-modal.bf3tgdh8v0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-slider.js → ojm-antd-es-slider.xyvptuhid0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-upload.js → ojm-antd-es-upload.13gx45e0g0.js} +0 -0
|
@@ -1,525 +0,0 @@
|
|
|
1
|
-
import * as __rad_ext_0 from "react";
|
|
2
|
-
var __rad_require = {
|
|
3
|
-
"react": __rad_ext_0
|
|
4
|
-
};
|
|
5
|
-
var require = function (id) {
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(__rad_require, id)) return __rad_require[id];
|
|
7
|
-
throw new Error("Dynamic require of " + JSON.stringify(id) + " is not supported(该说明符未在共享表内登记)");
|
|
8
|
-
};
|
|
9
|
-
var __create = Object.create;
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
16
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
17
|
-
}) : x)(function(x) {
|
|
18
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
19
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
20
|
-
});
|
|
21
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
22
|
-
try {
|
|
23
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
24
|
-
} catch (e) {
|
|
25
|
-
throw mod = 0, e;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var __copyProps = (to, from, except, desc) => {
|
|
29
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
-
for (let key of __getOwnPropNames(from))
|
|
31
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
-
}
|
|
34
|
-
return to;
|
|
35
|
-
};
|
|
36
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
37
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
38
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
39
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
40
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
41
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
42
|
-
mod
|
|
43
|
-
));
|
|
44
|
-
|
|
45
|
-
// ../../node_modules/.pnpm/countup.js@2.10.1/node_modules/countup.js/dist/countUp.umd.js
|
|
46
|
-
var require_countUp_umd = __commonJS({
|
|
47
|
-
"../../node_modules/.pnpm/countup.js@2.10.1/node_modules/countup.js/dist/countUp.umd.js"(exports, module) {
|
|
48
|
-
!(function(t, i) {
|
|
49
|
-
"object" == typeof exports && "undefined" != typeof module ? i(exports) : "function" == typeof define && define.amd ? define(["exports"], i) : i((t = "undefined" != typeof globalThis ? globalThis : t || self).countUp = {});
|
|
50
|
-
})(exports, (function(t) {
|
|
51
|
-
"use strict";
|
|
52
|
-
var i = function() {
|
|
53
|
-
return i = Object.assign || function(t2) {
|
|
54
|
-
for (var i2, e2 = 1, s = arguments.length; e2 < s; e2++) for (var n in i2 = arguments[e2]) Object.prototype.hasOwnProperty.call(i2, n) && (t2[n] = i2[n]);
|
|
55
|
-
return t2;
|
|
56
|
-
}, i.apply(this, arguments);
|
|
57
|
-
}, e = (function() {
|
|
58
|
-
function t2(t3, e2, s) {
|
|
59
|
-
var n = this;
|
|
60
|
-
this.endVal = e2, this.options = s, this.version = "2.10.1", this.defaults = { startVal: 0, decimalPlaces: 0, duration: 2, useEasing: true, useGrouping: true, useIndianSeparators: false, smartEasingThreshold: 999, smartEasingAmount: 333, separator: ",", decimal: ".", prefix: "", suffix: "", autoAnimate: false, autoAnimateDelay: 200, autoAnimateOnce: false }, this.finalEndVal = null, this.useEasing = true, this.countDown = false, this.error = "", this.startVal = 0, this.paused = true, this.once = false, this.count = function(t4) {
|
|
61
|
-
n.startTime || (n.startTime = t4);
|
|
62
|
-
var i2 = t4 - n.startTime;
|
|
63
|
-
n.remaining = n.duration - i2, n.useEasing ? n.countDown ? n.frameVal = n.startVal - n.easingFn(i2, 0, n.startVal - n.endVal, n.duration) : n.frameVal = n.easingFn(i2, n.startVal, n.endVal - n.startVal, n.duration) : n.frameVal = n.startVal + (n.endVal - n.startVal) * (i2 / n.duration);
|
|
64
|
-
var e3 = n.countDown ? n.frameVal < n.endVal : n.frameVal > n.endVal;
|
|
65
|
-
n.frameVal = e3 ? n.endVal : n.frameVal, n.frameVal = Number(n.frameVal.toFixed(n.options.decimalPlaces)), n.printValue(n.frameVal), i2 < n.duration ? n.rAF = requestAnimationFrame(n.count) : null !== n.finalEndVal ? n.update(n.finalEndVal) : n.options.onCompleteCallback && n.options.onCompleteCallback();
|
|
66
|
-
}, this.formatNumber = function(t4) {
|
|
67
|
-
var i2, e3, s2, a, o = t4 < 0 ? "-" : "";
|
|
68
|
-
i2 = Math.abs(t4).toFixed(n.options.decimalPlaces);
|
|
69
|
-
var r = (i2 += "").split(".");
|
|
70
|
-
if (e3 = r[0], s2 = r.length > 1 ? n.options.decimal + r[1] : "", n.options.useGrouping) {
|
|
71
|
-
a = "";
|
|
72
|
-
for (var l = 3, u = 0, h = 0, p = e3.length; h < p; ++h) n.options.useIndianSeparators && 4 === h && (l = 2, u = 1), 0 !== h && u % l == 0 && (a = n.options.separator + a), u++, a = e3[p - h - 1] + a;
|
|
73
|
-
e3 = a;
|
|
74
|
-
}
|
|
75
|
-
return n.options.numerals && n.options.numerals.length && (e3 = e3.replace(/[0-9]/g, (function(t5) {
|
|
76
|
-
return n.options.numerals[+t5];
|
|
77
|
-
})), s2 = s2.replace(/[0-9]/g, (function(t5) {
|
|
78
|
-
return n.options.numerals[+t5];
|
|
79
|
-
}))), o + n.options.prefix + e3 + s2 + n.options.suffix;
|
|
80
|
-
}, this.easeOutExpo = function(t4, i2, e3, s2) {
|
|
81
|
-
return e3 * (1 - Math.pow(2, -10 * t4 / s2)) * 1024 / 1023 + i2;
|
|
82
|
-
}, this.options = i(i({}, this.defaults), s), this.options.enableScrollSpy && (this.options.autoAnimate = true), void 0 !== this.options.scrollSpyDelay && (this.options.autoAnimateDelay = this.options.scrollSpyDelay), this.options.scrollSpyOnce && (this.options.autoAnimateOnce = true), this.formattingFn = this.options.formattingFn ? this.options.formattingFn : this.formatNumber, this.easingFn = this.options.easingFn ? this.options.easingFn : this.easeOutExpo, this.el = "string" == typeof t3 ? document.getElementById(t3) : t3, e2 = null == e2 ? this.parse(this.el.innerHTML) : e2, this.startVal = this.validateValue(this.options.startVal), this.frameVal = this.startVal, this.endVal = this.validateValue(e2), this.options.decimalPlaces = Math.max(this.options.decimalPlaces), this.resetDuration(), this.options.separator = String(this.options.separator), this.useEasing = this.options.useEasing, "" === this.options.separator && (this.options.useGrouping = false), this.el ? this.printValue(this.startVal) : this.error = "[CountUp] target is null or undefined", "undefined" != typeof window && this.options.autoAnimate && (this.error || "undefined" == typeof IntersectionObserver ? this.error ? console.error(this.error, t3) : console.error("IntersectionObserver is not supported by this browser") : this.setupObserver());
|
|
83
|
-
}
|
|
84
|
-
return t2.prototype.setupObserver = function() {
|
|
85
|
-
var i2 = this, e2 = t2.observedElements.get(this.el);
|
|
86
|
-
e2 && e2.unobserve(), t2.observedElements.set(this.el, this), this.observer = new IntersectionObserver((function(t3) {
|
|
87
|
-
for (var e3 = 0, s = t3; e3 < s.length; e3++) {
|
|
88
|
-
var n = s[e3];
|
|
89
|
-
n.isIntersecting && i2.paused && !i2.once ? (i2.paused = false, i2.autoAnimateTimeout = setTimeout((function() {
|
|
90
|
-
return i2.start();
|
|
91
|
-
}), i2.options.autoAnimateDelay), i2.options.autoAnimateOnce && (i2.once = true, i2.observer.disconnect())) : n.isIntersecting || i2.paused || (clearTimeout(i2.autoAnimateTimeout), i2.reset());
|
|
92
|
-
}
|
|
93
|
-
}), { threshold: 0 }), this.observer.observe(this.el);
|
|
94
|
-
}, t2.prototype.unobserve = function() {
|
|
95
|
-
var i2;
|
|
96
|
-
clearTimeout(this.autoAnimateTimeout), null === (i2 = this.observer) || void 0 === i2 || i2.disconnect(), t2.observedElements.delete(this.el);
|
|
97
|
-
}, t2.prototype.onDestroy = function() {
|
|
98
|
-
clearTimeout(this.autoAnimateTimeout), cancelAnimationFrame(this.rAF), this.paused = true, this.unobserve(), this.options.onCompleteCallback = null, this.options.onStartCallback = null;
|
|
99
|
-
}, t2.prototype.determineDirectionAndSmartEasing = function() {
|
|
100
|
-
var t3 = null !== this.finalEndVal ? this.finalEndVal : this.endVal;
|
|
101
|
-
this.countDown = this.startVal > t3;
|
|
102
|
-
var i2 = t3 - this.startVal;
|
|
103
|
-
if (Math.abs(i2) > this.options.smartEasingThreshold && this.options.useEasing) {
|
|
104
|
-
this.finalEndVal = t3;
|
|
105
|
-
var e2 = this.countDown ? 1 : -1;
|
|
106
|
-
this.endVal = t3 + e2 * this.options.smartEasingAmount, this.duration = this.duration / 2;
|
|
107
|
-
} else this.endVal = t3, this.finalEndVal = null;
|
|
108
|
-
null !== this.finalEndVal ? this.useEasing = false : this.useEasing = this.options.useEasing;
|
|
109
|
-
}, t2.prototype.start = function(t3) {
|
|
110
|
-
this.error || (this.options.onStartCallback && this.options.onStartCallback(), t3 && (this.options.onCompleteCallback = t3), this.duration > 0 ? (this.determineDirectionAndSmartEasing(), this.paused = false, this.rAF = requestAnimationFrame(this.count)) : this.printValue(this.endVal));
|
|
111
|
-
}, t2.prototype.pauseResume = function() {
|
|
112
|
-
if (this.paused) this.startTime = null, this.duration = this.remaining, this.startVal = this.frameVal, this.determineDirectionAndSmartEasing(), this.rAF = requestAnimationFrame(this.count);
|
|
113
|
-
else {
|
|
114
|
-
cancelAnimationFrame(this.rAF);
|
|
115
|
-
var t3 = null !== this.finalEndVal ? this.duration + this.remaining : this.remaining;
|
|
116
|
-
this.remaining = t3;
|
|
117
|
-
}
|
|
118
|
-
this.paused = !this.paused;
|
|
119
|
-
}, t2.prototype.reset = function() {
|
|
120
|
-
clearTimeout(this.autoAnimateTimeout), cancelAnimationFrame(this.rAF), this.paused = true, this.once = false, this.resetDuration(), this.startVal = this.validateValue(this.options.startVal), this.frameVal = this.startVal, this.printValue(this.startVal);
|
|
121
|
-
}, t2.prototype.update = function(t3) {
|
|
122
|
-
cancelAnimationFrame(this.rAF), this.startTime = null, this.endVal = this.validateValue(t3), this.endVal !== this.frameVal && (this.startVal = this.frameVal, null == this.finalEndVal && this.resetDuration(), this.finalEndVal = null, this.determineDirectionAndSmartEasing(), this.rAF = requestAnimationFrame(this.count));
|
|
123
|
-
}, t2.prototype.printValue = function(t3) {
|
|
124
|
-
var i2;
|
|
125
|
-
if (this.el) {
|
|
126
|
-
var e2 = this.formattingFn(t3);
|
|
127
|
-
if (null === (i2 = this.options.plugin) || void 0 === i2 ? void 0 : i2.render) this.options.plugin.render(this.el, e2);
|
|
128
|
-
else if ("INPUT" === this.el.tagName) this.el.value = e2;
|
|
129
|
-
else "text" === this.el.tagName || "tspan" === this.el.tagName ? this.el.textContent = e2 : this.el.innerHTML = e2;
|
|
130
|
-
}
|
|
131
|
-
}, t2.prototype.ensureNumber = function(t3) {
|
|
132
|
-
return "number" == typeof t3 && !isNaN(t3);
|
|
133
|
-
}, t2.prototype.validateValue = function(t3) {
|
|
134
|
-
var i2 = Number(t3);
|
|
135
|
-
return this.ensureNumber(i2) ? i2 : (this.error = "[CountUp] invalid start or end value: ".concat(t3), null);
|
|
136
|
-
}, t2.prototype.resetDuration = function() {
|
|
137
|
-
this.startTime = null, this.duration = 1e3 * Number(this.options.duration), this.remaining = this.duration;
|
|
138
|
-
}, t2.prototype.parse = function(t3) {
|
|
139
|
-
var i2 = function(t4) {
|
|
140
|
-
return t4.replace(/([.,' ])/g, "\\$1");
|
|
141
|
-
}, e2 = i2(this.options.separator), s = i2(this.options.decimal), n = t3.replace(new RegExp(e2, "g"), "").replace(new RegExp(s, "g"), ".");
|
|
142
|
-
return parseFloat(n);
|
|
143
|
-
}, t2.observedElements = /* @__PURE__ */ new WeakMap(), t2;
|
|
144
|
-
})();
|
|
145
|
-
t.CountUp = e;
|
|
146
|
-
}));
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
// ../../node_modules/.pnpm/react-countup@6.5.3_react@19.2.8/node_modules/react-countup/build/index.js
|
|
151
|
-
var require_build = __commonJS({
|
|
152
|
-
"../../node_modules/.pnpm/react-countup@6.5.3_react@19.2.8/node_modules/react-countup/build/index.js"(exports) {
|
|
153
|
-
"use strict";
|
|
154
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
155
|
-
var React = __require("react");
|
|
156
|
-
var countup_js = require_countUp_umd();
|
|
157
|
-
function _iterableToArrayLimit(r, l) {
|
|
158
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
159
|
-
if (null != t) {
|
|
160
|
-
var e, n, i, u, a = [], f = true, o = false;
|
|
161
|
-
try {
|
|
162
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
163
|
-
if (Object(t) !== t) return;
|
|
164
|
-
f = false;
|
|
165
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ;
|
|
166
|
-
} catch (r2) {
|
|
167
|
-
o = true, n = r2;
|
|
168
|
-
} finally {
|
|
169
|
-
try {
|
|
170
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
171
|
-
} finally {
|
|
172
|
-
if (o) throw n;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return a;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
function ownKeys(e, r) {
|
|
179
|
-
var t = Object.keys(e);
|
|
180
|
-
if (Object.getOwnPropertySymbols) {
|
|
181
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
182
|
-
r && (o = o.filter(function(r2) {
|
|
183
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
184
|
-
})), t.push.apply(t, o);
|
|
185
|
-
}
|
|
186
|
-
return t;
|
|
187
|
-
}
|
|
188
|
-
function _objectSpread2(e) {
|
|
189
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
190
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
191
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
192
|
-
_defineProperty(e, r2, t[r2]);
|
|
193
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
194
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
return e;
|
|
198
|
-
}
|
|
199
|
-
function _toPrimitive(t, r) {
|
|
200
|
-
if ("object" != typeof t || !t) return t;
|
|
201
|
-
var e = t[Symbol.toPrimitive];
|
|
202
|
-
if (void 0 !== e) {
|
|
203
|
-
var i = e.call(t, r || "default");
|
|
204
|
-
if ("object" != typeof i) return i;
|
|
205
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
206
|
-
}
|
|
207
|
-
return ("string" === r ? String : Number)(t);
|
|
208
|
-
}
|
|
209
|
-
function _toPropertyKey(t) {
|
|
210
|
-
var i = _toPrimitive(t, "string");
|
|
211
|
-
return "symbol" == typeof i ? i : String(i);
|
|
212
|
-
}
|
|
213
|
-
function _defineProperty(obj, key, value) {
|
|
214
|
-
key = _toPropertyKey(key);
|
|
215
|
-
if (key in obj) {
|
|
216
|
-
Object.defineProperty(obj, key, {
|
|
217
|
-
value,
|
|
218
|
-
enumerable: true,
|
|
219
|
-
configurable: true,
|
|
220
|
-
writable: true
|
|
221
|
-
});
|
|
222
|
-
} else {
|
|
223
|
-
obj[key] = value;
|
|
224
|
-
}
|
|
225
|
-
return obj;
|
|
226
|
-
}
|
|
227
|
-
function _extends() {
|
|
228
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
229
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
230
|
-
var source = arguments[i];
|
|
231
|
-
for (var key in source) {
|
|
232
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
233
|
-
target[key] = source[key];
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
return target;
|
|
238
|
-
};
|
|
239
|
-
return _extends.apply(this, arguments);
|
|
240
|
-
}
|
|
241
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
242
|
-
if (source == null) return {};
|
|
243
|
-
var target = {};
|
|
244
|
-
var sourceKeys = Object.keys(source);
|
|
245
|
-
var key, i;
|
|
246
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
247
|
-
key = sourceKeys[i];
|
|
248
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
249
|
-
target[key] = source[key];
|
|
250
|
-
}
|
|
251
|
-
return target;
|
|
252
|
-
}
|
|
253
|
-
function _objectWithoutProperties(source, excluded) {
|
|
254
|
-
if (source == null) return {};
|
|
255
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
256
|
-
var key, i;
|
|
257
|
-
if (Object.getOwnPropertySymbols) {
|
|
258
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
259
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
260
|
-
key = sourceSymbolKeys[i];
|
|
261
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
262
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
263
|
-
target[key] = source[key];
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
return target;
|
|
267
|
-
}
|
|
268
|
-
function _slicedToArray(arr, i) {
|
|
269
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
270
|
-
}
|
|
271
|
-
function _arrayWithHoles(arr) {
|
|
272
|
-
if (Array.isArray(arr)) return arr;
|
|
273
|
-
}
|
|
274
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
275
|
-
if (!o) return;
|
|
276
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
277
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
278
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
279
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
280
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
281
|
-
}
|
|
282
|
-
function _arrayLikeToArray(arr, len) {
|
|
283
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
284
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
285
|
-
return arr2;
|
|
286
|
-
}
|
|
287
|
-
function _nonIterableRest() {
|
|
288
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
289
|
-
}
|
|
290
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
291
|
-
function useEventCallback(fn) {
|
|
292
|
-
var ref = React.useRef(fn);
|
|
293
|
-
useIsomorphicLayoutEffect(function() {
|
|
294
|
-
ref.current = fn;
|
|
295
|
-
});
|
|
296
|
-
return React.useCallback(function() {
|
|
297
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
298
|
-
args[_key] = arguments[_key];
|
|
299
|
-
}
|
|
300
|
-
return ref.current.apply(void 0, args);
|
|
301
|
-
}, []);
|
|
302
|
-
}
|
|
303
|
-
var createCountUpInstance = function createCountUpInstance2(el, props) {
|
|
304
|
-
var decimal = props.decimal, decimals = props.decimals, duration = props.duration, easingFn = props.easingFn, end = props.end, formattingFn = props.formattingFn, numerals = props.numerals, prefix = props.prefix, separator = props.separator, start = props.start, suffix = props.suffix, useEasing = props.useEasing, useGrouping = props.useGrouping, useIndianSeparators = props.useIndianSeparators, enableScrollSpy = props.enableScrollSpy, scrollSpyDelay = props.scrollSpyDelay, scrollSpyOnce = props.scrollSpyOnce, plugin = props.plugin;
|
|
305
|
-
return new countup_js.CountUp(el, end, {
|
|
306
|
-
startVal: start,
|
|
307
|
-
duration,
|
|
308
|
-
decimal,
|
|
309
|
-
decimalPlaces: decimals,
|
|
310
|
-
easingFn,
|
|
311
|
-
formattingFn,
|
|
312
|
-
numerals,
|
|
313
|
-
separator,
|
|
314
|
-
prefix,
|
|
315
|
-
suffix,
|
|
316
|
-
plugin,
|
|
317
|
-
useEasing,
|
|
318
|
-
useIndianSeparators,
|
|
319
|
-
useGrouping,
|
|
320
|
-
enableScrollSpy,
|
|
321
|
-
scrollSpyDelay,
|
|
322
|
-
scrollSpyOnce
|
|
323
|
-
});
|
|
324
|
-
};
|
|
325
|
-
var _excluded$1 = ["ref", "startOnMount", "enableReinitialize", "delay", "onEnd", "onStart", "onPauseResume", "onReset", "onUpdate"];
|
|
326
|
-
var DEFAULTS = {
|
|
327
|
-
decimal: ".",
|
|
328
|
-
separator: ",",
|
|
329
|
-
delay: null,
|
|
330
|
-
prefix: "",
|
|
331
|
-
suffix: "",
|
|
332
|
-
duration: 2,
|
|
333
|
-
start: 0,
|
|
334
|
-
decimals: 0,
|
|
335
|
-
startOnMount: true,
|
|
336
|
-
enableReinitialize: true,
|
|
337
|
-
useEasing: true,
|
|
338
|
-
useGrouping: true,
|
|
339
|
-
useIndianSeparators: false
|
|
340
|
-
};
|
|
341
|
-
var useCountUp3 = function useCountUp4(props) {
|
|
342
|
-
var filteredProps = Object.fromEntries(Object.entries(props).filter(function(_ref) {
|
|
343
|
-
var _ref2 = _slicedToArray(_ref, 2), value = _ref2[1];
|
|
344
|
-
return value !== void 0;
|
|
345
|
-
}));
|
|
346
|
-
var _useMemo = React.useMemo(function() {
|
|
347
|
-
return _objectSpread2(_objectSpread2({}, DEFAULTS), filteredProps);
|
|
348
|
-
}, [props]), ref = _useMemo.ref, startOnMount = _useMemo.startOnMount, enableReinitialize = _useMemo.enableReinitialize, delay = _useMemo.delay, onEnd = _useMemo.onEnd, onStart = _useMemo.onStart, onPauseResume = _useMemo.onPauseResume, onReset = _useMemo.onReset, onUpdate = _useMemo.onUpdate, instanceProps = _objectWithoutProperties(_useMemo, _excluded$1);
|
|
349
|
-
var countUpRef = React.useRef();
|
|
350
|
-
var timerRef = React.useRef();
|
|
351
|
-
var isInitializedRef = React.useRef(false);
|
|
352
|
-
var createInstance = useEventCallback(function() {
|
|
353
|
-
return createCountUpInstance(typeof ref === "string" ? ref : ref.current, instanceProps);
|
|
354
|
-
});
|
|
355
|
-
var getCountUp = useEventCallback(function(recreate) {
|
|
356
|
-
var countUp = countUpRef.current;
|
|
357
|
-
if (countUp && !recreate) {
|
|
358
|
-
return countUp;
|
|
359
|
-
}
|
|
360
|
-
var newCountUp = createInstance();
|
|
361
|
-
countUpRef.current = newCountUp;
|
|
362
|
-
return newCountUp;
|
|
363
|
-
});
|
|
364
|
-
var start = useEventCallback(function() {
|
|
365
|
-
var run = function run2() {
|
|
366
|
-
return getCountUp(true).start(function() {
|
|
367
|
-
onEnd === null || onEnd === void 0 || onEnd({
|
|
368
|
-
pauseResume,
|
|
369
|
-
reset,
|
|
370
|
-
start: restart,
|
|
371
|
-
update
|
|
372
|
-
});
|
|
373
|
-
});
|
|
374
|
-
};
|
|
375
|
-
if (delay && delay > 0) {
|
|
376
|
-
timerRef.current = setTimeout(run, delay * 1e3);
|
|
377
|
-
} else {
|
|
378
|
-
run();
|
|
379
|
-
}
|
|
380
|
-
onStart === null || onStart === void 0 || onStart({
|
|
381
|
-
pauseResume,
|
|
382
|
-
reset,
|
|
383
|
-
update
|
|
384
|
-
});
|
|
385
|
-
});
|
|
386
|
-
var pauseResume = useEventCallback(function() {
|
|
387
|
-
getCountUp().pauseResume();
|
|
388
|
-
onPauseResume === null || onPauseResume === void 0 || onPauseResume({
|
|
389
|
-
reset,
|
|
390
|
-
start: restart,
|
|
391
|
-
update
|
|
392
|
-
});
|
|
393
|
-
});
|
|
394
|
-
var reset = useEventCallback(function() {
|
|
395
|
-
if (getCountUp().el) {
|
|
396
|
-
timerRef.current && clearTimeout(timerRef.current);
|
|
397
|
-
getCountUp().reset();
|
|
398
|
-
onReset === null || onReset === void 0 || onReset({
|
|
399
|
-
pauseResume,
|
|
400
|
-
start: restart,
|
|
401
|
-
update
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
var update = useEventCallback(function(newEnd) {
|
|
406
|
-
getCountUp().update(newEnd);
|
|
407
|
-
onUpdate === null || onUpdate === void 0 || onUpdate({
|
|
408
|
-
pauseResume,
|
|
409
|
-
reset,
|
|
410
|
-
start: restart
|
|
411
|
-
});
|
|
412
|
-
});
|
|
413
|
-
var restart = useEventCallback(function() {
|
|
414
|
-
reset();
|
|
415
|
-
start();
|
|
416
|
-
});
|
|
417
|
-
var maybeInitialize = useEventCallback(function(shouldReset) {
|
|
418
|
-
if (startOnMount) {
|
|
419
|
-
if (shouldReset) {
|
|
420
|
-
reset();
|
|
421
|
-
}
|
|
422
|
-
start();
|
|
423
|
-
}
|
|
424
|
-
});
|
|
425
|
-
React.useEffect(function() {
|
|
426
|
-
if (!isInitializedRef.current) {
|
|
427
|
-
isInitializedRef.current = true;
|
|
428
|
-
maybeInitialize();
|
|
429
|
-
} else if (enableReinitialize) {
|
|
430
|
-
maybeInitialize(true);
|
|
431
|
-
}
|
|
432
|
-
}, [enableReinitialize, isInitializedRef, maybeInitialize, delay, props.start, props.suffix, props.prefix, props.duration, props.separator, props.decimals, props.decimal, props.formattingFn]);
|
|
433
|
-
React.useEffect(function() {
|
|
434
|
-
return function() {
|
|
435
|
-
reset();
|
|
436
|
-
};
|
|
437
|
-
}, [reset]);
|
|
438
|
-
return {
|
|
439
|
-
start: restart,
|
|
440
|
-
pauseResume,
|
|
441
|
-
reset,
|
|
442
|
-
update,
|
|
443
|
-
getCountUp
|
|
444
|
-
};
|
|
445
|
-
};
|
|
446
|
-
var _excluded = ["className", "redraw", "containerProps", "children", "style"];
|
|
447
|
-
var CountUp = function CountUp2(props) {
|
|
448
|
-
var className = props.className, redraw = props.redraw, containerProps = props.containerProps, children = props.children, style = props.style, useCountUpProps = _objectWithoutProperties(props, _excluded);
|
|
449
|
-
var containerRef = React.useRef(null);
|
|
450
|
-
var isInitializedRef = React.useRef(false);
|
|
451
|
-
var _useCountUp = useCountUp3(_objectSpread2(_objectSpread2({}, useCountUpProps), {}, {
|
|
452
|
-
ref: containerRef,
|
|
453
|
-
startOnMount: typeof children !== "function" || props.delay === 0,
|
|
454
|
-
// component manually restarts
|
|
455
|
-
enableReinitialize: false
|
|
456
|
-
})), start = _useCountUp.start, reset = _useCountUp.reset, updateCountUp = _useCountUp.update, pauseResume = _useCountUp.pauseResume, getCountUp = _useCountUp.getCountUp;
|
|
457
|
-
var restart = useEventCallback(function() {
|
|
458
|
-
start();
|
|
459
|
-
});
|
|
460
|
-
var update = useEventCallback(function(end) {
|
|
461
|
-
if (!props.preserveValue) {
|
|
462
|
-
reset();
|
|
463
|
-
}
|
|
464
|
-
updateCountUp(end);
|
|
465
|
-
});
|
|
466
|
-
var initializeOnMount = useEventCallback(function() {
|
|
467
|
-
if (typeof props.children === "function") {
|
|
468
|
-
if (!(containerRef.current instanceof Element)) {
|
|
469
|
-
console.error(`Couldn't find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.`);
|
|
470
|
-
return;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
getCountUp();
|
|
474
|
-
});
|
|
475
|
-
React.useEffect(function() {
|
|
476
|
-
initializeOnMount();
|
|
477
|
-
}, [initializeOnMount]);
|
|
478
|
-
React.useEffect(function() {
|
|
479
|
-
if (isInitializedRef.current) {
|
|
480
|
-
update(props.end);
|
|
481
|
-
}
|
|
482
|
-
}, [props.end, update]);
|
|
483
|
-
var redrawDependencies = redraw && props;
|
|
484
|
-
React.useEffect(function() {
|
|
485
|
-
if (redraw && isInitializedRef.current) {
|
|
486
|
-
restart();
|
|
487
|
-
}
|
|
488
|
-
}, [restart, redraw, redrawDependencies]);
|
|
489
|
-
React.useEffect(function() {
|
|
490
|
-
if (!redraw && isInitializedRef.current) {
|
|
491
|
-
restart();
|
|
492
|
-
}
|
|
493
|
-
}, [restart, redraw, props.start, props.suffix, props.prefix, props.duration, props.separator, props.decimals, props.decimal, props.className, props.formattingFn]);
|
|
494
|
-
React.useEffect(function() {
|
|
495
|
-
isInitializedRef.current = true;
|
|
496
|
-
}, []);
|
|
497
|
-
if (typeof children === "function") {
|
|
498
|
-
return children({
|
|
499
|
-
countUpRef: containerRef,
|
|
500
|
-
start,
|
|
501
|
-
reset,
|
|
502
|
-
update: updateCountUp,
|
|
503
|
-
pauseResume,
|
|
504
|
-
getCountUp
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
return /* @__PURE__ */ React.createElement("span", _extends({
|
|
508
|
-
className,
|
|
509
|
-
ref: containerRef,
|
|
510
|
-
style
|
|
511
|
-
}, containerProps), typeof props.start !== "undefined" ? getCountUp().formattingFn(props.start) : "");
|
|
512
|
-
};
|
|
513
|
-
exports.default = CountUp;
|
|
514
|
-
exports.useCountUp = useCountUp3;
|
|
515
|
-
}
|
|
516
|
-
});
|
|
517
|
-
|
|
518
|
-
// shell/.ojm-shim-react-countup.mjs
|
|
519
|
-
var __m = __toESM(require_build(), 1);
|
|
520
|
-
var useCountUp2 = __m["useCountUp"];
|
|
521
|
-
var ojm_shim_react_countup_default = __m.default ?? __m;
|
|
522
|
-
export {
|
|
523
|
-
ojm_shim_react_countup_default as default,
|
|
524
|
-
useCountUp2 as useCountUp
|
|
525
|
-
};
|