@maropost-ui/liquidsky-ui 0.1.77 → 0.1.80

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 (41) hide show
  1. package/README.md +18 -0
  2. package/dist/components/AppStepper/useStepper.d.ts +4 -4
  3. package/dist/components/index.d.ts +1 -0
  4. package/dist/components/vuetify-wrappers/index.d.ts +37 -0
  5. package/dist/components/vuetify-wrappers/useWrapperDefaults.d.ts +2 -0
  6. package/dist/components/vuetify-wrappers/wrapWithMpTest.d.ts +9 -0
  7. package/dist/composables/useMpTestId.d.ts +9 -13
  8. package/dist/directives/MpTest.d.ts +36 -14
  9. package/dist/directives/index.d.ts +1 -0
  10. package/dist/directives/mpTestComponentDefaults.d.ts +546 -0
  11. package/dist/directives/mpTestConfig.d.ts +30 -0
  12. package/dist/index.css +1 -1
  13. package/dist/index.d.ts +3 -1
  14. package/dist/index.js +21551 -20351
  15. package/dist/types/AlertModalProps.d.ts +1 -2
  16. package/dist/types/AppClipboardProps.d.ts +1 -2
  17. package/dist/types/AppConfirmationDialogProps.d.ts +1 -2
  18. package/dist/types/AppDataTableProps.d.ts +1 -2
  19. package/dist/types/AppDialogWrapperProps.d.ts +1 -2
  20. package/dist/types/AppDrawerWrapperProps.d.ts +1 -2
  21. package/dist/types/AppDropdownProps.d.ts +1 -2
  22. package/dist/types/AppMultiCellValueProps.d.ts +1 -2
  23. package/dist/types/AppSnackbarProps.d.ts +1 -2
  24. package/dist/types/AppSplitButtonProps.d.ts +1 -2
  25. package/dist/types/AppStepperProps.d.ts +1 -2
  26. package/dist/types/AppTableActionMenuProps.d.ts +1 -2
  27. package/dist/types/AppsDropdownProps.d.ts +1 -2
  28. package/dist/types/MpTestIdProps.d.ts +6 -2
  29. package/dist/types/NotificationIconProps.d.ts +1 -2
  30. package/dist/types/SearchBarProps.d.ts +1 -2
  31. package/dist/types/SlVueTreeNextProps.d.ts +1 -2
  32. package/dist/types/TheNavigationProps.d.ts +1 -2
  33. package/dist/types/TheNotificationDrawerProps.d.ts +1 -2
  34. package/dist/types/TheOnboardingScreenChecklistsProps.d.ts +1 -2
  35. package/dist/types/TheTimezoneProps.d.ts +1 -2
  36. package/dist/types/TheUserDropdownProps.d.ts +1 -2
  37. package/dist/types/UnifiedNavigationProps.d.ts +1 -2
  38. package/dist/types/router.d.ts +1 -2
  39. package/dist/utils/index.d.ts +1 -0
  40. package/dist/utils/mpTestAttrs.d.ts +22 -0
  41. package/package.json +1 -1
@@ -1,4 +1,3 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
1
  export type AlertModalPosition = 'center' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
