@licklist/design 0.44.485-dev.66 → 0.44.485-dev.67
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/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts.map +1 -1
- package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
- package/dist/styles/events/EventVenueMap.scss +1 -1
- package/package.json +1 -1
- package/src/events/edit-event-modal/IntervalInput.tsx +3 -1
- package/src/product-set/hooks/useSortableTreeFunctions.ts +1 -1
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -1
- package/src/provider/constants.ts +1 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +18 -1
- package/src/sortable-tree/SortableTreeItem.tsx +1 -1
- package/src/styles/events/EventVenueMap.scss +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntervalInput.d.ts","sourceRoot":"","sources":["../../../src/events/edit-event-modal/IntervalInput.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAC;AAIzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,UAAU,kBAAkB;IAC1B,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"IntervalInput.d.ts","sourceRoot":"","sources":["../../../src/events/edit-event-modal/IntervalInput.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAC;AAIzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,UAAU,kBAAkB;IAC1B,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,EAAE,kBAAkB,eAkJpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderDetailsInput.d.ts","sourceRoot":"","sources":["../../../src/provider/provider-details-input/ProviderDetailsInput.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAE7E,OAAO,EAAa,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAEL,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;CACxB,GAAG,wBAAwB,CAAC;AAE7B,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;CAClD,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,EACnC,gBAAqB,EACrB,SAAc,GACf,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"ProviderDetailsInput.d.ts","sourceRoot":"","sources":["../../../src/provider/provider-details-input/ProviderDetailsInput.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAE7E,OAAO,EAAa,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAEL,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;CACxB,GAAG,wBAAwB,CAAC;AAE7B,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;CAClD,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,EACnC,gBAAqB,EACrB,SAAc,GACf,EAAE,yBAAyB,eA8J3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),t=require("react"),i=e(t),n=require("react-i18next"),a=e(require("@licklist/plugins/dist/context/app/hooks/useNotification")),o=require("react-bootstrap"),l=require("react-hook-form"),s=e(require("@licklist/plugins/dist/services/Form/HookFormService")),
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),t=require("react"),i=e(t),n=require("react-i18next"),a=e(require("@licklist/plugins/dist/context/app/hooks/useNotification")),o=require("react-bootstrap"),l=require("react-hook-form"),s=e(require("@licklist/plugins/dist/services/Form/HookFormService")),d=require("@react-aria/utils"),m=require("../../typeahead/Typeahead.js"),u=require("../constants.js"),c=require("../provider-links-input/ProviderLinksInput.js");exports.ProviderDetailsInput=function(e){var p,E,g,v,F,I,h=e.companiesOptions,b=void 0===h?[]:h,C=e.linkTypes,_=void 0===C?[]:C,q=l.useFormContext(),y=q.register,T=q.watch,f=q.trigger,D=q.formState.errors,A=n.useTranslation(["App","Design","Validation"]).t,k=a(),R=d.useId(),M=d.useId(),S=d.useId(),L=d.useId(),w=d.useId(),G=d.useId(),H=T("description");return t.useEffect((function(){u.MAX_DESCRIPTION_CHARACTERS_LENGTH>H.length||(f("description"),k.danger({title:A("App:warning"),message:A("Validation:descriptionTooManyCharactersMessage",{max:u.MAX_DESCRIPTION_CHARACTERS_LENGTH})}))}),[H.length]),i.createElement(i.Fragment,null,i.createElement(o.Form.Group,{controlId:R},i.createElement(o.Form.Label,null,A("Design:name")),i.createElement(o.Form.Control,r.__assign({},y("name",{required:A("Validation:fieldRequired",{attribute:A("Design:name")})}),{name:"name",required:!0,isInvalid:Boolean(D.name)})),i.createElement(o.Form.Control.Feedback,{type:"invalid"},s.hasError(D.name,"required")&&(null===(p=D.name)||void 0===p?void 0:p.message))),i.createElement(o.Form.Group,{controlId:M},i.createElement(o.Form.Label,null,A("Design:description")),i.createElement(o.Form.Control,r.__assign({},y("description",{validate:function(e){return!(e.length>u.MAX_DESCRIPTION_CHARACTERS_LENGTH)||A("Validation:descriptionTooManyCharactersMessage",{max:u.MAX_DESCRIPTION_CHARACTERS_LENGTH})}}),{as:"textarea",name:"description",rows:6,isInvalid:Boolean(D.description)})),i.createElement(o.Form.Control.Feedback,{type:"invalid"},s.hasError(D.description,"validate")&&(null===(E=D.description)||void 0===E?void 0:E.message))),i.createElement(o.Form.Group,{controlId:S},i.createElement(o.Form.Label,null,A("Design:email")),i.createElement(o.Form.Control,r.__assign({},y("email",{required:A("Validation:fieldRequired",{attribute:A("Design:email")}),pattern:{value:/^\S+@\S+$/,message:A("Validation:fieldValidEmail",{attribute:A("Design:email")})}}),{name:"email",type:"email",inputMode:"email",isInvalid:Boolean(D.email)})),i.createElement(o.Form.Control.Feedback,{type:"invalid"},s.hasError(D.email,"required")&&(null===(g=D.email)||void 0===g?void 0:g.message),s.hasError(D.email,"pattern")&&(null===(v=D.email)||void 0===v?void 0:v.message))),i.createElement(o.Form.Group,{controlId:L},i.createElement(o.Form.Label,null,A("Design:phone")),i.createElement(o.Form.Control,r.__assign({},y("phone",{required:A("Validation:fieldRequired",{attribute:A("Design:phone")})}),{name:"phone",type:"tel",inputMode:"tel",isInvalid:Boolean(D.phone)})),i.createElement(o.Form.Control.Feedback,{type:"invalid"},s.hasError(D.phone,"required")&&(null===(F=D.phone)||void 0===F?void 0:F.message))),i.createElement(o.Form.Group,{controlId:w},i.createElement(o.Form.Label,null,A("Design:website")),i.createElement(o.Form.Control,r.__assign({},y("website",{pattern:{value:/\S+\.\S+/,message:A("Validation:fieldInvalid",{attribute:A("Design:website")})}}),{name:"website",type:"url",inputMode:"url",isInvalid:Boolean(D.website)})),i.createElement(o.Form.Control.Feedback,{type:"invalid"},s.hasError(D.website,"pattern")&&(null===(I=D.website)||void 0===I?void 0:I.message))),b.length>1&&i.createElement(o.Form.Group,{controlId:G},i.createElement(o.Form.Label,null,A("Design:company")),i.createElement(m.Typeahead,{name:"company",options:b,placeholder:A("App:select"),noOptionsMessage:A("App:noMatchesFound")})),_.length>0&&i.createElement(c.ProviderLinksInput,{linkTypes:_}))};
|
package/package.json
CHANGED
|
@@ -119,7 +119,9 @@ export function IntervalInput({
|
|
|
119
119
|
{...register("end", validationOptions.end)}
|
|
120
120
|
value={end}
|
|
121
121
|
name="end"
|
|
122
|
-
onChange={({ target: { value: nextEndtDate } }) =>
|
|
122
|
+
onChange={({ target: { value: nextEndtDate } }) =>
|
|
123
|
+
onChangeEndDate(nextEndtDate)
|
|
124
|
+
}
|
|
123
125
|
min={start}
|
|
124
126
|
isInvalid={Boolean(errors.end)}
|
|
125
127
|
onClick={() => endDateInput?.current?.showPicker()}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MAX_DESCRIPTION_CHARACTERS_LENGTH = 25500;
|
|
1
|
+
export const MAX_DESCRIPTION_CHARACTERS_LENGTH = 25500;
|
|
@@ -36,6 +36,7 @@ export function ProviderDetailsInput({
|
|
|
36
36
|
const {
|
|
37
37
|
register,
|
|
38
38
|
watch,
|
|
39
|
+
trigger,
|
|
39
40
|
formState: { errors },
|
|
40
41
|
} = useFormContext<ProviderDetailsInputValues>();
|
|
41
42
|
const { t } = useTranslation(["App", "Design", "Validation"]);
|
|
@@ -52,6 +53,7 @@ export function ProviderDetailsInput({
|
|
|
52
53
|
|
|
53
54
|
useEffect(() => {
|
|
54
55
|
if (MAX_DESCRIPTION_CHARACTERS_LENGTH > description.length) return;
|
|
56
|
+
trigger("description");
|
|
55
57
|
notification.danger({
|
|
56
58
|
title: t("App:warning"),
|
|
57
59
|
message: t("Validation:descriptionTooManyCharactersMessage", {
|
|
@@ -83,11 +85,26 @@ export function ProviderDetailsInput({
|
|
|
83
85
|
<Form.Group controlId={descriptionId}>
|
|
84
86
|
<Form.Label>{t("Design:description")}</Form.Label>
|
|
85
87
|
<Form.Control
|
|
86
|
-
{...register("description"
|
|
88
|
+
{...register("description", {
|
|
89
|
+
validate: (value) => {
|
|
90
|
+
const descriptionLength = value.length;
|
|
91
|
+
if (descriptionLength > MAX_DESCRIPTION_CHARACTERS_LENGTH) {
|
|
92
|
+
return t("Validation:descriptionTooManyCharactersMessage", {
|
|
93
|
+
max: MAX_DESCRIPTION_CHARACTERS_LENGTH,
|
|
94
|
+
}) as string;
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
},
|
|
98
|
+
})}
|
|
87
99
|
as="textarea"
|
|
88
100
|
name="description"
|
|
89
101
|
rows={6}
|
|
102
|
+
isInvalid={Boolean(errors.description)}
|
|
90
103
|
/>
|
|
104
|
+
<Form.Control.Feedback type="invalid">
|
|
105
|
+
{HookFormService.hasError(errors.description, "validate") &&
|
|
106
|
+
errors.description?.message}
|
|
107
|
+
</Form.Control.Feedback>
|
|
91
108
|
</Form.Group>
|
|
92
109
|
|
|
93
110
|
<Form.Group controlId={emailId}>
|