@licklist/design 0.63.0 → 0.63.1-dev.1
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/bitbucket-pipelines.yml +0 -8
- package/dist/date-time-button/DateTimeButton.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -5
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts +4 -3
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +1 -1
- package/dist/product-set/control/utils.d.ts +5 -0
- package/dist/product-set/control/utils.d.ts.map +1 -0
- package/dist/product-set/control/utils.js +1 -0
- package/dist/product-set/form/ProductCategoriesControl.d.ts +2 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +4 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.d.ts +2 -1
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/product-set/form/StepsControl.d.ts +2 -1
- package/dist/product-set/form/StepsControl.d.ts.map +1 -1
- package/dist/product-set/form/StepsControl.js +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts +1 -0
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
- package/dist/product-set/step/StepControl.d.ts +2 -1
- package/dist/product-set/step/StepControl.d.ts.map +1 -1
- package/dist/product-set/step/StepControl.js +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
- package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +3 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
- package/dist/recurring-date-picker-input/utils.d.ts +6 -0
- package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/utils.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/sales/coupon/control/CouponFormControl.d.ts +2 -1
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +1 -1
- package/dist/sales/coupon/form/CouponFrom.d.ts +2 -2
- package/dist/sales/coupon/form/CouponFrom.d.ts.map +1 -1
- package/dist/sales/coupon/utils/index.d.ts +7 -0
- package/dist/sales/coupon/utils/index.d.ts.map +1 -0
- package/dist/sales/coupon/utils/index.js +1 -0
- package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts +1 -0
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +1 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +1 -1
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/typeahead/Typeahead.d.ts +2 -1
- package/dist/typeahead/Typeahead.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.js +1 -1
- package/dist/zone/form/ZoneForm.d.ts +2 -2
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.js +1 -1
- package/dist/zone/form/components/AvailableTimesControl.d.ts +0 -2
- package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.d.ts +2 -2
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +4 -4
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/package.json +10 -35
- package/src/date-time-button/DateTimeButton.stories.tsx +2 -1
- package/src/date-time-button/DateTimeButton.tsx +7 -5
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +14 -9
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +2 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
- package/src/product-set/control/DateAndRecurrenceInput.tsx +48 -14
- package/src/product-set/control/DateInput.tsx +2 -4
- package/src/product-set/control/ProductSetControl.stories.tsx +1 -1
- package/src/product-set/control/ProductSetControl.tsx +12 -11
- package/src/product-set/control/utils.ts +25 -0
- package/src/product-set/form/ProductCategoriesControl.tsx +8 -4
- package/src/product-set/form/ProductSetForm.stories.tsx +1 -2
- package/src/product-set/form/ProductSetForm.tsx +5 -1
- package/src/product-set/form/ProductsControl.tsx +87 -77
- package/src/product-set/form/StepsControl.tsx +11 -6
- package/src/product-set/hooks/useSortableTreeFunctions.ts +2 -0
- package/src/product-set/product/ProductControl.tsx +39 -39
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +0 -2
- package/src/product-set/step/StepControl.tsx +4 -3
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +4 -18
- package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +0 -1
- package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +13 -7
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +12 -1
- package/src/recurring-date-picker-input/utils.ts +82 -1
- package/src/sales/booking/results/BookingResults.stories.tsx +3 -2
- package/src/sales/booking/results/components/ResultCard.tsx +2 -5
- package/src/sales/coupon/control/CouponFormControl.tsx +28 -51
- package/src/sales/coupon/form/CouponFrom.tsx +5 -15
- package/src/sales/coupon/utils/index.ts +13 -0
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/setting/dashboard/DashboardSettingForm.tsx +13 -0
- package/src/sortable-tree/SortableTreeItem.tsx +1 -4
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/typeahead/Typeahead.tsx +16 -3
- package/src/zone/form/ZoneForm.tsx +3 -2
- package/src/zone/form/components/AvailableTimesControl.tsx +0 -2
- package/src/zone/form/components/ZoneControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +7 -5
- package/src/zone/form/utils/dates.ts +9 -10
- package/jest.config.js +0 -29
- package/tests/Auth/Authorizer.test.tsx +0 -194
- package/tests/Auth/Layout/UserNavDropDown.test.tsx +0 -43
- package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +0 -33
- package/tests/Auth/Login/LoginComponent.test.tsx +0 -246
- package/tests/Auth/Login/LoginFormComponent.test.tsx +0 -182
- package/tests/Auth/Register/RegisterComponent.test.tsx +0 -285
- package/tests/Auth/Register/RegisterFormComponent.test.tsx +0 -170
- package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +0 -130
- package/tests/Auth/Social/SocialCallbackComponent.test.tsx +0 -133
- package/tests/Auth/Social/SocialFormComponent.test.tsx +0 -118
- package/tests/FileUpload/FileUpload.test.tsx +0 -42
- package/tests/Notification/EmailTemplate.test.tsx +0 -82
- package/tests/ProductSet/ProductSetPopover.test.tsx +0 -40
- package/tests/Report/Report.test.tsx +0 -48
- package/tests/Sales/Coupon.test.tsx +0 -51
- package/tests/Sales/SalesAndVIews.test.tsx +0 -63
- package/tests/SnippetTemplates/SnippetTemplates.test.tsx +0 -56
- package/tests/Table/FilterHelperComponent.test.tsx +0 -88
- package/tests/Table/PaginationHelperComponent.test.tsx +0 -109
- package/tests/Table/PerPageHelperComponent.test.tsx +0 -34
- package/tests/Table/TableHelperComponent.test.tsx +0 -295
- package/tests/TipTapEditor/TipTapEditor.test.tsx +0 -28
- package/tests/__mock__/hooks/useAuthApi.ts +0 -13
- package/tests/__mock__/hooks/useAuthMock.ts +0 -13
- package/tests/__mock__/hooks/useFormMock.ts +0 -27
- package/tests/__mock__/hooks/useNotificationMock.ts +0 -13
- package/tests/__mock__/hooks/useQueryMock.ts +0 -16
- package/tests/__mock__/hooks/useSocialApiMock.ts +0 -20
- package/tests/__mock__/hooks/useTranslationMock.ts +0 -17
- package/tests/__mock__/hooks/useUserApiMock.ts +0 -18
- package/tests/__mock__/hooks/useUserMock.ts +0 -13
- package/tests/__mock__/styleMock.js +0 -1
- package/tests/__mock__/windowMock.ts +0 -5
- package/tests/packages/react-query.tsx +0 -28
- package/tests/setupTests.ts +0 -10
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as hook from "react-hook-form";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Mocks custom hook
|
|
5
|
-
* @param mockReturn
|
|
6
|
-
*/
|
|
7
|
-
const useFormMock = (mockReturn: any = {}) => {
|
|
8
|
-
const mock = hook as jest.Mocked<typeof hook>;
|
|
9
|
-
|
|
10
|
-
return mock.useForm.mockReturnValue({
|
|
11
|
-
register: jest.fn(),
|
|
12
|
-
handleSubmit: jest.fn(),
|
|
13
|
-
formState: {
|
|
14
|
-
dirtyFields: {
|
|
15
|
-
has: jest.fn(),
|
|
16
|
-
},
|
|
17
|
-
errors: jest.fn(),
|
|
18
|
-
},
|
|
19
|
-
setValue: jest.fn(),
|
|
20
|
-
getValues: jest.fn(),
|
|
21
|
-
control: jest.fn(),
|
|
22
|
-
watch: jest.fn(),
|
|
23
|
-
...mockReturn,
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default useFormMock;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as hook from "@licklist/plugins/dist/context/app/hooks/useNotification";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Mocks custom hook
|
|
5
|
-
* @param mockReturn
|
|
6
|
-
*/
|
|
7
|
-
const useNotificationMock = (mockReturn: any = null) => {
|
|
8
|
-
const mock = hook as jest.Mocked<typeof hook>;
|
|
9
|
-
|
|
10
|
-
return mock.default.mockImplementation(() => mockReturn);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default useNotificationMock;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as useUserHook from "@licklist/plugins/dist/hooks/Query/useQuery";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Mocks custom hook
|
|
5
|
-
* @param mockReturn
|
|
6
|
-
*/
|
|
7
|
-
const useQueryMock = (mockReturn: any = {}) => {
|
|
8
|
-
const useUserHookMock = useUserHook as jest.Mocked<typeof useUserHook>;
|
|
9
|
-
|
|
10
|
-
return useUserHookMock.default.mockReturnValue({
|
|
11
|
-
get: (key) => key,
|
|
12
|
-
...mockReturn,
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default useQueryMock;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as hook from "@licklist/plugins/dist/hooks/Api/useSocialApi";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Mocks custom hook
|
|
5
|
-
* @param mockReturn
|
|
6
|
-
*/
|
|
7
|
-
const useSocialApiMock = (mockReturn: any = {}) => {
|
|
8
|
-
const mock = hook as jest.Mocked<typeof hook>;
|
|
9
|
-
|
|
10
|
-
return mock.default.mockReturnValue({
|
|
11
|
-
getSocialProvider: jest.fn(),
|
|
12
|
-
redirectToProvider: jest.fn(),
|
|
13
|
-
registerFacebookCallback: jest.fn(),
|
|
14
|
-
registerTwitterCallback: jest.fn(),
|
|
15
|
-
registerCallback: jest.fn(),
|
|
16
|
-
...mockReturn,
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default useSocialApiMock;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as hook from "react-i18next";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Mocks custom hook
|
|
5
|
-
* @param mockReturn
|
|
6
|
-
*/
|
|
7
|
-
const useTranslationMock = (mockReturn: any = null) => {
|
|
8
|
-
const hookMock = hook as jest.Mocked<typeof hook>;
|
|
9
|
-
|
|
10
|
-
return hookMock.useTranslation.mockReturnValue(
|
|
11
|
-
mockReturn || {
|
|
12
|
-
t: jest.fn().mockReturnValue("test"),
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default useTranslationMock;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as hook from "@licklist/plugins/dist/hooks/Api/useUserApi";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Mocks custom hook
|
|
5
|
-
* @param mockReturn
|
|
6
|
-
*/
|
|
7
|
-
const useUserApiMock = (mockReturn: any = {}) => {
|
|
8
|
-
const mock = hook as jest.Mocked<typeof hook>;
|
|
9
|
-
|
|
10
|
-
return mock.default.mockReturnValue({
|
|
11
|
-
profile: jest.fn(),
|
|
12
|
-
login: jest.fn(),
|
|
13
|
-
setAuthorizationToken: jest.fn(),
|
|
14
|
-
...mockReturn,
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default useUserApiMock;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as useUserHook from "@licklist/plugins/dist/context/user/hooks/useUser";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Mocks custom hook
|
|
5
|
-
* @param mockReturn
|
|
6
|
-
*/
|
|
7
|
-
const useUserMock = (mockReturn: any = null) => {
|
|
8
|
-
const useUserHookMock = useUserHook as jest.Mocked<typeof useUserHook>;
|
|
9
|
-
|
|
10
|
-
return useUserHookMock.default.mockReturnValue(mockReturn);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default useUserMock;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { QueryClient, QueryClientProvider, setLogger } from "react-query";
|
|
4
|
-
|
|
5
|
-
const queryClient = new QueryClient({
|
|
6
|
-
defaultOptions: {
|
|
7
|
-
queries: {
|
|
8
|
-
// ✅ turns retries off
|
|
9
|
-
retry: false,
|
|
10
|
-
cacheTime: 0,
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
setLogger({
|
|
16
|
-
// eslint-disable-next-line no-console
|
|
17
|
-
log: console.log,
|
|
18
|
-
// eslint-disable-next-line no-console
|
|
19
|
-
warn: console.warn,
|
|
20
|
-
// ✅ no more errors on the console
|
|
21
|
-
error: () => undefined,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const wrapper = ({ children }: PropsWithChildren<unknown>) => (
|
|
25
|
-
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
export { queryClient, wrapper };
|
package/tests/setupTests.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
|
2
|
-
// allows you to do things like:
|
|
3
|
-
// expect(element).toHaveTextContent(/react/i)
|
|
4
|
-
// learn more: https://github.com/testing-library/jest-dom
|
|
5
|
-
import "@testing-library/jest-dom";
|
|
6
|
-
import "@testing-library/jest-dom/extend-expect";
|
|
7
|
-
import { configure } from "enzyme";
|
|
8
|
-
import React16Adapter from "enzyme-adapter-react-16";
|
|
9
|
-
|
|
10
|
-
configure({ adapter: new React16Adapter() });
|