davis-components 0.3.47 → 0.3.48

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.
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Te=require("./immutable-D5VwHMVZ.cjs");require("./Draft-DNl18xs1.cjs");function Oe(e){return Ie(e)||we(e)||Se()}function Se(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function we(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function Ie(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function X(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function Z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X(r,!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function be(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function De(e,t){return ke(e)||Re(e,t)||Ae()}function Ae(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Re(e,t){var r=[],n=!0,l=!1,a=void 0;try{for(var i=e[Symbol.iterator](),o;!(n=(o=i.next()).done)&&(r.push(o.value),!(t&&r.length===t));n=!0);}catch(u){l=!0,a=u}finally{try{!n&&i.return!=null&&i.return()}finally{if(l)throw a}}return r}function ke(e){if(Array.isArray(e))return e}function me(e,t){if(e==null)return t;for(var r=De(t,2),n=r[0],l=r[1],a=Z({},n),i=Oe(l),o=0,u=Object.keys(e);o<u.length;o++){var s=u[o];if(n.hasOwnProperty(s)){var h=n[s];a[s]=Z({},h,{},e[s])}else a[s]=e[s],i.push(s)}return[a,i]}var J={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};function M(e){if(e==null)return e;for(var t={},r=!1,n=0,l=Object.keys(e);n<l.length;n++){var a=l[n],i=a;J.hasOwnProperty(a)&&(i=J[a],r=!0),t[i]=e[a]}return r?t:e}var Le=/^(moz|ms|o|webkit)-/,Pe=/^\d+$/,Ce=/([A-Z])/g,_e={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function Be(e){return e.replace(Ce,"-$1").toLowerCase().replace(Le,"-$1-")}function Ne(e,t){var r;return typeof t=="string"?r=Pe.test(t):(r=!0,t=String(t)),!r||t==="0"||_e[e]===!0?t:t+"px"}function R(e){return Object.keys(e).map(function(t){var r=Ne(t,e[t]),n=Be(t);return"".concat(n,": ").concat(r)}).join("; ")}var f={UNSTYLED:"unstyled",HEADER_ONE:"header-one",HEADER_TWO:"header-two",HEADER_THREE:"header-three",HEADER_FOUR:"header-four",HEADER_FIVE:"header-five",HEADER_SIX:"header-six",UNORDERED_LIST_ITEM:"unordered-list-item",ORDERED_LIST_ITEM:"ordered-list-item",BLOCKQUOTE:"blockquote",PULLQUOTE:"pullquote",CODE:"code-block",ATOMIC:"atomic"},S={LINK:"LINK",IMAGE:"IMAGE"},I={BOLD:"BOLD",CODE:"CODE",ITALIC:"ITALIC",STRIKETHROUGH:"STRIKETHROUGH",UNDERLINE:"UNDERLINE"},ae=Te.requireImmutable(),U=new ae.OrderedSet;function je(e,t){for(var r=null,n=null,l=[],a=0,i=0,o=e.length;i<o;i++){n=r;var u=t.get(i);r=u?u.getEntity():null,i>0&&r!==n&&(l.push([n,ee(e.slice(a,i),t.slice(a,i))]),a=i)}return l.push([r,ee(e.slice(a),t.slice(a))]),l}function ee(e,t){for(var r=U,n=U,l=[],a=0,i=0,o=e.length;i<o;i++){n=r;var u=t.get(i);r=u?u.getStyle():U,i>0&&!ae.is(r,n)&&(l.push([e.slice(a,i),n]),a=i)}return l.push([e.slice(a),r]),l}var E,k,m;function re(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function L(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?re(r,!0).forEach(function(n){c(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x(e,t){return Ue(e)||Me(e,t)||He()}function He(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Me(e,t){var r=[],n=!0,l=!1,a=void 0;try{for(var i=e[Symbol.iterator](),o;!(n=(o=i.next()).done)&&(r.push(o.value),!(t&&r.length===t));n=!0);}catch(u){l=!0,a=u}finally{try{!n&&i.return!=null&&i.return()}finally{if(l)throw a}}return r}function Ue(e){if(Array.isArray(e))return e}function xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fe(e,t,r){return t&&We(e.prototype,t),e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ie=I.BOLD,W=I.CODE,le=I.ITALIC,oe=I.STRIKETHROUGH,ue=I.UNDERLINE,Ge=" ",se="<br>",te=/^data-([a-z0-9-]+)$/,Ye=(E={},c(E,ie,{element:"strong"}),c(E,W,{element:"code"}),c(E,le,{element:"em"}),c(E,oe,{element:"del"}),c(E,ue,{element:"u"}),E),qe=[ie,le,ue,oe,W],P=(k={},c(k,S.LINK,{url:"href",href:"href",rel:"rel",target:"target",title:"title",className:"class"}),c(k,S.IMAGE,{src:"src",height:"height",width:"width",alt:"alt",className:"class"}),k),C=(m={},c(m,S.LINK,function(e,t){for(var r=P.hasOwnProperty(e)?P[e]:{},n=t.getData(),l={},a=0,i=Object.keys(n);a<i.length;a++){var o=i[a],u=n[o];if(r.hasOwnProperty(o)){var s=r[o];l[s]=u}else te.test(o)&&(l[o]=u)}return l}),c(m,S.IMAGE,function(e,t){for(var r=P.hasOwnProperty(e)?P[e]:{},n=t.getData(),l={},a=0,i=Object.keys(n);a<i.length;a++){var o=i[a],u=n[o];if(r.hasOwnProperty(o)){var s=r[o];l[s]=u}else te.test(o)&&(l[o]=u)}return l}),m);function ne(e,t){switch(e){case f.HEADER_ONE:return["h1"];case f.HEADER_TWO:return["h2"];case f.HEADER_THREE:return["h3"];case f.HEADER_FOUR:return["h4"];case f.HEADER_FIVE:return["h5"];case f.HEADER_SIX:return["h6"];case f.UNORDERED_LIST_ITEM:case f.ORDERED_LIST_ITEM:return["li"];case f.BLOCKQUOTE:return["blockquote"];case f.CODE:return["pre","code"];case f.ATOMIC:return["figure"];default:return t===null?[]:[t||"p"]}}function ze(e){switch(e){case f.UNORDERED_LIST_ITEM:return"ul";case f.ORDERED_LIST_ITEM:return"ol";default:return null}}var Ke=function(){function e(t,r){xe(this,e),c(this,"blocks",void 0),c(this,"contentState",void 0),c(this,"currentBlock",void 0),c(this,"indentLevel",void 0),c(this,"output",void 0),c(this,"totalBlocks",void 0),c(this,"wrapperTag",void 0),c(this,"options",void 0),c(this,"inlineStyles",void 0),c(this,"inlineStyleFn",void 0),c(this,"styleOrder",void 0),r==null&&(r={}),this.contentState=t,this.options=r;var n=me(r.inlineStyles,[Ye,qe]),l=x(n,2),a=l[0],i=l[1];this.inlineStyles=a,this.inlineStyleFn=r.inlineStyleFn,this.styleOrder=i}return Fe(e,[{key:"generate",value:function(){for(this.output=[],this.blocks=this.contentState.getBlocksAsArray(),this.totalBlocks=this.blocks.length,this.currentBlock=0,this.indentLevel=0,this.wrapperTag=null;this.currentBlock<this.totalBlocks;)this.processBlock();return this.closeWrapperTag(),this.output.join("").trim()}},{key:"processBlock",value:function(){var r=this.options,n=r.blockRenderers,l=r.defaultBlockTag,a=this.blocks[this.currentBlock],i=a.getType(),o=ze(i);this.wrapperTag!==o&&(this.wrapperTag&&this.closeWrapperTag(),o&&this.openWrapperTag(o)),this.indent();var u=n!=null&&n.hasOwnProperty(i)?n[i]:null,s=u?u(a):null;if(s!=null){this.output.push(s),this.output.push(`
2
+ `),this.currentBlock+=1;return}this.writeStartTag(a,l),this.output.push(this.renderBlockContent(a));var h=this.getNextBlock();if($e(i)&&h&&h.getDepth()===a.getDepth()+1){this.output.push(`
3
+ `);var y=this.wrapperTag;this.wrapperTag=null,this.indentLevel+=1,this.currentBlock+=1,this.processBlocksAtDepth(h.getDepth()),this.wrapperTag=y,this.indentLevel-=1,this.indent()}else this.currentBlock+=1;this.writeEndTag(a,l)}},{key:"processBlocksAtDepth",value:function(r){for(var n=this.blocks[this.currentBlock];n&&n.getDepth()===r;)this.processBlock(),n=this.blocks[this.currentBlock];this.closeWrapperTag()}},{key:"getNextBlock",value:function(){return this.blocks[this.currentBlock+1]}},{key:"writeStartTag",value:function(r,n){var l=ne(r.getType(),n),a;if(this.options.blockStyleFn){var i=this.options.blockStyleFn(r)||{},o=i.attributes,u=i.style;if(o=M(o),u!=null){var s=R(u);o=o==null?{style:s}:L({},o,{style:s})}a=O(o)}else a="";var h=!0,y=!1,g=void 0;try{for(var v=l[Symbol.iterator](),p;!(h=(p=v.next()).done);h=!0){var b=p.value;this.output.push("<".concat(b).concat(a,">"))}}catch(w){y=!0,g=w}finally{try{!h&&v.return!=null&&v.return()}finally{if(y)throw g}}}},{key:"writeEndTag",value:function(r,n){var l=ne(r.getType(),n);if(l.length===1)this.output.push("</".concat(l[0],`>
4
+ `));else{var a=[],i=!0,o=!1,u=void 0;try{for(var s=l[Symbol.iterator](),h;!(i=(h=s.next()).done);i=!0){var y=h.value;a.unshift("</".concat(y,">"))}}catch(g){o=!0,u=g}finally{try{!i&&s.return!=null&&s.return()}finally{if(o)throw u}}this.output.push(a.join("")+`
5
+ `)}}},{key:"openWrapperTag",value:function(r){this.wrapperTag=r,this.indent(),this.output.push("<".concat(r,`>
6
+ `)),this.indentLevel+=1}},{key:"closeWrapperTag",value:function(){var r=this.wrapperTag;r&&(this.indentLevel-=1,this.indent(),this.output.push("</".concat(r,`>
7
+ `)),this.wrapperTag=null)}},{key:"indent",value:function(){this.output.push(Ge.repeat(this.indentLevel))}},{key:"withCustomInlineStyles",value:function(r,n){if(!this.inlineStyleFn)return r;var l=this.inlineStyleFn(n);if(!l)return r;var a=l.element,i=a===void 0?"span":a,o=l.attributes,u=l.style,s=O(L({},o,{style:u&&R(u)}));return"<".concat(i).concat(s,">").concat(r,"</").concat(i,">")}},{key:"renderBlockContent",value:function(r){var n=this,l=r.getType(),a=r.getText();if(a==="")return se;a=this.preserveWhitespace(a);var i=r.getCharacterList(),o=je(a,i);return o.map(function(u){var s=x(u,2),h=s[0],y=s[1],g=y.map(function(ye){var Y=x(ye,2),ge=Y[0],q=Y[1],_=Qe(ge),B=!0,z=!1,K=void 0;try{for(var N=n.styleOrder[Symbol.iterator](),$;!(B=($=N.next()).done);B=!0){var j=$.value;if(!(j===W&&l===f.CODE)&&q.has(j)){var H=n.inlineStyles[j],A=H.element,T=H.attributes,Q=H.style;if(A==null&&(A="span"),T=M(T),Q!=null){var V=R(Q);T=T==null?{style:V}:L({},T,{style:V})}var Ee=O(T);_="<".concat(A).concat(Ee,">").concat(_,"</").concat(A,">")}}}catch(de){z=!0,K=de}finally{try{!B&&N.return!=null&&N.return()}finally{if(z)throw K}}return n.withCustomInlineStyles(_,q)}).join(""),v=h?n.contentState.getEntity(h):null,p=v==null?null:v.getType().toUpperCase(),b;if(v!=null&&n.options.entityStyleFn&&(b=n.options.entityStyleFn(v))){var w=b,D=w.element,d=w.attributes,F=w.style;if(D==null&&(D="span"),d=M(d),F!=null){var G=R(F);d=d==null?{style:G}:L({},d,{style:G})}var ce=O(d);return"<".concat(D).concat(ce,">").concat(g,"</").concat(D,">")}else if(p!=null&&p===S.LINK){var fe=C.hasOwnProperty(p)?C[p](p,v):null,he=O(fe);return"<a".concat(he,">").concat(g,"</a>")}else if(p!=null&&p===S.IMAGE){var pe=C.hasOwnProperty(p)?C[p](p,v):null,ve=O(pe);return"<img".concat(ve,"/>")}else return g}).join("")}},{key:"preserveWhitespace",value:function(r){for(var n=r.length,l=new Array(n),a=0;a<n;a++)r[a]===" "&&(a===0||a===n-1||r[a-1]===" ")?l[a]=" ":l[a]=r[a];return l.join("")}}]),e}();function O(e){if(e==null)return"";for(var t=[],r=0,n=Object.keys(e);r<n.length;r++){var l=n[r],a=e[l];a!=null&&t.push(" ".concat(l,'="').concat(Ve(a+""),'"'))}return t.join("")}function $e(e){switch(e){case f.UNORDERED_LIST_ITEM:case f.ORDERED_LIST_ITEM:return!0;default:return!1}}function Qe(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split(" ").join("&nbsp;").split(`
8
+ `).join(se+`
9
+ `)}function Ve(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")}function Xe(e,t){return new Ke(e,t).generate()}exports.stateToHTML=Xe;
package/dist/main.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-Q8BvMLBB.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-DNuRf2lC.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-DgrDd7yr.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-B6zUCT7j.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-DgrDd7yr.js";
1
+ import { g as ni } from "./main-B6zUCT7j.js";
2
2
  import oi from "react";
3
- import { a as ri } from "./Draft-DS_t3bI2.js";
4
- import { r as ii } from "./immutable-BK0zUnIS.js";
3
+ import { r as ri } from "./Draft-DoDD1aAL.js";
4
+ import { r as ii } from "./immutable-BgORiwZP.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-Q8BvMLBB.cjs"),oi=require("react"),ri=require("./Draft-D54UBgJ2.cjs"),ii=require("./immutable-BQAZWDcd.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-DNuRf2lC.cjs"),oi=require("react"),ri=require("./Draft-DtTns1gR.cjs"),ii=require("./immutable-D5VwHMVZ.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.47",
6
+ "version": "0.3.48",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
@@ -1 +0,0 @@
1
- "use strict";const D=require("./main-Q8BvMLBB.cjs"),a=require("./convertFromRawToDraftState-BIFdvEGS.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-DgrDd7yr.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-X0cT6Di8.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
- };