matsuri-forms-sdk 2.1.1 → 2.1.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"MatsuriFormsQuestionProvider.js","names":["React","jsx","___EmotionJSX","MatsuriFormsQuestionContext","createContext","MatsuriFormsQuestionProvider","_ref","children","renderText","renderMultilineText","renderSelect","Provider","value"],"sources":["../../src/MatsuriFormsQuestionProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ParsedMultilineTextQuestion,\n ParsedSelectQuestion,\n ParsedTextQuestion,\n} from \"./model/parsedQuestion\";\n\nexport interface MatsuriFormsQuestionError {\n code: \"required\" | \"too_many\";\n message: string;\n}\n\nexport interface MatsuriFormsQuestionCommonProps {\n error?: MatsuriFormsQuestionError;\n}\nexport interface MatsuriFormsSelectQuestionProps\n extends ParsedSelectQuestion,\n MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsTextQuestionProps\n extends ParsedTextQuestion,\n MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsMultilineTextQuestionProps\n extends ParsedMultilineTextQuestion,\n MatsuriFormsQuestionCommonProps {}\ninterface MatsuriFormsQuestionContextValue {\n renderMultilineText?: (\n props: MatsuriFormsMultilineTextQuestionProps,\n ) => React.JSX.Element;\n renderText?: (props: MatsuriFormsTextQuestionProps) => React.JSX.Element;\n renderSelect?: (props: MatsuriFormsSelectQuestionProps) => React.JSX.Element;\n}\nexport const MatsuriFormsQuestionContext =\n React.createContext<MatsuriFormsQuestionContextValue | null>(null);\ninterface MatsuriFormsQuestionProviderProps\n extends MatsuriFormsQuestionContextValue {\n children?: React.ReactNode;\n}\n\nexport const MatsuriFormsQuestionProvider = ({\n children,\n renderText,\n renderMultilineText,\n renderSelect,\n}: MatsuriFormsQuestionProviderProps) => {\n return (\n <MatsuriFormsQuestionContext.Provider\n value={{\n renderText,\n renderMultilineText,\n renderSelect,\n }}\n >\n {children}\n </MatsuriFormsQuestionContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,aAAA;AA+B1B,OAAO,IAAMC,2BAA2B,gBACtCH,KAAK,CAACI,aAAa,CAA0C,IAAI,CAAC;AAMpE,OAAO,IAAMC,4BAA4B,GAAGC,IAAA,IAKH;EAAA,IALI;IAC3CC,QAAQ;IACRC,UAAU;IACVC,mBAAmB;IACnBC;EACiC,CAAC,GAAAJ,IAAA;EAClC,OACEJ,aAAA,CAACC,2BAA2B,CAACQ,QAAQ;IACnCC,KAAK,EAAE;MACLJ,UAAU;MACVC,mBAAmB;MACnBC;IACF;EAAE,GAEDH,QACmC,CAAC;AAE3C,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MatsuriFormsQuestionProvider.js","names":["React","jsx","___EmotionJSX","MatsuriFormsQuestionContext","createContext","MatsuriFormsQuestionProvider","_ref","children","renderText","renderMultilineText","renderSelect","Provider","value"],"sources":["../../src/MatsuriFormsQuestionProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ParsedMultilineTextQuestion,\n ParsedSelectQuestion,\n ParsedTextQuestion,\n} from \"./model/parsedQuestion\";\n\nexport interface MatsuriFormsQuestionError {\n code: \"required\" | \"too_many\";\n message: string;\n}\n\nexport interface MatsuriFormsQuestionCommonProps {\n error?: MatsuriFormsQuestionError;\n}\nexport interface MatsuriFormsSelectQuestionProps\n extends ParsedSelectQuestion, MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsTextQuestionProps\n extends ParsedTextQuestion, MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsMultilineTextQuestionProps\n extends ParsedMultilineTextQuestion, MatsuriFormsQuestionCommonProps {}\ninterface MatsuriFormsQuestionContextValue {\n renderMultilineText?: (\n props: MatsuriFormsMultilineTextQuestionProps,\n ) => React.JSX.Element;\n renderText?: (props: MatsuriFormsTextQuestionProps) => React.JSX.Element;\n renderSelect?: (props: MatsuriFormsSelectQuestionProps) => React.JSX.Element;\n}\nexport const MatsuriFormsQuestionContext =\n React.createContext<MatsuriFormsQuestionContextValue | null>(null);\ninterface MatsuriFormsQuestionProviderProps extends MatsuriFormsQuestionContextValue {\n children?: React.ReactNode;\n}\n\nexport const MatsuriFormsQuestionProvider = ({\n children,\n renderText,\n renderMultilineText,\n renderSelect,\n}: MatsuriFormsQuestionProviderProps) => {\n return (\n <MatsuriFormsQuestionContext.Provider\n value={{\n renderText,\n renderMultilineText,\n renderSelect,\n }}\n >\n {children}\n </MatsuriFormsQuestionContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,aAAA;AA4B1B,OAAO,IAAMC,2BAA2B,gBACtCH,KAAK,CAACI,aAAa,CAA0C,IAAI,CAAC;AAKpE,OAAO,IAAMC,4BAA4B,GAAGC,IAAA,IAKH;EAAA,IALI;IAC3CC,QAAQ;IACRC,UAAU;IACVC,mBAAmB;IACnBC;EACiC,CAAC,GAAAJ,IAAA;EAClC,OACEJ,aAAA,CAACC,2BAA2B,CAACQ,QAAQ;IACnCC,KAAK,EAAE;MACLJ,UAAU;MACVC,mBAAmB;MACnBC;IACF;EAAE,GAEDH,QACmC,CAAC;AAE3C,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"MatsuriFormsQuestionProvider.js","names":["_react","_interopRequireDefault","require","_react2","e","__esModule","default","MatsuriFormsQuestionContext","exports","React","createContext","MatsuriFormsQuestionProvider","children","renderText","renderMultilineText","renderSelect","jsx","Provider","value"],"sources":["../../src/MatsuriFormsQuestionProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ParsedMultilineTextQuestion,\n ParsedSelectQuestion,\n ParsedTextQuestion,\n} from \"./model/parsedQuestion\";\n\nexport interface MatsuriFormsQuestionError {\n code: \"required\" | \"too_many\";\n message: string;\n}\n\nexport interface MatsuriFormsQuestionCommonProps {\n error?: MatsuriFormsQuestionError;\n}\nexport interface MatsuriFormsSelectQuestionProps\n extends ParsedSelectQuestion,\n MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsTextQuestionProps\n extends ParsedTextQuestion,\n MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsMultilineTextQuestionProps\n extends ParsedMultilineTextQuestion,\n MatsuriFormsQuestionCommonProps {}\ninterface MatsuriFormsQuestionContextValue {\n renderMultilineText?: (\n props: MatsuriFormsMultilineTextQuestionProps,\n ) => React.JSX.Element;\n renderText?: (props: MatsuriFormsTextQuestionProps) => React.JSX.Element;\n renderSelect?: (props: MatsuriFormsSelectQuestionProps) => React.JSX.Element;\n}\nexport const MatsuriFormsQuestionContext =\n React.createContext<MatsuriFormsQuestionContextValue | null>(null);\ninterface MatsuriFormsQuestionProviderProps\n extends MatsuriFormsQuestionContextValue {\n children?: React.ReactNode;\n}\n\nexport const MatsuriFormsQuestionProvider = ({\n children,\n renderText,\n renderMultilineText,\n renderSelect,\n}: MatsuriFormsQuestionProviderProps) => {\n return (\n <MatsuriFormsQuestionContext.Provider\n value={{\n renderText,\n renderMultilineText,\n renderSelect,\n }}\n >\n {children}\n </MatsuriFormsQuestionContext.Provider>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,IAAAC,OAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA+BnB,MAAMG,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,gBACtCE,cAAK,CAACC,aAAa,CAA0C,IAAI,CAAC;AAM7D,MAAMC,4BAA4B,GAAGA,CAAC;EAC3CC,QAAQ;EACRC,UAAU;EACVC,mBAAmB;EACnBC;AACiC,CAAC,KAAK;EACvC,OACE,IAAAZ,OAAA,CAAAa,GAAA,EAACT,2BAA2B,CAACU,QAAQ;IACnCC,KAAK,EAAE;MACLL,UAAU;MACVC,mBAAmB;MACnBC;IACF;EAAE,GAEDH,QACmC,CAAC;AAE3C,CAAC;AAACJ,OAAA,CAAAG,4BAAA,GAAAA,4BAAA","ignoreList":[]}
1
+ {"version":3,"file":"MatsuriFormsQuestionProvider.js","names":["_react","_interopRequireDefault","require","_react2","e","__esModule","default","MatsuriFormsQuestionContext","exports","React","createContext","MatsuriFormsQuestionProvider","children","renderText","renderMultilineText","renderSelect","jsx","Provider","value"],"sources":["../../src/MatsuriFormsQuestionProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ParsedMultilineTextQuestion,\n ParsedSelectQuestion,\n ParsedTextQuestion,\n} from \"./model/parsedQuestion\";\n\nexport interface MatsuriFormsQuestionError {\n code: \"required\" | \"too_many\";\n message: string;\n}\n\nexport interface MatsuriFormsQuestionCommonProps {\n error?: MatsuriFormsQuestionError;\n}\nexport interface MatsuriFormsSelectQuestionProps\n extends ParsedSelectQuestion, MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsTextQuestionProps\n extends ParsedTextQuestion, MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsMultilineTextQuestionProps\n extends ParsedMultilineTextQuestion, MatsuriFormsQuestionCommonProps {}\ninterface MatsuriFormsQuestionContextValue {\n renderMultilineText?: (\n props: MatsuriFormsMultilineTextQuestionProps,\n ) => React.JSX.Element;\n renderText?: (props: MatsuriFormsTextQuestionProps) => React.JSX.Element;\n renderSelect?: (props: MatsuriFormsSelectQuestionProps) => React.JSX.Element;\n}\nexport const MatsuriFormsQuestionContext =\n React.createContext<MatsuriFormsQuestionContextValue | null>(null);\ninterface MatsuriFormsQuestionProviderProps extends MatsuriFormsQuestionContextValue {\n children?: React.ReactNode;\n}\n\nexport const MatsuriFormsQuestionProvider = ({\n children,\n renderText,\n renderMultilineText,\n renderSelect,\n}: MatsuriFormsQuestionProviderProps) => {\n return (\n <MatsuriFormsQuestionContext.Provider\n value={{\n renderText,\n renderMultilineText,\n renderSelect,\n }}\n >\n {children}\n </MatsuriFormsQuestionContext.Provider>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,IAAAC,OAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA4BnB,MAAMG,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,gBACtCE,cAAK,CAACC,aAAa,CAA0C,IAAI,CAAC;AAK7D,MAAMC,4BAA4B,GAAGA,CAAC;EAC3CC,QAAQ;EACRC,UAAU;EACVC,mBAAmB;EACnBC;AACiC,CAAC,KAAK;EACvC,OACE,IAAAZ,OAAA,CAAAa,GAAA,EAACT,2BAA2B,CAACU,QAAQ;IACnCC,KAAK,EAAE;MACLL,UAAU;MACVC,mBAAmB;MACnBC;IACF;EAAE,GAEDH,QACmC,CAAC;AAE3C,CAAC;AAACJ,OAAA,CAAAG,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"MultipleTextQuestion.js","names":["_matsuriUi","require","_react","MultipleTextQuestion","name","title","required","maxLength","defaultValue","description","jsx","MultipleTextField","label","helperText","undefined","sizing","rows","exports"],"sources":["../../../src/matsuri-ui/MultipleTextQuestion.tsx"],"sourcesContent":["import { MultipleTextField } from \"matsuri-ui\";\nimport { MatsuriFormsMultilineTextQuestionProps } from \"../\";\n\nexport interface MultipleTextQuestionProps\n extends Partial<MatsuriFormsMultilineTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const MultipleTextQuestion = ({\n name,\n title,\n required,\n maxLength,\n defaultValue = \"\",\n description,\n}: MultipleTextQuestionProps) => {\n return (\n <MultipleTextField\n name={name}\n label={title}\n required={required}\n maxLength={maxLength}\n defaultValue={defaultValue}\n helperText={description !== \"\" ? description : undefined}\n sizing=\"content\"\n rows={6}\n />\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAA+C,IAAAC,MAAA,GAAAD,OAAA;AAQxC,MAAME,oBAAoB,GAAGA,CAAC;EACnCC,IAAI;EACJC,KAAK;EACLC,QAAQ;EACRC,SAAS;EACTC,YAAY,GAAG,EAAE;EACjBC;AACyB,CAAC,KAAK;EAC/B,OACE,IAAAP,MAAA,CAAAQ,GAAA,EAACV,UAAA,CAAAW,iBAAiB;IAChBP,IAAI,EAAEA,IAAK;IACXQ,KAAK,EAAEP,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBC,SAAS,EAAEA,SAAU;IACrBC,YAAY,EAAEA,YAAa;IAC3BK,UAAU,EAAEJ,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGK,SAAU;IACzDC,MAAM,EAAC,SAAS;IAChBC,IAAI,EAAE;EAAE,CACT,CAAC;AAEN,CAAC;AAACC,OAAA,CAAAd,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"file":"MultipleTextQuestion.js","names":["_matsuriUi","require","_react","MultipleTextQuestion","name","title","required","maxLength","defaultValue","description","jsx","MultipleTextField","label","helperText","undefined","sizing","rows","exports"],"sources":["../../../src/matsuri-ui/MultipleTextQuestion.tsx"],"sourcesContent":["import { MultipleTextField } from \"matsuri-ui\";\nimport { MatsuriFormsMultilineTextQuestionProps } from \"../\";\n\nexport interface MultipleTextQuestionProps extends Partial<MatsuriFormsMultilineTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const MultipleTextQuestion = ({\n name,\n title,\n required,\n maxLength,\n defaultValue = \"\",\n description,\n}: MultipleTextQuestionProps) => {\n return (\n <MultipleTextField\n name={name}\n label={title}\n required={required}\n maxLength={maxLength}\n defaultValue={defaultValue}\n helperText={description !== \"\" ? description : undefined}\n sizing=\"content\"\n rows={6}\n />\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAA+C,IAAAC,MAAA,GAAAD,OAAA;AAOxC,MAAME,oBAAoB,GAAGA,CAAC;EACnCC,IAAI;EACJC,KAAK;EACLC,QAAQ;EACRC,SAAS;EACTC,YAAY,GAAG,EAAE;EACjBC;AACyB,CAAC,KAAK;EAC/B,OACE,IAAAP,MAAA,CAAAQ,GAAA,EAACV,UAAA,CAAAW,iBAAiB;IAChBP,IAAI,EAAEA,IAAK;IACXQ,KAAK,EAAEP,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBC,SAAS,EAAEA,SAAU;IACrBC,YAAY,EAAEA,YAAa;IAC3BK,UAAU,EAAEJ,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGK,SAAU;IACzDC,MAAM,EAAC,SAAS;IAChBC,IAAI,EAAE;EAAE,CACT,CAAC;AAEN,CAAC;AAACC,OAAA,CAAAd,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextQuestion.js","names":["_matsuriUi","require","_react","TextQuestion","name","title","required","maxLength","type","defaultValue","description","jsx","TextField","label","helperText","undefined","exports"],"sources":["../../../src/matsuri-ui/TextQuestion.tsx"],"sourcesContent":["import { TextField } from \"matsuri-ui\";\nimport { MatsuriFormsTextQuestionProps } from \"../\";\n\nexport interface TextQuestionProps\n extends Partial<MatsuriFormsTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const TextQuestion = ({\n name,\n title,\n required,\n maxLength,\n type,\n defaultValue = \"\",\n description,\n}: TextQuestionProps) => {\n return (\n <TextField\n name={name}\n type={type}\n maxLength={maxLength}\n defaultValue={defaultValue}\n label={title}\n required={required}\n helperText={description !== \"\" ? description : undefined}\n />\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAuC,IAAAC,MAAA,GAAAD,OAAA;AAQhC,MAAME,YAAY,GAAGA,CAAC;EAC3BC,IAAI;EACJC,KAAK;EACLC,QAAQ;EACRC,SAAS;EACTC,IAAI;EACJC,YAAY,GAAG,EAAE;EACjBC;AACiB,CAAC,KAAK;EACvB,OACE,IAAAR,MAAA,CAAAS,GAAA,EAACX,UAAA,CAAAY,SAAS;IACRR,IAAI,EAAEA,IAAK;IACXI,IAAI,EAAEA,IAAK;IACXD,SAAS,EAAEA,SAAU;IACrBE,YAAY,EAAEA,YAAa;IAC3BI,KAAK,EAAER,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBQ,UAAU,EAAEJ,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGK;EAAU,CAC1D,CAAC;AAEN,CAAC;AAACC,OAAA,CAAAb,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"file":"TextQuestion.js","names":["_matsuriUi","require","_react","TextQuestion","name","title","required","maxLength","type","defaultValue","description","jsx","TextField","label","helperText","undefined","exports"],"sources":["../../../src/matsuri-ui/TextQuestion.tsx"],"sourcesContent":["import { TextField } from \"matsuri-ui\";\nimport { MatsuriFormsTextQuestionProps } from \"../\";\n\nexport interface TextQuestionProps extends Partial<MatsuriFormsTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const TextQuestion = ({\n name,\n title,\n required,\n maxLength,\n type,\n defaultValue = \"\",\n description,\n}: TextQuestionProps) => {\n return (\n <TextField\n name={name}\n type={type}\n maxLength={maxLength}\n defaultValue={defaultValue}\n label={title}\n required={required}\n helperText={description !== \"\" ? description : undefined}\n />\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAuC,IAAAC,MAAA,GAAAD,OAAA;AAOhC,MAAME,YAAY,GAAGA,CAAC;EAC3BC,IAAI;EACJC,KAAK;EACLC,QAAQ;EACRC,SAAS;EACTC,IAAI;EACJC,YAAY,GAAG,EAAE;EACjBC;AACiB,CAAC,KAAK;EACvB,OACE,IAAAR,MAAA,CAAAS,GAAA,EAACX,UAAA,CAAAY,SAAS;IACRR,IAAI,EAAEA,IAAK;IACXI,IAAI,EAAEA,IAAK;IACXD,SAAS,EAAEA,SAAU;IACrBE,YAAY,EAAEA,YAAa;IAC3BI,KAAK,EAAER,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBQ,UAAU,EAAEJ,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGK;EAAU,CAC1D,CAAC;AAEN,CAAC;AAACC,OAAA,CAAAb,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useSurveyForm.js","names":["_react","require","_SurveyFormProvider","useSurveyForm","initialValue","context","useSurveyFormContext","survey","useCallback","value","Promise","resolve","setFormProps","open","onClose","onSubmit","exports"],"sources":["../../../src/matsuri-ui/useSurveyForm.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { SurveyFormProps } from \"./SurveyForm\";\nimport { useSurveyFormContext } from \"./SurveyFormProvider\";\n\ninterface UseSurveyFormValue\n extends Omit<SurveyFormProps, \"open\" | \"onSubmit\" | \"onClose\"> {}\n\nexport const useSurveyForm = (initialValue?: UseSurveyFormValue) => {\n const context = useSurveyFormContext();\n\n const survey = useCallback(\n (value?: UseSurveyFormValue) => {\n return new Promise<boolean>((resolve) => {\n context.setFormProps({\n ...initialValue,\n ...value,\n open: true,\n onClose: () => {\n context.setFormProps({ open: false });\n resolve(false);\n },\n onSubmit: () => {\n context.setFormProps({ open: false });\n resolve(true);\n },\n });\n });\n },\n [context, initialValue],\n );\n return survey;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AAKO,MAAME,aAAa,GAAIC,YAAiC,IAAK;EAClE,MAAMC,OAAO,GAAG,IAAAC,wCAAoB,EAAC,CAAC;EAEtC,MAAMC,MAAM,GAAG,IAAAC,kBAAW,EACvBC,KAA0B,IAAK;IAC9B,OAAO,IAAIC,OAAO,CAAWC,OAAO,IAAK;MACvCN,OAAO,CAACO,YAAY,CAAC;QACnB,GAAGR,YAAY;QACf,GAAGK,KAAK;QACRI,IAAI,EAAE,IAAI;QACVC,OAAO,EAAEA,CAAA,KAAM;UACbT,OAAO,CAACO,YAAY,CAAC;YAAEC,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCF,OAAO,CAAC,KAAK,CAAC;QAChB,CAAC;QACDI,QAAQ,EAAEA,CAAA,KAAM;UACdV,OAAO,CAACO,YAAY,CAAC;YAAEC,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCF,OAAO,CAAC,IAAI,CAAC;QACf;MACF,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD,CAACN,OAAO,EAAED,YAAY,CACxB,CAAC;EACD,OAAOG,MAAM;AACf,CAAC;AAACS,OAAA,CAAAb,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"useSurveyForm.js","names":["_react","require","_SurveyFormProvider","useSurveyForm","initialValue","context","useSurveyFormContext","survey","useCallback","value","Promise","resolve","setFormProps","open","onClose","onSubmit","exports"],"sources":["../../../src/matsuri-ui/useSurveyForm.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { SurveyFormProps } from \"./SurveyForm\";\nimport { useSurveyFormContext } from \"./SurveyFormProvider\";\n\ninterface UseSurveyFormValue extends Omit<\n SurveyFormProps,\n \"open\" | \"onSubmit\" | \"onClose\"\n> {}\n\nexport const useSurveyForm = (initialValue?: UseSurveyFormValue) => {\n const context = useSurveyFormContext();\n\n const survey = useCallback(\n (value?: UseSurveyFormValue) => {\n return new Promise<boolean>((resolve) => {\n context.setFormProps({\n ...initialValue,\n ...value,\n open: true,\n onClose: () => {\n context.setFormProps({ open: false });\n resolve(false);\n },\n onSubmit: () => {\n context.setFormProps({ open: false });\n resolve(true);\n },\n });\n });\n },\n [context, initialValue],\n );\n return survey;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AAOO,MAAME,aAAa,GAAIC,YAAiC,IAAK;EAClE,MAAMC,OAAO,GAAG,IAAAC,wCAAoB,EAAC,CAAC;EAEtC,MAAMC,MAAM,GAAG,IAAAC,kBAAW,EACvBC,KAA0B,IAAK;IAC9B,OAAO,IAAIC,OAAO,CAAWC,OAAO,IAAK;MACvCN,OAAO,CAACO,YAAY,CAAC;QACnB,GAAGR,YAAY;QACf,GAAGK,KAAK;QACRI,IAAI,EAAE,IAAI;QACVC,OAAO,EAAEA,CAAA,KAAM;UACbT,OAAO,CAACO,YAAY,CAAC;YAAEC,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCF,OAAO,CAAC,KAAK,CAAC;QAChB,CAAC;QACDI,QAAQ,EAAEA,CAAA,KAAM;UACdV,OAAO,CAACO,YAAY,CAAC;YAAEC,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCF,OAAO,CAAC,IAAI,CAAC;QACf;MACF,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD,CAACN,OAAO,EAAED,YAAY,CACxB,CAAC;EACD,OAAOG,MAAM;AACf,CAAC;AAACS,OAAA,CAAAb,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"MatsuriFormsQuestionProvider.js","names":["React","jsx","___EmotionJSX","MatsuriFormsQuestionContext","createContext","MatsuriFormsQuestionProvider","_ref","children","renderText","renderMultilineText","renderSelect","Provider","value"],"sources":["../../src/MatsuriFormsQuestionProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ParsedMultilineTextQuestion,\n ParsedSelectQuestion,\n ParsedTextQuestion,\n} from \"./model/parsedQuestion\";\n\nexport interface MatsuriFormsQuestionError {\n code: \"required\" | \"too_many\";\n message: string;\n}\n\nexport interface MatsuriFormsQuestionCommonProps {\n error?: MatsuriFormsQuestionError;\n}\nexport interface MatsuriFormsSelectQuestionProps\n extends ParsedSelectQuestion,\n MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsTextQuestionProps\n extends ParsedTextQuestion,\n MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsMultilineTextQuestionProps\n extends ParsedMultilineTextQuestion,\n MatsuriFormsQuestionCommonProps {}\ninterface MatsuriFormsQuestionContextValue {\n renderMultilineText?: (\n props: MatsuriFormsMultilineTextQuestionProps,\n ) => React.JSX.Element;\n renderText?: (props: MatsuriFormsTextQuestionProps) => React.JSX.Element;\n renderSelect?: (props: MatsuriFormsSelectQuestionProps) => React.JSX.Element;\n}\nexport const MatsuriFormsQuestionContext =\n React.createContext<MatsuriFormsQuestionContextValue | null>(null);\ninterface MatsuriFormsQuestionProviderProps\n extends MatsuriFormsQuestionContextValue {\n children?: React.ReactNode;\n}\n\nexport const MatsuriFormsQuestionProvider = ({\n children,\n renderText,\n renderMultilineText,\n renderSelect,\n}: MatsuriFormsQuestionProviderProps) => {\n return (\n <MatsuriFormsQuestionContext.Provider\n value={{\n renderText,\n renderMultilineText,\n renderSelect,\n }}\n >\n {children}\n </MatsuriFormsQuestionContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,aAAA;AA+B1B,OAAO,IAAMC,2BAA2B,gBACtCH,KAAK,CAACI,aAAa,CAA0C,IAAI,CAAC;AAMpE,OAAO,IAAMC,4BAA4B,GAAGC,IAAA,IAKH;EAAA,IALI;IAC3CC,QAAQ;IACRC,UAAU;IACVC,mBAAmB;IACnBC;EACiC,CAAC,GAAAJ,IAAA;EAClC,OACEJ,aAAA,CAACC,2BAA2B,CAACQ,QAAQ;IACnCC,KAAK,EAAE;MACLJ,UAAU;MACVC,mBAAmB;MACnBC;IACF;EAAE,GAEDH,QACmC,CAAC;AAE3C,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MatsuriFormsQuestionProvider.js","names":["React","jsx","___EmotionJSX","MatsuriFormsQuestionContext","createContext","MatsuriFormsQuestionProvider","_ref","children","renderText","renderMultilineText","renderSelect","Provider","value"],"sources":["../../src/MatsuriFormsQuestionProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ParsedMultilineTextQuestion,\n ParsedSelectQuestion,\n ParsedTextQuestion,\n} from \"./model/parsedQuestion\";\n\nexport interface MatsuriFormsQuestionError {\n code: \"required\" | \"too_many\";\n message: string;\n}\n\nexport interface MatsuriFormsQuestionCommonProps {\n error?: MatsuriFormsQuestionError;\n}\nexport interface MatsuriFormsSelectQuestionProps\n extends ParsedSelectQuestion, MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsTextQuestionProps\n extends ParsedTextQuestion, MatsuriFormsQuestionCommonProps {}\nexport interface MatsuriFormsMultilineTextQuestionProps\n extends ParsedMultilineTextQuestion, MatsuriFormsQuestionCommonProps {}\ninterface MatsuriFormsQuestionContextValue {\n renderMultilineText?: (\n props: MatsuriFormsMultilineTextQuestionProps,\n ) => React.JSX.Element;\n renderText?: (props: MatsuriFormsTextQuestionProps) => React.JSX.Element;\n renderSelect?: (props: MatsuriFormsSelectQuestionProps) => React.JSX.Element;\n}\nexport const MatsuriFormsQuestionContext =\n React.createContext<MatsuriFormsQuestionContextValue | null>(null);\ninterface MatsuriFormsQuestionProviderProps extends MatsuriFormsQuestionContextValue {\n children?: React.ReactNode;\n}\n\nexport const MatsuriFormsQuestionProvider = ({\n children,\n renderText,\n renderMultilineText,\n renderSelect,\n}: MatsuriFormsQuestionProviderProps) => {\n return (\n <MatsuriFormsQuestionContext.Provider\n value={{\n renderText,\n renderMultilineText,\n renderSelect,\n }}\n >\n {children}\n </MatsuriFormsQuestionContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,aAAA;AA4B1B,OAAO,IAAMC,2BAA2B,gBACtCH,KAAK,CAACI,aAAa,CAA0C,IAAI,CAAC;AAKpE,OAAO,IAAMC,4BAA4B,GAAGC,IAAA,IAKH;EAAA,IALI;IAC3CC,QAAQ;IACRC,UAAU;IACVC,mBAAmB;IACnBC;EACiC,CAAC,GAAAJ,IAAA;EAClC,OACEJ,aAAA,CAACC,2BAA2B,CAACQ,QAAQ;IACnCC,KAAK,EAAE;MACLJ,UAAU;MACVC,mBAAmB;MACnBC;IACF;EAAE,GAEDH,QACmC,CAAC;AAE3C,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"MultipleTextQuestion.js","names":["MultipleTextField","jsx","___EmotionJSX","MultipleTextQuestion","_ref","name","title","required","maxLength","defaultValue","description","label","helperText","undefined","sizing","rows"],"sources":["../../../src/matsuri-ui/MultipleTextQuestion.tsx"],"sourcesContent":["import { MultipleTextField } from \"matsuri-ui\";\nimport { MatsuriFormsMultilineTextQuestionProps } from \"../\";\n\nexport interface MultipleTextQuestionProps\n extends Partial<MatsuriFormsMultilineTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const MultipleTextQuestion = ({\n name,\n title,\n required,\n maxLength,\n defaultValue = \"\",\n description,\n}: MultipleTextQuestionProps) => {\n return (\n <MultipleTextField\n name={name}\n label={title}\n required={required}\n maxLength={maxLength}\n defaultValue={defaultValue}\n helperText={description !== \"\" ? description : undefined}\n sizing=\"content\"\n rows={6}\n />\n );\n};\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,aAAA;AAQ/C,OAAO,IAAMC,oBAAoB,GAAGC,IAAA,IAOH;EAAA,IAPI;IACnCC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,YAAY,GAAG,EAAE;IACjBC;EACyB,CAAC,GAAAN,IAAA;EAC1B,OACEF,aAAA,CAACF,iBAAiB;IAChBK,IAAI,EAAEA,IAAK;IACXM,KAAK,EAAEL,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBC,SAAS,EAAEA,SAAU;IACrBC,YAAY,EAAEA,YAAa;IAC3BG,UAAU,EAAEF,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGG,SAAU;IACzDC,MAAM,EAAC,SAAS;IAChBC,IAAI,EAAE;EAAE,CACT,CAAC;AAEN,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MultipleTextQuestion.js","names":["MultipleTextField","jsx","___EmotionJSX","MultipleTextQuestion","_ref","name","title","required","maxLength","defaultValue","description","label","helperText","undefined","sizing","rows"],"sources":["../../../src/matsuri-ui/MultipleTextQuestion.tsx"],"sourcesContent":["import { MultipleTextField } from \"matsuri-ui\";\nimport { MatsuriFormsMultilineTextQuestionProps } from \"../\";\n\nexport interface MultipleTextQuestionProps extends Partial<MatsuriFormsMultilineTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const MultipleTextQuestion = ({\n name,\n title,\n required,\n maxLength,\n defaultValue = \"\",\n description,\n}: MultipleTextQuestionProps) => {\n return (\n <MultipleTextField\n name={name}\n label={title}\n required={required}\n maxLength={maxLength}\n defaultValue={defaultValue}\n helperText={description !== \"\" ? description : undefined}\n sizing=\"content\"\n rows={6}\n />\n );\n};\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,aAAA;AAO/C,OAAO,IAAMC,oBAAoB,GAAGC,IAAA,IAOH;EAAA,IAPI;IACnCC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,YAAY,GAAG,EAAE;IACjBC;EACyB,CAAC,GAAAN,IAAA;EAC1B,OACEF,aAAA,CAACF,iBAAiB;IAChBK,IAAI,EAAEA,IAAK;IACXM,KAAK,EAAEL,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBC,SAAS,EAAEA,SAAU;IACrBC,YAAY,EAAEA,YAAa;IAC3BG,UAAU,EAAEF,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGG,SAAU;IACzDC,MAAM,EAAC,SAAS;IAChBC,IAAI,EAAE;EAAE,CACT,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextQuestion.js","names":["TextField","jsx","___EmotionJSX","TextQuestion","_ref","name","title","required","maxLength","type","defaultValue","description","label","helperText","undefined"],"sources":["../../../src/matsuri-ui/TextQuestion.tsx"],"sourcesContent":["import { TextField } from \"matsuri-ui\";\nimport { MatsuriFormsTextQuestionProps } from \"../\";\n\nexport interface TextQuestionProps\n extends Partial<MatsuriFormsTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const TextQuestion = ({\n name,\n title,\n required,\n maxLength,\n type,\n defaultValue = \"\",\n description,\n}: TextQuestionProps) => {\n return (\n <TextField\n name={name}\n type={type}\n maxLength={maxLength}\n defaultValue={defaultValue}\n label={title}\n required={required}\n helperText={description !== \"\" ? description : undefined}\n />\n );\n};\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,aAAA;AAQvC,OAAO,IAAMC,YAAY,GAAGC,IAAA,IAQH;EAAA,IARI;IAC3BC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,IAAI;IACJC,YAAY,GAAG,EAAE;IACjBC;EACiB,CAAC,GAAAP,IAAA;EAClB,OACEF,aAAA,CAACF,SAAS;IACRK,IAAI,EAAEA,IAAK;IACXI,IAAI,EAAEA,IAAK;IACXD,SAAS,EAAEA,SAAU;IACrBE,YAAY,EAAEA,YAAa;IAC3BE,KAAK,EAAEN,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBM,UAAU,EAAEF,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGG;EAAU,CAC1D,CAAC;AAEN,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"TextQuestion.js","names":["TextField","jsx","___EmotionJSX","TextQuestion","_ref","name","title","required","maxLength","type","defaultValue","description","label","helperText","undefined"],"sources":["../../../src/matsuri-ui/TextQuestion.tsx"],"sourcesContent":["import { TextField } from \"matsuri-ui\";\nimport { MatsuriFormsTextQuestionProps } from \"../\";\n\nexport interface TextQuestionProps extends Partial<MatsuriFormsTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const TextQuestion = ({\n name,\n title,\n required,\n maxLength,\n type,\n defaultValue = \"\",\n description,\n}: TextQuestionProps) => {\n return (\n <TextField\n name={name}\n type={type}\n maxLength={maxLength}\n defaultValue={defaultValue}\n label={title}\n required={required}\n helperText={description !== \"\" ? description : undefined}\n />\n );\n};\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,aAAA;AAOvC,OAAO,IAAMC,YAAY,GAAGC,IAAA,IAQH;EAAA,IARI;IAC3BC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,IAAI;IACJC,YAAY,GAAG,EAAE;IACjBC;EACiB,CAAC,GAAAP,IAAA;EAClB,OACEF,aAAA,CAACF,SAAS;IACRK,IAAI,EAAEA,IAAK;IACXI,IAAI,EAAEA,IAAK;IACXD,SAAS,EAAEA,SAAU;IACrBE,YAAY,EAAEA,YAAa;IAC3BE,KAAK,EAAEN,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBM,UAAU,EAAEF,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGG;EAAU,CAC1D,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useSurveyForm.js","names":["useCallback","useSurveyFormContext","useSurveyForm","initialValue","context","survey","value","Promise","resolve","setFormProps","_objectSpread","open","onClose","onSubmit"],"sources":["../../../src/matsuri-ui/useSurveyForm.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { SurveyFormProps } from \"./SurveyForm\";\nimport { useSurveyFormContext } from \"./SurveyFormProvider\";\n\ninterface UseSurveyFormValue\n extends Omit<SurveyFormProps, \"open\" | \"onSubmit\" | \"onClose\"> {}\n\nexport const useSurveyForm = (initialValue?: UseSurveyFormValue) => {\n const context = useSurveyFormContext();\n\n const survey = useCallback(\n (value?: UseSurveyFormValue) => {\n return new Promise<boolean>((resolve) => {\n context.setFormProps({\n ...initialValue,\n ...value,\n open: true,\n onClose: () => {\n context.setFormProps({ open: false });\n resolve(false);\n },\n onSubmit: () => {\n context.setFormProps({ open: false });\n resolve(true);\n },\n });\n });\n },\n [context, initialValue],\n );\n return survey;\n};\n"],"mappings":";;;;;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,oBAAoB,QAAQ,sBAAsB;AAK3D,OAAO,IAAMC,aAAa,GAAIC,YAAiC,IAAK;EAClE,IAAMC,OAAO,GAAGH,oBAAoB,CAAC,CAAC;EAEtC,IAAMI,MAAM,GAAGL,WAAW,CACvBM,KAA0B,IAAK;IAC9B,OAAO,IAAIC,OAAO,CAAWC,OAAO,IAAK;MACvCJ,OAAO,CAACK,YAAY,CAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,KACfP,YAAY,GACZG,KAAK;QACRK,IAAI,EAAE,IAAI;QACVC,OAAO,EAAEA,CAAA,KAAM;UACbR,OAAO,CAACK,YAAY,CAAC;YAAEE,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCH,OAAO,CAAC,KAAK,CAAC;QAChB,CAAC;QACDK,QAAQ,EAAEA,CAAA,KAAM;UACdT,OAAO,CAACK,YAAY,CAAC;YAAEE,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCH,OAAO,CAAC,IAAI,CAAC;QACf;MAAC,EACF,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD,CAACJ,OAAO,EAAED,YAAY,CACxB,CAAC;EACD,OAAOE,MAAM;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useSurveyForm.js","names":["useCallback","useSurveyFormContext","useSurveyForm","initialValue","context","survey","value","Promise","resolve","setFormProps","_objectSpread","open","onClose","onSubmit"],"sources":["../../../src/matsuri-ui/useSurveyForm.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { SurveyFormProps } from \"./SurveyForm\";\nimport { useSurveyFormContext } from \"./SurveyFormProvider\";\n\ninterface UseSurveyFormValue extends Omit<\n SurveyFormProps,\n \"open\" | \"onSubmit\" | \"onClose\"\n> {}\n\nexport const useSurveyForm = (initialValue?: UseSurveyFormValue) => {\n const context = useSurveyFormContext();\n\n const survey = useCallback(\n (value?: UseSurveyFormValue) => {\n return new Promise<boolean>((resolve) => {\n context.setFormProps({\n ...initialValue,\n ...value,\n open: true,\n onClose: () => {\n context.setFormProps({ open: false });\n resolve(false);\n },\n onSubmit: () => {\n context.setFormProps({ open: false });\n resolve(true);\n },\n });\n });\n },\n [context, initialValue],\n );\n return survey;\n};\n"],"mappings":";;;;;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,oBAAoB,QAAQ,sBAAsB;AAO3D,OAAO,IAAMC,aAAa,GAAIC,YAAiC,IAAK;EAClE,IAAMC,OAAO,GAAGH,oBAAoB,CAAC,CAAC;EAEtC,IAAMI,MAAM,GAAGL,WAAW,CACvBM,KAA0B,IAAK;IAC9B,OAAO,IAAIC,OAAO,CAAWC,OAAO,IAAK;MACvCJ,OAAO,CAACK,YAAY,CAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,KACfP,YAAY,GACZG,KAAK;QACRK,IAAI,EAAE,IAAI;QACVC,OAAO,EAAEA,CAAA,KAAM;UACbR,OAAO,CAACK,YAAY,CAAC;YAAEE,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCH,OAAO,CAAC,KAAK,CAAC;QAChB,CAAC;QACDK,QAAQ,EAAEA,CAAA,KAAM;UACdT,OAAO,CAACK,YAAY,CAAC;YAAEE,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCH,OAAO,CAAC,IAAI,CAAC;QACf;MAAC,EACF,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD,CAACJ,OAAO,EAAED,YAAY,CACxB,CAAC;EACD,OAAOE,MAAM;AACf,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"MultipleTextQuestion.js","names":["MultipleTextField","jsx","___EmotionJSX","MultipleTextQuestion","_ref","name","title","required","maxLength","defaultValue","description","label","helperText","undefined","sizing","rows"],"sources":["../../../src/matsuri-ui/MultipleTextQuestion.tsx"],"sourcesContent":["import { MultipleTextField } from \"matsuri-ui\";\nimport { MatsuriFormsMultilineTextQuestionProps } from \"../\";\n\nexport interface MultipleTextQuestionProps\n extends Partial<MatsuriFormsMultilineTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const MultipleTextQuestion = ({\n name,\n title,\n required,\n maxLength,\n defaultValue = \"\",\n description,\n}: MultipleTextQuestionProps) => {\n return (\n <MultipleTextField\n name={name}\n label={title}\n required={required}\n maxLength={maxLength}\n defaultValue={defaultValue}\n helperText={description !== \"\" ? description : undefined}\n sizing=\"content\"\n rows={6}\n />\n );\n};\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,aAAA;AAQ/C,OAAO,IAAMC,oBAAoB,GAAGC,IAAA,IAOH;EAAA,IAPI;IACnCC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,YAAY,GAAG,EAAE;IACjBC;EACyB,CAAC,GAAAN,IAAA;EAC1B,OACEF,aAAA,CAACF,iBAAiB;IAChBK,IAAI,EAAEA,IAAK;IACXM,KAAK,EAAEL,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBC,SAAS,EAAEA,SAAU;IACrBC,YAAY,EAAEA,YAAa;IAC3BG,UAAU,EAAEF,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGG,SAAU;IACzDC,MAAM,EAAC,SAAS;IAChBC,IAAI,EAAE;EAAE,CACT,CAAC;AAEN,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MultipleTextQuestion.js","names":["MultipleTextField","jsx","___EmotionJSX","MultipleTextQuestion","_ref","name","title","required","maxLength","defaultValue","description","label","helperText","undefined","sizing","rows"],"sources":["../../../src/matsuri-ui/MultipleTextQuestion.tsx"],"sourcesContent":["import { MultipleTextField } from \"matsuri-ui\";\nimport { MatsuriFormsMultilineTextQuestionProps } from \"../\";\n\nexport interface MultipleTextQuestionProps extends Partial<MatsuriFormsMultilineTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const MultipleTextQuestion = ({\n name,\n title,\n required,\n maxLength,\n defaultValue = \"\",\n description,\n}: MultipleTextQuestionProps) => {\n return (\n <MultipleTextField\n name={name}\n label={title}\n required={required}\n maxLength={maxLength}\n defaultValue={defaultValue}\n helperText={description !== \"\" ? description : undefined}\n sizing=\"content\"\n rows={6}\n />\n );\n};\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,aAAA;AAO/C,OAAO,IAAMC,oBAAoB,GAAGC,IAAA,IAOH;EAAA,IAPI;IACnCC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,YAAY,GAAG,EAAE;IACjBC;EACyB,CAAC,GAAAN,IAAA;EAC1B,OACEF,aAAA,CAACF,iBAAiB;IAChBK,IAAI,EAAEA,IAAK;IACXM,KAAK,EAAEL,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBC,SAAS,EAAEA,SAAU;IACrBC,YAAY,EAAEA,YAAa;IAC3BG,UAAU,EAAEF,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGG,SAAU;IACzDC,MAAM,EAAC,SAAS;IAChBC,IAAI,EAAE;EAAE,CACT,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextQuestion.js","names":["TextField","jsx","___EmotionJSX","TextQuestion","_ref","name","title","required","maxLength","type","defaultValue","description","label","helperText","undefined"],"sources":["../../../src/matsuri-ui/TextQuestion.tsx"],"sourcesContent":["import { TextField } from \"matsuri-ui\";\nimport { MatsuriFormsTextQuestionProps } from \"../\";\n\nexport interface TextQuestionProps\n extends Partial<MatsuriFormsTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const TextQuestion = ({\n name,\n title,\n required,\n maxLength,\n type,\n defaultValue = \"\",\n description,\n}: TextQuestionProps) => {\n return (\n <TextField\n name={name}\n type={type}\n maxLength={maxLength}\n defaultValue={defaultValue}\n label={title}\n required={required}\n helperText={description !== \"\" ? description : undefined}\n />\n );\n};\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,aAAA;AAQvC,OAAO,IAAMC,YAAY,GAAGC,IAAA,IAQH;EAAA,IARI;IAC3BC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,IAAI;IACJC,YAAY,GAAG,EAAE;IACjBC;EACiB,CAAC,GAAAP,IAAA;EAClB,OACEF,aAAA,CAACF,SAAS;IACRK,IAAI,EAAEA,IAAK;IACXI,IAAI,EAAEA,IAAK;IACXD,SAAS,EAAEA,SAAU;IACrBE,YAAY,EAAEA,YAAa;IAC3BE,KAAK,EAAEN,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBM,UAAU,EAAEF,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGG;EAAU,CAC1D,CAAC;AAEN,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"TextQuestion.js","names":["TextField","jsx","___EmotionJSX","TextQuestion","_ref","name","title","required","maxLength","type","defaultValue","description","label","helperText","undefined"],"sources":["../../../src/matsuri-ui/TextQuestion.tsx"],"sourcesContent":["import { TextField } from \"matsuri-ui\";\nimport { MatsuriFormsTextQuestionProps } from \"../\";\n\nexport interface TextQuestionProps extends Partial<MatsuriFormsTextQuestionProps> {\n defaultValue?: string;\n}\n\nexport const TextQuestion = ({\n name,\n title,\n required,\n maxLength,\n type,\n defaultValue = \"\",\n description,\n}: TextQuestionProps) => {\n return (\n <TextField\n name={name}\n type={type}\n maxLength={maxLength}\n defaultValue={defaultValue}\n label={title}\n required={required}\n helperText={description !== \"\" ? description : undefined}\n />\n );\n};\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,aAAA;AAOvC,OAAO,IAAMC,YAAY,GAAGC,IAAA,IAQH;EAAA,IARI;IAC3BC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,IAAI;IACJC,YAAY,GAAG,EAAE;IACjBC;EACiB,CAAC,GAAAP,IAAA;EAClB,OACEF,aAAA,CAACF,SAAS;IACRK,IAAI,EAAEA,IAAK;IACXI,IAAI,EAAEA,IAAK;IACXD,SAAS,EAAEA,SAAU;IACrBE,YAAY,EAAEA,YAAa;IAC3BE,KAAK,EAAEN,KAAM;IACbC,QAAQ,EAAEA,QAAS;IACnBM,UAAU,EAAEF,WAAW,KAAK,EAAE,GAAGA,WAAW,GAAGG;EAAU,CAC1D,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useSurveyForm.js","names":["useCallback","useSurveyFormContext","useSurveyForm","initialValue","context","survey","value","Promise","resolve","setFormProps","_objectSpread","open","onClose","onSubmit"],"sources":["../../../src/matsuri-ui/useSurveyForm.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { SurveyFormProps } from \"./SurveyForm\";\nimport { useSurveyFormContext } from \"./SurveyFormProvider\";\n\ninterface UseSurveyFormValue\n extends Omit<SurveyFormProps, \"open\" | \"onSubmit\" | \"onClose\"> {}\n\nexport const useSurveyForm = (initialValue?: UseSurveyFormValue) => {\n const context = useSurveyFormContext();\n\n const survey = useCallback(\n (value?: UseSurveyFormValue) => {\n return new Promise<boolean>((resolve) => {\n context.setFormProps({\n ...initialValue,\n ...value,\n open: true,\n onClose: () => {\n context.setFormProps({ open: false });\n resolve(false);\n },\n onSubmit: () => {\n context.setFormProps({ open: false });\n resolve(true);\n },\n });\n });\n },\n [context, initialValue],\n );\n return survey;\n};\n"],"mappings":";;;;;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,oBAAoB,QAAQ,sBAAsB;AAK3D,OAAO,IAAMC,aAAa,GAAIC,YAAiC,IAAK;EAClE,IAAMC,OAAO,GAAGH,oBAAoB,CAAC,CAAC;EAEtC,IAAMI,MAAM,GAAGL,WAAW,CACvBM,KAA0B,IAAK;IAC9B,OAAO,IAAIC,OAAO,CAAWC,OAAO,IAAK;MACvCJ,OAAO,CAACK,YAAY,CAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,KACfP,YAAY,GACZG,KAAK;QACRK,IAAI,EAAE,IAAI;QACVC,OAAO,EAAEA,CAAA,KAAM;UACbR,OAAO,CAACK,YAAY,CAAC;YAAEE,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCH,OAAO,CAAC,KAAK,CAAC;QAChB,CAAC;QACDK,QAAQ,EAAEA,CAAA,KAAM;UACdT,OAAO,CAACK,YAAY,CAAC;YAAEE,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCH,OAAO,CAAC,IAAI,CAAC;QACf;MAAC,EACF,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD,CAACJ,OAAO,EAAED,YAAY,CACxB,CAAC;EACD,OAAOE,MAAM;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useSurveyForm.js","names":["useCallback","useSurveyFormContext","useSurveyForm","initialValue","context","survey","value","Promise","resolve","setFormProps","_objectSpread","open","onClose","onSubmit"],"sources":["../../../src/matsuri-ui/useSurveyForm.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { SurveyFormProps } from \"./SurveyForm\";\nimport { useSurveyFormContext } from \"./SurveyFormProvider\";\n\ninterface UseSurveyFormValue extends Omit<\n SurveyFormProps,\n \"open\" | \"onSubmit\" | \"onClose\"\n> {}\n\nexport const useSurveyForm = (initialValue?: UseSurveyFormValue) => {\n const context = useSurveyFormContext();\n\n const survey = useCallback(\n (value?: UseSurveyFormValue) => {\n return new Promise<boolean>((resolve) => {\n context.setFormProps({\n ...initialValue,\n ...value,\n open: true,\n onClose: () => {\n context.setFormProps({ open: false });\n resolve(false);\n },\n onSubmit: () => {\n context.setFormProps({ open: false });\n resolve(true);\n },\n });\n });\n },\n [context, initialValue],\n );\n return survey;\n};\n"],"mappings":";;;;;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,oBAAoB,QAAQ,sBAAsB;AAO3D,OAAO,IAAMC,aAAa,GAAIC,YAAiC,IAAK;EAClE,IAAMC,OAAO,GAAGH,oBAAoB,CAAC,CAAC;EAEtC,IAAMI,MAAM,GAAGL,WAAW,CACvBM,KAA0B,IAAK;IAC9B,OAAO,IAAIC,OAAO,CAAWC,OAAO,IAAK;MACvCJ,OAAO,CAACK,YAAY,CAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,KACfP,YAAY,GACZG,KAAK;QACRK,IAAI,EAAE,IAAI;QACVC,OAAO,EAAEA,CAAA,KAAM;UACbR,OAAO,CAACK,YAAY,CAAC;YAAEE,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCH,OAAO,CAAC,KAAK,CAAC;QAChB,CAAC;QACDK,QAAQ,EAAEA,CAAA,KAAM;UACdT,OAAO,CAACK,YAAY,CAAC;YAAEE,IAAI,EAAE;UAAM,CAAC,CAAC;UACrCH,OAAO,CAAC,IAAI,CAAC;QACf;MAAC,EACF,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD,CAACJ,OAAO,EAAED,YAAY,CACxB,CAAC;EACD,OAAOE,MAAM;AACf,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "matsuri-forms-sdk",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "sideEffects": false,
5
+ "repository": "https://github.com/matsuri-tech/matsuri-forms-manager-front.git",
5
6
  "main": "./index.js",
6
7
  "types": "./index.d.ts",
7
8
  "exports": {
@@ -38,18 +39,18 @@
38
39
  "swr": "^2.0.0"
39
40
  },
40
41
  "devDependencies": {
41
- "@babel/cli": "7.28.3",
42
- "@babel/core": "7.28.4",
42
+ "@babel/cli": "7.28.6",
43
+ "@babel/core": "7.29.0",
43
44
  "@babel/plugin-proposal-class-properties": "7.18.6",
44
- "@babel/plugin-proposal-decorators": "7.28.0",
45
- "@babel/preset-env": "7.28.3",
46
- "@babel/preset-react": "7.27.1",
47
- "@babel/preset-typescript": "7.27.1",
45
+ "@babel/plugin-proposal-decorators": "7.29.0",
46
+ "@babel/preset-env": "7.29.0",
47
+ "@babel/preset-react": "7.28.5",
48
+ "@babel/preset-typescript": "7.28.5",
48
49
  "@emotion/babel-preset-css-prop": "11.12.0",
49
- "@types/react": "19.2.2",
50
- "@types/react-dom": "19.2.1",
50
+ "@types/react": "19.2.13",
51
+ "@types/react-dom": "19.2.3",
51
52
  "concurrently": "9.2.1",
52
- "swr": "2.3.6",
53
+ "swr": "2.4.0",
53
54
  "typescript": "5.9.3"
54
55
  }
55
56
  }