@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 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/inputfilter/const.ts"],"sourcesContent":["import { InputFilterOptionsMap, InputFilterOptionsProps } from \".\";\n\nexport const optionsDefault: Array<InputFilterOptionsMap[\"text\"]> = [\"=\", \"!=\", \"%\", \"!%\"];\n\nexport const optionsLabel: Array<{\n options: InputFilterOptionsProps,\n label: string\n}> = [\n { options: \"=\", label: \"Igual a\" },\n { options: \"!=\", label: \"Diferente de\" },\n { options: \"<\", label: \"Menor do que\" },\n { options: \">\", label: \"Maior do que\" },\n { options: \"<=\", label: \"Menor ou igual a\" },\n { options: \">=\", label: \"Maior ou igual a\" },\n { options: \"{}\", label: \"Intervalo\" },\n { options: \"%\", label: \"Contém o que\" },\n { options: \"!%\", label: \"Não contém o que\" },\n];"],"mappings":";AAEA,IAAa,IAAuD;CAAC;CAAK;CAAM;CAAK;CAAK,EAE7E,IAGR;CACD;EAAE,SAAS;EAAK,OAAO;EAAW;CAClC;EAAE,SAAS;EAAM,OAAO;EAAgB;CACxC;EAAE,SAAS;EAAK,OAAO;EAAgB;CACvC;EAAE,SAAS;EAAK,OAAO;EAAgB;CACvC;EAAE,SAAS;EAAM,OAAO;EAAoB;CAC5C;EAAE,SAAS;EAAM,OAAO;EAAoB;CAC5C;EAAE,SAAS;EAAM,OAAO;EAAa;CACrC;EAAE,SAAS;EAAK,OAAO;EAAgB;CACvC;EAAE,SAAS;EAAM,OAAO;EAAoB;CAC/C"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/inputfilter/const.ts"],"sourcesContent":["import { InputFilterOptionsMap, InputFilterOptionsProps } from \".\";\r\n\r\nexport const optionsDefault: Array<InputFilterOptionsMap[\"text\"]> = [\"=\", \"!=\", \"%\", \"!%\"];\r\n\r\nexport const optionsLabel: Array<{\r\n options: InputFilterOptionsProps,\r\n label: string\r\n}> = [\r\n { options: \"=\", label: \"Igual a\" },\r\n { options: \"!=\", label: \"Diferente de\" },\r\n { options: \"<\", label: \"Menor do que\" },\r\n { options: \">\", label: \"Maior do que\" },\r\n { options: \"<=\", label: \"Menor ou igual a\" },\r\n { options: \">=\", label: \"Maior ou igual a\" },\r\n { options: \"{}\", label: \"Intervalo\" },\r\n { options: \"%\", label: \"Contém o que\" },\r\n { options: \"!%\", label: \"Não contém o que\" },\r\n];"],"mappings":";AAEA,IAAa,IAAuD;CAAC;CAAK;CAAM;CAAK;AAAI,GAE5E,IAGR;CACD;EAAE,SAAS;EAAK,OAAO;CAAU;CACjC;EAAE,SAAS;EAAM,OAAO;CAAe;CACvC;EAAE,SAAS;EAAK,OAAO;CAAe;CACtC;EAAE,SAAS;EAAK,OAAO;CAAe;CACtC;EAAE,SAAS;EAAM,OAAO;CAAmB;CAC3C;EAAE,SAAS;EAAM,OAAO;CAAmB;CAC3C;EAAE,SAAS;EAAM,OAAO;CAAY;CACpC;EAAE,SAAS;EAAK,OAAO;CAAe;CACtC;EAAE,SAAS;EAAM,OAAO;CAAmB;AAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/core/autocomplete.tsx"],"sourcesContent":["import React from \"react\";\nimport { InputFilterCoreProps, InputFilterOptionsMap } from \"..\";\nimport * as AutocompletePrimeReact from \"primereact/autocomplete\";\nimport { handleGetValueAutocomplete, handleSetValueAutocomplete } from \"../function/handle\";\n\n/**\n * Core - `Autocomplete`\n * Campo do filtro tipo autocomplete\n */\nexport function Autocomplete<T extends keyof InputFilterOptionsMap>(props: InputFilterCoreProps<\"autocomplete\">) {\n const value = handleGetValueAutocomplete(props.value, props.options, props.data);\n\n return (\n <AutocompletePrimeReact.AutoComplete\n multiple\n completeMethod={event => {\n let ids = value.map(item => item.id);\n props.onSearch(event.query, ids);\n }}\n appendTo=\"self\"\n className=\"w-100\"\n disabled={props.disabled}\n emptyMessage=\"Não encontramos dados.\"\n field=\"label\"\n id={(props.id ?? \"input-filter\") + \"-\" + \"autocomplete\"}\n inputClassName=\"form-control\"\n name={(props.name ?? \"input-filter\") + \"-\" + \"autocomplete\"}\n panelClassName=\"input-filter-autocomplete-panel\"\n placeholder={props.placeholder}\n required={props.required}\n scrollHeight={props.autocompleteScrollHeight}\n selectionLimit={props.autocompleteSelectLimit}\n suggestions={props.data}\n value={value}\n onChange={event => props.onChange(handleSetValueAutocomplete(event.value, props.select))}/>\n );\n}"],"mappings":";;;;;AASA,SAAgB,EAAoD,GAA6C;CAC7G,IAAM,IAAQ,EAA2B,EAAM,OAAO,EAAM,SAAS,EAAM,KAAK;CAEhF,OACI,kBAAC,EAAuB,cAAxB;EACI,UAAA;EACA,iBAAgB,MAAS;GACrB,IAAI,IAAM,EAAM,KAAI,MAAQ,EAAK,GAAG;GACpC,EAAM,SAAS,EAAM,OAAO,EAAI;;EAEpC,UAAS;EACT,WAAU;EACV,UAAU,EAAM;EAChB,cAAa;EACb,OAAM;EACN,KAAK,EAAM,MAAM,kBAAkB;EACnC,gBAAe;EACf,OAAO,EAAM,QAAQ,kBAAkB;EACvC,gBAAe;EACf,aAAa,EAAM;EACnB,UAAU,EAAM;EAChB,cAAc,EAAM;EACpB,gBAAgB,EAAM;EACtB,aAAa,EAAM;EACZ;EACP,WAAU,MAAS,EAAM,SAAS,EAA2B,EAAM,OAAO,EAAM,OAAO,CAAC;EAAG,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/core/autocomplete.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { InputFilterCoreProps, InputFilterOptionsMap } from \"..\";\r\nimport * as AutocompletePrimeReact from \"primereact/autocomplete\";\r\nimport { handleGetValueAutocomplete, handleSetValueAutocomplete } from \"../function/handle\";\r\n\r\n/**\r\n * Core - `Autocomplete`\r\n * Campo do filtro tipo autocomplete\r\n */\r\nexport function Autocomplete<T extends keyof InputFilterOptionsMap>(props: InputFilterCoreProps<\"autocomplete\">) {\r\n const value = handleGetValueAutocomplete(props.value, props.options, props.data);\r\n\r\n return (\r\n <AutocompletePrimeReact.AutoComplete\r\n multiple\r\n completeMethod={event => {\r\n let ids = value.map(item => item.id);\r\n props.onSearch(event.query, ids);\r\n }}\r\n appendTo=\"self\"\r\n className=\"w-100\"\r\n disabled={props.disabled}\r\n emptyMessage=\"Não encontramos dados.\"\r\n field=\"label\"\r\n id={(props.id ?? \"input-filter\") + \"-\" + \"autocomplete\"}\r\n inputClassName=\"form-control\"\r\n name={(props.name ?? \"input-filter\") + \"-\" + \"autocomplete\"}\r\n panelClassName=\"input-filter-autocomplete-panel\"\r\n placeholder={props.placeholder}\r\n required={props.required}\r\n scrollHeight={props.autocompleteScrollHeight}\r\n selectionLimit={props.autocompleteSelectLimit}\r\n suggestions={props.data}\r\n value={value}\r\n onChange={event => props.onChange(handleSetValueAutocomplete(event.value, props.select))}/>\r\n );\r\n}"],"mappings":";;;;;AASA,SAAgB,EAAoD,GAA6C;CAC7G,IAAM,IAAQ,EAA2B,EAAM,OAAO,EAAM,SAAS,EAAM,IAAI;CAE/E,OACI,kBAAC,EAAuB,cAAxB;EACI,UAAA;EACA,iBAAgB,MAAS;GACrB,IAAI,IAAM,EAAM,KAAI,MAAQ,EAAK,EAAE;GACnC,EAAM,SAAS,EAAM,OAAO,CAAG;EACnC;EACA,UAAS;EACT,WAAU;EACV,UAAU,EAAM;EAChB,cAAa;EACb,OAAM;EACN,KAAK,EAAM,MAAM,kBAAkB;EACnC,gBAAe;EACf,OAAO,EAAM,QAAQ,kBAAkB;EACvC,gBAAe;EACf,aAAa,EAAM;EACnB,UAAU,EAAM;EAChB,cAAc,EAAM;EACpB,gBAAgB,EAAM;EACtB,aAAa,EAAM;EACZ;EACP,WAAU,MAAS,EAAM,SAAS,EAA2B,EAAM,OAAO,EAAM,MAAM,CAAC;CAAG,CAAA;AAEtG"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/core/date.tsx"],"sourcesContent":["import React from \"react\";\nimport { InputFilterCoreProps, InputFilterOptionsMap } from \"..\";\nimport { handleGetValueDate, handleSetValueDate } from \"../function/handle\";\n\n/**\n * Core - `Date`\n * Campo do filtro tipo data\n */\nexport function Date<T extends keyof InputFilterOptionsMap>(props: InputFilterCoreProps<T>) {\n let date = handleGetValueDate(props.value, props.options, props.select);\n\n function handleChangeValue(value: string) {\n if (props.select === \"{}\" && value === \"0/0/0{}0/0/0\") {\n props.onChange(null);\n } else {\n if ((date[0] == 0 || isNaN(date[0] as number)) &&\n (date[1] == 0 || isNaN(date[1] as number)) &&\n (date[2] == 0 || isNaN(date[2] as number))) {\n props.onChange(null);\n } else {\n props.onChange(value);\n }\n }\n }\n\n return (\n <div className=\"d-flex w-100 flex-column\">\n <div className=\"w-100 d-flex gap-2\">\n {date.map((item, index) => {\n if (index <= 2) {\n return (\n <input className={\"form-control input-filter-field-date\" + (index == 2 ? \" year\" : \"\")}\n disabled={props.disabled}\n id={(props.id ?? \"input-filter\") + \"-\" + index}\n key={index}\n name={(props.name ?? \"input-filter\") + \"-\" + index}\n placeholder={props.placeholder}\n value={item === 0 ? \"\" : item}\n onChange={event => handleChangeValue(handleSetValueDate(event.target.value, index, date))}/>\n );\n }\n })}\n </div>\n {props.select === \"{}\" && date.length > 4\n && <div className=\"w-100 d-flex gap-2 mt-2\">\n {date.map((item, index) => {\n if (index >= 4) {\n return (\n <input className={\"form-control input-filter-field-date\" + (index == 6 ? \" year\" : \"\")}\n disabled={props.disabled}\n id={(props.id ?? \"input-filter\") + \"-\" + index}\n key={index}\n name={(props.name ?? \"input-filter\") + \"-\" + index}\n placeholder={props.placeholder}\n value={item === 0 ? \"\" : item}\n onChange={event => handleChangeValue(handleSetValueDate(event.target.value, index, date))}/>\n );\n }\n })}\n </div>}\n </div>\n );\n}"],"mappings":";;;;AAQA,SAAgB,EAA4C,GAAgC;CACxF,IAAI,IAAO,EAAmB,EAAM,OAAO,EAAM,SAAS,EAAM,OAAO;CAEvE,SAAS,EAAkB,GAAe;EACtC,AAAI,EAAM,WAAW,QAAQ,MAAU,mBAG9B,EAAK,MAAM,KAAK,MAAM,EAAK,GAAa,MACxC,EAAK,MAAM,KAAK,MAAM,EAAK,GAAa,MACxC,EAAK,MAAM,KAAK,MAAM,EAAK,GAAa,IAJ7C,EAAM,SAAS,KAAK,GAOhB,EAAM,SAAS,EAAM;;CAKjC,OACI,kBAAC,OAAD;EAAK,WAAU;YAAf,CACI,kBAAC,OAAD;GAAK,WAAU;aACV,EAAK,KAAK,GAAM,MAAU;IACvB,IAAI,KAAS,GACT,OACI,kBAAC,SAAD;KAAO,WAAW,0CAA0C,KAAS,IAAI,UAAU;KAC/E,UAAU,EAAM;KAChB,KAAK,EAAM,MAAM,kBAAkB,MAAM;KAEzC,OAAO,EAAM,QAAQ,kBAAkB,MAAM;KAC7C,aAAa,EAAM;KACnB,OAAO,MAAS,IAAI,KAAK;KACzB,WAAU,MAAS,EAAkB,EAAmB,EAAM,OAAO,OAAO,GAAO,EAAK,CAAC;KAAG,EAJvF,EAIuF;KAG1G;GACA,CAAA,EACL,EAAM,WAAW,QAAQ,EAAK,SAAS,KACjC,kBAAC,OAAD;GAAK,WAAU;aACb,EAAK,KAAK,GAAM,MAAU;IACvB,IAAI,KAAS,GACT,OACI,kBAAC,SAAD;KAAO,WAAW,0CAA0C,KAAS,IAAI,UAAU;KAC/E,UAAU,EAAM;KAChB,KAAK,EAAM,MAAM,kBAAkB,MAAM;KAEzC,OAAO,EAAM,QAAQ,kBAAkB,MAAM;KAC7C,aAAa,EAAM;KACnB,OAAO,MAAS,IAAI,KAAK;KACzB,WAAU,MAAS,EAAkB,EAAmB,EAAM,OAAO,OAAO,GAAO,EAAK,CAAC;KAAG,EAJvF,EAIuF;KAG1G;GACA,CAAA,CACR"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/core/date.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { InputFilterCoreProps, InputFilterOptionsMap } from \"..\";\r\nimport { handleGetValueDate, handleSetValueDate } from \"../function/handle\";\r\n\r\n/**\r\n * Core - `Date`\r\n * Campo do filtro tipo data\r\n */\r\nexport function Date<T extends keyof InputFilterOptionsMap>(props: InputFilterCoreProps<T>) {\r\n let date = handleGetValueDate(props.value, props.options, props.select);\r\n\r\n function handleChangeValue(value: string) {\r\n if (props.select === \"{}\" && value === \"0/0/0{}0/0/0\") {\r\n props.onChange(null);\r\n } else {\r\n if ((date[0] == 0 || isNaN(date[0] as number)) &&\r\n (date[1] == 0 || isNaN(date[1] as number)) &&\r\n (date[2] == 0 || isNaN(date[2] as number))) {\r\n props.onChange(null);\r\n } else {\r\n props.onChange(value);\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <div className=\"d-flex w-100 flex-column\">\r\n <div className=\"w-100 d-flex gap-2\">\r\n {date.map((item, index) => {\r\n if (index <= 2) {\r\n return (\r\n <input className={\"form-control input-filter-field-date\" + (index == 2 ? \" year\" : \"\")}\r\n disabled={props.disabled}\r\n id={(props.id ?? \"input-filter\") + \"-\" + index}\r\n key={index}\r\n name={(props.name ?? \"input-filter\") + \"-\" + index}\r\n placeholder={props.placeholder}\r\n value={item === 0 ? \"\" : item}\r\n onChange={event => handleChangeValue(handleSetValueDate(event.target.value, index, date))}/>\r\n );\r\n }\r\n })}\r\n </div>\r\n {props.select === \"{}\" && date.length > 4\r\n && <div className=\"w-100 d-flex gap-2 mt-2\">\r\n {date.map((item, index) => {\r\n if (index >= 4) {\r\n return (\r\n <input className={\"form-control input-filter-field-date\" + (index == 6 ? \" year\" : \"\")}\r\n disabled={props.disabled}\r\n id={(props.id ?? \"input-filter\") + \"-\" + index}\r\n key={index}\r\n name={(props.name ?? \"input-filter\") + \"-\" + index}\r\n placeholder={props.placeholder}\r\n value={item === 0 ? \"\" : item}\r\n onChange={event => handleChangeValue(handleSetValueDate(event.target.value, index, date))}/>\r\n );\r\n }\r\n })}\r\n </div>}\r\n </div>\r\n );\r\n}"],"mappings":";;;;AAQA,SAAgB,EAA4C,GAAgC;CACxF,IAAI,IAAO,EAAmB,EAAM,OAAO,EAAM,SAAS,EAAM,MAAM;CAEtE,SAAS,EAAkB,GAAe;EACtC,AAAI,EAAM,WAAW,QAAQ,MAAU,mBAG9B,EAAK,MAAM,KAAK,MAAM,EAAK,EAAY,OACvC,EAAK,MAAM,KAAK,MAAM,EAAK,EAAY,OACvC,EAAK,MAAM,KAAK,MAAM,EAAK,EAAY,KAJ5C,EAAM,SAAS,IAAI,IAOf,EAAM,SAAS,CAAK;CAGhC;CAEA,OACI,kBAAC,OAAD;EAAK,WAAU;YAAf,CACI,kBAAC,OAAD;GAAK,WAAU;aACV,EAAK,KAAK,GAAM,MAAU;IACvB,IAAI,KAAS,GACT,OACI,kBAAC,SAAD;KAAO,WAAW,0CAA0C,KAAS,IAAI,UAAU;KAC/E,UAAU,EAAM;KAChB,KAAK,EAAM,MAAM,kBAAkB,MAAM;KAEzC,OAAO,EAAM,QAAQ,kBAAkB,MAAM;KAC7C,aAAa,EAAM;KACnB,OAAO,MAAS,IAAI,KAAK;KACzB,WAAU,MAAS,EAAkB,EAAmB,EAAM,OAAO,OAAO,GAAO,CAAI,CAAC;IAAG,GAJtF,CAIsF;GAG3G,CAAC;EACA,CAAA,GACJ,EAAM,WAAW,QAAQ,EAAK,SAAS,KACjC,kBAAC,OAAD;GAAK,WAAU;aACb,EAAK,KAAK,GAAM,MAAU;IACvB,IAAI,KAAS,GACT,OACI,kBAAC,SAAD;KAAO,WAAW,0CAA0C,KAAS,IAAI,UAAU;KAC/E,UAAU,EAAM;KAChB,KAAK,EAAM,MAAM,kBAAkB,MAAM;KAEzC,OAAO,EAAM,QAAQ,kBAAkB,MAAM;KAC7C,aAAa,EAAM;KACnB,OAAO,MAAS,IAAI,KAAK;KACzB,WAAU,MAAS,EAAkB,EAAmB,EAAM,OAAO,OAAO,GAAO,CAAI,CAAC;IAAG,GAJtF,CAIsF;GAG3G,CAAC;EACA,CAAA,CACR;;AAEb"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/core/number.tsx"],"sourcesContent":["import React from \"react\";\nimport { handleNumber } from \"../../utils\";\nimport { handleGetValueNumber } from \"../function/handle\";\nimport { InputFilterCoreProps, InputFilterOptionsMap } from \"..\";\n\n/**\n * Core - `Number`\n * Campo do filtro tipo numero\n */\nexport function Number<T extends keyof InputFilterOptionsMap>(props: InputFilterCoreProps<T>) {\n return (\n <input className=\"form-control input-filter-field\"\n disabled={props.disabled}\n id={(props.id ?? \"input-filter\") + \"-number\"}\n name={(props.name ?? \"input-filter\") + \"-number\"}\n placeholder={props.placeholder}\n value={handleGetValueNumber(props.value, props.options ?? \"\")}\n onChange={event => props.onChange(handleNumber(event.target.value, \"decimal\", 0) + props.select)}/>\n );\n}"],"mappings":";;;;;;AASA,SAAgB,EAA8C,GAAgC;CAC1F,OACI,kBAAC,SAAD;EAAO,WAAU;EACb,UAAU,EAAM;EAChB,KAAK,EAAM,MAAM,kBAAkB;EACnC,OAAO,EAAM,QAAQ,kBAAkB;EACvC,aAAa,EAAM;EACnB,OAAO,EAAqB,EAAM,OAAO,EAAM,WAAW,GAAG;EAC7D,WAAU,MAAS,EAAM,SAAS,EAAa,EAAM,OAAO,OAAO,WAAW,EAAE,GAAG,EAAM,OAAO;EAAG,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/core/number.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { handleNumber } from \"../../utils\";\r\nimport { handleGetValueNumber } from \"../function/handle\";\r\nimport { InputFilterCoreProps, InputFilterOptionsMap } from \"..\";\r\n\r\n/**\r\n * Core - `Number`\r\n * Campo do filtro tipo numero\r\n */\r\nexport function Number<T extends keyof InputFilterOptionsMap>(props: InputFilterCoreProps<T>) {\r\n return (\r\n <input className=\"form-control input-filter-field\"\r\n disabled={props.disabled}\r\n id={(props.id ?? \"input-filter\") + \"-number\"}\r\n name={(props.name ?? \"input-filter\") + \"-number\"}\r\n placeholder={props.placeholder}\r\n value={handleGetValueNumber(props.value, props.options ?? \"\")}\r\n onChange={event => props.onChange(handleNumber(event.target.value, \"decimal\", 0) + props.select)}/>\r\n );\r\n}"],"mappings":";;;;;;AASA,SAAgB,EAA8C,GAAgC;CAC1F,OACI,kBAAC,SAAD;EAAO,WAAU;EACb,UAAU,EAAM;EAChB,KAAK,EAAM,MAAM,kBAAkB;EACnC,OAAO,EAAM,QAAQ,kBAAkB;EACvC,aAAa,EAAM;EACnB,OAAO,EAAqB,EAAM,OAAO,EAAM,WAAW,EAAE;EAC5D,WAAU,MAAS,EAAM,SAAS,EAAa,EAAM,OAAO,OAAO,WAAW,CAAC,IAAI,EAAM,MAAM;CAAG,CAAA;AAE9G"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/core/text.tsx"],"sourcesContent":["import React from \"react\";\nimport { handleGetValueText } from \"../function/handle\";\nimport { InputFilterCoreProps, InputFilterOptionsMap } from \"..\";\n\n/**\n * Core - `Text`\n * Campo do filtro tipo texto\n */\nexport function Text<T extends keyof InputFilterOptionsMap>(props: InputFilterCoreProps<T>) {\n return (\n <input className=\"form-control input-filter-field\"\n disabled={props.disabled}\n id={(props.id ?? \"input-filter\") + \"-text\"}\n name={(props.name ?? \"input-filter\") + \"-text\"}\n placeholder={props.placeholder}\n value={handleGetValueText(props.value, props.options) ?? \"\"}\n onChange={event => props.onChange(event.target.value + props.select)}/>\n );\n}"],"mappings":";;;;AAQA,SAAgB,EAA4C,GAAgC;CACxF,OACI,kBAAC,SAAD;EAAO,WAAU;EACb,UAAU,EAAM;EAChB,KAAK,EAAM,MAAM,kBAAkB;EACnC,OAAO,EAAM,QAAQ,kBAAkB;EACvC,aAAa,EAAM;EACnB,OAAO,EAAmB,EAAM,OAAO,EAAM,QAAQ,IAAI;EACzD,WAAU,MAAS,EAAM,SAAS,EAAM,OAAO,QAAQ,EAAM,OAAO;EAAG,CAAA"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/core/text.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { handleGetValueText } from \"../function/handle\";\r\nimport { InputFilterCoreProps, InputFilterOptionsMap } from \"..\";\r\n\r\n/**\r\n * Core - `Text`\r\n * Campo do filtro tipo texto\r\n */\r\nexport function Text<T extends keyof InputFilterOptionsMap>(props: InputFilterCoreProps<T>) {\r\n return (\r\n <input className=\"form-control input-filter-field\"\r\n disabled={props.disabled}\r\n id={(props.id ?? \"input-filter\") + \"-text\"}\r\n name={(props.name ?? \"input-filter\") + \"-text\"}\r\n placeholder={props.placeholder}\r\n value={handleGetValueText(props.value, props.options) ?? \"\"}\r\n onChange={event => props.onChange(event.target.value + props.select)}/>\r\n );\r\n}"],"mappings":";;;;AAQA,SAAgB,EAA4C,GAAgC;CACxF,OACI,kBAAC,SAAD;EAAO,WAAU;EACb,UAAU,EAAM;EAChB,KAAK,EAAM,MAAM,kBAAkB;EACnC,OAAO,EAAM,QAAQ,kBAAkB;EACvC,aAAa,EAAM;EACnB,OAAO,EAAmB,EAAM,OAAO,EAAM,OAAO,KAAK;EACzD,WAAU,MAAS,EAAM,SAAS,EAAM,OAAO,QAAQ,EAAM,MAAM;CAAG,CAAA;AAElF"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/function/handle.ts"],"sourcesContent":["import { validateDate } from \"./validate\";\nimport { handleNumber } from \"../../utils\";\nimport { InputFilterOptionsMap } from \"..\";\n\n/**\n * Obtém a opção de filtro correspondente ao valor fornecido.\n *\n * @param value - O valor para buscar uma opção correspondente.\n * @param options - Um array de opções de filtro disponíveis.\n * @returns A opção de filtro correspondente ou a primeira opção se nenhuma correspondência for encontrada.\n */\nexport function handleGetOption<T extends keyof InputFilterOptionsMap>(\n value: string | undefined,\n options: Array<InputFilterOptionsMap[T]>\n): string {\n let exists = options.filter(option => value?.includes(option));\n return exists[exists.length - 1] ?? options[0];\n}\n\n/**\n * Retorna apenas o valor sem os operadores filtro tipo `Text`.\n *\n * @param value - O valor completo, incluindo a opção de filtro.\n * @param options - Um array de opções de filtro disponíveis.\n * @returns O valor sem as opções de filtro.\n */\nexport function handleGetValueText(\n value: string | undefined,\n options: Array<InputFilterOptionsMap[\"text\"]>\n): string | null {\n let str = value;\n let exists = options\n .slice()\n .reverse()\n .find(item => str?.endsWith(item));\n if (exists && str !== undefined) {\n return str.slice(0, -exists.length);\n }\n return str ?? null;\n}\n\n/**\n * Retorna apenas o valor sem os operadores filtro tipo `Date`.\n *\n * @param value - O valor completo, incluindo a opção de filtro.\n * @param options - Um array de opções de filtro disponíveis.\n * @param select - Seletor do tipo de filtro\n * @returns O valor sem as opções de filtro.\n */\nexport function handleGetValueDate(\n value: string | undefined,\n options: Array<InputFilterOptionsMap[\"date\"]>,\n select: null | string = null\n): Array<number | string> {\n let str = value;\n let optsRegex = /(=|!=|<|>|<=|>=|\\{\\})/;\n let optsMatch = value?.match(optsRegex);\n let opts = optsMatch ? optsMatch[0].trim() : options[0];\n\n let parts: any[] = [];\n let interval = str?.split(\"{}\") ?? [];\n\n interval.forEach((value, index) => {\n let clean = value.replace(optsRegex, \"\").trim();\n\n if (clean.includes(\"/\")) {\n parts[index] = clean.split(\"/\").map(item => parseInt(item));\n } else {\n let number = parseInt(clean);\n parts[index] = [isNaN(number) ? 0 : number];\n }\n\n while (parts[index].length < 3) {\n parts[index].unshift(0);\n }\n });\n\n if (parts[1] && opts === \"{}\") {\n return [...validateDate(parts[0]), select ?? opts].concat(...validateDate(parts[1]));\n }\n return parts.length === 0\n ? [0, 0, 0, opts]\n : [...validateDate(parts[0]), select ?? opts];\n}\n\n/**\n * Atualiza um valor de data em uma posição específica e retorna a data formatada.\n *\n * @param value - O novo valor a ser inserido na data\n * @param position - A posição do valor a ser atualizado (0 para dia, 1 para mês, 2 para ano)\n * @param date - O array da data atual, incluindo as opções\n * @returns A data atualizada e formatada como string\n */\nexport function handleSetValueDate(\n value: string,\n position: number | null,\n date: (number | string)[]\n): string {\n if (position !== null) {\n date[position] = parseInt(value);\n }\n\n let opts = date[3];\n let firstDate = date.slice(0, 3);\n firstDate = validateDate(firstDate as number[]);\n\n if (opts !== \"{}\") {\n return `${firstDate[0]}/${firstDate[1]}/${firstDate[2]}${opts}`;\n }\n\n let lastDate = isNaN(parseInt(date[date.length - 1] as string)) && position === null\n ? [0, 0, 0]\n : date.slice(-3);\n lastDate = validateDate(lastDate as number[]);\n return `${firstDate[0]}/${firstDate[1]}/${firstDate[2]}${opts}${lastDate[0]}/${lastDate[1]}/${lastDate[2]}`;\n}\n\n/**\n * Obtém os valores selecionados do autocomplete a partir da string de valor e dos dados disponíveis.\n *\n * @param value - String contendo os IDs dos itens selecionados, separados por ponto e vírgula.\n * @param options - Array de opções de filtro disponíveis para o autocomplete.\n * @param data - Array de objetos contendo os dados disponíveis para seleção.\n * @returns Array de objetos correspondentes aos IDs selecionados.\n */\nexport function handleGetValueAutocomplete(\n value: string | undefined,\n options: Array<InputFilterOptionsMap[\"autocomplete\"]>,\n data: Array<{ id: number, label: string }>\n) {\n let values: any[] = value?.split(\";\").map(item => parseInt(item)) ?? [];\n return data.filter(item => values.includes(item.id));\n}\n\n/**\n * Converte os valores selecionados do autocomplete em uma string formatada para o filtro.\n *\n * @param value - Array de objetos selecionados no autocomplete.\n * @param select - String representando a opção de filtro selecionada.\n * @returns String formatada com os IDs dos itens selecionados e a opção de filtro.\n */\nexport function handleSetValueAutocomplete(\n value: Array<{ id: number, label: string }>,\n select: string,\n): string | null {\n let ids = value.map(item => item.id);\n return ids.length === 0 ? null : ids.join(\";\") + select;\n}\n\n/**\n * Retorna apenas o valor sem os operadores filtro tipo `Number`.\n *\n * @param value - O valor completo, incluindo a opção de filtro.\n * @param options - Um array de opções de filtro disponíveis.\n * @returns O valor sem as opções de filtro.\n */\nexport function handleGetValueNumber(\n value: string | undefined,\n options: Array<InputFilterOptionsMap[\"text\"]>\n): string {\n let str = value;\n let exists = options\n .slice()\n .reverse()\n .find(item => str?.endsWith(item));\n if (exists && str !== undefined) {\n return handleNumber(str.slice(0, -exists.length), \"decimal\", 0);\n }\n return handleNumber(str ?? \"\", \"decimal\", 0);\n}"],"mappings":";;;;AAWA,SAAgB,EACZ,GACA,GACM;CACN,IAAI,IAAS,EAAQ,QAAO,MAAU,GAAO,SAAS,EAAO,CAAC;CAC9D,OAAO,EAAO,EAAO,SAAS,MAAM,EAAQ;;AAUhD,SAAgB,EACZ,GACA,GACa;CACb,IAAI,IAAM,GACN,IAAS,EACR,OAAO,CACP,SAAS,CACT,MAAK,MAAQ,GAAK,SAAS,EAAK,CAAC;CAItC,OAHI,KAAU,MAAQ,KAAA,IACX,EAAI,MAAM,GAAG,CAAC,EAAO,OAAO,GAEhC,KAAO;;AAWlB,SAAgB,EACZ,GACA,GACA,IAAwB,MACF;CACtB,IAAI,IAAM,GACN,IAAY,yBACZ,IAAY,GAAO,MAAM,EAAU,EACnC,IAAO,IAAY,EAAU,GAAG,MAAM,GAAG,EAAQ,IAEjD,IAAe,EAAE;CAqBrB,QApBe,GAAK,MAAM,KAAK,IAAI,EAAE,EAE5B,SAAS,GAAO,MAAU;EAC/B,IAAI,IAAQ,EAAM,QAAQ,GAAW,GAAG,CAAC,MAAM;EAE/C,IAAI,EAAM,SAAS,IAAI,EACnB,EAAM,KAAS,EAAM,MAAM,IAAI,CAAC,KAAI,MAAQ,SAAS,EAAK,CAAC;OACxD;GACH,IAAI,IAAS,SAAS,EAAM;GAC5B,EAAM,KAAS,CAAC,MAAM,EAAO,GAAG,IAAI,EAAO;;EAG/C,OAAO,EAAM,GAAO,SAAS,IACzB,EAAM,GAAO,QAAQ,EAAE;GAE7B,EAEE,EAAM,MAAM,MAAS,OACd,CAAC,GAAG,EAAa,EAAM,GAAG,EAAE,KAAU,EAAK,CAAC,OAAO,GAAG,EAAa,EAAM,GAAG,CAAC,GAEjF,EAAM,WAAW,IAClB;EAAC;EAAG;EAAG;EAAG;EAAK,GACf,CAAC,GAAG,EAAa,EAAM,GAAG,EAAE,KAAU,EAAK;;AAWrD,SAAgB,EACZ,GACA,GACA,GACM;CACN,AAAI,MAAa,SACb,EAAK,KAAY,SAAS,EAAM;CAGpC,IAAI,IAAO,EAAK,IACZ,IAAY,EAAK,MAAM,GAAG,EAAE;CAGhC,IAFA,IAAY,EAAa,EAAsB,EAE3C,MAAS,MACT,OAAO,GAAG,EAAU,GAAG,GAAG,EAAU,GAAG,GAAG,EAAU,KAAK;CAG7D,IAAI,IAAW,MAAM,SAAS,EAAK,EAAK,SAAS,GAAa,CAAC,IAAI,MAAa,OAC1E;EAAC;EAAG;EAAG;EAAE,GACT,EAAK,MAAM,GAAG;CAEpB,OADA,IAAW,EAAa,EAAqB,EACtC,GAAG,EAAU,GAAG,GAAG,EAAU,GAAG,GAAG,EAAU,KAAK,IAAO,EAAS,GAAG,GAAG,EAAS,GAAG,GAAG,EAAS;;AAW3G,SAAgB,EACZ,GACA,GACA,GACF;CACE,IAAI,IAAgB,GAAO,MAAM,IAAI,CAAC,KAAI,MAAQ,SAAS,EAAK,CAAC,IAAI,EAAE;CACvE,OAAO,EAAK,QAAO,MAAQ,EAAO,SAAS,EAAK,GAAG,CAAC;;AAUxD,SAAgB,EACZ,GACA,GACa;CACb,IAAI,IAAM,EAAM,KAAI,MAAQ,EAAK,GAAG;CACpC,OAAO,EAAI,WAAW,IAAI,OAAO,EAAI,KAAK,IAAI,GAAG;;AAUrD,SAAgB,EACZ,GACA,GACM;CACN,IAAI,IAAM,GACN,IAAS,EACR,OAAO,CACP,SAAS,CACT,MAAK,MAAQ,GAAK,SAAS,EAAK,CAAC;CAItC,OAFW,EADP,KAAU,MAAQ,KAAA,IACE,EAAI,MAAM,GAAG,CAAC,EAAO,OAAO,GAEhC,KAAO,IAF2B,WAAW,EAAE"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/function/handle.ts"],"sourcesContent":["import { validateDate } from \"./validate\";\r\nimport { handleNumber } from \"../../utils\";\r\nimport { InputFilterOptionsMap } from \"..\";\r\n\r\n/**\r\n * Obtém a opção de filtro correspondente ao valor fornecido.\r\n *\r\n * @param value - O valor para buscar uma opção correspondente.\r\n * @param options - Um array de opções de filtro disponíveis.\r\n * @returns A opção de filtro correspondente ou a primeira opção se nenhuma correspondência for encontrada.\r\n */\r\nexport function handleGetOption<T extends keyof InputFilterOptionsMap>(\r\n value: string | undefined,\r\n options: Array<InputFilterOptionsMap[T]>\r\n): string {\r\n let exists = options.filter(option => value?.includes(option));\r\n return exists[exists.length - 1] ?? options[0];\r\n}\r\n\r\n/**\r\n * Retorna apenas o valor sem os operadores filtro tipo `Text`.\r\n *\r\n * @param value - O valor completo, incluindo a opção de filtro.\r\n * @param options - Um array de opções de filtro disponíveis.\r\n * @returns O valor sem as opções de filtro.\r\n */\r\nexport function handleGetValueText(\r\n value: string | undefined,\r\n options: Array<InputFilterOptionsMap[\"text\"]>\r\n): string | null {\r\n let str = value;\r\n let exists = options\r\n .slice()\r\n .reverse()\r\n .find(item => str?.endsWith(item));\r\n if (exists && str !== undefined) {\r\n return str.slice(0, -exists.length);\r\n }\r\n return str ?? null;\r\n}\r\n\r\n/**\r\n * Retorna apenas o valor sem os operadores filtro tipo `Date`.\r\n *\r\n * @param value - O valor completo, incluindo a opção de filtro.\r\n * @param options - Um array de opções de filtro disponíveis.\r\n * @param select - Seletor do tipo de filtro\r\n * @returns O valor sem as opções de filtro.\r\n */\r\nexport function handleGetValueDate(\r\n value: string | undefined,\r\n options: Array<InputFilterOptionsMap[\"date\"]>,\r\n select: null | string = null\r\n): Array<number | string> {\r\n let str = value;\r\n let optsRegex = /(=|!=|<|>|<=|>=|\\{\\})/;\r\n let optsMatch = value?.match(optsRegex);\r\n let opts = optsMatch ? optsMatch[0].trim() : options[0];\r\n\r\n let parts: any[] = [];\r\n let interval = str?.split(\"{}\") ?? [];\r\n\r\n interval.forEach((value, index) => {\r\n let clean = value.replace(optsRegex, \"\").trim();\r\n\r\n if (clean.includes(\"/\")) {\r\n parts[index] = clean.split(\"/\").map(item => parseInt(item));\r\n } else {\r\n let number = parseInt(clean);\r\n parts[index] = [isNaN(number) ? 0 : number];\r\n }\r\n\r\n while (parts[index].length < 3) {\r\n parts[index].unshift(0);\r\n }\r\n });\r\n\r\n if (parts[1] && opts === \"{}\") {\r\n return [...validateDate(parts[0]), select ?? opts].concat(...validateDate(parts[1]));\r\n }\r\n return parts.length === 0\r\n ? [0, 0, 0, opts]\r\n : [...validateDate(parts[0]), select ?? opts];\r\n}\r\n\r\n/**\r\n * Atualiza um valor de data em uma posição específica e retorna a data formatada.\r\n *\r\n * @param value - O novo valor a ser inserido na data\r\n * @param position - A posição do valor a ser atualizado (0 para dia, 1 para mês, 2 para ano)\r\n * @param date - O array da data atual, incluindo as opções\r\n * @returns A data atualizada e formatada como string\r\n */\r\nexport function handleSetValueDate(\r\n value: string,\r\n position: number | null,\r\n date: (number | string)[]\r\n): string {\r\n if (position !== null) {\r\n date[position] = parseInt(value);\r\n }\r\n\r\n let opts = date[3];\r\n let firstDate = date.slice(0, 3);\r\n firstDate = validateDate(firstDate as number[]);\r\n\r\n if (opts !== \"{}\") {\r\n return `${firstDate[0]}/${firstDate[1]}/${firstDate[2]}${opts}`;\r\n }\r\n\r\n let lastDate = isNaN(parseInt(date[date.length - 1] as string)) && position === null\r\n ? [0, 0, 0]\r\n : date.slice(-3);\r\n lastDate = validateDate(lastDate as number[]);\r\n return `${firstDate[0]}/${firstDate[1]}/${firstDate[2]}${opts}${lastDate[0]}/${lastDate[1]}/${lastDate[2]}`;\r\n}\r\n\r\n/**\r\n * Obtém os valores selecionados do autocomplete a partir da string de valor e dos dados disponíveis.\r\n *\r\n * @param value - String contendo os IDs dos itens selecionados, separados por ponto e vírgula.\r\n * @param options - Array de opções de filtro disponíveis para o autocomplete.\r\n * @param data - Array de objetos contendo os dados disponíveis para seleção.\r\n * @returns Array de objetos correspondentes aos IDs selecionados.\r\n */\r\nexport function handleGetValueAutocomplete(\r\n value: string | undefined,\r\n options: Array<InputFilterOptionsMap[\"autocomplete\"]>,\r\n data: Array<{ id: number, label: string }>\r\n) {\r\n let values: any[] = value?.split(\";\").map(item => parseInt(item)) ?? [];\r\n return data.filter(item => values.includes(item.id));\r\n}\r\n\r\n/**\r\n * Converte os valores selecionados do autocomplete em uma string formatada para o filtro.\r\n *\r\n * @param value - Array de objetos selecionados no autocomplete.\r\n * @param select - String representando a opção de filtro selecionada.\r\n * @returns String formatada com os IDs dos itens selecionados e a opção de filtro.\r\n */\r\nexport function handleSetValueAutocomplete(\r\n value: Array<{ id: number, label: string }>,\r\n select: string,\r\n): string | null {\r\n let ids = value.map(item => item.id);\r\n return ids.length === 0 ? null : ids.join(\";\") + select;\r\n}\r\n\r\n/**\r\n * Retorna apenas o valor sem os operadores filtro tipo `Number`.\r\n *\r\n * @param value - O valor completo, incluindo a opção de filtro.\r\n * @param options - Um array de opções de filtro disponíveis.\r\n * @returns O valor sem as opções de filtro.\r\n */\r\nexport function handleGetValueNumber(\r\n value: string | undefined,\r\n options: Array<InputFilterOptionsMap[\"text\"]>\r\n): string {\r\n let str = value;\r\n let exists = options\r\n .slice()\r\n .reverse()\r\n .find(item => str?.endsWith(item));\r\n if (exists && str !== undefined) {\r\n return handleNumber(str.slice(0, -exists.length), \"decimal\", 0);\r\n }\r\n return handleNumber(str ?? \"\", \"decimal\", 0);\r\n}"],"mappings":";;;;AAWA,SAAgB,EACZ,GACA,GACM;CACN,IAAI,IAAS,EAAQ,QAAO,MAAU,GAAO,SAAS,CAAM,CAAC;CAC7D,OAAO,EAAO,EAAO,SAAS,MAAM,EAAQ;AAChD;AASA,SAAgB,EACZ,GACA,GACa;CACb,IAAI,IAAM,GACN,IAAS,EACR,MAAM,EACN,QAAQ,EACR,MAAK,MAAQ,GAAK,SAAS,CAAI,CAAC;CAIrC,OAHI,KAAU,MAAQ,KAAA,IACX,EAAI,MAAM,GAAG,CAAC,EAAO,MAAM,IAE/B,KAAO;AAClB;AAUA,SAAgB,EACZ,GACA,GACA,IAAwB,MACF;CACtB,IAAI,IAAM,GACN,IAAY,yBACZ,IAAY,GAAO,MAAM,CAAS,GAClC,IAAO,IAAY,EAAU,GAAG,KAAK,IAAI,EAAQ,IAEjD,IAAe,CAAC;CAqBpB,QApBe,GAAK,MAAM,IAAI,KAAK,CAAC,GAE3B,SAAS,GAAO,MAAU;EAC/B,IAAI,IAAQ,EAAM,QAAQ,GAAW,EAAE,EAAE,KAAK;EAE9C,IAAI,EAAM,SAAS,GAAG,GAClB,EAAM,KAAS,EAAM,MAAM,GAAG,EAAE,KAAI,MAAQ,SAAS,CAAI,CAAC;OACvD;GACH,IAAI,IAAS,SAAS,CAAK;GAC3B,EAAM,KAAS,CAAC,MAAM,CAAM,IAAI,IAAI,CAAM;EAC9C;EAEA,OAAO,EAAM,GAAO,SAAS,IACzB,EAAM,GAAO,QAAQ,CAAC;CAE9B,CAAC,GAEG,EAAM,MAAM,MAAS,OACd,CAAC,GAAG,EAAa,EAAM,EAAE,GAAG,KAAU,CAAI,EAAE,OAAO,GAAG,EAAa,EAAM,EAAE,CAAC,IAEhF,EAAM,WAAW,IAClB;EAAC;EAAG;EAAG;EAAG;CAAI,IACd,CAAC,GAAG,EAAa,EAAM,EAAE,GAAG,KAAU,CAAI;AACpD;AAUA,SAAgB,EACZ,GACA,GACA,GACM;CACN,AAAI,MAAa,SACb,EAAK,KAAY,SAAS,CAAK;CAGnC,IAAI,IAAO,EAAK,IACZ,IAAY,EAAK,MAAM,GAAG,CAAC;CAG/B,IAFA,IAAY,EAAa,CAAqB,GAE1C,MAAS,MACT,OAAO,GAAG,EAAU,GAAG,GAAG,EAAU,GAAG,GAAG,EAAU,KAAK;CAG7D,IAAI,IAAW,MAAM,SAAS,EAAK,EAAK,SAAS,EAAY,CAAC,KAAK,MAAa,OAC1E;EAAC;EAAG;EAAG;CAAC,IACR,EAAK,MAAM,EAAE;CAEnB,OADA,IAAW,EAAa,CAAoB,GACrC,GAAG,EAAU,GAAG,GAAG,EAAU,GAAG,GAAG,EAAU,KAAK,IAAO,EAAS,GAAG,GAAG,EAAS,GAAG,GAAG,EAAS;AAC3G;AAUA,SAAgB,EACZ,GACA,GACA,GACF;CACE,IAAI,IAAgB,GAAO,MAAM,GAAG,EAAE,KAAI,MAAQ,SAAS,CAAI,CAAC,KAAK,CAAC;CACtE,OAAO,EAAK,QAAO,MAAQ,EAAO,SAAS,EAAK,EAAE,CAAC;AACvD;AASA,SAAgB,EACZ,GACA,GACa;CACb,IAAI,IAAM,EAAM,KAAI,MAAQ,EAAK,EAAE;CACnC,OAAO,EAAI,WAAW,IAAI,OAAO,EAAI,KAAK,GAAG,IAAI;AACrD;AASA,SAAgB,EACZ,GACA,GACM;CACN,IAAI,IAAM,GACN,IAAS,EACR,MAAM,EACN,QAAQ,EACR,MAAK,MAAQ,GAAK,SAAS,CAAI,CAAC;CAIrC,OAFW,EADP,KAAU,MAAQ,KAAA,IACE,EAAI,MAAM,GAAG,CAAC,EAAO,MAAM,IAE/B,KAAO,IAF2B,WAAW,CAAC;AAGtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/function/validate.ts"],"sourcesContent":["/**\n * Valida e ajusta uma data fornecida como um array de números.\n *\n * @param date - Um array de números representando [dia, mês, ano].\n * @returns Um array de números representando a data validada e ajustada.\n */\nexport function validateDate(date: number[]): number[] {\n const [day, month, year] = date;\n\n const isMonthValid = month >= 1 && month <= 12;\n const isYearValid = year > 0 && year < 99999;\n const isDayValid = day >= 1 && day <= 31;\n\n if (isYearValid && !isMonthValid && !isDayValid) {\n return [0, 0, year];\n }\n\n if (isYearValid && isMonthValid && !isDayValid) {\n return [0, month, year];\n }\n\n if (isYearValid && isMonthValid && isDayValid) {\n let currentDate = new Date(year, month, 0);\n if (currentDate.getDate() < day) {\n return [currentDate.getDate(), month, year];\n }\n return date;\n }\n\n if (!isYearValid && isMonthValid && !isDayValid) {\n return [0, month, 0];\n }\n\n if (!isYearValid && isMonthValid && isDayValid) {\n return [day, month, 0];\n }\n\n if (!isYearValid && !isMonthValid && isDayValid) {\n return [day, 0, 0];\n }\n\n if (isYearValid && !isMonthValid && isDayValid) {\n return [day, 0, year];\n }\n\n return [0, 0, 0];\n}"],"mappings":";AAMA,SAAgB,EAAa,GAA0B;CACnD,IAAM,CAAC,GAAK,GAAO,KAAQ,GAErB,IAAe,KAAS,KAAK,KAAS,IACtC,IAAc,IAAO,KAAK,IAAO,OACjC,IAAa,KAAO,KAAK,KAAO;CAEtC,IAAI,KAAe,CAAC,KAAgB,CAAC,GACjC,OAAO;EAAC;EAAG;EAAG;EAAK;CAGvB,IAAI,KAAe,KAAgB,CAAC,GAChC,OAAO;EAAC;EAAG;EAAO;EAAK;CAG3B,IAAI,KAAe,KAAgB,GAAY;EAC3C,IAAI,IAAc,IAAI,KAAK,GAAM,GAAO,EAAE;EAI1C,OAHI,EAAY,SAAS,GAAG,IACjB;GAAC,EAAY,SAAS;GAAE;GAAO;GAAK,GAExC;;CAmBX,OAhBI,CAAC,KAAe,KAAgB,CAAC,IAC1B;EAAC;EAAG;EAAO;EAAE,GAGpB,CAAC,KAAe,KAAgB,IACzB;EAAC;EAAK;EAAO;EAAE,GAGtB,CAAC,KAAe,CAAC,KAAgB,IAC1B;EAAC;EAAK;EAAG;EAAE,GAGlB,KAAe,CAAC,KAAgB,IACzB;EAAC;EAAK;EAAG;EAAK,GAGlB;EAAC;EAAG;EAAG;EAAE"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/inputfilter/function/validate.ts"],"sourcesContent":["/**\r\n * Valida e ajusta uma data fornecida como um array de números.\r\n *\r\n * @param date - Um array de números representando [dia, mês, ano].\r\n * @returns Um array de números representando a data validada e ajustada.\r\n */\r\nexport function validateDate(date: number[]): number[] {\r\n const [day, month, year] = date;\r\n\r\n const isMonthValid = month >= 1 && month <= 12;\r\n const isYearValid = year > 0 && year < 99999;\r\n const isDayValid = day >= 1 && day <= 31;\r\n\r\n if (isYearValid && !isMonthValid && !isDayValid) {\r\n return [0, 0, year];\r\n }\r\n\r\n if (isYearValid && isMonthValid && !isDayValid) {\r\n return [0, month, year];\r\n }\r\n\r\n if (isYearValid && isMonthValid && isDayValid) {\r\n let currentDate = new Date(year, month, 0);\r\n if (currentDate.getDate() < day) {\r\n return [currentDate.getDate(), month, year];\r\n }\r\n return date;\r\n }\r\n\r\n if (!isYearValid && isMonthValid && !isDayValid) {\r\n return [0, month, 0];\r\n }\r\n\r\n if (!isYearValid && isMonthValid && isDayValid) {\r\n return [day, month, 0];\r\n }\r\n\r\n if (!isYearValid && !isMonthValid && isDayValid) {\r\n return [day, 0, 0];\r\n }\r\n\r\n if (isYearValid && !isMonthValid && isDayValid) {\r\n return [day, 0, year];\r\n }\r\n\r\n return [0, 0, 0];\r\n}"],"mappings":";AAMA,SAAgB,EAAa,GAA0B;CACnD,IAAM,CAAC,GAAK,GAAO,KAAQ,GAErB,IAAe,KAAS,KAAK,KAAS,IACtC,IAAc,IAAO,KAAK,IAAO,OACjC,IAAa,KAAO,KAAK,KAAO;CAEtC,IAAI,KAAe,CAAC,KAAgB,CAAC,GACjC,OAAO;EAAC;EAAG;EAAG;CAAI;CAGtB,IAAI,KAAe,KAAgB,CAAC,GAChC,OAAO;EAAC;EAAG;EAAO;CAAI;CAG1B,IAAI,KAAe,KAAgB,GAAY;EAC3C,IAAI,IAAc,IAAI,KAAK,GAAM,GAAO,CAAC;EAIzC,OAHI,EAAY,QAAQ,IAAI,IACjB;GAAC,EAAY,QAAQ;GAAG;GAAO;EAAI,IAEvC;CACX;CAkBA,OAhBI,CAAC,KAAe,KAAgB,CAAC,IAC1B;EAAC;EAAG;EAAO;CAAC,IAGnB,CAAC,KAAe,KAAgB,IACzB;EAAC;EAAK;EAAO;CAAC,IAGrB,CAAC,KAAe,CAAC,KAAgB,IAC1B;EAAC;EAAK;EAAG;CAAC,IAGjB,KAAe,CAAC,KAAgB,IACzB;EAAC;EAAK;EAAG;CAAI,IAGjB;EAAC;EAAG;EAAG;CAAC;AACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/inputfilter/inputfilter.tsx"],"sourcesContent":["import { Box } from \"../box\";\nimport { Text } from \"./core/text\";\nimport { Date } from \"./core/date\";\nimport { InputLabel } from \"../api\";\nimport { Number } from \"./core/number\";\nimport * as handle from \"./function/handle\";\nimport { classNames } from \"primereact/utils\";\nimport { Autocomplete } from \"./core/autocomplete\";\nimport React, { useState, useEffect } from \"react\";\nimport { optionsDefault, optionsLabel } from \"./const\";\nimport { InputFilterOptionsMap, InputFilterProps } from \".\";\n\n/**\n * Componente - `InputFilter`\n *\n * Um componente utilizado para montar o objeto de pesquisa de dados.\n * Permite alterar o seu tipo através do type: `text`, `date`, `autocomplete`.\n */\nexport function InputFilter<T extends keyof InputFilterOptionsMap = \"text\">({ ...props }: InputFilterProps<T>) {\n\n const options: any[] = (props.options ?? optionsDefault).sort((a, b) => a.length - b.length);\n const selectOptions = optionsLabel.filter(item => options?.includes(item.options as any));\n const [select, setSelect] = useState<string>(handle.handleGetOption<T>(props.value, options));\n\n useEffect(() => {\n if (!props.type || props.type === \"text\") {\n let value = handle.handleGetValueText(props.value, options);\n if (value !== null) {\n props.onChange(value + select);\n } else {\n props.onChange(null);\n }\n } else if (props.type === \"date\") {\n let date = handle.handleGetValueDate(props.value, options, select);\n let setDate = handle.handleSetValueDate(\"0\", null, date);\n\n if (select === \"{}\" && setDate === \"0/0/0{}0/0/0\") {\n props.onChange(null);\n } else {\n if (date[0] == 0 && date[1] == 0 && date[2] == 0) {\n props.onChange(null);\n } else {\n props.onChange(setDate);\n }\n }\n } else if (props.type === \"autocomplete\") {\n let value = handle.handleGetValueAutocomplete(props.value, options, props.data);\n props.onChange(handle.handleSetValueAutocomplete(value, select));\n } else if (props.type === \"number\") {\n let value = handle.handleGetValueNumber(props.value, options);\n if (value !== \"\") {\n props.onChange(value + select);\n } else {\n props.onChange(null);\n }\n }\n }, [select]);\n\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return (\n <Box {...props}\n className={classNames([props.className, \"input-filter-container\"])}>\n <InputLabel {...props}/>\n <div className=\"input-filter-content\"\n id={props.id ?? \"input-filter\"}>\n <select className=\"form-select input-filter-select\"\n disabled={props.disabled}\n id={(props.id ?? \"input-filter\") + \"-select\"}\n name={(props.name ?? \"input-filter\") + \"-select\"}\n value={select}\n onChange={event => setSelect(event.target.value)}>\n {selectOptions?.map(item => (\n <option key={item.options}\n value={item.options}>{item.label}</option>\n ))}\n </select>\n {(!props.type || props.type === \"text\")\n && <Text<\"text\"> {...props as InputFilterProps<\"text\">}\n options={options}\n select={select}/>}\n {props.type === \"date\"\n && <Date<\"date\"> {...props as InputFilterProps<\"date\">}\n options={options}\n select={select}/>}\n {props.type === \"autocomplete\"\n && <Autocomplete<\"autocomplete\"> {...props as InputFilterProps<\"autocomplete\">}\n options={options}\n select={select}/>}\n {props.type === \"number\"\n && <Number<\"number\"> {...props}\n options={options}\n select={select}/>}\n </div>\n </Box>\n );\n}\n\nInputFilter.displayName = \"InputFilter\";"],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgB,EAA4D,EAAE,GAAG,KAA8B;CAE3G,IAAM,KAAkB,EAAM,WAAW,GAAgB,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,OAAO,EACtF,IAAgB,EAAa,QAAO,MAAQ,GAAS,SAAS,EAAK,QAAe,CAAC,EACnF,CAAC,GAAQ,KAAa,EAAiB,EAA0B,EAAM,OAAO,EAAQ,CAAC;CAyC7F,OAvCA,QAAgB;EACZ,IAAI,CAAC,EAAM,QAAQ,EAAM,SAAS,QAAQ;GACtC,IAAI,IAAQ,EAA0B,EAAM,OAAO,EAAQ;GAC3D,AAAI,MAAU,OAGV,EAAM,SAAS,KAAK,GAFpB,EAAM,SAAS,IAAQ,EAAO;SAI/B,IAAI,EAAM,SAAS,QAAQ;GAC9B,IAAI,IAAO,EAA0B,EAAM,OAAO,GAAS,EAAO,EAC9D,IAAU,EAA0B,KAAK,MAAM,EAAK;GAExD,AAAI,MAAW,QAAQ,MAAY,kBAG3B,EAAK,MAAM,KAAK,EAAK,MAAM,KAAK,EAAK,MAAM,IAF/C,EAAM,SAAS,KAAK,GAKhB,EAAM,SAAS,EAAQ;SAG5B,IAAI,EAAM,SAAS,gBAAgB;GACtC,IAAI,IAAQ,EAAkC,EAAM,OAAO,GAAS,EAAM,KAAK;GAC/E,EAAM,SAAS,EAAkC,GAAO,EAAO,CAAC;SAC7D,IAAI,EAAM,SAAS,UAAU;GAChC,IAAI,IAAQ,EAA4B,EAAM,OAAO,EAAQ;GAC7D,AAAI,MAAU,KAGV,EAAM,SAAS,KAAK,GAFpB,EAAM,SAAS,IAAQ,EAAO;;IAKvC,CAAC,EAAO,CAAC,EAQR,kBAAC,GAAD;EAAK,GAAI;EACL,WAAW,EAAW,CAAC,EAAM,WAAW,yBAAyB,CAAC;YADtE,CAEI,kBAAC,GAAD,EAAY,GAAI,GAAQ,CAAA,EACxB,kBAAC,OAAD;GAAK,WAAU;GACX,IAAI,EAAM,MAAM;aADpB;IAEI,kBAAC,UAAD;KAAQ,WAAU;KACd,UAAU,EAAM;KAChB,KAAK,EAAM,MAAM,kBAAkB;KACnC,OAAO,EAAM,QAAQ,kBAAkB;KACvC,OAAO;KACP,WAAU,MAAS,EAAU,EAAM,OAAO,MAAM;eAC/C,GAAe,KAAI,MAChB,kBAAC,UAAD;MACI,OAAO,EAAK;gBAAU,EAAK;MAAe,EADjC,EAAK,QAC4B,CAChD;KACG,CAAA;KACP,CAAC,EAAM,QAAQ,EAAM,SAAS,WACzB,kBAAC,GAAD;KAAc,GAAI;KACR;KACD;KAAS,CAAA;IACxB,EAAM,SAAS,UACT,kBAAC,GAAD;KAAc,GAAI;KACR;KACD;KAAS,CAAA;IACxB,EAAM,SAAS,kBACT,kBAAC,GAAD;KAA8B,GAAI;KACxB;KACD;KAAS,CAAA;IACxB,EAAM,SAAS,YACT,kBAAC,GAAD;KAAkB,GAAI;KACZ;KACD;KAAS,CAAA;IACvB;KACJ;;;AAId,EAAY,cAAc"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/inputfilter/inputfilter.tsx"],"sourcesContent":["import { Box } from \"../box\";\r\nimport { Text } from \"./core/text\";\r\nimport { Date } from \"./core/date\";\r\nimport { InputLabel } from \"../api\";\r\nimport { Number } from \"./core/number\";\r\nimport * as handle from \"./function/handle\";\r\nimport { classNames } from \"primereact/utils\";\r\nimport { Autocomplete } from \"./core/autocomplete\";\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { optionsDefault, optionsLabel } from \"./const\";\r\nimport { InputFilterOptionsMap, InputFilterProps } from \".\";\r\n\r\n/**\r\n * Componente - `InputFilter`\r\n *\r\n * Um componente utilizado para montar o objeto de pesquisa de dados.\r\n * Permite alterar o seu tipo através do type: `text`, `date`, `autocomplete`.\r\n */\r\nexport function InputFilter<T extends keyof InputFilterOptionsMap = \"text\">({ ...props }: InputFilterProps<T>) {\r\n\r\n const options: any[] = (props.options ?? optionsDefault).sort((a, b) => a.length - b.length);\r\n const selectOptions = optionsLabel.filter(item => options?.includes(item.options as any));\r\n const [select, setSelect] = useState<string>(handle.handleGetOption<T>(props.value, options));\r\n\r\n useEffect(() => {\r\n if (!props.type || props.type === \"text\") {\r\n let value = handle.handleGetValueText(props.value, options);\r\n if (value !== null) {\r\n props.onChange(value + select);\r\n } else {\r\n props.onChange(null);\r\n }\r\n } else if (props.type === \"date\") {\r\n let date = handle.handleGetValueDate(props.value, options, select);\r\n let setDate = handle.handleSetValueDate(\"0\", null, date);\r\n\r\n if (select === \"{}\" && setDate === \"0/0/0{}0/0/0\") {\r\n props.onChange(null);\r\n } else {\r\n if (date[0] == 0 && date[1] == 0 && date[2] == 0) {\r\n props.onChange(null);\r\n } else {\r\n props.onChange(setDate);\r\n }\r\n }\r\n } else if (props.type === \"autocomplete\") {\r\n let value = handle.handleGetValueAutocomplete(props.value, options, props.data);\r\n props.onChange(handle.handleSetValueAutocomplete(value, select));\r\n } else if (props.type === \"number\") {\r\n let value = handle.handleGetValueNumber(props.value, options);\r\n if (value !== \"\") {\r\n props.onChange(value + select);\r\n } else {\r\n props.onChange(null);\r\n }\r\n }\r\n }, [select]);\r\n\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <Box {...props}\r\n className={classNames([props.className, \"input-filter-container\"])}>\r\n <InputLabel {...props}/>\r\n <div className=\"input-filter-content\"\r\n id={props.id ?? \"input-filter\"}>\r\n <select className=\"form-select input-filter-select\"\r\n disabled={props.disabled}\r\n id={(props.id ?? \"input-filter\") + \"-select\"}\r\n name={(props.name ?? \"input-filter\") + \"-select\"}\r\n value={select}\r\n onChange={event => setSelect(event.target.value)}>\r\n {selectOptions?.map(item => (\r\n <option key={item.options}\r\n value={item.options}>{item.label}</option>\r\n ))}\r\n </select>\r\n {(!props.type || props.type === \"text\")\r\n && <Text<\"text\"> {...props as InputFilterProps<\"text\">}\r\n options={options}\r\n select={select}/>}\r\n {props.type === \"date\"\r\n && <Date<\"date\"> {...props as InputFilterProps<\"date\">}\r\n options={options}\r\n select={select}/>}\r\n {props.type === \"autocomplete\"\r\n && <Autocomplete<\"autocomplete\"> {...props as InputFilterProps<\"autocomplete\">}\r\n options={options}\r\n select={select}/>}\r\n {props.type === \"number\"\r\n && <Number<\"number\"> {...props}\r\n options={options}\r\n select={select}/>}\r\n </div>\r\n </Box>\r\n );\r\n}\r\n\r\nInputFilter.displayName = \"InputFilter\";"],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgB,EAA4D,EAAE,GAAG,KAA8B;CAE3G,IAAM,KAAkB,EAAM,WAAW,GAAgB,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,GACrF,IAAgB,EAAa,QAAO,MAAQ,GAAS,SAAS,EAAK,OAAc,CAAC,GAClF,CAAC,GAAQ,KAAa,EAAiB,EAA0B,EAAM,OAAO,CAAO,CAAC;CAyC5F,OAvCA,QAAgB;EACZ,IAAI,CAAC,EAAM,QAAQ,EAAM,SAAS,QAAQ;GACtC,IAAI,IAAQ,EAA0B,EAAM,OAAO,CAAO;GAC1D,AAAI,MAAU,OAGV,EAAM,SAAS,IAAI,IAFnB,EAAM,SAAS,IAAQ,CAAM;EAIrC,OAAO,IAAI,EAAM,SAAS,QAAQ;GAC9B,IAAI,IAAO,EAA0B,EAAM,OAAO,GAAS,CAAM,GAC7D,IAAU,EAA0B,KAAK,MAAM,CAAI;GAEvD,AAAI,MAAW,QAAQ,MAAY,kBAG3B,EAAK,MAAM,KAAK,EAAK,MAAM,KAAK,EAAK,MAAM,IAF/C,EAAM,SAAS,IAAI,IAKf,EAAM,SAAS,CAAO;EAGlC,OAAO,IAAI,EAAM,SAAS,gBAAgB;GACtC,IAAI,IAAQ,EAAkC,EAAM,OAAO,GAAS,EAAM,IAAI;GAC9E,EAAM,SAAS,EAAkC,GAAO,CAAM,CAAC;EACnE,OAAO,IAAI,EAAM,SAAS,UAAU;GAChC,IAAI,IAAQ,EAA4B,EAAM,OAAO,CAAO;GAC5D,AAAI,MAAU,KAGV,EAAM,SAAS,IAAI,IAFnB,EAAM,SAAS,IAAQ,CAAM;EAIrC;CACJ,GAAG,CAAC,CAAM,CAAC,GAQP,kBAAC,GAAD;EAAK,GAAI;EACL,WAAW,EAAW,CAAC,EAAM,WAAW,wBAAwB,CAAC;YADrE,CAEI,kBAAC,GAAD,EAAY,GAAI,EAAO,CAAA,GACvB,kBAAC,OAAD;GAAK,WAAU;GACX,IAAI,EAAM,MAAM;aADpB;IAEI,kBAAC,UAAD;KAAQ,WAAU;KACd,UAAU,EAAM;KAChB,KAAK,EAAM,MAAM,kBAAkB;KACnC,OAAO,EAAM,QAAQ,kBAAkB;KACvC,OAAO;KACP,WAAU,MAAS,EAAU,EAAM,OAAO,KAAK;eAC9C,GAAe,KAAI,MAChB,kBAAC,UAAD;MACI,OAAO,EAAK;gBAAU,EAAK;KAAc,GADhC,EAAK,OAC2B,CAChD;IACG,CAAA;KACN,CAAC,EAAM,QAAQ,EAAM,SAAS,WACzB,kBAAC,GAAD;KAAc,GAAI;KACR;KACD;IAAQ,CAAA;IACvB,EAAM,SAAS,UACT,kBAAC,GAAD;KAAc,GAAI;KACR;KACD;IAAQ,CAAA;IACvB,EAAM,SAAS,kBACT,kBAAC,GAAD;KAA8B,GAAI;KACxB;KACD;IAAQ,CAAA;IACvB,EAAM,SAAS,YACT,kBAAC,GAAD;KAAkB,GAAI;KACZ;KACD;IAAQ,CAAA;GACvB;IACJ;;AAEb;AAEA,EAAY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/inputfilter/legend.ts"],"sourcesContent":["import { MES } from \"../utils\";\nimport { optionsLabel } from \"./const\";\n\n/**\n * Retorna a legenda de acordo com operador na string\n * @param value - Valor a ser tratado\n */\nexport function filterLegend(value: string | undefined): string | null {\n if (!value) {\n return null;\n }\n let optsRegex = /(=|!=|<|>|<=|>=|%|!%|\\{\\})/;\n let optsMatch = value?.match(optsRegex);\n let opts = value.charAt(value.length - 1);\n let option = optsMatch?.[0];\n\n if (optsMatch?.[0] !== opts && isNaN(parseInt(opts)) && option?.slice(-1) !== opts) {\n option = optsMatch?.[0] + opts;\n }\n return optionsLabel.filter(item => item.options === option)[0]?.label ?? null;\n}\n\n/**\n * Realiza o tratamento das informações para retorna a legenda do tipo `Date`\n * @param value - Valor a ser tratado\n */\nexport function filterLegendData(value: string | undefined): string {\n let legend = filterLegend(value);\n if (legend === null) {\n return \"Não encontramos legenda definida.\";\n }\n\n let interval = value?.split(\"{}\");\n let date = value?.split(\"/\");\n\n const handleLegend = (date: any): string => {\n let dia = parseInt(date[0]);\n let mes = parseInt(date[1], 10);\n let ano = parseInt(date[2]);\n\n return `\n ${(dia > 0 ? `${mes == 0 ? \"dia\" : \"\"} ${dia}` : \"\")} \n ${mes > 0 ? `${dia > 0 ? \"de\" : \"\"} ${MES[mes - 1]?.name}` : \"\"} \n ${ano > 0 ? `${dia > 0 || mes > 0 ? \"de\" : \"\"} ${ano}` : \"\"}\n `.replace(/\\s+/g, \" \").trim();\n };\n let result = interval?.[1] === undefined\n ? handleLegend(date)\n : handleLegend(interval[0].split(\"/\")) + \" à \" + handleLegend(interval[1].split(\"/\"));\n return legend + \": \" + result;\n}\n\n/**\n * Realiza o tratamento das informações para retorna a legenda do tipo `Text`\n * @param value - Valor a ser tratado\n */\nexport function filterLegendText(value: string | undefined): string {\n let legend = filterLegend(value);\n if (legend === null) {\n return \"Não encontramos legenda definida.\";\n }\n return legend + \": \" + (value?.replace(/(=|!=|<|>|<=|>=|%|!%|\\{\\})/g, \"\") ?? \"\");\n}\n\n/**\n * Realiza o tratamento das informações para retorna a legando do tipo `autocomplete`\n * @param value - Valor a ser tratado\n * @param dto - Array de objeto para ser pesquisado a legenda\n * @param word - Limite de palavras para a legenda\n */\nexport function filterLegendAutocomplete(value: string | undefined, dto: any[] = [], word: number = 30): string {\n let legend = filterLegend(value);\n if (legend === null || dto.length === 0) {\n return \"Não encontramos legenda definida.\";\n }\n let ids: any[] = value?.split(\";\").map(item => parseInt(item)) ?? [];\n let values = dto\n .filter(obj => ids.includes(obj.id))\n .map(item => item.label).join(\", \");\n let text = values.substring(0, word);\n return legend + \": \" + text + (text.length !== values.length ? \"...\" : \"\");\n}"],"mappings":";;;;AAOA,SAAgB,EAAa,GAA0C;CACnE,IAAI,CAAC,GACD,OAAO;CAGX,IAAI,IAAY,GAAO,MAAM,6BAAU,EACnC,IAAO,EAAM,OAAO,EAAM,SAAS,EAAE,EACrC,IAAS,IAAY;CAKzB,OAHI,IAAY,OAAO,KAAQ,MAAM,SAAS,EAAK,CAAC,IAAI,GAAQ,MAAM,GAAG,KAAK,MAC1E,IAAS,IAAY,KAAK,IAEvB,EAAa,QAAO,MAAQ,EAAK,YAAY,EAAO,CAAC,IAAI,SAAS;;AAO7E,SAAgB,EAAiB,GAAmC;CAChE,IAAI,IAAS,EAAa,EAAM;CAChC,IAAI,MAAW,MACX,OAAO;CAGX,IAAI,IAAW,GAAO,MAAM,KAAK,EAC7B,IAAO,GAAO,MAAM,IAAI,EAEtB,KAAgB,MAAsB;EACxC,IAAI,IAAM,SAAS,EAAK,GAAG,EACvB,IAAM,SAAS,EAAK,IAAI,GAAG,EAC3B,IAAM,SAAS,EAAK,GAAG;EAE3B,OAAO;cACA,IAAM,IAAI,GAAG,KAAO,IAAI,QAAQ,GAAG,GAAG,MAAQ,GAAI;cACnD,IAAM,IAAI,GAAG,IAAM,IAAI,OAAO,GAAG,GAAG,EAAI,IAAM,IAAI,SAAS,GAAG;cAC9D,IAAM,IAAI,GAAG,IAAM,KAAK,IAAM,IAAI,OAAO,GAAG,GAAG,MAAQ,GAAG;UAC9D,QAAQ,QAAQ,IAAI,CAAC,MAAM;IAE7B,IAAS,IAAW,OAAO,KAAA,IACzB,EAAa,EAAK,GAClB,EAAa,EAAS,GAAG,MAAM,IAAI,CAAC,GAAG,QAAQ,EAAa,EAAS,GAAG,MAAM,IAAI,CAAC;CACzF,OAAO,IAAS,OAAO;;AAO3B,SAAgB,EAAiB,GAAmC;CAChE,IAAI,IAAS,EAAa,EAAM;CAIhC,OAHI,MAAW,OACJ,sCAEJ,IAAS,QAAQ,GAAO,QAAQ,+BAA+B,GAAG,IAAI;;AASjF,SAAgB,EAAyB,GAA2B,IAAa,EAAE,EAAE,IAAe,IAAY;CAC5G,IAAI,IAAS,EAAa,EAAM;CAChC,IAAI,MAAW,QAAQ,EAAI,WAAW,GAClC,OAAO;CAEX,IAAI,IAAa,GAAO,MAAM,IAAI,CAAC,KAAI,MAAQ,SAAS,EAAK,CAAC,IAAI,EAAE,EAChE,IAAS,EACR,QAAO,MAAO,EAAI,SAAS,EAAI,GAAG,CAAC,CACnC,KAAI,MAAQ,EAAK,MAAM,CAAC,KAAK,KAAK,EACnC,IAAO,EAAO,UAAU,GAAG,EAAK;CACpC,OAAO,IAAS,OAAO,KAAQ,EAAK,WAAW,EAAO,SAAiB,KAAR"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/inputfilter/legend.ts"],"sourcesContent":["import { MES } from \"../utils\";\r\nimport { optionsLabel } from \"./const\";\r\n\r\n/**\r\n * Retorna a legenda de acordo com operador na string\r\n * @param value - Valor a ser tratado\r\n */\r\nexport function filterLegend(value: string | undefined): string | null {\r\n if (!value) {\r\n return null;\r\n }\r\n let optsRegex = /(=|!=|<|>|<=|>=|%|!%|\\{\\})/;\r\n let optsMatch = value?.match(optsRegex);\r\n let opts = value.charAt(value.length - 1);\r\n let option = optsMatch?.[0];\r\n\r\n if (optsMatch?.[0] !== opts && isNaN(parseInt(opts)) && option?.slice(-1) !== opts) {\r\n option = optsMatch?.[0] + opts;\r\n }\r\n return optionsLabel.filter(item => item.options === option)[0]?.label ?? null;\r\n}\r\n\r\n/**\r\n * Realiza o tratamento das informações para retorna a legenda do tipo `Date`\r\n * @param value - Valor a ser tratado\r\n */\r\nexport function filterLegendData(value: string | undefined): string {\r\n let legend = filterLegend(value);\r\n if (legend === null) {\r\n return \"Não encontramos legenda definida.\";\r\n }\r\n\r\n let interval = value?.split(\"{}\");\r\n let date = value?.split(\"/\");\r\n\r\n const handleLegend = (date: any): string => {\r\n let dia = parseInt(date[0]);\r\n let mes = parseInt(date[1], 10);\r\n let ano = parseInt(date[2]);\r\n\r\n return `\r\n ${(dia > 0 ? `${mes == 0 ? \"dia\" : \"\"} ${dia}` : \"\")} \r\n ${mes > 0 ? `${dia > 0 ? \"de\" : \"\"} ${MES[mes - 1]?.name}` : \"\"} \r\n ${ano > 0 ? `${dia > 0 || mes > 0 ? \"de\" : \"\"} ${ano}` : \"\"}\r\n `.replace(/\\s+/g, \" \").trim();\r\n };\r\n let result = interval?.[1] === undefined\r\n ? handleLegend(date)\r\n : handleLegend(interval[0].split(\"/\")) + \" à \" + handleLegend(interval[1].split(\"/\"));\r\n return legend + \": \" + result;\r\n}\r\n\r\n/**\r\n * Realiza o tratamento das informações para retorna a legenda do tipo `Text`\r\n * @param value - Valor a ser tratado\r\n */\r\nexport function filterLegendText(value: string | undefined): string {\r\n let legend = filterLegend(value);\r\n if (legend === null) {\r\n return \"Não encontramos legenda definida.\";\r\n }\r\n return legend + \": \" + (value?.replace(/(=|!=|<|>|<=|>=|%|!%|\\{\\})/g, \"\") ?? \"\");\r\n}\r\n\r\n/**\r\n * Realiza o tratamento das informações para retorna a legando do tipo `autocomplete`\r\n * @param value - Valor a ser tratado\r\n * @param dto - Array de objeto para ser pesquisado a legenda\r\n * @param word - Limite de palavras para a legenda\r\n */\r\nexport function filterLegendAutocomplete(value: string | undefined, dto: any[] = [], word: number = 30): string {\r\n let legend = filterLegend(value);\r\n if (legend === null || dto.length === 0) {\r\n return \"Não encontramos legenda definida.\";\r\n }\r\n let ids: any[] = value?.split(\";\").map(item => parseInt(item)) ?? [];\r\n let values = dto\r\n .filter(obj => ids.includes(obj.id))\r\n .map(item => item.label).join(\", \");\r\n let text = values.substring(0, word);\r\n return legend + \": \" + text + (text.length !== values.length ? \"...\" : \"\");\r\n}"],"mappings":";;;;AAOA,SAAgB,EAAa,GAA0C;CACnE,IAAI,CAAC,GACD,OAAO;CAGX,IAAI,IAAY,GAAO,MAAM,4BAAS,GAClC,IAAO,EAAM,OAAO,EAAM,SAAS,CAAC,GACpC,IAAS,IAAY;CAKzB,OAHI,IAAY,OAAO,KAAQ,MAAM,SAAS,CAAI,CAAC,KAAK,GAAQ,MAAM,EAAE,MAAM,MAC1E,IAAS,IAAY,KAAK,IAEvB,EAAa,QAAO,MAAQ,EAAK,YAAY,CAAM,EAAE,IAAI,SAAS;AAC7E;AAMA,SAAgB,EAAiB,GAAmC;CAChE,IAAI,IAAS,EAAa,CAAK;CAC/B,IAAI,MAAW,MACX,OAAO;CAGX,IAAI,IAAW,GAAO,MAAM,IAAI,GAC5B,IAAO,GAAO,MAAM,GAAG,GAErB,KAAgB,MAAsB;EACxC,IAAI,IAAM,SAAS,EAAK,EAAE,GACtB,IAAM,SAAS,EAAK,IAAI,EAAE,GAC1B,IAAM,SAAS,EAAK,EAAE;EAE1B,OAAO;cACA,IAAM,IAAI,GAAG,KAAO,IAAI,QAAQ,GAAG,GAAG,MAAQ,GAAI;cACnD,IAAM,IAAI,GAAG,IAAM,IAAI,OAAO,GAAG,GAAG,EAAI,IAAM,IAAI,SAAS,GAAG;cAC9D,IAAM,IAAI,GAAG,IAAM,KAAK,IAAM,IAAI,OAAO,GAAG,GAAG,MAAQ,GAAG;UAC9D,QAAQ,QAAQ,GAAG,EAAE,KAAK;CAChC,GACI,IAAS,IAAW,OAAO,KAAA,IACzB,EAAa,CAAI,IACjB,EAAa,EAAS,GAAG,MAAM,GAAG,CAAC,IAAI,QAAQ,EAAa,EAAS,GAAG,MAAM,GAAG,CAAC;CACxF,OAAO,IAAS,OAAO;AAC3B;AAMA,SAAgB,EAAiB,GAAmC;CAChE,IAAI,IAAS,EAAa,CAAK;CAI/B,OAHI,MAAW,OACJ,sCAEJ,IAAS,QAAQ,GAAO,QAAQ,+BAA+B,EAAE,KAAK;AACjF;AAQA,SAAgB,EAAyB,GAA2B,IAAa,CAAC,GAAG,IAAe,IAAY;CAC5G,IAAI,IAAS,EAAa,CAAK;CAC/B,IAAI,MAAW,QAAQ,EAAI,WAAW,GAClC,OAAO;CAEX,IAAI,IAAa,GAAO,MAAM,GAAG,EAAE,KAAI,MAAQ,SAAS,CAAI,CAAC,KAAK,CAAC,GAC/D,IAAS,EACR,QAAO,MAAO,EAAI,SAAS,EAAI,EAAE,CAAC,EAClC,KAAI,MAAQ,EAAK,KAAK,EAAE,KAAK,IAAI,GAClC,IAAO,EAAO,UAAU,GAAG,CAAI;CACnC,OAAO,IAAS,OAAO,KAAQ,EAAK,WAAW,EAAO,SAAiB,KAAR;AACnE"}
@@ -1,12 +1,14 @@
1
1
  import { ApiComponentProps } from '../../api';
