@chelone/vue 0.7.0 → 0.9.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/dist/admin/admin.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/admin/auth-gate.js +1 -3
- package/dist/admin/resource-view.d.ts +8 -0
- package/dist/admin/resource-view.js +19 -0
- package/dist/auth/permissions-hooks.js +1 -3
- package/dist/choices/choices-context.d.ts +1 -2
- package/dist/choices/use-choices.d.ts +3 -3
- package/dist/choices/use-choices.js +13 -10
- package/dist/choices/use-reference-input.js +4 -4
- package/dist/components/admin/auth/auth-error.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/admin/auth/auth-layout.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/auth/can-access.vue.d.ts +2 -2
- package/dist/components/admin/auth/login-form.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/admin/auth/login-with-email.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/admin/buttons/bulk-update-button.vue.d.ts +19 -6
- package/dist/components/admin/buttons/bulk-update-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/buttons/clone-button.vue.d.ts +19 -16
- package/dist/components/admin/buttons/clone-button.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/components/admin/buttons/delete-button.vue.d.ts +19 -10
- package/dist/components/admin/buttons/delete-button.vue_vue_type_script_setup_true_lang.js +6 -7
- package/dist/components/admin/buttons/dual-approval-button.vue_vue_type_script_setup_true_lang.js +14 -2
- package/dist/components/admin/buttons/edit-button.vue.d.ts +19 -16
- package/dist/components/admin/buttons/edit-button.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/components/admin/buttons/export-button.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/admin/buttons/fields-selector.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/admin/buttons/filter-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/buttons/record-button-props.d.ts +12 -0
- package/dist/components/admin/buttons/show-button.vue.d.ts +19 -16
- package/dist/components/admin/buttons/show-button.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/components/admin/buttons/status-transition-button.vue_vue_type_script_setup_true_lang.js +3 -7
- package/dist/components/admin/buttons/update-button.vue.d.ts +28 -24
- package/dist/components/admin/buttons/update-button.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/components/admin/common/application-updated-notification.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/common/i18n-key-editor.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/admin/csv-import/csv-import.vue_vue_type_script_setup_true_lang.js +2 -5
- package/dist/components/admin/feedback/error.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/feedback/linear-progress.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/admin/feedback/loading.vue_vue_type_script_setup_true_lang.js +7 -6
- package/dist/components/admin/feedback/placeholder.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/admin/fields/api-key-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/api-key-field.vue_vue_type_script_setup_true_lang.js +6 -7
- package/dist/components/admin/fields/array-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/badge-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/boolean-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/chip-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/color-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/cron-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/currency-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/date-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/diff-viewer.vue.d.ts +3 -3
- package/dist/components/admin/fields/duration-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/email-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/field-props.d.ts +2 -2
- package/dist/components/admin/fields/file-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/function-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/image-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/json-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/number-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/phone-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/phone-field.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/components/admin/fields/rating-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/rating-field.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/admin/fields/record-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/reference-array-field.vue.d.ts +20 -10
- package/dist/components/admin/fields/reference-field.vue.d.ts +22 -35
- package/dist/components/admin/fields/reference-many-count.vue.d.ts +20 -5
- package/dist/components/admin/fields/reference-many-field.vue.d.ts +20 -12
- package/dist/components/admin/fields/reference-one-field.vue.d.ts +22 -12
- package/dist/components/admin/fields/select-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/subscription-plan-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/text-array-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/text-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/url-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/usage-meter-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/usage-meter-field.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/components/admin/fields/webhook-endpoint-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/webhook-endpoint-field.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/fields/wrapper-field.vue.d.ts +21 -11
- package/dist/components/admin/inputs/api-key-input.vue.d.ts +20 -5
- package/dist/components/admin/inputs/api-key-input.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/components/admin/inputs/array-input-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/inputs/checkbox-group-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/inputs/date-input-format.d.ts +4 -1
- package/dist/components/admin/inputs/date-input-format.js +10 -1
- package/dist/components/admin/inputs/date-input.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/admin/inputs/date-time-input.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/admin/inputs/duration-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/inputs/image-input-thumbnail.vue_vue_type_script_setup_true_lang.js +6 -5
- package/dist/components/admin/inputs/image-input.vue.d.ts +1 -0
- package/dist/components/admin/inputs/image-input.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/admin/inputs/in-place-editor-form.vue.d.ts +3 -3
- package/dist/components/admin/inputs/in-place-editor-form.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/inputs/in-place-editor.vue.d.ts +3 -3
- package/dist/components/admin/inputs/number-input.vue.d.ts +6 -0
- package/dist/components/admin/inputs/number-input.vue_vue_type_script_setup_true_lang.js +9 -0
- package/dist/components/admin/inputs/password-input.vue_vue_type_script_setup_true_lang.js +34 -30
- package/dist/components/admin/inputs/phone-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/inputs/radio-button-group-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/inputs/rating-input.vue_vue_type_script_setup_true_lang.js +24 -12
- package/dist/components/admin/inputs/reference-input.vue.d.ts +1 -1
- package/dist/components/admin/inputs/reference-input.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/admin/inputs/resettable-text-input.vue.d.ts +6 -4
- package/dist/components/admin/inputs/resettable-text-input.vue_vue_type_script_setup_true_lang.js +44 -39
- package/dist/components/admin/inputs/subscription-plan-picker.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/admin/inputs/text-input.vue.d.ts +13 -2
- package/dist/components/admin/inputs/text-input.vue_vue_type_script_setup_true_lang.js +9 -4
- package/dist/components/admin/inputs/time-input.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/admin/inputs/use-choice-input.d.ts +2 -2
- package/dist/components/admin/layout/app-sidebar.vue.d.ts +12 -1
- package/dist/components/admin/layout/app-sidebar.vue_vue_type_script_setup_true_lang.js +15 -11
- package/dist/components/admin/layout/command-menu-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/layout/command-menu.vue.d.ts +1 -1
- package/dist/components/admin/layout/command-menu.vue_vue_type_script_setup_true_lang.js +9 -63
- package/dist/components/admin/layout/data-provider-devtools-entry.vue.d.ts +1 -1
- package/dist/components/admin/layout/data-provider-devtools-entry.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/admin/layout/data-provider-devtools.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/layout/layout.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/layout/menu-item-link.vue.d.ts +5 -0
- package/dist/components/admin/layout/menu-item-link.vue_vue_type_script_setup_true_lang.js +27 -8
- package/dist/components/admin/layout/onboarding-tour-overlay.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/admin/layout/resource-menu-item-group.vue.d.ts +8 -1
- package/dist/components/admin/layout/resource-menu-item-group.vue_vue_type_script_setup_true_lang.js +8 -7
- package/dist/components/admin/layout/theme-provider.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/admin/layout/title-portal-id.d.ts +1 -1
- package/dist/components/admin/layout/title-portal-id.js +1 -9
- package/dist/components/admin/layout/top-toolbar.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/admin/list/approval-queue-row.vue.d.ts +2 -2
- package/dist/components/admin/list/approval-queue-row.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/admin/list/approval-queue.vue.d.ts +3 -3
- package/dist/components/admin/list/calendar-agenda-view.vue.d.ts +23 -15
- package/dist/components/admin/list/calendar-event.vue.d.ts +21 -8
- package/dist/components/admin/list/calendar-list.vue.d.ts +29 -56
- package/dist/components/admin/list/calendar-list.vue_vue_type_script_setup_true_lang.js +12 -8
- package/dist/components/admin/list/calendar-month-view.vue.d.ts +26 -20
- package/dist/components/admin/list/calendar-month-view.vue_vue_type_script_setup_true_lang.js +2 -6
- package/dist/components/admin/list/calendar-week-view.vue.d.ts +24 -17
- package/dist/components/admin/list/data-table-col.vue_vue_type_script_setup_true_lang.js +8 -5
- package/dist/components/admin/list/data-table-context.d.ts +9 -6
- package/dist/components/admin/list/data-table-context.js +9 -1
- package/dist/components/admin/list/data-table-row.vue.d.ts +19 -15
- package/dist/components/admin/list/data-table-row.vue_vue_type_script_setup_true_lang.js +5 -9
- package/dist/components/admin/list/data-table.vue.d.ts +35 -23
- package/dist/components/admin/list/data-table.vue_vue_type_script_setup_true_lang.js +4 -7
- package/dist/components/admin/list/list-pagination.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/admin/list/pivot-grid.vue.d.ts +3 -3
- package/dist/components/admin/list/record-timeline.vue.d.ts +3 -3
- package/dist/components/admin/list/record-timeline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/list/simple-list-item.vue.d.ts +21 -19
- package/dist/components/admin/list/simple-list-item.vue_vue_type_script_setup_true_lang.js +3 -7
- package/dist/components/admin/list/simple-list.vue.d.ts +28 -20
- package/dist/components/admin/list/single-field-list-record.vue.d.ts +19 -9
- package/dist/components/admin/list/single-field-list.vue.d.ts +21 -11
- package/dist/components/admin/list/tree-list-context.d.ts +11 -6
- package/dist/components/admin/list/tree-list-node.vue.d.ts +19 -4
- package/dist/components/admin/list/tree-list.vue.d.ts +28 -37
- package/dist/components/admin/realtime/comments-thread.vue_vue_type_script_setup_true_lang.js +56 -44
- package/dist/components/admin/supabase/forgot-password-form.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/admin/supabase/set-password-form.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/admin/supabase/use-password-recovery.js +11 -1
- package/dist/components/admin/view/create.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/view/edit.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/view/show.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/admin/widgets/job-monitor-row.vue.d.ts +24 -11
- package/dist/components/admin/widgets/job-monitor.vue.d.ts +3 -3
- package/dist/components/admin/widgets/job-monitor.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/block-editor/block-doc-field.vue.d.ts +3 -3
- package/dist/components/block-editor/block-drag-handle.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/components/block-editor/image-block-config.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/components/charts/bar-chart.vue.d.ts +6 -2
- package/dist/components/charts/bar-chart.vue_vue_type_script_setup_true_lang.js +6 -4
- package/dist/components/charts/series-chart.d.ts +1 -1
- package/dist/components/charts/series-chart.js +9 -3
- package/dist/components/index.js +2 -2
- package/dist/components/inspector/configurable.vue.d.ts +0 -21
- package/dist/components/inspector/configurable.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/inspector/inspector.vue_vue_type_script_setup_true_lang.js +6 -8
- package/dist/components/kanban/kanban-board.vue.d.ts +3 -3
- package/dist/components/kanban/kanban-board.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/maps/bbox-field.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/maps/geo-json-field.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/maps/geo-json-layers.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/maps/geo-json-view.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/maps/lat-lng-field.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/maps/lat-lng-input.vue_vue_type_script_setup_true_lang.js +5 -7
- package/dist/components/maps/map-canvas.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/maps/use-map.js +1 -3
- package/dist/components/maps-draw/shape-input.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/maps-draw/simplify-input.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/maps-osm/geocoding-input.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/maps-osm/map-with-search.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/mdx-editor/mdx-editor-theme.css +47 -0
- package/dist/components/mdx-editor/mdx-field.vue.d.ts +21 -11
- package/dist/components/mdx-editor/mdx-input.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/monaco/internal/use-json-schema.js +1 -2
- package/dist/components/monaco/internal/use-monaco-markers.d.ts +0 -6
- package/dist/components/monaco/internal/use-monaco-markers.js +4 -2
- package/dist/components/monaco/monaco-json-field-lazy.vue.d.ts +2 -2
- package/dist/components/monaco/monaco-json-field-lazy.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/monaco/monaco-json-field.vue.d.ts +3 -3
- package/dist/components/monaco/monaco-json-input-lazy.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/rich-text-input/rich-text-field.vue.d.ts +3 -3
- package/dist/components/ui/avatar.js +1 -1
- package/dist/components/ui/badge.js +4 -4
- package/dist/components/ui/button-variants.js +1 -1
- package/dist/components/ui/chart/chart-container.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/ui/checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/ui/command/command-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/ui/sidebar/sidebar-menu-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/ui/sidebar/sidebar-parts.js +2 -2
- package/dist/components/ui/sidebar/sidebar.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/controllers/use-controller-for-id.d.ts +2 -2
- package/dist/controllers/use-prev-next-controller.d.ts +2 -2
- package/dist/controllers/use-reference-many-field-controller.d.ts +4 -4
- package/dist/controllers/use-reference-one-field-controller.d.ts +4 -4
- package/dist/create-resource-components.d.ts +225 -117
- package/dist/data/undoable.js +2 -2
- package/dist/form/use-form.d.ts +5 -3
- package/dist/form/use-form.js +1 -1
- package/dist/form/use-input.d.ts +0 -2
- package/dist/form/use-input.js +1 -2
- package/dist/index.js +2 -2
- package/dist/resource-context.d.ts +5 -1
- package/dist/resource-context.js +4 -0
- package/dist/router/use-get-path-for-record.d.ts +3 -3
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { LooseRecord, SourceProp, SourceValue } from "@chelone/core";
|
|
1
|
+
import type { LooseRecord, ResourceRecord, SourceProp, SourceValue } from "@chelone/core";
|
|
2
2
|
/** Props for {@link UrlField}. */
|
|
3
|
-
export interface UrlFieldProps<RecordType extends
|
|
3
|
+
export interface UrlFieldProps<RecordType extends ResourceRecord = LooseRecord> {
|
|
4
4
|
source: SourceProp<RecordType>;
|
|
5
5
|
record?: RecordType;
|
|
6
6
|
defaultValue?: SourceValue<RecordType, SourceProp<RecordType>>;
|
|
@@ -15,7 +15,7 @@ export interface UrlFieldProps<RecordType extends LooseRecord = LooseRecord> {
|
|
|
15
15
|
}
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
17
17
|
export default _default;
|
|
18
|
-
declare const __VLS_export: <RecordType extends
|
|
18
|
+
declare const __VLS_export: <RecordType extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
19
19
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<UrlFieldProps<RecordType>> & (typeof globalThis extends {
|
|
20
20
|
__VLS_PROPS_FALLBACK: infer P;
|
|
21
21
|
} ? P : {});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type LooseRecord, type ResourceRecord, type SourceKey, type SourceProp, type SourceValue } from "@chelone/core";
|
|
2
2
|
/** Ratio thresholds toggling the warning / critical bar color. */
|
|
3
3
|
export interface UsageMeterThresholds {
|
|
4
4
|
warning: number;
|
|
5
5
|
critical: number;
|
|
6
6
|
}
|
|
7
7
|
/** Props for {@link UsageMeterField}. */
|
|
8
|
-
export interface UsageMeterFieldProps<RecordType extends
|
|
8
|
+
export interface UsageMeterFieldProps<RecordType extends ResourceRecord = LooseRecord> {
|
|
9
9
|
source: SourceProp<RecordType>;
|
|
10
10
|
/** The record to render. Defaults to the ambient `RecordContext` value. */
|
|
11
11
|
record?: RecordType;
|
|
@@ -23,7 +23,7 @@ export interface UsageMeterFieldProps<RecordType extends LooseRecord = LooseReco
|
|
|
23
23
|
}
|
|
24
24
|
declare const _default: typeof __VLS_export;
|
|
25
25
|
export default _default;
|
|
26
|
-
declare const __VLS_export: <RecordType extends
|
|
26
|
+
declare const __VLS_export: <RecordType extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
27
27
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<UsageMeterFieldProps<RecordType>> & (typeof globalThis extends {
|
|
28
28
|
__VLS_PROPS_FALLBACK: infer P;
|
|
29
29
|
} ? P : {});
|
package/dist/components/admin/fields/usage-meter-field.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useRecordContextRef } from "../../../record/record-context.js";
|
|
3
3
|
import { useFieldValue } from "../../../record/use-field-value.js";
|
|
4
|
-
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent,
|
|
4
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, toDisplayString, unref } from "vue";
|
|
5
|
+
import { getAtPath } from "@chelone/core";
|
|
5
6
|
// src/components/admin/fields/usage-meter-field.vue?vue&type=script&setup=true&lang.ts
|
|
6
7
|
var _hoisted_1 = ["data-state"];
|
|
7
8
|
var _hoisted_2 = ["aria-valuenow"];
|
|
@@ -42,12 +43,11 @@ var usage_meter_field_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
42
43
|
defaultValue: props.defaultValue
|
|
43
44
|
});
|
|
44
45
|
const used = computed(() => typeof value.value === "number" ? value.value : void 0);
|
|
45
|
-
const
|
|
46
|
-
const ctxRecord = computed(() => props.record ?? injectedRecord?.value);
|
|
46
|
+
const ctxRecord = useRecordContextRef(() => props.record);
|
|
47
47
|
const limit = computed(() => {
|
|
48
48
|
const rec = ctxRecord.value;
|
|
49
49
|
if (!props.limitSource || !rec) return void 0;
|
|
50
|
-
const l = rec
|
|
50
|
+
const l = getAtPath(rec, props.limitSource);
|
|
51
51
|
return typeof l === "number" ? l : void 0;
|
|
52
52
|
});
|
|
53
53
|
const thresholds = computed(() => props.thresholds ?? DEFAULT_THRESHOLDS);
|
|
@@ -59,7 +59,7 @@ var usage_meter_field_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
59
59
|
return "ok";
|
|
60
60
|
});
|
|
61
61
|
const pct = computed(() => Math.min(100, Math.round(ratio.value * 100)));
|
|
62
|
-
const indicatorClass = computed(() => cn("h-full rounded-full bg-primary transition-all", state.value === "warning" && "bg-yellow-500", state.value === "critical" && "bg-red-500"));
|
|
62
|
+
const indicatorClass = computed(() => cn("block h-full rounded-full bg-primary transition-all", state.value === "warning" && "bg-yellow-500", state.value === "critical" && "bg-red-500"));
|
|
63
63
|
return (_ctx, _cache) => {
|
|
64
64
|
return hasUsed.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [limit.value == null ? (openBlock(), createElementBlock("span", {
|
|
65
65
|
key: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LooseRecord, SourceProp, SourceValue } from "@chelone/core";
|
|
1
|
+
import type { LooseRecord, ResourceRecord, SourceProp, SourceValue } from "@chelone/core";
|
|
2
2
|
/** A webhook delivery outcome. */
|
|
3
3
|
export type DeliveryStatus = "ok" | "failed" | "pending";
|
|
4
4
|
/** The shape `<WebhookEndpointField>` reads from a record source. */
|
|
@@ -12,7 +12,7 @@ export interface WebhookEndpoint {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
/** Props for {@link WebhookEndpointField}. */
|
|
15
|
-
export interface WebhookEndpointFieldProps<RecordType extends
|
|
15
|
+
export interface WebhookEndpointFieldProps<RecordType extends ResourceRecord = LooseRecord> {
|
|
16
16
|
source: SourceProp<RecordType>;
|
|
17
17
|
record?: RecordType;
|
|
18
18
|
defaultValue?: SourceValue<RecordType, SourceProp<RecordType>>;
|
|
@@ -20,7 +20,7 @@ export interface WebhookEndpointFieldProps<RecordType extends LooseRecord = Loos
|
|
|
20
20
|
}
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
22
22
|
export default _default;
|
|
23
|
-
declare const __VLS_export: <RecordType extends
|
|
23
|
+
declare const __VLS_export: <RecordType extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
24
24
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<WebhookEndpointFieldProps<RecordType>> & (typeof globalThis extends {
|
|
25
25
|
__VLS_PROPS_FALLBACK: infer P;
|
|
26
26
|
} ? P : {});
|
package/dist/components/admin/fields/webhook-endpoint-field.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -30,7 +30,7 @@ var webhook_endpoint_field_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
30
30
|
return raw && typeof raw === "object" ? raw : null;
|
|
31
31
|
});
|
|
32
32
|
const status = computed(() => endpoint.value?.lastDelivery?.status ?? "pending");
|
|
33
|
-
const statusClass = computed(() => cn("rounded px-2 py-0.5 text-xs font-medium", status.value === "ok" && "bg-green-500/10 text-green-700", status.value === "failed" && "bg-red-500/10 text-red-700", status.value === "pending" && "bg-muted text-muted-foreground"));
|
|
33
|
+
const statusClass = computed(() => cn("rounded px-2 py-0.5 text-xs font-medium", status.value === "ok" && "bg-green-500/10 text-green-700 dark:text-green-400", status.value === "failed" && "bg-red-500/10 text-red-700 dark:text-red-400", status.value === "pending" && "bg-muted text-muted-foreground"));
|
|
34
34
|
return (_ctx, _cache) => {
|
|
35
35
|
return endpoint.value ? (openBlock(), createElementBlock("span", {
|
|
36
36
|
key: 0,
|
|
@@ -1,24 +1,34 @@
|
|
|
1
1
|
import type { VNode } from "vue";
|
|
2
|
-
import type { LooseRecord, SourceProp } from "@chelone/core";
|
|
2
|
+
import type { LooseRecord, ResourceRecord, SourceProp } from "@chelone/core";
|
|
3
3
|
/** Props for {@link WrapperField}. */
|
|
4
|
-
export interface WrapperFieldProps {
|
|
4
|
+
export interface WrapperFieldProps<RecordType extends ResourceRecord = LooseRecord> {
|
|
5
5
|
/**
|
|
6
6
|
* A pseudo field path exposed to a parent layout (e.g. a sortable
|
|
7
7
|
* `DataTable` header). Not read by the field itself — it only groups children.
|
|
8
8
|
*/
|
|
9
|
-
source?: SourceProp
|
|
9
|
+
source?: SourceProp<RecordType>;
|
|
10
10
|
label?: string | false;
|
|
11
|
-
record?:
|
|
11
|
+
record?: RecordType;
|
|
12
12
|
class?: string;
|
|
13
13
|
}
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
15
15
|
export default _default;
|
|
16
|
-
declare const __VLS_export:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
declare const __VLS_export: <RecordType extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
17
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<WrapperFieldProps<RecordType>> & (typeof globalThis extends {
|
|
18
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
19
|
+
} ? P : {});
|
|
20
|
+
expose: (exposed: {}) => void;
|
|
21
|
+
attrs: any;
|
|
22
|
+
slots: {
|
|
23
|
+
/** The wrapped fields, rendered as-is. */
|
|
24
|
+
default(): VNode[];
|
|
23
25
|
};
|
|
26
|
+
emit: {};
|
|
27
|
+
}>) => import("vue").VNode & {
|
|
28
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
24
29
|
};
|
|
30
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
31
|
+
[K in keyof T]: T[K];
|
|
32
|
+
} : {
|
|
33
|
+
[K in keyof T as K]: T[K];
|
|
34
|
+
}) & {};
|
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
import type { LooseRecord, SourceProp } from "@chelone/core";
|
|
1
|
+
import type { LooseRecord, ResourceRecord, SourceProp } from "@chelone/core";
|
|
2
2
|
/** Props for {@link ApiKeyInput}. */
|
|
3
|
-
export interface ApiKeyInputProps {
|
|
3
|
+
export interface ApiKeyInputProps<TRecord extends ResourceRecord = LooseRecord> {
|
|
4
4
|
/** Record field holding the API key. */
|
|
5
|
-
source: SourceProp
|
|
5
|
+
source: SourceProp<TRecord>;
|
|
6
6
|
/** Override resource. */
|
|
7
7
|
resource?: string;
|
|
8
8
|
/** Async side-effect on rotate. When provided, replaces the default update mutation. */
|
|
9
|
-
onRotate?: (record:
|
|
9
|
+
onRotate?: (record: TRecord) => Promise<void> | void;
|
|
10
10
|
/** Disable the button. */
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
}
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
14
14
|
export default _default;
|
|
15
|
-
declare const __VLS_export:
|
|
15
|
+
declare const __VLS_export: <TRecord extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
16
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<ApiKeyInputProps<TRecord>> & (typeof globalThis extends {
|
|
17
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
18
|
+
} ? P : {});
|
|
19
|
+
expose: (exposed: {}) => void;
|
|
20
|
+
attrs: any;
|
|
21
|
+
slots: {};
|
|
22
|
+
emit: {};
|
|
23
|
+
}>) => import("vue").VNode & {
|
|
24
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
27
|
+
[K in keyof T]: T[K];
|
|
28
|
+
} : {
|
|
29
|
+
[K in keyof T as K]: T[K];
|
|
30
|
+
}) & {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useUpdate } from "../../../data/mutations.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useRecordContextRef } from "../../../record/record-context.js";
|
|
3
3
|
import { useResourceContext } from "../../../resource-context.js";
|
|
4
4
|
import button_default from "../../ui/button.js";
|
|
5
|
-
import {
|
|
5
|
+
import { createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, toDisplayString, withCtx } from "vue";
|
|
6
6
|
// src/components/admin/inputs/api-key-input.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = {
|
|
8
8
|
key: 0,
|
|
@@ -34,8 +34,7 @@ var api_key_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
34
34
|
* lightweight inline `role="alertdialog"` panel toggled by the trigger.
|
|
35
35
|
*/
|
|
36
36
|
const props = __props;
|
|
37
|
-
const
|
|
38
|
-
const record = computed(() => recordRef?.value);
|
|
37
|
+
const record = useRecordContextRef();
|
|
39
38
|
const resource = useResourceContext({ resource: props.resource });
|
|
40
39
|
const update = useUpdate(resource ?? "");
|
|
41
40
|
const open = ref(false);
|
|
@@ -67,7 +67,7 @@ var array_input_row_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
67
67
|
return (_ctx, _cache) => {
|
|
68
68
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
69
69
|
itemLabel.value != null ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(itemLabel.value), 1)) : createCommentVNode("", true),
|
|
70
|
-
createElementVNode("div", { class: normalizeClass(["flex flex-1 flex-col gap-2", __props.inline && "sm:flex-row sm:items-start"]) }, [renderSlot(_ctx.$slots, "default")], 2),
|
|
70
|
+
createElementVNode("div", { class: normalizeClass(["flex flex-1 flex-col gap-2", __props.inline && "sm:flex-row sm:items-start sm:[&>*]:min-w-0 sm:[&>*]:flex-1"]) }, [renderSlot(_ctx.$slots, "default")], 2),
|
|
71
71
|
!__props.disabled ? (openBlock(), createElementBlock("div", _hoisted_3, [!__props.disableReordering ? renderSlot(_ctx.$slots, "reorder-buttons", {
|
|
72
72
|
index: __props.row.index,
|
|
73
73
|
remove,
|
package/dist/components/admin/inputs/checkbox-group-input.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -10,7 +10,7 @@ import { toChoiceValues } from "@chelone/core";
|
|
|
10
10
|
var _hoisted_1 = ["data-invalid"];
|
|
11
11
|
var _hoisted_2 = {
|
|
12
12
|
key: 0,
|
|
13
|
-
class: "text-sm font-medium leading-none"
|
|
13
|
+
class: "mb-3 text-sm font-medium leading-none"
|
|
14
14
|
};
|
|
15
15
|
var _hoisted_3 = { key: 0 };
|
|
16
16
|
var _hoisted_4 = ["data-disabled"];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The date, date-time and time format and parse helpers live in
|
|
3
|
-
* `@chelone/core`; this file keeps the three SFCs' import path
|
|
3
|
+
* `@chelone/core`; this file keeps the three SFCs' import path, and the class
|
|
4
|
+
* they share.
|
|
4
5
|
*/
|
|
6
|
+
/** The native picker icon: right-aligned, and visible on a dark theme. */
|
|
7
|
+
export declare const PICKER_INPUT_CLASS = "scheme-light dark:scheme-dark relative [&::-webkit-calendar-picker-indicator]:cursor-pointer [&::-webkit-calendar-picker-indicator]:absolute [&::-webkit-calendar-picker-indicator]:right-3 [&::-webkit-calendar-picker-indicator]:opacity-100 appearance-none";
|
|
5
8
|
export { formatDate, formatDateTime, formatTime, isValidDate, isValidDateTime, isValidTime, parseDateTimeToISO, parseTimeToDate, } from "@chelone/core";
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { formatDate, formatDateTime, formatTime, isValidDate, isValidDateTime, isValidTime, parseDateTimeToISO, parseTimeToDate } from "@chelone/core";
|
|
2
|
+
// src/components/admin/inputs/date-input-format.ts
|
|
3
|
+
/**
|
|
4
|
+
* The date, date-time and time format and parse helpers live in
|
|
5
|
+
* `@chelone/core`; this file keeps the three SFCs' import path, and the class
|
|
6
|
+
* they share.
|
|
7
|
+
*/
|
|
8
|
+
/** The native picker icon: right-aligned, and visible on a dark theme. */
|
|
9
|
+
var PICKER_INPUT_CLASS = "scheme-light dark:scheme-dark relative [&::-webkit-calendar-picker-indicator]:cursor-pointer [&::-webkit-calendar-picker-indicator]:absolute [&::-webkit-calendar-picker-indicator]:right-3 [&::-webkit-calendar-picker-indicator]:opacity-100 appearance-none";
|
|
10
|
+
export { PICKER_INPUT_CLASS, formatDate, formatDateTime, formatTime, isValidDate, isValidDateTime, isValidTime, parseDateTimeToISO, parseTimeToDate };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useInput } from "../../../form/use-input.js";
|
|
2
2
|
import { Field, FieldError, FieldLabel } from "../../ui/field.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
3
4
|
import input_default from "../../ui/input.js";
|
|
4
5
|
import validation_error_default from "../common/validation-error.js";
|
|
5
|
-
import { formatDate, isValidDate } from "./date-input-format.js";
|
|
6
|
+
import { PICKER_INPUT_CLASS, formatDate, isValidDate } from "./date-input-format.js";
|
|
6
7
|
import { humanizeSource } from "./label-text.js";
|
|
7
8
|
import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, toDisplayString, unref, watch, withCtx } from "vue";
|
|
8
9
|
import { textOf, toDateInputValue, toTextValue } from "@chelone/core";
|
|
@@ -84,7 +85,7 @@ var date_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
84
85
|
disabled: __props.disabled,
|
|
85
86
|
readonly: __props.readonly,
|
|
86
87
|
"aria-invalid": invalid.value,
|
|
87
|
-
class: normalizeClass(__props.inputClass),
|
|
88
|
+
class: normalizeClass(unref(cn)(unref(PICKER_INPUT_CLASS), __props.inputClass)),
|
|
88
89
|
onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
|
|
89
90
|
"onUpdate:modelValue": onInput,
|
|
90
91
|
onBlur
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useInput } from "../../../form/use-input.js";
|
|
2
2
|
import { Field, FieldError, FieldLabel } from "../../ui/field.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
3
4
|
import input_default from "../../ui/input.js";
|
|
4
5
|
import validation_error_default from "../common/validation-error.js";
|
|
5
|
-
import { formatDateTime, isValidDateTime, parseDateTimeToISO } from "./date-input-format.js";
|
|
6
|
+
import { PICKER_INPUT_CLASS, formatDateTime, isValidDateTime, parseDateTimeToISO } from "./date-input-format.js";
|
|
6
7
|
import { humanizeSource } from "./label-text.js";
|
|
7
8
|
import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, toDisplayString, unref, watch, withCtx } from "vue";
|
|
8
9
|
import { textOf, toDateInputValue, toTextValue } from "@chelone/core";
|
|
@@ -82,7 +83,7 @@ var date_time_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
82
83
|
disabled: __props.disabled,
|
|
83
84
|
readonly: __props.readonly,
|
|
84
85
|
"aria-invalid": invalid.value,
|
|
85
|
-
class: normalizeClass(__props.inputClass),
|
|
86
|
+
class: normalizeClass(unref(cn)(unref(PICKER_INPUT_CLASS), __props.inputClass)),
|
|
86
87
|
onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
|
|
87
88
|
"onUpdate:modelValue": onInput,
|
|
88
89
|
onBlur
|
|
@@ -73,7 +73,7 @@ var duration_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
73
73
|
const invalid = computed(() => touched.value && error.value != null);
|
|
74
74
|
const labelText = computed(() => props.label === false ? null : props.label ?? humanizeSource(props.source));
|
|
75
75
|
const labelFor = computed(() => props.units.length > 0 ? `${id}-${props.units[0]}` : id);
|
|
76
|
-
const inputClass = "flex h-9 w-16 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive";
|
|
76
|
+
const inputClass = "flex h-9 w-16 rounded-md border border-input bg-transparent px-3 py-1 text-sm text-foreground shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive";
|
|
77
77
|
function writeBack(next) {
|
|
78
78
|
const dayPart = next.d ? `${+next.d}D` : "";
|
|
79
79
|
const timeParts = (next.h ? `${+next.h}H` : "") + (next.m ? `${+next.m}M` : "") + (next.s ? `${+next.s}S` : "");
|
package/dist/components/admin/inputs/image-input-thumbnail.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useRecordContext } from "../../../record/record-context.js";
|
|
2
2
|
import { createCommentVNode, createElementBlock, defineComponent, openBlock, unref } from "vue";
|
|
3
|
+
import { fileEntryImage } from "@chelone/core";
|
|
3
4
|
// src/components/admin/inputs/image-input-thumbnail.vue?vue&type=script&setup=true&lang.ts
|
|
4
5
|
var _hoisted_1 = [
|
|
5
6
|
"src",
|
|
@@ -16,13 +17,13 @@ var image_input_thumbnail_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
16
17
|
* {@link provideRecordContext}) and renders it as a thumbnail `<img>`. A stand-in
|
|
17
18
|
* for a ported `<ImageField>` default child; pass an explicit slot to override.
|
|
18
19
|
*/
|
|
19
|
-
const
|
|
20
|
+
const image = fileEntryImage(useRecordContext());
|
|
20
21
|
return (_ctx, _cache) => {
|
|
21
|
-
return unref(
|
|
22
|
+
return unref(image) ? (openBlock(), createElementBlock("img", {
|
|
22
23
|
key: 0,
|
|
23
|
-
src: unref(
|
|
24
|
-
title: unref(
|
|
25
|
-
alt: unref(
|
|
24
|
+
src: unref(image).src,
|
|
25
|
+
title: unref(image).title,
|
|
26
|
+
alt: unref(image).title,
|
|
26
27
|
class: "h-24 w-24 rounded-md object-cover"
|
|
27
28
|
}, null, 8, _hoisted_1)) : createCommentVNode("", true);
|
|
28
29
|
};
|
|
@@ -4,6 +4,7 @@ export type ImageInputProps = FileInputProps;
|
|
|
4
4
|
declare const _default: typeof __VLS_export;
|
|
5
5
|
export default _default;
|
|
6
6
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ImageInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageInputProps> & Readonly<{}>, {
|
|
7
|
+
label: string | false;
|
|
7
8
|
accept: string;
|
|
8
9
|
labelMultiple: string;
|
|
9
10
|
labelSingle: string;
|
|
@@ -18,7 +18,10 @@ var image_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
18
18
|
labelSingle: { default: "ra.input.image.upload_single" },
|
|
19
19
|
class: {},
|
|
20
20
|
source: {},
|
|
21
|
-
label: {
|
|
21
|
+
label: {
|
|
22
|
+
type: [String, Boolean],
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
22
25
|
defaultValue: {},
|
|
23
26
|
validate: {}
|
|
24
27
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { LooseRecord } from "@chelone/core";
|
|
1
|
+
import type { LooseRecord, ResourceRecord } from "@chelone/core";
|
|
2
2
|
/** Props for {@link InPlaceEditorForm}. */
|
|
3
|
-
export interface InPlaceEditorFormProps<TRecord extends
|
|
3
|
+
export interface InPlaceEditorFormProps<TRecord extends ResourceRecord = LooseRecord> {
|
|
4
4
|
/** The record as it is when editing starts: the form's starting values and the save's `previousData`. */
|
|
5
5
|
record: TRecord;
|
|
6
6
|
/** Cancel on a focus move out of the editor; when false, save instead. */
|
|
@@ -10,7 +10,7 @@ export interface InPlaceEditorFormProps<TRecord extends LooseRecord = LooseRecor
|
|
|
10
10
|
}
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
export default _default;
|
|
13
|
-
declare const __VLS_export: <TRecord extends
|
|
13
|
+
declare const __VLS_export: <TRecord extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
14
14
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<InPlaceEditorFormProps<TRecord> & {
|
|
15
15
|
onCancel?: (() => any) | undefined;
|
|
16
16
|
onSave?: ((before: TRecord, dirty: Partial<TRecord>) => any) | undefined;
|
package/dist/components/admin/inputs/in-place-editor-form.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -50,7 +50,7 @@ var in_place_editor_form_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
50
50
|
ref_key: "formElement",
|
|
51
51
|
ref: formElement,
|
|
52
52
|
"data-slot": "in-place-editor-editing",
|
|
53
|
-
class: "flex items-center gap-2",
|
|
53
|
+
class: "flex items-center gap-2 [&>:first-child]:min-w-0 [&>:first-child]:flex-1",
|
|
54
54
|
onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"])),
|
|
55
55
|
onSubmit: _cache[4] || (_cache[4] = withModifiers(($event) => unref(submit)(), ["prevent", "stop"])),
|
|
56
56
|
onKeydown: _cache[5] || (_cache[5] = withKeys(withModifiers(($event) => emit("cancel"), ["prevent", "stop"]), ["esc"])),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { LooseRecord, MutationMode, SourceProp } from "@chelone/core";
|
|
1
|
+
import type { LooseRecord, MutationMode, ResourceRecord, SourceProp } from "@chelone/core";
|
|
2
2
|
/** Props for {@link InPlaceEditor}. */
|
|
3
|
-
export interface InPlaceEditorProps<TRecord extends
|
|
3
|
+
export interface InPlaceEditorProps<TRecord extends ResourceRecord = LooseRecord> {
|
|
4
4
|
/**
|
|
5
5
|
* The field to show and edit. Required unless both the default slot and the
|
|
6
6
|
* `#editor` slot are given.
|
|
@@ -22,7 +22,7 @@ export interface InPlaceEditorProps<TRecord extends LooseRecord = LooseRecord> {
|
|
|
22
22
|
}
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
24
24
|
export default _default;
|
|
25
|
-
declare const __VLS_export: <TRecord extends
|
|
25
|
+
declare const __VLS_export: <TRecord extends ResourceRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
26
26
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<InPlaceEditorProps<TRecord> & {
|
|
27
27
|
onError?: ((error: unknown) => any) | undefined;
|
|
28
28
|
onSuccess?: ((record: TRecord) => any) | undefined;
|
|
@@ -6,6 +6,12 @@ export interface NumberInputProps<RecordType = LooseRecord, TPath extends Source
|
|
|
6
6
|
format?: (value: number | null) => string;
|
|
7
7
|
/** The number to store for the text the user typed (`null` when empty or unparseable). */
|
|
8
8
|
parse?: (value: string) => number | null;
|
|
9
|
+
/** Lowest value the native input accepts. */
|
|
10
|
+
min?: number;
|
|
11
|
+
/** Highest value the native input accepts. */
|
|
12
|
+
max?: number;
|
|
13
|
+
/** How far the native input's spinner steps. */
|
|
14
|
+
step?: number;
|
|
9
15
|
class?: string;
|
|
10
16
|
}
|
|
11
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -12,6 +12,9 @@ var number_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
12
12
|
props: {
|
|
13
13
|
format: {},
|
|
14
14
|
parse: {},
|
|
15
|
+
min: {},
|
|
16
|
+
max: {},
|
|
17
|
+
step: {},
|
|
15
18
|
class: {},
|
|
16
19
|
source: {},
|
|
17
20
|
label: {
|
|
@@ -74,6 +77,9 @@ var number_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
74
77
|
createVNode(input_default, {
|
|
75
78
|
id: unref(id),
|
|
76
79
|
type: "number",
|
|
80
|
+
min: __props.min,
|
|
81
|
+
max: __props.max,
|
|
82
|
+
step: __props.step,
|
|
77
83
|
"model-value": buffer.value,
|
|
78
84
|
"aria-invalid": invalid.value,
|
|
79
85
|
onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
|
|
@@ -81,6 +87,9 @@ var number_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
81
87
|
onBlur
|
|
82
88
|
}, null, 8, [
|
|
83
89
|
"id",
|
|
90
|
+
"min",
|
|
91
|
+
"max",
|
|
92
|
+
"step",
|
|
84
93
|
"model-value",
|
|
85
94
|
"aria-invalid"
|
|
86
95
|
]),
|
|
@@ -2,7 +2,7 @@ import { useTranslate } from "../../../i18n/use-translate.js";
|
|
|
2
2
|
import { cn } from "../../../lib/utils.js";
|
|
3
3
|
import button_default from "../../ui/button.js";
|
|
4
4
|
import text_input_default from "./text-input.js";
|
|
5
|
-
import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, unref, withCtx } from "vue";
|
|
5
|
+
import { computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, unref, withCtx } from "vue";
|
|
6
6
|
// src/components/admin/inputs/password-input.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = {
|
|
8
8
|
key: 0,
|
|
@@ -61,10 +61,9 @@ var password_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
61
61
|
const props = __props;
|
|
62
62
|
const visible = ref(props.initiallyVisible === true);
|
|
63
63
|
const translate = useTranslate();
|
|
64
|
-
const hasLabel = computed(() => props.label !== false);
|
|
65
64
|
const toggleLabel = computed(() => visible.value ? translate("ra.input.password.toggle_visible", { _: "Hide password" }) : translate("ra.input.password.toggle_hidden", { _: "Show password" }));
|
|
66
65
|
return (_ctx, _cache) => {
|
|
67
|
-
return openBlock(),
|
|
66
|
+
return openBlock(), createBlock(text_input_default, {
|
|
68
67
|
source: __props.source,
|
|
69
68
|
label: __props.label,
|
|
70
69
|
type: visible.value ? "text" : "password",
|
|
@@ -76,8 +75,37 @@ var password_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
76
75
|
readonly: __props.readonly,
|
|
77
76
|
autocomplete: __props.autocomplete,
|
|
78
77
|
autofocus: __props.autofocus,
|
|
78
|
+
class: normalizeClass(props.class),
|
|
79
79
|
"input-class": unref(cn)("pr-10", __props.inputClass)
|
|
80
|
-
},
|
|
80
|
+
}, {
|
|
81
|
+
controlSuffix: withCtx(() => [createVNode(button_default, {
|
|
82
|
+
type: "button",
|
|
83
|
+
variant: "ghost",
|
|
84
|
+
size: "icon",
|
|
85
|
+
class: "absolute top-1/2 right-1 size-7 -translate-y-1/2 text-muted-foreground",
|
|
86
|
+
"aria-label": toggleLabel.value,
|
|
87
|
+
tabindex: -1,
|
|
88
|
+
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value)
|
|
89
|
+
}, {
|
|
90
|
+
default: withCtx(() => [visible.value ? (openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[1] || (_cache[1] = [
|
|
91
|
+
createElementVNode("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }, null, -1),
|
|
92
|
+
createElementVNode("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }, null, -1),
|
|
93
|
+
createElementVNode("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }, null, -1),
|
|
94
|
+
createElementVNode("line", {
|
|
95
|
+
x1: "2",
|
|
96
|
+
x2: "22",
|
|
97
|
+
y1: "2",
|
|
98
|
+
y2: "22"
|
|
99
|
+
}, null, -1)
|
|
100
|
+
])])) : (openBlock(), createElementBlock("svg", _hoisted_2, [..._cache[2] || (_cache[2] = [createElementVNode("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }, null, -1), createElementVNode("circle", {
|
|
101
|
+
cx: "12",
|
|
102
|
+
cy: "12",
|
|
103
|
+
r: "3"
|
|
104
|
+
}, null, -1)])]))]),
|
|
105
|
+
_: 1
|
|
106
|
+
}, 8, ["aria-label"])]),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, [
|
|
81
109
|
"source",
|
|
82
110
|
"label",
|
|
83
111
|
"type",
|
|
@@ -89,33 +117,9 @@ var password_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
89
117
|
"readonly",
|
|
90
118
|
"autocomplete",
|
|
91
119
|
"autofocus",
|
|
120
|
+
"class",
|
|
92
121
|
"input-class"
|
|
93
|
-
])
|
|
94
|
-
type: "button",
|
|
95
|
-
variant: "ghost",
|
|
96
|
-
size: "icon",
|
|
97
|
-
class: normalizeClass(unref(cn)("absolute right-1 size-7 text-muted-foreground", hasLabel.value ? "top-6" : "top-1")),
|
|
98
|
-
"aria-label": toggleLabel.value,
|
|
99
|
-
tabindex: -1,
|
|
100
|
-
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value)
|
|
101
|
-
}, {
|
|
102
|
-
default: withCtx(() => [visible.value ? (openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[1] || (_cache[1] = [
|
|
103
|
-
createElementVNode("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }, null, -1),
|
|
104
|
-
createElementVNode("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }, null, -1),
|
|
105
|
-
createElementVNode("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }, null, -1),
|
|
106
|
-
createElementVNode("line", {
|
|
107
|
-
x1: "2",
|
|
108
|
-
x2: "22",
|
|
109
|
-
y1: "2",
|
|
110
|
-
y2: "22"
|
|
111
|
-
}, null, -1)
|
|
112
|
-
])])) : (openBlock(), createElementBlock("svg", _hoisted_2, [..._cache[2] || (_cache[2] = [createElementVNode("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }, null, -1), createElementVNode("circle", {
|
|
113
|
-
cx: "12",
|
|
114
|
-
cy: "12",
|
|
115
|
-
r: "3"
|
|
116
|
-
}, null, -1)])]))]),
|
|
117
|
-
_: 1
|
|
118
|
-
}, 8, ["class", "aria-label"])], 2);
|
|
122
|
+
]);
|
|
119
123
|
};
|
|
120
124
|
}
|
|
121
125
|
});
|
|
@@ -100,7 +100,7 @@ var phone_input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
100
100
|
"aria-label": "Country",
|
|
101
101
|
value: country.value,
|
|
102
102
|
disabled: __props.disabled,
|
|
103
|
-
class: "rounded-md border border-input bg-background px-2 py-1 text-sm",
|
|
103
|
+
class: "h-9 rounded-md border border-input bg-background px-2 py-1 text-sm",
|
|
104
104
|
onChange: onCountryChange
|
|
105
105
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(countries.value, (c) => {
|
|
106
106
|
return openBlock(), createElementBlock("option", {
|
package/dist/components/admin/inputs/radio-button-group-input.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock
|
|
|
8
8
|
var _hoisted_1 = ["data-invalid"];
|
|
9
9
|
var _hoisted_2 = {
|
|
10
10
|
key: 0,
|
|
11
|
-
class: "text-sm font-medium leading-none"
|
|
11
|
+
class: "mb-3 text-sm font-medium leading-none"
|
|
12
12
|
};
|
|
13
13
|
var _hoisted_3 = { key: 0 };
|
|
14
14
|
var _hoisted_4 = ["data-disabled"];
|