@maropost-ui/liquidsky-ui 0.1.73 → 0.1.74
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/composables/index.d.ts +1 -0
- package/dist/composables/useMpTestId.d.ts +17 -0
- package/dist/directives/MpTest.d.ts +23 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/mpTestConfig.d.ts +56 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16335 -16021
- package/dist/types/AlertModalProps.d.ts +2 -1
- package/dist/types/AppClipboardProps.d.ts +2 -1
- package/dist/types/AppConfirmationDialogProps.d.ts +2 -1
- package/dist/types/AppDataTableProps.d.ts +2 -1
- package/dist/types/AppDialogWrapperProps.d.ts +2 -1
- package/dist/types/AppDrawerWrapperProps.d.ts +2 -1
- package/dist/types/AppDropdownProps.d.ts +2 -1
- package/dist/types/AppMultiCellValueProps.d.ts +2 -1
- package/dist/types/AppSnackbarProps.d.ts +2 -1
- package/dist/types/AppStepperProps.d.ts +2 -1
- package/dist/types/AppTableActionMenuProps.d.ts +2 -1
- package/dist/types/AppsDropdownProps.d.ts +2 -1
- package/dist/types/MpTestIdProps.d.ts +6 -0
- package/dist/types/NotificationIconProps.d.ts +2 -1
- package/dist/types/SearchBarProps.d.ts +2 -1
- package/dist/types/SlVueTreeNextProps.d.ts +2 -1
- package/dist/types/TheNavigationProps.d.ts +2 -1
- package/dist/types/TheNotificationDrawerProps.d.ts +2 -1
- package/dist/types/TheOnboardingScreenChecklistsProps.d.ts +2 -1
- package/dist/types/TheTimezoneProps.d.ts +2 -1
- package/dist/types/TheUserDropdownProps.d.ts +2 -1
- package/dist/types/UnifiedNavigationProps.d.ts +2 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/router.d.ts +2 -1
- package/dist/vuetify.d.ts +2 -0
- package/package.json +1 -1
|
@@ -9,3 +9,4 @@ export { default as useEmoji } from "./useEmoji";
|
|
|
9
9
|
export { default as toRefs } from "./toRefs";
|
|
10
10
|
export { default as useUnitConversion } from "./useUnitConversion";
|
|
11
11
|
export { default as useTimezoneTime } from "./useCalculateTime";
|
|
12
|
+
export { default as useMpTestId, resolveMpTestId } from "./useMpTestId";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves a test identifier from a component default, optional override, and optional suffix.
|
|
4
|
+
* Override (`testId`) wins over suffix (`testIdSuffix`).
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolveMpTestId(defaultId: string, testId?: string, testIdSuffix?: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* @description
|
|
9
|
+
* Reactive test identifier for `v-mp-test`. Pass a component default plus optional
|
|
10
|
+
* `testId` (override) and `testIdSuffix` (extend) props.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const mpTestId = useMpTestId(MP_TEST_IDS.button, () => props.testId, () => props.testIdSuffix)
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export default function useMpTestId(defaultId: string, testId?: MaybeRefOrGetter<string | undefined>, testIdSuffix?: MaybeRefOrGetter<string | undefined>): ComputedRef<string>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ObjectDirective } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* @description
|
|
4
|
+
* A custom Vue directive (`v-mp-test`) that applies a test identifier to an element
|
|
5
|
+
* for Playwright (`data-testid`) and Cypress (`data-cy` / `data-test-cy`).
|
|
6
|
+
* Attribute names are defined once in `mpTestConfig.ts`; changing that list updates every usage.
|
|
7
|
+
* Prefer `testId` / `testIdSuffix` props on Liquidsky components so defaults can be extended or overridden.
|
|
8
|
+
*
|
|
9
|
+
* @example Basic usage in a Vue component:
|
|
10
|
+
* ```vue
|
|
11
|
+
* <template>
|
|
12
|
+
* <div v-mp-test="'checkout-summary'">Summary</div>
|
|
13
|
+
* <AppDataTable />
|
|
14
|
+
* <AppDataTable test-id-suffix="inventory" />
|
|
15
|
+
* <AppDataTable test-id="inventory-table" />
|
|
16
|
+
* </template>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
interface MpTestHTMLElement extends HTMLElement {
|
|
20
|
+
_vMpTestValue?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const vMpTest: ObjectDirective<MpTestHTMLElement, unknown>;
|
|
23
|
+
export default vMpTest;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test identifier configuration for `v-mp-test`.
|
|
3
|
+
*
|
|
4
|
+
* Change or add attribute names here; every `v-mp-test` usage picks them up.
|
|
5
|
+
* Default component IDs follow `mp-{kebab-name}` (e.g. `mp-data-table`).
|
|
6
|
+
*/
|
|
7
|
+
/** Playwright (`data-testid`) and Cypress (`data-cy` / `data-test-cy`). Add more names as needed. */
|
|
8
|
+
export declare const MP_TEST_ATTRIBUTES: readonly ["data-testid", "data-cy", "data-test-cy"];
|
|
9
|
+
export type MpTestAttribute = (typeof MP_TEST_ATTRIBUTES)[number];
|
|
10
|
+
export declare const MP_TEST_IDS: {
|
|
11
|
+
readonly breadcrumb: "mp-breadcrumb";
|
|
12
|
+
readonly clipboard: "mp-clipboard";
|
|
13
|
+
readonly confirmationDialog: "mp-confirmation-dialog";
|
|
14
|
+
readonly confirmationDialogCancel: "mp-confirmation-dialog-cancel";
|
|
15
|
+
readonly confirmationDialogConfirm: "mp-confirmation-dialog-confirm";
|
|
16
|
+
readonly dataTable: "mp-data-table";
|
|
17
|
+
readonly dataTableFilter: "mp-data-table-filter";
|
|
18
|
+
readonly dataTableLocalSearch: "mp-data-table-local-search";
|
|
19
|
+
readonly savedFilterDialog: "mp-saved-filter-dialog";
|
|
20
|
+
readonly dialogWrapper: "mp-dialog";
|
|
21
|
+
readonly dialogCancel: "mp-dialog-cancel";
|
|
22
|
+
readonly dialogSave: "mp-dialog-save";
|
|
23
|
+
readonly drawerWrapper: "mp-drawer";
|
|
24
|
+
readonly dropdown: "mp-dropdown";
|
|
25
|
+
readonly treeDropdown: "mp-tree-dropdown";
|
|
26
|
+
readonly expandableList: "mp-expandable-list";
|
|
27
|
+
readonly filterButton: "mp-filter-button";
|
|
28
|
+
readonly multiCellValue: "mp-multi-cell-value";
|
|
29
|
+
readonly numberInput: "mp-number-input";
|
|
30
|
+
readonly number: "mp-number";
|
|
31
|
+
readonly pageTitle: "mp-page-title";
|
|
32
|
+
readonly priceDisplay: "mp-price-display";
|
|
33
|
+
readonly snackbar: "mp-snackbar";
|
|
34
|
+
readonly tableActionMenu: "mp-table-action-menu";
|
|
35
|
+
readonly tooltip: "mp-tooltip";
|
|
36
|
+
readonly gridTable: "mp-grid-table";
|
|
37
|
+
readonly accountDropdown: "mp-account-dropdown";
|
|
38
|
+
readonly appsDropdown: "mp-apps-dropdown";
|
|
39
|
+
readonly header: "mp-header";
|
|
40
|
+
readonly navigation: "mp-navigation";
|
|
41
|
+
readonly notificationDrawer: "mp-notification-drawer";
|
|
42
|
+
readonly notificationIcon: "mp-notification-icon";
|
|
43
|
+
readonly searchBar: "mp-search-bar";
|
|
44
|
+
readonly secondaryNavigation: "mp-secondary-navigation";
|
|
45
|
+
readonly timezone: "mp-timezone";
|
|
46
|
+
readonly userDropdown: "mp-user-dropdown";
|
|
47
|
+
readonly unifiedNavigation: "mp-unified-navigation";
|
|
48
|
+
readonly alertModal: "mp-alert-modal";
|
|
49
|
+
readonly onboardingBanner: "mp-onboarding-banner";
|
|
50
|
+
readonly onboardingScreenChecklists: "mp-onboarding-screen-checklists";
|
|
51
|
+
readonly button: "mp-button";
|
|
52
|
+
readonly slVueTreeNext: "mp-sl-vue-tree-next";
|
|
53
|
+
readonly stepper: "mp-stepper";
|
|
54
|
+
readonly datePicker: "mp-date-picker";
|
|
55
|
+
};
|
|
56
|
+
export type MpTestIdKey = keyof typeof MP_TEST_IDS;
|