@orangesix/react 2.4.0-beta.3 → 2.4.0

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.
Files changed (150) hide show
  1. package/accordion/@types/index.d.ts +55 -55
  2. package/accordion/accordion/index.esm.js.map +1 -1
  3. package/api/@types/css.d.ts +91 -91
  4. package/api/@types/field.d.ts +161 -159
  5. package/api/@types/index.d.ts +29 -27
  6. package/api/input/index.esm.js.map +1 -1
  7. package/autocomplete/@types/index.d.ts +69 -67
  8. package/autocomplete/autocomplete/index.esm.js.map +1 -1
  9. package/autocomplete/core/core/index.esm.js.map +1 -1
  10. package/autocomplete/core/event/index.esm.js.map +1 -1
  11. package/box/@types/index.d.ts +28 -26
  12. package/box/_box.scss +56 -56
  13. package/box/box/index.esm.js.map +1 -1
  14. package/button/@types/index.d.ts +72 -70
  15. package/button/button/index.esm.js.map +1 -1
  16. package/button/package.json +5 -5
  17. package/calendar/@types/index.d.ts +27 -25
  18. package/calendar/calendar/index.esm.js.map +1 -1
  19. package/calendar/core/controlled/index.esm.js.map +1 -1
  20. package/calendar/core/handle/index.esm.js.map +1 -1
  21. package/calendar/core/hookForm/index.esm.js.map +1 -1
  22. package/calendar/core/locale/index.esm.js.map +1 -1
  23. package/calendar/package.json +5 -5
  24. package/editor/@types/index.d.ts +45 -43
  25. package/editor/_editor.scss +106 -106
  26. package/editor/const/index.esm.js.map +1 -1
  27. package/editor/core/bold/index.esm.js.map +1 -1
  28. package/editor/core/bulletlist/index.esm.js.map +1 -1
  29. package/editor/core/code/index.esm.js.map +1 -1
  30. package/editor/core/color/index.esm.js.map +1 -1
  31. package/editor/core/highlight/index.esm.js.map +1 -1
  32. package/editor/core/image/index.esm.js.map +1 -1
  33. package/editor/core/index/index.esm.js.map +1 -1
  34. package/editor/core/italic/index.esm.js.map +1 -1
  35. package/editor/core/link/index.esm.js.map +1 -1
  36. package/editor/core/orderlist/index.esm.js.map +1 -1
  37. package/editor/core/strike/index.esm.js.map +1 -1
  38. package/editor/core/text/index.esm.js.map +1 -1
  39. package/editor/core/underline/index.esm.js.map +1 -1
  40. package/editor/editor/index.esm.js.map +1 -1
  41. package/input/@types/index.d.ts +109 -107
  42. package/input/core/controlled/index.esm.js.map +1 -1
  43. package/input/core/hookForm/index.esm.js.map +1 -1
  44. package/input/input/index.esm.js.map +1 -1
  45. package/inputfilter/@types/autocomplete.d.ts +20 -20
  46. package/inputfilter/@types/index.d.ts +42 -40
  47. package/inputfilter/_inputfilter.scss +58 -58
  48. package/inputfilter/const/index.esm.js.map +1 -1
  49. package/inputfilter/core/autocomplete/index.esm.js.map +1 -1
  50. package/inputfilter/core/date/index.esm.js.map +1 -1
  51. package/inputfilter/core/number/index.esm.js.map +1 -1
  52. package/inputfilter/core/text/index.esm.js.map +1 -1
  53. package/inputfilter/function/handle/index.esm.js.map +1 -1
  54. package/inputfilter/function/validate/index.esm.js.map +1 -1
  55. package/inputfilter/inputfilter/index.esm.js.map +1 -1
  56. package/inputfilter/legend/index.esm.js.map +1 -1
  57. package/lightbox/@types/index.d.ts +12 -10
  58. package/lightbox/_lightbox.scss +6 -6
  59. package/lightbox/core/handle/index.esm.js.map +1 -1
  60. package/lightbox/lightbox/index.esm.js.map +1 -1
  61. package/lightbox/package.json +5 -5
  62. package/loading/@types/index.d.ts +44 -42
  63. package/loading/_loading.scss +10 -10
  64. package/loading/loading/index.esm.js.map +1 -1
  65. package/loading/package.json +5 -5
  66. package/message/@types/index.d.ts +102 -102
  67. package/message/core/modal/index.esm.js.map +1 -1
  68. package/message/message/index.esm.js.map +1 -1
  69. package/message/package.json +5 -5
  70. package/modal/@types/index.d.ts +63 -61
  71. package/modal/core/core/index.esm.js.map +1 -1
  72. package/modal/modal/index.esm.js.map +1 -1
  73. package/multiselect/@types/index.d.ts +77 -75
  74. package/multiselect/core/controlled/index.esm.js.map +1 -1
  75. package/multiselect/core/hookForm/index.esm.js.map +1 -1
  76. package/multiselect/multiselect/index.esm.js.map +1 -1
  77. package/multiselect/package.json +5 -5
  78. package/package.json +15 -15
  79. package/pdf/@types/index.d.ts +12 -10
  80. package/pdf/package.json +5 -5
  81. package/pdf/pdf/index.esm.js.map +1 -1
  82. package/pdf/style/pdf.css +53 -53
  83. package/picklist/@types/index.d.ts +41 -40
  84. package/picklist/core/core/index.esm.js.map +1 -1
  85. package/picklist/picklist/index.esm.js.map +1 -1
  86. package/picklist/types.d.ts +35 -33
  87. package/radio/@types/index.d.ts +41 -39
  88. package/radio/core/controlled/index.esm.js.map +1 -1
  89. package/radio/core/hookForm/index.esm.js.map +1 -1
  90. package/radio/radio/index.esm.js.map +1 -1
  91. package/select/@types/index.d.ts +46 -44
  92. package/select/core/controlled/index.esm.js.map +1 -1
  93. package/select/core/hookForm/index.esm.js.map +1 -1
  94. package/select/select/index.esm.js.map +1 -1
  95. package/style/scss/_variables.scss +929 -929
  96. package/style/scss/bootstrap.scss +33 -33
  97. package/style/scss/core/_reset.scss +75 -75
  98. package/switch/@types/index.d.ts +22 -20
  99. package/switch/core/controlled/index.esm.js.map +1 -1
  100. package/switch/core/hookForm/index.esm.js.map +1 -1
  101. package/switch/switch/index.esm.js.map +1 -1
  102. package/table/@types/click.d.ts +7 -5
  103. package/table/@types/column.d.ts +58 -56
  104. package/table/@types/edit.d.ts +5 -5
  105. package/table/@types/expand.d.ts +32 -32
  106. package/table/@types/group.d.ts +20 -20
  107. package/table/@types/index.d.ts +63 -61
  108. package/table/@types/pagination.d.ts +26 -26
  109. package/table/@types/reorder.d.ts +16 -16
  110. package/table/@types/selection.d.ts +15 -15
  111. package/table/@types/sort.d.ts +8 -6
  112. package/table/@types/style.d.ts +20 -20
  113. package/table/@types/template.d.ts +22 -20
  114. package/table/core/click/index.esm.js.map +1 -1
  115. package/table/core/core/index.esm.js.map +1 -1
  116. package/table/core/expand/index.esm.js.map +1 -1
  117. package/table/core/group/index.esm.js.map +1 -1
  118. package/table/core/pagination/index.esm.js.map +1 -1
  119. package/table/core/reorder/index.esm.js.map +1 -1
  120. package/table/core/selection/index.esm.js.map +1 -1
  121. package/table/core/sort/index.esm.js.map +1 -1
  122. package/table/styled/index.esm.js.map +1 -1
  123. package/table/table/index.esm.js.map +1 -1
  124. package/tablepivot/@types/index.d.ts +50 -50
  125. package/tablepivot/@types/webdatarocks.d.ts +166 -166
  126. package/tablepivot/_tablepivot.scss +84 -84
  127. package/tablepivot/function/handle/index.esm.js.map +1 -1
  128. package/tablepivot/lang/pt-br/index.esm.js.map +1 -1
  129. package/tablepivot/tablepivot/index.esm.js.map +1 -1
  130. package/tabview/@types/index.d.ts +61 -59
  131. package/tabview/_tabview.scss +25 -25
  132. package/tabview/tabview/index.esm.js.map +1 -1
  133. package/textarea/@types/index.d.ts +18 -16
  134. package/textarea/core/controlled/index.esm.js.map +1 -1
  135. package/textarea/core/hookForm/index.esm.js.map +1 -1
  136. package/textarea/textarea/index.esm.js.map +1 -1
  137. package/tooltip/@types/index.d.ts +59 -57
  138. package/tooltip/core/handle/index.esm.js.map +1 -1
  139. package/tooltip/package.json +5 -5
  140. package/tooltip/tooltip/index.esm.js.map +1 -1
  141. package/utils/@types/index.d.ts +2 -2
  142. package/utils/@types/message.d.ts +18 -16
  143. package/utils/@types/request.d.ts +22 -22
  144. package/utils/@types/response.d.ts +55 -55
  145. package/utils/const/index.esm.js.map +1 -1
  146. package/utils/handle/index.esm.js.map +1 -1
  147. package/utils/helper/index.esm.js.map +1 -1
  148. package/utils/message/index.esm.js.map +1 -1
  149. package/utils/request/index.esm.js.map +1 -1
  150. package/utils/response/index.esm.js.map +1 -1
@@ -1,26 +1,28 @@
1
1
  import { ApiFieldModeProps, ApiComponentProps, ApiFieldHookFormProps, ApiFieldComponentProps, ApiFieldControlledProps } from '../../api';
