davis-components 0.3.21 → 0.3.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { r as Te } from "./immutable-BOEwiNnb.js";
2
- import "./convertFromRawToDraftState-B7ILFMnx.js";
1
+ import { r as Te } from "./immutable-COD4zLW3.js";
2
+ import "./Draft-CtKHwNYO.js";
3
3
  function Oe(e) {
4
4
  return Ie(e) || we(e) || Se();
5
5
  }
@@ -4548,10 +4548,10 @@ const Et = (e, n) => {
4548
4548
  Ke,
4549
4549
  { stateToHTML: Ze }
4550
4550
  ] = await Promise.all([
4551
- import("./react-draft-wysiwyg-BPGHEdBr.js").then((ee) => ee.r),
4552
- import("./Draft-FVETl066.js").then((ee) => ee.D),
4553
- import("./html-to-draftjs-BSCWDCid.js").then((ee) => ee.h),
4554
- import("./main-D7SmEQlb.js")
4551
+ import("./react-draft-wysiwyg-CWIG85ko.js").then((ee) => ee.r),
4552
+ import("./Draft-CtKHwNYO.js").then((ee) => ee.D),
4553
+ import("./html-to-draftjs-B60ZHdLb.js").then((ee) => ee.h),
4554
+ import("./main-DEiv82vm.js")
4555
4555
  ]);
4556
4556
  H.current = Ee;
4557
4557
  const Se = Ke.default;
