@omnitend/dashboard-for-laravel 0.48.1 → 0.49.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.
Files changed (32) hide show
  1. package/dist/components/base/DApp.vue.d.ts +12 -0
  2. package/dist/components/base/DFormCheckbox.vue.d.ts +1 -1
  3. package/dist/components/extended/DXFieldAffixGroup.vue.d.ts +26 -0
  4. package/dist/components/extended/DXNumericField.vue.d.ts +5 -0
  5. package/dist/components/extended/DXTable.vue.d.ts +5 -1
  6. package/dist/composables/useToast.d.ts +36 -1
  7. package/dist/dashboard-for-laravel.js +15383 -14546
  8. package/dist/dashboard-for-laravel.js.map +1 -1
  9. package/dist/dashboard-for-laravel.umd.cjs +9 -9
  10. package/dist/dashboard-for-laravel.umd.cjs.map +1 -1
  11. package/dist/index.d.ts +2 -0
  12. package/dist/style.css +4 -4
  13. package/dist/types/index.d.ts +32 -3
  14. package/dist/utils/itemNameCase.d.ts +17 -0
  15. package/docs/public/api-reference.json +93 -8
  16. package/docs/public/docs-map.md +1 -1
  17. package/docs/public/llms.txt +3 -2
  18. package/package.json +10 -11
  19. package/resources/css/theme.scss +22 -3
  20. package/resources/js/components/base/DApp.vue +29 -0
  21. package/resources/js/components/base/DFormCheckbox.vue +21 -3
  22. package/resources/js/components/extended/DXCurrencyInput.vue +3 -2
  23. package/resources/js/components/extended/DXField.vue +51 -0
  24. package/resources/js/components/extended/DXFieldAffixGroup.vue +84 -0
  25. package/resources/js/components/extended/DXNumericField.vue +54 -1
  26. package/resources/js/components/extended/DXTable.vue +10 -2
  27. package/resources/js/components/extended/DXTableEditorModal.vue +2 -4
  28. package/resources/js/composables/useResourceEditor.ts +7 -9
  29. package/resources/js/composables/useToast.ts +105 -15
  30. package/resources/js/index.ts +2 -0
  31. package/resources/js/types/index.ts +39 -3
  32. package/resources/js/utils/itemNameCase.ts +27 -0
@@ -0,0 +1,12 @@
1
+ declare var __VLS_7: string | number, __VLS_8: any;
2
+ type __VLS_Slots = {} & {
3
+ [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
@@ -1,4 +1,4 @@
1
- declare var __VLS_7: string | number, __VLS_8: {};
1
+ declare var __VLS_7: string | number, __VLS_8: any;
2
2
  type __VLS_Slots = {} & {
3
3
  [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any;
4
4
  };
@@ -0,0 +1,26 @@
1
+ interface Props {
2
+ /** Resolved leading text. Empty or undefined: no leading cell. */
3
+ prepend?: string;
4
+ /** Resolved trailing text. Empty or undefined: no trailing cell. */
5
+ append?: string;
6
+ /** Show the value and its unit as static text instead of the group. */
7
+ plaintext?: boolean;
8
+ /** The value as the input shows it (plaintext only). */
9
+ value?: unknown;
10
+ /** The consumer's own `aria-describedby` (from `inputProps`), kept first. */
11
+ consumerDescribedBy?: string;
12
+ }
13
+ declare var __VLS_5: {
14
+ describedBy: string | undefined;
15
+ };
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_5) => any;
18
+ };
19
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -14,6 +14,11 @@ interface Props {
14
14
  isPlaintext?: boolean;
15
15
  /** Escape-hatch input props, already guard-merged by DXField. */
16
16
  inputProps?: Record<string, any>;
17
+ /** The field's resolved `prepend` (number and percentage only). */
18
+ prepend?: string;
19
+ /** The field's resolved `append`: the currency's trailing unit, the
20
+ * percentage's trailing cell in place of "%", or the number's unit. */
21
+ append?: string;
17
22
  }
18
23
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
24
  "update:modelValue": (value: any) => any;
@@ -182,7 +182,11 @@ export type DXTableSource<TItem = any> = {
182
182
  export interface Props<TItem = any> {
183
183
  /** Table title */
184
184
  title?: string;
185
- /** Name for item (singular) - automatically pluralized (e.g., "product" → "products") */
185
+ /**
186
+ * Name for item (singular), as written mid-sentence - automatically
187
+ * pluralized (e.g., "product" → "products"). Titles and buttons Title-Case
188
+ * it ("New Booking Period"); toasts start it with a capital.
189
+ */
186
190
  itemName?: string;
187
191
  /** Table data items (Inertia mode) */
188
192
  items?: TItem[];
@@ -1,2 +1,37 @@
1
1
  import { useToast as useBvnToast } from "bootstrap-vue-next";
2
- export declare function useToast(): ReturnType<typeof useBvnToast>;
2
+ import type { OrchestratorCreateOptions, ToastOrchestratorCreateParam } from "bootstrap-vue-next";
3
+ /** `create`'s second argument: bvn's orchestrator options plus 0.45's `keep`. */
4
+ export type ToastCreateOptions = OrchestratorCreateOptions & {
5
+ /**
6
+ * Keep the toast in the orchestrator's store after it hides, so its
7
+ * controller can `.show()` it again. By default a hidden toast is
8
+ * removed, as in bvn 0.45 (bvn 1.x keeps every toast until the calling
9
+ * component unmounts).
10
+ */
11
+ keep?: boolean;
12
+ };
13
+ type BvnToast = ReturnType<typeof useBvnToast>;
14
+ type ToastController = ReturnType<BvnToast["create"]>;
15
+ export type UseToastReturn = Omit<BvnToast, "create"> & {
16
+ /**
17
+ * Create a toast and show it. With no `modelValue` it shows for 5 s
18
+ * (bvn 0.45's default; bvn 1.x would create it hidden). Pass
19
+ * `modelValue: false` to create it hidden and call `.show()` later.
20
+ * Once hidden it is removed, unless `keep` is set. The optional second
21
+ * argument is bvn 0.45's `options`, folded into `obj.options`.
22
+ */
23
+ create: <ComponentProps extends Record<string, unknown> = Record<string, unknown>>(obj?: ToastOrchestratorCreateParam<ComponentProps>, options?: ToastCreateOptions) => ToastController;
24
+ /** @deprecated Alias of `create`, kept from bvn 0.45 (removed upstream in 0.46). */
25
+ show: <ComponentProps extends Record<string, unknown> = Record<string, unknown>>(obj?: ToastOrchestratorCreateParam<ComponentProps>) => ToastController;
26
+ };
27
+ /**
28
+ * Thin wrapper around Bootstrap Vue Next's `useToast()`. Public API is
29
+ * bvn 0.45's (`create({ title, body, variant })` shows the toast and removes
30
+ * it once hidden, `show(...)`, a second `options` argument with `keep`) on
31
+ * top of bvn 1.x's controller, `hide` and `hideAll`. A themed `variant` is
32
+ * translated internally into a `toast-{variant}` class instead of being
33
+ * passed through to BVN, so it's styled via `--bs-toast-*` variables (see
34
+ * theme.scss) rather than an `!important`-overridden utility class.
35
+ */
36
+ export declare function useToast(): UseToastReturn;
37
+ export {};