2
- export interface CalendarBaseProps extends ApiComponentProps, ApiFieldComponentProps {
3
- /**
4
- * Define o formato do calendário
5
- */
6
- view?: "date" | "month" | "year"
7
-
8
- /**
9
- * Define o formato da exibição da data
10
- */
11
- format?: string
12
-
13
- /**
14
- * Define a quantidade de mês a ser exibido
15
- */
16
- numberMonths?: number
17
-
18
- /**
19
- * Define o local onde vai ser renderizado calendário
20
- */
21
- appendTo?: "self" | HTMLElement | undefined | null | (() => HTMLElement)
22
- }
23
-
24
- export type CalendarProps<T extends ApiFieldModeProps> = T extends "Controlled"
25
- ? CalendarBaseProps & ApiFieldControlledProps
26
- : CalendarBaseProps & ApiFieldHookFormProps;
2
+
3
+
4
+ export interface CalendarBaseProps extends ApiComponentProps, ApiFieldComponentProps {
5
+ /**
6
+ * Define o formato do calendário
7
+ */
8
+ view?: "date" | "month" | "year"
9
+
10
+ /**
11
+ * Define o formato da exibição da data
12
+ */
13
+ format?: string
14
+
15
+ /**
16
+ * Define a quantidade de mês a ser exibido
17
+ */
18
+ numberMonths?: number
19
+
20
+ /**
21
+ * Define o local onde vai ser renderizado calendário
22
+ */
23
+ appendTo?: "self" | HTMLElement | undefined | null | (() => HTMLElement)
24
+ }
25
+
26
+ export type CalendarProps<T extends ApiFieldModeProps> = T extends "Controlled"
27
+ ? CalendarBaseProps & ApiFieldControlledProps
28
+ : CalendarBaseProps & ApiFieldHookFormProps;
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/calendar/calendar.tsx"],"sourcesContent":["import React from \"react\";\nimport { Box } from \"../box\";\nimport { CalendarProps } from \".\";\nimport { ApiFieldModeProps } from \"../api\";\nimport { localePT_BR } from \"./core/locale\";\nimport { InputLabel, InputProps } from \"../api\";\nimport { addLocale, locale } from \"primereact/api\";\nimport { CalendarHookForm } from \"./core/hookForm\";\nimport { CalendarControlled } from \"./core/controlled\";\n\naddLocale(\"pt-BR\", localePT_BR);\nlocale(\"pt-BR\");\n\n/**\n * Componente - `Calendar`\n *\n * Um componente versátil que é utilizado para entrada de dados do formator de data.\n */\nexport function Calendar<T extends ApiFieldModeProps = \"Controlled\">(props: CalendarProps<T> & { mode?: T }) {\n let propsCore = props as any;\n let core = { ...InputProps(propsCore) };\n\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return (\n <Box className={props.className}\n css={props.css}\n size={props.size ?? \"100\"}>\n <InputLabel {...props}/>\n {!props.mode || props.mode === \"Controlled\"\n ? <CalendarControlled\n core={core}\n {...propsCore}/>\n : <CalendarHookForm\n core={core}\n {...propsCore}/>\n }\n </Box>\n );\n}\n\nCalendar.displayName = \"Calendar\";"],"mappings":";;;;;;;;;;AAUA,EAAU,SAAS,EAAY,EAC/B,EAAO,QAAQ;AAOf,SAAgB,EAAqD,GAAwC;CACzG,IAAI,IAAY,GACZ,IAAO,EAAE,GAAG,EAAW,EAAU,EAAE;CAOvC,OACI,kBAAC,GAAD;EAAK,WAAW,EAAM;EAClB,KAAK,EAAM;EACX,MAAM,EAAM,QAAQ;YAFxB,CAGI,kBAAC,GAAD,EAAY,GAAI,GAAQ,CAAA,EACvB,CAAC,EAAM,QAAQ,EAAM,SAAS,eACzB,kBAAC,GAAD;GACQ;GACN,GAAI;GAAY,CAAA,GAClB,kBAAC,GAAD;GACQ;GACN,GAAI;GAAY,CAAA,CAEtB;;;AAId,EAAS,cAAc"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/calendar/calendar.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { Box } from \"../box\";\r\nimport { CalendarProps } from \".\";\r\nimport { ApiFieldModeProps } from \"../api\";\r\nimport { localePT_BR } from \"./core/locale\";\r\nimport { InputLabel, InputProps } from \"../api\";\r\nimport { addLocale, locale } from \"primereact/api\";\r\nimport { CalendarHookForm } from \"./core/hookForm\";\r\nimport { CalendarControlled } from \"./core/controlled\";\r\n\r\naddLocale(\"pt-BR\", localePT_BR);\r\nlocale(\"pt-BR\");\r\n\r\n/**\r\n * Componente - `Calendar`\r\n *\r\n * Um componente versátil que é utilizado para entrada de dados do formator de data.\r\n */\r\nexport function Calendar<T extends ApiFieldModeProps = \"Controlled\">(props: CalendarProps<T> & { mode?: T }) {\r\n let propsCore = props as any;\r\n let core = { ...InputProps(propsCore) };\r\n\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <Box className={props.className}\r\n css={props.css}\r\n size={props.size ?? \"100\"}>\r\n <InputLabel {...props}/>\r\n {!props.mode || props.mode === \"Controlled\"\r\n ? <CalendarControlled\r\n core={core}\r\n {...propsCore}/>\r\n : <CalendarHookForm\r\n core={core}\r\n {...propsCore}/>\r\n }\r\n </Box>\r\n );\r\n}\r\n\r\nCalendar.displayName = \"Calendar\";"],"mappings":";;;;;;;;;;AAUA,EAAU,SAAS,CAAW,GAC9B,EAAO,OAAO;AAOd,SAAgB,EAAqD,GAAwC;CACzG,IAAI,IAAY,GACZ,IAAO,EAAE,GAAG,EAAW,CAAS,EAAE;CAOtC,OACI,kBAAC,GAAD;EAAK,WAAW,EAAM;EAClB,KAAK,EAAM;EACX,MAAM,EAAM,QAAQ;YAFxB,CAGI,kBAAC,GAAD,EAAY,GAAI,EAAO,CAAA,GACtB,CAAC,EAAM,QAAQ,EAAM,SAAS,eACzB,kBAAC,GAAD;GACQ;GACN,GAAI;EAAW,CAAA,IACjB,kBAAC,GAAD;GACQ;GACN,GAAI;EAAW,CAAA,CAEtB;;AAEb;AAEA,EAAS,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/calendar/core/controlled.tsx"],"sourcesContent":["import React from \"react\";\nimport { CalendarProps } from \"..\";\nimport { InputFeedback } from \"../../api\";\nimport { Calendar } from \"primereact/calendar\";\nimport { handleResponse, handleValue } from \"./handle\";\n\ntype Props = {\n core: any & { ref: React.Ref<HTMLInputElement> | undefined },\n};\n\n/**\n * Core - `CalendarControlled`\n * Define o componente controlled\n */\nexport function CalendarControlled({ core, ...props }: CalendarProps<\"Controlled\"> & Props) {\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return <>\n <div className=\"w-100 d-flex flex-column\">\n <Calendar\n {...core}\n showButtonBar\n appendTo={props.appendTo}\n className=\"w-100 calendar\"\n dateFormat={props.format ?? \"dd/mm/yy\"}\n locale=\"pt-BR\"\n numberOfMonths={props.numberMonths ?? 1}\n panelClassName=\"calendar-panel\"\n value={handleValue(props.value)}\n view={props.view ?? \"date\"}\n onBlur={event => {\n if (props.onBlur) {\n props.onBlur(event.target);\n }\n }}\n onChange={event => {\n if (props.onChange) {\n props.onChange(handleResponse(event.target.value as Date));\n }\n }}/>\n <InputFeedback {...props}/>\n </div>\n <InputFeedback {...props}/>\n </>;\n}"],"mappings":";;;;;;;AAcA,SAAgB,EAAmB,EAAE,SAAM,GAAG,KAA8C;CAMxF,OAAO,kBAAA,GAAA,EAAA,UAAA,CACH,kBAAC,OAAD;EAAK,WAAU;YAAf,CACI,kBAAC,GAAD;GACI,GAAI;GACJ,eAAA;GACA,UAAU,EAAM;GAChB,WAAU;GACV,YAAY,EAAM,UAAU;GAC5B,QAAO;GACP,gBAAgB,EAAM,gBAAgB;GACtC,gBAAe;GACf,OAAO,EAAY,EAAM,MAAM;GAC/B,MAAM,EAAM,QAAQ;GACpB,SAAQ,MAAS;IACb,AAAI,EAAM,UACN,EAAM,OAAO,EAAM,OAAO;;GAGlC,WAAU,MAAS;IACf,AAAI,EAAM,YACN,EAAM,SAAS,EAAe,EAAM,OAAO,MAAc,CAAC;;GAE9D,CAAA,EACR,kBAAC,GAAD,EAAe,GAAI,GAAQ,CAAA,CACzB;KACN,kBAAC,GAAD,EAAe,GAAI,GAAQ,CAAA,CAC5B,EAAA,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/calendar/core/controlled.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { CalendarProps } from \"..\";\r\nimport { InputFeedback } from \"../../api\";\r\nimport { Calendar } from \"primereact/calendar\";\r\nimport { handleResponse, handleValue } from \"./handle\";\r\n\r\ntype Props = {\r\n core: any & { ref: React.Ref<HTMLInputElement> | undefined },\r\n};\r\n\r\n/**\r\n * Core - `CalendarControlled`\r\n * Define o componente controlled\r\n */\r\nexport function CalendarControlled({ core, ...props }: CalendarProps<\"Controlled\"> & Props) {\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return <>\r\n <div className=\"w-100 d-flex flex-column\">\r\n <Calendar\r\n {...core}\r\n showButtonBar\r\n appendTo={props.appendTo}\r\n className=\"w-100 calendar\"\r\n dateFormat={props.format ?? \"dd/mm/yy\"}\r\n locale=\"pt-BR\"\r\n numberOfMonths={props.numberMonths ?? 1}\r\n panelClassName=\"calendar-panel\"\r\n value={handleValue(props.value)}\r\n view={props.view ?? \"date\"}\r\n onBlur={event => {\r\n if (props.onBlur) {\r\n props.onBlur(event.target);\r\n }\r\n }}\r\n onChange={event => {\r\n if (props.onChange) {\r\n props.onChange(handleResponse(event.target.value as Date));\r\n }\r\n }}/>\r\n <InputFeedback {...props}/>\r\n </div>\r\n <InputFeedback {...props}/>\r\n </>;\r\n}"],"mappings":";;;;;;;AAcA,SAAgB,EAAmB,EAAE,SAAM,GAAG,KAA8C;CAMxF,OAAO,kBAAA,GAAA,EAAA,UAAA,CACH,kBAAC,OAAD;EAAK,WAAU;YAAf,CACI,kBAAC,GAAD;GACI,GAAI;GACJ,eAAA;GACA,UAAU,EAAM;GAChB,WAAU;GACV,YAAY,EAAM,UAAU;GAC5B,QAAO;GACP,gBAAgB,EAAM,gBAAgB;GACtC,gBAAe;GACf,OAAO,EAAY,EAAM,KAAK;GAC9B,MAAM,EAAM,QAAQ;GACpB,SAAQ,MAAS;IACb,AAAI,EAAM,UACN,EAAM,OAAO,EAAM,MAAM;GAEjC;GACA,WAAU,MAAS;IACf,AAAI,EAAM,YACN,EAAM,SAAS,EAAe,EAAM,OAAO,KAAa,CAAC;GAEjE;EAAG,CAAA,GACP,kBAAC,GAAD,EAAe,GAAI,EAAO,CAAA,CACzB;KACL,kBAAC,GAAD,EAAe,GAAI,EAAO,CAAA,CAC5B,EAAA,CAAA;AACN"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/calendar/core/handle.ts"],"sourcesContent":["/**\n * Formata o retorno para component\n * @param date\n */\nexport function handleResponse(date: Date | null): string | null {\n if (date instanceof Date) {\n let year = date.getFullYear();\n let month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n return `${year}-${month}-${day}`;\n }\n return null;\n}\n\n/**\n * Retorna o valor para ser inserido no component\n * @param date\n */\nexport function handleValue(date: string): Date | null {\n if (typeof date === \"object\" || typeof date === \"undefined\") {\n return null;\n }\n\n const [datePart, timePart] = date.trim().split(/[T ]/);\n const [y, m, d] = datePart.split(\"-\").map(Number);\n\n if (timePart && /^\\d{2}:\\d{2}(:\\d{2})?$/.test(timePart)) {\n const [hh, mm, ss = \"0\"] = timePart.split(\":\");\n return new Date(y, (m ?? 1) - 1, d ?? 1, Number(hh), Number(mm), Number(ss));\n }\n\n return new Date(y, (m ?? 1) - 1, d ?? 1, 0, 0, 0);\n}"],"mappings":";AAIA,SAAgB,EAAe,GAAkC;CAO7D,OANI,aAAgB,OAIT,GAHI,EAAK,aAGN,CAAK,GAFH,OAAO,EAAK,UAAU,GAAG,EAAE,CAAC,SAAS,GAAG,IAElC,CAAM,GADZ,OAAO,EAAK,SAAS,CAAC,CAAC,SAAS,GAAG,IACpB,KAExB;;AAOX,SAAgB,EAAY,GAA2B;CACnD,IAAI,OAAO,KAAS,YAAmB,MAAS,QAC5C,OAAO;CAGX,IAAM,CAAC,GAAU,KAAY,EAAK,MAAM,CAAC,MAAM,OAAO,EAChD,CAAC,GAAG,GAAG,KAAK,EAAS,MAAM,IAAI,CAAC,IAAI,OAAO;CAEjD,IAAI,KAAY,yBAAyB,KAAK,EAAS,EAAE;EACrD,IAAM,CAAC,GAAI,GAAI,IAAK,OAAO,EAAS,MAAM,IAAI;EAC9C,OAAO,IAAI,KAAK,IAAI,KAAK,KAAK,GAAG,KAAK,GAAG,OAAO,EAAG,EAAE,OAAO,EAAG,EAAE,OAAO,EAAG,CAAC;;CAGhF,OAAO,IAAI,KAAK,IAAI,KAAK,KAAK,GAAG,KAAK,GAAG,GAAG,GAAG,EAAE"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/calendar/core/handle.ts"],"sourcesContent":["/**\r\n * Formata o retorno para component\r\n * @param date\r\n */\r\nexport function handleResponse(date: Date | null): string | null {\r\n if (date instanceof Date) {\r\n let year = date.getFullYear();\r\n let month = String(date.getMonth() + 1).padStart(2, \"0\");\r\n const day = String(date.getDate()).padStart(2, \"0\");\r\n return `${year}-${month}-${day}`;\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Retorna o valor para ser inserido no component\r\n * @param date\r\n */\r\nexport function handleValue(date: string): Date | null {\r\n if (typeof date === \"object\" || typeof date === \"undefined\") {\r\n return null;\r\n }\r\n\r\n const [datePart, timePart] = date.trim().split(/[T ]/);\r\n const [y, m, d] = datePart.split(\"-\").map(Number);\r\n\r\n if (timePart && /^\\d{2}:\\d{2}(:\\d{2})?$/.test(timePart)) {\r\n const [hh, mm, ss = \"0\"] = timePart.split(\":\");\r\n return new Date(y, (m ?? 1) - 1, d ?? 1, Number(hh), Number(mm), Number(ss));\r\n }\r\n\r\n return new Date(y, (m ?? 1) - 1, d ?? 1, 0, 0, 0);\r\n}"],"mappings":";AAIA,SAAgB,EAAe,GAAkC;CAO7D,OANI,aAAgB,OAIT,GAHI,EAAK,YAGN,EAAK,GAFH,OAAO,EAAK,SAAS,IAAI,CAAC,EAAE,SAAS,GAAG,GAElC,EAAM,GADZ,OAAO,EAAK,QAAQ,CAAC,EAAE,SAAS,GAAG,GACpB,MAExB;AACX;AAMA,SAAgB,EAAY,GAA2B;CACnD,IAAI,OAAO,KAAS,YAAmB,MAAS,QAC5C,OAAO;CAGX,IAAM,CAAC,GAAU,KAAY,EAAK,KAAK,EAAE,MAAM,MAAM,GAC/C,CAAC,GAAG,GAAG,KAAK,EAAS,MAAM,GAAG,EAAE,IAAI,MAAM;CAEhD,IAAI,KAAY,yBAAyB,KAAK,CAAQ,GAAG;EACrD,IAAM,CAAC,GAAI,GAAI,IAAK,OAAO,EAAS,MAAM,GAAG;EAC7C,OAAO,IAAI,KAAK,IAAI,KAAK,KAAK,GAAG,KAAK,GAAG,OAAO,CAAE,GAAG,OAAO,CAAE,GAAG,OAAO,CAAE,CAAC;CAC/E;CAEA,OAAO,IAAI,KAAK,IAAI,KAAK,KAAK,GAAG,KAAK,GAAG,GAAG,GAAG,CAAC;AACpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/calendar/core/hookForm.tsx"],"sourcesContent":["import React from \"react\";\nimport { CalendarProps } from \"..\";\nimport { InputFeedback } from \"../../api\";\nimport { Controller } from \"react-hook-form\";\nimport { Calendar } from \"primereact/calendar\";\nimport { handleResponse, handleValue } from \"./handle\";\n\ntype Props = {\n core: any & { ref: React.Ref<HTMLInputElement> | undefined }\n};\n\n/**\n * Core - `CalendarHookForm`\n * Define o componente utilizando o HookForm\n */\nexport function CalendarHookForm({ core, ...props }: CalendarProps<\"HookForm\"> & Props) {\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return (\n <Controller\n render={({ field, formState: { errors } }) => {\n return (\n <div className=\"w-100 d-flex flex-column\">\n <Calendar\n {...core}\n showButtonBar\n appendTo={props.appendTo}\n className=\"w-100 calendar\"\n dateFormat={props.format ?? \"dd/mm/yy\"}\n invalid={!!errors[props.name]}\n locale=\"pt-BR\"\n numberOfMonths={props.numberMonths ?? 1}\n panelClassName=\"calendar-panel\"\n value={handleValue(field.value)}\n view={props.view ?? \"date\"}\n onChange={e => props.onChange !== undefined\n ? props.onChange(handleResponse(e.target.value as Date))\n : field.onChange(handleResponse(e.target.value as Date))}\n onBlur={e => props.onBlur ? props.onBlur(e.target.value) : field.onBlur()}/>\n <InputFeedback {...props}\n errors={errors}/>\n </div>\n );\n }}\n control={props.control}\n name={props.name}\n rules={{ required: !props.required ? false : \"Campo obrigatório\" }}/>\n );\n}"],"mappings":";;;;;;;;AAeA,SAAgB,EAAiB,EAAE,SAAM,GAAG,KAA4C;CAMpF,OACI,kBAAC,GAAD;EACI,SAAS,EAAE,UAAO,WAAW,EAAE,kBAEvB,kBAAC,OAAD;GAAK,WAAU;aAAf,CACI,kBAAC,GAAD;IACI,GAAI;IACJ,eAAA;IACA,UAAU,EAAM;IAChB,WAAU;IACV,YAAY,EAAM,UAAU;IAC5B,SAAS,CAAC,CAAC,EAAO,EAAM;IACxB,QAAO;IACP,gBAAgB,EAAM,gBAAgB;IACtC,gBAAe;IACf,OAAO,EAAY,EAAM,MAAM;IAC/B,MAAM,EAAM,QAAQ;IACpB,WAAU,MAAK,EAAM,aAAa,KAAA,IAE5B,EAAM,SAAS,EAAe,EAAE,OAAO,MAAc,CAAC,GADtD,EAAM,SAAS,EAAe,EAAE,OAAO,MAAc,CAAC;IAE5D,SAAQ,MAAK,EAAM,SAAS,EAAM,OAAO,EAAE,OAAO,MAAM,GAAG,EAAM,QAAQ;IAAG,CAAA,EAChF,kBAAC,GAAD;IAAe,GAAI;IACP;IAAS,CAAA,CACnB;;EAGd,SAAS,EAAM;EACf,MAAM,EAAM;EACZ,OAAO,EAAE,UAAW,EAAM,WAAmB,sBAAR,IAA6B;EAAG,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/calendar/core/hookForm.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { CalendarProps } from \"..\";\r\nimport { InputFeedback } from \"../../api\";\r\nimport { Controller } from \"react-hook-form\";\r\nimport { Calendar } from \"primereact/calendar\";\r\nimport { handleResponse, handleValue } from \"./handle\";\r\n\r\ntype Props = {\r\n core: any & { ref: React.Ref<HTMLInputElement> | undefined }\r\n};\r\n\r\n/**\r\n * Core - `CalendarHookForm`\r\n * Define o componente utilizando o HookForm\r\n */\r\nexport function CalendarHookForm({ core, ...props }: CalendarProps<\"HookForm\"> & Props) {\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <Controller\r\n render={({ field, formState: { errors } }) => {\r\n return (\r\n <div className=\"w-100 d-flex flex-column\">\r\n <Calendar\r\n {...core}\r\n showButtonBar\r\n appendTo={props.appendTo}\r\n className=\"w-100 calendar\"\r\n dateFormat={props.format ?? \"dd/mm/yy\"}\r\n invalid={!!errors[props.name]}\r\n locale=\"pt-BR\"\r\n numberOfMonths={props.numberMonths ?? 1}\r\n panelClassName=\"calendar-panel\"\r\n value={handleValue(field.value)}\r\n view={props.view ?? \"date\"}\r\n onChange={e => props.onChange !== undefined\r\n ? props.onChange(handleResponse(e.target.value as Date))\r\n : field.onChange(handleResponse(e.target.value as Date))}\r\n onBlur={e => props.onBlur ? props.onBlur(e.target.value) : field.onBlur()}/>\r\n <InputFeedback {...props}\r\n errors={errors}/>\r\n </div>\r\n );\r\n }}\r\n control={props.control}\r\n name={props.name}\r\n rules={{ required: !props.required ? false : \"Campo obrigatório\" }}/>\r\n );\r\n}"],"mappings":";;;;;;;;AAeA,SAAgB,EAAiB,EAAE,SAAM,GAAG,KAA4C;CAMpF,OACI,kBAAC,GAAD;EACI,SAAS,EAAE,UAAO,WAAW,EAAE,kBAEvB,kBAAC,OAAD;GAAK,WAAU;aAAf,CACI,kBAAC,GAAD;IACI,GAAI;IACJ,eAAA;IACA,UAAU,EAAM;IAChB,WAAU;IACV,YAAY,EAAM,UAAU;IAC5B,SAAS,CAAC,CAAC,EAAO,EAAM;IACxB,QAAO;IACP,gBAAgB,EAAM,gBAAgB;IACtC,gBAAe;IACf,OAAO,EAAY,EAAM,KAAK;IAC9B,MAAM,EAAM,QAAQ;IACpB,WAAU,MAAK,EAAM,aAAa,KAAA,IAE5B,EAAM,SAAS,EAAe,EAAE,OAAO,KAAa,CAAC,IADrD,EAAM,SAAS,EAAe,EAAE,OAAO,KAAa,CAAC;IAE3D,SAAQ,MAAK,EAAM,SAAS,EAAM,OAAO,EAAE,OAAO,KAAK,IAAI,EAAM,OAAO;GAAG,CAAA,GAC/E,kBAAC,GAAD;IAAe,GAAI;IACP;GAAQ,CAAA,CACnB;;EAGb,SAAS,EAAM;EACf,MAAM,EAAM;EACZ,OAAO,EAAE,UAAW,EAAM,WAAmB,sBAAR,GAA4B;CAAG,CAAA;AAEhF"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/calendar/core/locale.ts"],"sourcesContent":["import { LocaleOptions } from \"primereact/api\";\n\nexport const localePT_BR: LocaleOptions = {\n firstDayOfWeek: 0,\n dayNames: [\"Domingo\", \"Segunda-feira\", \"Terça-feira\", \"Quarta-feira\", \"Quinta-feira\", \"Sexta-feira\", \"Sábado\"],\n dayNamesShort: [\"dom\", \"seg\", \"ter\", \"qua\", \"qui\", \"sex\", \"sáb\"],\n dayNamesMin: [\"D\", \"S\", \"T\", \"Q\", \"Q\", \"S\", \"S\"],\n monthNames: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\n monthNamesShort: [\"jan\", \"fev\", \"mar\", \"abr\", \"mai\", \"jun\", \"jul\", \"ago\", \"set\", \"out\", \"nov\", \"dez\"],\n today: \"Hoje\",\n clear: \"Limpar\",\n weekHeader: \"Sem\",\n dateFormat: \"dd/mm/yy\"\n};"],"mappings":";AAEA,IAAa,IAA6B;CACtC,gBAAgB;CAChB,UAAU;EAAC;EAAW;EAAiB;EAAe;EAAgB;EAAgB;EAAe;EAAS;CAC9G,eAAe;EAAC;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAM;CAChE,aAAa;EAAC;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAI;CAChD,YAAY;EAAC;EAAW;EAAa;EAAS;EAAS;EAAQ;EAAS;EAAS;EAAU;EAAY;EAAW;EAAY;EAAW;CACzI,iBAAiB;EAAC;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAM;CACrG,OAAO;CACP,OAAO;CACP,YAAY;CACZ,YAAY;CACf"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/calendar/core/locale.ts"],"sourcesContent":["import { LocaleOptions } from \"primereact/api\";\r\n\r\nexport const localePT_BR: LocaleOptions = {\r\n firstDayOfWeek: 0,\r\n dayNames: [\"Domingo\", \"Segunda-feira\", \"Terça-feira\", \"Quarta-feira\", \"Quinta-feira\", \"Sexta-feira\", \"Sábado\"],\r\n dayNamesShort: [\"dom\", \"seg\", \"ter\", \"qua\", \"qui\", \"sex\", \"sáb\"],\r\n dayNamesMin: [\"D\", \"S\", \"T\", \"Q\", \"Q\", \"S\", \"S\"],\r\n monthNames: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n monthNamesShort: [\"jan\", \"fev\", \"mar\", \"abr\", \"mai\", \"jun\", \"jul\", \"ago\", \"set\", \"out\", \"nov\", \"dez\"],\r\n today: \"Hoje\",\r\n clear: \"Limpar\",\r\n weekHeader: \"Sem\",\r\n dateFormat: \"dd/mm/yy\"\r\n};"],"mappings":";AAEA,IAAa,IAA6B;CACtC,gBAAgB;CAChB,UAAU;EAAC;EAAW;EAAiB;EAAe;EAAgB;EAAgB;EAAe;CAAQ;CAC7G,eAAe;EAAC;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;CAAK;CAC/D,aAAa;EAAC;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;CAAG;CAC/C,YAAY;EAAC;EAAW;EAAa;EAAS;EAAS;EAAQ;EAAS;EAAS;EAAU;EAAY;EAAW;EAAY;CAAU;CACxI,iBAAiB;EAAC;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;CAAK;CACpG,OAAO;CACP,OAAO;CACP,YAAY;CACZ,YAAY;AAChB"}
@@ -1,5 +1,5 @@
1
- {
2
- "main": "./index.cjs.js",
3
- "module": "./index.esm.js",
4
- "types": "./index.d.ts"
5
- }
1
+ {
2
+ "main": "./index.cjs.js",
3
+ "module": "./index.esm.js",
4
+ "types": "./index.d.ts"
5
+ }
@@ -1,46 +1,48 @@
1
1
  import { Editor } from '@tiptap/react';
