@antelopejs/interface-dms 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/README.md +2 -2
- package/dist/attachments.d.ts +19 -10
- package/dist/attachments.js +15 -0
- package/dist/attachments.js.map +1 -1
- package/dist/auth/db/internal/sessions.model.d.ts +9 -0
- package/dist/auth/db/internal/sessions.model.js +31 -0
- package/dist/auth/db/internal/sessions.model.js.map +1 -0
- package/dist/auth/db/models/sessions.model.d.ts +16 -2
- package/dist/auth/db/models/sessions.model.js +33 -41
- package/dist/auth/db/models/sessions.model.js.map +1 -1
- package/dist/auth/db/models/userExternalIdentities.model.d.ts +11 -0
- package/dist/auth/db/models/userExternalIdentities.model.js +11 -0
- package/dist/auth/db/models/userExternalIdentities.model.js.map +1 -1
- package/dist/auth/db/models/users.model.d.ts +13 -0
- package/dist/auth/db/models/users.model.js +13 -0
- package/dist/auth/db/models/users.model.js.map +1 -1
- package/dist/auth/db/tables/sessions.table.d.ts +6 -1
- package/dist/auth/db/tables/sessions.table.js +0 -4
- package/dist/auth/db/tables/sessions.table.js.map +1 -1
- package/dist/auth/db/tables/userExternalIdentities.table.d.ts +24 -0
- package/dist/auth/db/tables/userExternalIdentities.table.js +13 -0
- package/dist/auth/db/tables/userExternalIdentities.table.js.map +1 -1
- package/dist/auth/db/tables/users.table.d.ts +60 -0
- package/dist/auth/db/tables/users.table.js +32 -0
- package/dist/auth/db/tables/users.table.js.map +1 -1
- package/dist/auth/index.d.ts +114 -10
- package/dist/auth/index.js +110 -17
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/internal/request-authenticators.d.ts +6 -0
- package/dist/auth/internal/request-authenticators.js +82 -0
- package/dist/auth/internal/request-authenticators.js.map +1 -0
- package/dist/auth/internal/request-principal.d.ts +10 -0
- package/dist/auth/internal/request-principal.js +27 -0
- package/dist/auth/internal/request-principal.js.map +1 -0
- package/dist/auth/internal/user-agent.d.ts +10 -0
- package/dist/auth/internal/user-agent.js +3 -0
- package/dist/auth/internal/user-agent.js.map +1 -0
- package/dist/auth/password.d.ts +19 -0
- package/dist/auth/password.js +23 -0
- package/dist/auth/password.js.map +1 -1
- package/dist/auth/request-authenticators.d.ts +4 -3
- package/dist/auth/request-authenticators.js +0 -77
- package/dist/auth/request-authenticators.js.map +1 -1
- package/dist/base/activity-feed.d.ts +210 -0
- package/dist/base/activity-feed.js +104 -0
- package/dist/base/activity-feed.js.map +1 -0
- package/dist/base/banner.d.ts +111 -0
- package/dist/base/banner.js +93 -0
- package/dist/base/banner.js.map +1 -0
- package/dist/base/block-registry/helpers.d.ts +26 -0
- package/dist/base/block-registry/helpers.js +27 -1
- package/dist/base/block-registry/helpers.js.map +1 -1
- package/dist/base/block-registry/internal/describe.d.ts +35 -0
- package/dist/base/block-registry/{describe.js → internal/describe.js} +50 -0
- package/dist/base/block-registry/internal/describe.js.map +1 -0
- package/dist/base/block-registry/internal/ui.d.ts +23 -0
- package/dist/base/block-registry/internal/ui.js +35 -0
- package/dist/base/block-registry/internal/ui.js.map +1 -0
- package/dist/base/block-registry/registry.d.ts +24 -0
- package/dist/base/block-registry/registry.js +30 -1
- package/dist/base/block-registry/registry.js.map +1 -1
- package/dist/base/block-registry/types.d.ts +149 -0
- package/dist/base/block-types.d.ts +22 -2
- package/dist/base/block-types.js +24 -2
- package/dist/base/block-types.js.map +1 -1
- package/dist/base/card.d.ts +100 -0
- package/dist/base/card.js +91 -0
- package/dist/base/card.js.map +1 -0
- package/dist/base/chart-card.d.ts +9 -2
- package/dist/base/chart-card.js +14 -1
- package/dist/base/chart-card.js.map +1 -1
- package/dist/base/chart-schemas.d.ts +127 -115
- package/dist/base/chart-schemas.js +18 -56
- package/dist/base/chart-schemas.js.map +1 -1
- package/dist/base/chart-type.d.ts +15 -0
- package/dist/base/chart-type.js +20 -0
- package/dist/base/chart-type.js.map +1 -0
- package/dist/base/chart.d.ts +31 -22
- package/dist/base/chart.js +27 -54
- package/dist/base/chart.js.map +1 -1
- package/dist/base/confirm-dialog.d.ts +6 -0
- package/dist/base/confirm-dialog.js +18 -0
- package/dist/base/confirm-dialog.js.map +1 -0
- package/dist/base/data-sources.d.ts +38 -0
- package/dist/base/data-sources.js +13 -0
- package/dist/base/data-sources.js.map +1 -1
- package/dist/base/data-types/compare-types.d.ts +0 -2
- package/dist/base/data-types/compare-types.js +18 -13
- package/dist/base/data-types/compare-types.js.map +1 -1
- package/dist/base/data-types/core.d.ts +55 -0
- package/dist/base/data-types/core.js +42 -0
- package/dist/base/data-types/core.js.map +1 -1
- package/dist/base/data-types/default-types.d.ts +241 -62
- package/dist/base/data-types/default-types.js +257 -135
- package/dist/base/data-types/default-types.js.map +1 -1
- package/dist/base/data-types/field-types.d.ts +164 -0
- package/dist/base/data-types/field-types.js +236 -0
- package/dist/base/data-types/field-types.js.map +1 -0
- package/dist/base/data-types/index.d.ts +1 -0
- package/dist/base/data-types/index.js +21 -0
- package/dist/base/data-types/index.js.map +1 -1
- package/dist/base/data-types/internal/compare-types.d.ts +3 -0
- package/dist/base/data-types/internal/compare-types.js +15 -0
- package/dist/base/data-types/internal/compare-types.js.map +1 -0
- package/dist/base/data-types/status-type.d.ts +2 -1
- package/dist/base/data-types/status-type.js +6 -0
- package/dist/base/data-types/status-type.js.map +1 -1
- package/dist/base/display.d.ts +124 -0
- package/dist/base/display.js +95 -0
- package/dist/base/display.js.map +1 -0
- package/dist/base/empty-state.d.ts +106 -0
- package/dist/base/empty-state.js +109 -0
- package/dist/base/empty-state.js.map +1 -0
- package/dist/base/export-jobs.d.ts +39 -1
- package/dist/base/export-jobs.js +12 -3
- package/dist/base/export-jobs.js.map +1 -1
- package/dist/base/form-block-schema.d.ts +345 -28
- package/dist/base/form-block-schema.js +83 -12
- package/dist/base/form-block-schema.js.map +1 -1
- package/dist/base/form-schema.d.ts +137 -22
- package/dist/base/form-schema.js +139 -42
- package/dist/base/form-schema.js.map +1 -1
- package/dist/base/form-types.d.ts +139 -4
- package/dist/base/form-types.js +7 -1
- package/dist/base/form-types.js.map +1 -1
- package/dist/base/form.js +7 -0
- package/dist/base/form.js.map +1 -1
- package/dist/base/grid.d.ts +57 -0
- package/dist/base/grid.js +43 -0
- package/dist/base/grid.js.map +1 -1
- package/dist/base/helpers/file-refs.js +5 -1
- package/dist/base/helpers/file-refs.js.map +1 -1
- package/dist/base/index.d.ts +11 -1
- package/dist/base/index.js +16 -1
- package/dist/base/index.js.map +1 -1
- package/dist/base/internal/button-availability.d.ts +17 -0
- package/dist/base/internal/button-availability.js +31 -0
- package/dist/base/internal/button-availability.js.map +1 -0
- package/dist/base/internal/chart-schemas.d.ts +6 -0
- package/dist/base/internal/chart-schemas.js +70 -0
- package/dist/base/internal/chart-schemas.js.map +1 -0
- package/dist/base/internal/chart.d.ts +22 -0
- package/dist/base/internal/chart.js +37 -0
- package/dist/base/internal/chart.js.map +1 -0
- package/dist/base/internal/confirm-dialog.d.ts +13 -0
- package/dist/base/internal/confirm-dialog.js +24 -0
- package/dist/base/internal/confirm-dialog.js.map +1 -0
- package/dist/base/internal/display.d.ts +13 -0
- package/dist/base/internal/display.js +18 -0
- package/dist/base/internal/display.js.map +1 -0
- package/dist/base/internal/export-jobs.d.ts +2 -0
- package/dist/base/internal/export-jobs.js +6 -0
- package/dist/base/internal/export-jobs.js.map +1 -0
- package/dist/base/internal/form-block-schema.d.ts +6 -0
- package/dist/base/internal/form-block-schema.js +10 -0
- package/dist/base/internal/form-block-schema.js.map +1 -0
- package/dist/base/internal/form-schema.d.ts +7 -0
- package/dist/base/internal/form-schema.js +26 -0
- package/dist/base/internal/form-schema.js.map +1 -0
- package/dist/base/internal/layouts.d.ts +39 -0
- package/dist/base/internal/layouts.js +3 -0
- package/dist/base/internal/layouts.js.map +1 -0
- package/dist/base/internal/query-response.d.ts +24 -0
- package/dist/base/internal/query-response.js +47 -0
- package/dist/base/internal/query-response.js.map +1 -0
- package/dist/base/internal/searchable.d.ts +6 -0
- package/dist/base/internal/searchable.js +15 -0
- package/dist/base/internal/searchable.js.map +1 -0
- package/dist/base/key-value-list.d.ts +160 -0
- package/dist/base/key-value-list.js +107 -0
- package/dist/base/key-value-list.js.map +1 -0
- package/dist/base/kpi-card.d.ts +12 -4
- package/dist/base/kpi-card.js +7 -0
- package/dist/base/kpi-card.js.map +1 -1
- package/dist/base/layouts.d.ts +35 -0
- package/dist/base/layouts.js +41 -7
- package/dist/base/layouts.js.map +1 -1
- package/dist/base/meter.d.ts +186 -0
- package/dist/base/meter.js +134 -0
- package/dist/base/meter.js.map +1 -0
- package/dist/base/nav-card-grid.d.ts +173 -0
- package/dist/base/nav-card-grid.js +89 -0
- package/dist/base/nav-card-grid.js.map +1 -0
- package/dist/base/period-selector.d.ts +20 -0
- package/dist/base/period-selector.js +23 -0
- package/dist/base/period-selector.js.map +1 -1
- package/dist/base/placeholder.d.ts +26 -0
- package/dist/base/placeholder.js +12 -0
- package/dist/base/placeholder.js.map +1 -1
- package/dist/base/query-response.d.ts +51 -1
- package/dist/base/query-response.js +43 -26
- package/dist/base/query-response.js.map +1 -1
- package/dist/base/resource-form-schema.d.ts +18 -0
- package/dist/base/resource-form-schema.js +20 -3
- package/dist/base/resource-form-schema.js.map +1 -1
- package/dist/base/searchable.d.ts +2 -0
- package/dist/base/searchable.js +4 -0
- package/dist/base/searchable.js.map +1 -1
- package/dist/base/section.d.ts +105 -0
- package/dist/base/section.js +123 -0
- package/dist/base/section.js.map +1 -0
- package/dist/base/stack.d.ts +113 -0
- package/dist/base/stack.js +58 -0
- package/dist/base/stack.js.map +1 -1
- package/dist/base/stat-group.d.ts +152 -0
- package/dist/base/stat-group.js +97 -0
- package/dist/base/stat-group.js.map +1 -0
- package/dist/base/tab.d.ts +25 -8
- package/dist/base/tab.js +11 -0
- package/dist/base/tab.js.map +1 -1
- package/dist/base/table-view/column-display.d.ts +195 -0
- package/dist/base/table-view/column-display.js +131 -0
- package/dist/base/table-view/column-display.js.map +1 -0
- package/dist/base/table-view/data-functions.d.ts +36 -14
- package/dist/base/table-view/data-functions.js +26 -1
- package/dist/base/table-view/data-functions.js.map +1 -1
- package/dist/base/table-view/factory-helpers.d.ts +0 -42
- package/dist/base/table-view/factory-helpers.js +1 -244
- package/dist/base/table-view/factory-helpers.js.map +1 -1
- package/dist/base/table-view/factory.d.ts +5 -1
- package/dist/base/table-view/factory.js +158 -202
- package/dist/base/table-view/factory.js.map +1 -1
- package/dist/base/table-view/internal/auth.d.ts +33 -0
- package/dist/base/table-view/{auth.js → internal/auth.js} +45 -6
- package/dist/base/table-view/internal/auth.js.map +1 -0
- package/dist/base/table-view/internal/column-display.d.ts +18 -0
- package/dist/base/table-view/internal/column-display.js +37 -0
- package/dist/base/table-view/internal/column-display.js.map +1 -0
- package/dist/base/table-view/internal/data-functions.d.ts +14 -0
- package/dist/base/table-view/internal/data-functions.js +3 -0
- package/dist/base/table-view/internal/data-functions.js.map +1 -0
- package/dist/base/table-view/internal/factory-helpers.d.ts +213 -0
- package/dist/base/table-view/internal/factory-helpers.js +477 -0
- package/dist/base/table-view/internal/factory-helpers.js.map +1 -0
- package/dist/base/table-view/{files.d.ts → internal/files.d.ts} +5 -0
- package/dist/base/table-view/{files.js → internal/files.js} +14 -4
- package/dist/base/table-view/internal/files.js.map +1 -0
- package/dist/base/table-view/internal/footer.d.ts +33 -0
- package/dist/base/table-view/internal/footer.js +112 -0
- package/dist/base/table-view/internal/footer.js.map +1 -0
- package/dist/base/table-view/{guards.d.ts → internal/guards.d.ts} +3 -0
- package/dist/base/table-view/internal/guards.js +134 -0
- package/dist/base/table-view/internal/guards.js.map +1 -0
- package/dist/base/table-view/internal/meta.d.ts +5 -0
- package/dist/base/table-view/internal/meta.js +13 -0
- package/dist/base/table-view/internal/meta.js.map +1 -0
- package/dist/base/table-view/internal/nav-badges.d.ts +9 -0
- package/dist/base/table-view/internal/nav-badges.js +79 -0
- package/dist/base/table-view/internal/nav-badges.js.map +1 -0
- package/dist/base/table-view/internal/options.d.ts +6 -0
- package/dist/base/table-view/internal/options.js +10 -0
- package/dist/base/table-view/internal/options.js.map +1 -0
- package/dist/base/table-view/internal/realtime-listeners.d.ts +4 -0
- package/dist/base/table-view/internal/realtime-listeners.js +7 -0
- package/dist/base/table-view/internal/realtime-listeners.js.map +1 -0
- package/dist/base/table-view/internal/realtime.d.ts +39 -0
- package/dist/base/table-view/internal/realtime.js +163 -0
- package/dist/base/table-view/internal/realtime.js.map +1 -0
- package/dist/base/table-view/internal/request-filter.d.ts +75 -0
- package/dist/base/table-view/internal/request-filter.js +154 -0
- package/dist/base/table-view/internal/request-filter.js.map +1 -0
- package/dist/base/table-view/internal/resource-form.d.ts +25 -0
- package/dist/base/table-view/internal/resource-form.js +91 -0
- package/dist/base/table-view/internal/resource-form.js.map +1 -0
- package/dist/base/table-view/{row-rules.d.ts → internal/row-rules.d.ts} +5 -2
- package/dist/base/table-view/{row-rules.js → internal/row-rules.js} +20 -19
- package/dist/base/table-view/internal/row-rules.js.map +1 -0
- package/dist/base/table-view/internal/tabs.d.ts +39 -0
- package/dist/base/table-view/internal/tabs.js +116 -0
- package/dist/base/table-view/internal/tabs.js.map +1 -0
- package/dist/base/table-view/internal/validation.d.ts +99 -0
- package/dist/base/table-view/internal/validation.js +297 -0
- package/dist/base/table-view/internal/validation.js.map +1 -0
- package/dist/base/table-view/internal/views.d.ts +14 -0
- package/dist/base/table-view/internal/views.js +42 -0
- package/dist/base/table-view/internal/views.js.map +1 -0
- package/dist/base/table-view/internal/writer.d.ts +39 -0
- package/dist/base/table-view/internal/writer.js +55 -0
- package/dist/base/table-view/internal/writer.js.map +1 -0
- package/dist/base/table-view/meta.d.ts +77 -4
- package/dist/base/table-view/meta.js +133 -13
- package/dist/base/table-view/meta.js.map +1 -1
- package/dist/base/table-view/options.d.ts +749 -28
- package/dist/base/table-view/options.js +9 -2
- package/dist/base/table-view/options.js.map +1 -1
- package/dist/base/table-view/realtime.d.ts +26 -17
- package/dist/base/table-view/realtime.js +29 -126
- package/dist/base/table-view/realtime.js.map +1 -1
- package/dist/base/table-view/resource-form.d.ts +11 -5
- package/dist/base/table-view/resource-form.js +15 -59
- package/dist/base/table-view/resource-form.js.map +1 -1
- package/dist/base/table-view/routes.d.ts +29 -0
- package/dist/base/table-view/routes.js +71 -6
- package/dist/base/table-view/routes.js.map +1 -1
- package/dist/base/table-view/schema.d.ts +483 -69
- package/dist/base/table-view/schema.js +163 -18
- package/dist/base/table-view/schema.js.map +1 -1
- package/dist/base/table-view/source.d.ts +62 -0
- package/dist/base/table-view/source.js +161 -0
- package/dist/base/table-view/source.js.map +1 -0
- package/dist/base/table-view/views.d.ts +20 -0
- package/dist/base/table-view/views.js +38 -0
- package/dist/base/table-view/views.js.map +1 -0
- package/dist/base/table-view/writer.d.ts +7 -0
- package/dist/base/table-view/writer.js +17 -0
- package/dist/base/table-view/writer.js.map +1 -0
- package/dist/base/table-view.d.ts +34 -6
- package/dist/base/table-view.js +42 -6
- package/dist/base/table-view.js.map +1 -1
- package/dist/base/tenant-export-archive.d.ts +21 -0
- package/dist/base/tenant-export-archive.js +11 -0
- package/dist/base/tenant-export-archive.js.map +1 -1
- package/dist/base/top-list-card.d.ts +35 -12
- package/dist/base/top-list-card.js +24 -0
- package/dist/base/top-list-card.js.map +1 -1
- package/dist/base/types/action-target.d.ts +36 -20
- package/dist/base/types/component-input.d.ts +3 -0
- package/dist/base/types/confirm-dialog.d.ts +69 -0
- package/dist/base/types/confirm-dialog.js +3 -0
- package/dist/base/types/confirm-dialog.js.map +1 -0
- package/dist/base/types/custom-button.d.ts +48 -2
- package/dist/base/types/enum-option.d.ts +9 -0
- package/dist/base/types/error.d.ts +9 -0
- package/dist/base/types/error.js +7 -1
- package/dist/base/types/error.js.map +1 -1
- package/dist/base/types/export-status.d.ts +3 -0
- package/dist/base/types/export-status.js +3 -0
- package/dist/base/types/export-status.js.map +1 -1
- package/dist/base/types/field-config.d.ts +3 -0
- package/dist/base/types/form-mode.d.ts +3 -0
- package/dist/base/types/form-mode.js +3 -0
- package/dist/base/types/form-mode.js.map +1 -1
- package/dist/base/types/form-values.d.ts +6 -0
- package/dist/base/types/guards.d.ts +37 -7
- package/dist/base/types/index.d.ts +2 -0
- package/dist/base/types/index.js +2 -0
- package/dist/base/types/index.js.map +1 -1
- package/dist/base/types/internal/action-target.d.ts +8 -0
- package/dist/base/types/internal/action-target.js +16 -0
- package/dist/base/types/internal/action-target.js.map +1 -0
- package/dist/base/types/json.d.ts +6 -0
- package/dist/base/types/orientation.d.ts +3 -0
- package/dist/base/types/orientation.js +3 -0
- package/dist/base/types/orientation.js.map +1 -1
- package/dist/base/types/readonly-behavior.d.ts +9 -0
- package/dist/base/types/readonly-behavior.js +3 -0
- package/dist/base/types/readonly-behavior.js.map +1 -1
- package/dist/base/types/row-action.d.ts +111 -0
- package/dist/base/types/size.d.ts +1 -0
- package/dist/base/types/size.js +4 -0
- package/dist/base/types/size.js.map +1 -1
- package/dist/base/types/tone.d.ts +14 -0
- package/dist/base/types/tone.js +24 -0
- package/dist/base/types/tone.js.map +1 -0
- package/dist/client-base-url.d.ts +8 -0
- package/dist/client-base-url.js +8 -0
- package/dist/client-base-url.js.map +1 -1
- package/dist/component-slots.d.ts +17 -2
- package/dist/component-slots.js +18 -66
- package/dist/component-slots.js.map +1 -1
- package/dist/component.d.ts +113 -0
- package/dist/component.js +84 -1
- package/dist/component.js.map +1 -1
- package/dist/data-controllers/members.d.ts +16 -1
- package/dist/data-controllers/members.js +87 -26
- package/dist/data-controllers/members.js.map +1 -1
- package/dist/data-controllers/roles.d.ts +1 -0
- package/dist/data-controllers/roles.js +3 -3
- package/dist/data-controllers/roles.js.map +1 -1
- package/dist/db/{models → internal}/exportJobs.model.d.ts +2 -0
- package/dist/db/{models → internal}/exportJobs.model.js +4 -1
- package/dist/db/internal/exportJobs.model.js.map +1 -0
- package/dist/db/internal/inviteResolutions.model.d.ts +34 -0
- package/dist/db/internal/inviteResolutions.model.js +80 -0
- package/dist/db/internal/inviteResolutions.model.js.map +1 -0
- package/dist/db/internal/table-names.d.ts +4 -0
- package/dist/db/internal/table-names.js +8 -0
- package/dist/db/internal/table-names.js.map +1 -0
- package/dist/db/{models → internal}/tenantLifecycle.model.d.ts +10 -1
- package/dist/db/{models → internal}/tenantLifecycle.model.js +10 -1
- package/dist/db/internal/tenantLifecycle.model.js.map +1 -0
- package/dist/db/{tables → internal}/tenantLifecycle.table.d.ts +6 -0
- package/dist/db/{tables → internal}/tenantLifecycle.table.js +6 -0
- package/dist/db/internal/tenantLifecycle.table.js.map +1 -0
- package/dist/db/models/index.d.ts +0 -2
- package/dist/db/models/index.js +0 -2
- package/dist/db/models/index.js.map +1 -1
- package/dist/db/models/inviteResolutions.model.d.ts +1 -25
- package/dist/db/models/inviteResolutions.model.js +0 -68
- package/dist/db/models/inviteResolutions.model.js.map +1 -1
- package/dist/db/models/roles.model.d.ts +6 -0
- package/dist/db/models/roles.model.js +6 -0
- package/dist/db/models/roles.model.js.map +1 -1
- package/dist/db/models/tenantMembers.model.js +1 -1
- package/dist/db/models/tenantMembers.model.js.map +1 -1
- package/dist/db/models/user_invites.model.d.ts +24 -0
- package/dist/db/models/user_invites.model.js +25 -1
- package/dist/db/models/user_invites.model.js.map +1 -1
- package/dist/db/tables/exportJobs.table.d.ts +5 -1
- package/dist/db/tables/exportJobs.table.js +3 -3
- package/dist/db/tables/exportJobs.table.js.map +1 -1
- package/dist/db/tables/index.d.ts +0 -1
- package/dist/db/tables/index.js +0 -1
- package/dist/db/tables/index.js.map +1 -1
- package/dist/db/tables/inviteResolutions.table.d.ts +1 -1
- package/dist/db/tables/inviteResolutions.table.js +4 -3
- package/dist/db/tables/inviteResolutions.table.js.map +1 -1
- package/dist/db/tables/roles.table.d.ts +2 -0
- package/dist/db/tables/roles.table.js +4 -0
- package/dist/db/tables/roles.table.js.map +1 -1
- package/dist/db/tables/tenantMembers.table.d.ts +1 -0
- package/dist/db/tables/user_invites.table.d.ts +11 -0
- package/dist/db/tables/user_invites.table.js +4 -0
- package/dist/db/tables/user_invites.table.js.map +1 -1
- package/dist/guards.d.ts +36 -0
- package/dist/guards.js +30 -1
- package/dist/guards.js.map +1 -1
- package/dist/hooks.d.ts +133 -1
- package/dist/hooks.js +87 -1
- package/dist/hooks.js.map +1 -1
- package/dist/html-render/index.d.ts +15 -0
- package/dist/html-render/index.js +15 -0
- package/dist/html-render/index.js.map +1 -1
- package/dist/html-render/types.d.ts +4 -0
- package/dist/index.d.ts +6 -7
- package/dist/index.js +12 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/attachments.d.ts +16 -0
- package/dist/internal/attachments.js +3 -0
- package/dist/internal/attachments.js.map +1 -0
- package/dist/internal/component-slots.d.ts +27 -0
- package/dist/internal/component-slots.js +97 -0
- package/dist/internal/component-slots.js.map +1 -0
- package/dist/internal/invite-membership.d.ts +8 -0
- package/dist/{invite-membership.js → internal/invite-membership.js} +11 -5
- package/dist/internal/invite-membership.js.map +1 -0
- package/dist/internal/invite-replacement.d.ts +7 -0
- package/dist/{invite-replacement.js → internal/invite-replacement.js} +8 -3
- package/dist/internal/invite-replacement.js.map +1 -0
- package/dist/internal/invite-resolution.d.ts +3 -0
- package/dist/internal/invite-resolution.js +50 -0
- package/dist/internal/invite-resolution.js.map +1 -0
- package/dist/internal/invites.d.ts +31 -0
- package/dist/internal/invites.js +44 -0
- package/dist/internal/invites.js.map +1 -0
- package/dist/internal/permission-gate.d.ts +23 -0
- package/dist/internal/permission-gate.js +43 -0
- package/dist/internal/permission-gate.js.map +1 -0
- package/dist/internal/tenant-access.d.ts +28 -0
- package/dist/internal/tenant-access.js +28 -0
- package/dist/internal/tenant-access.js.map +1 -0
- package/dist/internal/tenant-ownership.d.ts +13 -0
- package/dist/internal/tenant-ownership.js +95 -0
- package/dist/internal/tenant-ownership.js.map +1 -0
- package/dist/internal/uploads.d.ts +19 -0
- package/dist/internal/uploads.js +3 -0
- package/dist/internal/uploads.js.map +1 -0
- package/dist/invite-extensions/availability.d.ts +28 -3
- package/dist/invite-extensions/availability.js +26 -23
- package/dist/invite-extensions/availability.js.map +1 -1
- package/dist/invite-extensions/internal/availability.d.ts +12 -0
- package/dist/invite-extensions/internal/availability.js +32 -0
- package/dist/invite-extensions/internal/availability.js.map +1 -0
- package/dist/invite-extensions/internal/delivery.d.ts +44 -0
- package/dist/invite-extensions/{delivery.js → internal/delivery.js} +38 -0
- package/dist/invite-extensions/internal/delivery.js.map +1 -0
- package/dist/invite-extensions/internal/edit.d.ts +34 -0
- package/dist/invite-extensions/{edit.js → internal/edit.js} +33 -0
- package/dist/invite-extensions/internal/edit.js.map +1 -0
- package/dist/invite-extensions/internal/field-ids.d.ts +21 -0
- package/dist/invite-extensions/{field-ids.js → internal/field-ids.js} +13 -0
- package/dist/invite-extensions/internal/field-ids.js.map +1 -0
- package/dist/invite-extensions/internal/form-slot.d.ts +13 -0
- package/dist/invite-extensions/{form-slot.js → internal/form-slot.js} +49 -4
- package/dist/invite-extensions/internal/form-slot.js.map +1 -0
- package/dist/invite-extensions/internal/payload-slices.d.ts +31 -0
- package/dist/invite-extensions/{payload-slices.js → internal/payload-slices.js} +30 -0
- package/dist/invite-extensions/internal/payload-slices.js.map +1 -0
- package/dist/invite-extensions/internal/registry.d.ts +48 -0
- package/dist/invite-extensions/internal/registry.js +77 -0
- package/dist/invite-extensions/internal/registry.js.map +1 -0
- package/dist/invite-extensions/internal/types.d.ts +61 -0
- package/dist/invite-extensions/internal/types.js +3 -0
- package/dist/invite-extensions/internal/types.js.map +1 -0
- package/dist/invite-extensions/registry.d.ts +44 -12
- package/dist/invite-extensions/registry.js +51 -43
- package/dist/invite-extensions/registry.js.map +1 -1
- package/dist/invite-extensions/types.d.ts +59 -34
- package/dist/invite-extensions.d.ts +30 -4
- package/dist/invite-extensions.js +57 -7
- package/dist/invite-extensions.js.map +1 -1
- package/dist/invite-resolution.d.ts +5 -2
- package/dist/invite-resolution.js +16 -46
- package/dist/invite-resolution.js.map +1 -1
- package/dist/invitee-display-name.d.ts +5 -0
- package/dist/invitee-display-name.js +15 -0
- package/dist/invitee-display-name.js.map +1 -0
- package/dist/invites.d.ts +54 -17
- package/dist/invites.js +49 -34
- package/dist/invites.js.map +1 -1
- package/dist/layout-banners.d.ts +68 -0
- package/dist/layout-banners.js +18 -0
- package/dist/layout-banners.js.map +1 -1
- package/dist/notifications/builder.d.ts +3 -1
- package/dist/notifications/builder.js +10 -0
- package/dist/notifications/builder.js.map +1 -1
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +16 -0
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/internal.d.ts +8 -5
- package/dist/notifications/internal.js +6 -0
- package/dist/notifications/internal.js.map +1 -1
- package/dist/notifications/sendable.d.ts +6 -0
- package/dist/notifications/sendable.js +13 -4
- package/dist/notifications/sendable.js.map +1 -1
- package/dist/notifications/types.d.ts +26 -1
- package/dist/page/categories.d.ts +19 -17
- package/dist/page/categories.js +24 -168
- package/dist/page/categories.js.map +1 -1
- package/dist/page/component-tree.d.ts +15 -1
- package/dist/page/component-tree.js +0 -40
- package/dist/page/component-tree.js.map +1 -1
- package/dist/page/controllers.d.ts +135 -0
- package/dist/page/controllers.js +124 -8
- package/dist/page/controllers.js.map +1 -1
- package/dist/page/declaration-conflict.d.ts +9 -0
- package/dist/page/declaration-conflict.js +17 -0
- package/dist/page/declaration-conflict.js.map +1 -0
- package/dist/page/form-page-routes.d.ts +7 -10
- package/dist/page/form-page-routes.js +14 -31
- package/dist/page/form-page-routes.js.map +1 -1
- package/dist/page/internal/categories.d.ts +62 -0
- package/dist/page/internal/categories.js +260 -0
- package/dist/page/internal/categories.js.map +1 -0
- package/dist/page/internal/component-target.d.ts +37 -0
- package/dist/page/{component-target.js → internal/component-target.js} +27 -2
- package/dist/page/internal/component-target.js.map +1 -0
- package/dist/page/internal/component-tree.d.ts +13 -0
- package/dist/page/internal/component-tree.js +61 -0
- package/dist/page/internal/component-tree.js.map +1 -0
- package/dist/page/{extension-assembly.d.ts → internal/extension-assembly.d.ts} +5 -2
- package/dist/page/{extension-assembly.js → internal/extension-assembly.js} +8 -0
- package/dist/page/internal/extension-assembly.js.map +1 -0
- package/dist/page/internal/extension-validation.d.ts +24 -0
- package/dist/page/{extension-validation.js → internal/extension-validation.js} +8 -0
- package/dist/page/internal/extension-validation.js.map +1 -0
- package/dist/page/internal/form-page-routes.d.ts +26 -0
- package/dist/page/internal/form-page-routes.js +40 -0
- package/dist/page/internal/form-page-routes.js.map +1 -0
- package/dist/page/internal/layout-filter.d.ts +21 -0
- package/dist/page/internal/layout-filter.js +101 -0
- package/dist/page/internal/layout-filter.js.map +1 -0
- package/dist/page/{metadata-helpers.d.ts → internal/metadata-helpers.d.ts} +4 -1
- package/dist/page/{metadata-helpers.js → internal/metadata-helpers.js} +19 -2
- package/dist/page/internal/metadata-helpers.js.map +1 -0
- package/dist/page/internal/nav-badges.d.ts +17 -0
- package/dist/page/internal/nav-badges.js +68 -0
- package/dist/page/internal/nav-badges.js.map +1 -0
- package/dist/page/internal/page-registration.d.ts +29 -0
- package/dist/page/internal/page-registration.js +41 -0
- package/dist/page/internal/page-registration.js.map +1 -0
- package/dist/page/internal/registry.d.ts +128 -0
- package/dist/page/internal/registry.js +225 -0
- package/dist/page/internal/registry.js.map +1 -0
- package/dist/page/internal/table-view-ids.d.ts +10 -0
- package/dist/page/internal/table-view-ids.js +39 -0
- package/dist/page/internal/table-view-ids.js.map +1 -0
- package/dist/page/internal/types.d.ts +2 -0
- package/dist/page/internal/types.js +6 -0
- package/dist/page/internal/types.js.map +1 -0
- package/dist/page/layout-filter.d.ts +4 -0
- package/dist/page/layout-filter.js +11 -0
- package/dist/page/layout-filter.js.map +1 -1
- package/dist/page/metadata.d.ts +93 -0
- package/dist/page/metadata.js +236 -28
- package/dist/page/metadata.js.map +1 -1
- package/dist/page/registry.d.ts +17 -36
- package/dist/page/registry.js +25 -127
- package/dist/page/registry.js.map +1 -1
- package/dist/page/roots.d.ts +10 -0
- package/dist/page/roots.js +27 -6
- package/dist/page/roots.js.map +1 -1
- package/dist/page/types.d.ts +186 -1
- package/dist/page/types.js +1 -2
- package/dist/page/types.js.map +1 -1
- package/dist/page.d.ts +23 -1
- package/dist/page.js +24 -2
- package/dist/page.js.map +1 -1
- package/dist/permission-gate.d.ts +14 -0
- package/dist/permission-gate.js +3 -0
- package/dist/permission-gate.js.map +1 -0
- package/dist/permissions-resolver.d.ts +24 -0
- package/dist/permissions-resolver.js +24 -0
- package/dist/permissions-resolver.js.map +1 -1
- package/dist/permissions.d.ts +27 -0
- package/dist/permissions.js +37 -0
- package/dist/permissions.js.map +1 -1
- package/dist/quick-actions.d.ts +27 -0
- package/dist/quick-actions.js +1 -0
- package/dist/quick-actions.js.map +1 -1
- package/dist/realtime.d.ts +29 -0
- package/dist/realtime.js +30 -0
- package/dist/realtime.js.map +1 -1
- package/dist/request-tenant.d.ts +17 -0
- package/dist/request-tenant.js +18 -1
- package/dist/request-tenant.js.map +1 -1
- package/dist/tenant-access.d.ts +38 -6
- package/dist/tenant-access.js +38 -8
- package/dist/tenant-access.js.map +1 -1
- package/dist/tenant-export.d.ts +19 -0
- package/dist/tenant-lifecycle.d.ts +13 -0
- package/dist/tenant-lifecycle.js +22 -1
- package/dist/tenant-lifecycle.js.map +1 -1
- package/dist/tenant-ownership.d.ts +2 -1
- package/dist/tenant-ownership.js +5 -85
- package/dist/tenant-ownership.js.map +1 -1
- package/dist/tenant-scoped-model.d.ts +8 -0
- package/dist/tenant-scoped-model.js +8 -0
- package/dist/tenant-scoped-model.js.map +1 -1
- package/dist/uploads.d.ts +24 -16
- package/dist/uploads.js +24 -0
- package/dist/uploads.js.map +1 -1
- package/dist/utils/fire-and-forget.d.ts +4 -0
- package/dist/utils/fire-and-forget.js +4 -0
- package/dist/utils/fire-and-forget.js.map +1 -1
- package/dist/utils/internal/owned-registry.d.ts +36 -0
- package/dist/utils/internal/owned-registry.js +60 -0
- package/dist/utils/internal/owned-registry.js.map +1 -0
- package/dist/utils/{row-instance.d.ts → internal/row-instance.d.ts} +1 -0
- package/dist/utils/internal/row-instance.js +12 -0
- package/dist/utils/internal/row-instance.js.map +1 -0
- package/dist/utils/internal/saas-mode.d.ts +8 -0
- package/dist/utils/internal/saas-mode.js +3 -0
- package/dist/utils/internal/saas-mode.js.map +1 -0
- package/dist/utils/{time.d.ts → internal/time.d.ts} +4 -0
- package/dist/utils/{time.js → internal/time.js} +4 -0
- package/dist/utils/internal/time.js.map +1 -0
- package/dist/utils/{type-check.d.ts → internal/type-check.d.ts} +12 -0
- package/dist/utils/{type-check.js → internal/type-check.js} +12 -0
- package/dist/utils/internal/type-check.js.map +1 -0
- package/dist/utils/internal/value-parser.d.ts +86 -0
- package/dist/utils/internal/value-parser.js +160 -0
- package/dist/utils/internal/value-parser.js.map +1 -0
- package/dist/utils/saas-mode.d.ts +25 -3
- package/dist/utils/saas-mode.js +24 -0
- package/dist/utils/saas-mode.js.map +1 -1
- package/package.json +3 -3
- package/dist/base/block-registry/describe.d.ts +0 -6
- package/dist/base/block-registry/describe.js.map +0 -1
- package/dist/base/block-registry/ui.d.ts +0 -5
- package/dist/base/block-registry/ui.js +0 -17
- package/dist/base/block-registry/ui.js.map +0 -1
- package/dist/base/table-view/auth.d.ts +0 -9
- package/dist/base/table-view/auth.js.map +0 -1
- package/dist/base/table-view/files.js.map +0 -1
- package/dist/base/table-view/guards.js +0 -85
- package/dist/base/table-view/guards.js.map +0 -1
- package/dist/base/table-view/row-rules.js.map +0 -1
- package/dist/base/tree.d.ts +0 -115
- package/dist/base/tree.js +0 -145
- package/dist/base/tree.js.map +0 -1
- package/dist/db/models/exportJobs.model.js.map +0 -1
- package/dist/db/models/tenantLifecycle.model.js.map +0 -1
- package/dist/db/tables/tenantLifecycle.table.js.map +0 -1
- package/dist/invite-extensions/delivery.d.ts +0 -5
- package/dist/invite-extensions/delivery.js.map +0 -1
- package/dist/invite-extensions/edit.d.ts +0 -4
- package/dist/invite-extensions/edit.js.map +0 -1
- package/dist/invite-extensions/field-ids.d.ts +0 -7
- package/dist/invite-extensions/field-ids.js.map +0 -1
- package/dist/invite-extensions/form-slot.d.ts +0 -2
- package/dist/invite-extensions/form-slot.js.map +0 -1
- package/dist/invite-extensions/internal.d.ts +0 -17
- package/dist/invite-extensions/internal.js +0 -55
- package/dist/invite-extensions/internal.js.map +0 -1
- package/dist/invite-extensions/payload-slices.d.ts +0 -8
- package/dist/invite-extensions/payload-slices.js.map +0 -1
- package/dist/invite-membership.d.ts +0 -3
- package/dist/invite-membership.js.map +0 -1
- package/dist/invite-replacement.d.ts +0 -2
- package/dist/invite-replacement.js.map +0 -1
- package/dist/page/component-target.d.ts +0 -10
- package/dist/page/component-target.js.map +0 -1
- package/dist/page/extension-assembly.js.map +0 -1
- package/dist/page/extension-validation.d.ts +0 -7
- package/dist/page/extension-validation.js.map +0 -1
- package/dist/page/metadata-helpers.js.map +0 -1
- package/dist/page/page-registration.d.ts +0 -13
- package/dist/page/page-registration.js +0 -22
- package/dist/page/page-registration.js.map +0 -1
- package/dist/utils/owned-registry.d.ts +0 -10
- package/dist/utils/owned-registry.js +0 -34
- package/dist/utils/owned-registry.js.map +0 -1
- package/dist/utils/row-instance.js +0 -8
- package/dist/utils/row-instance.js.map +0 -1
- package/dist/utils/time.js.map +0 -1
- package/dist/utils/type-check.js.map +0 -1
- package/dist/utils/value-parser.d.ts +0 -11
- package/dist/utils/value-parser.js +0 -86
- package/dist/utils/value-parser.js.map +0 -1
|
@@ -1,52 +1,435 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ControllerClass } from "@antelopejs/interface-api";
|
|
2
|
+
import type { ButtonPermission, Component, ComponentInfoSerialized } from "../../component";
|
|
2
3
|
import type { FormPropsSerialized } from "../form-types";
|
|
4
|
+
import type { BlockLinkAction } from "../display";
|
|
5
|
+
import type { Tone } from "../types/tone";
|
|
3
6
|
import type { ColorValue } from "../types";
|
|
4
7
|
import type { CustomButton, CustomButtonSerialized } from "../types/custom-button";
|
|
5
8
|
import type { TableViewGuards } from "../types/guards";
|
|
6
|
-
import type { CustomRowAction, CustomRowActionSerialized, RowActionConfig } from "../types/row-action";
|
|
9
|
+
import type { AddRowActionConfig, BulkRowActionConfig, CustomRowAction, CustomRowActionSerialized, RowActionConfig, RowActionConfigSerialized, RowActionRule } from "../types/row-action";
|
|
7
10
|
import type { ModalSize } from "../types/size";
|
|
8
|
-
|
|
11
|
+
import type { TableViewSourceSerialized } from "./source";
|
|
9
12
|
export declare const DEFAULT_ROW_ID_FIELD = "_id";
|
|
13
|
+
/** The most rows a table lists per page, whoever picks the size. */
|
|
14
|
+
export declare const MAX_TABLE_PAGE_SIZE = 50;
|
|
10
15
|
export interface TableViewRowActionOptions<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Delete action configuration
|
|
18
|
+
* @example true
|
|
19
|
+
* @example { isEnabled: true, rule: { field: 'status', notEquals: 'completed' } }
|
|
20
|
+
*/
|
|
21
|
+
delete?: boolean | BulkRowActionConfig<T>;
|
|
22
|
+
/**
|
|
23
|
+
* Archive action configuration
|
|
24
|
+
*/
|
|
25
|
+
archive?: boolean | BulkRowActionConfig<T>;
|
|
26
|
+
/**
|
|
27
|
+
* Restore action configuration
|
|
28
|
+
*/
|
|
29
|
+
restore?: boolean | BulkRowActionConfig<T>;
|
|
30
|
+
/**
|
|
31
|
+
* Duplicate action configuration
|
|
32
|
+
* @example true
|
|
33
|
+
* @example { isEnabled: true, rule: { field: 'template', equals: true } }
|
|
34
|
+
*/
|
|
14
35
|
duplicate?: boolean | RowActionConfig<T>;
|
|
36
|
+
/**
|
|
37
|
+
* Details/view action configuration
|
|
38
|
+
* @example true
|
|
39
|
+
* @example { isEnabled: true, rule: { field: 'published', equals: true } }
|
|
40
|
+
*/
|
|
15
41
|
details?: boolean | RowActionConfig<T>;
|
|
42
|
+
/**
|
|
43
|
+
* Edit action configuration
|
|
44
|
+
* @example true
|
|
45
|
+
* @example { isEnabled: true, rule: { field: 'locked', equals: false } }
|
|
46
|
+
*/
|
|
16
47
|
edit?: boolean | RowActionConfig<T>;
|
|
48
|
+
/**
|
|
49
|
+
* Copy link action configuration
|
|
50
|
+
*/
|
|
17
51
|
copyLink?: boolean | RowActionConfig<T>;
|
|
18
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Add/new row action configuration; `placement: "header"` draws its button
|
|
54
|
+
* in the page header instead of the toolbar.
|
|
55
|
+
*/
|
|
56
|
+
add?: boolean | AddRowActionConfig<T>;
|
|
57
|
+
/**
|
|
58
|
+
* Enable the row selection feature
|
|
59
|
+
*/
|
|
19
60
|
hasSelection?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Custom row actions
|
|
63
|
+
*/
|
|
20
64
|
custom?: CustomRowAction<T>[];
|
|
21
65
|
}
|
|
22
66
|
export interface TableViewRowActionOptionsSerialized {
|
|
23
|
-
delete?: boolean |
|
|
24
|
-
archive?: boolean |
|
|
25
|
-
restore?: boolean |
|
|
67
|
+
delete?: boolean | RowActionConfigSerialized;
|
|
68
|
+
archive?: boolean | RowActionConfigSerialized;
|
|
69
|
+
restore?: boolean | RowActionConfigSerialized;
|
|
26
70
|
showArchived?: boolean;
|
|
27
|
-
duplicate?: boolean |
|
|
28
|
-
details?: boolean |
|
|
29
|
-
edit?: boolean |
|
|
30
|
-
copyLink?: boolean |
|
|
31
|
-
add?: boolean |
|
|
71
|
+
duplicate?: boolean | RowActionConfigSerialized;
|
|
72
|
+
details?: boolean | RowActionConfigSerialized;
|
|
73
|
+
edit?: boolean | RowActionConfigSerialized;
|
|
74
|
+
copyLink?: boolean | RowActionConfigSerialized;
|
|
75
|
+
add?: boolean | RowActionConfigSerialized;
|
|
32
76
|
hasSelection?: boolean;
|
|
33
77
|
custom?: CustomRowActionSerialized[];
|
|
34
78
|
}
|
|
79
|
+
/** The filter a tab applies on one column. */
|
|
35
80
|
export interface TableViewTabFilter {
|
|
81
|
+
/** Filterable column the tab filters on. */
|
|
36
82
|
accessorKey: string;
|
|
83
|
+
/** Value compared; a list of values is joined with commas. */
|
|
37
84
|
value?: string;
|
|
85
|
+
/** Compare mode, e.g. `"is"`. */
|
|
38
86
|
mode: string;
|
|
39
87
|
}
|
|
88
|
+
/** A sort a view applies: the column, newest or largest first with `desc`. */
|
|
89
|
+
export interface TableViewSort {
|
|
90
|
+
field: string;
|
|
91
|
+
desc?: boolean;
|
|
92
|
+
}
|
|
93
|
+
/** The columns a view shows, and their order. */
|
|
94
|
+
export interface TableViewColumnsState {
|
|
95
|
+
/** Columns shown, whatever their default visibility. */
|
|
96
|
+
visible?: string[];
|
|
97
|
+
/** Columns hidden, whatever their default visibility. */
|
|
98
|
+
hidden?: string[];
|
|
99
|
+
/**
|
|
100
|
+
* Column order, left to right; the columns left out follow in their
|
|
101
|
+
* declared order.
|
|
102
|
+
*/
|
|
103
|
+
order?: string[];
|
|
104
|
+
}
|
|
105
|
+
/** Row height of a table: `compact` gives 36px rows under a 32px header. */
|
|
106
|
+
export type TableViewDensity = "default" | "compact";
|
|
107
|
+
/**
|
|
108
|
+
* Everything a view sets on the table when it is opened. What a view leaves
|
|
109
|
+
* out falls back to the table's defaults, so opening a view always shows the
|
|
110
|
+
* same rows the same way.
|
|
111
|
+
*
|
|
112
|
+
* A filter value may hold tokens the server resolves for each request, so a
|
|
113
|
+
* view's rows and its counter follow the caller and the clock:
|
|
114
|
+
* `{{user.id}}` (the signed-in user's id), `{{now}}` and `{{now-7d}}` /
|
|
115
|
+
* `{{now+14d}}` (the current instant, moved by whole days).
|
|
116
|
+
*/
|
|
117
|
+
export interface TableViewViewState {
|
|
118
|
+
/** Filters on filterable columns, shown as the table's filter chips. */
|
|
119
|
+
filters?: TableViewTabFilter[];
|
|
120
|
+
/** Text typed in the search field. */
|
|
121
|
+
search?: string;
|
|
122
|
+
/** Sort of the rows; the list sorts on the first entry. */
|
|
123
|
+
sort?: TableViewSort[];
|
|
124
|
+
/** Columns shown and their order. */
|
|
125
|
+
columns?: TableViewColumnsState;
|
|
126
|
+
/**
|
|
127
|
+
* Display the view opens in (`"table"`, `"kanban"`, `"grouped"`, a
|
|
128
|
+
* module's `<module>:<id>`): it must be one the table offers.
|
|
129
|
+
*/
|
|
130
|
+
display?: string;
|
|
131
|
+
/** Row height of the grid. */
|
|
132
|
+
density?: TableViewDensity;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* A named state of the table ("Past due > 7 days", "Mine"). Opening it
|
|
136
|
+
* applies its state; the user may then change filters or sort, which marks
|
|
137
|
+
* the view as modified with a way back (Reset) or forward (Save as new view).
|
|
138
|
+
* A view the module declares is never overwritten.
|
|
139
|
+
*/
|
|
140
|
+
export interface TableViewView extends TableViewViewState {
|
|
141
|
+
/** Stable id, used in the URL (`?view=<id>`). */
|
|
142
|
+
id: string;
|
|
143
|
+
/** `$`-prefixed: an i18n key. */
|
|
144
|
+
label: string;
|
|
145
|
+
icon?: string;
|
|
146
|
+
/** Colors the view's icon and counter. */
|
|
147
|
+
tone?: Tone;
|
|
148
|
+
/** A status dot drawn before the label. */
|
|
149
|
+
dot?: Tone;
|
|
150
|
+
/**
|
|
151
|
+
* Shows the number of rows the view lists, counted by the controller's
|
|
152
|
+
* `countBatch` route like the tab counters.
|
|
153
|
+
*/
|
|
154
|
+
count?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Gate the view: one of the table's actions by name (e.g. `"export"`), or
|
|
157
|
+
* an `Action` of any component.
|
|
158
|
+
*/
|
|
159
|
+
permission?: ButtonPermission;
|
|
160
|
+
/** Absolute permission id the view requires; wins over `permission`. */
|
|
161
|
+
permissionId?: string;
|
|
162
|
+
}
|
|
163
|
+
/** A view as it reaches the client. */
|
|
164
|
+
export type TableViewViewSerialized = Omit<TableViewView, "permission" | "permissionId">;
|
|
165
|
+
/**
|
|
166
|
+
* Where the views are drawn: a tab strip above the table (`tabs`), a row of
|
|
167
|
+
* pills above the status tabs (`strip`), or a menu button in the toolbar
|
|
168
|
+
* (`menu`).
|
|
169
|
+
*/
|
|
170
|
+
export type TableViewViewsLayout = "tabs" | "strip" | "menu";
|
|
171
|
+
/** The views a table offers. */
|
|
172
|
+
export interface TableViewViewsOptions {
|
|
173
|
+
/** The views the module declares, in order. */
|
|
174
|
+
items: TableViewView[];
|
|
175
|
+
/** Defaults to `tabs`. */
|
|
176
|
+
layout?: TableViewViewsLayout;
|
|
177
|
+
/**
|
|
178
|
+
* View opened on arrival when the URL names none. Without it the table
|
|
179
|
+
* opens in its own default state.
|
|
180
|
+
*/
|
|
181
|
+
defaultView?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Lets users save the current state as a view of their own ("Save as new
|
|
184
|
+
* view"), and update or delete it. A user's views are kept with the rest
|
|
185
|
+
* of their table preferences and are never shown to anyone else.
|
|
186
|
+
*/
|
|
187
|
+
userViews?: boolean;
|
|
188
|
+
}
|
|
189
|
+
/** The views of a table as they reach the client. */
|
|
190
|
+
export interface TableViewViewsSerialized extends Omit<TableViewViewsOptions, "items"> {
|
|
191
|
+
items: TableViewViewSerialized[];
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* A tab above the table: it filters the rows on one column (`filter`), or
|
|
195
|
+
* opens another page (`to`) — never both, which registration refuses. A tab
|
|
196
|
+
* with neither, given the id `"all"`, stands in for the implicit "all" tab, at
|
|
197
|
+
* its own position, with its own label and icon.
|
|
198
|
+
*/
|
|
40
199
|
export interface TableViewTab {
|
|
41
200
|
id: string;
|
|
42
201
|
label: string;
|
|
43
|
-
|
|
202
|
+
/** Hidden filter the tab applies, on a single column. */
|
|
203
|
+
filter?: TableViewTabFilter;
|
|
44
204
|
icon?: string;
|
|
45
205
|
textColor?: ColorValue;
|
|
46
206
|
iconColor?: ColorValue;
|
|
207
|
+
/**
|
|
208
|
+
* Turns the tab into a link to another page, typically a sibling list
|
|
209
|
+
* (Members ↔ Invitations): a registered page controller, whose URL and
|
|
210
|
+
* permission the tab follows, or a dashboard path.
|
|
211
|
+
*/
|
|
212
|
+
to?: ControllerClass | string;
|
|
213
|
+
/**
|
|
214
|
+
* Gate the tab, a filter tab or a link tab: one of the table's actions by
|
|
215
|
+
* name (e.g. `"list"`), or an `Action` of any component. A link tab to a
|
|
216
|
+
* page controller follows that page's own permission without it.
|
|
217
|
+
*/
|
|
218
|
+
permission?: ButtonPermission;
|
|
219
|
+
/** Absolute permission id the tab requires; wins over `permission`. */
|
|
220
|
+
permissionId?: string;
|
|
221
|
+
/**
|
|
222
|
+
* Data controller (or data API location, e.g. `"/api/tables/invites"`)
|
|
223
|
+
* whose row total a link tab shows as its counter.
|
|
224
|
+
*/
|
|
225
|
+
countFrom?: ControllerClass | string;
|
|
226
|
+
/**
|
|
227
|
+
* Publishes the tab's counter as the navigation badge of the page it
|
|
228
|
+
* stands for, in the main navigation and the settings one: this table's
|
|
229
|
+
* page for a filter tab, the linked page for a link tab (which then needs a
|
|
230
|
+
* page controller `to` and a data controller `countFrom`). Counted on the
|
|
231
|
+
* server when the menu loads, with the caller's own `list` permission; a
|
|
232
|
+
* count of zero shows no badge.
|
|
233
|
+
*/
|
|
234
|
+
navBadge?: boolean;
|
|
235
|
+
}
|
|
236
|
+
/** A tab as it reaches the client: link targets resolved to paths. */
|
|
237
|
+
export interface TableViewTabSerialized extends Omit<TableViewTab, "to" | "countFrom" | "permission" | "permissionId"> {
|
|
238
|
+
/** Path the link tab opens. */
|
|
239
|
+
to?: string;
|
|
240
|
+
/** Full id of the page a link tab opens, when it is a registered page. */
|
|
241
|
+
toPage?: string;
|
|
242
|
+
/** Data API location whose total the link tab shows. */
|
|
243
|
+
countFrom?: string;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* How much a table draws around its rows.
|
|
247
|
+
*
|
|
248
|
+
* - `"full"`: the dashboard grid — caption and count, a search button,
|
|
249
|
+
* filters, sort, refresh, the ⋯ table menu, column header menus and a
|
|
250
|
+
* footer with the page size picker.
|
|
251
|
+
* - `"compact"`: the list of a settings page — tabs, an always-open search
|
|
252
|
+
* field, quick filters and custom buttons; no caption, filters row, sort
|
|
253
|
+
* menu, refresh, ⋯ menu, column menus nor page size picker.
|
|
254
|
+
*
|
|
255
|
+
* Either way a control shows only when it means something: the search when
|
|
256
|
+
* the controller has `@Searchable` fields, the filters when a column is
|
|
257
|
+
* `filterable`, the caption when `caption` is set, the export entry when the
|
|
258
|
+
* caller may export.
|
|
259
|
+
*/
|
|
260
|
+
export type TableViewLayout = "full" | "compact";
|
|
261
|
+
/** How a quick filter compares its column with the picked value. */
|
|
262
|
+
export type TableViewQuickFilterMode = "is" | "is_not" | "include" | "exclude" | "array_contains_string";
|
|
263
|
+
/**
|
|
264
|
+
* A one-click filter drawn in the toolbar as a dropdown button listing the
|
|
265
|
+
* values of a column: a select's items, a boolean's two labels, or the rows
|
|
266
|
+
* a relation points to. The picked value is the column's filter, the very one
|
|
267
|
+
* the filters row edits: kept with the table's state, counted as an active
|
|
268
|
+
* filter and cleared by "Reset filters". In the `compact` layout, which has
|
|
269
|
+
* no filters row, the button names the column and its value ("Role: Admin")
|
|
270
|
+
* next to a clear button.
|
|
271
|
+
*/
|
|
272
|
+
export interface TableViewQuickFilter {
|
|
273
|
+
/** Filterable column the control filters on. */
|
|
274
|
+
field: string;
|
|
275
|
+
/** Button text while no value is picked; defaults to the column name. */
|
|
276
|
+
label?: string;
|
|
277
|
+
/** Button icon; defaults to a funnel. */
|
|
278
|
+
icon?: string;
|
|
279
|
+
/** Text of the entry that clears the filter; defaults to "All". */
|
|
280
|
+
allLabel?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Compare mode of the filter. Defaults to `array_contains_string` for a
|
|
283
|
+
* multiple relation or select, `is` otherwise.
|
|
284
|
+
*/
|
|
285
|
+
mode?: TableViewQuickFilterMode;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* How the rows beyond the first page are reached: a pager (`pages`), a
|
|
289
|
+
* "Load more" button appending the next page (`loadMore`), or the next page
|
|
290
|
+
* appended as the end of the list scrolls into view (`infinite`, a feed).
|
|
291
|
+
*/
|
|
292
|
+
export type TableViewPaginationMode = "pages" | "loadMore" | "infinite";
|
|
293
|
+
/**
|
|
294
|
+
* Rows the user orders by hand: a drag handle (or the arrow keys on it)
|
|
295
|
+
* moves a row, and the rows it moved get a new value of `field`. The handle
|
|
296
|
+
* shows on the grid, to a caller who may edit the rows.
|
|
297
|
+
*/
|
|
298
|
+
export interface TableViewReorderOptions {
|
|
299
|
+
/**
|
|
300
|
+
* The number column holding a row's position, `@Sortable()` and
|
|
301
|
+
* writable: the rows are listed sorted on it.
|
|
302
|
+
*/
|
|
303
|
+
field: string;
|
|
304
|
+
}
|
|
305
|
+
/** What a footer summary computes over the rows the table lists. */
|
|
306
|
+
export type TableViewSummaryOperation = "sum" | "count";
|
|
307
|
+
/**
|
|
308
|
+
* How a footer summary's figure reads, the options of `Intl.NumberFormat`
|
|
309
|
+
* a backend can send. Left out, a sum reads like its column's cells (a
|
|
310
|
+
* price as a price) and a count as a whole number.
|
|
311
|
+
*/
|
|
312
|
+
export interface TableViewSummaryFormat {
|
|
313
|
+
style?: "decimal" | "percent" | "currency";
|
|
314
|
+
/** ISO 4217 code, for the `currency` style. */
|
|
315
|
+
currency?: string;
|
|
316
|
+
notation?: "standard" | "compact";
|
|
317
|
+
minimumFractionDigits?: number;
|
|
318
|
+
maximumFractionDigits?: number;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* A figure of the footer band ("MRR €12,480", "3 failed"), computed by the
|
|
322
|
+
* server over every row the table's filters, search and tab list — not only
|
|
323
|
+
* the page shown.
|
|
324
|
+
*/
|
|
325
|
+
export interface TableViewFooterSummary<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
326
|
+
/** Shown before the figure. `$`-prefixed: an i18n key. */
|
|
327
|
+
label: string;
|
|
328
|
+
/** Column summed; required by `sum`. */
|
|
329
|
+
field?: string;
|
|
330
|
+
op: TableViewSummaryOperation;
|
|
331
|
+
/**
|
|
332
|
+
* Only the rows this rule accepts are summed or counted ("failed"). It
|
|
333
|
+
* reads the stored fields of a row, in the database.
|
|
334
|
+
*/
|
|
335
|
+
where?: RowActionRule<T>;
|
|
336
|
+
format?: TableViewSummaryFormat;
|
|
337
|
+
}
|
|
338
|
+
/** A footer summary as it reaches the client: `where` stays on the server. */
|
|
339
|
+
export interface TableViewFooterSummarySerialized extends Omit<TableViewFooterSummary, "where"> {
|
|
340
|
+
/** Id the `summary` route computes it under. */
|
|
341
|
+
id: string;
|
|
342
|
+
}
|
|
343
|
+
/** Texts and figures of the footer band. */
|
|
344
|
+
export interface TableViewFooterOptions<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
345
|
+
/**
|
|
346
|
+
* Row count text, an i18n key with `$` receiving `{ count }` and pluralized
|
|
347
|
+
* on it ("7 members"). Defaults to "{count} items".
|
|
348
|
+
*/
|
|
349
|
+
countLabel?: string;
|
|
350
|
+
/** A hint at the right of the count. `$`-prefixed: an i18n key. */
|
|
351
|
+
hint?: string;
|
|
352
|
+
/**
|
|
353
|
+
* Figures computed over the listed rows, next to the count. The
|
|
354
|
+
* controller mounts `summary: TableViewRoutes.Summary` to serve them.
|
|
355
|
+
*/
|
|
356
|
+
summary?: TableViewFooterSummary<T>[];
|
|
357
|
+
/**
|
|
358
|
+
* A `SelectType` column whose items, with their colors, the footer lists
|
|
359
|
+
* as a legend.
|
|
360
|
+
*/
|
|
361
|
+
legend?: string;
|
|
362
|
+
}
|
|
363
|
+
/** The footer band's options as they reach the client. */
|
|
364
|
+
export interface TableViewFooterSerialized extends Omit<TableViewFooterOptions, "summary"> {
|
|
365
|
+
summary?: TableViewFooterSummarySerialized[];
|
|
47
366
|
}
|
|
48
|
-
|
|
49
|
-
|
|
367
|
+
/**
|
|
368
|
+
* What a table's empty body says for one reason it is empty, in place of the
|
|
369
|
+
* built-in texts. Texts are `$`-prefixed i18n keys or literals; both receive
|
|
370
|
+
* `{ search }`, the text searched. Action labels receive no parameter.
|
|
371
|
+
*/
|
|
372
|
+
export interface TableViewEmptyState {
|
|
373
|
+
title: string;
|
|
374
|
+
description?: string;
|
|
375
|
+
icon?: string;
|
|
376
|
+
/** Link buttons, after the ones the table adds itself. */
|
|
377
|
+
actions?: BlockLinkAction[];
|
|
378
|
+
/**
|
|
379
|
+
* Frontend component drawing the whole state instead (a gallery of
|
|
380
|
+
* templates), resolved by name from the global registry. It receives
|
|
381
|
+
* `state` (`firstRun`, `filtered` or `error`), `search` and `refresh()`.
|
|
382
|
+
*/
|
|
383
|
+
component?: Component;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* The empty states of a table: `firstRun` while it has no row yet (it keeps
|
|
387
|
+
* the add button), `filtered` when its filters or search match nothing (it
|
|
388
|
+
* keeps "Clear search", "Clear filters" or "Clear filters and search"),
|
|
389
|
+
* `error` when the list failed (it keeps "Try again"). The grid and the
|
|
390
|
+
* `cards` display draw them; the kanban board and a module's own display do
|
|
391
|
+
* not.
|
|
392
|
+
*/
|
|
393
|
+
export interface TableViewEmptyStates {
|
|
394
|
+
firstRun?: TableViewEmptyState;
|
|
395
|
+
filtered?: TableViewEmptyState;
|
|
396
|
+
error?: TableViewEmptyState;
|
|
397
|
+
}
|
|
398
|
+
/** An empty state as it reaches the client. */
|
|
399
|
+
export interface TableViewEmptyStateSerialized extends Omit<TableViewEmptyState, "component"> {
|
|
400
|
+
component?: ComponentInfoSerialized;
|
|
401
|
+
}
|
|
402
|
+
/** The empty states as they reach the client. */
|
|
403
|
+
export type TableViewEmptyStatesSerialized = Partial<Record<keyof TableViewEmptyStates, TableViewEmptyStateSerialized>>;
|
|
404
|
+
/**
|
|
405
|
+
* The card the `kanban` and `cards` displays draw for each row. Left out,
|
|
406
|
+
* a card shows the row's label and its first few listable columns (on the
|
|
407
|
+
* board, besides the one it groups on).
|
|
408
|
+
*/
|
|
409
|
+
export interface TableViewCardOptions {
|
|
410
|
+
/**
|
|
411
|
+
* Columns shown on the card below its title (`labelKey`), each value
|
|
412
|
+
* rendered with its column's data type, like a cell.
|
|
413
|
+
*/
|
|
414
|
+
fields?: string[];
|
|
415
|
+
/**
|
|
416
|
+
* Frontend component drawing the whole card, resolved by name from the
|
|
417
|
+
* global registry; its directory must be declared globally. Both displays
|
|
418
|
+
* hand it the same props: `row`, `rowId`, `columns`, `labelKey`, `actions`
|
|
419
|
+
* (the table's row actions), `selected` and `select(value?)` (the row's
|
|
420
|
+
* selection), and `open()` (what a click on the row does). The kanban adds
|
|
421
|
+
* `groupValue`, the value of the column the card sits in.
|
|
422
|
+
*/
|
|
423
|
+
component?: Component;
|
|
424
|
+
}
|
|
425
|
+
/** The card of the `kanban` and `cards` displays as it reaches the client. */
|
|
426
|
+
export interface TableViewCardOptionsSerialized {
|
|
427
|
+
fields?: string[];
|
|
428
|
+
component?: ComponentInfoSerialized;
|
|
429
|
+
}
|
|
430
|
+
/** The kanban options as its display entry carries them. */
|
|
431
|
+
export interface KanbanOptionsSerialized extends Omit<KanbanOptions, "card"> {
|
|
432
|
+
card?: TableViewCardOptionsSerialized;
|
|
50
433
|
}
|
|
51
434
|
export interface TableViewDisplayCapabilities {
|
|
52
435
|
columnManagement?: boolean;
|
|
@@ -54,7 +437,18 @@ export interface TableViewDisplayCapabilities {
|
|
|
54
437
|
search?: boolean;
|
|
55
438
|
sorting?: boolean;
|
|
56
439
|
tabs?: boolean;
|
|
440
|
+
/**
|
|
441
|
+
* Whether the table keeps its own chrome (caption, toolbar, tabs, filters
|
|
442
|
+
* row, bulk bar) around a display that draws a complete interface itself.
|
|
443
|
+
* Defaults to true.
|
|
444
|
+
*/
|
|
445
|
+
header?: boolean;
|
|
57
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* A display a table view offers besides its grid: a built-in one by its id
|
|
449
|
+
* (`"cards"`), or a module's, named `<module>:<id>` (`"saas:plan-cards"`) and
|
|
450
|
+
* registered on the frontend with `registerTableViewDisplay`.
|
|
451
|
+
*/
|
|
58
452
|
export interface TableViewDisplayOption {
|
|
59
453
|
id: string;
|
|
60
454
|
options?: Record<string, unknown>;
|
|
@@ -65,8 +459,74 @@ export interface TableViewDisplayOption {
|
|
|
65
459
|
export interface TableViewDisplayOptionSerialized extends Omit<TableViewDisplayOption, "component"> {
|
|
66
460
|
component?: ComponentInfoSerialized;
|
|
67
461
|
}
|
|
68
|
-
|
|
462
|
+
/** A field of the expanded row's detail band. */
|
|
463
|
+
export interface TableViewExpandableField {
|
|
464
|
+
/** Column key; the value renders through that column's data type. */
|
|
465
|
+
key: string;
|
|
466
|
+
/** Label shown instead of the column's name. `$`-prefixed: an i18n key. */
|
|
467
|
+
label?: string;
|
|
468
|
+
}
|
|
469
|
+
/** Which rows open on arrival and after the listed set changes. */
|
|
470
|
+
export type TableViewExpandedDefault = "none" | "first" | "all";
|
|
471
|
+
/** How expandable rows open, whatever their band shows. */
|
|
472
|
+
export interface TableViewExpandableBehavior {
|
|
473
|
+
/**
|
|
474
|
+
* Rows open when the table loads and whenever a new page, filter, search,
|
|
475
|
+
* sort, tab or archive view is listed. Defaults to "none".
|
|
476
|
+
*/
|
|
477
|
+
defaultExpanded?: TableViewExpandedDefault;
|
|
478
|
+
/** Keep at most one row open: opening a row closes the previous one. */
|
|
479
|
+
single?: boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Load the row again when it opens, from the data API's `get` route, and
|
|
482
|
+
* show the band with that answer: the band can then show fields the list
|
|
483
|
+
* does not return. The band shows a placeholder while it loads and an
|
|
484
|
+
* error with a retry if it fails. Kept until the listed rows reload. Not
|
|
485
|
+
* for a table on a `source`, which has no `get` route.
|
|
486
|
+
*/
|
|
487
|
+
lazyLoad?: boolean;
|
|
488
|
+
}
|
|
489
|
+
/** A detail band listing columns of the row as a label/value list. */
|
|
490
|
+
export interface TableViewExpandableFields extends TableViewExpandableBehavior {
|
|
491
|
+
/**
|
|
492
|
+
* Columns listed in the band, each value rendered with its column's data
|
|
493
|
+
* type. A column must be listable to carry a value, unless `lazyLoad`
|
|
494
|
+
* reads the row from `get`; hide it from the grid with `isVisible: false`
|
|
495
|
+
* on its `@Column` to show it only here.
|
|
496
|
+
*/
|
|
497
|
+
fields: Array<string | TableViewExpandableField>;
|
|
498
|
+
/** Eyebrow above the field list. `$`-prefixed: an i18n key. */
|
|
499
|
+
fieldsLabel?: string;
|
|
500
|
+
component?: never;
|
|
501
|
+
}
|
|
502
|
+
/** A detail band drawn entirely by a frontend component. */
|
|
503
|
+
export interface TableViewExpandableComponent extends TableViewExpandableBehavior {
|
|
504
|
+
/**
|
|
505
|
+
* Frontend component rendered as the whole band, resolved by name from the
|
|
506
|
+
* global registry. It receives the row (the listed one, or the one
|
|
507
|
+
* `lazyLoad` read), its id, the column metadata, the table's row actions,
|
|
508
|
+
* `open` (what a click on the row does) and `refresh` (reloads the table).
|
|
509
|
+
*/
|
|
510
|
+
component: Component;
|
|
511
|
+
fields?: never;
|
|
512
|
+
fieldsLabel?: never;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Expandable rows: a caret column opens a detail band under the row. The band
|
|
516
|
+
* shows either `fields` as a label/value list, or a `component` that replaces
|
|
517
|
+
* that rendering altogether — never both.
|
|
518
|
+
*/
|
|
519
|
+
export type TableViewExpandableOptions = TableViewExpandableFields | TableViewExpandableComponent;
|
|
520
|
+
/** The detail band of expandable rows as it reaches the client. */
|
|
521
|
+
export interface TableViewExpandableSerialized extends TableViewExpandableBehavior {
|
|
522
|
+
fields?: TableViewExpandableField[];
|
|
523
|
+
fieldsLabel?: string;
|
|
524
|
+
component?: ComponentInfoSerialized;
|
|
525
|
+
}
|
|
526
|
+
export interface TableViewOptionsSerialized extends Omit<TableViewOptions, "customButtons" | "rowActions" | "kanban" | "displays" | "formSlots" | "expandable" | "tabs" | "views" | "footer" | "emptyStates"> {
|
|
69
527
|
enableTableExport: boolean;
|
|
528
|
+
/** Whether the controller declares `@Searchable` fields to search in. */
|
|
529
|
+
searchable: boolean;
|
|
70
530
|
customButtons?: CustomButtonSerialized[];
|
|
71
531
|
defaultFilters?: Array<{
|
|
72
532
|
accessorKey: string;
|
|
@@ -81,30 +541,79 @@ export interface TableViewOptionsSerialized extends Omit<TableViewOptions, "cust
|
|
|
81
541
|
};
|
|
82
542
|
queryParamFilters?: QueryParamFilters;
|
|
83
543
|
routeParamFilters?: RouteParamFilters;
|
|
84
|
-
tabs?:
|
|
544
|
+
tabs?: TableViewTabSerialized[];
|
|
85
545
|
displays?: TableViewDisplayOptionSerialized[];
|
|
546
|
+
/**
|
|
547
|
+
* Resolved page-mode form URLs. Server-computed, so the frontend navigates to
|
|
548
|
+
* the very URLs the form sub-pages were registered under instead of rebuilding
|
|
549
|
+
* them from the browser path. Absent when the container is not a page.
|
|
550
|
+
*/
|
|
86
551
|
formPages?: TableViewFormPageUrls;
|
|
552
|
+
expandable?: TableViewExpandableSerialized;
|
|
553
|
+
views?: TableViewViewsSerialized;
|
|
554
|
+
footer?: TableViewFooterSerialized;
|
|
555
|
+
emptyStates?: TableViewEmptyStatesSerialized;
|
|
556
|
+
/** Where a `TableView.fromSource` table reads its rows. */
|
|
557
|
+
source?: TableViewSourceSerialized;
|
|
558
|
+
/**
|
|
559
|
+
* Key of the table view in its page, which prefixes its URL keys
|
|
560
|
+
* (`?<tableId>.view=`). Set per request.
|
|
561
|
+
*/
|
|
562
|
+
tableId?: string;
|
|
563
|
+
/**
|
|
564
|
+
* The table view is the only one its page carries: the short URL keys
|
|
565
|
+
* (`?view=`, `?tab=`) are its own. Set per request.
|
|
566
|
+
*/
|
|
567
|
+
isSoleTableView?: boolean;
|
|
87
568
|
}
|
|
88
|
-
|
|
89
|
-
|
|
569
|
+
/**
|
|
570
|
+
* Heading texts of one of the forms a table view opens, whatever container
|
|
571
|
+
* opens it: the page, drawer or modal title and the line under it. Left out,
|
|
572
|
+
* the forms read "New entry", "Edit entry" and "Entry details".
|
|
573
|
+
*/
|
|
574
|
+
export interface FormContainerPageTexts {
|
|
575
|
+
/** Title of the page, drawer or modal. `$`-prefixed: an i18n key. */
|
|
90
576
|
displayName?: string;
|
|
577
|
+
/** Line under the title. `$`-prefixed: an i18n key. */
|
|
91
578
|
description?: string;
|
|
579
|
+
}
|
|
580
|
+
/** One form of a page-mode table view: its texts, and the page it opens on. */
|
|
581
|
+
export interface FormContainerPageConfig extends FormContainerPageTexts {
|
|
582
|
+
urlSlug?: string;
|
|
583
|
+
/**
|
|
584
|
+
* When true, the DMS will not auto-create a form page for this action.
|
|
585
|
+
* Use this when you have a manually registered page (via CustomComponent) at the same URL.
|
|
586
|
+
* The urlSlug will still be used for navigation.
|
|
587
|
+
*/
|
|
92
588
|
customPage?: boolean;
|
|
93
589
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
590
|
+
/** The forms a table view opens: add (`new`), edit and `details`. */
|
|
591
|
+
export interface FormContainerPages<Page extends FormContainerPageTexts = FormContainerPageConfig> {
|
|
592
|
+
new?: Page;
|
|
593
|
+
edit?: Page;
|
|
594
|
+
details?: Page;
|
|
98
595
|
}
|
|
596
|
+
/**
|
|
597
|
+
* Where the add, edit and details forms of a table view open, and their
|
|
598
|
+
* titles: `pages` names them in every container ("New task", "Edit task",
|
|
599
|
+
* "Task details"); a page-mode entry also sets the page's URL.
|
|
600
|
+
*/
|
|
99
601
|
export type FormContainer = {
|
|
100
602
|
type: "drawer";
|
|
603
|
+
pages?: FormContainerPages<FormContainerPageTexts>;
|
|
101
604
|
} | {
|
|
102
605
|
type: "modal";
|
|
103
606
|
size?: ModalSize;
|
|
607
|
+
pages?: FormContainerPages<FormContainerPageTexts>;
|
|
104
608
|
} | {
|
|
105
609
|
type: "page";
|
|
106
610
|
pages?: FormContainerPages;
|
|
107
611
|
};
|
|
612
|
+
/**
|
|
613
|
+
* Page-mode form URLs, resolved against the slug of the page the table view is
|
|
614
|
+
* mounted on. They keep the `:id` placeholder of their slug: the frontend
|
|
615
|
+
* substitutes the row id when it navigates.
|
|
616
|
+
*/
|
|
108
617
|
export interface TableViewFormPageUrls {
|
|
109
618
|
new: string;
|
|
110
619
|
edit: string;
|
|
@@ -120,41 +629,253 @@ export interface RouteParamFilter {
|
|
|
120
629
|
mode?: string;
|
|
121
630
|
}
|
|
122
631
|
export type RouteParamFilters = Record<string, RouteParamFilter>;
|
|
632
|
+
/** Id of the built-in grid display. */
|
|
123
633
|
export declare const TABLE_DISPLAY_ID = "table";
|
|
634
|
+
/** Id of the built-in kanban display. */
|
|
124
635
|
export declare const KANBAN_DISPLAY_ID = "kanban";
|
|
636
|
+
/** Id of the built-in card grid display. */
|
|
637
|
+
export declare const CARDS_DISPLAY_ID = "cards";
|
|
638
|
+
/** Id of the built-in grouped display (see `grouped`). */
|
|
639
|
+
export declare const GROUPED_DISPLAY_ID = "grouped";
|
|
125
640
|
export interface KanbanOptions {
|
|
641
|
+
/**
|
|
642
|
+
* Field used to group cards into kanban columns. Must be declared as a
|
|
643
|
+
* @Column with a non-multiple SelectType (one column per item), a
|
|
644
|
+
* BooleanType (two columns), or a StatusType (one column per status). This
|
|
645
|
+
* is the default; users can switch to any other eligible field from the
|
|
646
|
+
* board.
|
|
647
|
+
*/
|
|
126
648
|
groupByField: string;
|
|
127
|
-
|
|
128
|
-
|
|
649
|
+
/**
|
|
650
|
+
* Allow dragging cards between columns to update the group field.
|
|
651
|
+
* Defaults to true.
|
|
652
|
+
*/
|
|
129
653
|
draggable?: boolean;
|
|
654
|
+
/**
|
|
655
|
+
* CSS max-height of a kanban column card list before it scrolls
|
|
656
|
+
* (e.g. "60vh", "480px"). Defaults to "60vh". The number of items fetched
|
|
657
|
+
* per column follows the user-adjustable table page size preference.
|
|
658
|
+
*/
|
|
130
659
|
columnMaxHeight?: string;
|
|
131
660
|
}
|
|
661
|
+
/** How the `grouped` display cuts the rows into groups. */
|
|
662
|
+
export type TableViewGroupBy = "value" | "day" | "week";
|
|
663
|
+
/**
|
|
664
|
+
* The `grouped` display: the table's own columns, with a header row before
|
|
665
|
+
* each group of rows sharing a value of `groupByField` (a status, a day of a
|
|
666
|
+
* date). The rows are listed sorted on that column and paged as usual, and a
|
|
667
|
+
* page starting inside a group repeats its header on top. No aggregates.
|
|
668
|
+
*/
|
|
669
|
+
export interface GroupedOptions {
|
|
670
|
+
/**
|
|
671
|
+
* Column the rows are grouped on. It must be a `@Sortable()` column: the
|
|
672
|
+
* list sorts on it so a group's rows follow each other.
|
|
673
|
+
*/
|
|
674
|
+
groupByField: string;
|
|
675
|
+
/**
|
|
676
|
+
* `value` (the default): one group per value; `day` or `week`: one group
|
|
677
|
+
* per calendar day or week of a date column.
|
|
678
|
+
*/
|
|
679
|
+
by?: TableViewGroupBy;
|
|
680
|
+
/** A click on a group header folds its rows. */
|
|
681
|
+
collapsible?: boolean;
|
|
682
|
+
/** Group headers show how many rows the group holds. */
|
|
683
|
+
count?: boolean;
|
|
684
|
+
}
|
|
132
685
|
export interface TableViewOptions<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
133
686
|
caption?: string;
|
|
687
|
+
/**
|
|
688
|
+
* Row density the table opens with: "compact" gives 36px rows under a 32px
|
|
689
|
+
* header. The user picks another from the "Density" entry of the ⋯ table
|
|
690
|
+
* menu, kept with the rest of the table's state.
|
|
691
|
+
*/
|
|
692
|
+
density?: "default" | "compact";
|
|
693
|
+
/**
|
|
694
|
+
* Caps the rows in a scroll area of their own (any CSS length, e.g.
|
|
695
|
+
* "60vh"), under a column header that stays in view while they scroll.
|
|
696
|
+
*/
|
|
697
|
+
maxHeight?: string;
|
|
698
|
+
/**
|
|
699
|
+
* Expandable rows: a caret column in front of the content opens a detail
|
|
700
|
+
* band under each row, listing `fields` or rendering `component`.
|
|
701
|
+
* @example { fields: ["address", "carrier"], defaultExpanded: "first" }
|
|
702
|
+
* @example { component: CustomComponent("OrderLines"), single: true }
|
|
703
|
+
*/
|
|
704
|
+
expandable?: TableViewExpandableOptions;
|
|
705
|
+
/**
|
|
706
|
+
* How much the table draws around its rows: `"full"` (the default) or the
|
|
707
|
+
* `"compact"` list of a settings page. See {@link TableViewLayout}.
|
|
708
|
+
*/
|
|
709
|
+
layout?: TableViewLayout;
|
|
710
|
+
/** Placeholder of the search field. `$`-prefixed: an i18n key. */
|
|
711
|
+
searchPlaceholder?: string;
|
|
712
|
+
/** One-click dropdown filters drawn in the toolbar. */
|
|
713
|
+
quickFilters?: TableViewQuickFilter[];
|
|
714
|
+
/**
|
|
715
|
+
* Rows per page while the user has picked none, from 1 to 50 (registration
|
|
716
|
+
* throws otherwise). Defaults to 10. A size other than the standard 10, 25
|
|
717
|
+
* and 50 joins them in this table's page size picker.
|
|
718
|
+
*/
|
|
719
|
+
pageSize?: number;
|
|
720
|
+
/**
|
|
721
|
+
* How the rows beyond the first page are reached. Defaults to `pages`.
|
|
722
|
+
* See {@link TableViewPaginationMode}.
|
|
723
|
+
*/
|
|
724
|
+
pagination?: TableViewPaginationMode;
|
|
725
|
+
/**
|
|
726
|
+
* The footer band: the row count and a hint, figures computed over the
|
|
727
|
+
* listed rows (`summary`) and a legend of a select column's items.
|
|
728
|
+
*/
|
|
729
|
+
footer?: TableViewFooterOptions<T>;
|
|
730
|
+
/**
|
|
731
|
+
* What the empty body of the grid and the `cards` display says when the
|
|
732
|
+
* table has no row yet, when its filters match nothing, or when the list
|
|
733
|
+
* failed. See {@link TableViewEmptyStates}.
|
|
734
|
+
*/
|
|
735
|
+
emptyStates?: TableViewEmptyStates;
|
|
736
|
+
/**
|
|
737
|
+
* The key of the row id, default is _id
|
|
738
|
+
*/
|
|
134
739
|
rowIdKey?: string;
|
|
740
|
+
/**
|
|
741
|
+
* The key of the field naming a row: it follows the title of the drawer or
|
|
742
|
+
* modal that edits or shows the row ("Edit task · Write the docs"), and
|
|
743
|
+
* ends the breadcrumb of its edit and details pages.
|
|
744
|
+
*/
|
|
135
745
|
labelKey?: string;
|
|
136
746
|
rowActions?: TableViewRowActionOptions<T>;
|
|
137
747
|
customButtons?: CustomButton[];
|
|
748
|
+
/**
|
|
749
|
+
* Where the add, edit and details forms open (a page by default) and their
|
|
750
|
+
* titles, in any container.
|
|
751
|
+
* @example { type: "drawer", pages: { new: { displayName: "$tasks.form.new_title" } } }
|
|
752
|
+
*/
|
|
138
753
|
formContainer?: FormContainer;
|
|
754
|
+
/**
|
|
755
|
+
* Enable archive mode: replaces delete action with archive/restore
|
|
756
|
+
*/
|
|
139
757
|
archiveMode?: boolean;
|
|
758
|
+
/**
|
|
759
|
+
* Default filters to apply when the table view is opened
|
|
760
|
+
*/
|
|
140
761
|
defaultFilters?: Array<{
|
|
141
762
|
accessorKey: string;
|
|
142
763
|
value?: string;
|
|
143
764
|
mode: string;
|
|
144
765
|
}>;
|
|
766
|
+
/**
|
|
767
|
+
* Default sort configuration applied when no user preference exists
|
|
768
|
+
*/
|
|
145
769
|
defaultSort?: {
|
|
146
770
|
field: string;
|
|
147
771
|
desc?: boolean;
|
|
148
772
|
};
|
|
773
|
+
/**
|
|
774
|
+
* Maps URL query parameters to hidden filters applied to the table data.
|
|
775
|
+
* These filters are not visible in the UI and not persisted in preferences.
|
|
776
|
+
*/
|
|
149
777
|
queryParamFilters?: QueryParamFilters;
|
|
778
|
+
/**
|
|
779
|
+
* Maps DMS route parameters (extracted from the page slug, e.g. `:id`) to
|
|
780
|
+
* hidden filters applied to the table data. Filters are not visible in the
|
|
781
|
+
* UI nor persisted in preferences. Useful for detail pages where the table
|
|
782
|
+
* must be scoped by a path param such as the parent entity id.
|
|
783
|
+
*/
|
|
150
784
|
routeParamFilters?: RouteParamFilters;
|
|
785
|
+
/**
|
|
786
|
+
* When true, reject entire request if any row fails rule validation.
|
|
787
|
+
* When false (default), only process rows that pass rule validation.
|
|
788
|
+
*/
|
|
151
789
|
strictRuleValidation?: boolean;
|
|
790
|
+
/**
|
|
791
|
+
* Tabs displayed above the table. Each tab filters the rows on one column,
|
|
792
|
+
* or links to another page. The implicit "all" tab (no filter) is shown
|
|
793
|
+
* automatically when at least one tab is configured here.
|
|
794
|
+
*
|
|
795
|
+
* Each tab shows a row counter, fetched in one request: filter tabs with
|
|
796
|
+
* counters require the controller to mount
|
|
797
|
+
* `countBatch: TableViewRoutes.CountBatch`. `TableView()` warns at
|
|
798
|
+
* registration when a table declares tabs without it.
|
|
799
|
+
*/
|
|
152
800
|
tabs?: TableViewTab[];
|
|
801
|
+
/**
|
|
802
|
+
* When false, disables realtime broadcast/presence for this resource.
|
|
803
|
+
* Defaults to true (realtime is opt-out).
|
|
804
|
+
*/
|
|
153
805
|
realtime?: boolean;
|
|
806
|
+
/**
|
|
807
|
+
* Enable the kanban display mode for this collection. When set, users can
|
|
808
|
+
* switch between the table and a kanban board from the toolbar.
|
|
809
|
+
*/
|
|
154
810
|
kanban?: KanbanOptions;
|
|
811
|
+
/**
|
|
812
|
+
* Lets the user order the rows by hand: the rows are listed sorted on
|
|
813
|
+
* `field`, a drag handle moves a row within its page, and only the rows
|
|
814
|
+
* whose position changed are saved (a partial edit of `field`). Moving is
|
|
815
|
+
* off while a search, a filter or a tab narrows the rows. Needs the
|
|
816
|
+
* `edit` action.
|
|
817
|
+
*/
|
|
818
|
+
reorder?: TableViewReorderOptions;
|
|
819
|
+
/**
|
|
820
|
+
* Offers the `grouped` display: the grid's columns with a header row per
|
|
821
|
+
* group of rows. A view may open in it (`display: "grouped"`).
|
|
822
|
+
* @example { groupByField: "createdAt", by: "day", count: true }
|
|
823
|
+
*/
|
|
824
|
+
grouped?: GroupedOptions;
|
|
825
|
+
/**
|
|
826
|
+
* Named states of the table — filters, search, sort, columns, display and
|
|
827
|
+
* density — drawn as tabs, a strip of pills or a menu, opened from the URL
|
|
828
|
+
* (`?view=<id>`) and, with `userViews`, saved by users for themselves.
|
|
829
|
+
* Views and `tabs` coexist: a tab filters on one column, a view sets the
|
|
830
|
+
* whole table.
|
|
831
|
+
*/
|
|
832
|
+
views?: TableViewViewsOptions;
|
|
833
|
+
/**
|
|
834
|
+
* The card the `kanban` and `cards` displays draw for each row: the columns
|
|
835
|
+
* it shows, or a component drawing it whole.
|
|
836
|
+
* @example { fields: ["email", "due_date"] }
|
|
837
|
+
* @example { component: CustomComponent("TaskCard") }
|
|
838
|
+
*/
|
|
839
|
+
card?: TableViewCardOptions;
|
|
840
|
+
/**
|
|
841
|
+
* Additional displays this table view offers beyond the implicit built-in
|
|
842
|
+
* `table` (and `kanban` when the `kanban` option is set). Each `component` is
|
|
843
|
+
* a frontend component resolved by name on the client from the global
|
|
844
|
+
* registry (declare its directory with `global: true`); it receives the
|
|
845
|
+
* normalized `context` prop. `selfManagedData`/`capabilities` are the SSR
|
|
846
|
+
* source of truth for data fetching + chrome; the matching client plugin
|
|
847
|
+
* (`registerTableViewDisplay`) supplies the id, label, icon and component.
|
|
848
|
+
*/
|
|
155
849
|
displays?: TableViewDisplayOption[];
|
|
850
|
+
/**
|
|
851
|
+
* Display shown by default when the user has no saved preference. Defaults to
|
|
852
|
+
* "table".
|
|
853
|
+
*/
|
|
156
854
|
defaultDisplay?: string;
|
|
855
|
+
/**
|
|
856
|
+
* Server-side guards that run before mutating actions (edit/delete/archive/
|
|
857
|
+
* restore/new). Throw with `assert(...)` from `@antelopejs/interface-api-util`
|
|
858
|
+
* to abort the operation with an HTTP error and an i18n message key.
|
|
859
|
+
* `this` inside a guard is the data controller instance, so models declared
|
|
860
|
+
* with @Model are accessible.
|
|
861
|
+
*/
|
|
157
862
|
guards?: TableViewGuards<T>;
|
|
863
|
+
/**
|
|
864
|
+
* Component slots the generated forms open, by form kind, so another module
|
|
865
|
+
* can extend them through `RegisterComponentSlot` — the pending-invite edit
|
|
866
|
+
* form opens one for the invite extensions. Values the slot adds to a form
|
|
867
|
+
* reach the data routes only if the controller reads them.
|
|
868
|
+
*/
|
|
158
869
|
formSlots?: Partial<Record<"new" | "edit" | "view", string>>;
|
|
870
|
+
/**
|
|
871
|
+
* Skip the tenant access gate on every data route of this table view, the
|
|
872
|
+
* table-view mirror of the guards' `bypassTenantAccessGate` option. Reserved
|
|
873
|
+
* for tables that must stay readable when a gate denies the tenant (e.g.
|
|
874
|
+
* invoices on the billing page of a suspended tenant) so it can regularize
|
|
875
|
+
* its situation. Data routes are registered independently of pages, so the
|
|
876
|
+
* opt-out is controller-level and latched: once any `TableView()` call on a
|
|
877
|
+
* controller declares it, the controller's routes bypass the gate wherever
|
|
878
|
+
* they are rendered. Permission checks still apply.
|
|
879
|
+
*/
|
|
159
880
|
bypassTenantAccessGate?: boolean;
|
|
160
881
|
}
|