@licklist/design 0.78.5-dev.0 → 0.78.5-dev.13
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/CustomDatePicker/CustomDatePicker.d.ts +10 -0
- package/dist/CustomDatePicker/CustomDatePicker.d.ts.map +1 -0
- package/dist/auth/Layout/UserNavDropDownToggle.js +3 -0
- package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts +2 -2
- package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts.map +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.d.ts +1 -1
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts +2 -2
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts.map +1 -1
- package/dist/file-upload/FileUpload.d.ts +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +1 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +2 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +2 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts +2 -2
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts +0 -5
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +81 -80
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/modals/dialog/Dialog.d.ts.map +1 -1
- package/dist/modals/dialog/Dialog.js +39 -41
- package/dist/modals/dialog/DialogContext.d.ts +2 -2
- package/dist/modals/dialog/DialogContext.d.ts.map +1 -1
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts +1 -0
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +4 -4
- package/dist/notification/email-template/form/EmailTemplateForm.d.ts +2 -1
- package/dist/notification/email-template/form/EmailTemplateForm.d.ts.map +1 -1
- package/dist/notification/email-template/form/EmailTemplateForm.js +2 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -1
- package/dist/product-set/utils/index.d.ts +1 -1
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +1 -1
- package/dist/setting/dashboard/payments/payments-modal/PaymentsModal.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +14 -20
- package/package.json +20 -18
- package/src/CustomDatePicker/CustomDatePicker.tsx +252 -0
- package/src/auth/Layout/UserNavDropDownToggle.tsx +1 -1
- package/src/custom-fields/field-set/providers/CustomFieldSetsProvider.tsx +2 -2
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -0
- package/src/events/event-card/EventCard.tsx +10 -8
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -0
- package/src/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +13 -8
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +12 -4
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +10 -6
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +18 -20
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +3 -5
- package/src/iframe/order-process/components/PaymentCard/PaymentCard.tsx +3 -3
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +103 -109
- package/src/iframe/payment/payment-page/PaymentPage.tsx +1 -1
- package/src/iframe/ryft/utils/ryft-form.ts +1 -1
- package/src/modals/dialog/Dialog.tsx +35 -36
- package/src/modals/dialog/DialogContext.tsx +8 -2
- package/src/notification/email-template/card/EmailTemplateCard.tsx +0 -2
- package/src/notification/email-template/control/EmailTemplateControl.tsx +7 -5
- package/src/notification/email-template/form/EmailTemplateForm.tsx +3 -0
- package/src/product-set/form/ProductSetForm.tsx +2 -1
- package/src/product-set/utils/index.ts +15 -14
- package/src/recurrence-input/RecurrenceInput.tsx +4 -3
- package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +1 -0
- package/src/snippet/snippet-template/preview/Preview.tsx +6 -9
- package/yarn.lock +694 -724
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogContext.d.ts","sourceRoot":"","sources":["../../../src/modals/dialog/DialogContext.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DialogContext.d.ts","sourceRoot":"","sources":["../../../src/modals/dialog/DialogContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EAClB,MAAM,OAAO,CAAA;AAEd,UAAU,cAAc;IACtB,aAAa,EAAE,OAAO,CAAA;IACtB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,cAAc,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAA;IAClC,UAAU,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAA;IAC9B,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,eAAe,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED,eAAO,MAAM,aAAa,yCAQxB,CAAA;AAEF,eAAO,MAAM,qBAAqB,iBAAkB,iBAAiB,4CAoDpE,CAAA;AAED,eAAO,MAAM,gBAAgB,sBAAkC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailTemplateCard.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/card/EmailTemplateCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAKzG,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAiB,EACjB,QAAgB,EAChB,aAAoB,EACpB,IAAI,GACL,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"EmailTemplateCard.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/card/EmailTemplateCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAKzG,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAiB,EACjB,QAAgB,EAChB,aAAoB,EACpB,IAAI,GACL,EAAE,sBAAsB,2CAkDxB"}
|
|
@@ -7,6 +7,7 @@ export interface EmailTemplateControlProps {
|
|
|
7
7
|
meta: string;
|
|
8
8
|
defaultAttachments?: Attachment[];
|
|
9
9
|
notificationTypes?: NotificationType[];
|
|
10
|
+
waiverType?: boolean;
|
|
10
11
|
getDefaultTemplateMetaByType?: (type?: NotificationType | null) => string;
|
|
11
12
|
}
|
|
12
13
|
export declare const EmailTemplateControl: import("react").ForwardRefExoticComponent<EmailTemplateControlProps & import("react").RefAttributes<unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailTemplateControl.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/control/EmailTemplateControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,cAAc,EAEf,MAAM,sEAAsE,CAAA;AAG7E,OAAO,EAAE,UAAU,EAAE,MAAM,kEAAkE,CAAA;AAM7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAMzG,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,UAAU,EAAE,CAAA;IACjC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC,4BAA4B,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,MAAM,CAAA;CAC1E;AAED,eAAO,MAAM,oBAAoB,+
|
|
1
|
+
{"version":3,"file":"EmailTemplateControl.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/control/EmailTemplateControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,cAAc,EAEf,MAAM,sEAAsE,CAAA;AAG7E,OAAO,EAAE,UAAU,EAAE,MAAM,kEAAkE,CAAA;AAM7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,CAAA;AAMzG,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,UAAU,EAAE,CAAA;IACjC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,4BAA4B,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,MAAM,CAAA;CAC1E;AAED,eAAO,MAAM,oBAAoB,+GAuahC,CAAA"}
|
|
@@ -234,7 +234,7 @@ function _ts_generator(thisArg, body) {
|
|
|
234
234
|
}
|
|
235
235
|
var EDITOR_DESIGN_UPDATED = 'design:updated';
|
|
236
236
|
var EmailTemplateControl = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
237
|
-
var setIsLoading = param.setIsLoading, meta = param.meta, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_defaultAttachments = param.defaultAttachments, defaultAttachments = _param_defaultAttachments === void 0 ? [] : _param_defaultAttachments, _param_notificationTypes = param.notificationTypes, notificationTypes = _param_notificationTypes === void 0 ? [] : _param_notificationTypes, getDefaultTemplateMetaByType = param.getDefaultTemplateMetaByType;
|
|
237
|
+
var setIsLoading = param.setIsLoading, meta = param.meta, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_defaultAttachments = param.defaultAttachments, defaultAttachments = _param_defaultAttachments === void 0 ? [] : _param_defaultAttachments, _param_notificationTypes = param.notificationTypes, notificationTypes = _param_notificationTypes === void 0 ? [] : _param_notificationTypes, _param_waiverType = param.waiverType, waiverType = _param_waiverType === void 0 ? false : _param_waiverType, getDefaultTemplateMetaByType = param.getDefaultTemplateMetaByType;
|
|
238
238
|
var _errors_type, _errors_name, _errors_subject, _errors_body;
|
|
239
239
|
var t = useTranslation([
|
|
240
240
|
'Design'
|
|
@@ -476,7 +476,7 @@ var EmailTemplateControl = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
476
476
|
]
|
|
477
477
|
})
|
|
478
478
|
}),
|
|
479
|
-
/*#__PURE__*/ jsx(Row, {
|
|
479
|
+
!waiverType && /*#__PURE__*/ jsx(Row, {
|
|
480
480
|
children: /*#__PURE__*/ jsxs(Form.Group, {
|
|
481
481
|
as: Col,
|
|
482
482
|
children: [
|
|
@@ -578,7 +578,7 @@ var EmailTemplateControl = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
578
578
|
}
|
|
579
579
|
// should show dropdown only if user want to include PDF file
|
|
580
580
|
if (option.type === OPTION_TYPE.files_selector) {
|
|
581
|
-
var fileSelectors = JSON.parse(option.defaultValue);
|
|
581
|
+
var fileSelectors = (option === null || option === void 0 ? void 0 : option.defaultValue) ? JSON.parse(option.defaultValue) : '';
|
|
582
582
|
var fileNames = Object.values(fileSelectors);
|
|
583
583
|
var fileKeys = Object.keys(fileSelectors);
|
|
584
584
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
@@ -622,7 +622,7 @@ var EmailTemplateControl = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
622
622
|
]
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
|
-
if (option.type === OPTION_TYPE.days_reminder) {
|
|
625
|
+
if (option.type === OPTION_TYPE.days_reminder || option.type === OPTION_TYPE.waiver_reminder) {
|
|
626
626
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
627
627
|
children: [
|
|
628
628
|
/*#__PURE__*/ jsx(Form.Label, {
|
|
@@ -31,9 +31,10 @@ export interface EmailTemplateProps extends HasPermissionProp {
|
|
|
31
31
|
placeholders?: NotificationPlaceholder[];
|
|
32
32
|
options?: TemplateOption[];
|
|
33
33
|
serverErrors?: ServerError;
|
|
34
|
+
waiverType?: boolean;
|
|
34
35
|
notificationTypes?: NotificationType[];
|
|
35
36
|
getDefaultTemplateMetaByType?: (type?: NotificationType | null) => string;
|
|
36
37
|
onTypeChange?: (type?: NotificationType | null) => void;
|
|
37
38
|
}
|
|
38
|
-
export declare const EmailTemplateForm: ({ defaultValues, onSubmitSave, onSubmitSaveAndSend, hasPermission, placeholders, options, serverErrors, notificationTypes, getDefaultTemplateMetaByType, onTypeChange, }: EmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const EmailTemplateForm: ({ defaultValues, onSubmitSave, onSubmitSaveAndSend, hasPermission, placeholders, options, serverErrors, waiverType, notificationTypes, getDefaultTemplateMetaByType, onTypeChange, }: EmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
40
|
//# sourceMappingURL=EmailTemplateForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailTemplateForm.d.ts","sourceRoot":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ClB,YAAY,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACnD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAC3D,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,YAAY,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACxC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC,4BAA4B,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,MAAM,CAAA;IACzE,YAAY,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAA;CACxD;AAED,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"EmailTemplateForm.d.ts","sourceRoot":"","sources":["../../../../src/notification/email-template/form/EmailTemplateForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAIzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+EAA+E,CAAA;AACvH,OAAO,EAAE,cAAc,EAAE,MAAM,sEAAsE,CAAA;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2EAA2E,CAAA;AAC/G,OAAO,EAAE,kBAAkB,EAAE,MAAM,0EAA0E,CAAA;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,kEAAkE,CAAA;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qEAAqE,CAAA;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,wEAAwE,C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108,7 +108,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
108
108
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
109
109
|
}
|
|
110
110
|
var EmailTemplateForm = function(param) {
|
|
111
|
-
var defaultValues = param.defaultValues, onSubmitSave = param.onSubmitSave, onSubmitSaveAndSend = param.onSubmitSaveAndSend, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, _param_placeholders = param.placeholders, placeholders = _param_placeholders === void 0 ? [] : _param_placeholders, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, serverErrors = param.serverErrors, _param_notificationTypes = param.notificationTypes, notificationTypes = _param_notificationTypes === void 0 ? [] : _param_notificationTypes, getDefaultTemplateMetaByType = param.getDefaultTemplateMetaByType, onTypeChange = param.onTypeChange;
|
|
111
|
+
var defaultValues = param.defaultValues, onSubmitSave = param.onSubmitSave, onSubmitSaveAndSend = param.onSubmitSaveAndSend, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, _param_placeholders = param.placeholders, placeholders = _param_placeholders === void 0 ? [] : _param_placeholders, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, serverErrors = param.serverErrors, waiverType = param.waiverType, _param_notificationTypes = param.notificationTypes, notificationTypes = _param_notificationTypes === void 0 ? [] : _param_notificationTypes, getDefaultTemplateMetaByType = param.getDefaultTemplateMetaByType, onTypeChange = param.onTypeChange;
|
|
112
112
|
var t = useTranslation('Design').t;
|
|
113
113
|
var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
|
|
114
114
|
var emailEditorRef = useRef(null);
|
|
@@ -143,6 +143,7 @@ var EmailTemplateForm = function(param) {
|
|
|
143
143
|
children: [
|
|
144
144
|
/*#__PURE__*/ jsx(EmailTemplateControl, {
|
|
145
145
|
ref: emailEditorRef,
|
|
146
|
+
waiverType: waiverType,
|
|
146
147
|
setIsLoading: setIsLoading,
|
|
147
148
|
meta: (defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.meta) || null,
|
|
148
149
|
defaultAttachments: (defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.attachments) || [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAKzF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAE1F,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAA;AAGrF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAQ3D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAA;CACnB;AACD,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;CACX;AACD,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,cAAc,EACd,uBAAuB;IACzB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,mBAAmB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAC3D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAC3D,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAA;IAC/B,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5B,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,WAAW,EAAE,CAAA;CACjC;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,cAAsB,EACtB,YAAiB,EACjB,4BAA4B,EAC5B,KAAK,EACL,cAAc,EACd,SAAS,EACT,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,mBAAmB,2CAkKrB"}
|
|
@@ -15,7 +15,6 @@ import 'react-bootstrap/Row';
|
|
|
15
15
|
import 'react-bootstrap/Col';
|
|
16
16
|
import '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
17
17
|
import '@licklist/plugins/dist/services/Form/HookFormService';
|
|
18
|
-
import 'react-router-dom';
|
|
19
18
|
import '../../../calendar/Calendar.js';
|
|
20
19
|
import 'clsx';
|
|
21
20
|
import 'luxon';
|
|
@@ -24,6 +23,7 @@ import '../../../tiptap-editor/TipTapEditor.js';
|
|
|
24
23
|
import '@licklist/core/dist/Config';
|
|
25
24
|
import '../../../iframe/event/event-card/IframeEventCardSkeleton.js';
|
|
26
25
|
import 'react-icons/fa';
|
|
26
|
+
import 'react-router-dom';
|
|
27
27
|
import '../../../static/index.js';
|
|
28
28
|
import '../../../iframe/page/Page.js';
|
|
29
29
|
import '../../../iframe/page/components/PageBody/PageBody.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmailTemplate } from '@licklist/core/dist/DataMapper/Notification/EmailTemplateDataMapper';
|
|
2
2
|
import { SmsTemplate } from '@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper';
|
|
3
|
-
import { TFunction } from '
|
|
3
|
+
import { TFunction } from 'i18next';
|
|
4
4
|
import { UseFormSetError } from 'react-hook-form';
|
|
5
5
|
import { ProductSet } from '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper';
|
|
6
6
|
import { TemplateItem } from '../control/ProductSetControl';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/product-set/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACnG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAA;AAG/F,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/product-set/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACnG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAA;AAG/F,OAAO,EAAE,SAAS,EAAE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AS,EAAW,MAAM,OAAO,CAAA;AAWjD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,gBAAgB,CAAC,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAgB,EAChB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,gBAAmC,GACpC,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"RecurrenceInput.d.ts","sourceRoot":"","sources":["../../src/recurrence-input/RecurrenceInput.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,SAAS,EAAW,MAAM,OAAO,CAAA;AAWjD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,gBAAgB,CAAC,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAgB,EAChB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,gBAAmC,GACpC,EAAE,oBAAoB,2CA0EtB"}
|
|
@@ -117,7 +117,7 @@ function RecurrenceInput(param) {
|
|
|
117
117
|
})), 2), state = _useReducer[0], updateState = _useReducer[1];
|
|
118
118
|
useEffect(// TODO: unhardcode timezone
|
|
119
119
|
function() {
|
|
120
|
-
|
|
120
|
+
onChange(RRule.optionsToString(_object_spread({
|
|
121
121
|
freq: state.freq,
|
|
122
122
|
count: state.count,
|
|
123
123
|
interval: state.interval,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentsModal.d.ts","sourceRoot":"","sources":["../../../../../src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAC9C,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,MAAM,GACP,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"PaymentsModal.d.ts","sourceRoot":"","sources":["../../../../../src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAC9C,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,MAAM,GACP,EAAE,kBAAkB,2CAiCpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preview.d.ts","sourceRoot":"","sources":["../../../../src/snippet/snippet-template/preview/Preview.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Preview.d.ts","sourceRoot":"","sources":["../../../../src/snippet/snippet-template/preview/Preview.tsx"],"names":[],"mappings":"AAiCA,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,IAAI,CAAA;IAC1B,cAAc,EAAE,OAAO,CAAA;CACxB;AAED,wBAAgB,OAAO,CAAC,EACtB,cAAc,EACd,cAAsB,GACvB,EAAE,YAAY,2CA8Vd"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useContext } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
5
4
|
import { Button } from 'react-bootstrap';
|
|
6
5
|
import { SNIPPET_TEMPLATE_TYPE_VENUE_MAP, SNIPPET_TEMPLATE_TYPE_EVENT_LIST } from '@licklist/core/dist/DataMapper/Provider/SnippetTemplateDataMapper';
|
|
7
6
|
import { defaultStartDay, Calendar } from '../../../calendar/Calendar.js';
|
|
@@ -19,6 +18,7 @@ import { PageHeader } from '../../../iframe/page/components/PageHeader/PageHeade
|
|
|
19
18
|
import 'react-icons/fa';
|
|
20
19
|
import 'react-swipeable';
|
|
21
20
|
import 'react-bootstrap/Button';
|
|
21
|
+
import 'react-router-dom';
|
|
22
22
|
import '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
23
23
|
import '@licklist/plugins/dist/services/Media/MediaService';
|
|
24
24
|
import '../../../tiptap-editor/TipTapEditor.js';
|
|
@@ -154,25 +154,19 @@ function Preview(param) {
|
|
|
154
154
|
/*#__PURE__*/ jsx(Timer, {
|
|
155
155
|
timer: 600
|
|
156
156
|
}),
|
|
157
|
-
/*#__PURE__*/ jsx(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
pathname: '/step2',
|
|
171
|
-
key: '/step2',
|
|
172
|
-
name: 'Cheese'
|
|
173
|
-
}
|
|
174
|
-
]
|
|
175
|
-
})
|
|
157
|
+
/*#__PURE__*/ jsx(NavigationSteps, {
|
|
158
|
+
steps: [
|
|
159
|
+
{
|
|
160
|
+
pathname: '/step1',
|
|
161
|
+
key: '/step1',
|
|
162
|
+
name: 'Burger'
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
pathname: '/step2',
|
|
166
|
+
key: '/step2',
|
|
167
|
+
name: 'Cheese'
|
|
168
|
+
}
|
|
169
|
+
]
|
|
176
170
|
})
|
|
177
171
|
]
|
|
178
172
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.78.5-dev.
|
|
3
|
+
"version": "0.78.5-dev.13",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,17 +42,18 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.36.1-dev.
|
|
45
|
+
"@licklist/core": "0.36.1-dev.6",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
|
-
"@licklist/plugins": "0.36.4-dev.
|
|
47
|
+
"@licklist/plugins": "0.36.4-dev.2",
|
|
48
48
|
"clsx": "2.1.1",
|
|
49
|
+
"i18next": "25.3.2",
|
|
49
50
|
"lodash": "4.17.21",
|
|
50
51
|
"luxon": "3.5.0",
|
|
51
|
-
"react": "
|
|
52
|
-
"react-dom": "
|
|
52
|
+
"react": "18.3.1",
|
|
53
|
+
"react-dom": "18.3.1",
|
|
53
54
|
"react-hook-form": "7.52.2",
|
|
54
|
-
"react-i18next": "
|
|
55
|
-
"react-intl": "
|
|
55
|
+
"react-i18next": "15.6.1",
|
|
56
|
+
"react-intl": "7.1.11",
|
|
56
57
|
"react-query": "3.34.12",
|
|
57
58
|
"react-router-dom": "6.30.1"
|
|
58
59
|
},
|
|
@@ -63,9 +64,9 @@
|
|
|
63
64
|
"@dnd-kit/utilities": "2.0.0",
|
|
64
65
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
65
66
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
66
|
-
"@licklist/core": "0.36.
|
|
67
|
+
"@licklist/core": "0.36.1-dev.6",
|
|
67
68
|
"@licklist/eslint-config": "0.5.6",
|
|
68
|
-
"@licklist/plugins": "0.36.
|
|
69
|
+
"@licklist/plugins": "0.36.4-dev.2",
|
|
69
70
|
"@mantine/core": "6.0.22",
|
|
70
71
|
"@mantine/hooks": "6.0.22",
|
|
71
72
|
"@mdx-js/react": "1.6.22",
|
|
@@ -101,22 +102,23 @@
|
|
|
101
102
|
"emojibase-data": "7.0.1",
|
|
102
103
|
"emojibase-regex": "6.0.1",
|
|
103
104
|
"framer-motion": "4.1.17",
|
|
105
|
+
"i18next": "25.3.2",
|
|
104
106
|
"konva": "6.0.0",
|
|
105
107
|
"lodash": "4.17.21",
|
|
106
108
|
"luxon": "3.5.0",
|
|
107
109
|
"moment": "2.29.1",
|
|
108
|
-
"react": "
|
|
110
|
+
"react": "18.3.1",
|
|
109
111
|
"react-bootstrap": "1.6.1",
|
|
110
112
|
"react-color": "2.19.3",
|
|
111
113
|
"react-date-range": "1.4.0",
|
|
112
|
-
"react-dom": "
|
|
114
|
+
"react-dom": "18.3.1",
|
|
113
115
|
"react-email-editor": "1.6.1",
|
|
114
116
|
"react-highlighter": "0.4.3",
|
|
115
117
|
"react-hook-form": "7.52.2",
|
|
116
|
-
"react-i18next": "
|
|
118
|
+
"react-i18next": "15.6.1",
|
|
117
119
|
"react-icons": "5.3.0",
|
|
118
|
-
"react-intl": "
|
|
119
|
-
"react-konva": "
|
|
120
|
+
"react-intl": "7.1.11",
|
|
121
|
+
"react-konva": "18.2.12",
|
|
120
122
|
"react-loader": "2.4.7",
|
|
121
123
|
"react-loading-skeleton": "3.3.1",
|
|
122
124
|
"react-overlays": "4.1.1",
|
|
@@ -149,10 +151,10 @@
|
|
|
149
151
|
"@types/luxon": "3.4.2",
|
|
150
152
|
"@types/mdx-js__react": "1.5.3",
|
|
151
153
|
"@types/node": "20.9.0",
|
|
152
|
-
"@types/react": "
|
|
154
|
+
"@types/react": "18.3.12",
|
|
153
155
|
"@types/react-bootstrap": "1.0.1",
|
|
154
156
|
"@types/react-date-range": "1.4.9",
|
|
155
|
-
"@types/react-dom": "
|
|
157
|
+
"@types/react-dom": "18.3.1",
|
|
156
158
|
"@types/react-email-editor": "1.1.7",
|
|
157
159
|
"@types/react-loader": "2.4.4",
|
|
158
160
|
"@types/react-phone-number-input": "3.0.6",
|
|
@@ -196,8 +198,8 @@
|
|
|
196
198
|
"vite-tsconfig-paths": "5.0.1"
|
|
197
199
|
},
|
|
198
200
|
"resolutions": {
|
|
199
|
-
"@types/react": "
|
|
200
|
-
"@types/react-dom": "
|
|
201
|
+
"@types/react": "18.3.12",
|
|
202
|
+
"@types/react-dom": "18.3.1"
|
|
201
203
|
},
|
|
202
204
|
"lint-staged": {
|
|
203
205
|
"*.{ts,tsx}": [
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { TextInput } from '@mantine/core'
|
|
2
|
+
import { useEffect, useState } from 'react'
|
|
3
|
+
import { Controller, useFormContext } from 'react-hook-form'
|
|
4
|
+
import { DateTime } from 'luxon'
|
|
5
|
+
import { useTranslation } from 'react-i18next'
|
|
6
|
+
|
|
7
|
+
type CustomDatePickerProps = {
|
|
8
|
+
name: string
|
|
9
|
+
error?: string
|
|
10
|
+
label?: string
|
|
11
|
+
showAge?: boolean
|
|
12
|
+
required?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function CustomDatePicker({
|
|
16
|
+
name,
|
|
17
|
+
error,
|
|
18
|
+
showAge = true,
|
|
19
|
+
required = true
|
|
20
|
+
}: CustomDatePickerProps) {
|
|
21
|
+
const { t } = useTranslation()
|
|
22
|
+
const { control, setValue, watch, getValues, trigger, formState } = useFormContext()
|
|
23
|
+
const [age, setAge] = useState<number | null>(null)
|
|
24
|
+
const [localError, setLocalError] = useState<string | null>(null)
|
|
25
|
+
|
|
26
|
+
// Get current field values
|
|
27
|
+
const day = watch(`${name}_day`) || ''
|
|
28
|
+
const month = watch(`${name}_month`) || ''
|
|
29
|
+
const year = watch(`${name}_year`) || ''
|
|
30
|
+
|
|
31
|
+
// Initialize values from existing date
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const existingDate = getValues(name)
|
|
34
|
+
|
|
35
|
+
if (existingDate instanceof Date && !day && !month && !year) {
|
|
36
|
+
const dateTime = DateTime.fromJSDate(existingDate)
|
|
37
|
+
if (dateTime.isValid) {
|
|
38
|
+
setValue(`${name}_day`, dateTime.day.toString().padStart(2, '0'))
|
|
39
|
+
setValue(`${name}_month`, dateTime.month.toString().padStart(2, '0'))
|
|
40
|
+
setValue(`${name}_year`, dateTime.year.toString())
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, [name, setValue, getValues, day, month, year])
|
|
44
|
+
|
|
45
|
+
// Check for empty fields after submit attempt
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (formState.isSubmitted && required) {
|
|
48
|
+
const hasEmptyFields = !day || !month || !year
|
|
49
|
+
|
|
50
|
+
if (hasEmptyFields) {
|
|
51
|
+
setLocalError(t('Validation:fieldRequired', { attribute: t('App:dateOfBirth') }))
|
|
52
|
+
// Set the main field to null to trigger form validation
|
|
53
|
+
setValue(name, null, { shouldValidate: true })
|
|
54
|
+
} else {
|
|
55
|
+
setLocalError(null)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}, [formState.isSubmitted, day, month, year, required, name, setValue, t])
|
|
59
|
+
|
|
60
|
+
// Calculate age and validate date when all fields are filled
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (day && month && year) {
|
|
63
|
+
try {
|
|
64
|
+
// Create a date object
|
|
65
|
+
const dateObj = DateTime.fromObject({
|
|
66
|
+
day: parseInt(day, 10),
|
|
67
|
+
month: parseInt(month, 10),
|
|
68
|
+
year: parseInt(year, 10)
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
// Only proceed if date is valid
|
|
72
|
+
if (dateObj.isValid) {
|
|
73
|
+
// Set the main field value
|
|
74
|
+
setValue(name, dateObj.toJSDate(), { shouldValidate: true })
|
|
75
|
+
setLocalError(null)
|
|
76
|
+
|
|
77
|
+
// Calculate age
|
|
78
|
+
if (showAge) {
|
|
79
|
+
const now = DateTime.now()
|
|
80
|
+
const diff = now.diff(dateObj, 'years')
|
|
81
|
+
setAge(Math.floor(diff.years))
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
setLocalError(t('Validation:fieldInvalid', { attribute: t('App:dateOfBirth') }))
|
|
85
|
+
setValue(name, null, { shouldValidate: true })
|
|
86
|
+
setAge(null)
|
|
87
|
+
}
|
|
88
|
+
} catch (err) {
|
|
89
|
+
// If any parsing fails, just reset the age display
|
|
90
|
+
setLocalError(t('Validation:fieldInvalid', { attribute: t('App:dateOfBirth') }))
|
|
91
|
+
setValue(name, null, { shouldValidate: true })
|
|
92
|
+
setAge(null)
|
|
93
|
+
}
|
|
94
|
+
} else if (formState.isSubmitted && required) {
|
|
95
|
+
// If form was submitted and fields are required but not all filled
|
|
96
|
+
setLocalError(t('Validation:fieldRequired', { attribute: t('App:dateOfBirth') }))
|
|
97
|
+
setValue(name, null, { shouldValidate: true })
|
|
98
|
+
setAge(null)
|
|
99
|
+
} else {
|
|
100
|
+
// Reset if not all fields are filled but not submitted yet
|
|
101
|
+
setValue(name, null, { shouldValidate: false })
|
|
102
|
+
setAge(null)
|
|
103
|
+
}
|
|
104
|
+
}, [day, month, year, name, setValue, showAge, formState.isSubmitted, required, t])
|
|
105
|
+
|
|
106
|
+
// After user completes all fields, validate the form
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
if (day && month && year) {
|
|
109
|
+
trigger(name)
|
|
110
|
+
}
|
|
111
|
+
}, [day, month, year, name, trigger])
|
|
112
|
+
|
|
113
|
+
// Display either the form error or our local error
|
|
114
|
+
const displayError = error || localError
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<div className="tw-w-full">
|
|
118
|
+
<div className="tw-flex tw-flex-col">
|
|
119
|
+
<div className="tw-mb-2 tw-flex tw-items-center tw-justify-between">
|
|
120
|
+
<label className="tw-font-semibold">
|
|
121
|
+
{t('App:dateOfBirth')}
|
|
122
|
+
{required && <span className="tw-ml-1 tw-text-red-500"></span>}
|
|
123
|
+
</label>
|
|
124
|
+
{age !== null && (
|
|
125
|
+
<span className="tw-text-sm tw-text-gray-600">
|
|
126
|
+
{t('App:Age')}: {age}
|
|
127
|
+
</span>
|
|
128
|
+
)}
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div className="tw-flex tw-flex-row tw-gap-4">
|
|
132
|
+
<div className="tw-w-1/3">
|
|
133
|
+
<label className="tw-mb-1 tw-block tw-text-sm">{t('App:Day')}</label>
|
|
134
|
+
<Controller
|
|
135
|
+
control={control}
|
|
136
|
+
name={`${name}_day`}
|
|
137
|
+
defaultValue=""
|
|
138
|
+
render={({ field }) => (
|
|
139
|
+
<TextInput
|
|
140
|
+
{...field}
|
|
141
|
+
value={field.value || ''}
|
|
142
|
+
placeholder="DD"
|
|
143
|
+
maxLength={2}
|
|
144
|
+
error={!!displayError}
|
|
145
|
+
onChange={(e) => {
|
|
146
|
+
const value = e.target.value.replace(/[^0-9]/g, '')
|
|
147
|
+
field.onChange(value)
|
|
148
|
+
}}
|
|
149
|
+
onBlur={(e) => {
|
|
150
|
+
// Validate and format on blur
|
|
151
|
+
let value = e.target.value.replace(/[^0-9]/g, '')
|
|
152
|
+
if (value) {
|
|
153
|
+
const num = parseInt(value, 10)
|
|
154
|
+
if (num < 1) value = '01'
|
|
155
|
+
else if (num > 31) value = '31'
|
|
156
|
+
else value = num.toString().padStart(2, '0')
|
|
157
|
+
}
|
|
158
|
+
field.onChange(value)
|
|
159
|
+
}}
|
|
160
|
+
/>
|
|
161
|
+
)}
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div className="tw-w-1/3">
|
|
166
|
+
<label className="tw-mb-1 tw-block tw-text-sm">{t('App:Month')}</label>
|
|
167
|
+
<Controller
|
|
168
|
+
control={control}
|
|
169
|
+
name={`${name}_month`}
|
|
170
|
+
defaultValue=""
|
|
171
|
+
render={({ field }) => (
|
|
172
|
+
<TextInput
|
|
173
|
+
{...field}
|
|
174
|
+
value={field.value || ''}
|
|
175
|
+
placeholder="MM"
|
|
176
|
+
maxLength={2}
|
|
177
|
+
error={!!displayError}
|
|
178
|
+
onChange={(e) => {
|
|
179
|
+
const value = e.target.value.replace(/[^0-9]/g, '')
|
|
180
|
+
field.onChange(value)
|
|
181
|
+
}}
|
|
182
|
+
onBlur={(e) => {
|
|
183
|
+
// Validate and format on blur
|
|
184
|
+
let value = e.target.value.replace(/[^0-9]/g, '')
|
|
185
|
+
if (value) {
|
|
186
|
+
const num = parseInt(value, 10)
|
|
187
|
+
if (num < 1) value = '01'
|
|
188
|
+
else if (num > 12) value = '12'
|
|
189
|
+
else value = num.toString().padStart(2, '0')
|
|
190
|
+
}
|
|
191
|
+
field.onChange(value)
|
|
192
|
+
}}
|
|
193
|
+
/>
|
|
194
|
+
)}
|
|
195
|
+
/>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<div className="tw-w-1/3">
|
|
199
|
+
<label className="tw-mb-1 tw-block tw-text-sm">{t('App:Year')}</label>
|
|
200
|
+
<Controller
|
|
201
|
+
control={control}
|
|
202
|
+
name={`${name}_year`}
|
|
203
|
+
defaultValue=""
|
|
204
|
+
render={({ field }) => (
|
|
205
|
+
<TextInput
|
|
206
|
+
{...field}
|
|
207
|
+
value={field.value || ''}
|
|
208
|
+
placeholder="YYYY"
|
|
209
|
+
maxLength={4}
|
|
210
|
+
error={!!displayError}
|
|
211
|
+
onChange={(e) => {
|
|
212
|
+
const value = e.target.value.replace(/[^0-9]/g, '')
|
|
213
|
+
field.onChange(value)
|
|
214
|
+
}}
|
|
215
|
+
onBlur={(e) => {
|
|
216
|
+
// Validate on blur
|
|
217
|
+
const value = e.target.value.replace(/[^0-9]/g, '')
|
|
218
|
+
if (value) {
|
|
219
|
+
const num = parseInt(value, 10)
|
|
220
|
+
const currentYear = new Date().getFullYear()
|
|
221
|
+
if (num > currentYear) {
|
|
222
|
+
field.onChange(currentYear.toString())
|
|
223
|
+
} else if (num < 1900) {
|
|
224
|
+
field.onChange('1900')
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}}
|
|
228
|
+
/>
|
|
229
|
+
)}
|
|
230
|
+
/>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
{/* Hidden field to store the actual date value */}
|
|
236
|
+
<Controller
|
|
237
|
+
control={control}
|
|
238
|
+
name={name}
|
|
239
|
+
defaultValue={null}
|
|
240
|
+
rules={{
|
|
241
|
+
validate: value => {
|
|
242
|
+
if (required && !value) {
|
|
243
|
+
return t('Validation:fieldRequired', { attribute: t('App:dateOfBirth') })
|
|
244
|
+
}
|
|
245
|
+
return true
|
|
246
|
+
}
|
|
247
|
+
}}
|
|
248
|
+
render={() => <input type="hidden" />}
|
|
249
|
+
/>
|
|
250
|
+
</div>
|
|
251
|
+
)
|
|
252
|
+
}
|
|
@@ -13,7 +13,7 @@ function UserNavDropDownToggle(props: UserNavDropDownToggleProps) {
|
|
|
13
13
|
return (
|
|
14
14
|
<>
|
|
15
15
|
<span className='header-user-name mr-2 d-none d-lg-inline text-gray-600 small'>
|
|
16
|
-
<Trans t={t} i18nKey='userPromo'>
|
|
16
|
+
<Trans t={t} i18nKey='userPromo' values={{ name: user?.first_name }}>
|
|
17
17
|
Hi, {{ name: user?.first_name }}
|
|
18
18
|
</Trans>
|
|
19
19
|
</span>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren, useState } from 'react'
|
|
2
2
|
import { CustomFieldSetsContext, ValuesType } from '../contexts'
|
|
3
3
|
|
|
4
|
-
export const CustomFieldSetsProvider
|
|
4
|
+
export const CustomFieldSetsProvider = ({ children }: PropsWithChildren) => {
|
|
5
5
|
const [values, setValues] = useState<ValuesType>({})
|
|
6
6
|
|
|
7
7
|
return (
|