@vef-framework/starter 2.0.4 → 2.0.5
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/dist/cjs/components/access-denied/access-denied-icon.cjs +1 -210
- package/dist/cjs/components/access-denied/index.cjs +1 -47
- package/dist/cjs/components/app/index.cjs +1 -47
- package/dist/cjs/components/app/props.cjs +1 -3
- package/dist/cjs/components/base-layout/index.cjs +1 -45
- package/dist/cjs/components/base-layout/props.cjs +1 -3
- package/dist/cjs/components/base-layout/styles.cjs +1 -57
- package/dist/cjs/components/base-layout/use-base-layout.cjs +1 -41
- package/dist/cjs/components/crud/components/action-button-group.cjs +1 -20
- package/dist/cjs/components/crud/components/index.cjs +1 -20
- package/dist/cjs/components/crud/components/main.cjs +1 -57
- package/dist/cjs/components/crud/components/mutation-holder.cjs +1 -40
- package/dist/cjs/components/crud/components/operation-button-group.cjs +1 -22
- package/dist/cjs/components/crud/components/scene-form.cjs +1 -84
- package/dist/cjs/components/crud/components/selection-indicator.cjs +1 -83
- package/dist/cjs/components/crud/components/toolbar-actions.cjs +1 -19
- package/dist/cjs/components/crud/components/toolbar.cjs +1 -38
- package/dist/cjs/components/crud/event.cjs +1 -12
- package/dist/cjs/components/crud/helpers.cjs +1 -26
- package/dist/cjs/components/crud/hooks/index.cjs +1 -14
- package/dist/cjs/components/crud/hooks/use-query-observer.cjs +1 -37
- package/dist/cjs/components/crud/hooks/use-search-values.cjs +1 -12
- package/dist/cjs/components/crud/hooks/use-selected-rows.cjs +1 -12
- package/dist/cjs/components/crud/index.cjs +1 -46
- package/dist/cjs/components/crud/props.cjs +1 -3
- package/dist/cjs/components/crud/store.cjs +1 -93
- package/dist/cjs/components/crud/styles.cjs +1 -34
- package/dist/cjs/components/crud-page/index.cjs +1 -19
- package/dist/cjs/components/crud-page/props.cjs +1 -3
- package/dist/cjs/components/error/error-icon.cjs +1 -179
- package/dist/cjs/components/error/index.cjs +1 -69
- package/dist/cjs/components/flex-card/index.cjs +1 -18
- package/dist/cjs/components/flex-card/props.cjs +1 -3
- package/dist/cjs/components/flex-card/styles.cjs +1 -26
- package/dist/cjs/components/form-drawer/components/form-actions.cjs +1 -38
- package/dist/cjs/components/form-drawer/components/index.cjs +1 -10
- package/dist/cjs/components/form-drawer/index.cjs +1 -112
- package/dist/cjs/components/form-modal/components/form-actions.cjs +1 -38
- package/dist/cjs/components/form-modal/components/index.cjs +1 -10
- package/dist/cjs/components/form-modal/index.cjs +1 -88
- package/dist/cjs/components/index.cjs +1 -45
- package/dist/cjs/components/layout/components/footer.cjs +1 -27
- package/dist/cjs/components/layout/components/header/boy-icon.cjs +1 -20
- package/dist/cjs/components/layout/components/header/breadcrumb-navigation.cjs +1 -90
- package/dist/cjs/components/layout/components/header/color-scheme.cjs +1 -40
- package/dist/cjs/components/layout/components/header/fullscreen.cjs +1 -23
- package/dist/cjs/components/layout/components/header/girl-icon.cjs +1 -21
- package/dist/cjs/components/layout/components/header/index.cjs +1 -88
- package/dist/cjs/components/layout/components/header/menu-burger.cjs +1 -24
- package/dist/cjs/components/layout/components/header/menu-fold-left-icon.cjs +1 -20
- package/dist/cjs/components/layout/components/header/menu-unfold-left-icon.cjs +1 -20
- package/dist/cjs/components/layout/components/header/search.cjs +1 -22
- package/dist/cjs/components/layout/components/header/theme-config.cjs +1 -23
- package/dist/cjs/components/layout/components/header/user-avatar.cjs +1 -86
- package/dist/cjs/components/layout/components/honeycomb-pattern.cjs +1 -39
- package/dist/cjs/components/layout/components/index.cjs +1 -20
- package/dist/cjs/components/layout/components/logo.cjs +1 -60
- package/dist/cjs/components/layout/components/menu.cjs +1 -95
- package/dist/cjs/components/layout/components/search/index.cjs +1 -79
- package/dist/cjs/components/layout/components/search/keyboard-arrow-down-icon.cjs +1 -15
- package/dist/cjs/components/layout/components/search/keyboard-arrow-up-icon.cjs +1 -15
- package/dist/cjs/components/layout/components/search/keyboard-control-icon.cjs +1 -15
- package/dist/cjs/components/layout/components/search/keyboard-esc-icon.cjs +1 -15
- package/dist/cjs/components/layout/components/search/keyboard-help.cjs +1 -46
- package/dist/cjs/components/layout/components/search/keyboard-return-icon.cjs +1 -15
- package/dist/cjs/components/layout/components/search/keyboard-shift-icon.cjs +1 -15
- package/dist/cjs/components/layout/components/search/keyboard.cjs +1 -32
- package/dist/cjs/components/layout/components/search/letter-s-icon.cjs +1 -15
- package/dist/cjs/components/layout/components/search/search-result-item.cjs +1 -69
- package/dist/cjs/components/layout/components/search/search-result.cjs +1 -135
- package/dist/cjs/components/layout/components/sidebar.cjs +1 -54
- package/dist/cjs/components/layout/components/tabs/context-menu.cjs +1 -96
- package/dist/cjs/components/layout/components/tabs/index.cjs +1 -40
- package/dist/cjs/components/layout/components/tabs/main-content-maximum.cjs +1 -23
- package/dist/cjs/components/layout/components/tabs/reload.cjs +1 -21
- package/dist/cjs/components/layout/components/tabs/tab-item.cjs +1 -84
- package/dist/cjs/components/layout/components/tabs/tab-list.cjs +1 -91
- package/dist/cjs/components/layout/components/tabs/tabs-container.cjs +1 -85
- package/dist/cjs/components/layout/components/theme-config/color-scheme-switcher.cjs +1 -49
- package/dist/cjs/components/layout/components/theme-config/color-scheme.cjs +1 -57
- package/dist/cjs/components/layout/components/theme-config/config-item.cjs +1 -27
- package/dist/cjs/components/layout/components/theme-config/index.cjs +1 -59
- package/dist/cjs/components/layout/components/theme-config/menu-layout-card.cjs +1 -75
- package/dist/cjs/components/layout/components/theme-config/menu-layout.cjs +1 -33
- package/dist/cjs/components/layout/components/theme-config/operations.cjs +1 -22
- package/dist/cjs/components/layout/components/theme-config/theme-color-picker.cjs +1 -33
- package/dist/cjs/components/layout/components/theme-config/theme-colors.cjs +1 -29
- package/dist/cjs/components/layout/hooks/index.cjs +1 -14
- package/dist/cjs/components/layout/hooks/use-color-scheme-updater.cjs +1 -72
- package/dist/cjs/components/layout/hooks/use-menu-navigate.cjs +1 -29
- package/dist/cjs/components/layout/hooks/use-tab-navigate.cjs +1 -39
- package/dist/cjs/components/layout/index.cjs +1 -81
- package/dist/cjs/components/layout/props.cjs +1 -3
- package/dist/cjs/components/layout/store.cjs +1 -23
- package/dist/cjs/components/layout/styles.cjs +1 -16
- package/dist/cjs/components/login/icon-login.cjs +1 -149
- package/dist/cjs/components/login/index.cjs +1 -162
- package/dist/cjs/components/login/payload.cjs +1 -3
- package/dist/cjs/components/login/props.cjs +1 -3
- package/dist/cjs/components/login/styles.cjs +1 -97
- package/dist/cjs/components/login/welcome-messages.cjs +1 -135
- package/dist/cjs/components/logo-icon/index.cjs +1 -22
- package/dist/cjs/components/logo-icon/props.cjs +1 -3
- package/dist/cjs/components/n-progress/components/bar.cjs +9 -51
- package/dist/cjs/components/n-progress/components/container.cjs +1 -25
- package/dist/cjs/components/n-progress/components/index.cjs +1 -12
- package/dist/cjs/components/n-progress/event.cjs +1 -10
- package/dist/cjs/components/n-progress/index.cjs +1 -34
- package/dist/cjs/components/not-found/index.cjs +1 -47
- package/dist/cjs/components/not-found/not-found-icon.cjs +1 -205
- package/dist/cjs/components/page/index.cjs +1 -58
- package/dist/cjs/components/page/props.cjs +1 -3
- package/dist/cjs/components/page/scroll-content.cjs +1 -65
- package/dist/cjs/components/page/styles.cjs +1 -86
- package/dist/cjs/components/page/use-page-key.cjs +1 -22
- package/dist/cjs/components/page/viewport-context.cjs +1 -19
- package/dist/cjs/components/pro-search/components/advanced-search-toggler.cjs +1 -23
- package/dist/cjs/components/pro-search/components/advanced-search.cjs +1 -30
- package/dist/cjs/components/pro-search/components/index.cjs +1 -14
- package/dist/cjs/components/pro-search/components/search-actions.cjs +1 -36
- package/dist/cjs/components/pro-search/index.cjs +1 -70
- package/dist/cjs/components/pro-search/styles.cjs +1 -65
- package/dist/cjs/components/pro-table/components/index.cjs +1 -17
- package/dist/cjs/components/pro-table/components/operation-button-group.cjs +1 -22
- package/dist/cjs/components/pro-table/components/ref.cjs +1 -24
- package/dist/cjs/components/pro-table/components/table-subscriber.cjs +1 -25
- package/dist/cjs/components/pro-table/components/table-summary.cjs +1 -15
- package/dist/cjs/components/pro-table/components/table-title.cjs +1 -15
- package/dist/cjs/components/pro-table/components/table.cjs +1 -132
- package/dist/cjs/components/pro-table/context.cjs +1 -15
- package/dist/cjs/components/pro-table/event.cjs +1 -12
- package/dist/cjs/components/pro-table/hooks/index.cjs +1 -12
- package/dist/cjs/components/pro-table/hooks/use-row-selection.cjs +1 -43
- package/dist/cjs/components/pro-table/hooks/use-table-columns.cjs +1 -60
- package/dist/cjs/components/pro-table/index.cjs +1 -53
- package/dist/cjs/components/pro-table/store.cjs +1 -40
- package/dist/cjs/components/router-provider/context.cjs +1 -15
- package/dist/cjs/components/router-provider/index.cjs +1 -29
- package/dist/cjs/components/router-provider/props.cjs +1 -3
- package/dist/cjs/components/theme-config-provider/global-style.cjs +65 -16
- package/dist/cjs/components/theme-config-provider/index.cjs +1 -19
- package/dist/cjs/components/theme-config-provider/use-color-mode-effect.cjs +1 -35
- package/dist/cjs/components/theme-config-provider/use-theme-config.cjs +1 -73
- package/dist/cjs/constants/event.cjs +1 -8
- package/dist/cjs/constants/index.cjs +1 -23
- package/dist/cjs/constants/router.cjs +1 -18
- package/dist/cjs/constants/storage.cjs +1 -10
- package/dist/cjs/constants/symbols.cjs +1 -10
- package/dist/cjs/helpers/api.cjs +1 -50
- package/dist/cjs/helpers/app-version.cjs +1 -227
- package/dist/cjs/helpers/app.cjs +1 -37
- package/dist/cjs/helpers/auth.cjs +1 -24
- package/dist/cjs/helpers/event.cjs +1 -24
- package/dist/cjs/helpers/index.cjs +1 -25
- package/dist/cjs/helpers/query.cjs +1 -27
- package/dist/cjs/helpers/router.cjs +1 -110
- package/dist/cjs/hooks/index.cjs +1 -10
- package/dist/cjs/hooks/use-route-full-path.cjs +1 -32
- package/dist/cjs/index.cjs +1 -83
- package/dist/cjs/routes/access-denied.cjs +1 -31
- package/dist/cjs/routes/index.cjs +1 -16
- package/dist/cjs/routes/layout.cjs +1 -140
- package/dist/cjs/routes/login.cjs +1 -41
- package/dist/cjs/routes/root.cjs +1 -35
- package/dist/cjs/stores/app.cjs +1 -25
- package/dist/cjs/stores/index.cjs +1 -14
- package/dist/cjs/stores/tab.cjs +1 -101
- package/dist/cjs/stores/theme.cjs +1 -32
- package/dist/es/components/access-denied/access-denied-icon.js +201 -202
- package/dist/es/components/access-denied/index.js +23 -25
- package/dist/es/components/app/index.js +31 -38
- package/dist/es/components/app/props.js +1 -1
- package/dist/es/components/base-layout/index.js +31 -38
- package/dist/es/components/base-layout/props.js +1 -1
- package/dist/es/components/base-layout/styles.js +22 -24
- package/dist/es/components/base-layout/use-base-layout.js +28 -33
- package/dist/es/components/crud/components/action-button-group.js +13 -14
- package/dist/es/components/crud/components/index.js +14 -7
- package/dist/es/components/crud/components/main.js +40 -46
- package/dist/es/components/crud/components/mutation-holder.js +28 -32
- package/dist/es/components/crud/components/operation-button-group.js +15 -16
- package/dist/es/components/crud/components/scene-form.js +62 -71
- package/dist/es/components/crud/components/selection-indicator.js +38 -53
- package/dist/es/components/crud/components/toolbar-actions.js +11 -12
- package/dist/es/components/crud/components/toolbar.js +26 -27
- package/dist/es/components/crud/event.js +6 -7
- package/dist/es/components/crud/helpers.js +16 -17
- package/dist/es/components/crud/hooks/index.js +8 -4
- package/dist/es/components/crud/hooks/use-query-observer.js +20 -25
- package/dist/es/components/crud/hooks/use-search-values.js +6 -7
- package/dist/es/components/crud/hooks/use-selected-rows.js +6 -7
- package/dist/es/components/crud/index.js +36 -36
- package/dist/es/components/crud/props.js +1 -1
- package/dist/es/components/crud/store.js +68 -77
- package/dist/es/components/crud/styles.js +18 -19
- package/dist/es/components/crud-page/index.js +12 -13
- package/dist/es/components/crud-page/props.js +1 -1
- package/dist/es/components/error/error-icon.js +170 -171
- package/dist/es/components/error/index.js +31 -37
- package/dist/es/components/flex-card/index.js +11 -12
- package/dist/es/components/flex-card/props.js +1 -1
- package/dist/es/components/flex-card/styles.js +8 -9
- package/dist/es/components/form-drawer/components/form-actions.js +23 -27
- package/dist/es/components/form-drawer/components/index.js +4 -2
- package/dist/es/components/form-drawer/index.js +64 -92
- package/dist/es/components/form-modal/components/form-actions.js +23 -27
- package/dist/es/components/form-modal/components/index.js +4 -2
- package/dist/es/components/form-modal/index.js +53 -76
- package/dist/es/components/index.js +39 -20
- package/dist/es/components/layout/components/footer.js +10 -11
- package/dist/es/components/layout/components/header/boy-icon.js +13 -14
- package/dist/es/components/layout/components/header/breadcrumb-navigation.js +56 -79
- package/dist/es/components/layout/components/header/color-scheme.js +26 -29
- package/dist/es/components/layout/components/header/fullscreen.js +14 -16
- package/dist/es/components/layout/components/header/girl-icon.js +14 -15
- package/dist/es/components/layout/components/header/index.js +45 -51
- package/dist/es/components/layout/components/header/menu-burger.js +16 -17
- package/dist/es/components/layout/components/header/menu-fold-left-icon.js +12 -13
- package/dist/es/components/layout/components/header/menu-unfold-left-icon.js +12 -13
- package/dist/es/components/layout/components/header/search.js +14 -16
- package/dist/es/components/layout/components/header/theme-config.js +15 -16
- package/dist/es/components/layout/components/header/user-avatar.js +50 -61
- package/dist/es/components/layout/components/honeycomb-pattern.js +17 -19
- package/dist/es/components/layout/components/index.js +14 -7
- package/dist/es/components/layout/components/logo.js +30 -33
- package/dist/es/components/layout/components/menu.js +48 -77
- package/dist/es/components/layout/components/search/index.js +39 -49
- package/dist/es/components/layout/components/search/keyboard-arrow-down-icon.js +8 -9
- package/dist/es/components/layout/components/search/keyboard-arrow-up-icon.js +8 -9
- package/dist/es/components/layout/components/search/keyboard-control-icon.js +8 -9
- package/dist/es/components/layout/components/search/keyboard-esc-icon.js +8 -9
- package/dist/es/components/layout/components/search/keyboard-help.js +30 -32
- package/dist/es/components/layout/components/search/keyboard-return-icon.js +8 -9
- package/dist/es/components/layout/components/search/keyboard-shift-icon.js +8 -9
- package/dist/es/components/layout/components/search/keyboard.js +16 -22
- package/dist/es/components/layout/components/search/letter-s-icon.js +8 -9
- package/dist/es/components/layout/components/search/search-result-item.js +38 -44
- package/dist/es/components/layout/components/search/search-result.js +73 -93
- package/dist/es/components/layout/components/sidebar.js +26 -29
- package/dist/es/components/layout/components/tabs/context-menu.js +66 -71
- package/dist/es/components/layout/components/tabs/index.js +21 -23
- package/dist/es/components/layout/components/tabs/main-content-maximum.js +15 -16
- package/dist/es/components/layout/components/tabs/reload.js +14 -15
- package/dist/es/components/layout/components/tabs/tab-item.js +47 -51
- package/dist/es/components/layout/components/tabs/tab-list.js +45 -57
- package/dist/es/components/layout/components/tabs/tabs-container.js +39 -49
- package/dist/es/components/layout/components/theme-config/color-scheme-switcher.js +28 -32
- package/dist/es/components/layout/components/theme-config/color-scheme.js +36 -37
- package/dist/es/components/layout/components/theme-config/config-item.js +15 -16
- package/dist/es/components/layout/components/theme-config/index.js +37 -41
- package/dist/es/components/layout/components/theme-config/menu-layout-card.js +31 -33
- package/dist/es/components/layout/components/theme-config/menu-layout.js +20 -21
- package/dist/es/components/layout/components/theme-config/operations.js +14 -16
- package/dist/es/components/layout/components/theme-config/theme-color-picker.js +22 -24
- package/dist/es/components/layout/components/theme-config/theme-colors.js +14 -16
- package/dist/es/components/layout/hooks/index.js +8 -4
- package/dist/es/components/layout/hooks/use-color-scheme-updater.js +39 -47
- package/dist/es/components/layout/hooks/use-menu-navigate.js +20 -21
- package/dist/es/components/layout/hooks/use-tab-navigate.js +24 -32
- package/dist/es/components/layout/index.js +52 -66
- package/dist/es/components/layout/props.js +1 -1
- package/dist/es/components/layout/store.js +15 -17
- package/dist/es/components/layout/styles.js +7 -8
- package/dist/es/components/login/icon-login.js +138 -139
- package/dist/es/components/login/index.js +87 -100
- package/dist/es/components/login/payload.js +1 -1
- package/dist/es/components/login/props.js +1 -1
- package/dist/es/components/login/styles.js +34 -35
- package/dist/es/components/login/welcome-messages.js +8 -7
- package/dist/es/components/logo-icon/index.js +14 -15
- package/dist/es/components/logo-icon/props.js +1 -1
- package/dist/es/components/n-progress/components/bar.js +22 -24
- package/dist/es/components/n-progress/components/container.js +15 -16
- package/dist/es/components/n-progress/components/index.js +6 -3
- package/dist/es/components/n-progress/event.js +5 -6
- package/dist/es/components/n-progress/index.js +24 -27
- package/dist/es/components/not-found/index.js +23 -25
- package/dist/es/components/not-found/not-found-icon.js +196 -197
- package/dist/es/components/page/index.js +37 -39
- package/dist/es/components/page/props.js +1 -1
- package/dist/es/components/page/scroll-content.js +31 -34
- package/dist/es/components/page/styles.js +37 -38
- package/dist/es/components/page/use-page-key.js +13 -16
- package/dist/es/components/page/viewport-context.js +11 -12
- package/dist/es/components/pro-search/components/advanced-search-toggler.js +16 -17
- package/dist/es/components/pro-search/components/advanced-search.js +12 -15
- package/dist/es/components/pro-search/components/index.js +8 -4
- package/dist/es/components/pro-search/components/search-actions.js +21 -24
- package/dist/es/components/pro-search/index.js +48 -58
- package/dist/es/components/pro-search/styles.js +21 -22
- package/dist/es/components/pro-table/components/index.js +11 -5
- package/dist/es/components/pro-table/components/operation-button-group.js +15 -16
- package/dist/es/components/pro-table/components/ref.js +13 -18
- package/dist/es/components/pro-table/components/table-subscriber.js +17 -19
- package/dist/es/components/pro-table/components/table-summary.js +10 -11
- package/dist/es/components/pro-table/components/table-title.js +10 -11
- package/dist/es/components/pro-table/components/table.js +92 -115
- package/dist/es/components/pro-table/context.js +8 -9
- package/dist/es/components/pro-table/event.js +6 -7
- package/dist/es/components/pro-table/hooks/index.js +6 -3
- package/dist/es/components/pro-table/hooks/use-row-selection.js +25 -31
- package/dist/es/components/pro-table/hooks/use-table-columns.js +30 -44
- package/dist/es/components/pro-table/index.js +38 -40
- package/dist/es/components/pro-table/store.js +32 -33
- package/dist/es/components/router-provider/context.js +9 -9
- package/dist/es/components/router-provider/index.js +18 -21
- package/dist/es/components/router-provider/props.js +1 -1
- package/dist/es/components/theme-config-provider/global-style.js +77 -10
- package/dist/es/components/theme-config-provider/index.js +11 -13
- package/dist/es/components/theme-config-provider/use-color-mode-effect.js +15 -26
- package/dist/es/components/theme-config-provider/use-theme-config.js +35 -64
- package/dist/es/constants/event.js +4 -4
- package/dist/es/constants/index.js +17 -5
- package/dist/es/constants/router.js +9 -9
- package/dist/es/constants/storage.js +5 -5
- package/dist/es/constants/symbols.js +5 -5
- package/dist/es/helpers/api.js +28 -30
- package/dist/es/helpers/app-version.js +111 -177
- package/dist/es/helpers/app.js +17 -24
- package/dist/es/helpers/auth.js +15 -18
- package/dist/es/helpers/event.js +16 -16
- package/dist/es/helpers/index.js +19 -8
- package/dist/es/helpers/query.js +16 -16
- package/dist/es/helpers/router.js +65 -79
- package/dist/es/hooks/index.js +4 -2
- package/dist/es/hooks/use-route-full-path.js +18 -26
- package/dist/es/index.js +77 -36
- package/dist/es/routes/access-denied.js +14 -21
- package/dist/es/routes/index.js +10 -5
- package/dist/es/routes/layout.js +88 -106
- package/dist/es/routes/login.js +25 -26
- package/dist/es/routes/root.js +20 -26
- package/dist/es/stores/app.js +11 -14
- package/dist/es/stores/index.js +8 -4
- package/dist/es/stores/tab.js +72 -90
- package/dist/es/stores/theme.js +23 -26
- package/package.json +6 -6
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const react = require('react');
|
|
7
|
-
const store = require('../store.cjs');
|
|
8
|
-
|
|
9
|
-
function ProTableRefHolder({
|
|
10
|
-
ref
|
|
11
|
-
}) {
|
|
12
|
-
const refetch = store.useProTableStore((state) => state.refetch);
|
|
13
|
-
const emitter = store.useProTableStore((state) => state.eventEmitter);
|
|
14
|
-
react.useImperativeHandle(ref, () => {
|
|
15
|
-
return {
|
|
16
|
-
refetch,
|
|
17
|
-
onLoading: (callback) => emitter.on("loading", callback),
|
|
18
|
-
onLoaded: (callback) => emitter.on("loaded", callback)
|
|
19
|
-
};
|
|
20
|
-
}, [emitter, refetch]);
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
exports.ProTableRefHolder = ProTableRefHolder;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),t=require("../store.cjs");function a({ref:n}){const o=t.useProTableStore(e=>e.refetch),r=t.useProTableStore(e=>e.eventEmitter);return l.useImperativeHandle(n,()=>({refetch:o,onLoading:e=>r.on("loading",e),onLoaded:e=>r.on("loaded",e)}),[r,o]),null}exports.ProTableRefHolder=a;
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const core = require('@vef-framework/core');
|
|
7
|
-
const shared = require('@vef-framework/shared');
|
|
8
|
-
const react = require('react');
|
|
9
|
-
const context = require('../context.cjs');
|
|
10
|
-
const store = require('../store.cjs');
|
|
11
|
-
|
|
12
|
-
const TableSubscriber = react.memo(({
|
|
13
|
-
selector,
|
|
14
|
-
children
|
|
15
|
-
}) => {
|
|
16
|
-
const data = context.useData();
|
|
17
|
-
const selected = store.useProTableStore(core.useShallow((state) => selector ? selector({
|
|
18
|
-
...state,
|
|
19
|
-
data
|
|
20
|
-
}) : state));
|
|
21
|
-
return shared.isFunction(children) ? children(selected) : children;
|
|
22
|
-
});
|
|
23
|
-
TableSubscriber.displayName = "ProTableSubscriber";
|
|
24
|
-
|
|
25
|
-
exports.TableSubscriber = TableSubscriber;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@vef-framework/core"),a=require("@vef-framework/shared"),b=require("react"),i=require("../context.cjs"),n=require("../store.cjs"),o=b.memo(({selector:r,children:e})=>{const s=i.useData(),u=n.useProTableStore(c.useShallow(t=>r?r({...t,data:s}):t));return a.isFunction(e)?e(u):e});o.displayName="ProTableSubscriber";exports.TableSubscriber=o;
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
7
|
-
const react = require('react');
|
|
8
|
-
const context = require('../context.cjs');
|
|
9
|
-
|
|
10
|
-
const TableSummary = react.memo(({
|
|
11
|
-
summary,
|
|
12
|
-
data
|
|
13
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(context.DataProvider, { value: data, children: summary }));
|
|
14
|
-
|
|
15
|
-
exports.TableSummary = TableSummary;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@emotion/react/jsx-runtime"),o=require("react"),a=require("../context.cjs"),u=o.memo(({summary:e,data:r})=>t.jsx(a.DataProvider,{value:r,children:e}));exports.TableSummary=u;
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
7
|
-
const react = require('react');
|
|
8
|
-
const context = require('../context.cjs');
|
|
9
|
-
|
|
10
|
-
const TableTitle = react.memo(({
|
|
11
|
-
title,
|
|
12
|
-
data
|
|
13
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(context.DataProvider, { value: data, children: title }));
|
|
14
|
-
|
|
15
|
-
exports.TableTitle = TableTitle;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@emotion/react/jsx-runtime"),i=require("react"),o=require("../context.cjs"),c=i.memo(({title:e,data:t})=>r.jsx(o.DataProvider,{value:t,children:e}));exports.TableTitle=c;
|
|
@@ -1,132 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
7
|
-
const components = require('@vef-framework/components');
|
|
8
|
-
const core = require('@vef-framework/core');
|
|
9
|
-
const hooks = require('@vef-framework/hooks');
|
|
10
|
-
const shared = require('@vef-framework/shared');
|
|
11
|
-
const react = require('react');
|
|
12
|
-
require('../../../constants/index.cjs');
|
|
13
|
-
require('../hooks/index.cjs');
|
|
14
|
-
const store = require('../store.cjs');
|
|
15
|
-
const tableSummary = require('./table-summary.cjs');
|
|
16
|
-
const tableTitle = require('./table-title.cjs');
|
|
17
|
-
const useTableColumns = require('../hooks/use-table-columns.cjs');
|
|
18
|
-
const symbols = require('../../../constants/symbols.cjs');
|
|
19
|
-
const useRowSelection = require('../hooks/use-row-selection.cjs');
|
|
20
|
-
|
|
21
|
-
function PaginatedTable({
|
|
22
|
-
className,
|
|
23
|
-
style,
|
|
24
|
-
queryFn,
|
|
25
|
-
columns,
|
|
26
|
-
rowKey,
|
|
27
|
-
rowSelection,
|
|
28
|
-
queryEnabled,
|
|
29
|
-
queryParams,
|
|
30
|
-
showSequenceColumn,
|
|
31
|
-
operationColumn,
|
|
32
|
-
selectedRowKeys,
|
|
33
|
-
virtual,
|
|
34
|
-
title,
|
|
35
|
-
summary,
|
|
36
|
-
onSelectedRowKeysChange
|
|
37
|
-
}) {
|
|
38
|
-
const {
|
|
39
|
-
paginationParams,
|
|
40
|
-
sort,
|
|
41
|
-
setPaginationParams
|
|
42
|
-
} = store.useProTableStore(core.useShallow((state) => {
|
|
43
|
-
const {
|
|
44
|
-
paginationParams: paginationParams2,
|
|
45
|
-
sort: sort2,
|
|
46
|
-
setPaginationParams: setPaginationParams2
|
|
47
|
-
} = state;
|
|
48
|
-
return {
|
|
49
|
-
paginationParams: paginationParams2,
|
|
50
|
-
sort: sort2,
|
|
51
|
-
setPaginationParams: setPaginationParams2
|
|
52
|
-
};
|
|
53
|
-
}));
|
|
54
|
-
const processedColumns = useTableColumns.useTableColumns(columns, operationColumn, showSequenceColumn);
|
|
55
|
-
const result = core.useQuery({
|
|
56
|
-
queryFn,
|
|
57
|
-
queryKey: [queryFn.key, {
|
|
58
|
-
...queryParams,
|
|
59
|
-
[symbols.SYMBOL_PAGINATION]: paginationParams,
|
|
60
|
-
[symbols.SYMBOL_SORT]: sort
|
|
61
|
-
}],
|
|
62
|
-
enabled: !shared.isFunction(queryEnabled) || queryEnabled(queryParams)
|
|
63
|
-
});
|
|
64
|
-
const paginationProps = components.usePaginationProps({
|
|
65
|
-
paginationParams,
|
|
66
|
-
total: result.isSuccess ? result.data.total : 0
|
|
67
|
-
});
|
|
68
|
-
const selection = useRowSelection.useRowSelection(rowSelection, selectedRowKeys, onSelectedRowKeysChange);
|
|
69
|
-
const emitter = store.useProTableStore((state) => state.eventEmitter);
|
|
70
|
-
hooks.useEmitterEvent(emitter, "refetch", () => {
|
|
71
|
-
result.refetch();
|
|
72
|
-
});
|
|
73
|
-
react.useEffect(() => {
|
|
74
|
-
emitter.emit(result.isFetching ? "loading" : "loaded");
|
|
75
|
-
}, [result.isFetching, emitter]);
|
|
76
|
-
return /* @__PURE__ */ jsxRuntime.jsx(components.Table, { className, columns: processedColumns, dataSource: result.data?.items, loading: result.isFetching, pagination: paginationProps, rowSelection: selection, style, virtual, footer: summary ? (data) => /* @__PURE__ */ jsxRuntime.jsx(tableSummary.TableSummary, { data, summary }) : void 0, rowKey: rowKey ? (row) => {
|
|
77
|
-
if (shared.isString(rowKey)) {
|
|
78
|
-
return shared.get(row, rowKey);
|
|
79
|
-
}
|
|
80
|
-
return rowKey(row);
|
|
81
|
-
} : void 0, title: title ? (data) => /* @__PURE__ */ jsxRuntime.jsx(tableTitle.TableTitle, { data, title }) : void 0, onChange: (pagination) => {
|
|
82
|
-
setPaginationParams({
|
|
83
|
-
page: pagination.current,
|
|
84
|
-
size: pagination.pageSize
|
|
85
|
-
});
|
|
86
|
-
} });
|
|
87
|
-
}
|
|
88
|
-
function NonPaginatedTable({
|
|
89
|
-
className,
|
|
90
|
-
style,
|
|
91
|
-
queryFn,
|
|
92
|
-
columns,
|
|
93
|
-
rowKey,
|
|
94
|
-
rowSelection,
|
|
95
|
-
queryEnabled,
|
|
96
|
-
queryParams,
|
|
97
|
-
showSequenceColumn,
|
|
98
|
-
operationColumn,
|
|
99
|
-
selectedRowKeys,
|
|
100
|
-
virtual,
|
|
101
|
-
title,
|
|
102
|
-
summary,
|
|
103
|
-
onSelectedRowKeysChange
|
|
104
|
-
}) {
|
|
105
|
-
const processedColumns = useTableColumns.useTableColumns(columns, operationColumn, showSequenceColumn);
|
|
106
|
-
const sort = store.useProTableStore((state) => state.sort);
|
|
107
|
-
const result = core.useQuery({
|
|
108
|
-
queryFn,
|
|
109
|
-
queryKey: [queryFn.key, {
|
|
110
|
-
...queryParams,
|
|
111
|
-
[symbols.SYMBOL_SORT]: sort
|
|
112
|
-
}],
|
|
113
|
-
enabled: !shared.isFunction(queryEnabled) || queryEnabled(queryParams)
|
|
114
|
-
});
|
|
115
|
-
const selection = useRowSelection.useRowSelection(rowSelection, selectedRowKeys, onSelectedRowKeysChange);
|
|
116
|
-
const emitter = store.useProTableStore((state) => state.eventEmitter);
|
|
117
|
-
hooks.useEmitterEvent(emitter, "refetch", () => {
|
|
118
|
-
result.refetch();
|
|
119
|
-
});
|
|
120
|
-
react.useEffect(() => {
|
|
121
|
-
emitter.emit(result.isFetching ? "loading" : "loaded");
|
|
122
|
-
}, [result.isFetching, emitter]);
|
|
123
|
-
return /* @__PURE__ */ jsxRuntime.jsx(components.Table, { className, columns: processedColumns, dataSource: result.data, loading: result.isFetching, pagination: false, rowSelection: selection, style, virtual, footer: summary ? (data) => /* @__PURE__ */ jsxRuntime.jsx(tableSummary.TableSummary, { data, summary }) : void 0, rowKey: rowKey ? (row) => {
|
|
124
|
-
if (shared.isString(rowKey)) {
|
|
125
|
-
return shared.get(row, rowKey);
|
|
126
|
-
}
|
|
127
|
-
return rowKey(row);
|
|
128
|
-
} : void 0, title: title ? (data) => /* @__PURE__ */ jsxRuntime.jsx(tableTitle.TableTitle, { data, title }) : void 0 });
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
exports.NonPaginatedTable = NonPaginatedTable;
|
|
132
|
-
exports.PaginatedTable = PaginatedTable;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@emotion/react/jsx-runtime"),C=require("@vef-framework/components"),E=require("@vef-framework/core"),R=require("@vef-framework/hooks"),a=require("@vef-framework/shared"),M=require("react");require("../../../constants/index.cjs");require("../hooks/index.cjs");const m=require("../store.cjs"),N=require("./table-summary.cjs"),k=require("./table-title.cjs"),B=require("../hooks/use-table-columns.cjs"),F=require("../../../constants/symbols.cjs"),L=require("../hooks/use-row-selection.cjs");function A({className:S,style:T,queryFn:r,columns:P,rowKey:s,rowSelection:b,queryEnabled:c,queryParams:u,showSequenceColumn:f,operationColumn:h,selectedRowKeys:p,virtual:v,title:l,summary:g,onSelectedRowKeysChange:q}){const{paginationParams:d,sort:j,setPaginationParams:n}=m.useProTableStore(E.useShallow(e=>{const{paginationParams:_,sort:y,setPaginationParams:z}=e;return{paginationParams:_,sort:y,setPaginationParams:z}})),x=B.useTableColumns(P,h,f),o=E.useQuery({queryFn:r,queryKey:[r.key,{...u,[F.SYMBOL_PAGINATION]:d,[F.SYMBOL_SORT]:j}],enabled:!a.isFunction(c)||c(u)}),t=C.usePaginationProps({paginationParams:d,total:o.isSuccess?o.data.total:0}),Y=L.useRowSelection(b,p,q),O=m.useProTableStore(e=>e.eventEmitter);return R.useEmitterEvent(O,"refetch",()=>{o.refetch()}),M.useEffect(()=>{O.emit(o.isFetching?"loading":"loaded")},[o.isFetching,O]),i.jsx(C.Table,{className:S,columns:x,dataSource:o.data?.items,loading:o.isFetching,pagination:t,rowSelection:Y,style:T,virtual:v,footer:g?e=>i.jsx(N.TableSummary,{data:e,summary:g}):void 0,rowKey:s?e=>a.isString(s)?a.get(e,s):s(e):void 0,title:l?e=>i.jsx(k.TableTitle,{data:e,title:l}):void 0,onChange:e=>{n({page:e.current,size:e.pageSize})}})}function I({className:S,style:T,queryFn:r,columns:P,rowKey:s,rowSelection:b,queryEnabled:c,queryParams:u,showSequenceColumn:f,operationColumn:h,selectedRowKeys:p,virtual:v,title:l,summary:g,onSelectedRowKeysChange:q}){const d=B.useTableColumns(P,h,f),j=m.useProTableStore(t=>t.sort),n=E.useQuery({queryFn:r,queryKey:[r.key,{...u,[F.SYMBOL_SORT]:j}],enabled:!a.isFunction(c)||c(u)}),x=L.useRowSelection(b,p,q),o=m.useProTableStore(t=>t.eventEmitter);return R.useEmitterEvent(o,"refetch",()=>{n.refetch()}),M.useEffect(()=>{o.emit(n.isFetching?"loading":"loaded")},[n.isFetching,o]),i.jsx(C.Table,{className:S,columns:d,dataSource:n.data,loading:n.isFetching,pagination:!1,rowSelection:x,style:T,virtual:v,footer:g?t=>i.jsx(N.TableSummary,{data:t,summary:g}):void 0,rowKey:s?t=>a.isString(s)?a.get(t,s):s(t):void 0,title:l?t=>i.jsx(k.TableTitle,{data:t,title:l}):void 0})}exports.NonPaginatedTable=I;exports.PaginatedTable=A;
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const react = require('react');
|
|
7
|
-
|
|
8
|
-
const DataContext = react.createContext([]);
|
|
9
|
-
const DataProvider = DataContext.Provider;
|
|
10
|
-
function useData() {
|
|
11
|
-
return react.use(DataContext);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
exports.DataProvider = DataProvider;
|
|
15
|
-
exports.useData = useData;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=t.createContext([]),r=e.Provider;function a(){return t.use(e)}exports.DataProvider=r;exports.useData=a;
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const shared = require('@vef-framework/shared');
|
|
7
|
-
|
|
8
|
-
function createEventEmitter() {
|
|
9
|
-
return shared.createEventEmitter();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
exports.createEventEmitter = createEventEmitter;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared");function t(){return e.createEventEmitter()}exports.createEventEmitter=t;
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const useRowSelection = require('./use-row-selection.cjs');
|
|
7
|
-
const useTableColumns = require('./use-table-columns.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.useRowSelection = useRowSelection.useRowSelection;
|
|
12
|
-
exports.useTableColumns = useTableColumns.useTableColumns;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./use-row-selection.cjs"),o=require("./use-table-columns.cjs");exports.useRowSelection=e.useRowSelection;exports.useTableColumns=o.useTableColumns;
|
|
@@ -1,43 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const react = require('react');
|
|
7
|
-
|
|
8
|
-
function useRowSelection(config, selectedRowKeys, onSelectedRowKeysChange) {
|
|
9
|
-
const rowSelection = react.useMemo(() => {
|
|
10
|
-
if (!config) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const actualConfig = config === true ? {} : config;
|
|
14
|
-
const {
|
|
15
|
-
rowSelectDisabled,
|
|
16
|
-
checkStrictly,
|
|
17
|
-
hideSelectAll,
|
|
18
|
-
preserveSelectedRowKeys,
|
|
19
|
-
defaultSelectedRowKeys
|
|
20
|
-
} = actualConfig;
|
|
21
|
-
return {
|
|
22
|
-
align: "center",
|
|
23
|
-
columnWidth: 40,
|
|
24
|
-
defaultSelectedRowKeys,
|
|
25
|
-
fixed: "left",
|
|
26
|
-
getCheckboxProps: rowSelectDisabled ? (row) => {
|
|
27
|
-
return {
|
|
28
|
-
disabled: rowSelectDisabled(row)
|
|
29
|
-
};
|
|
30
|
-
} : void 0,
|
|
31
|
-
checkStrictly,
|
|
32
|
-
hideSelectAll,
|
|
33
|
-
preserveSelectedRowKeys,
|
|
34
|
-
selectedRowKeys,
|
|
35
|
-
onChange(selectedRowKeys2, selectedRows) {
|
|
36
|
-
onSelectedRowKeysChange?.(selectedRowKeys2, selectedRows);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}, [selectedRowKeys, onSelectedRowKeysChange, config]);
|
|
40
|
-
return rowSelection;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
exports.useRowSelection = useRowSelection;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react");function a(e,r,o){return S.useMemo(()=>{if(!e)return;const c=e===!0?{}:e,{rowSelectDisabled:l,checkStrictly:n,hideSelectAll:i,preserveSelectedRowKeys:u,defaultSelectedRowKeys:s}=c;return{align:"center",columnWidth:40,defaultSelectedRowKeys:s,fixed:"left",getCheckboxProps:l?t=>({disabled:l(t)}):void 0,checkStrictly:n,hideSelectAll:i,preserveSelectedRowKeys:u,selectedRowKeys:r,onChange(t,d){o?.(t,d)}}},[r,o,e])}exports.useRowSelection=a;
|
|
@@ -1,60 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const hooks = require('@vef-framework/hooks');
|
|
7
|
-
const shared = require('@vef-framework/shared');
|
|
8
|
-
const react = require('react');
|
|
9
|
-
const store = require('../store.cjs');
|
|
10
|
-
|
|
11
|
-
function useTableColumns(tableColumns, operationColumn, showSequenceColumn = true) {
|
|
12
|
-
const checkPermission = hooks.useCheckPermission();
|
|
13
|
-
const paginationParams = store.useProTableStore((state) => state.paginationParams);
|
|
14
|
-
return react.useMemo(() => {
|
|
15
|
-
const columns = showSequenceColumn ? [{
|
|
16
|
-
title: "序号",
|
|
17
|
-
width: 60,
|
|
18
|
-
align: "center",
|
|
19
|
-
fixed: "left",
|
|
20
|
-
key: "__sequence",
|
|
21
|
-
render(_value, _row, index) {
|
|
22
|
-
const page = paginationParams?.page;
|
|
23
|
-
const size = paginationParams?.size;
|
|
24
|
-
if (page && size) {
|
|
25
|
-
return (page - 1) * size + index + 1;
|
|
26
|
-
}
|
|
27
|
-
return index + 1;
|
|
28
|
-
}
|
|
29
|
-
}, ...tableColumns] : [...tableColumns];
|
|
30
|
-
if (!operationColumn) {
|
|
31
|
-
return columns;
|
|
32
|
-
}
|
|
33
|
-
const {
|
|
34
|
-
title,
|
|
35
|
-
width,
|
|
36
|
-
permTokens,
|
|
37
|
-
render
|
|
38
|
-
} = operationColumn;
|
|
39
|
-
if (permTokens) {
|
|
40
|
-
const isOperationColumnVisible = checkPermission(permTokens, "any");
|
|
41
|
-
if (!isOperationColumnVisible) {
|
|
42
|
-
return columns;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
columns.push({
|
|
46
|
-
title: title || "操作",
|
|
47
|
-
width,
|
|
48
|
-
align: "center",
|
|
49
|
-
fixed: "right",
|
|
50
|
-
key: "__operations",
|
|
51
|
-
shouldCellUpdate: (current, prev) => !shared.isDeepEqual(current, prev),
|
|
52
|
-
render(_value, row, index) {
|
|
53
|
-
return render(row, index);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
return columns;
|
|
57
|
-
}, [tableColumns, operationColumn, checkPermission, showSequenceColumn, paginationParams.page, paginationParams.size]);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
exports.useTableColumns = useTableColumns;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@vef-framework/hooks"),m=require("@vef-framework/shared"),_=require("react"),k=require("../store.cjs");function P(n,o,u=!0){const a=h.useCheckPermission(),r=k.useProTableStore(e=>e.paginationParams);return _.useMemo(()=>{const e=u?[{title:"序号",width:60,align:"center",fixed:"left",key:"__sequence",render(t,i,s){const l=r?.page,d=r?.size;return l&&d?(l-1)*d+s+1:s+1}},...n]:[...n];if(!o)return e;const{title:p,width:g,permTokens:c,render:f}=o;return c&&!a(c,"any")||e.push({title:p||"操作",width:g,align:"center",fixed:"right",key:"__operations",shouldCellUpdate:(t,i)=>!m.isDeepEqual(t,i),render(t,i,s){return f(i,s)}}),e},[n,o,a,u,r.page,r.size])}exports.useTableColumns=P;
|
|
@@ -1,53 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
7
|
-
require('@emotion/react');
|
|
8
|
-
const components = require('@vef-framework/components');
|
|
9
|
-
const react = require('react');
|
|
10
|
-
require('./components/index.cjs');
|
|
11
|
-
const store = require('./store.cjs');
|
|
12
|
-
const ref = require('./components/ref.cjs');
|
|
13
|
-
const table = require('./components/table.cjs');
|
|
14
|
-
|
|
15
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() {
|
|
16
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
17
|
-
}
|
|
18
|
-
const containerStyle = process.env.NODE_ENV === "production" ? {
|
|
19
|
-
name: "13udsys",
|
|
20
|
-
styles: "height:100%"
|
|
21
|
-
} : {
|
|
22
|
-
name: "13udsys",
|
|
23
|
-
styles: "height:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9u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HF1ZXJ5RW5hYmxlZD17cXVlcnlFbmFibGVkfVxuICAgICAgICAgICAgICAgIHF1ZXJ5Rm49e3Jlc3RQcm9wcy5xdWVyeUZufVxuICAgICAgICAgICAgICAgIHF1ZXJ5UGFyYW1zPXtxdWVyeVBhcmFtc31cbiAgICAgICAgICAgICAgICByb3dLZXk9e3Jvd0tleX1cbiAgICAgICAgICAgICAgICByb3dTZWxlY3Rpb249e3Jvd1NlbGVjdGlvbn1cbiAgICAgICAgICAgICAgICBzZWxlY3RlZFJvd0tleXM9e3NlbGVjdGVkUm93S2V5c31cbiAgICAgICAgICAgICAgICBzaG93U2VxdWVuY2VDb2x1bW49e3Nob3dTZXF1ZW5jZUNvbHVtbn1cbiAgICAgICAgICAgICAgICBzdHlsZT17c3R5bGV9XG4gICAgICAgICAgICAgICAgdmlydHVhbD17dmlydHVhbH1cbiAgICAgICAgICAgICAgICBvblNlbGVjdGVkUm93S2V5c0NoYW5nZT17b25TZWxlY3RlZFJvd0tleXNDaGFuZ2V9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgOiAoXG4gICAgICAgICAgICAgIDxQYWdpbmF0ZWRUYWJsZVxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y2xhc3NOYW1lfVxuICAgICAgICAgICAgICAgIGNvbHVtbnM9e2NvbHVtbnN9XG4gICAgICAgICAgICAgICAgb3BlcmF0aW9uQ29sdW1uPXtvcGVyYXRpb25Db2x1bW59XG4gICAgICAgICAgICAgICAgcXVlcnlFbmFibGVkPXtxdWVyeUVuYWJsZWR9XG4gICAgICAgICAgICAgICAgcXVlcnlGbj17cmVzdFByb3BzLnF1ZXJ5Rm59XG4gICAgICAgICAgICAgICAgcXVlcnlQYXJhbXM9e3F1ZXJ5UGFyYW1zfVxuICAgICAgICAgICAgICAgIHJvd0tleT17cm93S2V5fVxuICAgICAgICAgICAgICAgIHJvd1NlbGVjdGlvbj17cm93U2VsZWN0aW9ufVxuICAgICAg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wiO1xuZXhwb3J0IHR5cGUge1xuICBQcm9UYWJsZVN0YXRlXG59IGZyb20gXCIuL3N0b3JlXCI7XG5leHBvcnQgdHlwZSB7XG4gIE9wZXJhdGlvbkNvbHVtbkNvbmZpZyxcbiAgUGFyYW1zV2l0aFBhZ2luYXRpb24sXG4gIFBhcmFtc1dpdGhTb3J0LFxuICBQcm9UYWJsZVJlZixcbiAgUm93U2VsZWN0aW9uQ29uZmlnXG59IGZyb20gXCIuL3R5cGVzXCI7XG4iXX0= */",
|
|
24
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
|
-
};
|
|
26
|
-
const ProTable = react.memo(({
|
|
27
|
-
className,
|
|
28
|
-
style,
|
|
29
|
-
columns,
|
|
30
|
-
rowKey,
|
|
31
|
-
rowSelection,
|
|
32
|
-
queryEnabled,
|
|
33
|
-
queryParams,
|
|
34
|
-
showSequenceColumn,
|
|
35
|
-
operationColumn,
|
|
36
|
-
selectedRowKeys,
|
|
37
|
-
virtual,
|
|
38
|
-
ref: ref$1,
|
|
39
|
-
header,
|
|
40
|
-
footer,
|
|
41
|
-
onSelectedRowKeysChange,
|
|
42
|
-
...restProps
|
|
43
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs(store.ProTableStoreProvider, { children: [
|
|
44
|
-
/* @__PURE__ */ jsxRuntime.jsx(ref.ProTableRefHolder, { ref: ref$1 }),
|
|
45
|
-
/* @__PURE__ */ jsxRuntime.jsxs(components.Stack, { css: containerStyle, gap: "middle", children: [
|
|
46
|
-
header,
|
|
47
|
-
restProps.isPaginated === false ? /* @__PURE__ */ jsxRuntime.jsx(table.NonPaginatedTable, { className, columns, operationColumn, queryEnabled, queryFn: restProps.queryFn, queryParams, rowKey, rowSelection, selectedRowKeys, showSequenceColumn, style, virtual, onSelectedRowKeysChange }) : /* @__PURE__ */ jsxRuntime.jsx(table.PaginatedTable, { className, columns, operationColumn, queryEnabled, queryFn: restProps.queryFn, queryParams, rowKey, rowSelection, selectedRowKeys, showSequenceColumn, style, virtual, onSelectedRowKeysChange }),
|
|
48
|
-
footer
|
|
49
|
-
] })
|
|
50
|
-
] }));
|
|
51
|
-
ProTable.displayName = "ProTable";
|
|
52
|
-
|
|
53
|
-
exports.ProTable = ProTable;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("@emotion/react/jsx-runtime");require("@emotion/react");const u=require("@vef-framework/components"),Y=require("react");require("./components/index.cjs");const t=require("./store.cjs"),x=require("./components/ref.cjs"),i=require("./components/table.cjs");function s(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}const J=process.env.NODE_ENV==="production"?{name:"13udsys",styles:"height:100%"}:{name:"13udsys",styles:"height:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy92ZW51cy9WRUYvdmVmLWZyYW1ld29yay1yZWFjdC9wYWNrYWdlcy9zdGFydGVyL3NyYy9jb21wb25lbnRzL3Byby10YWJsZS9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBY3VCIiwiZmlsZSI6Ii9Vc2Vycy92ZW51cy9WRUYvdmVmLWZyYW1ld29yay1yZWFjdC9wYWNrYWdlcy9zdGFydGVyL3NyYy9jb21wb25lbnRzL3Byby10YWJsZS9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFByb3BzV2l0aFJlZiB9IGZyb20gXCJAdmVmLWZyYW1ld29yay9jb21wb25lbnRzXCI7XG5pbXBvcnQgdHlwZSB7IEF3YWl0YWJsZSB9IGZyb20gXCJAdmVmLWZyYW1ld29yay9zaGFyZWRcIjtcbmltcG9ydCB0eXBlIHsgRkMsIFJlYWN0Tm9kZSB9IGZyb20gXCJyZWFjdFwiO1xuXG5pbXBvcnQgdHlwZSB7IFByb1RhY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PikgPT4gKFxuICA8UHJvVGFibGVTdG9yZVByb3ZpZGVyPlxuICAgIDxQcm9UYWJsZVJlZkhvbGRlciByZWY9e3JlZn0gLz5cblxuICAgIDxTdGFjayBjc3M9e2NvbnRhaW5lclN0eWxlfSBnYXA9XCJtaWRkbGVcIj5cbiAgICAgIHtoZWFkZXJ9XG5cbiAgICAgIHtcbiAgICAgICAgcmVzdFByb3BzLmlzUGFnaW5hdGVkID09PSBmYWxzZVxuICAgICAgICAgID8gKFxuICAgICAgICAgICAgICA8Tm9uUGFnaW5hdGVkVGFibGVcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2NsYXNzTmFtZX1cbiAgICAgICAgICAgICAgICBjb2x1bW5zPXtjb2x1bW5zfVxuICAgICAgICAgICAgICAgIG9wZXJhdGlvbkNvbHVtbj17b3BlcmF0aW9uQ29sdW1ufVxuICAgICAgICAgICAgICAgIHF1ZXJ5RW5hYmxlZD17cXVlcnlFbmFibGVkfVxuICAgICAgICAgICAgICAgIHF1ZXJ5Rm49e3Jlc3RQcm9wcy5xdWVyeUZufVxuICAgICAgICAgICAgICAgIHF1ZXJ5UGFyYW1zPXtxdWVyeVBhcmFtc31cbiAgICAgICAgICAgICAgICByb3dLZXk9e3Jvd0tleX1cbiAgICAgICAgICAgICAgICByb3dTZWxlY3Rpb249e3Jvd1NlbGVjdGlvbn1cbiAgICAgICAgICAgICAgICBzZWxlY3RlZFJvd0tleXM9e3NlbGVjdGVkUm93S2V5c31cbiAgICAgICAgICAgICAgICBzaG93U2VxdWVuY2VDb2x1bW49e3Nob3dTZXF1ZW5jZUNvbHVtbn1cbiAgICAgICAgICAgICAgICBzdHlsZT17c3R5bGV9XG4gICAgICAgICAgICAgICAgdmlydHVhbD17dmlydHVhbH1cbiAgICAgICAgICAgICAgICBvblNlbGVjdGVkUm93S2V5c0NoYW5nZT17b25TZWxlY3RlZFJvd0tleXNDaGFuZ2V9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4g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JlYWN0LlJlZjxQcm9UYWJsZVJlZj47XG4gIH1cbikgPT4gQXdhaXRhYmxlPFJlYWN0Tm9kZT4pICYgUGljazxGQywgXCJkaXNwbGF5TmFtZVwiPjtcblByb1RhYmxlLmRpc3BsYXlOYW1lID0gXCJQcm9UYWJsZVwiO1xuXG5leHBvcnQge1xuICBPcGVyYXRpb25CdXR0b25Hcm91cCxcbiAgVGFibGVTdWJzY3JpYmVyIGFzIFByb1RhYmxlU3Vic2NyaWJlcixcbiAgdHlwZSBPcGVyYXRpb25CdXR0b25Hcm91cFByb3BzLFxuICB0eXBlIFRhYmxlU3Vic2NyaWJlclByb3BzIGFzIFByb1RhYmxlU3Vic2NyaWJlclByb3BzXG59IGZyb20gXCIuL2NvbXBvbmVudHNcIjtcbmV4cG9ydCB0eXBlIHtcbiAgUHJvVGFibGVQcm9wc1xufSBmcm9tIFwiLi9wcm9wc1wiO1xuZXhwb3J0IHR5cGUge1xuICBQcm9UYWJsZVN0YXRlXG59IGZyb20gXCIuL3N0b3JlXCI7XG5leHBvcnQgdHlwZSB7XG4gIE9wZXJhdGlvbkNvbHVtbkNvbmZpZyxcbiAgUGFyYW1zV2l0aFBhZ2luYXRpb24sXG4gIFBhcmFtc1dpdGhTb3J0LFxuICBQcm9UYWJsZVJlZixcbiAgUm93U2VsZWN0aW9uQ29uZmlnXG59IGZyb20gXCIuL3R5cGVzXCI7XG4iXX0= */",toString:s},m=Y.memo(({className:b,style:C,columns:c,rowKey:A,rowSelection:l,queryEnabled:V,queryParams:G,showSequenceColumn:X,operationColumn:Z,selectedRowKeys:y,virtual:W,ref:F,header:e,footer:B,onSelectedRowKeysChange:d,...g})=>I.jsxs(t.ProTableStoreProvider,{children:[I.jsx(x.ProTableRefHolder,{ref:F}),I.jsxs(u.Stack,{css:J,gap:"middle",children:[e,g.isPaginated===!1?I.jsx(i.NonPaginatedTable,{className:b,columns:c,operationColumn:Z,queryEnabled:V,queryFn:g.queryFn,queryParams:G,rowKey:A,rowSelection:l,selectedRowKeys:y,showSequenceColumn:X,style:C,virtual:W,onSelectedRowKeysChange:d}):I.jsx(i.PaginatedTable,{className:b,columns:c,operationColumn:Z,queryEnabled:V,queryFn:g.queryFn,queryParams:G,rowKey:A,rowSelection:l,selectedRowKeys:y,showSequenceColumn:X,style:C,virtual:W,onSelectedRowKeysChange:d}),B]})]}));m.displayName="ProTable";exports.ProTable=m;
|
|
@@ -1,40 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const components = require('@vef-framework/components');
|
|
7
|
-
const core = require('@vef-framework/core');
|
|
8
|
-
const event = require('./event.cjs');
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
StoreProvider: ProTableStoreProvider,
|
|
12
|
-
useStore: useProTableStore,
|
|
13
|
-
useStoreApi: useProTableStoreApi
|
|
14
|
-
} = core.createComponentStore("ProTable", (set, get) => {
|
|
15
|
-
return {
|
|
16
|
-
eventEmitter: event.createEventEmitter(),
|
|
17
|
-
paginationParams: {
|
|
18
|
-
page: 1,
|
|
19
|
-
size: components.pageSizeOptions[1]
|
|
20
|
-
},
|
|
21
|
-
setPaginationParams: (params) => {
|
|
22
|
-
set((state) => {
|
|
23
|
-
state.paginationParams = params;
|
|
24
|
-
});
|
|
25
|
-
},
|
|
26
|
-
sort: [],
|
|
27
|
-
setSort: (sort) => {
|
|
28
|
-
set((state) => {
|
|
29
|
-
state.sort = sort;
|
|
30
|
-
});
|
|
31
|
-
},
|
|
32
|
-
refetch: () => {
|
|
33
|
-
get().eventEmitter.emit("refetch");
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
exports.ProTableStoreProvider = ProTableStoreProvider;
|
|
39
|
-
exports.useProTableStore = useProTableStore;
|
|
40
|
-
exports.useProTableStoreApi = useProTableStoreApi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@vef-framework/components"),i=require("@vef-framework/core"),n=require("./event.cjs"),{StoreProvider:s,useStore:P,useStoreApi:S}=i.createComponentStore("ProTable",(t,o)=>({eventEmitter:n.createEventEmitter(),paginationParams:{page:1,size:a.pageSizeOptions[1]},setPaginationParams:e=>{t(r=>{r.paginationParams=e})},sort:[],setSort:e=>{t(r=>{r.sort=e})},refetch:()=>{o().eventEmitter.emit("refetch")}}));exports.ProTableStoreProvider=s;exports.useProTableStore=P;exports.useProTableStoreApi=S;
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const react = require('react');
|
|
7
|
-
|
|
8
|
-
const Context = react.createContext(null);
|
|
9
|
-
function useRouterContextHook() {
|
|
10
|
-
return react.use(Context);
|
|
11
|
-
}
|
|
12
|
-
const RouterContextHookProvider = Context.Provider;
|
|
13
|
-
|
|
14
|
-
exports.RouterContextHookProvider = RouterContextHookProvider;
|
|
15
|
-
exports.useRouterContextHook = useRouterContextHook;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),o=e.createContext(null);function t(){return e.use(o)}const r=o.Provider;exports.RouterContextHookProvider=r;exports.useRouterContextHook=t;
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
7
|
-
const reactRouter = require('@tanstack/react-router');
|
|
8
|
-
const context = require('./context.cjs');
|
|
9
|
-
require('./props.cjs');
|
|
10
|
-
|
|
11
|
-
function RouterProvider({
|
|
12
|
-
router
|
|
13
|
-
}) {
|
|
14
|
-
const hook = context.useRouterContextHook();
|
|
15
|
-
if (!hook) {
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactRouter.RouterProvider, { router });
|
|
17
|
-
}
|
|
18
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouterProviderWithContext, { router, useRouterContext: hook });
|
|
19
|
-
}
|
|
20
|
-
function RouterProviderWithContext({
|
|
21
|
-
useRouterContext,
|
|
22
|
-
router
|
|
23
|
-
}) {
|
|
24
|
-
const context = useRouterContext();
|
|
25
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactRouter.RouterProvider, { context, router });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
exports.RouterContextHookProvider = context.RouterContextHookProvider;
|
|
29
|
-
exports.RouterProvider = RouterProvider;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@emotion/react/jsx-runtime"),r=require("@tanstack/react-router"),u=require("./context.cjs");require("./props.cjs");function i({router:e}){const o=u.useRouterContextHook();return o?t.jsx(s,{router:e,useRouterContext:o}):t.jsx(r.RouterProvider,{router:e})}function s({useRouterContext:e,router:o}){const n=e();return t.jsx(r.RouterProvider,{context:n,router:o})}exports.RouterContextHookProvider=u.RouterContextHookProvider;exports.RouterProvider=i;
|