@antelopejs/interface-dms 0.9.1 → 0.10.0
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 +81 -0
- package/dist/attachments.js +3 -1
- package/dist/attachments.js.map +1 -1
- package/dist/auth/db/models/sessions.model.js +1 -5
- package/dist/auth/db/models/sessions.model.js.map +1 -1
- package/dist/auth/db/tables/users.table.js.map +1 -1
- package/dist/auth/index.js +4 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/internal/jwt-auth-decorator.js +7 -5
- package/dist/auth/internal/jwt-auth-decorator.js.map +1 -1
- package/dist/auth/internal/request-authenticators.js +4 -1
- package/dist/auth/internal/request-authenticators.js.map +1 -1
- package/dist/auth/internal/request-principal.js +1 -0
- package/dist/auth/internal/request-principal.js.map +1 -1
- package/dist/base/activity-feed.d.ts +26 -26
- package/dist/base/banner.d.ts +14 -14
- package/dist/base/banner.js +1 -0
- package/dist/base/banner.js.map +1 -1
- package/dist/base/block-registry/helpers.js +1 -0
- package/dist/base/block-registry/helpers.js.map +1 -1
- package/dist/base/block-registry/internal/describe.js +107 -85
- package/dist/base/block-registry/internal/describe.js.map +1 -1
- package/dist/base/block-registry/presentation.js +0 -5
- package/dist/base/block-registry/presentation.js.map +1 -1
- package/dist/base/block-registry/registry.js +4 -1
- package/dist/base/block-registry/registry.js.map +1 -1
- package/dist/base/block-types.js +0 -2
- package/dist/base/block-types.js.map +1 -1
- package/dist/base/card.d.ts +8 -8
- package/dist/base/chart-card.d.ts +2 -2
- package/dist/base/chart-card.js +2 -2
- package/dist/base/chart-card.js.map +1 -1
- package/dist/base/chart-schemas.d.ts +66 -66
- package/dist/base/chart-schemas.js +19 -21
- package/dist/base/chart-schemas.js.map +1 -1
- package/dist/base/chart.js +1 -0
- package/dist/base/chart.js.map +1 -1
- package/dist/base/code-block.js +1 -0
- package/dist/base/code-block.js.map +1 -1
- package/dist/base/confirm-dialog.d.ts +2 -6
- package/dist/base/confirm-dialog.js +36 -15
- package/dist/base/confirm-dialog.js.map +1 -1
- package/dist/base/data-sources.js +6 -2
- package/dist/base/data-sources.js.map +1 -1
- package/dist/base/data-types/compare-types.js +82 -68
- package/dist/base/data-types/compare-types.js.map +1 -1
- package/dist/base/data-types/core.d.ts +8 -101
- package/dist/base/data-types/core.js +40 -143
- package/dist/base/data-types/core.js.map +1 -1
- package/dist/base/data-types/default/address.d.ts +126 -0
- package/dist/base/data-types/default/address.js +57 -0
- package/dist/base/data-types/default/address.js.map +1 -0
- package/dist/base/data-types/default/choices.d.ts +54 -0
- package/dist/base/data-types/default/choices.js +135 -0
- package/dist/base/data-types/default/choices.js.map +1 -0
- package/dist/base/data-types/default/files.d.ts +86 -0
- package/dist/base/data-types/default/files.js +214 -0
- package/dist/base/data-types/default/files.js.map +1 -0
- package/dist/base/data-types/default/inputs.d.ts +11 -0
- package/dist/base/data-types/default/inputs.js +26 -0
- package/dist/base/data-types/default/inputs.js.map +1 -0
- package/dist/base/data-types/default/numbers.d.ts +62 -0
- package/dist/base/data-types/default/numbers.js +287 -0
- package/dist/base/data-types/default/numbers.js.map +1 -0
- package/dist/base/data-types/default/options.d.ts +133 -0
- package/dist/base/data-types/default/options.js +3 -0
- package/dist/base/data-types/default/options.js.map +1 -0
- package/dist/base/data-types/default/relations.d.ts +267 -0
- package/dist/base/data-types/default/relations.js +149 -0
- package/dist/base/data-types/default/relations.js.map +1 -0
- package/dist/base/data-types/default/strings.d.ts +35 -0
- package/dist/base/data-types/default/strings.js +154 -0
- package/dist/base/data-types/default/strings.js.map +1 -0
- package/dist/base/data-types/default-types.d.ts +73 -753
- package/dist/base/data-types/default-types.js +39 -991
- package/dist/base/data-types/default-types.js.map +1 -1
- package/dist/base/data-types/field-types.js +2 -6
- package/dist/base/data-types/field-types.js.map +1 -1
- package/dist/base/data-types/index.js +1 -20
- package/dist/base/data-types/index.js.map +1 -1
- package/dist/base/data-types/internal/compare-types.js +0 -2
- package/dist/base/data-types/internal/compare-types.js.map +1 -1
- package/dist/base/data-types/internal/relation-add-form.d.ts +7 -0
- package/dist/base/data-types/internal/relation-add-form.js +21 -0
- package/dist/base/data-types/internal/relation-add-form.js.map +1 -0
- package/dist/base/data-types/internal/relation-endpoints.d.ts +8 -0
- package/dist/base/data-types/internal/relation-endpoints.js +36 -0
- package/dist/base/data-types/internal/relation-endpoints.js.map +1 -0
- package/dist/base/data-types/status-type.js +0 -6
- package/dist/base/data-types/status-type.js.map +1 -1
- package/dist/base/display.d.ts +6 -6
- package/dist/base/display.js +15 -10
- package/dist/base/display.js.map +1 -1
- package/dist/base/empty-state.d.ts +8 -8
- package/dist/base/export-jobs.js.map +1 -1
- package/dist/base/form-block-schema.d.ts +36 -36
- package/dist/base/form-block-schema.js +0 -5
- package/dist/base/form-block-schema.js.map +1 -1
- package/dist/base/form-schema.d.ts +5 -1
- package/dist/base/form-schema.js +44 -206
- package/dist/base/form-schema.js.map +1 -1
- package/dist/base/form-types.d.ts +4 -84
- package/dist/base/form-types.js.map +1 -1
- package/dist/base/form.js +0 -7
- package/dist/base/form.js.map +1 -1
- package/dist/base/guard.d.ts +14 -14
- package/dist/base/helpers/archive-mode-helpers.js +11 -11
- package/dist/base/helpers/archive-mode-helpers.js.map +1 -1
- package/dist/base/helpers/file-refs.js +20 -7
- package/dist/base/helpers/file-refs.js.map +1 -1
- package/dist/base/index.js +0 -5
- package/dist/base/index.js.map +1 -1
- package/dist/base/internal/button-availability.d.ts +3 -17
- package/dist/base/internal/button-availability.js +36 -31
- package/dist/base/internal/button-availability.js.map +1 -1
- package/dist/base/internal/chart-schemas.js +0 -2
- package/dist/base/internal/chart-schemas.js.map +1 -1
- package/dist/base/internal/composed-text.js +0 -2
- package/dist/base/internal/composed-text.js.map +1 -1
- package/dist/base/internal/confirm-dialog.d.ts +3 -13
- package/dist/base/internal/confirm-dialog.js +37 -21
- package/dist/base/internal/confirm-dialog.js.map +1 -1
- package/dist/base/internal/display.js +3 -1
- package/dist/base/internal/display.js.map +1 -1
- package/dist/base/internal/form-schema-components.d.ts +12 -0
- package/dist/base/internal/form-schema-components.js +61 -0
- package/dist/base/internal/form-schema-components.js.map +1 -0
- package/dist/base/internal/form-schema-validation.d.ts +16 -0
- package/dist/base/internal/form-schema-validation.js +68 -0
- package/dist/base/internal/form-schema-validation.js.map +1 -0
- package/dist/base/internal/form-schema.d.ts +2 -7
- package/dist/base/internal/form-schema.js +36 -28
- package/dist/base/internal/form-schema.js.map +1 -1
- package/dist/base/internal/layouts.d.ts +1 -59
- package/dist/base/internal/searchable.js +3 -1
- package/dist/base/internal/searchable.js.map +1 -1
- package/dist/base/key-value-list.d.ts +12 -12
- package/dist/base/kpi-card.d.ts +2 -2
- package/dist/base/kpi-card.js +2 -0
- package/dist/base/kpi-card.js.map +1 -1
- package/dist/base/layouts.d.ts +6 -80
- package/dist/base/layouts.js +38 -54
- package/dist/base/layouts.js.map +1 -1
- package/dist/base/live-toggle.d.ts +2 -2
- package/dist/base/meter.d.ts +25 -25
- package/dist/base/meter.js +0 -1
- package/dist/base/meter.js.map +1 -1
- package/dist/base/nav-card-grid.d.ts +13 -13
- package/dist/base/page-toolbar.d.ts +2 -2
- package/dist/base/page-toolbar.js +0 -6
- package/dist/base/page-toolbar.js.map +1 -1
- package/dist/base/period-selector.d.ts +2 -2
- package/dist/base/period-selector.js +0 -4
- package/dist/base/period-selector.js.map +1 -1
- package/dist/base/query-response.js +3 -5
- package/dist/base/query-response.js.map +1 -1
- package/dist/base/resource-form-schema.js +0 -4
- package/dist/base/resource-form-schema.js.map +1 -1
- package/dist/base/searchable.d.ts +5 -0
- package/dist/base/searchable.js +11 -2
- package/dist/base/searchable.js.map +1 -1
- package/dist/base/stat-group.d.ts +15 -15
- package/dist/base/tab.d.ts +8 -8
- package/dist/base/tab.js +1 -0
- package/dist/base/tab.js.map +1 -1
- package/dist/base/table-view/column-display.js +0 -1
- package/dist/base/table-view/column-display.js.map +1 -1
- package/dist/base/table-view/data-functions.d.ts +10 -10
- package/dist/base/table-view/data-functions.js.map +1 -1
- package/dist/base/table-view/factory.js +32 -204
- package/dist/base/table-view/factory.js.map +1 -1
- package/dist/base/table-view/internal/auth.js +5 -19
- package/dist/base/table-view/internal/auth.js.map +1 -1
- package/dist/base/table-view/internal/column-conditions.js +0 -5
- package/dist/base/table-view/internal/column-conditions.js.map +1 -1
- package/dist/base/table-view/internal/column-display.js +5 -3
- package/dist/base/table-view/internal/column-display.js.map +1 -1
- package/dist/base/table-view/internal/factory-helpers.js +24 -158
- package/dist/base/table-view/internal/factory-helpers.js.map +1 -1
- package/dist/base/table-view/internal/factory-lifecycle-created.d.ts +21 -0
- package/dist/base/table-view/internal/factory-lifecycle-created.js +96 -0
- package/dist/base/table-view/internal/factory-lifecycle-created.js.map +1 -0
- package/dist/base/table-view/internal/factory-lifecycle-filter.d.ts +15 -0
- package/dist/base/table-view/internal/factory-lifecycle-filter.js +37 -0
- package/dist/base/table-view/internal/factory-lifecycle-filter.js.map +1 -0
- package/dist/base/table-view/internal/factory-lifecycle-options.d.ts +41 -0
- package/dist/base/table-view/internal/factory-lifecycle-options.js +99 -0
- package/dist/base/table-view/internal/factory-lifecycle-options.js.map +1 -0
- package/dist/base/table-view/internal/factory-private-actions.d.ts +32 -0
- package/dist/base/table-view/internal/factory-private-actions.js +77 -0
- package/dist/base/table-view/internal/factory-private-actions.js.map +1 -0
- package/dist/base/table-view/internal/factory-private-displays.d.ts +5 -0
- package/dist/base/table-view/internal/factory-private-displays.js +21 -0
- package/dist/base/table-view/internal/factory-private-displays.js.map +1 -0
- package/dist/base/table-view/internal/factory-private-urls.d.ts +15 -0
- package/dist/base/table-view/internal/factory-private-urls.js +43 -0
- package/dist/base/table-view/internal/factory-private-urls.js.map +1 -0
- package/dist/base/table-view/internal/files.js +3 -4
- package/dist/base/table-view/internal/files.js.map +1 -1
- package/dist/base/table-view/internal/footer.js +5 -3
- package/dist/base/table-view/internal/footer.js.map +1 -1
- package/dist/base/table-view/internal/guards.js +7 -10
- package/dist/base/table-view/internal/guards.js.map +1 -1
- package/dist/base/table-view/internal/meta-helpers.d.ts +27 -0
- package/dist/base/table-view/internal/meta-helpers.js +75 -0
- package/dist/base/table-view/internal/meta-helpers.js.map +1 -0
- package/dist/base/table-view/internal/meta.js +8 -2
- package/dist/base/table-view/internal/meta.js.map +1 -1
- package/dist/base/table-view/internal/nav-badges.js +5 -3
- package/dist/base/table-view/internal/nav-badges.js.map +1 -1
- package/dist/base/table-view/internal/option-contract.d.ts +403 -0
- package/dist/base/table-view/internal/option-contract.js +3 -0
- package/dist/base/table-view/internal/option-contract.js.map +1 -0
- package/dist/base/table-view/internal/option-displays.d.ts +125 -0
- package/dist/base/table-view/internal/option-displays.js +3 -0
- package/dist/base/table-view/internal/option-displays.js.map +1 -0
- package/dist/base/table-view/internal/option-empty-states.d.ts +43 -0
- package/dist/base/table-view/internal/option-empty-states.js +3 -0
- package/dist/base/table-view/internal/option-empty-states.js.map +1 -0
- package/dist/base/table-view/internal/option-expandable.d.ts +66 -0
- package/dist/base/table-view/internal/option-expandable.js +3 -0
- package/dist/base/table-view/internal/option-expandable.js.map +1 -0
- package/dist/base/table-view/internal/option-filtering.d.ts +85 -0
- package/dist/base/table-view/internal/option-filtering.js +4 -0
- package/dist/base/table-view/internal/option-filtering.js.map +1 -0
- package/dist/base/table-view/internal/option-footer.d.ts +64 -0
- package/dist/base/table-view/internal/option-footer.js +3 -0
- package/dist/base/table-view/internal/option-footer.js.map +1 -0
- package/dist/base/table-view/internal/option-forms.d.ts +62 -0
- package/dist/base/table-view/internal/option-forms.js +3 -0
- package/dist/base/table-view/internal/option-forms.js.map +1 -0
- package/dist/base/table-view/internal/option-row-actions.d.ts +76 -0
- package/dist/base/table-view/internal/option-row-actions.js +3 -0
- package/dist/base/table-view/internal/option-row-actions.js.map +1 -0
- package/dist/base/table-view/internal/option-views.d.ts +199 -0
- package/dist/base/table-view/internal/option-views.js +3 -0
- package/dist/base/table-view/internal/option-views.js.map +1 -0
- package/dist/base/table-view/internal/options.d.ts +2 -6
- package/dist/base/table-view/internal/options.js +35 -6
- package/dist/base/table-view/internal/options.js.map +1 -1
- package/dist/base/table-view/internal/realtime.js +15 -5
- package/dist/base/table-view/internal/realtime.js.map +1 -1
- package/dist/base/table-view/internal/request-filter.js +12 -12
- package/dist/base/table-view/internal/request-filter.js.map +1 -1
- package/dist/base/table-view/internal/resource-form.js +1 -10
- package/dist/base/table-view/internal/resource-form.js.map +1 -1
- package/dist/base/table-view/internal/row-actions-schema.js +0 -6
- package/dist/base/table-view/internal/row-actions-schema.js.map +1 -1
- package/dist/base/table-view/internal/row-rule-shape.d.ts +10 -0
- package/dist/base/table-view/internal/row-rule-shape.js +43 -0
- package/dist/base/table-view/internal/row-rule-shape.js.map +1 -0
- package/dist/base/table-view/internal/row-rules.js +1 -4
- package/dist/base/table-view/internal/row-rules.js.map +1 -1
- package/dist/base/table-view/internal/tabs.js +3 -6
- package/dist/base/table-view/internal/tabs.js.map +1 -1
- package/dist/base/table-view/internal/validation.js +2 -16
- package/dist/base/table-view/internal/validation.js.map +1 -1
- package/dist/base/table-view/internal/writer.js +1 -0
- package/dist/base/table-view/internal/writer.js.map +1 -1
- package/dist/base/table-view/meta.js +11 -93
- package/dist/base/table-view/meta.js.map +1 -1
- package/dist/base/table-view/options.d.ts +61 -1099
- package/dist/base/table-view/options.js.map +1 -1
- package/dist/base/table-view/resource-form.js +0 -2
- package/dist/base/table-view/resource-form.js.map +1 -1
- package/dist/base/table-view/routes.js +10 -9
- package/dist/base/table-view/routes.js.map +1 -1
- package/dist/base/table-view/schema.d.ts +93 -93
- package/dist/base/table-view/schema.js +4 -22
- package/dist/base/table-view/schema.js.map +1 -1
- package/dist/base/table-view/source.js +0 -5
- package/dist/base/table-view/source.js.map +1 -1
- package/dist/base/table-view/views.js +0 -3
- package/dist/base/table-view/views.js.map +1 -1
- package/dist/base/table-view/writer.js +0 -5
- package/dist/base/table-view/writer.js.map +1 -1
- package/dist/base/top-list-card.d.ts +13 -13
- package/dist/base/top-list-card.js +2 -0
- package/dist/base/top-list-card.js.map +1 -1
- package/dist/base/types/action-target.d.ts +1 -302
- package/dist/base/types/button.d.ts +2 -7
- package/dist/base/types/button.js +35 -8
- package/dist/base/types/button.js.map +1 -1
- package/dist/base/types/confirm-dialog.d.ts +1 -127
- package/dist/base/types/custom-button.d.ts +1 -87
- package/dist/base/types/error.js +2 -1
- package/dist/base/types/error.js.map +1 -1
- package/dist/base/types/export-status.d.ts +2 -8
- package/dist/base/types/export-status.js +35 -9
- package/dist/base/types/export-status.js.map +1 -1
- package/dist/base/types/form-values.d.ts +1 -4
- package/dist/base/types/internal/action-target.d.ts +2 -8
- package/dist/base/types/internal/action-target.js +36 -15
- package/dist/base/types/internal/action-target.js.map +1 -1
- package/dist/base/types/row-action-operators.d.ts +3 -29
- package/dist/base/types/row-action-operators.js +35 -18
- package/dist/base/types/row-action-operators.js.map +1 -1
- package/dist/base/types/row-action.d.ts +3 -36
- package/dist/base/types/size.d.ts +1 -3
- package/dist/base/types/size.js +0 -3
- package/dist/base/types/size.js.map +1 -1
- package/dist/base/types/tone.d.ts +3 -8
- package/dist/base/types/tone.js +35 -15
- package/dist/base/types/tone.js.map +1 -1
- package/dist/base/types/watch.d.ts +5 -19
- package/dist/base/types/watch.js +35 -3
- package/dist/base/types/watch.js.map +1 -1
- package/dist/component-options/action-target.d.ts +304 -0
- package/dist/component-options/action-target.js +3 -0
- package/dist/component-options/action-target.js.map +1 -0
- package/dist/component-options/button.d.ts +93 -0
- package/dist/component-options/button.js +12 -0
- package/dist/component-options/button.js.map +1 -0
- package/dist/component-options/confirm-dialog.d.ts +132 -0
- package/dist/component-options/confirm-dialog.js +18 -0
- package/dist/component-options/confirm-dialog.js.map +1 -0
- package/dist/component-options/data-type.d.ts +101 -0
- package/dist/component-options/data-type.js +146 -0
- package/dist/component-options/data-type.js.map +1 -0
- package/dist/component-options/form-field.d.ts +88 -0
- package/dist/component-options/form-field.js +3 -0
- package/dist/component-options/form-field.js.map +1 -0
- package/dist/component-options/internal/action-target.d.ts +8 -0
- package/dist/component-options/internal/action-target.js +18 -0
- package/dist/component-options/internal/action-target.js.map +1 -0
- package/dist/component-options/internal/button-availability.d.ts +17 -0
- package/dist/component-options/internal/button-availability.js +34 -0
- package/dist/component-options/internal/button-availability.js.map +1 -0
- package/dist/component-options/internal/confirm-dialog.d.ts +13 -0
- package/dist/component-options/internal/confirm-dialog.js +24 -0
- package/dist/component-options/internal/confirm-dialog.js.map +1 -0
- package/dist/component-options/internal/form-field.d.ts +7 -0
- package/dist/component-options/internal/form-field.js +31 -0
- package/dist/component-options/internal/form-field.js.map +1 -0
- package/dist/component-options/internal/page-layout.d.ts +71 -0
- package/dist/component-options/internal/page-layout.js +10 -0
- package/dist/component-options/internal/page-layout.js.map +1 -0
- package/dist/component-options/page-layout.d.ts +80 -0
- package/dist/component-options/page-layout.js +57 -0
- package/dist/component-options/page-layout.js.map +1 -0
- package/dist/component-options/row-action.d.ts +66 -0
- package/dist/component-options/row-action.js +22 -0
- package/dist/component-options/row-action.js.map +1 -0
- package/dist/component-slots.js.map +1 -1
- package/dist/component.d.ts +2 -2
- package/dist/component.js +38 -193
- package/dist/component.js.map +1 -1
- package/dist/data-controllers/members.js +2 -8
- package/dist/data-controllers/members.js.map +1 -1
- package/dist/data-controllers/roles.js +0 -5
- package/dist/data-controllers/roles.js.map +1 -1
- package/dist/db/internal/exportJobs.model.js +10 -6
- package/dist/db/internal/exportJobs.model.js.map +1 -1
- package/dist/db/internal/tenantLifecycle.model.js +0 -2
- package/dist/db/internal/tenantLifecycle.model.js.map +1 -1
- package/dist/db/tables/exportJobs.table.d.ts +1 -1
- package/dist/db/tables/roles.table.js.map +1 -1
- package/dist/db/tables/user_invites.table.d.ts +1 -1
- package/dist/db/tables/user_invites.table.js.map +1 -1
- package/dist/export-status.d.ts +8 -0
- package/dist/export-status.js +13 -0
- package/dist/export-status.js.map +1 -0
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +2 -4
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +1 -1
- package/dist/internal/component-builder.d.ts +17 -0
- package/dist/internal/component-builder.js +58 -0
- package/dist/internal/component-builder.js.map +1 -0
- package/dist/internal/component-permissions.d.ts +13 -0
- package/dist/internal/component-permissions.js +45 -0
- package/dist/internal/component-permissions.js.map +1 -0
- package/dist/internal/component-serialization.d.ts +10 -0
- package/dist/internal/component-serialization.js +42 -0
- package/dist/internal/component-serialization.js.map +1 -0
- package/dist/internal/component-slots.js +7 -4
- package/dist/internal/component-slots.js.map +1 -1
- package/dist/internal/component-watches.d.ts +17 -0
- package/dist/internal/component-watches.js +110 -0
- package/dist/internal/component-watches.js.map +1 -0
- package/dist/internal/invite-membership.js +0 -1
- package/dist/internal/invite-membership.js.map +1 -1
- package/dist/invite-extension-payloads.d.ts +2 -0
- package/dist/invite-extension-payloads.js +3 -0
- package/dist/invite-extension-payloads.js.map +1 -0
- package/dist/invite-extensions/internal/delivery.js +4 -1
- package/dist/invite-extensions/internal/delivery.js.map +1 -1
- package/dist/invite-extensions/internal/edit.js +5 -4
- package/dist/invite-extensions/internal/edit.js.map +1 -1
- package/dist/invite-extensions/internal/form-slot.js +5 -35
- package/dist/invite-extensions/internal/form-slot.js.map +1 -1
- package/dist/invite-extensions/internal/payload-slices.js +10 -3
- package/dist/invite-extensions/internal/payload-slices.js.map +1 -1
- package/dist/invite-extensions/internal/registry.js +3 -5
- package/dist/invite-extensions/internal/registry.js.map +1 -1
- package/dist/invite-extensions/registry.js +3 -8
- package/dist/invite-extensions/registry.js.map +1 -1
- package/dist/invite-extensions/types.d.ts +1 -2
- package/dist/invite-resolution.js +2 -1
- package/dist/invite-resolution.js.map +1 -1
- package/dist/layout-banners.js.map +1 -1
- package/dist/notifications/builder.js +25 -5
- package/dist/notifications/builder.js.map +1 -1
- package/dist/notifications/internal.js +0 -3
- package/dist/notifications/internal.js.map +1 -1
- package/dist/notifications/sendable.js.map +1 -1
- package/dist/page/categories.js +1 -4
- package/dist/page/categories.js.map +1 -1
- package/dist/page/controllers.js +9 -55
- package/dist/page/controllers.js.map +1 -1
- package/dist/page/form-page-routes.js +0 -7
- package/dist/page/form-page-routes.js.map +1 -1
- package/dist/page/internal/categories.d.ts +1 -1
- package/dist/page/internal/categories.js +12 -36
- package/dist/page/internal/categories.js.map +1 -1
- package/dist/page/internal/category-permission.d.ts +10 -0
- package/dist/page/internal/category-permission.js +20 -0
- package/dist/page/internal/category-permission.js.map +1 -0
- package/dist/page/internal/component-target.js +2 -2
- package/dist/page/internal/component-target.js.map +1 -1
- package/dist/page/internal/component-tree.js +0 -2
- package/dist/page/internal/component-tree.js.map +1 -1
- package/dist/page/internal/controller-options.d.ts +6 -0
- package/dist/page/internal/controller-options.js +40 -0
- package/dist/page/internal/controller-options.js.map +1 -0
- package/dist/page/internal/extension-assembly.js +2 -7
- package/dist/page/internal/extension-assembly.js.map +1 -1
- package/dist/page/internal/layout-filter.js +7 -3
- package/dist/page/internal/layout-filter.js.map +1 -1
- package/dist/page/internal/metadata-components.d.ts +47 -0
- package/dist/page/internal/metadata-components.js +136 -0
- package/dist/page/internal/metadata-components.js.map +1 -0
- package/dist/page/internal/metadata-extension-contributions.d.ts +14 -0
- package/dist/page/internal/metadata-extension-contributions.js +56 -0
- package/dist/page/internal/metadata-extension-contributions.js.map +1 -0
- package/dist/page/internal/metadata-extensions.d.ts +8 -0
- package/dist/page/internal/metadata-extensions.js +21 -0
- package/dist/page/internal/metadata-extensions.js.map +1 -0
- package/dist/page/internal/metadata-helpers.js +0 -14
- package/dist/page/internal/metadata-helpers.js.map +1 -1
- package/dist/page/internal/metadata-info.d.ts +5 -0
- package/dist/page/internal/metadata-info.js +39 -0
- package/dist/page/internal/metadata-info.js.map +1 -0
- package/dist/page/internal/metadata-layout-response.d.ts +32 -0
- package/dist/page/internal/metadata-layout-response.js +76 -0
- package/dist/page/internal/metadata-layout-response.js.map +1 -0
- package/dist/page/internal/metadata-layout.d.ts +10 -0
- package/dist/page/internal/metadata-layout.js +44 -0
- package/dist/page/internal/metadata-layout.js.map +1 -0
- package/dist/page/internal/metadata-lifecycle.d.ts +52 -0
- package/dist/page/internal/metadata-lifecycle.js +241 -0
- package/dist/page/internal/metadata-lifecycle.js.map +1 -0
- package/dist/page/internal/metadata-owner.d.ts +53 -0
- package/dist/page/internal/metadata-owner.js +14 -0
- package/dist/page/internal/metadata-owner.js.map +1 -0
- package/dist/page/internal/metadata-publish.d.ts +20 -0
- package/dist/page/internal/metadata-publish.js +55 -0
- package/dist/page/internal/metadata-publish.js.map +1 -0
- package/dist/page/internal/metadata-registration.d.ts +8 -0
- package/dist/page/internal/metadata-registration.js +72 -0
- package/dist/page/internal/metadata-registration.js.map +1 -0
- package/dist/page/internal/metadata-upload-registration.d.ts +16 -0
- package/dist/page/internal/metadata-upload-registration.js +64 -0
- package/dist/page/internal/metadata-upload-registration.js.map +1 -0
- package/dist/page/internal/metadata-uploads.d.ts +18 -0
- package/dist/page/internal/metadata-uploads.js +46 -0
- package/dist/page/internal/metadata-uploads.js.map +1 -0
- package/dist/page/internal/nav-badges.d.ts +1 -1
- package/dist/page/internal/nav-badges.js +3 -1
- package/dist/page/internal/nav-badges.js.map +1 -1
- package/dist/page/internal/page-record.d.ts +2 -9
- package/dist/page/internal/page-record.js +8 -5
- package/dist/page/internal/page-record.js.map +1 -1
- package/dist/page/internal/page-registration.js +0 -4
- package/dist/page/internal/page-registration.js.map +1 -1
- package/dist/page/internal/registry.js +2 -1
- package/dist/page/internal/registry.js.map +1 -1
- package/dist/page/internal/table-view-ids.js +3 -2
- package/dist/page/internal/table-view-ids.js.map +1 -1
- package/dist/page/layout-filter.js +1 -0
- package/dist/page/layout-filter.js.map +1 -1
- package/dist/page/metadata.js +192 -558
- package/dist/page/metadata.js.map +1 -1
- package/dist/page/roots.js +3 -5
- package/dist/page/roots.js.map +1 -1
- package/dist/page/types.d.ts +1 -1
- package/dist/page/types.js.map +1 -1
- package/dist/permissions.js +0 -18
- package/dist/permissions.js.map +1 -1
- package/dist/realtime.js +0 -3
- package/dist/realtime.js.map +1 -1
- package/dist/request-tenant.js +4 -1
- package/dist/request-tenant.js.map +1 -1
- package/dist/tenant-lifecycle.js +2 -2
- package/dist/tenant-lifecycle.js.map +1 -1
- package/dist/tones.d.ts +8 -0
- package/dist/tones.js +19 -0
- package/dist/tones.js.map +1 -0
- package/dist/uploads.js +15 -4
- package/dist/uploads.js.map +1 -1
- package/dist/utils/internal/row-instance.js +2 -3
- package/dist/utils/internal/row-instance.js.map +1 -1
- package/dist/utils/internal/type-check.d.ts +10 -1
- package/dist/utils/internal/type-check.js +12 -3
- package/dist/utils/internal/type-check.js.map +1 -1
- package/dist/utils/internal/value-parser.js +7 -2
- package/dist/utils/internal/value-parser.js.map +1 -1
- package/dist/watch-actions.d.ts +19 -0
- package/dist/watch-actions.js +7 -0
- package/dist/watch-actions.js.map +1 -0
- package/docs/3.base/2.types.md +1 -1
- package/docs/3.base/8.data-types.md +2 -0
- package/docs/4.notifications/3.sending.md +1 -1
- package/package.json +3 -3
|
@@ -1,715 +1,62 @@
|
|
|
1
|
-
import type { ControllerClass } from "@antelopejs/interface-api";
|
|
2
|
-
import type { ButtonPermission, Component, ComponentInfoSerialized } from "../../component";
|
|
3
|
-
import type { FormBuilder, FormPropsSerialized } from "../form-types";
|
|
4
|
-
import type { BlockLinkAction } from "../display";
|
|
5
|
-
import type { Tone } from "../types/tone";
|
|
6
|
-
import type { ColorValue } from "../types";
|
|
7
|
-
import type { CustomButton, CustomButtonSerialized } from "../types/custom-button";
|
|
8
|
-
import type { TableViewGuards } from "../types/guards";
|
|
9
|
-
import type { AddRowActionConfig, BulkRowActionConfig, CustomRowAction, CustomRowActionSerialized, RowActionConfig, RowActionConfigSerialized, RowActionRule } from "../types/row-action";
|
|
10
|
-
import type { ModalSize } from "../types/size";
|
|
11
|
-
import type { TableViewSourceSerialized } from "./source";
|
|
12
1
|
export declare const DEFAULT_ROW_ID_FIELD = "_id";
|
|
13
2
|
/** The most rows a table lists per page, whoever picks the size. */
|
|
14
3
|
export declare const MAX_TABLE_PAGE_SIZE = 50;
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
* Defaults to "Actions for <label>" with `labelKey`, "Row actions" without.
|
|
72
|
-
*/
|
|
73
|
-
menuLabel?: string;
|
|
74
|
-
}
|
|
75
|
-
export interface TableViewRowActionOptionsSerialized {
|
|
76
|
-
delete?: boolean | RowActionConfigSerialized;
|
|
77
|
-
archive?: boolean | RowActionConfigSerialized;
|
|
78
|
-
restore?: boolean | RowActionConfigSerialized;
|
|
79
|
-
showArchived?: boolean;
|
|
80
|
-
duplicate?: boolean | RowActionConfigSerialized;
|
|
81
|
-
details?: boolean | RowActionConfigSerialized;
|
|
82
|
-
edit?: boolean | RowActionConfigSerialized;
|
|
83
|
-
copyLink?: boolean | RowActionConfigSerialized;
|
|
84
|
-
add?: boolean | RowActionConfigSerialized;
|
|
85
|
-
hasSelection?: boolean;
|
|
86
|
-
custom?: CustomRowActionSerialized[];
|
|
87
|
-
menuLabel?: string;
|
|
88
|
-
}
|
|
89
|
-
/** The filter a tab applies on one column. */
|
|
90
|
-
export interface TableViewTabFilter {
|
|
91
|
-
/** Filterable column the tab filters on. */
|
|
92
|
-
accessorKey: string;
|
|
93
|
-
/** Value compared; a list of values is joined with commas. */
|
|
94
|
-
value?: string;
|
|
95
|
-
/** Compare mode, e.g. `"is"`. */
|
|
96
|
-
mode: string;
|
|
97
|
-
}
|
|
98
|
-
/** A sort a view applies: the column, newest or largest first with `desc`. */
|
|
99
|
-
export interface TableViewSort {
|
|
100
|
-
field: string;
|
|
101
|
-
desc?: boolean;
|
|
102
|
-
}
|
|
103
|
-
/** The columns a view shows, and their order. */
|
|
104
|
-
export interface TableViewColumnsState {
|
|
105
|
-
/** Columns shown, whatever their default visibility. */
|
|
106
|
-
visible?: string[];
|
|
107
|
-
/** Columns hidden, whatever their default visibility. */
|
|
108
|
-
hidden?: string[];
|
|
109
|
-
/**
|
|
110
|
-
* Column order, left to right; the columns left out follow in their
|
|
111
|
-
* declared order.
|
|
112
|
-
*/
|
|
113
|
-
order?: string[];
|
|
114
|
-
}
|
|
115
|
-
/** The columns of the controller one table view shows: see `TableViewOptions.columns`. */
|
|
116
|
-
export interface TableViewColumnsOptions {
|
|
117
|
-
/**
|
|
118
|
-
* Columns this table view opens hidden, as a column declared
|
|
119
|
-
* `isVisible: false` does but for this table view only: another table view
|
|
120
|
-
* over the same controller still shows them. They stay in the column
|
|
121
|
-
* picker, filterable and in the forms.
|
|
122
|
-
*/
|
|
123
|
-
hidden?: string[];
|
|
124
|
-
}
|
|
125
|
-
/** Row height of a table: `compact` gives 36px rows under a 32px header. */
|
|
126
|
-
export type TableViewDensity = "default" | "compact";
|
|
127
|
-
/**
|
|
128
|
-
* What runs a row's click action (its `isDefault` custom action, else `edit`
|
|
129
|
-
* or `details`): a double-click (`"double"`, the default), or a single click
|
|
130
|
-
* (`"single"`), for a list read row after row in a side panel. A single click
|
|
131
|
-
* on a control of the row (a button, a link, a checkbox) or one ending a text
|
|
132
|
-
* selection runs nothing.
|
|
133
|
-
*/
|
|
134
|
-
export type TableViewRowClick = "single" | "double";
|
|
135
|
-
/**
|
|
136
|
-
* Everything a view sets on the table when it is opened. What a view leaves
|
|
137
|
-
* out falls back to the table's defaults, so opening a view always shows the
|
|
138
|
-
* same rows the same way.
|
|
139
|
-
*
|
|
140
|
-
* A filter value may hold tokens the server resolves for each request, so a
|
|
141
|
-
* view's rows and its counter follow the caller and the clock:
|
|
142
|
-
* `{{user.id}}` (the signed-in user's id), `{{now}}` and `{{now-7d}}` /
|
|
143
|
-
* `{{now+14d}}` (the current instant, moved by whole days).
|
|
144
|
-
*/
|
|
145
|
-
export interface TableViewViewState {
|
|
146
|
-
/** Filters on filterable columns, shown as the table's filter chips. */
|
|
147
|
-
filters?: TableViewTabFilter[];
|
|
148
|
-
/** Text typed in the search field. */
|
|
149
|
-
search?: string;
|
|
150
|
-
/** Sort of the rows; the list sorts on the first entry. */
|
|
151
|
-
sort?: TableViewSort[];
|
|
152
|
-
/** Columns shown and their order. */
|
|
153
|
-
columns?: TableViewColumnsState;
|
|
154
|
-
/**
|
|
155
|
-
* Display the view opens in (`"table"`, `"kanban"`, `"grouped"`, a
|
|
156
|
-
* module's `<module>:<id>`): it must be one the table offers.
|
|
157
|
-
*/
|
|
158
|
-
display?: string;
|
|
159
|
-
/** Row height of the grid. */
|
|
160
|
-
density?: TableViewDensity;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* A named state of the table ("Past due > 7 days", "Mine"). Opening it
|
|
164
|
-
* applies its state; the user may then change filters or sort, which marks
|
|
165
|
-
* the view as modified with a way back (Reset) or forward (Save as new view).
|
|
166
|
-
* A view the module declares is never overwritten.
|
|
167
|
-
*/
|
|
168
|
-
export interface TableViewView extends TableViewViewState {
|
|
169
|
-
/** Stable id, used in the URL (`?view=<id>`). */
|
|
170
|
-
id: string;
|
|
171
|
-
/** `$`-prefixed: an i18n key. */
|
|
172
|
-
label: string;
|
|
173
|
-
icon?: string;
|
|
174
|
-
/** Colors the view's icon and counter. */
|
|
175
|
-
tone?: Tone;
|
|
176
|
-
/** A status dot drawn before the label. */
|
|
177
|
-
dot?: Tone;
|
|
178
|
-
/**
|
|
179
|
-
* Shows the number of rows the view lists, counted by the controller's
|
|
180
|
-
* `countBatch` route like the tab counters: what opening it would list,
|
|
181
|
-
* under the open tab and the page's URL filters. The open view counts the
|
|
182
|
-
* rows listed, its filters and search as the user edited them.
|
|
183
|
-
*/
|
|
184
|
-
count?: boolean;
|
|
185
|
-
/**
|
|
186
|
-
* Gate the view: one of the table's actions by name (e.g. `"export"`), or
|
|
187
|
-
* an `Action` of any component.
|
|
188
|
-
*/
|
|
189
|
-
permission?: ButtonPermission;
|
|
190
|
-
/** Absolute permission id the view requires; wins over `permission`. */
|
|
191
|
-
permissionId?: string;
|
|
192
|
-
}
|
|
193
|
-
/** A view as it reaches the client. */
|
|
194
|
-
export type TableViewViewSerialized = Omit<TableViewView, "permission" | "permissionId">;
|
|
195
|
-
/**
|
|
196
|
-
* Where the views are drawn: a tab strip above the table (`tabs`), a row of
|
|
197
|
-
* pills above the status tabs (`strip`), or a menu button in the toolbar
|
|
198
|
-
* (`menu`).
|
|
199
|
-
*/
|
|
200
|
-
export type TableViewViewsLayout = "tabs" | "strip" | "menu";
|
|
201
|
-
/** The views a table offers. */
|
|
202
|
-
export interface TableViewViewsOptions {
|
|
203
|
-
/** The views the module declares, in order. */
|
|
204
|
-
items: TableViewView[];
|
|
205
|
-
/** Defaults to `tabs`. */
|
|
206
|
-
layout?: TableViewViewsLayout;
|
|
207
|
-
/**
|
|
208
|
-
* View opened on arrival when the URL names none. Without it the table
|
|
209
|
-
* opens in its own default state.
|
|
210
|
-
*/
|
|
211
|
-
defaultView?: string;
|
|
212
|
-
/**
|
|
213
|
-
* Lets users save the current state as a view of their own ("Save as new
|
|
214
|
-
* view"), and update or delete it. A user's views are kept with the rest
|
|
215
|
-
* of their table preferences and are never shown to anyone else.
|
|
216
|
-
*/
|
|
217
|
-
userViews?: boolean;
|
|
218
|
-
}
|
|
219
|
-
/** The views of a table as they reach the client. */
|
|
220
|
-
export interface TableViewViewsSerialized extends Omit<TableViewViewsOptions, "items"> {
|
|
221
|
-
items: TableViewViewSerialized[];
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* A tab above the table: it filters the rows on one column (`filter`), or
|
|
225
|
-
* opens another page (`to`) — never both, which registration refuses. A tab
|
|
226
|
-
* with neither, given the id `"all"`, stands in for the implicit "all" tab, at
|
|
227
|
-
* its own position, with its own label and icon.
|
|
228
|
-
*/
|
|
229
|
-
export interface TableViewTab {
|
|
230
|
-
id: string;
|
|
231
|
-
label: string;
|
|
232
|
-
/** Hidden filter the tab applies, on a single column. */
|
|
233
|
-
filter?: TableViewTabFilter;
|
|
234
|
-
icon?: string;
|
|
235
|
-
textColor?: ColorValue;
|
|
236
|
-
iconColor?: ColorValue;
|
|
237
|
-
/**
|
|
238
|
-
* Turns the tab into a link to another page, typically a sibling list
|
|
239
|
-
* (Members ↔ Invitations): a registered page controller, whose URL and
|
|
240
|
-
* permission the tab follows, or a dashboard path.
|
|
241
|
-
*/
|
|
242
|
-
to?: ControllerClass | string;
|
|
243
|
-
/**
|
|
244
|
-
* Gate the tab, a filter tab or a link tab: one of the table's actions by
|
|
245
|
-
* name (e.g. `"list"`), or an `Action` of any component. A link tab to a
|
|
246
|
-
* page controller follows that page's own permission without it.
|
|
247
|
-
*/
|
|
248
|
-
permission?: ButtonPermission;
|
|
249
|
-
/** Absolute permission id the tab requires; wins over `permission`. */
|
|
250
|
-
permissionId?: string;
|
|
251
|
-
/**
|
|
252
|
-
* Data controller (or data API location, e.g. `"/api/tables/invites"`)
|
|
253
|
-
* whose row total a link tab shows as its counter.
|
|
254
|
-
*/
|
|
255
|
-
countFrom?: ControllerClass | string;
|
|
256
|
-
/**
|
|
257
|
-
* Publishes the tab's counter as the navigation badge of the page it
|
|
258
|
-
* stands for, in the main navigation and the settings one: this table's
|
|
259
|
-
* page for a filter tab, the linked page for a link tab (which then needs a
|
|
260
|
-
* page controller `to` and a data controller `countFrom`). Counted on the
|
|
261
|
-
* server when the menu loads, with the caller's own `list` permission; a
|
|
262
|
-
* count of zero shows no badge. `true` draws it neutral; `{ tone }` draws
|
|
263
|
-
* it in that tone (`{ tone: "warning" }` for a tab of rows to check).
|
|
264
|
-
* The badge counts the tab over the whole page, whatever view, filters,
|
|
265
|
-
* search or URL filters narrow the tab's own counter.
|
|
266
|
-
*/
|
|
267
|
-
navBadge?: boolean | TableViewTabNavBadge;
|
|
268
|
-
}
|
|
269
|
-
/** A tab's navigation badge drawn in a tone (see `TableViewTab.navBadge`). */
|
|
270
|
-
export interface TableViewTabNavBadge {
|
|
271
|
-
/** Neutral when absent. */
|
|
272
|
-
tone?: Tone;
|
|
273
|
-
}
|
|
274
|
-
/** A tab as it reaches the client: link targets resolved to paths. */
|
|
275
|
-
export interface TableViewTabSerialized extends Omit<TableViewTab, "to" | "countFrom" | "permission" | "permissionId"> {
|
|
276
|
-
/** Path the link tab opens. */
|
|
277
|
-
to?: string;
|
|
278
|
-
/** Full id of the page a link tab opens, when it is a registered page. */
|
|
279
|
-
toPage?: string;
|
|
280
|
-
/** Data API location whose total the link tab shows. */
|
|
281
|
-
countFrom?: string;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* How much a table draws around its rows.
|
|
285
|
-
*
|
|
286
|
-
* - `"full"`: the dashboard grid — caption and count, a search button,
|
|
287
|
-
* filters, sort, refresh, the ⋯ table menu, column header menus and a
|
|
288
|
-
* footer with the page size picker.
|
|
289
|
-
* - `"compact"`: the list of a settings page — tabs, an always-open search
|
|
290
|
-
* field, quick filters, custom buttons and a footer with the page size
|
|
291
|
-
* picker; no caption, filters row, sort menu, refresh, ⋯ menu nor column
|
|
292
|
-
* menus.
|
|
293
|
-
*
|
|
294
|
-
* Either way a control shows only when it means something: the search when
|
|
295
|
-
* the controller has `@Searchable` fields, the filters when a column is
|
|
296
|
-
* `filterable`, the caption when `caption` is set, the export entry when the
|
|
297
|
-
* caller may export.
|
|
298
|
-
*/
|
|
299
|
-
export type TableViewLayout = "full" | "compact";
|
|
300
|
-
/** How a quick filter compares its column with the picked value. */
|
|
301
|
-
export type TableViewQuickFilterMode = "is" | "is_not" | "include" | "exclude" | "array_contains_string";
|
|
302
|
-
/**
|
|
303
|
-
* A one-click filter drawn in the toolbar as a dropdown button listing the
|
|
304
|
-
* values of a column: a select's items, a boolean's two labels, a tags
|
|
305
|
-
* column's `suggestions`, or the rows a relation points to. The picked value
|
|
306
|
-
* is the column's filter, the very one the filters row edits: kept with the
|
|
307
|
-
* table's state, counted as an active filter and cleared by "Reset filters".
|
|
308
|
-
* In the `compact` layout, which has no filters row, the button names the
|
|
309
|
-
* column and its value ("Role: Admin") next to a clear button.
|
|
310
|
-
*/
|
|
311
|
-
export interface TableViewQuickFilter {
|
|
312
|
-
/** Filterable column the control filters on. */
|
|
313
|
-
field: string;
|
|
314
|
-
/** Button text while no value is picked; defaults to the column name. */
|
|
315
|
-
label?: string;
|
|
316
|
-
/** Button icon; defaults to a funnel. */
|
|
317
|
-
icon?: string;
|
|
318
|
-
/** Text of the entry that clears the filter; defaults to "All". */
|
|
319
|
-
allLabel?: string;
|
|
320
|
-
/**
|
|
321
|
-
* Compare mode of the filter. Defaults to `array_contains_string` for a
|
|
322
|
-
* multiple relation or select and for a type whose default compare mode it
|
|
323
|
-
* is (tags), `is` otherwise.
|
|
324
|
-
*/
|
|
325
|
-
mode?: TableViewQuickFilterMode;
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* How the rows beyond the first page are reached: a pager (`pages`), a
|
|
329
|
-
* "Load more" button appending the next page (`loadMore`), or the next page
|
|
330
|
-
* appended as the end of the list scrolls into view (`infinite`, a feed).
|
|
331
|
-
*/
|
|
332
|
-
export type TableViewPaginationMode = "pages" | "loadMore" | "infinite";
|
|
333
|
-
/**
|
|
334
|
-
* Rows the user orders by hand: a drag handle (or the arrow keys on it)
|
|
335
|
-
* moves a row, and the rows it moved get a new value of `field`. The handle
|
|
336
|
-
* shows on the grid and on the `cards` display (in front of each row, on
|
|
337
|
-
* each card), to a caller who may edit the rows.
|
|
338
|
-
*/
|
|
339
|
-
export interface TableViewReorderOptions {
|
|
340
|
-
/**
|
|
341
|
-
* The number column holding a row's position, `@Sortable()` and
|
|
342
|
-
* writable: the rows are listed sorted on it.
|
|
343
|
-
*/
|
|
344
|
-
field: string;
|
|
345
|
-
}
|
|
346
|
-
/** What a footer summary computes over the rows the table lists. */
|
|
347
|
-
export type TableViewSummaryOperation = "sum" | "count";
|
|
348
|
-
/**
|
|
349
|
-
* How a footer summary's figure reads, the options of `Intl.NumberFormat`
|
|
350
|
-
* a backend can send. Left out, a sum reads like its column's cells (a
|
|
351
|
-
* price as a price) and a count as a whole number.
|
|
352
|
-
*/
|
|
353
|
-
export interface TableViewSummaryFormat {
|
|
354
|
-
style?: "decimal" | "percent" | "currency";
|
|
355
|
-
/** ISO 4217 code, for the `currency` style. */
|
|
356
|
-
currency?: string;
|
|
357
|
-
notation?: "standard" | "compact";
|
|
358
|
-
minimumFractionDigits?: number;
|
|
359
|
-
maximumFractionDigits?: number;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* A figure of the footer band ("MRR €12,480", "3 failed"), computed by the
|
|
363
|
-
* server over every row the table's filters, search and tab list — not only
|
|
364
|
-
* the page shown.
|
|
365
|
-
*/
|
|
366
|
-
export interface TableViewFooterSummary<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
367
|
-
/** Shown before the figure. `$`-prefixed: an i18n key. */
|
|
368
|
-
label: string;
|
|
369
|
-
/** Column summed; required by `sum`. */
|
|
370
|
-
field?: string;
|
|
371
|
-
op: TableViewSummaryOperation;
|
|
372
|
-
/**
|
|
373
|
-
* Only the rows this rule accepts are summed or counted ("failed"). It
|
|
374
|
-
* reads the stored fields of a row, in the database.
|
|
375
|
-
*/
|
|
376
|
-
where?: RowActionRule<T>;
|
|
377
|
-
format?: TableViewSummaryFormat;
|
|
378
|
-
}
|
|
379
|
-
/** A footer summary as it reaches the client: `where` stays on the server. */
|
|
380
|
-
export interface TableViewFooterSummarySerialized extends Omit<TableViewFooterSummary, "where"> {
|
|
381
|
-
/** Id the `summary` route computes it under. */
|
|
382
|
-
id: string;
|
|
383
|
-
}
|
|
384
|
-
/** Texts and figures of the footer band. */
|
|
385
|
-
export interface TableViewFooterOptions<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
386
|
-
/**
|
|
387
|
-
* Row count text, an i18n key with `$` receiving `{ count }` and pluralized
|
|
388
|
-
* on it ("7 members"). Defaults to "{count} items".
|
|
389
|
-
*/
|
|
390
|
-
countLabel?: string;
|
|
391
|
-
/** A hint at the right of the count. `$`-prefixed: an i18n key. */
|
|
392
|
-
hint?: string;
|
|
393
|
-
/**
|
|
394
|
-
* Figures computed over the listed rows, next to the count. The
|
|
395
|
-
* controller mounts `summary: TableViewRoutes.Summary` to serve them.
|
|
396
|
-
*/
|
|
397
|
-
summary?: TableViewFooterSummary<T>[];
|
|
398
|
-
/**
|
|
399
|
-
* A `SelectType` column whose items, with their colors, the footer lists
|
|
400
|
-
* as a legend.
|
|
401
|
-
*/
|
|
402
|
-
legend?: string;
|
|
403
|
-
}
|
|
404
|
-
/** The footer band's options as they reach the client. */
|
|
405
|
-
export interface TableViewFooterSerialized extends Omit<TableViewFooterOptions, "summary"> {
|
|
406
|
-
summary?: TableViewFooterSummarySerialized[];
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* What a table's empty body says for one reason it is empty, in place of the
|
|
410
|
-
* built-in texts. Texts are `$`-prefixed i18n keys or literals; both receive
|
|
411
|
-
* `{ search }`, the text searched. Action labels receive no parameter.
|
|
412
|
-
*/
|
|
413
|
-
export interface TableViewEmptyState {
|
|
414
|
-
title: string;
|
|
415
|
-
description?: string;
|
|
416
|
-
icon?: string;
|
|
417
|
-
/** Link buttons, after the ones the table adds itself. */
|
|
418
|
-
actions?: BlockLinkAction[];
|
|
419
|
-
/**
|
|
420
|
-
* Frontend component drawing the whole state instead (a gallery of
|
|
421
|
-
* templates), resolved by name from the global registry. It receives
|
|
422
|
-
* `state` (`firstRun`, `filtered` or `error`), `search`, `refresh()`, and
|
|
423
|
-
* `clearSearch()` / `clearFilters()` while a search or a filter chip
|
|
424
|
-
* narrows the rows (unset otherwise); `useTableViewEmptyState()` reads the
|
|
425
|
-
* same from deeper in its tree.
|
|
426
|
-
*/
|
|
427
|
-
component?: Component;
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* The empty states of a table: `firstRun` while it has no row yet (it keeps
|
|
431
|
-
* the add button), `filtered` when its filters or search match nothing (it
|
|
432
|
-
* keeps "Clear search", "Clear filters" or "Clear filters and search"),
|
|
433
|
-
* `error` when the list failed (it keeps "Try again"). The grid and the
|
|
434
|
-
* `cards` display draw them; the kanban board and a module's own display do
|
|
435
|
-
* not.
|
|
436
|
-
*/
|
|
437
|
-
export interface TableViewEmptyStates {
|
|
438
|
-
firstRun?: TableViewEmptyState;
|
|
439
|
-
filtered?: TableViewEmptyState;
|
|
440
|
-
error?: TableViewEmptyState;
|
|
441
|
-
}
|
|
442
|
-
/** An empty state as it reaches the client. */
|
|
443
|
-
export interface TableViewEmptyStateSerialized extends Omit<TableViewEmptyState, "component"> {
|
|
444
|
-
component?: ComponentInfoSerialized;
|
|
445
|
-
}
|
|
446
|
-
/** The empty states as they reach the client. */
|
|
447
|
-
export type TableViewEmptyStatesSerialized = Partial<Record<keyof TableViewEmptyStates, TableViewEmptyStateSerialized>>;
|
|
448
|
-
/**
|
|
449
|
-
* The card the `kanban` and `cards` displays draw for each row. Left out,
|
|
450
|
-
* a card shows the row's label and its first few listable columns (on the
|
|
451
|
-
* board, besides the one it groups on).
|
|
452
|
-
*/
|
|
453
|
-
export interface TableViewCardOptions {
|
|
454
|
-
/**
|
|
455
|
-
* Columns shown on the card below its title (`labelKey`), each value
|
|
456
|
-
* drawn like a cell: through its column's `display`, else its data type.
|
|
457
|
-
*/
|
|
458
|
-
fields?: string[];
|
|
459
|
-
/**
|
|
460
|
-
* Frontend component drawing the whole card, resolved by name from the
|
|
461
|
-
* global registry; its directory must be declared globally. Both displays
|
|
462
|
-
* hand it the same props: `row`, `rowId`, `columns`, `labelKey`, `actions`
|
|
463
|
-
* (the table's row actions), `selected` and `select(value?)` (the row's
|
|
464
|
-
* selection), and `open()` (what a click on the row does). The kanban adds
|
|
465
|
-
* `groupValue`, the value of the column the card sits in; the `cards`
|
|
466
|
-
* display of a hand-ordered table (`reorder`) adds `reorder`, the card's
|
|
467
|
-
* move handle (`{ enabled, dragging, handle }`, `handle` bound with
|
|
468
|
-
* `v-bind` on a button).
|
|
469
|
-
*/
|
|
470
|
-
component?: Component;
|
|
471
|
-
/**
|
|
472
|
-
* `cards` display only: the narrowest a card gets, as a CSS length
|
|
473
|
-
* (`"300px"`, `"20rem"`). Defaults to `"230px"`. The row fits as many
|
|
474
|
-
* cards of that width as it can and stretches them to fill it; a list too
|
|
475
|
-
* short to fill a row stretches its cards up to twice that width.
|
|
476
|
-
*/
|
|
477
|
-
minWidth?: string;
|
|
478
|
-
/**
|
|
479
|
-
* `cards` display only: the height of a placeholder card while the page
|
|
480
|
-
* loads, as a CSS length (`"260px"`). Left out, a placeholder is as tall as
|
|
481
|
-
* the built-in card. A `component` taller than that sets it to its own
|
|
482
|
-
* height, so the pagination footer below the grid stands where the loaded
|
|
483
|
-
* cards put it. The cards themselves keep their own height.
|
|
484
|
-
*/
|
|
485
|
-
skeletonHeight?: string;
|
|
486
|
-
}
|
|
487
|
-
/** The card of the `kanban` and `cards` displays as it reaches the client. */
|
|
488
|
-
export interface TableViewCardOptionsSerialized {
|
|
489
|
-
fields?: string[];
|
|
490
|
-
component?: ComponentInfoSerialized;
|
|
491
|
-
minWidth?: string;
|
|
492
|
-
skeletonHeight?: string;
|
|
493
|
-
}
|
|
494
|
-
/** The kanban options as its display entry carries them. */
|
|
495
|
-
export interface KanbanOptionsSerialized extends Omit<KanbanOptions, "card"> {
|
|
496
|
-
card?: TableViewCardOptionsSerialized;
|
|
497
|
-
}
|
|
498
|
-
export interface TableViewDisplayCapabilities {
|
|
499
|
-
columnManagement?: boolean;
|
|
500
|
-
filters?: boolean;
|
|
501
|
-
search?: boolean;
|
|
502
|
-
sorting?: boolean;
|
|
503
|
-
tabs?: boolean;
|
|
504
|
-
/**
|
|
505
|
-
* Whether the table keeps its own chrome (caption, toolbar, tabs, filters
|
|
506
|
-
* row, bulk bar) around a display that draws a complete interface itself.
|
|
507
|
-
* Defaults to true.
|
|
508
|
-
*/
|
|
509
|
-
header?: boolean;
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* A display a table view offers besides its grid: a built-in one by its id
|
|
513
|
-
* (`"cards"`), or a module's, named `<module>:<id>` (`"saas:plan-cards"`) and
|
|
514
|
-
* registered on the frontend with `registerTableViewDisplay`.
|
|
515
|
-
*/
|
|
516
|
-
export interface TableViewDisplayOption {
|
|
517
|
-
id: string;
|
|
518
|
-
options?: Record<string, unknown>;
|
|
519
|
-
component?: Component;
|
|
520
|
-
selfManagedData?: boolean;
|
|
521
|
-
capabilities?: TableViewDisplayCapabilities;
|
|
522
|
-
}
|
|
523
|
-
export interface TableViewDisplayOptionSerialized extends Omit<TableViewDisplayOption, "component"> {
|
|
524
|
-
component?: ComponentInfoSerialized;
|
|
525
|
-
}
|
|
526
|
-
/** A field of the expanded row's detail band. */
|
|
527
|
-
export interface TableViewExpandableField {
|
|
528
|
-
/** Column key; the value renders through that column's data type. */
|
|
529
|
-
key: string;
|
|
530
|
-
/** Label shown instead of the column's name. `$`-prefixed: an i18n key. */
|
|
531
|
-
label?: string;
|
|
532
|
-
}
|
|
533
|
-
/** Which rows open on arrival and after the listed set changes. */
|
|
534
|
-
export type TableViewExpandedDefault = "none" | "first" | "all";
|
|
535
|
-
/** How expandable rows open, whatever their band shows. */
|
|
536
|
-
export interface TableViewExpandableBehavior {
|
|
537
|
-
/**
|
|
538
|
-
* Rows open when the table loads and whenever a new page, filter, search,
|
|
539
|
-
* sort, tab or archive view is listed. Defaults to "none".
|
|
540
|
-
*/
|
|
541
|
-
defaultExpanded?: TableViewExpandedDefault;
|
|
542
|
-
/** Keep at most one row open: opening a row closes the previous one. */
|
|
543
|
-
single?: boolean;
|
|
544
|
-
/**
|
|
545
|
-
* Load the row again when it opens, from the data API's `get` route, and
|
|
546
|
-
* show the band with that answer: the band can then show fields the list
|
|
547
|
-
* does not return. The band shows a placeholder while it loads and an
|
|
548
|
-
* error with a retry if it fails. Kept until the listed rows reload. Not
|
|
549
|
-
* for a table on a `source`, which has no `get` route.
|
|
550
|
-
*/
|
|
551
|
-
lazyLoad?: boolean;
|
|
552
|
-
}
|
|
553
|
-
/** A detail band listing columns of the row as a label/value list. */
|
|
554
|
-
export interface TableViewExpandableFields extends TableViewExpandableBehavior {
|
|
555
|
-
/**
|
|
556
|
-
* Columns listed in the band, each value rendered with its column's data
|
|
557
|
-
* type. A column must be listable to carry a value, unless `lazyLoad`
|
|
558
|
-
* reads the row from `get`; hide it from the grid with `isVisible: false`
|
|
559
|
-
* on its `@Column` to show it only here.
|
|
560
|
-
*/
|
|
561
|
-
fields: Array<string | TableViewExpandableField>;
|
|
562
|
-
/** Eyebrow above the field list. `$`-prefixed: an i18n key. */
|
|
563
|
-
fieldsLabel?: string;
|
|
564
|
-
component?: never;
|
|
565
|
-
}
|
|
566
|
-
/** A detail band drawn entirely by a frontend component. */
|
|
567
|
-
export interface TableViewExpandableComponent extends TableViewExpandableBehavior {
|
|
568
|
-
/**
|
|
569
|
-
* Frontend component rendered as the whole band, resolved by name from the
|
|
570
|
-
* global registry. It receives the row (the listed one, or the one
|
|
571
|
-
* `lazyLoad` read), its id, the column metadata, the table's row actions,
|
|
572
|
-
* `open` (what a click on the row does) and `refresh` (reloads the table).
|
|
573
|
-
*/
|
|
574
|
-
component: Component;
|
|
575
|
-
fields?: never;
|
|
576
|
-
fieldsLabel?: never;
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* Expandable rows: a caret column opens a detail band under the row. The band
|
|
580
|
-
* shows either `fields` as a label/value list, or a `component` that replaces
|
|
581
|
-
* that rendering altogether — never both.
|
|
582
|
-
*/
|
|
583
|
-
export type TableViewExpandableOptions = TableViewExpandableFields | TableViewExpandableComponent;
|
|
584
|
-
/** The detail band of expandable rows as it reaches the client. */
|
|
585
|
-
export interface TableViewExpandableSerialized extends TableViewExpandableBehavior {
|
|
586
|
-
fields?: TableViewExpandableField[];
|
|
587
|
-
fieldsLabel?: string;
|
|
588
|
-
component?: ComponentInfoSerialized;
|
|
589
|
-
}
|
|
590
|
-
export interface TableViewOptionsSerialized extends Omit<TableViewOptions, "columns" | "customButtons" | "rowActions" | "kanban" | "displays" | "formSlots" | "forms" | "expandable" | "tabs" | "views" | "footer" | "emptyStates"> {
|
|
591
|
-
enableTableExport: boolean;
|
|
592
|
-
/** Whether the controller declares `@Searchable` fields to search in. */
|
|
593
|
-
searchable: boolean;
|
|
594
|
-
customButtons?: CustomButtonSerialized[];
|
|
595
|
-
defaultFilters?: Array<{
|
|
596
|
-
accessorKey: string;
|
|
597
|
-
value?: string;
|
|
598
|
-
mode: string;
|
|
599
|
-
}>;
|
|
600
|
-
rowActions?: TableViewRowActionOptionsSerialized;
|
|
601
|
-
formComponents: Record<string, ComponentInfoSerialized<FormPropsSerialized> | undefined>;
|
|
602
|
-
defaultSort?: {
|
|
603
|
-
field: string;
|
|
604
|
-
desc?: boolean;
|
|
605
|
-
};
|
|
606
|
-
queryParamFilters?: QueryParamFilters;
|
|
607
|
-
routeParamFilters?: RouteParamFilters;
|
|
608
|
-
tabs?: TableViewTabSerialized[];
|
|
609
|
-
displays?: TableViewDisplayOptionSerialized[];
|
|
610
|
-
/**
|
|
611
|
-
* Resolved page-mode form URLs. Server-computed, so the frontend navigates to
|
|
612
|
-
* the very URLs the form sub-pages were registered under instead of rebuilding
|
|
613
|
-
* them from the browser path. Absent when the container is not a page.
|
|
614
|
-
*/
|
|
615
|
-
formPages?: TableViewFormPageUrls;
|
|
616
|
-
expandable?: TableViewExpandableSerialized;
|
|
617
|
-
views?: TableViewViewsSerialized;
|
|
618
|
-
footer?: TableViewFooterSerialized;
|
|
619
|
-
emptyStates?: TableViewEmptyStatesSerialized;
|
|
620
|
-
/** Where a `TableView.fromSource` table reads its rows. */
|
|
621
|
-
source?: TableViewSourceSerialized;
|
|
622
|
-
/**
|
|
623
|
-
* Key of the table view in its page, which prefixes its URL keys
|
|
624
|
-
* (`?<tableId>.view=`). Set per request.
|
|
625
|
-
*/
|
|
626
|
-
tableId?: string;
|
|
627
|
-
/**
|
|
628
|
-
* The table view is the only one its page carries: the short URL keys
|
|
629
|
-
* (`?view=`, `?tab=`) are its own. Set per request.
|
|
630
|
-
*/
|
|
631
|
-
isSoleTableView?: boolean;
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* Heading texts of one of the forms a table view opens, whatever container
|
|
635
|
-
* opens it: the page, drawer or modal title and the line under it. Left out,
|
|
636
|
-
* the forms read "New entry", "Edit entry" and "Entry details".
|
|
637
|
-
*/
|
|
638
|
-
export interface FormContainerPageTexts {
|
|
639
|
-
/** Title of the page, drawer or modal. `$`-prefixed: an i18n key. */
|
|
640
|
-
displayName?: string;
|
|
641
|
-
/** Line under the title. `$`-prefixed: an i18n key. */
|
|
642
|
-
description?: string;
|
|
643
|
-
}
|
|
644
|
-
/** One form of a page-mode table view: its texts, and the page it opens on. */
|
|
645
|
-
export interface FormContainerPageConfig extends FormContainerPageTexts {
|
|
646
|
-
urlSlug?: string;
|
|
647
|
-
/**
|
|
648
|
-
* When true, the DMS will not auto-create a form page for this action.
|
|
649
|
-
* Use this when you have a manually registered page (via CustomComponent) at the same URL.
|
|
650
|
-
* The urlSlug will still be used for navigation.
|
|
651
|
-
*/
|
|
652
|
-
customPage?: boolean;
|
|
653
|
-
}
|
|
654
|
-
/** The forms a table view opens: add (`new`), edit and `details`. */
|
|
655
|
-
export interface FormContainerPages<Page extends FormContainerPageTexts = FormContainerPageConfig> {
|
|
656
|
-
new?: Page;
|
|
657
|
-
edit?: Page;
|
|
658
|
-
details?: Page;
|
|
659
|
-
}
|
|
660
|
-
/**
|
|
661
|
-
* Where the add, edit and details forms of a table view open, and their
|
|
662
|
-
* titles: `pages` names them in every container ("New task", "Edit task",
|
|
663
|
-
* "Task details"); a page-mode entry also sets the page's URL.
|
|
664
|
-
*/
|
|
665
|
-
export type FormContainer = {
|
|
666
|
-
type: "drawer";
|
|
667
|
-
pages?: FormContainerPages<FormContainerPageTexts>;
|
|
668
|
-
} | {
|
|
669
|
-
type: "modal";
|
|
670
|
-
size?: ModalSize;
|
|
671
|
-
pages?: FormContainerPages<FormContainerPageTexts>;
|
|
672
|
-
} | {
|
|
673
|
-
type: "page";
|
|
674
|
-
pages?: FormContainerPages;
|
|
675
|
-
};
|
|
676
|
-
/**
|
|
677
|
-
* Settles one of the forms a table view generates, as a module writes its own
|
|
678
|
-
* `Form`: it receives the builder, and what it declares on it (`.watch()`…)
|
|
679
|
-
* holds wherever the form opens.
|
|
680
|
-
*/
|
|
681
|
-
export type TableViewFormSetup = (form: FormBuilder) => void;
|
|
682
|
-
/**
|
|
683
|
-
* Page-mode form URLs, resolved against the slug of the page the table view is
|
|
684
|
-
* mounted on. They keep the `:id` placeholder of their slug: the frontend
|
|
685
|
-
* substitutes the row id when it navigates.
|
|
686
|
-
*/
|
|
687
|
-
export interface TableViewFormPageUrls {
|
|
688
|
-
new: string;
|
|
689
|
-
edit: string;
|
|
690
|
-
view: string;
|
|
691
|
-
}
|
|
692
|
-
export interface QueryParamFilter {
|
|
693
|
-
field: string;
|
|
694
|
-
mode?: string;
|
|
695
|
-
/**
|
|
696
|
-
* Shows the filter, while the URL applies it, as a chip of the filters row
|
|
697
|
-
* that the user can remove (which drops the parameter from the URL). Off by
|
|
698
|
-
* default: the filter stays hidden and cannot be cleared.
|
|
699
|
-
*/
|
|
700
|
-
visible?: boolean;
|
|
701
|
-
/**
|
|
702
|
-
* Names the chip of a `visible` filter (a `$`-prefixed key is translated).
|
|
703
|
-
* Defaults to the label of the `field` column, else the parameter's name.
|
|
704
|
-
*/
|
|
705
|
-
label?: string;
|
|
706
|
-
}
|
|
707
|
-
export type QueryParamFilters = Record<string, QueryParamFilter>;
|
|
708
|
-
export interface RouteParamFilter {
|
|
709
|
-
field: string;
|
|
710
|
-
mode?: string;
|
|
711
|
-
}
|
|
712
|
-
export type RouteParamFilters = Record<string, RouteParamFilter>;
|
|
4
|
+
export type { TableViewRowActionOptions } from "./internal/option-row-actions";
|
|
5
|
+
export type { TableViewRowActionOptionsSerialized } from "./internal/option-row-actions";
|
|
6
|
+
export type { TableViewTabFilter } from "./internal/option-views";
|
|
7
|
+
export type { TableViewSort } from "./internal/option-views";
|
|
8
|
+
export type { TableViewColumnsState } from "./internal/option-views";
|
|
9
|
+
export type { TableViewColumnsOptions } from "./internal/option-views";
|
|
10
|
+
export type { TableViewDensity } from "./internal/option-views";
|
|
11
|
+
export type { TableViewRowClick } from "./internal/option-views";
|
|
12
|
+
export type { TableViewViewState } from "./internal/option-views";
|
|
13
|
+
export type { TableViewView } from "./internal/option-views";
|
|
14
|
+
export type { TableViewViewSerialized } from "./internal/option-views";
|
|
15
|
+
export type { TableViewViewsLayout } from "./internal/option-views";
|
|
16
|
+
export type { TableViewViewsOptions } from "./internal/option-views";
|
|
17
|
+
export type { TableViewViewsSerialized } from "./internal/option-views";
|
|
18
|
+
export type { TableViewTab } from "./internal/option-views";
|
|
19
|
+
export type { TableViewTabNavBadge } from "./internal/option-views";
|
|
20
|
+
export type { TableViewTabSerialized } from "./internal/option-views";
|
|
21
|
+
export type { TableViewLayout } from "./internal/option-filtering";
|
|
22
|
+
export type { TableViewQuickFilterMode } from "./internal/option-filtering";
|
|
23
|
+
export type { TableViewQuickFilter } from "./internal/option-filtering";
|
|
24
|
+
export type { TableViewPaginationMode } from "./internal/option-filtering";
|
|
25
|
+
export type { TableViewReorderOptions } from "./internal/option-filtering";
|
|
26
|
+
export type { TableViewSummaryOperation } from "./internal/option-footer";
|
|
27
|
+
export type { TableViewSummaryFormat } from "./internal/option-footer";
|
|
28
|
+
export type { TableViewFooterSummary } from "./internal/option-footer";
|
|
29
|
+
export type { TableViewFooterSummarySerialized } from "./internal/option-footer";
|
|
30
|
+
export type { TableViewFooterOptions } from "./internal/option-footer";
|
|
31
|
+
export type { TableViewFooterSerialized } from "./internal/option-footer";
|
|
32
|
+
export type { TableViewEmptyState } from "./internal/option-empty-states";
|
|
33
|
+
export type { TableViewEmptyStates } from "./internal/option-empty-states";
|
|
34
|
+
export type { TableViewEmptyStateSerialized } from "./internal/option-empty-states";
|
|
35
|
+
export type { TableViewEmptyStatesSerialized } from "./internal/option-empty-states";
|
|
36
|
+
export type { TableViewCardOptions } from "./internal/option-displays";
|
|
37
|
+
export type { TableViewCardOptionsSerialized } from "./internal/option-displays";
|
|
38
|
+
export type { KanbanOptionsSerialized } from "./internal/option-displays";
|
|
39
|
+
export type { TableViewDisplayCapabilities } from "./internal/option-displays";
|
|
40
|
+
export type { TableViewDisplayOption } from "./internal/option-displays";
|
|
41
|
+
export type { TableViewDisplayOptionSerialized } from "./internal/option-displays";
|
|
42
|
+
export type { TableViewExpandableField } from "./internal/option-expandable";
|
|
43
|
+
export type { TableViewExpandedDefault } from "./internal/option-expandable";
|
|
44
|
+
export type { TableViewExpandableBehavior } from "./internal/option-expandable";
|
|
45
|
+
export type { TableViewExpandableFields } from "./internal/option-expandable";
|
|
46
|
+
export type { TableViewExpandableComponent } from "./internal/option-expandable";
|
|
47
|
+
export type { TableViewExpandableOptions } from "./internal/option-expandable";
|
|
48
|
+
export type { TableViewExpandableSerialized } from "./internal/option-expandable";
|
|
49
|
+
export type { TableViewOptionsSerialized } from "./internal/option-contract";
|
|
50
|
+
export type { FormContainerPageTexts } from "./internal/option-forms";
|
|
51
|
+
export type { FormContainerPageConfig } from "./internal/option-forms";
|
|
52
|
+
export type { FormContainerPages } from "./internal/option-forms";
|
|
53
|
+
export type { FormContainer } from "./internal/option-forms";
|
|
54
|
+
export type { TableViewFormSetup } from "./internal/option-forms";
|
|
55
|
+
export type { TableViewFormPageUrls } from "./internal/option-forms";
|
|
56
|
+
export type { QueryParamFilter } from "./internal/option-filtering";
|
|
57
|
+
export type { QueryParamFilters } from "./internal/option-filtering";
|
|
58
|
+
export type { RouteParamFilter } from "./internal/option-filtering";
|
|
59
|
+
export type { RouteParamFilters } from "./internal/option-filtering";
|
|
713
60
|
/** Id of the built-in grid display. */
|
|
714
61
|
export declare const TABLE_DISPLAY_ID = "table";
|
|
715
62
|
/** Id of the built-in kanban display. */
|
|
@@ -718,393 +65,8 @@ export declare const KANBAN_DISPLAY_ID = "kanban";
|
|
|
718
65
|
export declare const CARDS_DISPLAY_ID = "cards";
|
|
719
66
|
/** Id of the built-in grouped display (see `grouped`). */
|
|
720
67
|
export declare const GROUPED_DISPLAY_ID = "grouped";
|
|
721
|
-
export
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
* is the default; users can switch to any other eligible field from the
|
|
727
|
-
* board.
|
|
728
|
-
*/
|
|
729
|
-
groupByField: string;
|
|
730
|
-
/**
|
|
731
|
-
* Allow dragging cards between columns to update the group field.
|
|
732
|
-
* Defaults to true.
|
|
733
|
-
*/
|
|
734
|
-
draggable?: boolean;
|
|
735
|
-
/**
|
|
736
|
-
* CSS max-height of a kanban column card list before it scrolls
|
|
737
|
-
* (e.g. "60vh", "480px"). Defaults to "60vh". The number of items fetched
|
|
738
|
-
* per column follows the user-adjustable table page size preference.
|
|
739
|
-
*/
|
|
740
|
-
columnMaxHeight?: string;
|
|
741
|
-
}
|
|
742
|
-
/** How the `grouped` display cuts the rows into groups. */
|
|
743
|
-
export type TableViewGroupBy = "value" | "day" | "week";
|
|
744
|
-
/**
|
|
745
|
-
* The `grouped` display: the table's own columns, with a header row before
|
|
746
|
-
* each group of rows sharing a value of `groupByField` (a status, a day of a
|
|
747
|
-
* date). The rows are listed sorted on that column and paged as usual, and a
|
|
748
|
-
* page starting inside a group repeats its header on top. No aggregates.
|
|
749
|
-
*/
|
|
750
|
-
export interface GroupedOptions {
|
|
751
|
-
/**
|
|
752
|
-
* Column the rows are grouped on. It must be a `@Sortable()` column: the
|
|
753
|
-
* list sorts on it so a group's rows follow each other.
|
|
754
|
-
*/
|
|
755
|
-
groupByField: string;
|
|
756
|
-
/**
|
|
757
|
-
* `value` (the default): one group per value; `day` or `week`: one group
|
|
758
|
-
* per calendar day or week of a date column.
|
|
759
|
-
*/
|
|
760
|
-
by?: TableViewGroupBy;
|
|
761
|
-
/** A click on a group header folds its rows. */
|
|
762
|
-
collapsible?: boolean;
|
|
763
|
-
/** Group headers show how many rows the group holds. */
|
|
764
|
-
count?: boolean;
|
|
765
|
-
}
|
|
766
|
-
/**
|
|
767
|
-
* When a `liveHold` table also holds its rows while its live page is in
|
|
768
|
-
* Direct: the table alone keeps them and counts its events into the
|
|
769
|
-
* "N new · Show" banner, the other blocks of the page staying live. The
|
|
770
|
-
* banner says why the table holds ("Table on hold · search active"). It reads
|
|
771
|
-
* the rows once again when the hold ends, if it missed any.
|
|
772
|
-
*/
|
|
773
|
-
export interface TableViewLiveHoldOptions {
|
|
774
|
-
/** While one of its rows is open in the side panel. Defaults to false. */
|
|
775
|
-
whileRowOpen?: boolean;
|
|
776
|
-
/** While the user has scrolled its first row out of view. Defaults to false. */
|
|
777
|
-
whileScrolled?: boolean;
|
|
778
|
-
/** While the user's search narrows the rows. Defaults to false. */
|
|
779
|
-
whileSearching?: boolean;
|
|
780
|
-
/**
|
|
781
|
-
* While the user sorts the rows otherwise than by the table's `defaultSort`
|
|
782
|
-
* (the newest first, for a log): new rows would land anywhere among them.
|
|
783
|
-
* Defaults to false.
|
|
784
|
-
*/
|
|
785
|
-
whileSorted?: boolean;
|
|
786
|
-
/**
|
|
787
|
-
* What the strip calls the new rows, given `{count}`, as the `LiveToggle`'s
|
|
788
|
-
* own `missedLabel`: an i18n key prefixed with `$`
|
|
789
|
-
* (`"$api.live.new_requests"`, "12 new requests"), or a text. While the
|
|
790
|
-
* page is paused, the strip adds the breakdown a component gave with
|
|
791
|
-
* `usePageLive().setMissedDetail` ("12 new requests · 2 in 5xx").
|
|
792
|
-
* Defaults to "N new".
|
|
793
|
-
*/
|
|
794
|
-
missedLabel?: string;
|
|
795
|
-
}
|
|
796
|
-
export interface TableViewOptions<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
797
|
-
caption?: string;
|
|
798
|
-
/**
|
|
799
|
-
* Row density the table opens with: "compact" gives 36px rows under a 32px
|
|
800
|
-
* header. The user picks another from the "Density" entry of the ⋯ table
|
|
801
|
-
* menu, kept with the rest of the table's state.
|
|
802
|
-
*/
|
|
803
|
-
density?: "default" | "compact";
|
|
804
|
-
/**
|
|
805
|
-
* Caps the rows in a scroll area of their own (any CSS length, e.g.
|
|
806
|
-
* "60vh"), under a column header that stays in view while they scroll.
|
|
807
|
-
*/
|
|
808
|
-
maxHeight?: string;
|
|
809
|
-
/**
|
|
810
|
-
* What runs the row's click action: a double-click by default, a single
|
|
811
|
-
* click with `"single"`. See {@link TableViewRowClick}.
|
|
812
|
-
* @example "single"
|
|
813
|
-
*/
|
|
814
|
-
rowClick?: TableViewRowClick;
|
|
815
|
-
/**
|
|
816
|
-
* Expandable rows: a caret column in front of the content opens a detail
|
|
817
|
-
* band under each row, listing `fields` or rendering `component`.
|
|
818
|
-
* @example { fields: ["address", "carrier"], defaultExpanded: "first" }
|
|
819
|
-
* @example { component: CustomComponent("OrderLines"), single: true }
|
|
820
|
-
*/
|
|
821
|
-
expandable?: TableViewExpandableOptions;
|
|
822
|
-
/**
|
|
823
|
-
* How much the table draws around its rows: `"full"` (the default) or the
|
|
824
|
-
* `"compact"` list of a settings page. See {@link TableViewLayout}.
|
|
825
|
-
*/
|
|
826
|
-
layout?: TableViewLayout;
|
|
827
|
-
/** Placeholder of the search field. `$`-prefixed: an i18n key. */
|
|
828
|
-
searchPlaceholder?: string;
|
|
829
|
-
/**
|
|
830
|
-
* The key that opens and focuses the search field, in Nuxt UI
|
|
831
|
-
* `defineShortcuts` notation: `"/"`, `"shift_f"`, `"meta_k"`. Defaults to
|
|
832
|
-
* `"shift_f"` (⇧F). Like every table shortcut, it does not fire while the
|
|
833
|
-
* user types in a field, so `"/"` stays a character there.
|
|
834
|
-
* @example "/"
|
|
835
|
-
*/
|
|
836
|
-
searchShortcut?: string;
|
|
837
|
-
/** One-click dropdown filters drawn in the toolbar. */
|
|
838
|
-
quickFilters?: TableViewQuickFilter[];
|
|
839
|
-
/**
|
|
840
|
-
* Rows per page while the user has picked none, from 1 to 50 (registration
|
|
841
|
-
* throws otherwise). Defaults to 10. A size other than the standard 10, 25
|
|
842
|
-
* and 50 joins them in this table's page size picker.
|
|
843
|
-
*/
|
|
844
|
-
pageSize?: number;
|
|
845
|
-
/**
|
|
846
|
-
* How the rows beyond the first page are reached. Defaults to `pages`.
|
|
847
|
-
* See {@link TableViewPaginationMode}.
|
|
848
|
-
*/
|
|
849
|
-
pagination?: TableViewPaginationMode;
|
|
850
|
-
/**
|
|
851
|
-
* The footer band: the row count and a hint, figures computed over the
|
|
852
|
-
* listed rows (`summary`) and a legend of a select column's items.
|
|
853
|
-
*/
|
|
854
|
-
footer?: TableViewFooterOptions<T>;
|
|
855
|
-
/**
|
|
856
|
-
* What the empty body of the grid and the `cards` display says when the
|
|
857
|
-
* table has no row yet, when its filters match nothing, or when the list
|
|
858
|
-
* failed. See {@link TableViewEmptyStates}.
|
|
859
|
-
*/
|
|
860
|
-
emptyStates?: TableViewEmptyStates;
|
|
861
|
-
/**
|
|
862
|
-
* The key of the row id, default is _id
|
|
863
|
-
*/
|
|
864
|
-
rowIdKey?: string;
|
|
865
|
-
/**
|
|
866
|
-
* The key of the field naming a row: it follows the title of the drawer or
|
|
867
|
-
* modal that edits or shows the row ("Edit task · Write the docs"), and
|
|
868
|
-
* ends the breadcrumb of its edit and details pages.
|
|
869
|
-
*/
|
|
870
|
-
labelKey?: string;
|
|
871
|
-
rowActions?: TableViewRowActionOptions<T>;
|
|
872
|
-
/**
|
|
873
|
-
* The controller's columns as this table view shows them, when one page
|
|
874
|
-
* needs them otherwise than the controller declares: a related list on a
|
|
875
|
-
* record's page hides the column naming that record.
|
|
876
|
-
* @example { hidden: ["workspace"] }
|
|
877
|
-
*/
|
|
878
|
-
columns?: TableViewColumnsOptions;
|
|
879
|
-
customButtons?: CustomButton[];
|
|
880
|
-
/**
|
|
881
|
-
* Where the add, edit and details forms open (a page by default) and their
|
|
882
|
-
* titles, in any container.
|
|
883
|
-
* @example { type: "drawer", pages: { new: { displayName: "$tasks.form.new_title" } } }
|
|
884
|
-
*/
|
|
885
|
-
formContainer?: FormContainer;
|
|
886
|
-
/**
|
|
887
|
-
* Enable archive mode: replaces delete action with archive/restore
|
|
888
|
-
*/
|
|
889
|
-
archiveMode?: boolean;
|
|
890
|
-
/**
|
|
891
|
-
* The count the caption shows while the archived rows are listed, naming
|
|
892
|
-
* them: an i18n key with `$` receiving `{ count }` and pluralized on it
|
|
893
|
-
* ("13 factures archivées"), or a text with `{count}`. Defaults to
|
|
894
|
-
* "Archived: {count}" ("Archives : {count}" in French), which agrees with
|
|
895
|
-
* no noun.
|
|
896
|
-
* @example "$invoices.archived_count"
|
|
897
|
-
*/
|
|
898
|
-
archivedCountLabel?: string;
|
|
899
|
-
/**
|
|
900
|
-
* Default filters to apply when the table view is opened
|
|
901
|
-
*/
|
|
902
|
-
defaultFilters?: Array<{
|
|
903
|
-
accessorKey: string;
|
|
904
|
-
value?: string;
|
|
905
|
-
mode: string;
|
|
906
|
-
}>;
|
|
907
|
-
/**
|
|
908
|
-
* Default sort configuration applied when no user preference exists, and
|
|
909
|
-
* the sort the table goes back to when the user clears theirs.
|
|
910
|
-
*/
|
|
911
|
-
defaultSort?: {
|
|
912
|
-
field: string;
|
|
913
|
-
desc?: boolean;
|
|
914
|
-
};
|
|
915
|
-
/**
|
|
916
|
-
* Rows listed first, whatever the sort: those `pinnedRows` accepts, a rule
|
|
917
|
-
* on the row's fields as a row action's `rule`, in the order the sort gives
|
|
918
|
-
* them. The rest follows in the sort's order. A route answering every row
|
|
919
|
-
* (a `TableView.fromSource` without `paginate`) has its pinned rows on the
|
|
920
|
-
* first page; a route answering one page has them first within the page it
|
|
921
|
-
* answers. The `grouped` display keeps its groups and pins nothing;
|
|
922
|
-
* registration refuses it alongside `reorder`, whose rows keep their
|
|
923
|
-
* position.
|
|
924
|
-
* @example { field: "isBase", equals: true }
|
|
925
|
-
*/
|
|
926
|
-
pinnedRows?: RowActionRule<T>;
|
|
927
|
-
/**
|
|
928
|
-
* Maps URL query parameters to hidden filters applied to the table data.
|
|
929
|
-
* These filters are not persisted in preferences, and not visible in the UI
|
|
930
|
-
* unless one sets `visible: true`: it then shows as a removable chip.
|
|
931
|
-
* @example { email: { field: "email", visible: true, label: "$app.email" } }
|
|
932
|
-
*/
|
|
933
|
-
queryParamFilters?: QueryParamFilters;
|
|
934
|
-
/**
|
|
935
|
-
* Maps DMS route parameters (extracted from the page slug, e.g. `:id`) to
|
|
936
|
-
* hidden filters applied to the table data. Filters are not visible in the
|
|
937
|
-
* UI nor persisted in preferences. Useful for detail pages where the table
|
|
938
|
-
* must be scoped by a path param such as the parent entity id.
|
|
939
|
-
*/
|
|
940
|
-
routeParamFilters?: RouteParamFilters;
|
|
941
|
-
/**
|
|
942
|
-
* When true, reject entire request if any row fails rule validation.
|
|
943
|
-
* When false (default), only process rows that pass rule validation.
|
|
944
|
-
*/
|
|
945
|
-
strictRuleValidation?: boolean;
|
|
946
|
-
/**
|
|
947
|
-
* Tabs displayed above the table. Each tab filters the rows on one column,
|
|
948
|
-
* or links to another page. The implicit "all" tab (no filter) is shown
|
|
949
|
-
* automatically when at least one tab is configured here.
|
|
950
|
-
*
|
|
951
|
-
* Each tab shows a row counter, fetched in one request: filter tabs with
|
|
952
|
-
* counters require the controller to mount
|
|
953
|
-
* `countBatch: TableViewRoutes.CountBatch`. `TableView()` warns at
|
|
954
|
-
* registration when a table declares tabs without it.
|
|
955
|
-
*/
|
|
956
|
-
tabs?: TableViewTab[];
|
|
957
|
-
/**
|
|
958
|
-
* When false, disables realtime broadcast/presence for this resource.
|
|
959
|
-
* Defaults to true (realtime is opt-out).
|
|
960
|
-
*/
|
|
961
|
-
realtime?: boolean;
|
|
962
|
-
/**
|
|
963
|
-
* Topics the backend publishes on (`PublishMessage`) when the rows change
|
|
964
|
-
* without a write through this table's routes — a batch, a job, an import.
|
|
965
|
-
* The table reads its rows again on each event, keeping the current rows on
|
|
966
|
-
* screen until the answer lands. The page registers them, as for a chart's
|
|
967
|
-
* `realtimeTopic`. Independent of `realtime`, which covers the writes made
|
|
968
|
-
* through the controller.
|
|
969
|
-
*/
|
|
970
|
-
realtimeTopic?: string | string[];
|
|
971
|
-
/**
|
|
972
|
-
* On a page declared with `live`, keeps the rows on screen while the page is
|
|
973
|
-
* paused, through the user's own search, sort and pagination too, and shows
|
|
974
|
-
* a "N new · Show" banner counting the rows the table would add since:
|
|
975
|
-
* how many more rows its tab, search and filters match now than it holds,
|
|
976
|
-
* asked of its count route (the events received, if that count fails).
|
|
977
|
-
* Show reads the rows once without leaving the pause. The page in Direct,
|
|
978
|
-
* the table also keeps its rows while they are on screen or scrolled past:
|
|
979
|
-
* a new row at the top would push down the rows the user reads, so new ones
|
|
980
|
-
* wait behind a "N new · Show" pill laid over the rows, which moves nothing.
|
|
981
|
-
* A table still below the screen follows the feed.
|
|
982
|
-
*
|
|
983
|
-
* A `TableView.fromSource` route receives the moment the rows were frozen
|
|
984
|
-
* as `liveHeldAt` (ISO 8601) on every list and count request made while
|
|
985
|
-
* paused, so it can answer the rows as they stood then; a data controller's
|
|
986
|
-
* rows are held against the realtime only. Ignored on a page without `live`.
|
|
987
|
-
*
|
|
988
|
-
* An object also names why the table holds, the rest of the page staying
|
|
989
|
-
* live, in more cases (see {@link TableViewLiveHoldOptions}); `true` and
|
|
990
|
-
* `{}` hold it while the page is paused or its rows are on screen.
|
|
991
|
-
*
|
|
992
|
-
* ```ts
|
|
993
|
-
* liveHold: { whileRowOpen: true, whileScrolled: true, whileSearching: true }
|
|
994
|
-
* ```
|
|
995
|
-
*/
|
|
996
|
-
liveHold?: boolean | TableViewLiveHoldOptions;
|
|
997
|
-
/**
|
|
998
|
-
* Enable the kanban display mode for this collection. When set, users can
|
|
999
|
-
* switch between the table and a kanban board from the toolbar.
|
|
1000
|
-
*/
|
|
1001
|
-
kanban?: KanbanOptions;
|
|
1002
|
-
/**
|
|
1003
|
-
* Lets the user order the rows by hand: the rows are listed sorted on
|
|
1004
|
-
* `field`, a drag handle moves a row within its page — on the grid and on
|
|
1005
|
-
* the `cards` display, whose custom `card.component` receives the handle
|
|
1006
|
-
* as its `reorder` prop — and only the rows whose position changed are
|
|
1007
|
-
* saved (a partial edit of `field`). Moving is off while a search, a
|
|
1008
|
-
* filter or a tab narrows the rows. Needs the `edit` action.
|
|
1009
|
-
*/
|
|
1010
|
-
reorder?: TableViewReorderOptions;
|
|
1011
|
-
/**
|
|
1012
|
-
* Offers the `grouped` display: the grid's columns with a header row per
|
|
1013
|
-
* group of rows. A view may open in it (`display: "grouped"`).
|
|
1014
|
-
* @example { groupByField: "createdAt", by: "day", count: true }
|
|
1015
|
-
*/
|
|
1016
|
-
grouped?: GroupedOptions;
|
|
1017
|
-
/**
|
|
1018
|
-
* Named states of the table — filters, search, sort, columns, display and
|
|
1019
|
-
* density — drawn as tabs, a strip of pills or a menu, opened from the URL
|
|
1020
|
-
* (`?view=<id>`) and, with `userViews`, saved by users for themselves.
|
|
1021
|
-
* Views and `tabs` coexist: a tab filters on one column, a view sets the
|
|
1022
|
-
* whole table.
|
|
1023
|
-
*/
|
|
1024
|
-
views?: TableViewViewsOptions;
|
|
1025
|
-
/**
|
|
1026
|
-
* The card the `kanban` and `cards` displays draw for each row: the columns
|
|
1027
|
-
* it shows, or a component drawing it whole.
|
|
1028
|
-
* @example { fields: ["email", "due_date"] }
|
|
1029
|
-
* @example { component: CustomComponent("TaskCard") }
|
|
1030
|
-
*/
|
|
1031
|
-
card?: TableViewCardOptions;
|
|
1032
|
-
/**
|
|
1033
|
-
* The displays this table view offers, in the switcher's order. Left out,
|
|
1034
|
-
* the table view offers the built-in `table` alone; listed, it offers
|
|
1035
|
-
* exactly these, so the grid is kept by listing `{ id: "table" }`. The
|
|
1036
|
-
* `kanban` and `grouped` options add their display after the list unless it
|
|
1037
|
-
* places them. Each `component` is a frontend component resolved by name on
|
|
1038
|
-
* the client from the global registry (declare its directory with
|
|
1039
|
-
* `global: true`); it receives the normalized `context` prop.
|
|
1040
|
-
* `selfManagedData`/`capabilities` are the SSR source of truth for data
|
|
1041
|
-
* fetching + chrome; the matching client plugin (`registerTableViewDisplay`)
|
|
1042
|
-
* supplies the id, label, icon and component.
|
|
1043
|
-
* @example [{ id: "table" }, { id: "cards" }]
|
|
1044
|
-
*/
|
|
1045
|
-
displays?: TableViewDisplayOption[];
|
|
1046
|
-
/**
|
|
1047
|
-
* Display shown by default when the user has no saved preference. Defaults to
|
|
1048
|
-
* the first display offered: `table` when `displays` is left out.
|
|
1049
|
-
*/
|
|
1050
|
-
defaultDisplay?: string;
|
|
1051
|
-
/**
|
|
1052
|
-
* Display a phone opens on (a viewport narrower than 768px) when the user
|
|
1053
|
-
* has no saved choice and the open view sets no `display` of its own (a
|
|
1054
|
-
* `views.defaultView` without one opens on it too): `cards` gives a narrow screen a
|
|
1055
|
-
* card per row instead of a grid cut after its first columns. One of the
|
|
1056
|
-
* displays offered, so the switcher still leads back to the grid. Applied
|
|
1057
|
-
* once mounted (the server cannot see the viewport) and not saved: the same
|
|
1058
|
-
* user on a wide screen keeps `defaultDisplay`.
|
|
1059
|
-
* @example { displays: [{ id: "table" }, { id: "cards" }], mobileDisplay: "cards" }
|
|
1060
|
-
*/
|
|
1061
|
-
mobileDisplay?: string;
|
|
1062
|
-
/**
|
|
1063
|
-
* Server-side guards that run before mutating actions (edit/delete/archive/
|
|
1064
|
-
* restore/new). Throw with `assert(...)` from `@antelopejs/interface-api-util`
|
|
1065
|
-
* to abort the operation with an HTTP error and an i18n message key.
|
|
1066
|
-
* `this` inside a guard is the data controller instance, so models declared
|
|
1067
|
-
* with @Model are accessible.
|
|
1068
|
-
*/
|
|
1069
|
-
guards?: TableViewGuards<T>;
|
|
1070
|
-
/**
|
|
1071
|
-
* Component slots the generated forms open, by form kind, so another module
|
|
1072
|
-
* can extend them through `RegisterComponentSlot` — the pending-invite edit
|
|
1073
|
-
* form opens one for the invite extensions. Values the slot adds to a form
|
|
1074
|
-
* reach the data routes only if the controller reads them.
|
|
1075
|
-
*/
|
|
1076
|
-
formSlots?: Partial<Record<"new" | "edit" | "view", string>>;
|
|
1077
|
-
/**
|
|
1078
|
-
* Settles the forms the table view generates, by form kind, for input
|
|
1079
|
-
* comfort only: each callback receives the form's builder before the table
|
|
1080
|
-
* view embeds it, and declares on it what a module's own `Form` would — a
|
|
1081
|
-
* value filled in from another (`SET_FIELD_VALUE`), a field one table's
|
|
1082
|
-
* forms leave out. No data rule here: the data routes never see these
|
|
1083
|
-
* watches. A field shown, required or locked by the value of another is a
|
|
1084
|
-
* column's `visibleWhen` / `disabledWhen`, which the routes enforce too.
|
|
1085
|
-
* What it declares holds in a drawer, a modal or a form page alike; the
|
|
1086
|
-
* `new` form's also on a duplicated row. A watch's `requirePermission` is
|
|
1087
|
-
* checked per request, as on a page's own components.
|
|
1088
|
-
*
|
|
1089
|
-
* @example
|
|
1090
|
-
* forms: {
|
|
1091
|
-
* new: (form) =>
|
|
1092
|
-
* form.watch(FormEvents.FIELD_CHANGE, FormFunctions.SET_FIELD_VALUE, {
|
|
1093
|
-
* params: { targetField: "probability", valueMap: { won: 100, lost: 0 } },
|
|
1094
|
-
* onParam: { key: "fieldId", value: "stage" },
|
|
1095
|
-
* }),
|
|
1096
|
-
* }
|
|
1097
|
-
*/
|
|
1098
|
-
forms?: Partial<Record<"new" | "edit" | "view", TableViewFormSetup>>;
|
|
1099
|
-
/**
|
|
1100
|
-
* Skip the tenant access gate on every data route of this table view, the
|
|
1101
|
-
* table-view mirror of the guards' `bypassTenantAccessGate` option. Reserved
|
|
1102
|
-
* for tables that must stay readable when a gate denies the tenant (e.g.
|
|
1103
|
-
* invoices on the billing page of a suspended tenant) so it can regularize
|
|
1104
|
-
* its situation. Data routes are registered independently of pages, so the
|
|
1105
|
-
* opt-out is controller-level and latched: once any `TableView()` call on a
|
|
1106
|
-
* controller declares it, the controller's routes bypass the gate wherever
|
|
1107
|
-
* they are rendered. Permission checks still apply.
|
|
1108
|
-
*/
|
|
1109
|
-
bypassTenantAccessGate?: boolean;
|
|
1110
|
-
}
|
|
68
|
+
export type { KanbanOptions } from "./internal/option-displays";
|
|
69
|
+
export type { TableViewGroupBy } from "./internal/option-displays";
|
|
70
|
+
export type { GroupedOptions } from "./internal/option-displays";
|
|
71
|
+
export type { TableViewLiveHoldOptions } from "./internal/option-contract";
|
|
72
|
+
export type { TableViewOptions } from "./internal/option-contract";
|