2
2
  import { ApiComponentProps, ApiFieldComponentProps } from '../../api';
3
- export interface EditorCoreProps {
4
- /**
5
- * Propriedade de edição do editor de código do pacote TipTap
6
- * @link https://tiptap.dev/
7
- */
8
- editor: Editor
9
- }
10
-
11
- export interface EditorOptionsProps {
12
- text: boolean
13
- bold: boolean;
14
- italic: boolean;
15
- color: boolean
16
- strike: boolean;
17
- underline: boolean;
18
- code: boolean;
19
- highlight: boolean;
20
- bulletlist: boolean
21
- orderlist: boolean
22
- link: boolean
23
- image: boolean
24
- }
25
-
26
- export interface EditorProps extends ApiComponentProps, ApiFieldComponentProps {
27
- /**
28
- * Valor inicial do editor de texto
29
- */
30
- value: string;
31
-
32
- /**
33
- * Define quais opção será renderizada no editor de texto
34
- */
35
- options?: EditorOptions | "basic" | "full"
36
-
37
- /**
38
- * Define a altura minima do editor
39
- */
40
- height?: number
41
-
42
- /**
43
- * Metodo responsável por alterar o valor do state inicial
44
- */
45
- onChange(value: string): void
3
+
4
+
5
+ export interface EditorCoreProps {
6
+ /**
7
+ * Propriedade de edição do editor de código do pacote TipTap
8
+ * @link https://tiptap.dev/
9
+ */
10
+ editor: Editor
11
+ }
12
+
13
+ export interface EditorOptionsProps {
14
+ text: boolean
15
+ bold: boolean;
16
+ italic: boolean;
17
+ color: boolean
18
+ strike: boolean;
19
+ underline: boolean;
20
+ code: boolean;
21
+ highlight: boolean;
22
+ bulletlist: boolean
23
+ orderlist: boolean
24
+ link: boolean
25
+ image: boolean
26
+ }
27
+
28
+ export interface EditorProps extends ApiComponentProps, ApiFieldComponentProps {
29
+ /**
30
+ * Valor inicial do editor de texto
31
+ */
32
+ value: string;
33
+
34
+ /**
35
+ * Define quais opção será renderizada no editor de texto
36
+ */
37
+ options?: EditorOptions | "basic" | "full"
38
+
39
+ /**
40
+ * Define a altura minima do editor
41
+ */
42
+ height?: number
43
+
44
+ /**
45
+ * Metodo responsável por alterar o valor do state inicial
46
+ */
47
+ onChange(value: string): void
46
48
  }
@@ -1,107 +1,107 @@
1
- .editor-container {
2
- position: relative;
3
- width: 100%;
4
- display: flex;
5
- flex-wrap: wrap;
6
- border-radius: $editorToolbarBorderRadius;
7
- border: 1px solid #{$shade300};
8
-
9
- .editor {
10
- width: 100%;
11
- font-size: $fontSize;
12
- background: $editorContentBg;
13
- }
14
-
15
- .editor-menu {
16
- overflow-x: auto;
17
- display: flex;
18
- width: 100%;
19
- padding: 2.5px;
20
- align-items: center;
21
- border-bottom: 1px solid #{$shade300};
22
-
23
- &-group {
24
- display: flex;
25
- margin: auto 10px;
26
- }
27
-
28
- &-item {
29
- color: $editorToolbarIconColor;
30
- margin: auto 5px;
31
- font-size: calc($fontSize * 1.2);
32
- }
33
-
34
- &-item.active {
35
- color: $editorIconActiveColor;
36
- }
37
- }
38
-
39
- .editor-menu::-webkit-scrollbar {
40
- height: 2px;
41
- width: 0;
42
- background: transparent;
43
- }
44
-
45
- .editor-menu::-webkit-scrollbar-thumb {
46
- border-radius: 5px;
47
- background: $scrollThumbBg;
48
- border: none;
49
- }
50
-
51
- .editor-link {
52
- display: flex;
53
- min-width: 300px;
54
- z-index: 5000;
55
- align-items: center;
56
- top: 45px;
57
- left: 10px;
58
- border: 1px solid #f1f1f1;
59
- border-radius: 3px;
60
- padding: 10px;
61
- background: #fff;
62
- position: absolute;
63
- }
64
-
65
- .editor-image {
66
- margin-top: 3px;
67
- position: relative;
68
-
69
- input {
70
- position: absolute;
71
- top: 0;
72
- left: 0;
73
- right: 0;
74
- bottom: 0;
75
- opacity: 0;
76
- }
77
- }
78
-
79
- /**
80
- * Personalização do style do Tiptap
81
- */
82
- .tiptap {
83
- flex: 1;
84
- padding: 10px;
85
-
86
- a {
87
- color: $primaryColor;
88
- text-decoration: underline solid $primaryColor;
89
- }
90
-
91
- code {
92
- background: #f0f0f0;
93
- border-bottom: 3px;
94
- padding: 2px 4px;
95
- font-size: 85%;
96
- }
97
-
98
- img {
99
- max-width: 100%;
100
- }
101
- }
102
-
103
- .tiptap.ProseMirror-focused {
104
- border-radius: $editorToolbarBorderRadius;
105
- outline: none !important;
106
- }
1
+ .editor-container {
2
+ position: relative;
3
+ width: 100%;
4
+ display: flex;
5
+ flex-wrap: wrap;
6
+ border-radius: $editorToolbarBorderRadius;
7
+ border: 1px solid #{$shade300};
8
+
9
+ .editor {
10
+ width: 100%;
11
+ font-size: $fontSize;
12
+ background: $editorContentBg;
13
+ }
14
+
15
+ .editor-menu {
16
+ overflow-x: auto;
17
+ display: flex;
18
+ width: 100%;
19
+ padding: 2.5px;
20
+ align-items: center;
21
+ border-bottom: 1px solid #{$shade300};
22
+
23
+ &-group {
24
+ display: flex;
25
+ margin: auto 10px;
26
+ }
27
+
28
+ &-item {
29
+ color: $editorToolbarIconColor;
30
+ margin: auto 5px;
31
+ font-size: calc($fontSize * 1.2);
32
+ }
33
+
34
+ &-item.active {
35
+ color: $editorIconActiveColor;
36
+ }
37
+ }
38
+
39
+ .editor-menu::-webkit-scrollbar {
40
+ height: 2px;
41
+ width: 0;
42
+ background: transparent;
43
+ }
44
+
45
+ .editor-menu::-webkit-scrollbar-thumb {
46
+ border-radius: 5px;
47
+ background: $scrollThumbBg;
48
+ border: none;
49
+ }
50
+
51
+ .editor-link {
52
+ display: flex;
53
+ min-width: 300px;
54
+ z-index: 5000;
55
+ align-items: center;
56
+ top: 45px;
57
+ left: 10px;
58
+ border: 1px solid #f1f1f1;
59
+ border-radius: 3px;
60
+ padding: 10px;
61
+ background: #fff;
62
+ position: absolute;
63
+ }
64
+
65
+ .editor-image {
66
+ margin-top: 3px;
67
+ position: relative;
68
+
69
+ input {
70
+ position: absolute;
71
+ top: 0;
72
+ left: 0;
73
+ right: 0;
74
+ bottom: 0;
75
+ opacity: 0;
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Personalização do style do Tiptap
81
+ */
82
+ .tiptap {
83
+ flex: 1;
84
+ padding: 10px;
85
+
86
+ a {
87
+ color: $primaryColor;
88
+ text-decoration: underline solid $primaryColor;
89
+ }
90
+
91
+ code {
92
+ background: #f0f0f0;
93
+ border-bottom: 3px;
94
+ padding: 2px 4px;
95
+ font-size: 85%;
96
+ }
97
+
98
+ img {
99
+ max-width: 100%;
100
+ }
101
+ }
102
+
103
+ .tiptap.ProseMirror-focused {
104
+ border-radius: $editorToolbarBorderRadius;
105
+ outline: none !important;
106
+ }
107
107
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/editor/const.ts"],"sourcesContent":["import { EditorOptionsProps } from \".\";\n\nexport const editorBasic: EditorOptionsProps = {\n text: true,\n bold: true,\n italic: true,\n color: true,\n strike: false,\n underline: false,\n code: false,\n highlight: false,\n bulletlist: false,\n orderlist: false,\n link: false,\n image: false\n};\n\nexport const editorFull: EditorOptionsProps = {\n text: true,\n bold: true,\n italic: true,\n color: true,\n strike: true,\n underline: true,\n code: true,\n highlight: true,\n bulletlist: true,\n orderlist: true,\n link: true,\n image: true\n};"],"mappings":";AAEA,IAAa,IAAkC;CAC3C,MAAM;CACN,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,WAAW;CACX,MAAM;CACN,WAAW;CACX,YAAY;CACZ,WAAW;CACX,MAAM;CACN,OAAO;CACV,EAEY,IAAiC;CAC1C,MAAM;CACN,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,WAAW;CACX,MAAM;CACN,WAAW;CACX,YAAY;CACZ,WAAW;CACX,MAAM;CACN,OAAO;CACV"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/editor/const.ts"],"sourcesContent":["import { EditorOptionsProps } from \".\";\r\n\r\nexport const editorBasic: EditorOptionsProps = {\r\n text: true,\r\n bold: true,\r\n italic: true,\r\n color: true,\r\n strike: false,\r\n underline: false,\r\n code: false,\r\n highlight: false,\r\n bulletlist: false,\r\n orderlist: false,\r\n link: false,\r\n image: false\r\n};\r\n\r\nexport const editorFull: EditorOptionsProps = {\r\n text: true,\r\n bold: true,\r\n italic: true,\r\n color: true,\r\n strike: true,\r\n underline: true,\r\n code: true,\r\n highlight: true,\r\n bulletlist: true,\r\n orderlist: true,\r\n link: true,\r\n image: true\r\n};"],"mappings":";AAEA,IAAa,IAAkC;CAC3C,MAAM;CACN,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,WAAW;CACX,MAAM;CACN,WAAW;CACX,YAAY;CACZ,WAAW;CACX,MAAM;CACN,OAAO;AACX,GAEa,IAAiC;CAC1C,MAAM;CACN,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,WAAW;CACX,MAAM;CACN,WAAW;CACX,YAAY;CACZ,WAAW;CACX,MAAM;CACN,OAAO;AACX"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/bold.tsx"],"sourcesContent":["import React from \"react\";\nimport { EditorCoreProps } from \"..\";\n\n/**\n * Core - `Bold`\n * Extensão para renderizar texto em negrito\n */\nexport const Bold = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n return active && (\n <a className={\"editor-menu-item\" + (editor.isActive(\"bold\") ? \" active\" : \"\")}\n href=\"#\"\n onClick={event => {\n event.preventDefault();\n editor.chain().focus().toggleBold().run();\n }}><i className=\"bi bi-type-bold\"/></a>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAQ,EAAE,WAAQ,gBACpB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,OAAO,GAAG,YAAY;CACtE,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,gBAAgB,EACtB,EAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK;;WAC1C,kBAAC,KAAD,EAAG,WAAU,mBAAmB,CAAA;CAAI,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/bold.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { EditorCoreProps } from \"..\";\r\n\r\n/**\r\n * Core - `Bold`\r\n * Extensão para renderizar texto em negrito\r\n */\r\nexport const Bold = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"bold\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleBold().run();\r\n }}><i className=\"bi bi-type-bold\"/></a>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAQ,EAAE,WAAQ,gBACpB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,MAAM,IAAI,YAAY;CACtE,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,eAAe,GACrB,EAAO,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI;CAC5C;WAAG,kBAAC,KAAD,EAAG,WAAU,kBAAkB,CAAA;AAAI,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/bulletlist.tsx"],"sourcesContent":["import React from \"react\";\nimport { EditorCoreProps } from \"..\";\n\n/**\n * Core - `Bulletlist`\n * Extensão para renderizar texto em lista\n */\nexport const Bulletlist = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n return active && (\n <a className={\"editor-menu-item\" + (editor.isActive(\"bulletList\") ? \" active\" : \"\")}\n href=\"#\"\n onClick={event => {\n event.preventDefault();\n editor.chain().focus().toggleBulletList().run();\n }}><i className=\"bi bi-list-task\"/></a>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAc,EAAE,WAAQ,gBAC1B,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,aAAa,GAAG,YAAY;CAC5E,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,gBAAgB,EACtB,EAAO,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK;;WAChD,kBAAC,KAAD,EAAG,WAAU,mBAAmB,CAAA;CAAI,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/bulletlist.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { EditorCoreProps } from \"..\";\r\n\r\n/**\r\n * Core - `Bulletlist`\r\n * Extensão para renderizar texto em lista\r\n */\r\nexport const Bulletlist = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"bulletList\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleBulletList().run();\r\n }}><i className=\"bi bi-list-task\"/></a>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAc,EAAE,WAAQ,gBAC1B,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,YAAY,IAAI,YAAY;CAC5E,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,eAAe,GACrB,EAAO,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAI;CAClD;WAAG,kBAAC,KAAD,EAAG,WAAU,kBAAkB,CAAA;AAAI,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/code.tsx"],"sourcesContent":["import React from \"react\";\nimport { EditorCoreProps } from \"..\";\n\n/**\n * Core - `Code`\n * Extensão para renderizar texto em formato de código\n */\nexport const Code = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n return active && (\n <a className={\"editor-menu-item\" + (editor.isActive(\"code\") ? \" active\" : \"\")}\n href=\"#\"\n style={{ fontSize: \".975em\" }}\n onClick={event => {\n event.preventDefault();\n editor.chain().focus().toggleCode().run();\n }}><i className=\"bi bi-code-slash\"/></a>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAQ,EAAE,WAAQ,gBACpB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,OAAO,GAAG,YAAY;CACtE,MAAK;CACL,OAAO,EAAE,UAAU,UAAU;CAC7B,UAAS,MAAS;EAEd,AADA,EAAM,gBAAgB,EACtB,EAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK;;WAC1C,kBAAC,KAAD,EAAG,WAAU,oBAAoB,CAAA;CAAI,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/code.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { EditorCoreProps } from \"..\";\r\n\r\n/**\r\n * Core - `Code`\r\n * Extensão para renderizar texto em formato de código\r\n */\r\nexport const Code = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"code\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n style={{ fontSize: \".975em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleCode().run();\r\n }}><i className=\"bi bi-code-slash\"/></a>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAQ,EAAE,WAAQ,gBACpB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,MAAM,IAAI,YAAY;CACtE,MAAK;CACL,OAAO,EAAE,UAAU,SAAS;CAC5B,UAAS,MAAS;EAEd,AADA,EAAM,eAAe,GACrB,EAAO,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI;CAC5C;WAAG,kBAAC,KAAD,EAAG,WAAU,mBAAmB,CAAA;AAAI,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/color.tsx"],"sourcesContent":["import React from \"react\";\nimport { EditorCoreProps } from \"..\";\n\n/**\n * Core - `Color`\n * Extensão para formatar o texto com cor especifica\n */\nexport const Color = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n return active && (\n <input\n style={{\n width: \"22px\",\n height: \"20px\",\n borderRadius: \"5px\",\n margin: \"auto 2.5px\",\n border: \"2px solid var(--editor-border-color)\",\n }}\n type=\"color\"\n value={editor.getAttributes(\"textStyle\").color ?? \"#000000\"}\n onChange={event => editor.chain().focus().setColor(event.target.value).run()}/>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAS,EAAE,WAAQ,gBACrB,KACH,kBAAC,SAAD;CACI,OAAO;EACH,OAAO;EACP,QAAQ;EACR,cAAc;EACd,QAAQ;EACR,QAAQ;EACX;CACD,MAAK;CACL,OAAO,EAAO,cAAc,YAAY,CAAC,SAAS;CAClD,WAAU,MAAS,EAAO,OAAO,CAAC,OAAO,CAAC,SAAS,EAAM,OAAO,MAAM,CAAC,KAAK;CAAG,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/color.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { EditorCoreProps } from \"..\";\r\n\r\n/**\r\n * Core - `Color`\r\n * Extensão para formatar o texto com cor especifica\r\n */\r\nexport const Color = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <input\r\n style={{\r\n width: \"22px\",\r\n height: \"20px\",\r\n borderRadius: \"5px\",\r\n margin: \"auto 2.5px\",\r\n border: \"2px solid var(--editor-border-color)\",\r\n }}\r\n type=\"color\"\r\n value={editor.getAttributes(\"textStyle\").color ?? \"#000000\"}\r\n onChange={event => editor.chain().focus().setColor(event.target.value).run()}/>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAS,EAAE,WAAQ,gBACrB,KACH,kBAAC,SAAD;CACI,OAAO;EACH,OAAO;EACP,QAAQ;EACR,cAAc;EACd,QAAQ;EACR,QAAQ;CACZ;CACA,MAAK;CACL,OAAO,EAAO,cAAc,WAAW,EAAE,SAAS;CAClD,WAAU,MAAS,EAAO,MAAM,EAAE,MAAM,EAAE,SAAS,EAAM,OAAO,KAAK,EAAE,IAAI;AAAG,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/highlight.tsx"],"sourcesContent":["import React from \"react\";\nimport { EditorCoreProps } from \"..\";\n\n/**\n * Core - `Highlight`\n * Extensão para marcar texto no formato de marca texto\n */\nexport const Highlight = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n return active && (\n <a className={\"editor-menu-item\" + (editor.isActive(\"highlight\") ? \" active\" : \"\")}\n href=\"#\"\n style={{ fontSize: \".975em\" }}\n onClick={event => {\n event.preventDefault();\n editor.chain().focus().toggleHighlight().run();\n }}><i className=\"bi bi-highlighter\"/></a>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAa,EAAE,WAAQ,gBACzB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,YAAY,GAAG,YAAY;CAC3E,MAAK;CACL,OAAO,EAAE,UAAU,UAAU;CAC7B,UAAS,MAAS;EAEd,AADA,EAAM,gBAAgB,EACtB,EAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK;;WAC/C,kBAAC,KAAD,EAAG,WAAU,qBAAqB,CAAA;CAAI,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/highlight.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { EditorCoreProps } from \"..\";\r\n\r\n/**\r\n * Core - `Highlight`\r\n * Extensão para marcar texto no formato de marca texto\r\n */\r\nexport const Highlight = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"highlight\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n style={{ fontSize: \".975em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleHighlight().run();\r\n }}><i className=\"bi bi-highlighter\"/></a>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAa,EAAE,WAAQ,gBACzB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,WAAW,IAAI,YAAY;CAC3E,MAAK;CACL,OAAO,EAAE,UAAU,SAAS;CAC5B,UAAS,MAAS;EAEd,AADA,EAAM,eAAe,GACrB,EAAO,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI;CACjD;WAAG,kBAAC,KAAD,EAAG,WAAU,oBAAoB,CAAA;AAAI,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/image.tsx"],"sourcesContent":["import { EditorCoreProps } from \"..\";\nimport React, { useEffect, useState } from \"react\";\n\n/**\n * Core - `Image`\n * Extensão para adicionar imagem no documento\n */\nexport const Image = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n const [file, setFile] = useState<any>(null);\n\n const handlePaste = (event: any) => {\n const items = (event.clipboardData || event.originalEvent.clipboardData).items;\n for (const item of items) {\n if (item.type.indexOf(\"image\") === 0) {\n const file = item.getAsFile();\n const reader = new FileReader();\n reader.onload = (event) => {\n editor.chain().focus().setImage({ src: event?.target?.result as string }).run();\n };\n reader.readAsDataURL(file);\n }\n }\n };\n\n useEffect(() => {\n if (editor.view.dom.parentNode !== null && active) {\n editor.view.dom.parentNode.addEventListener(\"paste\", handlePaste);\n }\n return () => {\n editor.view.dom.parentNode?.removeEventListener(\"paste\", handlePaste);\n };\n }, []);\n\n useEffect(() => {\n if (file?.name !== undefined) {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => {\n editor.chain().focus().setImage({ src: reader.result as string }).run();\n };\n }\n }, [file]);\n\n return active && (\n <div className=\"editor-image\">\n <input accept=\"image/png, image/jpeg\"\n name=\"editor-image\"\n type=\"file\"\n onChange={event => setFile(event.target.files?.[0])}/>\n <a className={\"editor-menu-item\" + (editor.isActive(\"link\") ? \" active\" : \"\")}\n href=\"#\"\n style={{ fontSize: \".975em\" }}\n onClick={event => {\n event.preventDefault();\n }}><i className=\"bi bi-image\"/></a>\n </div>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAS,EAAE,WAAQ,gBAAoD;CAChF,IAAM,CAAC,GAAM,KAAW,EAAc,KAAK,EAErC,KAAe,MAAe;EAChC,IAAM,KAAS,EAAM,iBAAiB,EAAM,cAAc,eAAe;EACzE,KAAK,IAAM,KAAQ,GACf,IAAI,EAAK,KAAK,QAAQ,QAAQ,KAAK,GAAG;GAClC,IAAM,IAAO,EAAK,WAAW,EACvB,IAAS,IAAI,YAAY;GAI/B,AAHA,EAAO,UAAU,MAAU;IACvB,EAAO,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,GAAO,QAAQ,QAAkB,CAAC,CAAC,KAAK;MAEnF,EAAO,cAAc,EAAK;;;CAwBtC,OAnBA,SACQ,EAAO,KAAK,IAAI,eAAe,QAAQ,KACvC,EAAO,KAAK,IAAI,WAAW,iBAAiB,SAAS,EAAY,QAExD;EACT,EAAO,KAAK,IAAI,YAAY,oBAAoB,SAAS,EAAY;KAE1E,EAAE,CAAC,EAEN,QAAgB;EACZ,IAAI,GAAM,SAAS,KAAA,GAAW;GAC1B,IAAM,IAAS,IAAI,YAAY;GAE/B,AADA,EAAO,cAAc,EAAK,EAC1B,EAAO,eAAe;IAClB,EAAO,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAO,QAAkB,CAAC,CAAC,KAAK;;;IAGhF,CAAC,EAAK,CAAC,EAEH,KACH,kBAAC,OAAD;EAAK,WAAU;YAAf,CACI,kBAAC,SAAD;GAAO,QAAO;GACV,MAAK;GACL,MAAK;GACL,WAAU,MAAS,EAAQ,EAAM,OAAO,QAAQ,GAAG;GAAG,CAAA,EAC1D,kBAAC,KAAD;GAAG,WAAW,sBAAsB,EAAO,SAAS,OAAO,GAAG,YAAY;GACtE,MAAK;GACL,OAAO,EAAE,UAAU,UAAU;GAC7B,UAAS,MAAS;IACd,EAAM,gBAAgB;;aACvB,kBAAC,KAAD,EAAG,WAAU,eAAe,CAAA;GAAI,CAAA,CACrC"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/image.tsx"],"sourcesContent":["import { EditorCoreProps } from \"..\";\r\nimport React, { useEffect, useState } from \"react\";\r\n\r\n/**\r\n * Core - `Image`\r\n * Extensão para adicionar imagem no documento\r\n */\r\nexport const Image = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n const [file, setFile] = useState<any>(null);\r\n\r\n const handlePaste = (event: any) => {\r\n const items = (event.clipboardData || event.originalEvent.clipboardData).items;\r\n for (const item of items) {\r\n if (item.type.indexOf(\"image\") === 0) {\r\n const file = item.getAsFile();\r\n const reader = new FileReader();\r\n reader.onload = (event) => {\r\n editor.chain().focus().setImage({ src: event?.target?.result as string }).run();\r\n };\r\n reader.readAsDataURL(file);\r\n }\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (editor.view.dom.parentNode !== null && active) {\r\n editor.view.dom.parentNode.addEventListener(\"paste\", handlePaste);\r\n }\r\n return () => {\r\n editor.view.dom.parentNode?.removeEventListener(\"paste\", handlePaste);\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (file?.name !== undefined) {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => {\r\n editor.chain().focus().setImage({ src: reader.result as string }).run();\r\n };\r\n }\r\n }, [file]);\r\n\r\n return active && (\r\n <div className=\"editor-image\">\r\n <input accept=\"image/png, image/jpeg\"\r\n name=\"editor-image\"\r\n type=\"file\"\r\n onChange={event => setFile(event.target.files?.[0])}/>\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"link\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n style={{ fontSize: \".975em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n }}><i className=\"bi bi-image\"/></a>\r\n </div>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAS,EAAE,WAAQ,gBAAoD;CAChF,IAAM,CAAC,GAAM,KAAW,EAAc,IAAI,GAEpC,KAAe,MAAe;EAChC,IAAM,KAAS,EAAM,iBAAiB,EAAM,cAAc,eAAe;EACzE,KAAK,IAAM,KAAQ,GACf,IAAI,EAAK,KAAK,QAAQ,OAAO,MAAM,GAAG;GAClC,IAAM,IAAO,EAAK,UAAU,GACtB,IAAS,IAAI,WAAW;GAI9B,AAHA,EAAO,UAAU,MAAU;IACvB,EAAO,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAO,QAAQ,OAAiB,CAAC,EAAE,IAAI;GAClF,GACA,EAAO,cAAc,CAAI;EAC7B;CAER;CAqBA,OAnBA,SACQ,EAAO,KAAK,IAAI,eAAe,QAAQ,KACvC,EAAO,KAAK,IAAI,WAAW,iBAAiB,SAAS,CAAW,SAEvD;EACT,EAAO,KAAK,IAAI,YAAY,oBAAoB,SAAS,CAAW;CACxE,IACD,CAAC,CAAC,GAEL,QAAgB;EACZ,IAAI,GAAM,SAAS,KAAA,GAAW;GAC1B,IAAM,IAAS,IAAI,WAAW;GAE9B,AADA,EAAO,cAAc,CAAI,GACzB,EAAO,eAAe;IAClB,EAAO,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAO,OAAiB,CAAC,EAAE,IAAI;GAC1E;EACJ;CACJ,GAAG,CAAC,CAAI,CAAC,GAEF,KACH,kBAAC,OAAD;EAAK,WAAU;YAAf,CACI,kBAAC,SAAD;GAAO,QAAO;GACV,MAAK;GACL,MAAK;GACL,WAAU,MAAS,EAAQ,EAAM,OAAO,QAAQ,EAAE;EAAG,CAAA,GACzD,kBAAC,KAAD;GAAG,WAAW,sBAAsB,EAAO,SAAS,MAAM,IAAI,YAAY;GACtE,MAAK;GACL,OAAO,EAAE,UAAU,SAAS;GAC5B,UAAS,MAAS;IACd,EAAM,eAAe;GACzB;aAAG,kBAAC,KAAD,EAAG,WAAU,cAAc,CAAA;EAAI,CAAA,CACrC;;AAEb"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { Text } from \"./text\";\nimport { Link } from \"./link\";\nimport { Bold } from \"./bold\";\nimport { Code } from \"./code\";\nimport { Color } from \"./color\";\nimport { Image } from \"./image\";\nimport { Italic } from \"./italic\";\nimport { Strike } from \"./strike\";\nimport { Orderlist } from \"./orderlist\";\nimport { Underline } from \"./underline\";\nimport { Highlight } from \"./highlight\";\nimport { Bulletlist } from \"./bulletlist\";\nimport { EditorCoreProps, EditorOptionsProps } from \"..\";\n\n/**\n * Core - `Menu`\n * Componente que renderiza todas as opções de menu do componente\n */\nexport const EditorMenu = ({ editor, options }: EditorCoreProps & { options: EditorOptionsProps }) => {\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return (\n <div className=\"editor-menu\">\n <div className=\"editor-menu-group\">\n <Text active={options.text}\n editor={editor}/>\n <Bold active={options.bold}\n editor={editor}/>\n <Italic active={options.italic}\n editor={editor}/>\n <Color active={options.color}\n editor={editor}/>\n <Strike active={options.strike}\n editor={editor}/>\n <Underline active={options.underline}\n editor={editor}/>\n <Code active={options.code}\n editor={editor}/>\n <Highlight active={options.highlight}\n editor={editor}/>\n </div>\n <div className=\"editor-menu-group\">\n <Bulletlist active={options.bulletlist}\n editor={editor}/>\n <Orderlist active={options.orderlist}\n editor={editor}/>\n <Link active={options.link}\n editor={editor}/>\n <Image active={options.image}\n editor={editor}/>\n </div>\n </div>\n );\n};"],"mappings":";;;;;;;;;;;;;;;AAmBA,IAAa,KAAc,EAAE,WAAQ,iBAO7B,kBAAC,OAAD;CAAK,WAAU;WAAf,CACI,kBAAC,OAAD;EAAK,WAAU;YAAf;GACI,kBAAC,GAAD;IAAM,QAAQ,EAAQ;IACV;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAM,QAAQ,EAAQ;IACV;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAQ,QAAQ,EAAQ;IACZ;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAO,QAAQ,EAAQ;IACX;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAQ,QAAQ,EAAQ;IACZ;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAW,QAAQ,EAAQ;IACf;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAM,QAAQ,EAAQ;IACV;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAW,QAAQ,EAAQ;IACf;IAAS,CAAA;GACnB;KACN,kBAAC,OAAD;EAAK,WAAU;YAAf;GACI,kBAAC,GAAD;IAAY,QAAQ,EAAQ;IAChB;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAW,QAAQ,EAAQ;IACf;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAM,QAAQ,EAAQ;IACV;IAAS,CAAA;GACrB,kBAAC,GAAD;IAAO,QAAQ,EAAQ;IACX;IAAS,CAAA;GACnB;IACJ"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/index.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { Text } from \"./text\";\r\nimport { Link } from \"./link\";\r\nimport { Bold } from \"./bold\";\r\nimport { Code } from \"./code\";\r\nimport { Color } from \"./color\";\r\nimport { Image } from \"./image\";\r\nimport { Italic } from \"./italic\";\r\nimport { Strike } from \"./strike\";\r\nimport { Orderlist } from \"./orderlist\";\r\nimport { Underline } from \"./underline\";\r\nimport { Highlight } from \"./highlight\";\r\nimport { Bulletlist } from \"./bulletlist\";\r\nimport { EditorCoreProps, EditorOptionsProps } from \"..\";\r\n\r\n/**\r\n * Core - `Menu`\r\n * Componente que renderiza todas as opções de menu do componente\r\n */\r\nexport const EditorMenu = ({ editor, options }: EditorCoreProps & { options: EditorOptionsProps }) => {\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <div className=\"editor-menu\">\r\n <div className=\"editor-menu-group\">\r\n <Text active={options.text}\r\n editor={editor}/>\r\n <Bold active={options.bold}\r\n editor={editor}/>\r\n <Italic active={options.italic}\r\n editor={editor}/>\r\n <Color active={options.color}\r\n editor={editor}/>\r\n <Strike active={options.strike}\r\n editor={editor}/>\r\n <Underline active={options.underline}\r\n editor={editor}/>\r\n <Code active={options.code}\r\n editor={editor}/>\r\n <Highlight active={options.highlight}\r\n editor={editor}/>\r\n </div>\r\n <div className=\"editor-menu-group\">\r\n <Bulletlist active={options.bulletlist}\r\n editor={editor}/>\r\n <Orderlist active={options.orderlist}\r\n editor={editor}/>\r\n <Link active={options.link}\r\n editor={editor}/>\r\n <Image active={options.image}\r\n editor={editor}/>\r\n </div>\r\n </div>\r\n );\r\n};"],"mappings":";;;;;;;;;;;;;;;AAmBA,IAAa,KAAc,EAAE,WAAQ,iBAO7B,kBAAC,OAAD;CAAK,WAAU;WAAf,CACI,kBAAC,OAAD;EAAK,WAAU;YAAf;GACI,kBAAC,GAAD;IAAM,QAAQ,EAAQ;IACV;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAM,QAAQ,EAAQ;IACV;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAQ,QAAQ,EAAQ;IACZ;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAO,QAAQ,EAAQ;IACX;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAQ,QAAQ,EAAQ;IACZ;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAW,QAAQ,EAAQ;IACf;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAM,QAAQ,EAAQ;IACV;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAW,QAAQ,EAAQ;IACf;GAAQ,CAAA;EACnB;KACL,kBAAC,OAAD;EAAK,WAAU;YAAf;GACI,kBAAC,GAAD;IAAY,QAAQ,EAAQ;IAChB;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAW,QAAQ,EAAQ;IACf;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAM,QAAQ,EAAQ;IACV;GAAQ,CAAA;GACpB,kBAAC,GAAD;IAAO,QAAQ,EAAQ;IACX;GAAQ,CAAA;EACnB;GACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/italic.tsx"],"sourcesContent":["import React from \"react\";\nimport { EditorCoreProps } from \"..\";\n\n/**\n * Core - `Italic`\n * Extensão para renderizar texto em itálico\n */\nexport const Italic = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n return active && (\n <a className={\"editor-menu-item\" + (editor.isActive(\"italic\") ? \" active\" : \"\")}\n href=\"#\"\n onClick={event => {\n event.preventDefault();\n editor.chain().focus().toggleItalic().run();\n }}><i className=\"bi bi-type-italic\"/></a>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAU,EAAE,WAAQ,gBACtB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,SAAS,GAAG,YAAY;CACxE,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,gBAAgB,EACtB,EAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK;;WAC5C,kBAAC,KAAD,EAAG,WAAU,qBAAqB,CAAA;CAAI,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/italic.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { EditorCoreProps } from \"..\";\r\n\r\n/**\r\n * Core - `Italic`\r\n * Extensão para renderizar texto em itálico\r\n */\r\nexport const Italic = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"italic\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleItalic().run();\r\n }}><i className=\"bi bi-type-italic\"/></a>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAU,EAAE,WAAQ,gBACtB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,QAAQ,IAAI,YAAY;CACxE,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,eAAe,GACrB,EAAO,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI;CAC9C;WAAG,kBAAC,KAAD,EAAG,WAAU,oBAAoB,CAAA;AAAI,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/link.tsx"],"sourcesContent":["import { EditorCoreProps } from \"..\";\nimport React, { useEffect, useState } from \"react\";\n\n/**\n * Core - `Link`\n * Extensão para formatar adicionar link no documento\n */\nexport const Link = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n const [open, setOpen] = useState<boolean>(false);\n const [link, setLink] = useState<string>(\"\");\n\n useEffect(() => {\n setLink(\"\");\n }, [open]);\n\n function handleLink() {\n if (link === \"\") {\n editor.chain().focus().extendMarkRange(\"link\").unsetLink().run();\n } else {\n editor.chain().focus().extendMarkRange(\"link\").setLink({ href: link }).run();\n }\n setOpen(false);\n }\n\n return active && (\n <>\n <a className={\"editor-menu-item\" + (editor.isActive(\"link\") ? \" active\" : \"\")}\n href=\"#\"\n onClick={event => {\n event.preventDefault();\n if (!editor.isActive(\"link\")) {\n setOpen(!open);\n } else {\n editor.chain().focus().unsetLink().run();\n }\n }}><i className=\"bi bi-link\"/></a>\n {open && <div className=\"editor-link\">\n <input className=\"form-control form-control-sm\"\n placeholder=\"https://example.com.br\"\n style={{ fontSize: \".8em\", flex: 1 }}\n type=\"text\"\n value={link}\n onChange={event => setLink(event.target.value)}/>\n <a className=\"text-primary ms-2\"\n href=\"#\"\n style={{ fontSize: \".8em\" }}\n onClick={event => {\n event.preventDefault();\n handleLink();\n }}><i className=\"bi bi-save me-1\"/>Save</a>\n </div>}\n </>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAQ,EAAE,WAAQ,gBAAoD;CAC/E,IAAM,CAAC,GAAM,KAAW,EAAkB,GAAM,EAC1C,CAAC,GAAM,KAAW,EAAiB,GAAG;CAE5C,QAAgB;EACZ,EAAQ,GAAG;IACZ,CAAC,EAAK,CAAC;CAEV,SAAS,IAAa;EAMlB,AALI,MAAS,KACT,EAAO,OAAO,CAAC,OAAO,CAAC,gBAAgB,OAAO,CAAC,WAAW,CAAC,KAAK,GAEhE,EAAO,OAAO,CAAC,OAAO,CAAC,gBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAM,CAAC,CAAC,KAAK,EAEhF,EAAQ,GAAM;;CAGlB,OAAO,KACH,kBAAA,GAAA,EAAA,UAAA,CACI,kBAAC,KAAD;EAAG,WAAW,sBAAsB,EAAO,SAAS,OAAO,GAAG,YAAY;EACtE,MAAK;EACL,UAAS,MAAS;GAEd,AADA,EAAM,gBAAgB,EACjB,EAAO,SAAS,OAAO,GAGxB,EAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,GAFxC,EAAQ,CAAC,EAAK;;YAInB,kBAAC,KAAD,EAAG,WAAU,cAAc,CAAA;EAAI,CAAA,EACrC,KAAQ,kBAAC,OAAD;EAAK,WAAU;YAAf,CACL,kBAAC,SAAD;GAAO,WAAU;GACb,aAAY;GACZ,OAAO;IAAE,UAAU;IAAQ,MAAM;IAAG;GACpC,MAAK;GACL,OAAO;GACP,WAAU,MAAS,EAAQ,EAAM,OAAO,MAAM;GAAG,CAAA,EACrD,kBAAC,KAAD;GAAG,WAAU;GACT,MAAK;GACL,OAAO,EAAE,UAAU,QAAQ;GAC3B,UAAS,MAAS;IAEd,AADA,EAAM,gBAAgB,EACtB,GAAY;;aALpB,CAMO,kBAAC,KAAD,EAAG,WAAU,mBAAmB,CAAA,EAAA,OAAQ;KAC7C;IACP,EAAA,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/link.tsx"],"sourcesContent":["import { EditorCoreProps } from \"..\";\r\nimport React, { useEffect, useState } from \"react\";\r\n\r\n/**\r\n * Core - `Link`\r\n * Extensão para formatar adicionar link no documento\r\n */\r\nexport const Link = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n const [open, setOpen] = useState<boolean>(false);\r\n const [link, setLink] = useState<string>(\"\");\r\n\r\n useEffect(() => {\r\n setLink(\"\");\r\n }, [open]);\r\n\r\n function handleLink() {\r\n if (link === \"\") {\r\n editor.chain().focus().extendMarkRange(\"link\").unsetLink().run();\r\n } else {\r\n editor.chain().focus().extendMarkRange(\"link\").setLink({ href: link }).run();\r\n }\r\n setOpen(false);\r\n }\r\n\r\n return active && (\r\n <>\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"link\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n if (!editor.isActive(\"link\")) {\r\n setOpen(!open);\r\n } else {\r\n editor.chain().focus().unsetLink().run();\r\n }\r\n }}><i className=\"bi bi-link\"/></a>\r\n {open && <div className=\"editor-link\">\r\n <input className=\"form-control form-control-sm\"\r\n placeholder=\"https://example.com.br\"\r\n style={{ fontSize: \".8em\", flex: 1 }}\r\n type=\"text\"\r\n value={link}\r\n onChange={event => setLink(event.target.value)}/>\r\n <a className=\"text-primary ms-2\"\r\n href=\"#\"\r\n style={{ fontSize: \".8em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n handleLink();\r\n }}><i className=\"bi bi-save me-1\"/>Save</a>\r\n </div>}\r\n </>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAQ,EAAE,WAAQ,gBAAoD;CAC/E,IAAM,CAAC,GAAM,KAAW,EAAkB,EAAK,GACzC,CAAC,GAAM,KAAW,EAAiB,EAAE;CAE3C,QAAgB;EACZ,EAAQ,EAAE;CACd,GAAG,CAAC,CAAI,CAAC;CAET,SAAS,IAAa;EAMlB,AALI,MAAS,KACT,EAAO,MAAM,EAAE,MAAM,EAAE,gBAAgB,MAAM,EAAE,UAAU,EAAE,IAAI,IAE/D,EAAO,MAAM,EAAE,MAAM,EAAE,gBAAgB,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAK,CAAC,EAAE,IAAI,GAE/E,EAAQ,EAAK;CACjB;CAEA,OAAO,KACH,kBAAA,GAAA,EAAA,UAAA,CACI,kBAAC,KAAD;EAAG,WAAW,sBAAsB,EAAO,SAAS,MAAM,IAAI,YAAY;EACtE,MAAK;EACL,UAAS,MAAS;GAEd,AADA,EAAM,eAAe,GAChB,EAAO,SAAS,MAAM,IAGvB,EAAO,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,IAFvC,EAAQ,CAAC,CAAI;EAIrB;YAAG,kBAAC,KAAD,EAAG,WAAU,aAAa,CAAA;CAAI,CAAA,GACpC,KAAQ,kBAAC,OAAD;EAAK,WAAU;YAAf,CACL,kBAAC,SAAD;GAAO,WAAU;GACb,aAAY;GACZ,OAAO;IAAE,UAAU;IAAQ,MAAM;GAAE;GACnC,MAAK;GACL,OAAO;GACP,WAAU,MAAS,EAAQ,EAAM,OAAO,KAAK;EAAG,CAAA,GACpD,kBAAC,KAAD;GAAG,WAAU;GACT,MAAK;GACL,OAAO,EAAE,UAAU,OAAO;GAC1B,UAAS,MAAS;IAEd,AADA,EAAM,eAAe,GACrB,EAAW;GACf;aANJ,CAMO,kBAAC,KAAD,EAAG,WAAU,kBAAkB,CAAA,GAAC,MAAO;IAC7C;GACP,EAAA,CAAA;AAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/orderlist.tsx"],"sourcesContent":["import React from \"react\";\nimport { EditorCoreProps } from \"..\";\n\n/**\n * Core - `Orderlist`\n * Extensão para renderizar texto em lista ordenada\n */\nexport const Orderlist = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n return active && (\n <a className={\"editor-menu-item\" + (editor.isActive(\"orderedList\") ? \" active\" : \"\")}\n href=\"#\"\n onClick={event => {\n event.preventDefault();\n editor.chain().focus().toggleOrderedList().run();\n }}><i className=\"bi bi-list-ol\"/></a>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAa,EAAE,WAAQ,gBACzB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,cAAc,GAAG,YAAY;CAC7E,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,gBAAgB,EACtB,EAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK;;WACjD,kBAAC,KAAD,EAAG,WAAU,iBAAiB,CAAA;CAAI,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/orderlist.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { EditorCoreProps } from \"..\";\r\n\r\n/**\r\n * Core - `Orderlist`\r\n * Extensão para renderizar texto em lista ordenada\r\n */\r\nexport const Orderlist = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"orderedList\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleOrderedList().run();\r\n }}><i className=\"bi bi-list-ol\"/></a>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAa,EAAE,WAAQ,gBACzB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,aAAa,IAAI,YAAY;CAC7E,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,eAAe,GACrB,EAAO,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI;CACnD;WAAG,kBAAC,KAAD,EAAG,WAAU,gBAAgB,CAAA;AAAI,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/strike.tsx"],"sourcesContent":["import React from \"react\";\nimport { EditorCoreProps } from \"..\";\n\n/**\n * Core - `Strike`\n * Extensão para renderizar texto em strike text\n */\nexport const Strike = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\n return active && (\n <a className={\"editor-menu-item\" + (editor.isActive(\"strike\") ? \" active\" : \"\")}\n href=\"#\"\n onClick={event => {\n event.preventDefault();\n editor.chain().focus().toggleStrike().run();\n }}><i className=\"bi bi-type-strikethrough\"/></a>\n );\n};"],"mappings":";;;AAOA,IAAa,KAAU,EAAE,WAAQ,gBACtB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,SAAS,GAAG,YAAY;CACxE,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,gBAAgB,EACtB,EAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK;;WAC5C,kBAAC,KAAD,EAAG,WAAU,4BAA4B,CAAA;CAAI,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/editor/core/strike.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { EditorCoreProps } from \"..\";\r\n\r\n/**\r\n * Core - `Strike`\r\n * Extensão para renderizar texto em strike text\r\n */\r\nexport const Strike = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"strike\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleStrike().run();\r\n }}><i className=\"bi bi-type-strikethrough\"/></a>\r\n );\r\n};"],"mappings":";;;AAOA,IAAa,KAAU,EAAE,WAAQ,gBACtB,KACH,kBAAC,KAAD;CAAG,WAAW,sBAAsB,EAAO,SAAS,QAAQ,IAAI,YAAY;CACxE,MAAK;CACL,UAAS,MAAS;EAEd,AADA,EAAM,eAAe,GACrB,EAAO,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI;CAC9C;WAAG,kBAAC,KAAD,EAAG,WAAU,2BAA2B,CAAA;AAAI,CAAA"}