@chelone/vue 0.3.0 → 0.4.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-shell.vue.js +1 -1
- package/dist/choices/use-choices.d.ts +11 -10
- package/dist/choices/use-choices.js +5 -4
- package/dist/components/admin/auth/auth-callback.vue.js +1 -1
- package/dist/components/admin/auth/auth-error.vue.d.ts +1 -1
- package/dist/components/admin/auth/login-form.vue.js +1 -1
- package/dist/components/admin/auth/login-with-email.vue.js +1 -1
- package/dist/components/admin/buttons/save-button.vue.d.ts +1 -1
- package/dist/components/admin/buttons/update-button.vue.d.ts +3 -3
- package/dist/components/admin/feedback/linear-progress.vue.d.ts +1 -1
- package/dist/components/admin/feedback/loading-indicator.vue.js +1 -1
- package/dist/components/admin/feedback/spinner.vue.js +1 -1
- package/dist/components/admin/fields/api-key-field.vue.d.ts +27 -9
- package/dist/components/admin/fields/api-key-field.vue.js +3 -1
- package/dist/components/admin/fields/array-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/badge-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/boolean-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/chip-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/color-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/cron-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/currency-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/date-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/duration-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/email-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/file-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/function-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/image-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/json-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/number-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/phone-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/rating-field.vue.d.ts +22 -7
- package/dist/components/admin/fields/rating-field.vue.js +3 -1
- package/dist/components/admin/fields/record-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/reference-array-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/reference-field.vue.d.ts +2 -1
- package/dist/components/admin/fields/reference-many-count.vue.d.ts +2 -2
- package/dist/components/admin/fields/reference-many-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/reference-one-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/select-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/select-field.vue.js +1 -1
- package/dist/components/admin/fields/subscription-plan-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/text-array-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/text-field.vue.d.ts +2 -8
- package/dist/components/admin/fields/url-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/usage-meter-field.vue.d.ts +22 -7
- package/dist/components/admin/fields/usage-meter-field.vue.js +3 -1
- package/dist/components/admin/fields/webhook-endpoint-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/wrapper-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/wrapper-field.vue.js +6 -0
- package/dist/components/admin/inputs/api-key-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/array-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/autocomplete-array-input.vue.d.ts +14 -6
- package/dist/components/admin/inputs/autocomplete-array-input.vue.js +2 -3
- package/dist/components/admin/inputs/autocomplete-input.vue.d.ts +14 -6
- package/dist/components/admin/inputs/autocomplete-input.vue.js +2 -3
- package/dist/components/admin/inputs/boolean-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/checkbox-group-input.vue.d.ts +1 -1
- package/dist/components/admin/inputs/choice-input-props.d.ts +6 -6
- package/dist/components/admin/inputs/color-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/cron-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/currency-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/date-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/date-time-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/duration-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/file-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/nullable-boolean-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/number-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/password-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/phone-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/radio-button-group-input.vue.d.ts +1 -1
- package/dist/components/admin/inputs/rating-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/reference-array-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/reference-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/resettable-text-input.vue.d.ts +2 -1
- package/dist/components/admin/inputs/search-input.vue.d.ts +3 -3
- package/dist/components/admin/inputs/select-array-input.vue.d.ts +14 -5
- package/dist/components/admin/inputs/select-array-input.vue.js +1 -1
- package/dist/components/admin/inputs/select-input.vue.d.ts +14 -7
- package/dist/components/admin/inputs/select-input.vue.js +1 -1
- package/dist/components/admin/inputs/subscription-plan-picker.vue.d.ts +2 -2
- package/dist/components/admin/inputs/text-array-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/text-input.vue.d.ts +2 -1
- package/dist/components/admin/inputs/time-input.vue.d.ts +2 -1
- package/dist/components/admin/inputs/use-choice-input.d.ts +12 -19
- package/dist/components/admin/inputs/use-choice-input.js +4 -1
- package/dist/components/admin/inputs/webhook-endpoint-input.vue.d.ts +2 -2
- package/dist/components/admin/list/calendar-list.vue.d.ts +8 -8
- package/dist/components/admin/list/count-spinner.vue.js +1 -1
- package/dist/components/admin/list/filter-live-search.vue.d.ts +1 -1
- package/dist/components/admin/list/kanban-board.vue.d.ts +41 -0
- package/dist/components/admin/list/kanban-board.vue.js +275 -0
- package/dist/components/admin/list/kanban-board2.vue.js +4 -0
- package/dist/components/admin/list/list-icons.d.ts +2 -0
- package/dist/components/admin/list/list-icons.js +7 -0
- package/dist/components/admin/list/tree-list.vue.d.ts +6 -5
- package/dist/components/admin/supabase/forgot-password-form.vue.js +1 -1
- package/dist/components/admin/supabase/set-password-form.vue.js +1 -1
- package/dist/components/admin/view/labeled.vue.d.ts +6 -5
- package/dist/components/admin/view/labeled.vue.js +4 -1
- package/dist/components/admin/view/tabbed-show-layout-tab.vue.d.ts +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/maps/geo-json-field.vue.d.ts +2 -1
- package/dist/components/maps/lat-lng-field.vue.d.ts +3 -3
- package/dist/components/maps/lat-lng-input.vue.d.ts +4 -4
- package/dist/components/maps-draw/shape-input.vue.d.ts +4 -4
- package/dist/components/maps-draw/simplify-input.vue.d.ts +2 -2
- package/dist/components/maps-osm/geocoding-input.vue.d.ts +6 -6
- package/dist/components/maps-osm/map-with-search.vue.d.ts +4 -4
- package/dist/components/maps-osm/osm-feature-operator.vue.d.ts +3 -3
- package/dist/components/maps-osm/osm-feature-operator.vue.js +1 -1
- package/dist/components/maps-osm/reverse-geocode-field.vue.d.ts +3 -3
- package/dist/components/mdx-editor/mdx-field.vue.d.ts +2 -2
- package/dist/components/mdx-editor/mdx-input.vue.d.ts +2 -2
- package/dist/components/monaco/monaco-json-field.vue.d.ts +2 -2
- package/dist/components/monaco/monaco-json-input.vue.d.ts +2 -2
- package/dist/components/ui/alert.d.ts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.vue.d.ts +1 -1
- package/dist/components/ui/command/command-dialog.vue.d.ts +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.vue.js +9 -3
- package/dist/components/ui/input.vue.d.ts +2 -2
- package/dist/components/ui/sidebar/sidebar-menu-button.vue.d.ts +1 -1
- package/dist/components/ui/spinner.vue.js +29 -1
- package/dist/components/ui/spinner2.vue.js +1 -29
- package/dist/components/ui/textarea.vue.d.ts +2 -2
- package/dist/create-resource-components.d.ts +743 -0
- package/dist/create-resource-components.js +171 -0
- package/dist/data/create-chelone-hooks.d.ts +8 -8
- package/dist/data/mutations.d.ts +8 -8
- package/dist/form/use-input.d.ts +9 -7
- package/dist/form/use-input.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +248 -243
- package/dist/record/use-field-value.d.ts +16 -6
- package/package.json +4 -4
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
import type { ChoiceRecord } from "../../../choices/use-choices.js";
|
|
1
2
|
import type { ChoiceInputBaseProps } from "./choice-input-props.js";
|
|
2
3
|
/** Props for {@link SelectInput}. */
|
|
3
|
-
export interface SelectInputProps extends ChoiceInputBaseProps {
|
|
4
|
+
export interface SelectInputProps<TChoice extends ChoiceRecord = ChoiceRecord> extends ChoiceInputBaseProps<TChoice> {
|
|
4
5
|
/** Label of the empty option prepended to the list. Default `""` (a blank line). */
|
|
5
6
|
emptyText?: string;
|
|
6
7
|
/** Underlying value submitted when the empty option is chosen. Default `""`. */
|
|
7
8
|
emptyValue?: string | number | boolean | null;
|
|
8
9
|
}
|
|
9
|
-
declare const _default:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
declare const _default: <TChoice extends ChoiceRecord = ChoiceRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
11
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & SelectInputProps<TChoice> & Partial<{}>> & import("vue").PublicProps;
|
|
12
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {};
|
|
15
|
+
emit: {};
|
|
16
|
+
}>) => import("vue").VNode & {
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
|
+
};
|
|
15
19
|
export default _default;
|
|
20
|
+
type __VLS_PrettifyLocal<T> = {
|
|
21
|
+
[K in keyof T]: T[K];
|
|
22
|
+
} & {};
|
|
@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
choices: {},
|
|
19
19
|
optionText: {},
|
|
20
20
|
optionValue: {},
|
|
21
|
-
disableValue: {
|
|
21
|
+
disableValue: {},
|
|
22
22
|
translateChoice: { type: Boolean },
|
|
23
23
|
label: { type: [String, Boolean], default: void 0 },
|
|
24
24
|
helperText: {},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Validator } from "@chelone/core";
|
|
1
|
+
import type { SourceProp, Validator } from "@chelone/core";
|
|
2
2
|
/** A subscription plan a {@link SubscriptionPlanPicker} renders as one card. */
|
|
3
3
|
export interface SubscriptionPlan {
|
|
4
4
|
id: string;
|
|
@@ -11,7 +11,7 @@ export interface SubscriptionPlan {
|
|
|
11
11
|
/** Props for {@link SubscriptionPlanPicker}. */
|
|
12
12
|
export interface SubscriptionPlanPickerProps {
|
|
13
13
|
/** The FK/field path holding the selected plan id. */
|
|
14
|
-
source:
|
|
14
|
+
source: SourceProp;
|
|
15
15
|
/** The plans rendered as cards. */
|
|
16
16
|
plans: readonly SubscriptionPlan[];
|
|
17
17
|
/** Highlights one plan as recommended. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Validator } from "@chelone/core";
|
|
1
|
+
import type { SourceProp, Validator } from "@chelone/core";
|
|
2
2
|
/** Props for {@link TextArrayInput}. */
|
|
3
3
|
export interface TextArrayInputProps {
|
|
4
|
-
source:
|
|
4
|
+
source: SourceProp;
|
|
5
5
|
label?: string | false;
|
|
6
6
|
defaultValue?: unknown;
|
|
7
7
|
validate?: Validator | readonly Validator[];
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* `<ValidationError>`), never an RHF `error.root.message`.
|
|
7
7
|
*/
|
|
8
8
|
import type { Validator } from "@chelone/core";
|
|
9
|
+
import type { SourceProp } from "@chelone/core";
|
|
9
10
|
/** Props for {@link TextInput}. */
|
|
10
11
|
export interface TextInputProps {
|
|
11
|
-
source:
|
|
12
|
+
source: SourceProp;
|
|
12
13
|
label?: string | false;
|
|
13
14
|
type?: string;
|
|
14
15
|
defaultValue?: unknown;
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
* pattern as `<DateInput>`.
|
|
8
8
|
*/
|
|
9
9
|
import type { Validator } from "@chelone/core";
|
|
10
|
+
import type { SourceProp } from "@chelone/core";
|
|
10
11
|
/** Props for {@link TimeInput}. */
|
|
11
12
|
export interface TimeInputProps {
|
|
12
|
-
source:
|
|
13
|
+
source: SourceProp;
|
|
13
14
|
label?: string | false;
|
|
14
15
|
defaultValue?: unknown;
|
|
15
16
|
validate?: Validator | readonly Validator[];
|
|
@@ -21,35 +21,28 @@
|
|
|
21
21
|
* / `resource` / `isFromReference` are stable per context, so they are read once
|
|
22
22
|
* (parity with the twin's `useState` capture of the reference options).
|
|
23
23
|
*/
|
|
24
|
-
import type { SourceProp } from "@chelone/core";
|
|
24
|
+
import type { SourcePath, SourceProp } from "@chelone/core";
|
|
25
25
|
import { type ComputedRef } from "vue";
|
|
26
26
|
import { type ChoiceRecord, type OptionText } from "../../../choices/use-choices.js";
|
|
27
27
|
/** Options for {@link useChoiceInput}. */
|
|
28
|
-
export interface UseChoiceInputOptions {
|
|
28
|
+
export interface UseChoiceInputOptions<TChoice extends ChoiceRecord = ChoiceRecord> {
|
|
29
29
|
/** Component name used in the "must provide the source prop" error. */
|
|
30
30
|
componentName: string;
|
|
31
31
|
/** Inline choices — synthesized into a static context, ignoring any ambient one. */
|
|
32
|
-
choices?: readonly (string |
|
|
32
|
+
choices?: readonly (string | TChoice)[];
|
|
33
33
|
/** The FK/field path (falls back to the ambient reference context's source). */
|
|
34
34
|
source?: SourceProp | undefined;
|
|
35
35
|
/** The display path or a formatter. */
|
|
36
|
-
optionText?: OptionText
|
|
36
|
+
optionText?: OptionText<TChoice>;
|
|
37
37
|
/** The value path. Default `id` (via `useChoices`). */
|
|
38
|
-
optionValue?:
|
|
38
|
+
optionValue?: SourcePath<TChoice>;
|
|
39
39
|
/** The disabled-flag path. Default `disabled`. */
|
|
40
|
-
disableValue?:
|
|
40
|
+
disableValue?: SourcePath<TChoice>;
|
|
41
41
|
/** Translate a string-path label. Default `!isFromReference`. */
|
|
42
42
|
translateChoice?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* The `optionText` fallback for a NON-reference context when `optionText` is
|
|
45
|
-
* omitted (a reference context always falls back to the record
|
|
46
|
-
* representation). `undefined` lets `useChoices` apply its own `name` default;
|
|
47
|
-
* the autocomplete twins pass `"name"` explicitly.
|
|
48
|
-
*/
|
|
49
|
-
defaultOptionText?: OptionText;
|
|
50
43
|
}
|
|
51
44
|
/** The resolved choice-input surface — accessors + reactive context fields. */
|
|
52
|
-
export interface UseChoiceInputResult {
|
|
45
|
+
export interface UseChoiceInputResult<TChoice extends ChoiceRecord = ChoiceRecord> {
|
|
53
46
|
/** The resolved `source` (guaranteed defined — the composable throws otherwise). */
|
|
54
47
|
source: string;
|
|
55
48
|
/** `true` for a reference context, `false` for inline choices. */
|
|
@@ -57,18 +50,18 @@ export interface UseChoiceInputResult {
|
|
|
57
50
|
/** The referenced resource name (inline: `undefined`). */
|
|
58
51
|
resource: string | undefined;
|
|
59
52
|
/** The full choice list (reactive). */
|
|
60
|
-
allChoices: ComputedRef<
|
|
53
|
+
allChoices: ComputedRef<TChoice[]>;
|
|
61
54
|
/** Whether the reference list is still loading (inline: `false`). */
|
|
62
55
|
isPending: ComputedRef<boolean>;
|
|
63
56
|
/** The reference fetch error (inline: `null`). */
|
|
64
57
|
fetchError: ComputedRef<unknown>;
|
|
65
58
|
/** The display text for a choice. */
|
|
66
|
-
getChoiceText(choice:
|
|
59
|
+
getChoiceText(choice: TChoice): string;
|
|
67
60
|
/** The value for a choice (`optionValue` path or `id`). */
|
|
68
|
-
getChoiceValue(choice:
|
|
61
|
+
getChoiceValue(choice: TChoice): unknown;
|
|
69
62
|
/** The disabled flag for a choice. */
|
|
70
|
-
getDisableValue(choice:
|
|
63
|
+
getDisableValue(choice: TChoice): unknown;
|
|
71
64
|
/** Push a filter onto a reference context (inert for inline choices). */
|
|
72
65
|
setFilters(filter: Record<string, unknown>, debounce?: boolean): void;
|
|
73
66
|
}
|
|
74
|
-
export declare function useChoiceInput(options: UseChoiceInputOptions): UseChoiceInputResult
|
|
67
|
+
export declare function useChoiceInput<TChoice extends ChoiceRecord = ChoiceRecord>(options: UseChoiceInputOptions<TChoice>): UseChoiceInputResult<TChoice>;
|
|
@@ -17,7 +17,7 @@ function useChoiceInput(options) {
|
|
|
17
17
|
const resource = ctx.resource;
|
|
18
18
|
const getRecordRepresentation = useGetRecordRepresentation(resource);
|
|
19
19
|
const { getChoiceText, getChoiceValue, getDisableValue } = useChoices({
|
|
20
|
-
optionText: options.optionText ?? (isFromReference ? getRecordRepresentation :
|
|
20
|
+
optionText: options.optionText ?? (isFromReference ? getRecordRepresentation : void 0),
|
|
21
21
|
optionValue: options.optionValue,
|
|
22
22
|
disableValue: options.disableValue,
|
|
23
23
|
translateChoice: options.translateChoice ?? !isFromReference
|
|
@@ -28,6 +28,9 @@ function useChoiceInput(options) {
|
|
|
28
28
|
resource,
|
|
29
29
|
// Computeds re-read the reference context's getters inside a tracking scope
|
|
30
30
|
// so the list stays live; for an inline context they read static fields.
|
|
31
|
+
// The cast: the context list is erased. Inline `choices` are `TChoice`
|
|
32
|
+
// records, and under a reference the choices come from context, where
|
|
33
|
+
// `TChoice` stays the default.
|
|
31
34
|
allChoices: computed(() => ctx.allChoices ?? []),
|
|
32
35
|
isPending: computed(() => ctx.isPending),
|
|
33
36
|
fetchError: computed(() => ctx.error),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Validator } from "@chelone/core";
|
|
1
|
+
import type { SourceProp, Validator } from "@chelone/core";
|
|
2
2
|
/**
|
|
3
3
|
* Storage shape a `<WebhookEndpointInput>` edits. Mirrors the React twin's
|
|
4
4
|
* inlined type (the shadmin source imported it from a sibling field not yet
|
|
@@ -15,7 +15,7 @@ export interface WebhookEndpoint {
|
|
|
15
15
|
}
|
|
16
16
|
/** Props for {@link WebhookEndpointInput}. */
|
|
17
17
|
export interface WebhookEndpointInputProps {
|
|
18
|
-
source:
|
|
18
|
+
source: SourceProp;
|
|
19
19
|
label?: string | false;
|
|
20
20
|
/** Available event-type strings to surface as checkboxes. */
|
|
21
21
|
eventTypes: readonly string[];
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import { type LooseRecord } from "@chelone/core";
|
|
23
23
|
import { type CalendarEventSlotProps, type CalendarDrop, type CalendarSlot } from "./calendar-month-view.vue.js";
|
|
24
|
-
import type { CalendarRange, CalendarView, CalendarWeekStart } from "@chelone/core";
|
|
24
|
+
import type { CalendarRange, CalendarView, CalendarWeekStart, SourceProp } from "@chelone/core";
|
|
25
25
|
import type { CalendarNavigateDirection } from "./calendar-header.vue.js";
|
|
26
26
|
/** Props for {@link CalendarList}. */
|
|
27
27
|
export interface CalendarListProps {
|
|
28
28
|
/** The field holding the start of an event; a dotted path reads a nested value. */
|
|
29
|
-
startSource:
|
|
29
|
+
startSource: SourceProp;
|
|
30
30
|
/** The field holding the end. An event with none, or one before its start, covers its start day only. */
|
|
31
|
-
endSource?:
|
|
31
|
+
endSource?: SourceProp;
|
|
32
32
|
/** The string field shown as the event title; the record representation otherwise. */
|
|
33
|
-
titleSource?:
|
|
33
|
+
titleSource?: SourceProp;
|
|
34
34
|
/** The field whose value picks a color from `colorMap`. */
|
|
35
|
-
colorSource?:
|
|
35
|
+
colorSource?: SourceProp;
|
|
36
36
|
colorMap?: Record<string, string>;
|
|
37
37
|
/** The view shown first. Default `month`. */
|
|
38
38
|
defaultView?: CalendarView;
|
|
@@ -83,9 +83,9 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CalendarLi
|
|
|
83
83
|
perPage: number;
|
|
84
84
|
linkType: "edit" | "show" | false;
|
|
85
85
|
views: CalendarView[];
|
|
86
|
-
endSource:
|
|
87
|
-
titleSource:
|
|
88
|
-
colorSource:
|
|
86
|
+
endSource: SourceProp;
|
|
87
|
+
titleSource: SourceProp;
|
|
88
|
+
colorSource: SourceProp;
|
|
89
89
|
colorMap: Record<string, string>;
|
|
90
90
|
defaultView: CalendarView;
|
|
91
91
|
weekStartsOn: CalendarWeekStart;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, unref, openBlock, createBlock, normalizeClass, createCommentVNode } from "vue";
|
|
2
|
-
import _sfc_main$1 from "../../ui/
|
|
2
|
+
import _sfc_main$1 from "../../ui/spinner.vue.js";
|
|
3
3
|
import { useTimeout } from "../feedback/use-timeout.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "count-spinner",
|
|
@@ -2,7 +2,7 @@ import type { SearchInputProps } from "../inputs/search-input.vue.js";
|
|
|
2
2
|
/** Props for {@link FilterLiveSearch}: those of `<SearchInput>`. */
|
|
3
3
|
export type FilterLiveSearchProps = SearchInputProps;
|
|
4
4
|
declare const _default: import("vue").DefineComponent<SearchInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SearchInputProps> & Readonly<{}>, {
|
|
5
|
-
source:
|
|
5
|
+
source: import("@chelone/core").SourceProp;
|
|
6
6
|
placeholder: string;
|
|
7
7
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
8
|
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { KanbanColumnDef, LooseRecord, SourceKey, SourceProp } from "@chelone/core";
|
|
2
|
+
/** Props for {@link KanbanBoard}. */
|
|
3
|
+
export interface KanbanBoardProps<TRecord extends LooseRecord = LooseRecord> {
|
|
4
|
+
/**
|
|
5
|
+
* The top-level field whose value names a column; a drop writes the target
|
|
6
|
+
* column's `id` to it.
|
|
7
|
+
*/
|
|
8
|
+
groupSource: SourceKey<TRecord>;
|
|
9
|
+
/** The columns, in order. A record whose group value names none is not shown. */
|
|
10
|
+
columns: readonly KanbanColumnDef[];
|
|
11
|
+
/** The field shown as the card title; the record representation when it is null or undefined. */
|
|
12
|
+
titleSource?: SourceProp<TRecord>;
|
|
13
|
+
/** The field shown as a second line when its value is not empty. */
|
|
14
|
+
descriptionSource?: SourceProp<TRecord>;
|
|
15
|
+
/**
|
|
16
|
+
* Where a card goes when nothing listens to `select-card`. `edit` by default,
|
|
17
|
+
* `show` when the resource has no edit view. `false` leaves cards inert.
|
|
18
|
+
*/
|
|
19
|
+
linkType?: "edit" | "show" | false;
|
|
20
|
+
class?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const _default: <TRecord extends LooseRecord = LooseRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
23
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
24
|
+
readonly "onSelect-card"?: ((record: TRecord) => any) | undefined;
|
|
25
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onSelect-card"> & KanbanBoardProps<TRecord> & Partial<{}>> & import("vue").PublicProps;
|
|
26
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
27
|
+
attrs: any;
|
|
28
|
+
slots: {
|
|
29
|
+
/** Replaces the title and description inside a card. */
|
|
30
|
+
card?(props: {
|
|
31
|
+
record: TRecord;
|
|
32
|
+
}): unknown;
|
|
33
|
+
};
|
|
34
|
+
emit: (evt: "select-card", record: TRecord) => void;
|
|
35
|
+
}>) => import("vue").VNode & {
|
|
36
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
37
|
+
};
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_PrettifyLocal<T> = {
|
|
40
|
+
[K in keyof T]: T[K];
|
|
41
|
+
} & {};
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { defineComponent, computed, getCurrentInstance, shallowRef, ref, openBlock, createElementBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode, renderSlot, withModifiers, createVNode, withCtx, createBlock, createTextVNode } from "vue";
|
|
2
|
+
import { buildKanbanBuckets, planKanbanMove, getAtPath } from "@chelone/core";
|
|
3
|
+
import { useResourceDefinition } from "../../../admin/resource-registry.js";
|
|
4
|
+
import { useCheloneNotifications } from "../../../context.js";
|
|
5
|
+
import { useUpdate } from "../../../data/mutations.js";
|
|
6
|
+
import { useTranslate } from "../../../i18n/use-translate.js";
|
|
7
|
+
import { useGetRecordRepresentation } from "../../../label/use-get-record-representation.js";
|
|
8
|
+
import { cn } from "../../../lib/utils.js";
|
|
9
|
+
import { useListContext } from "../../../list/list-context.js";
|
|
10
|
+
import { useResourceContext } from "../../../resource-context.js";
|
|
11
|
+
import _sfc_main$3 from "../../ui/button.vue.js";
|
|
12
|
+
import { useMenuAccess } from "../layout/use-menu-access.js";
|
|
13
|
+
import { ArrowRightLeftIcon } from "./list-icons.js";
|
|
14
|
+
import { useNavigate, useCreatePath } from "../../../router/nav-composables.js";
|
|
15
|
+
import _sfc_main$1 from "../../ui/dropdown-menu/dropdown-menu.vue.js";
|
|
16
|
+
import _sfc_main$2 from "../../ui/dropdown-menu/dropdown-menu-trigger.vue.js";
|
|
17
|
+
import _sfc_main$4 from "../../ui/dropdown-menu/dropdown-menu-content.vue.js";
|
|
18
|
+
import _sfc_main$5 from "../../ui/dropdown-menu/dropdown-menu-item.vue.js";
|
|
19
|
+
const _hoisted_1 = ["aria-label", "data-column-id"];
|
|
20
|
+
const _hoisted_2 = { class: "flex items-center justify-between px-1 text-sm font-medium" };
|
|
21
|
+
const _hoisted_3 = {
|
|
22
|
+
"data-slot": "kanban-column-count",
|
|
23
|
+
class: "text-muted-foreground"
|
|
24
|
+
};
|
|
25
|
+
const _hoisted_4 = ["data-over", "onDragover", "onDragleave", "onDrop"];
|
|
26
|
+
const _hoisted_5 = {
|
|
27
|
+
key: 0,
|
|
28
|
+
"data-slot": "kanban-empty",
|
|
29
|
+
class: "px-1 py-2 text-sm text-muted-foreground"
|
|
30
|
+
};
|
|
31
|
+
const _hoisted_6 = ["data-record-id", "data-dragging", "draggable", "onClick", "onKeydown", "onDragstart"];
|
|
32
|
+
const _hoisted_7 = { class: "flex min-w-0 flex-1 flex-col gap-1" };
|
|
33
|
+
const _hoisted_8 = {
|
|
34
|
+
"data-slot": "kanban-card-title",
|
|
35
|
+
class: "font-medium"
|
|
36
|
+
};
|
|
37
|
+
const _hoisted_9 = {
|
|
38
|
+
key: 0,
|
|
39
|
+
"data-slot": "kanban-card-description",
|
|
40
|
+
class: "text-muted-foreground"
|
|
41
|
+
};
|
|
42
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
43
|
+
__name: "kanban-board",
|
|
44
|
+
props: {
|
|
45
|
+
groupSource: {},
|
|
46
|
+
columns: {},
|
|
47
|
+
titleSource: { default: void 0 },
|
|
48
|
+
descriptionSource: { default: void 0 },
|
|
49
|
+
linkType: { type: [String, Boolean], default: void 0 },
|
|
50
|
+
class: {}
|
|
51
|
+
},
|
|
52
|
+
emits: ["select-card"],
|
|
53
|
+
setup(__props, { emit: __emit }) {
|
|
54
|
+
const props = __props;
|
|
55
|
+
const emit = __emit;
|
|
56
|
+
const list = useListContext();
|
|
57
|
+
const resource = useResourceContext();
|
|
58
|
+
const translate = useTranslate();
|
|
59
|
+
const getRepresentation = useGetRecordRepresentation(resource);
|
|
60
|
+
const navigate = useNavigate();
|
|
61
|
+
const createPath = useCreatePath();
|
|
62
|
+
const definition = useResourceDefinition(() => ({ resource }));
|
|
63
|
+
const notifications = useCheloneNotifications();
|
|
64
|
+
const { canAccess, isPending: isAccessPending } = useMenuAccess(
|
|
65
|
+
computed(() => ({
|
|
66
|
+
action: "edit",
|
|
67
|
+
resource: resource ?? ""
|
|
68
|
+
}))
|
|
69
|
+
);
|
|
70
|
+
const update = useUpdate(resource ?? "", { mutationMode: "optimistic" });
|
|
71
|
+
const draggable = computed(
|
|
72
|
+
() => !!resource && canAccess.value && !isAccessPending.value
|
|
73
|
+
);
|
|
74
|
+
const instance = getCurrentInstance();
|
|
75
|
+
const hasListener = () => {
|
|
76
|
+
const listeners = instance?.vnode.props;
|
|
77
|
+
return !!(listeners?.onSelectCard || listeners?.onSelectCardOnce);
|
|
78
|
+
};
|
|
79
|
+
const buckets = computed(
|
|
80
|
+
() => buildKanbanBuckets(list.data ?? [], props.groupSource, props.columns)
|
|
81
|
+
);
|
|
82
|
+
const grabbed = shallowRef(null);
|
|
83
|
+
const draggingId = ref();
|
|
84
|
+
const overColumn = ref();
|
|
85
|
+
function clearDrag() {
|
|
86
|
+
grabbed.value = null;
|
|
87
|
+
draggingId.value = void 0;
|
|
88
|
+
overColumn.value = void 0;
|
|
89
|
+
}
|
|
90
|
+
function move(record, targetColumnId) {
|
|
91
|
+
const plan = planKanbanMove(
|
|
92
|
+
record,
|
|
93
|
+
props.groupSource,
|
|
94
|
+
props.columns,
|
|
95
|
+
targetColumnId
|
|
96
|
+
);
|
|
97
|
+
if (!plan) return;
|
|
98
|
+
update.mutateAsync(plan).catch(() => {
|
|
99
|
+
notifications?.notify("chelone.notification.http_error", {
|
|
100
|
+
type: "error"
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const type = computed(
|
|
105
|
+
() => props.linkType ?? (definition.value.hasEdit ? "edit" : definition.value.hasShow ? "show" : false)
|
|
106
|
+
);
|
|
107
|
+
const linkTo = (record) => resource && type.value ? createPath({ resource, id: record.id, type: type.value }) : void 0;
|
|
108
|
+
const selectable = computed(
|
|
109
|
+
() => hasListener() || !!resource && type.value !== false
|
|
110
|
+
);
|
|
111
|
+
function select(record) {
|
|
112
|
+
if (!selectable.value) return;
|
|
113
|
+
if (hasListener()) return emit("select-card", record);
|
|
114
|
+
const to = linkTo(record);
|
|
115
|
+
if (to) navigate(to);
|
|
116
|
+
}
|
|
117
|
+
function onCardKeydown(event, record) {
|
|
118
|
+
if (event.target !== event.currentTarget) return;
|
|
119
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
select(record);
|
|
122
|
+
}
|
|
123
|
+
function onDragStart(event, record) {
|
|
124
|
+
if (!draggable.value || !event.dataTransfer) return;
|
|
125
|
+
event.dataTransfer.effectAllowed = "move";
|
|
126
|
+
event.dataTransfer.setData("text/plain", String(record.id));
|
|
127
|
+
grabbed.value = record;
|
|
128
|
+
draggingId.value = String(record.id);
|
|
129
|
+
}
|
|
130
|
+
function onDragOver(event, columnId) {
|
|
131
|
+
if (!grabbed.value) return;
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
|
|
134
|
+
overColumn.value = columnId;
|
|
135
|
+
}
|
|
136
|
+
function onDragLeave(event, columnId) {
|
|
137
|
+
const into = event.relatedTarget;
|
|
138
|
+
const area = event.currentTarget;
|
|
139
|
+
if (into instanceof Node && area?.contains(into)) return;
|
|
140
|
+
if (overColumn.value === columnId) overColumn.value = void 0;
|
|
141
|
+
}
|
|
142
|
+
function onDrop(event, columnId) {
|
|
143
|
+
const record = grabbed.value;
|
|
144
|
+
if (!record || !draggable.value) return;
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
clearDrag();
|
|
147
|
+
move(record, columnId);
|
|
148
|
+
}
|
|
149
|
+
const isEmpty = (value) => value == null || value === "";
|
|
150
|
+
const textOf = (record, source) => source ? getAtPath(record, source) : void 0;
|
|
151
|
+
const titleOf = (record) => {
|
|
152
|
+
const value = textOf(record, props.titleSource);
|
|
153
|
+
return value == null ? getRepresentation(record) : String(value);
|
|
154
|
+
};
|
|
155
|
+
const othersOf = (columnId) => props.columns.filter((other) => other.id !== columnId);
|
|
156
|
+
const moveLabel = (record) => translate("chelone.kanban_board.move", {
|
|
157
|
+
title: titleOf(record),
|
|
158
|
+
_: "Move {title}"
|
|
159
|
+
});
|
|
160
|
+
const emptyLabel = computed(
|
|
161
|
+
() => translate("chelone.kanban_board.empty", { _: "No items" })
|
|
162
|
+
);
|
|
163
|
+
return (_ctx, _cache) => {
|
|
164
|
+
return openBlock(), createElementBlock("div", {
|
|
165
|
+
"data-slot": "kanban-board",
|
|
166
|
+
class: normalizeClass(unref(cn)("flex items-start gap-4 overflow-x-auto pb-2", props.class))
|
|
167
|
+
}, [
|
|
168
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(buckets.value, ({ column, records }) => {
|
|
169
|
+
return openBlock(), createElementBlock("div", {
|
|
170
|
+
key: column.id,
|
|
171
|
+
role: "group",
|
|
172
|
+
"aria-label": column.label,
|
|
173
|
+
"data-slot": "kanban-column",
|
|
174
|
+
"data-column-id": column.id,
|
|
175
|
+
class: normalizeClass(
|
|
176
|
+
unref(cn)(
|
|
177
|
+
"flex w-72 shrink-0 flex-col gap-2 rounded-lg bg-muted/50 p-2",
|
|
178
|
+
column.className
|
|
179
|
+
)
|
|
180
|
+
)
|
|
181
|
+
}, [
|
|
182
|
+
createElementVNode("div", _hoisted_2, [
|
|
183
|
+
createElementVNode("span", null, toDisplayString(column.label), 1),
|
|
184
|
+
createElementVNode("span", _hoisted_3, toDisplayString(records.length), 1)
|
|
185
|
+
]),
|
|
186
|
+
createElementVNode("div", {
|
|
187
|
+
"data-slot": "kanban-column-cards",
|
|
188
|
+
"data-over": overColumn.value === column.id ? "" : void 0,
|
|
189
|
+
class: "flex min-h-16 flex-col gap-2 rounded-md data-[over]:bg-accent",
|
|
190
|
+
onDragover: ($event) => onDragOver($event, column.id),
|
|
191
|
+
onDragleave: ($event) => onDragLeave($event, column.id),
|
|
192
|
+
onDrop: ($event) => onDrop($event, column.id)
|
|
193
|
+
}, [
|
|
194
|
+
records.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(emptyLabel.value), 1)) : createCommentVNode("", true),
|
|
195
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(records, (record) => {
|
|
196
|
+
return openBlock(), createElementBlock("div", {
|
|
197
|
+
key: record.id,
|
|
198
|
+
role: "button",
|
|
199
|
+
tabindex: "0",
|
|
200
|
+
"data-slot": "kanban-card",
|
|
201
|
+
"data-record-id": String(record.id),
|
|
202
|
+
"data-dragging": draggingId.value === String(record.id) ? "" : void 0,
|
|
203
|
+
draggable: draggable.value,
|
|
204
|
+
class: "flex cursor-pointer items-start gap-2 rounded-md border bg-card p-3 text-sm shadow-xs data-[dragging]:opacity-50",
|
|
205
|
+
onClick: ($event) => select(record),
|
|
206
|
+
onKeydown: ($event) => onCardKeydown($event, record),
|
|
207
|
+
onDragstart: ($event) => onDragStart($event, record),
|
|
208
|
+
onDragend: clearDrag
|
|
209
|
+
}, [
|
|
210
|
+
createElementVNode("div", _hoisted_7, [
|
|
211
|
+
_ctx.$slots.card ? renderSlot(_ctx.$slots, "card", {
|
|
212
|
+
key: 0,
|
|
213
|
+
record
|
|
214
|
+
}) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
215
|
+
createElementVNode("span", _hoisted_8, toDisplayString(titleOf(record)), 1),
|
|
216
|
+
!isEmpty(textOf(record, props.descriptionSource)) ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(String(textOf(record, props.descriptionSource))), 1)) : createCommentVNode("", true)
|
|
217
|
+
], 64))
|
|
218
|
+
]),
|
|
219
|
+
draggable.value ? (openBlock(), createElementBlock("div", {
|
|
220
|
+
key: 0,
|
|
221
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
222
|
+
}, ["stop"]))
|
|
223
|
+
}, [
|
|
224
|
+
createVNode(unref(_sfc_main$1), null, {
|
|
225
|
+
default: withCtx(() => [
|
|
226
|
+
createVNode(unref(_sfc_main$2), null, {
|
|
227
|
+
default: withCtx(() => [
|
|
228
|
+
createVNode(_sfc_main$3, {
|
|
229
|
+
type: "button",
|
|
230
|
+
variant: "ghost",
|
|
231
|
+
size: "icon",
|
|
232
|
+
"data-slot": "kanban-card-move",
|
|
233
|
+
class: "size-6",
|
|
234
|
+
"aria-label": moveLabel(record)
|
|
235
|
+
}, {
|
|
236
|
+
default: withCtx(() => [
|
|
237
|
+
createVNode(unref(ArrowRightLeftIcon))
|
|
238
|
+
]),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, ["aria-label"])
|
|
241
|
+
]),
|
|
242
|
+
_: 2
|
|
243
|
+
}, 1024),
|
|
244
|
+
createVNode(unref(_sfc_main$4), { align: "end" }, {
|
|
245
|
+
default: withCtx(() => [
|
|
246
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(othersOf(column.id), (other) => {
|
|
247
|
+
return openBlock(), createBlock(unref(_sfc_main$5), {
|
|
248
|
+
key: other.id,
|
|
249
|
+
onSelect: ($event) => move(record, other.id)
|
|
250
|
+
}, {
|
|
251
|
+
default: withCtx(() => [
|
|
252
|
+
createTextVNode(toDisplayString(other.label), 1)
|
|
253
|
+
]),
|
|
254
|
+
_: 2
|
|
255
|
+
}, 1032, ["onSelect"]);
|
|
256
|
+
}), 128))
|
|
257
|
+
]),
|
|
258
|
+
_: 2
|
|
259
|
+
}, 1024)
|
|
260
|
+
]),
|
|
261
|
+
_: 2
|
|
262
|
+
}, 1024)
|
|
263
|
+
])) : createCommentVNode("", true)
|
|
264
|
+
], 40, _hoisted_6);
|
|
265
|
+
}), 128))
|
|
266
|
+
], 40, _hoisted_4)
|
|
267
|
+
], 10, _hoisted_1);
|
|
268
|
+
}), 128))
|
|
269
|
+
], 2);
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
export {
|
|
274
|
+
_sfc_main as default
|
|
275
|
+
};
|
|
@@ -16,3 +16,5 @@ export declare const ChevronLeftIcon: FunctionalComponent;
|
|
|
16
16
|
export declare const ChevronRightIcon: FunctionalComponent;
|
|
17
17
|
/** Stacked up/down chevrons — the expand-all rows control. */
|
|
18
18
|
export declare const ChevronsUpDownIcon: FunctionalComponent;
|
|
19
|
+
/** Two opposing arrows — the kanban card "Move to" control. */
|
|
20
|
+
export declare const ArrowRightLeftIcon: FunctionalComponent;
|
|
@@ -35,7 +35,14 @@ const ChevronsUpDownIcon = icon(() => [
|
|
|
35
35
|
h("path", { d: "m7 15 5 5 5-5" }),
|
|
36
36
|
h("path", { d: "m7 9 5-5 5 5" })
|
|
37
37
|
]);
|
|
38
|
+
const ArrowRightLeftIcon = icon(() => [
|
|
39
|
+
h("path", { d: "m16 3 4 4-4 4" }),
|
|
40
|
+
h("path", { d: "M20 7H4" }),
|
|
41
|
+
h("path", { d: "m8 21-4-4 4-4" }),
|
|
42
|
+
h("path", { d: "M4 17h16" })
|
|
43
|
+
]);
|
|
38
44
|
export {
|
|
45
|
+
ArrowRightLeftIcon,
|
|
39
46
|
ChevronLeftIcon,
|
|
40
47
|
ChevronRightIcon,
|
|
41
48
|
ChevronsUpDownIcon,
|
|
@@ -15,15 +15,16 @@
|
|
|
15
15
|
* </List>
|
|
16
16
|
*/
|
|
17
17
|
import { type LooseRecord } from "@chelone/core";
|
|
18
|
+
import type { SourceProp } from "@chelone/core";
|
|
18
19
|
import type { Component } from "vue";
|
|
19
20
|
/** Props for {@link TreeList}. */
|
|
20
21
|
export interface TreeListProps {
|
|
21
22
|
/** The field holding the parent's id; a dot or bracket path reads a nested value. */
|
|
22
|
-
parentSource:
|
|
23
|
+
parentSource: SourceProp;
|
|
23
24
|
/** The string field shown as the row title; the record representation otherwise. */
|
|
24
|
-
titleSource?:
|
|
25
|
+
titleSource?: SourceProp;
|
|
25
26
|
/** The field whose value picks a component from `iconMap`. */
|
|
26
|
-
iconSource?:
|
|
27
|
+
iconSource?: SourceProp;
|
|
27
28
|
iconMap?: Record<string, Component>;
|
|
28
29
|
/** Whether branches start open. Default `false`. */
|
|
29
30
|
defaultExpanded?: boolean;
|
|
@@ -41,8 +42,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<TreeListPr
|
|
|
41
42
|
onSelect?: ((record: LooseRecord) => any) | undefined;
|
|
42
43
|
}>, {
|
|
43
44
|
linkType: "edit" | "show" | false;
|
|
44
|
-
titleSource:
|
|
45
|
-
iconSource:
|
|
45
|
+
titleSource: SourceProp;
|
|
46
|
+
iconSource: SourceProp;
|
|
46
47
|
iconMap: Record<string, Component>;
|
|
47
48
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
48
49
|
/** Rendered while the list is pending, in place of `SimpleListLoading`. */
|
|
@@ -6,7 +6,7 @@ import { useForm } from "../../../form/use-form.js";
|
|
|
6
6
|
import { useTranslate } from "../../../i18n/use-translate.js";
|
|
7
7
|
import { cn } from "../../../lib/utils.js";
|
|
8
8
|
import _sfc_main$2 from "../../ui/button.vue.js";
|
|
9
|
-
import _sfc_main$3 from "../../ui/
|
|
9
|
+
import _sfc_main$3 from "../../ui/spinner.vue.js";
|
|
10
10
|
import _sfc_main$1 from "../inputs/text-input.vue.js";
|
|
11
11
|
import { useResetPassword } from "./use-password-recovery.js";
|
|
12
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -6,7 +6,7 @@ import { useForm } from "../../../form/use-form.js";
|
|
|
6
6
|
import { useTranslate } from "../../../i18n/use-translate.js";
|
|
7
7
|
import { cn } from "../../../lib/utils.js";
|
|
8
8
|
import _sfc_main$2 from "../../ui/button.vue.js";
|
|
9
|
-
import _sfc_main$3 from "../../ui/
|
|
9
|
+
import _sfc_main$3 from "../../ui/spinner.vue.js";
|
|
10
10
|
import _sfc_main$1 from "../inputs/password-input.vue.js";
|
|
11
11
|
import { useSupabaseUrlTokens, useSetPassword } from "./use-password-recovery.js";
|
|
12
12
|
const _hoisted_1 = {
|