2
- export interface LightboxProps extends ApiComponentProps {
3
- /**
4
- * Define o conteúdo html para ser exibido na lightbox
5
- */
6
- html: string
7
-
8
- /**
9
- * Define o className do container da lightbox
10
- */
11
- containerClassName?: string
2
+
3
+
4
+ export interface LightboxProps extends ApiComponentProps {
5
+ /**
6
+ * Define o conteúdo html para ser exibido na lightbox
7
+ */
8
+ html: string
9
+
10
+ /**
11
+ * Define o className do container da lightbox
12
+ */
13
+ containerClassName?: string
12
14
  }
@@ -1,6 +1,6 @@
1
- .lightbox-container {
2
- img {
3
- max-width: 100%;
4
- }
5
- }
6
-
1
+ .lightbox-container {
2
+ img {
3
+ max-width: 100%;
4
+ }
5
+ }
6
+
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/lightbox/core/handle.ts"],"sourcesContent":["/**\n * Prepara o HTML para uso na Lightbox.\n *\n * Converte cada `<img>` do conteúdo recebido em um link (`<a>`) com `data-lightbox`,\n * conforme as opções/atributos suportados pela Lightbox2:\n * https://lokeshdhakar.com/projects/lightbox2/#options\n *\n * @param html HTML de entrada (string) que será normalizado para a Lightbox.\n * @returns HTML resultante, com as imagens embrulhadas por `<a data-lightbox=\"gallery\">...</a>`.\n */\nexport function handleLightbox(html: string): string {\n const divTemp: HTMLDivElement = document.createElement(\"div\");\n divTemp.innerHTML = html;\n\n const imgElements: HTMLCollectionOf<HTMLImageElement> = divTemp.getElementsByTagName(\"img\");\n for (let i = 0; i < imgElements.length; i++) {\n const img: HTMLImageElement = imgElements[i];\n const imgSrc: string | null = img.getAttribute(\"src\");\n\n if (!imgSrc) continue;\n\n const anchor: HTMLAnchorElement = document.createElement(\"a\");\n anchor.setAttribute(\"data-lightbox\", \"gallery\");\n anchor.href = imgSrc;\n\n if (img.parentNode) {\n img.parentNode.replaceChild(anchor, img);\n }\n anchor.appendChild(img);\n }\n\n return divTemp.innerHTML;\n}"],"mappings":";AAUA,SAAgB,EAAe,GAAsB;CACjD,IAAM,IAA0B,SAAS,cAAc,MAAM;CAC7D,EAAQ,YAAY;CAEpB,IAAM,IAAkD,EAAQ,qBAAqB,MAAM;CAC3F,KAAK,IAAI,IAAI,GAAG,IAAI,EAAY,QAAQ,KAAK;EACzC,IAAM,IAAwB,EAAY,IACpC,IAAwB,EAAI,aAAa,MAAM;EAErD,IAAI,CAAC,GAAQ;EAEb,IAAM,IAA4B,SAAS,cAAc,IAAI;EAO7D,AANA,EAAO,aAAa,iBAAiB,UAAU,EAC/C,EAAO,OAAO,GAEV,EAAI,cACJ,EAAI,WAAW,aAAa,GAAQ,EAAI,EAE5C,EAAO,YAAY,EAAI;;CAG3B,OAAO,EAAQ"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/lightbox/core/handle.ts"],"sourcesContent":["/**\r\n * Prepara o HTML para uso na Lightbox.\r\n *\r\n * Converte cada `<img>` do conteúdo recebido em um link (`<a>`) com `data-lightbox`,\r\n * conforme as opções/atributos suportados pela Lightbox2:\r\n * https://lokeshdhakar.com/projects/lightbox2/#options\r\n *\r\n * @param html HTML de entrada (string) que será normalizado para a Lightbox.\r\n * @returns HTML resultante, com as imagens embrulhadas por `<a data-lightbox=\"gallery\">...</a>`.\r\n */\r\nexport function handleLightbox(html: string): string {\r\n const divTemp: HTMLDivElement = document.createElement(\"div\");\r\n divTemp.innerHTML = html;\r\n\r\n const imgElements: HTMLCollectionOf<HTMLImageElement> = divTemp.getElementsByTagName(\"img\");\r\n for (let i = 0; i < imgElements.length; i++) {\r\n const img: HTMLImageElement = imgElements[i];\r\n const imgSrc: string | null = img.getAttribute(\"src\");\r\n\r\n if (!imgSrc) continue;\r\n\r\n const anchor: HTMLAnchorElement = document.createElement(\"a\");\r\n anchor.setAttribute(\"data-lightbox\", \"gallery\");\r\n anchor.href = imgSrc;\r\n\r\n if (img.parentNode) {\r\n img.parentNode.replaceChild(anchor, img);\r\n }\r\n anchor.appendChild(img);\r\n }\r\n\r\n return divTemp.innerHTML;\r\n}"],"mappings":";AAUA,SAAgB,EAAe,GAAsB;CACjD,IAAM,IAA0B,SAAS,cAAc,KAAK;CAC5D,EAAQ,YAAY;CAEpB,IAAM,IAAkD,EAAQ,qBAAqB,KAAK;CAC1F,KAAK,IAAI,IAAI,GAAG,IAAI,EAAY,QAAQ,KAAK;EACzC,IAAM,IAAwB,EAAY,IACpC,IAAwB,EAAI,aAAa,KAAK;EAEpD,IAAI,CAAC,GAAQ;EAEb,IAAM,IAA4B,SAAS,cAAc,GAAG;EAO5D,AANA,EAAO,aAAa,iBAAiB,SAAS,GAC9C,EAAO,OAAO,GAEV,EAAI,cACJ,EAAI,WAAW,aAAa,GAAQ,CAAG,GAE3C,EAAO,YAAY,CAAG;CAC1B;CAEA,OAAO,EAAQ;AACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/lightbox/lightbox.tsx"],"sourcesContent":["import React from \"react\";\nimport { Box } from \"../box\";\nimport { LightboxProps } from \".\";\nimport { handleLightbox } from \"./core/handle\";\n\n/**\n * Componente - `Lightbox`\n *\n * Cria uma camada (overlay) semi-transparente para visualização de imagem ampliada.\n */\nexport const Lightbox = ({ html, ...props }: LightboxProps) => {\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return (\n <Box\n className={props.className}\n css={props.css}\n id={props.id}\n size={props.size}>\n <div\n className=\"w-100 p-2 d-flex flex-wrap justify-content-start lightbox-container\"\n dangerouslySetInnerHTML={{ __html: handleLightbox(html) }}/>\n </Box>\n );\n};\n\nLightbox.displayName = \"Lightbox\";"],"mappings":";;;;;;AAUA,IAAa,KAAY,EAAE,SAAM,GAAG,QAO5B,kBAAC,GAAD;CACI,WAAW,EAAM;CACjB,KAAK,EAAM;CACX,IAAI,EAAM;CACV,MAAM,EAAM;WACZ,kBAAC,OAAD;EACI,WAAU;EACV,yBAAyB,EAAE,QAAQ,EAAe,EAAK,EAAE;EAAG,CAAA;CAC9D,CAAA;AAId,EAAS,cAAc"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/lightbox/lightbox.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { Box } from \"../box\";\r\nimport { LightboxProps } from \".\";\r\nimport { handleLightbox } from \"./core/handle\";\r\n\r\n/**\r\n * Componente - `Lightbox`\r\n *\r\n * Cria uma camada (overlay) semi-transparente para visualização de imagem ampliada.\r\n */\r\nexport const Lightbox = ({ html, ...props }: LightboxProps) => {\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <Box\r\n className={props.className}\r\n css={props.css}\r\n id={props.id}\r\n size={props.size}>\r\n <div\r\n className=\"w-100 p-2 d-flex flex-wrap justify-content-start lightbox-container\"\r\n dangerouslySetInnerHTML={{ __html: handleLightbox(html) }}/>\r\n </Box>\r\n );\r\n};\r\n\r\nLightbox.displayName = \"Lightbox\";"],"mappings":";;;;;;AAUA,IAAa,KAAY,EAAE,SAAM,GAAG,QAO5B,kBAAC,GAAD;CACI,WAAW,EAAM;CACjB,KAAK,EAAM;CACX,IAAI,EAAM;CACV,MAAM,EAAM;WACZ,kBAAC,OAAD;EACI,WAAU;EACV,yBAAyB,EAAE,QAAQ,EAAe,CAAI,EAAE;CAAG,CAAA;AAC9D,CAAA;AAIb,EAAS,cAAc"}
@@ -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,44 +1,46 @@
1
1
  import { AlignItemsProps, ColorProps, ApiComponentProps, JustifyContentProps } from '../../api';