@@ -5718,74 +5718,74 @@ const Cr = ({
5718
5718
  ),
5719
5719
  titleClassName: "!bg-transparent !text-black !px-[8px] !text-[14px] !font-700 !translate-y-[35%] lg:!translate-y-[30%] !mr-0",
5720
5720
  gradientBorder: !1,
5721
- children: /* @__PURE__ */ t.jsx("form", { className: "flex flex-col gap-4 lg:gap-8", onSubmit: n0, children: /* @__PURE__ */ t.jsxs(
5722
- "div",
5723
- {
5724
- className: S(
5725
- n?.length == "8" ? "grid md:grid-cols-4 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "6" || n?.length == "3" ? "grid md:grid-cols-3 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "4" ? "grid md:grid-cols-4 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "2" || n?.length == "7" ? "grid md:grid-cols-3 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "10" ? "grid md:grid-cols-4 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "5" ? "grid md:grid-cols-3 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : ""
5726
- ),
5727
- children: [
5728
- n?.map(
5729
- (F) => F.component == "TextField" ? /* @__PURE__ */ t.jsx(
5730
- j2,
5731
- {
5732
- name: F.questionKey,
5733
- label: F.label,
5734
- value: R[F.questionKey],
5735
- onChange: (ee) => ce(ee.target.value, F.questionKey),
5736
- containerClassName: F.containerClassName,
5737
- labelClassName: F.labelClassName,
5738
- className: F.className,
5739
- ...F.props
5740
- },
5741
- F.label
5742
- ) : F.component == "Select" ? /* @__PURE__ */ t.jsx(
5743
- Sl,
5744
- {
5745
- onChange: (ee) => ce(ee, F.questionKey),
5746
- label: F.label,
5747
- options: F.options,
5748
- questionKey: F.questionKey,
5749
- containerClassName: F.containerClassName,
5750
- ...F.props
5751
- }
5752
- ) : F.component == "DateInput" ? /* @__PURE__ */ t.jsx(
5753
- vl,
5754
- {
5755
- ...F.props,
5756
- id: F.id,
5757
- label: F.label,
5758
- watch: c,
5759
- control: j,
5760
- errors: V,
5761
- containerClassName: F.containerClassName,
5762
- validation: F.validation,
5763
- onChange: (ee) => {
5764
- ce(ee.toString(), F.id);
5721
+ children: /* @__PURE__ */ t.jsxs("form", { className: "flex flex-col gap-4 lg:gap-8", onSubmit: n0, children: [
5722
+ /* @__PURE__ */ t.jsxs(
5723
+ "div",
5724
+ {
5725
+ className: S(
5726
+ n?.length == "8" ? "grid md:grid-cols-4 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "6" || n?.length == "3" ? "grid md:grid-cols-3 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "4" ? "grid md:grid-cols-4 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "2" || n?.length == "7" ? "grid md:grid-cols-3 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "10" ? "grid md:grid-cols-4 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : n?.length == "5" ? "grid md:grid-cols-3 grid-cols-2 lg:gap-8 gap-4 justify-center items-center" : ""
5727
+ ),
5728
+ children: [
5729
+ n?.map(
5730
+ (F) => F.component == "TextField" ? /* @__PURE__ */ t.jsx(
5731
+ j2,
5732
+ {
5733
+ name: F.questionKey,
5734
+ label: F.label,
5735
+ value: R[F.questionKey],
5736
+ onChange: (ee) => ce(ee.target.value, F.questionKey),
5737
+ containerClassName: F.containerClassName,
5738
+ labelClassName: F.labelClassName,
5739
+ className: F.className,
5740
+ ...F.props
5741
+ },
5742
+ F.label
5743
+ ) : F.component == "Select" ? /* @__PURE__ */ t.jsx(
5744
+ Sl,
5745
+ {
5746
+ onChange: (ee) => ce(ee, F.questionKey),
5747
+ label: F.label,
5748
+ options: F.options,
5749
+ questionKey: F.questionKey,
5750
+ containerClassName: F.containerClassName,
5751
+ ...F.props
5765
5752
  }
5766
- }
5767
- ) : F.component == "HeaderRadioOption" ? /* @__PURE__ */ t.jsx(
5768
- Jt,
5769
- {
5770
- ...F.props,
5771
- options: F.options,
5772
- formData: R[F.questionKey],
5773
- questionKey: F.questionKey,
5774
- onChange: (ee) => {
5775
- ce(ee, F.questionKey);
5753
+ ) : F.component == "DateInput" ? /* @__PURE__ */ t.jsx(
5754
+ vl,
5755
+ {
5756
+ ...F.props,
5757
+ id: F.id,
5758
+ label: F.label,
5759
+ watch: c,
5760
+ control: j,
5761
+ errors: V,
5762
+ containerClassName: F.containerClassName,
5763
+ validation: F.validation,
5764
+ onChange: (ee) => {
5765
+ ce(ee.toString(), F.id);
5766
+ }
5776
5767
  }
5777
- }
5778
- ) : F.component == "HeaderSwitchButton" ? /* @__PURE__ */ t.jsx(
5779
- lr,
5780
- {
5781
- options: F.options,
5782
- onChange: (ee) => ce(ee, F.questionKey)
5783
- }
5784
- ) : null
5785
- ),
5786
- /* @__PURE__ */ t.jsxs("div", { className: S("flex justify-center items-center"), children: [
5768
+ ) : F.component == "HeaderRadioOption" ? /* @__PURE__ */ t.jsx(
5769
+ Jt,
5770
+ {
5771
+ ...F.props,
5772
+ options: F.options,
5773
+ formData: R[F.questionKey],
5774
+ questionKey: F.questionKey,
5775
+ onChange: (ee) => {
5776
+ ce(ee, F.questionKey);
5777
+ }
5778
+ }
5779
+ ) : F.component == "HeaderSwitchButton" ? /* @__PURE__ */ t.jsx(
5780
+ lr,
5781
+ {
5782
+ options: F.options,
5783
+ onChange: (ee) => ce(ee, F.questionKey)
5784
+ }
5785
+ ) : null
5786
+ ),
5787
5787
  n?.length == "2" && Se ? /* @__PURE__ */ t.jsxs("div", { children: [
5788
- /* @__PURE__ */ t.jsx(P0, { label: ".", className: "text-transparent" }),
5788
+ /* @__PURE__ */ t.jsx(P0, { label: "button", className: "text-transparent" }),
5789
5789
  /* @__PURE__ */ t.jsx(
5790
5790
  s0,
5791
5791
  {
@@ -5797,12 +5797,12 @@ const Cr = ({
5797
5797
  className: "xs:text-xs md:text-sm lg:text-xl"
5798
5798
  }
5799
5799
  ),
5800
- className: " xs:!rounded-l-none xs:!rounded-r-[2px] md:!rounded-r xs:h-[29.6px] md:h-h-[29.6px] lg:h-[29.6px] !bg-transparent !border-[0.5px] border-success",
5800
+ className: " xs:!rounded-l-none xs:!rounded-r-[2px] md:!rounded-r xs:h-[22px] md:h-[21.6px] lg:h-[25.6px] !bg-transparent !border-[0.5px] border-success ",
5801
5801
  onClick: () => K(N(n))
5802
5802
  }
5803
5803
  )
5804
5804
  ] }) : null,
5805
- n?.length == "2" ? /* @__PURE__ */ t.jsxs("div", { className: "w-full", children: [
5805
+ n?.length == "2" ? /* @__PURE__ */ t.jsxs("div", { children: [
5806
5806
  /* @__PURE__ */ t.jsx(P0, { label: "button", className: "text-transparent" }),
5807
5807
  /* @__PURE__ */ t.jsx(
5808
5808
  s0,
@@ -5818,46 +5818,46 @@ const Cr = ({
5818
5818
  }
5819
5819
  )
5820
5820
  ] }) : null
5821
- ] }),
5822
- n?.length > "2" ? /* @__PURE__ */ t.jsxs(
5823
- "div",
5824
- {
5825
- className: "border-success ml-auto md:ml-0 mt-2 md:mt-0 mr-auto md:mr-0 !rounded-[2px] mx-auto w-1/3 self-center flex",
5826
- children: [
5827
- Se ? /* @__PURE__ */ t.jsx(
5828
- s0,
5829
- {
5830
- variant: "icon",
5831
- icon: /* @__PURE__ */ t.jsx(
5832
- Nl,
5833
- {
5834
- color: "black",
5835
- className: "xs:text-xs md:text-sm lg:text-xl"
5836
- }
5837
- ),
5838
- className: " xs:!rounded-l-none xs:!rounded-r-[2px] md:!rounded-r xs:h-[22px] md:h-[21.6px] lg:h-[25.6px] !bg-transparent !border-[0.5px] border-success ",
5839
- onClick: () => K(N(n))
5840
- }
5841
- ) : null,
5842
- /* @__PURE__ */ t.jsx(
5843
- s0,
5821
+ ]
5822
+ }
5823
+ ),
5824
+ n?.length > "2" ? /* @__PURE__ */ t.jsxs(
5825
+ "div",
5826
+ {
5827
+ className: "border-success ml-auto md:ml-0 mt-2 md:mt-0 mr-auto md:mr-0 !rounded-[2px] mx-auto w-1/3 self-center flex",
5828
+ children: [
5829
+ Se ? /* @__PURE__ */ t.jsx(
5830
+ s0,
5831
+ {
5832
+ variant: "icon",
5833
+ icon: /* @__PURE__ */ t.jsx(
5834
+ Nl,
5844
5835
  {
5845
- variant: "outlined",
5846
- title: f.SubmitTitle ? f.SubmitTitle : "نمایش اطلاعات",
5847
- type: "submit",
5848
- loading: Re,
5849
- className: S(
5850
- Se ? "!bg-success xs:!rounded-r-none xs:!rounded-l-[2px] md:!rounded-l !text-white " : "!bg-transparent xs:!rounded-[2px] md:!rounded",
5851
- "xs:h-[22px] md:h-[21.6px] lg:h-[25.6px] !border-success !text-[9px] lg:!text-xs hover:!bg-success hover:text-white w-full"
5852
- )
5836
+ color: "black",
5837
+ className: "xs:text-xs md:text-sm lg:text-xl"
5853
5838
  }
5839
+ ),
5840
+ className: " xs:!rounded-l-none xs:!rounded-r-[2px] md:!rounded-r xs:h-[22px] md:h-[21.6px] lg:h-[25.6px] !bg-transparent !border-[0.5px] border-success ",
5841
+ onClick: () => K(N(n))
5842
+ }
5843
+ ) : null,
5844
+ /* @__PURE__ */ t.jsx(
5845
+ s0,
5846
+ {
5847
+ variant: "outlined",
5848
+ title: f.SubmitTitle ? f.SubmitTitle : "نمایش اطلاعات",
5849
+ type: "submit",
5850
+ loading: Re,
5851
+ className: S(
5852
+ Se ? "!bg-success xs:!rounded-r-none xs:!rounded-l-[2px] md:!rounded-l !text-white " : "!bg-transparent xs:!rounded-[2px] md:!rounded",
5853
+ "xs:h-[22px] md:h-[21.6px] lg:h-[25.6px] !border-success !text-[9px] lg:!text-xs hover:!bg-success hover:text-white w-full"
5854
5854
  )
5855
- ]
5856
- }
5857
- ) : null
5858
- ]
5859
- }
5860
- ) })
5855
+ }
5856
+ )
5857
+ ]
5858
+ }
5859
+ ) : null
5860
+ ] })
5861
5861
  }
5862
5862
  ),
5863
5863
  y?.length ? /* @__PURE__ */ t.jsx(
package/dist/main.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-DieidwWQ.cjs");exports.ArchiveTable=e.ArchiveTable;exports.Button=e.Button;exports.CFCHeader=e.CFCHeader;exports.CheckBox=e.CheckBox;exports.CheckBoxGroup=e.CheckBoxGroup;exports.DateInput=e.DateInput;exports.Divider=e.Divider;exports.Dropdown=e.Dropdown;exports.EmptyForm=e.EmptyForm;exports.FieldSet=e.FieldSet;exports.FileField=e.FileField;exports.FormFields=e.FormFields;exports.HTML=e.HTML;exports.Label=e.Label;exports.Modal=e.Modal;exports.Page=e.Page;exports.PageCard=e.PageCard;exports.Prescription=e.Prescription;exports.ProgressChart=e.ProgressChart;exports.ProjectName=e.ProjectName;exports.Radio=e.Radio;exports.RadioOptions=e.RadioOptions;exports.Select=e.Select;exports.SpecialistDashboardPage=e.SpecialistDashboardPage;exports.SpecialistFormPageHeader=e.Header;exports.SpecialistPrintPage=e.SpecialistPrintPage;exports.Tab=e.Tab;exports.Table=e.Table;exports.TextEditor=e.TextEditor;exports.TextField=e.TextField;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-CdN2XIgD.cjs");exports.ArchiveTable=e.ArchiveTable;exports.Button=e.Button;exports.CFCHeader=e.CFCHeader;exports.CheckBox=e.CheckBox;exports.CheckBoxGroup=e.CheckBoxGroup;exports.DateInput=e.DateInput;exports.Divider=e.Divider;exports.Dropdown=e.Dropdown;exports.EmptyForm=e.EmptyForm;exports.FieldSet=e.FieldSet;exports.FileField=e.FileField;exports.FormFields=e.FormFields;exports.HTML=e.HTML;exports.Label=e.Label;exports.Modal=e.Modal;exports.Page=e.Page;exports.PageCard=e.PageCard;exports.Prescription=e.Prescription;exports.ProgressChart=e.ProgressChart;exports.ProjectName=e.ProjectName;exports.Radio=e.Radio;exports.RadioOptions=e.RadioOptions;exports.Select=e.Select;exports.SpecialistDashboardPage=e.SpecialistDashboardPage;exports.SpecialistFormPageHeader=e.Header;exports.SpecialistPrintPage=e.SpecialistPrintPage;exports.Tab=e.Tab;exports.Table=e.Table;exports.TextEditor=e.TextEditor;exports.TextField=e.TextField;
package/dist/main.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, B as i, p as r, C as o, i as t, h as d, D as l, a as p, E as F, F as P, j as c, n as m, H as n, L as C, M as T, P as b, b as g, s as h, k as S, d as x, R as D, f as B, S as H, q as k, o as u, r as E, m as L, T as M, l as R, e as f } from "./main-CSMbfCzE.js";
1
+ import { A as e, B as i, p as r, C as o, i as t, h as d, D as l, a as p, E as F, F as P, j as c, n as m, H as n, L as C, M as T, P as b, b as g, s as h, k as S, d as x, R as D, f as B, S as H, q as k, o as u, r as E, m as L, T as M, l as R, e as f } from "./main-JDKHC7Rq.js";
2
2
  export {
3
3
  e as ArchiveTable,
4
4
  i as Button,
@@ -1,7 +1,7 @@
1
- import { g as ni } from "./main-CSMbfCzE.js";
1
+ import { g as ni } from "./main-JDKHC7Rq.js";
2
2
  import oi from "react";
3
- import { a as ri } from "./Draft-FVETl066.js";
4
- import { r as ii } from "./immutable-BOEwiNnb.js";
3
+ import { r as ri } from "./Draft-BwcRWZBK.js";
4
+ import { r as ii } from "./immutable-COD4zLW3.js";
5
5
  function ai(Ge, rt) {
6
6
  for (var Ze = 0; Ze < rt.length; Ze++) {
7
7
  const ze = rt[Ze];
@@ -21,7 +21,7 @@ function ai(Ge, rt) {
21
21
  var Mo = { exports: {} };
22
22
  (function(Ge, rt) {
23
23
  (function(Ze, ze) {
24
- Ge.exports = ze(oi, ri, ii());
24
+ Ge.exports = ze(oi, ri(), ii());
25
25
  })(window, function(Ze, ze, Qe) {
26
26
  return Je = {}, pe.m = Rt = [function(S, A, E) {
27
27
  S.exports = E(10)();
@@ -1,4 +1,4 @@
1
- "use strict";const ni=require("./main-DieidwWQ.cjs"),oi=require("react"),ri=require("./Draft-BmqHmIMD.cjs"),ii=require("./immutable-JjbkJoKt.cjs");function ai(Ge,rt){for(var Ze=0;Ze<rt.length;Ze++){const ze=rt[Ze];if(typeof ze!="string"&&!Array.isArray(ze)){for(const Qe in ze)if(Qe!=="default"&&!(Qe in Ge)){const pe=Object.getOwnPropertyDescriptor(ze,Qe);pe&&Object.defineProperty(Ge,Qe,pe.get?pe:{enumerable:!0,get:()=>ze[Qe]})}}}return Object.freeze(Object.defineProperty(Ge,Symbol.toStringTag,{value:"Module"}))}var Mo={exports:{}};(function(Ge,rt){(function(Ze,ze){Ge.exports=ze(oi,ri.Draft$1,ii.requireImmutable())})(window,function(Ze,ze,Qe){return Je={},pe.m=Rt=[function(S,A,E){S.exports=E(10)()},function(S,A){S.exports=Ze},function(S,A,E){var C;/*!
1
+ "use strict";const ni=require("./main-CdN2XIgD.cjs"),oi=require("react"),ri=require("./Draft-D6WThAIh.cjs"),ii=require("./immutable-CXRex_ro.cjs");function ai(Ge,rt){for(var Ze=0;Ze<rt.length;Ze++){const ze=rt[Ze];if(typeof ze!="string"&&!Array.isArray(ze)){for(const Qe in ze)if(Qe!=="default"&&!(Qe in Ge)){const pe=Object.getOwnPropertyDescriptor(ze,Qe);pe&&Object.defineProperty(Ge,Qe,pe.get?pe:{enumerable:!0,get:()=>ze[Qe]})}}}return Object.freeze(Object.defineProperty(Ge,Symbol.toStringTag,{value:"Module"}))}var Mo={exports:{}};(function(Ge,rt){(function(Ze,ze){Ge.exports=ze(oi,ri.requireDraft(),ii.requireImmutable())})(window,function(Ze,ze,Qe){return Je={},pe.m=Rt=[function(S,A,E){S.exports=E(10)()},function(S,A){S.exports=Ze},function(S,A,E){var C;/*!
2
2
  Copyright (c) 2017 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "dist/main.cjs.js",
4
4
  "module": "dist/main.es.js",
5
5
  "style": "dist/main.css",
6
- "version": "0.3.21",
6
+ "version": "0.3.23",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
@@ -1 +0,0 @@
1
- "use strict";const D=require("./main-DieidwWQ.cjs"),a=require("./convertFromRawToDraftState-Bc8qiC55.cjs");function m(o,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in o)){const i=Object.getOwnPropertyDescriptor(r,n);i&&Object.defineProperty(o,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var h={},y=a.UnicodeUtils_1,S=a.findRangesImmutable_1,B=function(t,e){return t===e},E=function(t){return!!t},_=[];function M(o,t,e){var r=[],n=t.map(function(i){return i.has(e)}).toList();return S(n,B,E,function(i,c){var l=o.getText();r.push({offset:y.strlen(l.slice(0,i)),length:y.strlen(l.slice(i,c)),style:e})}),r}function C(o){var t=o.getCharacterList().map(function(r){return r.getStyle()}).toList(),e=t.flatten().toSet().map(function(r){return M(o,t,r)});return Array.prototype.concat.apply(_,e.toJS())}var w=C;function b(o){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{},r=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.forEach(function(n){T(o,n,e[n])})}return o}function T(o,t,e){return t in o?Object.defineProperty(o,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[t]=e,o}var k=a.ContentBlock_1,K=a.ContentBlockNode_1,R=a.DraftStringKey_1,O=a.encodeEntityRanges_1,F=w,d=a.invariant_1,p=function(t,e){return{key:t.getKey(),text:t.getText(),type:t.getType(),depth:t.getDepth(),inlineStyleRanges:F(t),entityRanges:O(t,e),data:t.getData().toObject()}},I=function(t,e,r,n){if(t instanceof k){r.push(p(t,e));return}t instanceof K||(process.env.NODE_ENV!=="production"?d(!1,"block is not a BlockNode"):d(!1));var i=t.getParentKey(),c=n[t.getKey()]=b({},p(t,e),{children:[]});if(i){n[i].children.push(c);return}r.push(c)},U=function(t,e){var r=e.entityMap,n=[],i={},c={},l=0;return t.getBlockMap().forEach(function(f){f.findEntityRanges(function(g){return g.getEntity()!==null},function(g){var s=f.getEntityAt(g),u=R.stringify(s);c[u]||(c[u]=s,r[u]="".concat(l),l++)}),I(f,r,n,i)}),{blocks:n,entityMap:r}},P=function(t,e){var r=e.blocks,n=e.entityMap,i={};return Object.keys(n).forEach(function(c,l){var f=t.getEntity(R.unstringify(c));i[l]={type:f.getType(),mutability:f.getMutability(),data:f.getData()}}),{blocks:r,entityMap:i}},j=function(t){var e={entityMap:{},blocks:[]};return e=U(t,e),e=P(t,e),e},A=j,x=a.getRangeClientRects_1;function L(o){var t=x(o),e=0,r=0,n=0,i=0;if(t.length){if(t.length>1&&t[0].width===0){var c=t[1];e=c.top,r=c.right,n=c.bottom,i=c.left}else{var l=t[0];e=l.top,r=l.right,n=l.bottom,i=l.left}for(var f=1;f<t.length;f++){var g=t[f];g.height!==0&&g.width!==0&&(e=Math.min(e,g.top),r=Math.max(r,g.right),n=Math.max(n,g.bottom),i=Math.min(i,g.left))}}return{top:e,right:r,bottom:n,left:i,width:r-i,height:n-e}}var N=L,V=N;function q(o){var t=o.getSelection();if(!t.rangeCount)return null;var e=t.getRangeAt(0),r=V(e),n=r.top,i=r.right,c=r.bottom,l=r.left;return n===0&&i===0&&c===0&&l===0?null:r}var $=q,H=a.AtomicBlockUtils_1,Y=a.BlockMapBuilder_1,z=a.CharacterMetadata_1,J=a.CompositeDraftDecorator_1,G=a.ContentBlock_1,Q=a.ContentState_1,W=a.DefaultDraftBlockRenderMap_1,X=a.DefaultDraftInlineStyle,Z=a.DraftEditor_react,tt=a.DraftEditorBlock_react,et=a.DraftEntity_1,rt=a.DraftModifier_1,nt=a.DraftEntityInstance_1,at=a.EditorState_1,ot=a.KeyBindingUtil_1,it=h,ct=a.RichTextEditorUtil_1,lt=a.SelectionState_1,ft=A,gt=a.convertFromRawToDraftState_1,ut=a.generateRandomKey_1,vt=a.getDefaultKeyBinding_1,st=$,yt=a.convertFromHTMLToContentBlocks_1,dt={Editor:Z,EditorBlock:tt,EditorState:at,CompositeDecorator:J,Entity:et,EntityInstance:nt,BlockMapBuilder:Y,CharacterMetadata:z,ContentBlock:G,ContentState:Q,RawDraftContentState:it,SelectionState:lt,AtomicBlockUtils:H,KeyBindingUtil:ot,Modifier:rt,RichUtils:ct,DefaultDraftBlockRenderMap:W,DefaultDraftInlineStyle:X,convertFromHTML:yt,convertFromRaw:gt,convertToRaw:ft,genKey:ut,getDefaultKeyBinding:vt,getVisibleSelectionRect:st},v=dt;const pt=D.getDefaultExportFromCjs(v),Rt=m({__proto__:null,default:pt},[v]);exports.Draft=Rt;exports.Draft$1=v;
@@ -1,188 +0,0 @@
1
- import { g as D } from "./main-CSMbfCzE.js";
2
- import { f as m, U as h, D as S, i as B, C as d, e as E, a as _, g as M, b as C, c as w, d as b, h as k, j as T, k as K, R as O, l as U, K as I, A as F, S as j, m as A, n as P, B as x, o as L, p as N, q as V, E as q, r as H, s as $ } from "./convertFromRawToDraftState-B7ILFMnx.js";
3
- function Y(n, t) {
4
- for (var e = 0; e < t.length; e++) {
5
- const a = t[e];
6
- if (typeof a != "string" && !Array.isArray(a)) {
7
- for (const r in a)
8
- if (r !== "default" && !(r in n)) {
9
- const o = Object.getOwnPropertyDescriptor(a, r);
10
- o && Object.defineProperty(n, r, o.get ? o : {
11
- enumerable: !0,
12
- get: () => a[r]
13
- });
14
- }
15
- }
16
- }
17
- return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
18
- }
19
- var z = {}, v = h, J = m, G = function(t, e) {
20
- return t === e;
21
- }, Q = function(t) {
22
- return !!t;
23
- }, W = [];
24
- function X(n, t, e) {
25
- var a = [], r = t.map(function(o) {
26
- return o.has(e);
27
- }).toList();
28
- return J(
29
- r,
30
- G,
31
- // We only want to keep ranges with nonzero style values.
32
- Q,
33
- function(o, i) {
34
- var l = n.getText();
35
- a.push({
36
- offset: v.strlen(l.slice(0, o)),
37
- length: v.strlen(l.slice(o, i)),
38
- style: e
39
- });
40
- }
41
- ), a;
42
- }
43
- function Z(n) {
44
- var t = n.getCharacterList().map(function(a) {
45
- return a.getStyle();
46
- }).toList(), e = t.flatten().toSet().map(function(a) {
47
- return X(n, t, a);
48
- });
49
- return Array.prototype.concat.apply(W, e.toJS());
50
- }
51
- var tt = Z;
52
- function et(n) {
53
- for (var t = 1; t < arguments.length; t++) {
54
- var e = arguments[t] != null ? arguments[t] : {}, a = Object.keys(e);
55
- typeof Object.getOwnPropertySymbols == "function" && (a = a.concat(Object.getOwnPropertySymbols(e).filter(function(r) {
56
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
57
- }))), a.forEach(function(r) {
58
- at(n, r, e[r]);
59
- });
60
- }
61
- return n;
62
- }
63
- function at(n, t, e) {
64
- return t in n ? Object.defineProperty(n, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : n[t] = e, n;
65
- }
66
- var rt = d, nt = _, p = S, ot = E, it = tt, u = B, y = function(t, e) {
67
- return {
68
- key: t.getKey(),
69
- text: t.getText(),
70
- type: t.getType(),
71
- depth: t.getDepth(),
72
- inlineStyleRanges: it(t),
73
- entityRanges: ot(t, e),
74
- data: t.getData().toObject()
75
- };
76
- }, lt = function(t, e, a, r) {
77
- if (t instanceof rt) {
78
- a.push(y(t, e));
79
- return;
80
- }
81
- t instanceof nt || (process.env.NODE_ENV !== "production" ? u(!1, "block is not a BlockNode") : u(!1));
82
- var o = t.getParentKey(), i = r[t.getKey()] = et({}, y(t, e), {
83
- children: []
84
- });
85
- if (o) {
86
- r[o].children.push(i);
87
- return;
88
- }
89
- a.push(i);
90
- }, ct = function(t, e) {
91
- var a = e.entityMap, r = [], o = {}, i = {}, l = 0;
92
- return t.getBlockMap().forEach(function(c) {
93
- c.findEntityRanges(function(f) {
94
- return f.getEntity() !== null;
95
- }, function(f) {
96
- var g = c.getEntityAt(f), s = p.stringify(g);
97
- i[s] || (i[s] = g, a[s] = "".concat(l), l++);
98
- }), lt(c, a, r, o);
99
- }), {
100
- blocks: r,
101
- entityMap: a
102
- };
103
- }, ft = function(t, e) {
104
- var a = e.blocks, r = e.entityMap, o = {};
105
- return Object.keys(r).forEach(function(i, l) {
106
- var c = t.getEntity(p.unstringify(i));
107
- o[l] = {
108
- type: c.getType(),
109
- mutability: c.getMutability(),
110
- data: c.getData()
111
- };
112
- }), {
113
- blocks: a,
114
- entityMap: o
115
- };
116
- }, st = function(t) {
117
- var e = {
118
- entityMap: {},
119
- blocks: []
120
- };
121
- return e = ct(t, e), e = ft(t, e), e;
122
- }, gt = st, vt = M;
123
- function ut(n) {
124
- var t = vt(n), e = 0, a = 0, r = 0, o = 0;
125
- if (t.length) {
126
- if (t.length > 1 && t[0].width === 0) {
127
- var i = t[1];
128
- e = i.top, a = i.right, r = i.bottom, o = i.left;
129
- } else {
130
- var l = t[0];
131
- e = l.top, a = l.right, r = l.bottom, o = l.left;
132
- }
133
- for (var c = 1; c < t.length; c++) {
134
- var f = t[c];
135
- f.height !== 0 && f.width !== 0 && (e = Math.min(e, f.top), a = Math.max(a, f.right), r = Math.max(r, f.bottom), o = Math.min(o, f.left));
136
- }
137
- }
138
- return {
139
- top: e,
140
- right: a,
141
- bottom: r,
142
- left: o,
143
- width: a - o,
144
- height: r - e
145
- };
146
- }
147
- var yt = ut, dt = yt;
148
- function pt(n) {
149
- var t = n.getSelection();
150
- if (!t.rangeCount)
151
- return null;
152
- var e = t.getRangeAt(0), a = dt(e), r = a.top, o = a.right, i = a.bottom, l = a.left;
153
- return r === 0 && o === 0 && i === 0 && l === 0 ? null : a;
154
- }
155
- var Rt = pt, Dt = F, mt = x, ht = P, St = V, Bt = d, Et = A, _t = K, Mt = T, Ct = $, wt = H, bt = N, kt = U, Tt = L, Kt = q, Ot = I, Ut = z, It = O, Ft = j, jt = gt, At = b, Pt = w, xt = C, Lt = Rt, Nt = k, Vt = {
156
- Editor: Ct,
157
- EditorBlock: wt,
158
- EditorState: Kt,
159
- CompositeDecorator: St,
160
- Entity: bt,
161
- EntityInstance: Tt,
162
- BlockMapBuilder: mt,
163
- CharacterMetadata: ht,
164
- ContentBlock: Bt,
165
- ContentState: Et,
166
- RawDraftContentState: Ut,
167
- SelectionState: Ft,
168
- AtomicBlockUtils: Dt,
169
- KeyBindingUtil: Ot,
170
- Modifier: kt,
171
- RichUtils: It,
172
- DefaultDraftBlockRenderMap: _t,
173
- DefaultDraftInlineStyle: Mt,
174
- convertFromHTML: Nt,
175
- convertFromRaw: At,
176
- convertToRaw: jt,
177
- genKey: Pt,
178
- getDefaultKeyBinding: xt,
179
- getVisibleSelectionRect: Lt
180
- }, R = Vt;
181
- const qt = /* @__PURE__ */ D(R), Yt = /* @__PURE__ */ Y({
182
- __proto__: null,
183
- default: qt
184
- }, [R]);
185
- export {
186
- Yt as D,
187
- R as a
188
- };