3
2
  export interface GenericModalState {
4
3
  title: string;
@@ -20,7 +19,7 @@ export interface GenericModalState {
20
19
  onConfirm?: () => void;
21
20
  onCancel?: () => void;
22
21
  }
23
- export interface AlertModalProps extends MpTestIdProps {
22
+ export interface AlertModalProps {
24
23
  state: GenericModalState;
25
24
  show: boolean;
26
25
  }
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface AppClipboardProps extends MpTestIdProps {
1
+ export interface AppClipboardProps {
3
2
  value: string;
4
3
  disabled?: boolean;
5
4
  copyLabel?: string;
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface AppConfirmationDialogProps extends MpTestIdProps {
1
+ export interface AppConfirmationDialogProps {
3
2
  /** dialog title */
4
3
  title: string;
5
4
  /** dialog subtitle */
@@ -1,4 +1,3 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
1
  /**
3
2
  * @file types/index.ts
4
3
  * @description Generic types for AppDataTable component
@@ -50,7 +49,7 @@ export interface BulkAction {
50
49
  disabled?: boolean;
51
50
  attrs?: Record<string, any>;
52
51
  }
53
- export interface DataTableProps extends MpTestIdProps {
52
+ export interface DataTableProps {
54
53
  service?: DataTableService | null;
55
54
  gridView?: boolean;
56
55
  disabledRouteParams?: boolean;
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface AppDialogWrapperProps extends MpTestIdProps {
1
+ export interface AppDialogWrapperProps {
3
2
  title?: string;
4
3
  subtitle?: string;
5
4
  isLoading?: boolean;
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface AppDrawerWrapperProps extends MpTestIdProps {
1
+ export interface AppDrawerWrapperProps {
3
2
  title?: string;
4
3
  showDivider?: boolean;
5
4
  width?: number;
@@ -1,4 +1,3 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
1
  export interface DataFetcherConfig {
3
2
  q?: string;
4
3
  limit: number;
@@ -45,7 +44,7 @@ export interface AppDropdownService<T = any> {
45
44
  };
46
45
  }
47
46
  export type DataFetcher<T = any> = (config: DataFetcherConfig) => Promise<DataFetcherResponse<T>>;
48
- export interface AppDropdownProps<T = any> extends MpTestIdProps {
47
+ export interface AppDropdownProps<T = any> {
49
48
  dataFetcher?: DataFetcher<T>;
50
49
  loadItemById?: number[];
51
50
  service?: AppDropdownService<T>;
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface AppMultiCellValueProps extends MpTestIdProps {
1
+ export interface AppMultiCellValueProps {
3
2
  list: any[];
4
3
  itemKey: string;
5
4
  }
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface AppSnackbarProps extends MpTestIdProps {
1
+ export interface AppSnackbarProps {
3
2
  type?: 'info' | 'success' | 'error' | 'warning';
4
3
  title?: string;
5
4
  message?: string;
@@ -1,12 +1,11 @@
1
1
  import type { Anchor } from 'vuetify';
2
- import type { MpTestIdProps } from './MpTestIdProps';
3
2
  export interface TSplitButtonMenuOption {
4
3
  title: string;
5
4
  disabled?: boolean;
6
5
  icon?: string;
7
6
  onClick: () => void;
8
7
  }
9
- export interface TAppSplitButtonProps extends MpTestIdProps {
8
+ export interface TAppSplitButtonProps {
10
9
  label: string;
11
10
  options: TSplitButtonMenuOption[];
12
11
  prependIcon?: string;
@@ -1,5 +1,4 @@
1
1
  import { Component } from "vue";
2
- import type { MpTestIdProps } from './MpTestIdProps';
3
2
  export type TInternalStepItem = {
4
3
  name: string;
5
4
  order: number;
@@ -21,7 +20,7 @@ export type TStepItem = Pick<TInternalStepItem, "id" | "name" | "order" | "label
21
20
  export type TPropStepperItem = TStepItem & {
22
21
  title?: string;
23
22
  };
24
- export interface AppStepperProps extends MpTestIdProps {
23
+ export interface AppStepperProps {
25
24
  stepperHeaderClass?: string;
26
25
  steps: TPropStepperItem[];
27
26
  setComponentRef?: (el: unknown, refName: string) => void;
@@ -1,4 +1,3 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
1
  export interface Action {
3
2
  /** icon e.g. "mdi-arrow-up" */
4
3
  icon?: string;
@@ -16,7 +15,7 @@ export interface Action {
16
15
  }) => void;
17
16
  };
18
17
  }
19
- export interface AppTableActionMenuProps extends MpTestIdProps {
18
+ export interface AppTableActionMenuProps {
20
19
  /** actions e.g. [{ title: "Action Item 1", icon: "mdi-arrow-up", on: { click: (item,index) => clickHandler(item,index) } }] */
21
20
  actions: Action[];
22
21
  /** item e.g. { id: 1, name: "Item 1" } */
@@ -1,4 +1,3 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
1
  export interface MaroPostApp {
3
2
  /** App identifier */
4
3
  id: string;
@@ -21,7 +20,7 @@ export interface MaroPostApp {
21
20
  */
22
21
  [key: string]: any;
23
22
  }
24
- export interface AppsDropdownProps extends MpTestIdProps {
23
+ export interface AppsDropdownProps {
25
24
  /** Account/user identifier */
26
25
  getAccountId: string | number | null;
27
26
  /** Apps configuration */
@@ -1,6 +1,10 @@
1
+ /**
2
+ * @deprecated Components do not accept testId props.
3
+ * Use `v-mp-test` with a string id or `{ id?, prefix?, suffix? }`.
4
+ */
1
5
  export interface MpTestIdProps {
2
- /** Full override, e.g. "inventory-table" */
6
+ /** @deprecated */
3
7
  testId?: string;
4
- /** Extend default, e.g. "inventory" → "mp-data-table-inventory" */
8
+ /** @deprecated */
5
9
  testIdSuffix?: string;
6
10
  }
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface NotificationIconProps extends MpTestIdProps {
1
+ export interface NotificationIconProps {
3
2
  /** Count/Badge props */
4
3
  count?: number | null;
5
4
  /** Max count to display on the badge */
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface SearchBarProps extends MpTestIdProps {
1
+ export interface SearchBarProps {
3
2
  /** Controls visibility of the search bar. Auto-detects from route meta if not provided */
4
3
  show?: boolean;
5
4
  /** v-model binding for the search input value */
@@ -1,5 +1,4 @@
1
1
  import { ComputedRef, Ref } from 'vue';
2
- import type { MpTestIdProps } from './MpTestIdProps';
3
2
  export declare enum MultiSelectKey {
4
3
  CTRL = "ctrlKey",
5
4
  META = "metaKey"
@@ -36,7 +35,7 @@ export interface VueData<T> {
36
35
  rootCursorPosition: CursorPosition<T>;
37
36
  rootDraggingNode: TreeNode<T>;
38
37
  }
39
- export interface SlVueTreeProps<T> extends MpTestIdProps {
38
+ export interface SlVueTreeProps<T> {
40
39
  modelValue?: NodeModel<T>[];
41
40
  edgeSize?: number;
42
41
  allowMultiselect?: boolean;
@@ -1,5 +1,4 @@
1
1
  import { type RouteLocationRaw } from 'vue-router';
2
- import type { MpTestIdProps } from './MpTestIdProps';
3
2
  type Link = {
4
3
  title: string;
5
4
  to?: RouteLocationRaw;
@@ -17,7 +16,7 @@ export type NavigationItem = Link & {
17
16
  icon?: string;
18
17
  submenu?: NavigationLink[];
19
18
  };
20
- export interface TheNavigationProps extends MpTestIdProps {
19
+ export interface TheNavigationProps {
21
20
  rail?: boolean;
22
21
  /** Backwards compatibility alias for v-model */
23
22
  isNavigationRail?: boolean;
@@ -1,4 +1,3 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
1
  export interface NotificationItem {
3
2
  /** Unique identifier for the notification */
4
3
  id: string | number;
@@ -17,7 +16,7 @@ export interface NotificationItem {
17
16
  /** Progress value from 0 to 100 - required when showProgress is true */
18
17
  progress?: number;
19
18
  }
20
- export interface TheNotificationDrawerProps extends MpTestIdProps {
19
+ export interface TheNotificationDrawerProps {
21
20
  /** Title of the notification drawer */
22
21
  title?: string;
23
22
  /** Array of notification items to display. Each item should have id, message, and optional properties for styling and actions.*/
@@ -1,4 +1,3 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
1
  export interface DeepLink {
3
2
  label: string;
4
3
  disabled?: boolean;
@@ -32,7 +31,7 @@ export interface StatusUpdatedChecklistItem {
32
31
  deepLinks: DeepLink[];
33
32
  status: "not_started" | "in_progress" | "completed";
34
33
  }
35
- export interface Props extends MpTestIdProps {
34
+ export interface Props {
36
35
  checklists: ChecklistSection[];
37
36
  checkListsStatus: Record<string, "not_started" | "in_progress" | "completed">;
38
37
  uniqueKey: string;
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface TheTimezoneProps extends MpTestIdProps {
1
+ export interface TheTimezoneProps {
3
2
  /** URL route to preferences page where timezone can be changed */
4
3
  routeToPreferences: string;
5
4
  /**
@@ -1,5 +1,4 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
- export interface TheUserDropdownProps extends MpTestIdProps {
1
+ export interface TheUserDropdownProps {
3
2
  /** Items to display in the dropdown */
4
3
  items: any[];
5
4
  /** Username to display in the dropdown */
@@ -1,6 +1,5 @@
1
1
  import type { RouteLocationRaw } from "vue-router";
2
- import type { MpTestIdProps } from "./MpTestIdProps";
3
- export interface UnifiedNavigationProps extends MpTestIdProps {
2
+ export interface UnifiedNavigationProps {
4
3
  collapsed?: boolean;
5
4
  navBlocks: [UnifiedNavigationItem[]];
6
5
  accountId: string;
@@ -1,4 +1,3 @@
1
- import type { MpTestIdProps } from './MpTestIdProps';
2
1
  /**
3
2
  * Custom route meta type definitions
4
3
  */
@@ -18,7 +17,7 @@ export interface BreadcrumbItem {
18
17
  exact?: boolean;
19
18
  href?: string;
20
19
  }
21
- export interface AppBreadcrumbProps extends MpTestIdProps {
20
+ export interface AppBreadcrumbProps {
22
21
  breadcrumbClass?: string;
23
22
  /** Any vuetify breadcrumbs props will be passed to v-breadcrumbs via v-bind */
24
23
  breadcrumbProps?: any;
@@ -3,3 +3,4 @@ export * from './commonFunctions';
3
3
  export * from './deduplicateObjects';
4
4
  export * from './deepMerge';
5
5
  export * from './numberUtils';
6
+ export * from './mpTestAttrs';
@@ -0,0 +1,22 @@
1
+ import { MP_TEST_ATTRIBUTES } from '../directives/mpTestConfig';
2
+ export type MpTestAttrRecord = Record<(typeof MP_TEST_ATTRIBUTES)[number], string>;
3
+ /** Build Playwright/Cypress attrs for a resolved test id. */
4
+ export declare function mpTestAttrs(id: string): MpTestAttrRecord;
5
+ /** Normalize Vuetify reserved column keys for stable test ids. */
6
+ export declare function normalizeColumnKey(key: string): string;
7
+ export declare function dataTableThId(key: string): string;
8
+ export declare function dataTableTdId(key: string): string;
9
+ type PropsObject = Record<string, unknown>;
10
+ type PropsFn = (data: unknown) => PropsObject;
11
+ type HeaderLike = {
12
+ key?: string;
13
+ headerProps?: PropsObject | PropsFn;
14
+ cellProps?: PropsObject | PropsFn;
15
+ [key: string]: unknown;
16
+ };
17
+ /**
18
+ * Inject `headerProps` / `cellProps` test attrs from each column `key`.
19
+ * Ids: `mp-data-table-th-{key}` / `mp-data-table-td-{key}`.
20
+ */
21
+ export declare function withTableColumnMpTestHeaders<T extends HeaderLike>(headers: T[]): T[];
22
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maropost-ui/liquidsky-ui",
3
- "version": "0.1.77",
3
+ "version": "0.1.80",
4
4
  "description": "Shared UI components, composables, and utils for Vue + Vuetify",
5
5
  "main": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",