2
- export interface LoadingProps extends Omit<ApiComponentProps, "size" | "id"> {
3
- /**
4
- * Define se o loading vai se exibido
5
- */
6
- visible: boolean
7
-
8
- /**
9
- * A propriedade `align` determina o alinhamento do conteúdo base na propriedade `direction`.
10
- * Essa propriedade ajusta os estilos CSS `align-items`, permitindo um controle preciso do layout.
11
- */
12
- align?: AlignItemsProps | AlignItemsProps[]
13
-
14
- /**
15
- * A propriedade `justify` determina o alinhamento do conteúdo base na propriedade `direction`.
16
- * Essa propriedade ajusta os estilos CSS `justify-content`, permitindo um controle preciso do layout.
17
- */
18
- justify?: JustifyContentProps | JustifyContentProps[]
19
-
20
- /**
21
- * Define a opacidade do fundo da box de carregamento
22
- */
23
- opacity?: string
24
-
25
- /**
26
- * Define o tipo do loading
27
- */
28
- type?: "border" | "grow"
29
-
30
- /**
31
- * Define a mensagem do load
32
- */
33
- text?: string
34
-
35
- /**
36
- * Define as cores padrão do component
37
- */
38
- color?: ColorProps
39
-
40
- /**
41
- * Personaliza a propriedade zindex do componente de loading
42
- */
43
- zindex?: number
2
+
3
+
4
+ export interface LoadingProps extends Omit<ApiComponentProps, "size" | "id"> {
5
+ /**
6
+ * Define se o loading vai se exibido
7
+ */
8
+ visible: boolean
9
+
10
+ /**
11
+ * A propriedade `align` determina o alinhamento do conteúdo base na propriedade `direction`.
12
+ * Essa propriedade ajusta os estilos CSS `align-items`, permitindo um controle preciso do layout.
13
+ */
14
+ align?: AlignItemsProps | AlignItemsProps[]
15
+
16
+ /**
17
+ * A propriedade `justify` determina o alinhamento do conteúdo base na propriedade `direction`.
18
+ * Essa propriedade ajusta os estilos CSS `justify-content`, permitindo um controle preciso do layout.
19
+ */
20
+ justify?: JustifyContentProps | JustifyContentProps[]
21
+
22
+ /**
23
+ * Define a opacidade do fundo da box de carregamento
24
+ */
25
+ opacity?: string
26
+
27
+ /**
28
+ * Define o tipo do loading
29
+ */
30
+ type?: "border" | "grow"
31
+
32
+ /**
33
+ * Define a mensagem do load
34
+ */
35
+ text?: string
36
+
37
+ /**
38
+ * Define as cores padrão do component
39
+ */
40
+ color?: ColorProps
41
+
42
+ /**
43
+ * Personaliza a propriedade zindex do componente de loading
44
+ */
45
+ zindex?: number
44
46
  }
@@ -1,10 +1,10 @@
1
- .box-loading {
2
- position: absolute;
3
- flex-direction: column;
4
- display: flex;
5
- top: 0;
6
- left: 0;
7
- bottom: 0;
8
- right: 0;
9
- }
10
-
1
+ .box-loading {
2
+ position: absolute;
3
+ flex-direction: column;
4
+ display: flex;
5
+ top: 0;
6
+ left: 0;
7
+ bottom: 0;
8
+ right: 0;
9
+ }
10
+
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/loading/loading.tsx"],"sourcesContent":["import { LoadingProps } from \".\";\nimport React, { HTMLAttributes } from \"react\";\nimport { classNames } from \"primereact/utils\";\n\n/**\n * Componente - `Loading`\n *\n * Um componente versátil que pode ser utilizado para exibir informação de carregando.\n * Permite personalizar o estilo e o conteúdo através de propriedades.\n */\nexport const Loading = ({ opacity = \"0.5\", ...props }: LoadingProps) => {\n const css = {\n justify: props.justify === undefined ? \"justify-content-center\" : Array.isArray(props.justify) ? props.justify?.join(\" \") : props.justify,\n align: props.align === undefined ? \"align-items-center\" : Array.isArray(props.align) ? props.align?.join(\" \") : props.align,\n };\n const attr: HTMLAttributes<\"div\"> = {\n className: classNames([\n css.align,\n css.justify,\n props.className,\n \"box-loading\",\n `text-${props.color ?? \"white\"}`,\n ]),\n style: {\n zIndex: props.zindex ?? 1,\n background: \"rgba(0,0,0, \" + opacity + \")\", ...props.css ?? {}\n }\n };\n\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return props.visible && (\n <div {...attr as any}>\n <div className={`spinner-${props.type ?? \"border\"}`}>\n <span className=\"visually-hidden\">Loading...</span>\n </div>\n {props.text ?? <p className=\"mt-1\">{props.text}</p>}\n </div>\n );\n};\n\nLoading.displayName = \"Loading\";"],"mappings":";;;;AAUA,IAAa,KAAW,EAAE,aAAU,OAAO,GAAG,QAA0B;CACpE,IAAM,IAAM;EACR,SAAS,EAAM,YAAY,KAAA,IAAY,2BAA2B,MAAM,QAAQ,EAAM,QAAQ,GAAG,EAAM,SAAS,KAAK,IAAI,GAAG,EAAM;EAClI,OAAO,EAAM,UAAU,KAAA,IAAY,uBAAuB,MAAM,QAAQ,EAAM,MAAM,GAAG,EAAM,OAAO,KAAK,IAAI,GAAG,EAAM;EACzH,EACK,IAA8B;EAChC,WAAW,EAAW;GAClB,EAAI;GACJ,EAAI;GACJ,EAAM;GACN;GACA,QAAQ,EAAM,SAAS;GAC1B,CAAC;EACF,OAAO;GACH,QAAQ,EAAM,UAAU;GACxB,YAAY,iBAAiB,IAAU;GAAK,GAAG,EAAM,OAAO,EAAE;GACjE;EACJ;CAOD,OAAO,EAAM,WACT,kBAAC,OAAD;EAAK,GAAI;YAAT,CACI,kBAAC,OAAD;GAAK,WAAW,WAAW,EAAM,QAAQ;aACrC,kBAAC,QAAD;IAAM,WAAU;cAAkB;IAAiB,CAAA;GACjD,CAAA,EACL,EAAM,QAAQ,kBAAC,KAAD;GAAG,WAAU;aAAQ,EAAM;GAAS,CAAA,CACjD;;;AAId,EAAQ,cAAc"}
1
+ {"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/loading/loading.tsx"],"sourcesContent":["import { LoadingProps } from \".\";\r\nimport React, { HTMLAttributes } from \"react\";\r\nimport { classNames } from \"primereact/utils\";\r\n\r\n/**\r\n * Componente - `Loading`\r\n *\r\n * Um componente versátil que pode ser utilizado para exibir informação de carregando.\r\n * Permite personalizar o estilo e o conteúdo através de propriedades.\r\n */\r\nexport const Loading = ({ opacity = \"0.5\", ...props }: LoadingProps) => {\r\n const css = {\r\n justify: props.justify === undefined ? \"justify-content-center\" : Array.isArray(props.justify) ? props.justify?.join(\" \") : props.justify,\r\n align: props.align === undefined ? \"align-items-center\" : Array.isArray(props.align) ? props.align?.join(\" \") : props.align,\r\n };\r\n const attr: HTMLAttributes<\"div\"> = {\r\n className: classNames([\r\n css.align,\r\n css.justify,\r\n props.className,\r\n \"box-loading\",\r\n `text-${props.color ?? \"white\"}`,\r\n ]),\r\n style: {\r\n zIndex: props.zindex ?? 1,\r\n background: \"rgba(0,0,0, \" + opacity + \")\", ...props.css ?? {}\r\n }\r\n };\r\n\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return props.visible && (\r\n <div {...attr as any}>\r\n <div className={`spinner-${props.type ?? \"border\"}`}>\r\n <span className=\"visually-hidden\">Loading...</span>\r\n </div>\r\n {props.text ?? <p className=\"mt-1\">{props.text}</p>}\r\n </div>\r\n );\r\n};\r\n\r\nLoading.displayName = \"Loading\";"],"mappings":";;;;AAUA,IAAa,KAAW,EAAE,aAAU,OAAO,GAAG,QAA0B;CACpE,IAAM,IAAM;EACR,SAAS,EAAM,YAAY,KAAA,IAAY,2BAA2B,MAAM,QAAQ,EAAM,OAAO,IAAI,EAAM,SAAS,KAAK,GAAG,IAAI,EAAM;EAClI,OAAO,EAAM,UAAU,KAAA,IAAY,uBAAuB,MAAM,QAAQ,EAAM,KAAK,IAAI,EAAM,OAAO,KAAK,GAAG,IAAI,EAAM;CAC1H,GACM,IAA8B;EAChC,WAAW,EAAW;GAClB,EAAI;GACJ,EAAI;GACJ,EAAM;GACN;GACA,QAAQ,EAAM,SAAS;EAC3B,CAAC;EACD,OAAO;GACH,QAAQ,EAAM,UAAU;GACxB,YAAY,iBAAiB,IAAU;GAAK,GAAG,EAAM,OAAO,CAAC;EACjE;CACJ;CAOA,OAAO,EAAM,WACT,kBAAC,OAAD;EAAK,GAAI;YAAT,CACI,kBAAC,OAAD;GAAK,WAAW,WAAW,EAAM,QAAQ;aACrC,kBAAC,QAAD;IAAM,WAAU;cAAkB;GAAgB,CAAA;EACjD,CAAA,GACJ,EAAM,QAAQ,kBAAC,KAAD;GAAG,WAAU;aAAQ,EAAM;EAAQ,CAAA,CACjD;;AAEb;AAEA,EAAQ,cAAc"}
@@ -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
+ }