datastake-daf 0.6.248 → 0.6.249

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.
@@ -3215,7 +3215,7 @@ const config$3 = {
3215
3215
  Lightning: config$4
3216
3216
  };
3217
3217
 
3218
- const _excluded$v = ["width", "height", "size", "name", "fill"];
3218
+ const _excluded$w = ["width", "height", "size", "name", "fill"];
3219
3219
  const CustomIcon = _ref => {
3220
3220
  let {
3221
3221
  width = 14,
@@ -3224,7 +3224,7 @@ const CustomIcon = _ref => {
3224
3224
  name = "",
3225
3225
  fill = "none"
3226
3226
  } = _ref,
3227
- props = _objectWithoutProperties(_ref, _excluded$v);
3227
+ props = _objectWithoutProperties(_ref, _excluded$w);
3228
3228
  const conf = config$3[name];
3229
3229
  if (conf) {
3230
3230
  return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -9426,7 +9426,7 @@ createCommonjsModule(function (module, exports) {
9426
9426
  !function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
9427
9427
  });
9428
9428
 
9429
- const _excluded$u = ["view", "module", "scope", "form", "meta"];
9429
+ const _excluded$v = ["view", "module", "scope", "form", "meta"];
9430
9430
  dayjs__default["default"].extend(customParseFormat);
9431
9431
  dayjs__default["default"].extend(utc);
9432
9432
  dayjs__default["default"].extend(utc);
@@ -9800,7 +9800,7 @@ const filterCreateData = data => {
9800
9800
  form,
9801
9801
  meta
9802
9802
  } = data,
9803
- rest = _objectWithoutProperties(data, _excluded$u);
9803
+ rest = _objectWithoutProperties(data, _excluded$v);
9804
9804
  const _meta = isObjectEmpty(meta) ? undefined : meta;
9805
9805
  return _objectSpread2(_objectSpread2({}, rest), {}, {
9806
9806
  meta: _meta
@@ -10180,7 +10180,7 @@ SelectFilters.propTypes = {
10180
10180
  apiUrl: PropTypes__default["default"].string
10181
10181
  };
10182
10182
 
10183
- const _excluded$t = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
10183
+ const _excluded$u = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
10184
10184
  function DAFTable(_ref) {
10185
10185
  let {
10186
10186
  columns = [],
@@ -10211,7 +10211,7 @@ function DAFTable(_ref) {
10211
10211
  app,
10212
10212
  doEmptyRows
10213
10213
  } = _ref,
10214
- rest = _objectWithoutProperties(_ref, _excluded$t);
10214
+ rest = _objectWithoutProperties(_ref, _excluded$u);
10215
10215
  const [source, setSource] = React.useState([]);
10216
10216
  const projectData = (projects || []).find(p => p.id === selectedProject);
10217
10217
  const [filtersInit, setFiltersInit] = React.useState(!loading);
@@ -11054,8 +11054,8 @@ var unitlessKeys = {
11054
11054
 
11055
11055
  var f="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",m="active",y="data-styled-version",v="6.1.12",g="/*!sc*/\n",S="undefined"!=typeof window&&"HTMLElement"in window,w=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),E=/invalid hook call/i,N=new Set,P=function(t,n){if("production"!==process.env.NODE_ENV){var o=n?' with the id of "'.concat(n,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];E.test(t)?(a=!1,N.delete(s)):i.apply(void 0,__spreadArray([t],n,!1));},React.useRef(),a&&!N.has(s)&&(console.warn(s),N.add(s));}catch(e){E.test(e.message)&&N.delete(s);}finally{console.error=i;}}},_=Object.freeze([]),C=Object.freeze({});function I(e,t,n){return void 0===n&&(n=C),e.theme!==n.theme&&e.theme||t||n.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),O=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,"-").replace(D,"")}var T=/(a)(d)/gi,k=52,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n="";for(t=Math.abs(e);t>k;t=t/k|0)n=j(t%k)+n;return (j(t%k)+n).replace(T,"$1-$2")}var V,F=5381,M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},z=function(e){return M(F,e)};function $(e){return x(z(e)>>>0)}function B(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function L$1(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var G="function"==typeof Symbol&&Symbol.for,Y=G?Symbol.for("react.memo"):60115,W=G?Symbol.for("react.forward_ref"):60112,q={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},U={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J=((V={})[W]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V[Y]=U,V);function X(e){return ("type"in(t=e)&&t.type.$$typeof)===Y?U:"$$typeof"in e?J[e.$$typeof]:q;var t;}var Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function oe(e,t,n){if("string"!=typeof t){if(ne){var o=te(t);o&&o!==ne&&oe(e,o,n);}var r=K(t);Q&&(r=r.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a<r.length;++a){var c=r[a];if(!(c in H||n&&n[c]||i&&c in i||s&&c in s)){var l=ee(t,c);try{Z(e,c,l);}catch(e){}}}}return e}function re(e){return "function"==typeof e}function se(e){return "object"==typeof e&&"styledComponentId"in e}function ie(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ae(e,t){if(0===e.length)return "";for(var n=e[0],o=1;o<e.length;o++)n+=t?t+e[o]:e[o];return n}function ce(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function le(e,t,n){if(void 0===n&&(n=!1),!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)e[o]=le(e[o],t[o]);else if(ce(t))for(var o in t)e[o]=le(e[o],t[o]);return e}function ue(e,t){Object.defineProperty(e,"toString",{value:t});}var pe="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],o=[],r=1,s=e.length;r<s;r+=1)o.push(e[r]);return o.forEach(function(e){n=n.replace(/%[a-z]/,e);}),n}function he(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return "production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(de.apply(void 0,__spreadArray([pe[t]],n,!1)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,r=o;e>=r;)if((r<<=1)<0)throw he(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var s=o;s<r;s++)this.groupSizes[s]=0;}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++);},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(var r=n;r<o;r++)this.tag.deleteRule(n);}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],o=this.indexOfGroup(e),r=o+n,s=o;s<r;s++)t+="".concat(this.tag.getRule(s)).concat(g);return t},e}(),me=1<<30,ye=new Map,ve=new Map,ge=1,Se=function(e){if(ye.has(e))return ye.get(e);for(;ve.has(ge);)ge++;var t=ge++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>me))throw he(16,"".concat(t));return ye.set(e,t),ve.set(t,e),t},we=function(e,t){ge=t+1,ye.set(e,t),ve.set(t,e);},be="style[".concat(f,"][").concat(y,'="').concat(v,'"]'),Ee=new RegExp("^".concat(f,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ne=function(e,t,n){for(var o,r=n.split(","),s=0,i=r.length;s<i;s++)(o=r[s])&&e.registerName(t,o);},Pe=function(e,t){for(var n,o=(null!==(n=t.textContent)&&void 0!==n?n:"").split(g),r=[],s=0,i=o.length;s<i;s++){var a=o[s].trim();if(a){var c=a.match(Ee);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(we(u,l),Ne(e,u,c[3]),e.getTag().insertRules(l,r)),r.length=0;}else r.push(a);}}},_e=function(e){for(var t=document.querySelectorAll(be),n=0,o=t.length;n<o;n++){var r=t[n];r&&r.getAttribute(f)!==m&&(Pe(e,r),r.parentNode&&r.parentNode.removeChild(r));}};function Ce(){return "undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ie=function(e){var t=document.head,n=e||t,o=document.createElement("style"),r=function(e){var t=Array.from(e.querySelectorAll("style[".concat(f,"]")));return t[t.length-1]}(n),s=void 0!==r?r.nextSibling:null;o.setAttribute(f,m),o.setAttribute(y,v);var i=Ce();return i&&o.setAttribute("nonce",i),n.insertBefore(o,s),o},Ae=function(){function e(e){this.element=Ie(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,o=t.length;n<o;n++){var r=t[n];if(r.ownerNode===e)return r}throw he(17)}(this.element),this.length=0;}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return !1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Oe=function(){function e(e){this.element=Ie(e),this.nodes=this.element.childNodes,this.length=0;}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return !1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),De=function(){function e(e){this.rules=[],this.length=0;}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Re=S,Te={isServer:!S,useCSSOMInjection:!w},ke=function(){function e(e,n,o){void 0===e&&(e=C),void 0===n&&(n={});var r=this;this.options=__assign(__assign({},Te),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&S&&Re&&(Re=!1,_e(this)),ue(this,function(){return function(e){for(var t=e.getTag(),n=t.length,o="",r=function(n){var r=function(e){return ve.get(e)}(n);if(void 0===r)return "continue";var s=e.names.get(r),i=t.getGroup(n);if(void 0===s||!s.size||0===i.length)return "continue";var a="".concat(f,".g").concat(n,'[id="').concat(r,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","));}),o+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat(g);},s=0;s<n;s++)r(s);return o}(r)});}return e.registerId=function(e){return Se(e)},e.prototype.rehydrate=function(){!this.server&&S&&_e(this);},e.prototype.reconstructWithOptions=function(n,o){return void 0===o&&(o=!0),new e(__assign(__assign({},this.options),n),this.gs,o&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new De(n):t?new Ae(n):new Oe(n)}(this.options),new fe(e)));var e;},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(Se(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Se(e),n);},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},e.prototype.clearRules=function(e){this.getTag().clearGroup(Se(e)),this.clearNames(e);},e.prototype.clearTag=function(){this.tag=void 0;},e}(),je=/&/g,xe=/^\s*\/\/.*$/gm;function Ve(e,t){return e.map(function(e){return "rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return "".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Ve(e.children,t)),e})}function Fe(e){var t,n,o,r=void 0===e?C:e,s=r.options,i=void 0===s?C:s,a=r.plugins,c$1=void 0===a?_:a,l=function(e,o,r){return r.startsWith(n)&&r.endsWith(n)&&r.replaceAll(n,"").length>0?".".concat(t):e},u=c$1.slice();u.push(function(e){e.type===c&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(je,n).replace(o,l));}),i.prefix&&u.push(de$1),u.push(he$1);var p=function(e,r,s,a){void 0===r&&(r=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=r,o=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(xe,""),l=ue$1(s||r?"".concat(s," ").concat(r," { ").concat(c," }"):c);i.namespace&&(l=Ve(l,i.namespace));var p=[];return pe$1(l,be$1(u.concat(we$1(function(e){return p.push(e)})))),p};return p.hash=c$1.length?c$1.reduce(function(e,t){return t.name||he(15),M(e,t.name)},F).toString():"",p}var Me=new ke,ze=Fe(),$e=React__default["default"].createContext({shouldForwardProp:void 0,styleSheet:Me,stylis:ze});$e.Consumer;React__default["default"].createContext(void 0);function Ge(){return React.useContext($e)}var We=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ze);var o=n.name+t.hash;e.hasNameForId(n.id,o)||e.insertRules(n.id,o,t(n.rules,o,"@keyframes"));},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,ue(this,function(){throw he(12,String(n.name))});}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),qe=function(e){return e>="A"&&e<="Z"};function He(e){for(var t="",n=0;n<e.length;n++){var o=e[n];if(1===n&&"-"===o&&"-"===e[0])return e;qe(o)?t+="-"+o.toLowerCase():t+=o;}return t.startsWith("ms-")?"-"+t:t}var Ue=function(e){return null==e||!1===e||""===e},Je=function(t){var n,o,r=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ue(i)&&(Array.isArray(i)&&i.isCss||re(i)?r.push("".concat(He(s),":"),i,";"):ce(i)?r.push.apply(r,__spreadArray(__spreadArray(["".concat(s," {")],Je(i),!1),["}"],!1)):r.push("".concat(He(s),": ").concat((n=s,null==(o=i)||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in unitlessKeys||n.startsWith("--")?String(o).trim():"".concat(o,"px")),";")));}return r};function Xe(e,t,n,o){if(Ue(e))return [];if(se(e))return [".".concat(e.styledComponentId)];if(re(e)){if(!re(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return [e];var r=e(t);return "production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof We||ce(r)||null===r||console.error("".concat(B(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Xe(r,t,n,o)}var s;return e instanceof We?n?(e.inject(n,o),[e.getName(o)]):[e]:ce(e)?Je(e):Array.isArray(e)?Array.prototype.concat.apply(_,e.map(function(e){return Xe(e,t,n,o)})):[e.toString()]}function Ze(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(re(n)&&!se(n))return !1}return !0}var Ke=z(v),Qe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ze(e),this.componentId=t,this.baseHash=M(Ke,t),this.baseStyle=n,ke.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))o=ie(o,this.staticRulesId);else {var r=ae(Xe(this.rules,e,t,n)),s=x(M(this.baseHash,r)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(r,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i);}o=ie(o,s),this.staticRulesId=s;}else {for(var a=M(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=M(a,u));else if(u){var p=ae(Xe(u,e,t,n));a=M(a,p+l),c+=p;}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),o=ie(o,d);}}return o},e}(),et=React__default["default"].createContext(void 0);et.Consumer;var rt={},st=new Set;function it(e,r,s){var i=se(e),a=e,c=!L$1(e),p=r.attrs,d=void 0===p?_:p,h=r.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":R(e);rt[n]=(rt[n]||0)+1;var o="".concat(n,"-").concat($(v+n+rt[n]));return t?"".concat(t,"-").concat(o):o}(r.displayName,r.parentComponentId):h,m=r.displayName,y=void 0===m?function(e){return L$1(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):m,g=r.displayName&&r.componentId?"".concat(R(r.displayName),"-").concat(r.componentId):r.componentId||f,S=i&&a.attrs?a.attrs.concat(d).filter(Boolean):d,w=r.shouldForwardProp;if(i&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var E=r.shouldForwardProp;w=function(e,t){return b(e,t)&&E(e,t)};}else w=b;}var N=new Qe(s,g,i?a.componentStyle:void 0);function O(e,r){return function(e,r,s){var i=e.attrs,a=e.componentStyle,c=e.defaultProps,p=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=React__default["default"].useContext(et),m=Ge(),y=e.shouldForwardProp||m.shouldForwardProp;"production"!==process.env.NODE_ENV&&React.useDebugValue(d);var v=I(r,f,c)||C,g=function(e,n,o){for(var r,s=__assign(__assign({},n),{className:void 0,theme:o}),i=0;i<e.length;i+=1){var a=re(r=e[i])?r(s):r;for(var c in a)s[c]="className"===c?ie(s[c],a[c]):"style"===c?__assign(__assign({},s[c]),a[c]):a[c];}return n.className&&(s.className=ie(s.className,n.className)),s}(i,r,v),S=g.as||h,w={};for(var b in g)void 0===g[b]||"$"===b[0]||"as"===b||"theme"===b&&g.theme===v||("forwardedAs"===b?w.as=g.forwardedAs:y&&!y(b,S)||(w[b]=g[b],y||"development"!==process.env.NODE_ENV||isPropValid(b)||st.has(b)||!A.has(S)||(st.add(b),console.warn('styled-components: it looks like an unknown prop "'.concat(b,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var E=function(e,t){var n=Ge(),o=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return "production"!==process.env.NODE_ENV&&React.useDebugValue(o),o}(a,g);"production"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(E);var N=ie(p,d);return E&&(N+=" "+E),g.className&&(N+=" "+g.className),w[L$1(S)&&!A.has(S)?"class":"className"]=N,w.ref=s,React.createElement(S,w)}(D,e,r)}O.displayName=y;var D=React__default["default"].forwardRef(O);return D.attrs=S,D.componentStyle=N,D.displayName=y,D.shouldForwardProp=w,D.foldedComponentIds=i?ie(a.foldedComponentIds,a.styledComponentId):"",D.styledComponentId=g,D.target=i?a.target:e,Object.defineProperty(D,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var o=0,r=t;o<r.length;o++)le(e,r[o],!0);return e}({},a.defaultProps,e):e;}}),"production"!==process.env.NODE_ENV&&(P(y,g),D.warnTooManyClasses=function(e,t){var n={},o=!1;return function(r){if(!o&&(n[r]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),o=!0,n={};}}}(y,g)),ue(D,function(){return ".".concat(D.styledComponentId)}),c&&oe(D,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),D}function at(e,t){for(var n=[e[0]],o=0,r=t.length;o<r;o+=1)n.push(t[o],e[o+1]);return n}var ct=function(e){return Object.assign(e,{isCss:!0})};function lt(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(re(t)||ce(t))return ct(Xe(at(_,__spreadArray([t],n,!0))));var r=t;return 0===n.length&&1===r.length&&"string"==typeof r[0]?Xe(r):ct(Xe(at(r,n)))}function ut(n,o,r){if(void 0===r&&(r=C),!o)throw he(1,o);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(o,r,lt.apply(void 0,__spreadArray([t],s,!1)))};return s.attrs=function(e){return ut(n,o,__assign(__assign({},r),{attrs:Array.prototype.concat(r.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ut(n,o,__assign(__assign({},r),e))},s}var pt=function(e){return ut(it,e)},dt=pt;A.forEach(function(e){dt[e]=pt(e);});"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var St="__sc-".concat(f,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[St]||(window[St]=0),1===window[St]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[St]+=1);
11056
11056
 
11057
- var _templateObject$c;
11058
- const Style$J = dt.div(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\n\t.p-placeholder {\n\t\tposition: absolute;\n\t\ttop: 0px;\n\t\tleft: 0px;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tbackground: transparent;\n\t\tz-index: 100;\n\t}\n"])));
11057
+ var _templateObject$d;
11058
+ const Style$J = dt.div(_templateObject$d || (_templateObject$d = _taggedTemplateLiteral(["\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\n\t.p-placeholder {\n\t\tposition: absolute;\n\t\ttop: 0px;\n\t\tleft: 0px;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tbackground: transparent;\n\t\tz-index: 100;\n\t}\n"])));
11059
11059
 
11060
11060
  /**
11061
11061
  * ComponentWithFocus
@@ -11127,8 +11127,8 @@ function ComponentWithFocus(_ref) {
11127
11127
  });
11128
11128
  }
11129
11129
 
11130
- var _templateObject$b;
11131
- const _excluded$s = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
11130
+ var _templateObject$c;
11131
+ const _excluded$t = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
11132
11132
  function StickyTable(_ref) {
11133
11133
  let {
11134
11134
  size = "small",
@@ -11139,7 +11139,7 @@ function StickyTable(_ref) {
11139
11139
  pagination = false,
11140
11140
  doEmptyRows = true
11141
11141
  } = _ref,
11142
- props = _objectWithoutProperties(_ref, _excluded$s);
11142
+ props = _objectWithoutProperties(_ref, _excluded$t);
11143
11143
  const data = React__default["default"].useMemo(() => {
11144
11144
  if (!doEmptyRows) {
11145
11145
  return dataSource;
@@ -11185,7 +11185,7 @@ function StickyTable(_ref) {
11185
11185
  })
11186
11186
  });
11187
11187
  }
11188
- const Style$I = dt.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n\tmax-width: calc(100% - 48px);\n\tmargin-left: var(--size-lg);\n\toverflow: hidden;\n\n\t.daf-table {\n\t\tpadding: 0px;\n\t\tmargin-top: 0px;\n\n\t\t.ant-tag {\n\t\t\ttext-align: center;\n\t\t}\n\t}\n\n\t.daf-select-filters .filters {\n\t\tpadding-top: 16px;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t}\n\n\t.daf-table {\n\t\tpadding-top: 16px;\n\t}\n"])));
11188
+ const Style$I = dt.div(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n\tmax-width: calc(100% - 48px);\n\tmargin-left: var(--size-lg);\n\toverflow: hidden;\n\n\t.daf-table {\n\t\tpadding: 0px;\n\t\tmargin-top: 0px;\n\n\t\t.ant-tag {\n\t\t\ttext-align: center;\n\t\t}\n\t}\n\n\t.daf-select-filters .filters {\n\t\tpadding-top: 16px;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t}\n\n\t.daf-table {\n\t\tpadding-top: 16px;\n\t}\n"])));
11189
11189
  StickyTable.propTypes = {
11190
11190
  size: PropTypes__default["default"].any,
11191
11191
  maxHeight: PropTypes__default["default"].number,
@@ -11635,7 +11635,7 @@ const BTN_SIZE = {
11635
11635
  LG: 'large'
11636
11636
  };
11637
11637
 
11638
- const _excluded$r = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
11638
+ const _excluded$s = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
11639
11639
  function DafButton(_ref) {
11640
11640
  let {
11641
11641
  content = '',
@@ -11649,7 +11649,7 @@ function DafButton(_ref) {
11649
11649
  style = {},
11650
11650
  className = ''
11651
11651
  } = _ref,
11652
- restProps = _objectWithoutProperties(_ref, _excluded$r);
11652
+ restProps = _objectWithoutProperties(_ref, _excluded$s);
11653
11653
  return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
11654
11654
  icon: icon,
11655
11655
  type: type,
@@ -11768,12 +11768,12 @@ const Style$H = dt.div`
11768
11768
  }
11769
11769
  `;
11770
11770
 
11771
- const _excluded$q = ["children"];
11771
+ const _excluded$r = ["children"];
11772
11772
  const BorderedButton = _ref => {
11773
11773
  let {
11774
11774
  children
11775
11775
  } = _ref,
11776
- props = _objectWithoutProperties(_ref, _excluded$q);
11776
+ props = _objectWithoutProperties(_ref, _excluded$r);
11777
11777
  return /*#__PURE__*/jsxRuntime.jsx(Style$H, {
11778
11778
  className: "d-btn-cont",
11779
11779
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -11782,7 +11782,7 @@ const BorderedButton = _ref => {
11782
11782
  });
11783
11783
  };
11784
11784
 
11785
- var _templateObject$a;
11785
+ var _templateObject$b;
11786
11786
  const variantConfig = {
11787
11787
  default: {
11788
11788
  className: "default-badge",
@@ -11900,7 +11900,7 @@ function Badge(_ref) {
11900
11900
  })
11901
11901
  });
11902
11902
  }
11903
- const Style$G = dt.div(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 4px;\n\tpadding: 4px;\n\tmax-width: 100%;\n\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\n\t> svg {\n\t\tflex-shrink: 0;\n\t}\n\n\t> span {\n\t\tall: unset;\n\t\tmargin-left: 4px;\n\t\tfont-weight: 600;\n\t\tfont-size: 12px;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tdisplay: block;\n\t\tmax-width: 100%;\n\t}\n"])));
11903
+ const Style$G = dt.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 4px;\n\tpadding: 4px;\n\tmax-width: 100%;\n\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\n\t> svg {\n\t\tflex-shrink: 0;\n\t}\n\n\t> span {\n\t\tall: unset;\n\t\tmargin-left: 4px;\n\t\tfont-weight: 600;\n\t\tfont-size: 12px;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tdisplay: block;\n\t\tmax-width: 100%;\n\t}\n"])));
11904
11904
  Badge.propTypes = {
11905
11905
  children: PropTypes__default["default"].node,
11906
11906
  className: PropTypes__default["default"].string,
@@ -11913,12 +11913,12 @@ Badge.propTypes = {
11913
11913
  props: PropTypes__default["default"].object
11914
11914
  };
11915
11915
 
11916
- const _excluded$p = ["icon"];
11916
+ const _excluded$q = ["icon"];
11917
11917
  function GetIcon(_ref) {
11918
11918
  let {
11919
11919
  icon
11920
11920
  } = _ref,
11921
- props = _objectWithoutProperties(_ref, _excluded$p);
11921
+ props = _objectWithoutProperties(_ref, _excluded$q);
11922
11922
  let Icon = Icons__namespace.CloseOutlined;
11923
11923
  if (Icons__namespace[icon]) {
11924
11924
  Icon = Icons__namespace[icon];
@@ -12237,7 +12237,7 @@ GoToSelect.propTypes = {
12237
12237
  t: PropTypes__default["default"].func
12238
12238
  };
12239
12239
 
12240
- const _excluded$o = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
12240
+ const _excluded$p = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
12241
12241
  const {
12242
12242
  useToken: useToken$l
12243
12243
  } = antd.theme;
@@ -12330,7 +12330,7 @@ function Multiselect(_ref) {
12330
12330
  isSingle = false,
12331
12331
  selectionType = SELECTION_TYPES.DEFAULT
12332
12332
  } = _ref,
12333
- restProps = _objectWithoutProperties(_ref, _excluded$o);
12333
+ restProps = _objectWithoutProperties(_ref, _excluded$p);
12334
12334
  const {
12335
12335
  token
12336
12336
  } = useToken$l();
@@ -13046,7 +13046,7 @@ DAFHeader.propTypes = {
13046
13046
  filtersConfig: PropTypes__default["default"].any
13047
13047
  };
13048
13048
 
13049
- const _excluded$n = ["tabs", "onChange", "value", "className"];
13049
+ const _excluded$o = ["tabs", "onChange", "value", "className"];
13050
13050
  function TabsHeader(_ref) {
13051
13051
  let {
13052
13052
  tabs = [],
@@ -13054,7 +13054,7 @@ function TabsHeader(_ref) {
13054
13054
  value = '',
13055
13055
  className = 'mt-2'
13056
13056
  } = _ref,
13057
- rest = _objectWithoutProperties(_ref, _excluded$n);
13057
+ rest = _objectWithoutProperties(_ref, _excluded$o);
13058
13058
  return /*#__PURE__*/jsxRuntime.jsx("div", {
13059
13059
  className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
13060
13060
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
@@ -13151,14 +13151,16 @@ DrawerHeader.propTypes = {
13151
13151
  tabsConfig: PropTypes__default["default"].any
13152
13152
  };
13153
13153
 
13154
- const useFooter = ({
13155
- leftContent,
13156
- centerContent,
13157
- rightContent,
13158
- actionButtons,
13159
- app,
13160
- isViewMode
13161
- }) => {
13154
+ const _excluded$n = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
13155
+ const useFooter = _ref => {
13156
+ let {
13157
+ leftContent,
13158
+ centerContent,
13159
+ rightContent,
13160
+ actionButtons,
13161
+ app,
13162
+ isViewMode
13163
+ } = _ref;
13162
13164
  const renderFooterContent = React.useMemo(() => {
13163
13165
  const FooterContent = () => /*#__PURE__*/jsxRuntime.jsxs("div", {
13164
13166
  className: "daf-footer-content",
@@ -13174,18 +13176,18 @@ const useFooter = ({
13174
13176
  className: "daf-footer-actions",
13175
13177
  children: actionButtons.map((button, index) => {
13176
13178
  const {
13177
- label,
13178
- onClick,
13179
- icon,
13180
- type = BTN_TYPES.PRIMARY,
13181
- tooltip,
13182
- disabled = false,
13183
- loading = false,
13184
- style = {},
13185
- className = "",
13186
- ...restProps
13187
- } = button;
13188
- return /*#__PURE__*/jsxRuntime.jsx(DafButton, {
13179
+ label,
13180
+ onClick,
13181
+ icon,
13182
+ type = BTN_TYPES.PRIMARY,
13183
+ tooltip,
13184
+ disabled = false,
13185
+ loading = false,
13186
+ style = {},
13187
+ className = ""
13188
+ } = button,
13189
+ restProps = _objectWithoutProperties(button, _excluded$n);
13190
+ return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
13189
13191
  content: label,
13190
13192
  type: type,
13191
13193
  size: BTN_SIZE.MD,
@@ -13197,9 +13199,8 @@ const useFooter = ({
13197
13199
  loading: loading,
13198
13200
  title: tooltip,
13199
13201
  style: style,
13200
- className: className,
13201
- ...restProps
13202
- }, index);
13202
+ className: className
13203
+ }, restProps), index);
13203
13204
  })
13204
13205
  })]
13205
13206
  })]
@@ -13212,180 +13213,8 @@ const useFooter = ({
13212
13213
  };
13213
13214
  };
13214
13215
 
13215
- const FooterContainer = dt.div`
13216
- .daf-footer {
13217
- background: #ffffff;
13218
- border-top: 1px solid #e8e8e8;
13219
- border-left: none;
13220
- border-right: none;
13221
- border-bottom: none;
13222
- border-radius: 0;
13223
- padding: 24px;
13224
- margin: 0;
13225
- box-shadow: none;
13226
- z-index: 100;
13227
- position: relative;
13228
- min-height: 80px;
13229
-
13230
- &.daf-footer-fixed {
13231
- position: fixed;
13232
- bottom: 0;
13233
- left: 0;
13234
- right: 0;
13235
- z-index: 1000;
13236
- }
13237
-
13238
- .daf-footer-content {
13239
- display: flex;
13240
- align-items: center;
13241
- justify-content: space-between;
13242
- width: 100%;
13243
- min-height: 32px;
13244
-
13245
- .daf-footer-left {
13246
- flex: 1;
13247
- display: flex;
13248
- align-items: center;
13249
- justify-content: flex-start;
13250
- }
13251
-
13252
- .daf-footer-center {
13253
- flex: 1;
13254
- display: flex;
13255
- align-items: center;
13256
- justify-content: center;
13257
- }
13258
-
13259
- .daf-footer-right {
13260
- flex: 1;
13261
- display: flex;
13262
- align-items: center;
13263
- justify-content: flex-end;
13264
- gap: 12px;
13265
-
13266
- .daf-footer-actions {
13267
- .ant-btn {
13268
- height: 40px;
13269
- padding: 0 24px;
13270
- border-radius: 6px;
13271
- font-weight: 500;
13272
- font-size: 14px;
13273
- transition: all 0.3s ease;
13274
- border: 1px solid transparent;
13275
-
13276
- &.ant-btn-primary {
13277
- background-color: var(--color-primary-70);
13278
- color: #ffffff;
13279
- border-color: var(--color-primary-70);
13280
-
13281
- &:hover {
13282
- background-color: var(--color-primary-60);
13283
- border-color: var(--color-primary-60);
13284
- }
13285
-
13286
- &:active {
13287
- background-color: var(--color-primary-80);
13288
- border-color: var(--color-primary-80);
13289
- }
13290
-
13291
- &:disabled {
13292
- background-color: #f5f5f5;
13293
- color: #bfbfbf;
13294
- border-color: #d9d9d9;
13295
- }
13296
- }
13297
-
13298
- &.ant-btn-default {
13299
- background: #ffffff;
13300
- color: #666666;
13301
- border-color: #d9d9d9;
13302
-
13303
- &:hover {
13304
- border-color: var(--color-primary-70);
13305
- color: var(--color-primary-70);
13306
- }
13307
-
13308
- &:active {
13309
- border-color: var(--color-primary-80);
13310
- color: var(--color-primary-80);
13311
- }
13312
-
13313
- &:disabled {
13314
- background-color: #f5f5f5;
13315
- color: #bfbfbf;
13316
- border-color: #d9d9d9;
13317
- }
13318
- }
13319
-
13320
- &.ant-btn-ghost {
13321
- background: transparent;
13322
- color: #666666;
13323
- border-color: #d9d9d9;
13324
-
13325
- &:hover {
13326
- border-color: var(--color-primary-70);
13327
- color: var(--color-primary-70);
13328
- background: rgba(0, 0, 0, 0.02);
13329
- }
13330
-
13331
- &:active {
13332
- border-color: var(--color-primary-80);
13333
- color: var(--color-primary-80);
13334
- }
13335
-
13336
- &:disabled {
13337
- color: #bfbfbf;
13338
- border-color: #d9d9d9;
13339
- }
13340
- }
13341
- }
13342
- }
13343
- }
13344
- }
13345
- }
13346
-
13347
- /* Responsive design */
13348
- @media (max-width: 768px) {
13349
- .daf-footer {
13350
- margin: 0;
13351
- padding: 16px;
13352
-
13353
- .daf-footer-content {
13354
- flex-direction: column;
13355
- gap: 16px;
13356
- align-items: stretch;
13357
-
13358
- .daf-footer-left,
13359
- .daf-footer-center,
13360
- .daf-footer-right {
13361
- flex: none;
13362
- justify-content: center;
13363
- }
13364
-
13365
- .daf-footer-right {
13366
- .daf-footer-actions {
13367
- justify-content: center;
13368
- }
13369
- }
13370
- }
13371
- }
13372
- }
13373
-
13374
- /* App-specific styling */
13375
- &.sbg-app {
13376
- .daf-footer {
13377
- background: #f8f9fa;
13378
- border-color: #e9ecef;
13379
- }
13380
- }
13381
-
13382
- &.nashiriki-app {
13383
- .daf-footer {
13384
- background: #fff;
13385
- border-color: #d9d9d9;
13386
- }
13387
- }
13388
- `;
13216
+ var _templateObject$a;
13217
+ const FooterContainer = dt.div(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral(["\n\t.daf-footer {\n\t\tbackground: #ffffff;\n\t\tborder-top: 1px solid #e8e8e8;\n\t\tborder-left: none;\n\t\tborder-right: none;\n\t\tborder-bottom: none;\n\t\tborder-radius: 0;\n\t\tpadding: 24px;\n\t\tmargin: 0;\n\t\tbox-shadow: none;\n\t\tz-index: 100;\n\t\tposition: relative;\n\t\tmin-height: 80px;\n\n\t\t&.daf-footer-fixed {\n\t\t\tposition: fixed;\n\t\t\tbottom: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tz-index: 1000;\n\t\t}\n\n\t\t.daf-footer-content {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmin-height: 32px;\n\n\t\t\t.daf-footer-left {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-start;\n\t\t\t}\n\n\t\t\t.daf-footer-center {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t}\n\n\t\t\t.daf-footer-right {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-end;\n\t\t\t\tgap: 12px;\n\n\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t.ant-btn {\n\t\t\t\t\t\theight: 40px;\n\t\t\t\t\t\tpadding: 0 24px;\n\t\t\t\t\t\tborder-radius: 6px;\n\t\t\t\t\t\tfont-weight: 500;\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\ttransition: all 0.3s ease;\n\t\t\t\t\t\tborder: 1px solid transparent;\n\n\t\t\t\t\t\t&.ant-btn-primary {\n\t\t\t\t\t\t\tbackground-color: var(--color-primary-70);\n\t\t\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-60);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-60);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-default {\n\t\t\t\t\t\t\tbackground: #ffffff;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-ghost {\n\t\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t\tbackground: rgba(0, 0, 0, 0.02);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Responsive design */\n\t@media (max-width: 768px) {\n\t\t.daf-footer {\n\t\t\tmargin: 0;\n\t\t\tpadding: 16px;\n\n\t\t\t.daf-footer-content {\n\t\t\t\tflex-direction: column;\n\t\t\t\tgap: 16px;\n\t\t\t\talign-items: stretch;\n\n\t\t\t\t.daf-footer-left,\n\t\t\t\t.daf-footer-center,\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\tflex: none;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* App-specific styling */\n\t&.sbg-app {\n\t\t.daf-footer {\n\t\t\tbackground: #f8f9fa;\n\t\t\tborder-color: #e9ecef;\n\t\t}\n\t}\n\n\t&.nashiriki-app {\n\t\t.daf-footer {\n\t\t\tbackground: #fff;\n\t\t\tborder-color: #d9d9d9;\n\t\t}\n\t}\n"])));
13389
13218
 
13390
13219
  function DAFFooter(_ref) {
13391
13220
  let {
@@ -14253,8 +14082,9 @@ const determineHasChildren = ({
14253
14082
 
14254
14083
  const sortByPosition = (items, getConfig) => {
14255
14084
  return items.sort((a, b) => {
14256
- const positionA = getConfig(a)?.position || 0;
14257
- const positionB = getConfig(b)?.position || 0;
14085
+ var _getConfig, _getConfig2;
14086
+ const positionA = ((_getConfig = getConfig(a)) === null || _getConfig === void 0 ? void 0 : _getConfig.position) || 0;
14087
+ const positionB = ((_getConfig2 = getConfig(b)) === null || _getConfig2 === void 0 ? void 0 : _getConfig2.position) || 0;
14258
14088
  return positionA - positionB;
14259
14089
  });
14260
14090
  };
@@ -14271,7 +14101,7 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
14271
14101
  const parts = labelKey.split(' is ');
14272
14102
  if (parts.length === 2) {
14273
14103
  const [conditionKey, conditionValue] = parts;
14274
- if (item?.[conditionKey] === conditionValue) {
14104
+ if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
14275
14105
  return labelConfig[labelKey];
14276
14106
  }
14277
14107
  }
@@ -15592,6 +15422,226 @@ const PdfForm = _ref3 => {
15592
15422
  return organizedSections;
15593
15423
  };
15594
15424
  const organizedForm = React.useMemo(() => organizeFormByHeaders(form), [form]);
15425
+
15426
+ // Constants for height calculations (same as PdfView)
15427
+ const PAGE_HEIGHT = 1587;
15428
+ const FOOTER_HEIGHT = 70;
15429
+ const HEADER_HEIGHT = 100;
15430
+
15431
+ // Helper function to estimate tree node height based on content and type
15432
+ const estimateTreeNodeHeight = function (key, config, value) {
15433
+ let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
15434
+ const baseHeight = 28; // Base height per tree node
15435
+ const indentHeight = level * 2; // Additional height per level
15436
+ let totalHeight = baseHeight + indentHeight;
15437
+
15438
+ // Adjust height based on node type
15439
+ if ((config === null || config === void 0 ? void 0 : config.type) === 'header') {
15440
+ totalHeight += 15; // Headers need more space
15441
+ } else if ((config === null || config === void 0 ? void 0 : config.type) === 'textarea') {
15442
+ totalHeight += 40; // Textareas are taller
15443
+ } else if ((config === null || config === void 0 ? void 0 : config.type) === 'dataLink' || (config === null || config === void 0 ? void 0 : config.type) === 'dataLinkGroup') {
15444
+ totalHeight += 20; // Data links often have more content
15445
+ }
15446
+
15447
+ // Add height for value content if it exists
15448
+ if (value && typeof value === 'string' && value.length > 50) {
15449
+ totalHeight += Math.ceil(value.length / 50) * 15; // Multi-line content
15450
+ }
15451
+
15452
+ // Add height for children recursively
15453
+ if (config !== null && config !== void 0 && config.inputs) {
15454
+ const childKeys = Object.keys(config.inputs).filter(childKey => {
15455
+ const childConfig = config.inputs[childKey];
15456
+ // Check showIf condition
15457
+ if (childConfig !== null && childConfig !== void 0 && childConfig.showIf && !evaluateShowIfCondition(childConfig.showIf, data)) {
15458
+ return false;
15459
+ }
15460
+ return true;
15461
+ }).sort((a, b) => {
15462
+ var _config$inputs$a3, _config$inputs$b3;
15463
+ const positionA = ((_config$inputs$a3 = config.inputs[a]) === null || _config$inputs$a3 === void 0 ? void 0 : _config$inputs$a3.position) || 0;
15464
+ const positionB = ((_config$inputs$b3 = config.inputs[b]) === null || _config$inputs$b3 === void 0 ? void 0 : _config$inputs$b3.position) || 0;
15465
+ return positionA - positionB;
15466
+ });
15467
+ childKeys.forEach(childKey => {
15468
+ const childConfig = config.inputs[childKey];
15469
+ const childValue = (value === null || value === void 0 ? void 0 : value[childKey]) || (data === null || data === void 0 ? void 0 : data[childKey]);
15470
+ totalHeight += estimateTreeNodeHeight(childKey, childConfig, childValue, level + 1);
15471
+ });
15472
+ }
15473
+
15474
+ // Handle array/repeated content
15475
+ if (Array.isArray(value)) {
15476
+ value.forEach(itemValue => {
15477
+ totalHeight += estimateTreeNodeHeight(key, config, itemValue, level);
15478
+ });
15479
+ }
15480
+ return totalHeight;
15481
+ };
15482
+
15483
+ // Helper function to split section based on height constraints (goes deep if needed)
15484
+ const createHeightConstrainedSections = (sectionKey, section) => {
15485
+ const MAX_SECTION_HEIGHT = PAGE_HEIGHT - HEADER_HEIGHT - FOOTER_HEIGHT - 150; // Conservative buffer
15486
+ const subSections = [];
15487
+
15488
+ // Get all top-level items in the section with detailed analysis
15489
+ const topLevelItems = Object.keys(section).filter(key => !(key === 'id' || key === 'label' || key === 'position' || key === 'subTitle')).map(key => {
15490
+ var _section$key;
15491
+ return {
15492
+ key,
15493
+ config: section[key],
15494
+ estimatedHeight: estimateTreeNodeHeight(key, section[key], data === null || data === void 0 ? void 0 : data[key]),
15495
+ canSplit: ((_section$key = section[key]) === null || _section$key === void 0 ? void 0 : _section$key.inputs) && Object.keys(section[key].inputs).length > 1 // Can this item be further split?
15496
+ };
15497
+ }).sort((a, b) => {
15498
+ var _a$config, _b$config;
15499
+ return (((_a$config = a.config) === null || _a$config === void 0 ? void 0 : _a$config.position) || 0) - (((_b$config = b.config) === null || _b$config === void 0 ? void 0 : _b$config.position) || 0);
15500
+ });
15501
+ let currentSubSection = _objectSpread2({}, section);
15502
+
15503
+ // Remove all items from the base section structure
15504
+ Object.keys(section).forEach(key => {
15505
+ if (!(key === 'id' || key === 'label' || key === 'position' || key === 'subTitle')) {
15506
+ delete currentSubSection[key];
15507
+ }
15508
+ });
15509
+ let currentHeight = 80; // Base height for section header
15510
+ let subSectionIndex = 0;
15511
+ topLevelItems.forEach((item, index) => {
15512
+ const {
15513
+ key,
15514
+ config,
15515
+ estimatedHeight,
15516
+ canSplit
15517
+ } = item;
15518
+
15519
+ // If a single item is too large and can be split, split it at the child level
15520
+ if (estimatedHeight > MAX_SECTION_HEIGHT * 0.8 && canSplit) {
15521
+ // Split this large item into smaller parts
15522
+ const childSplits = splitLargeItem(key, config, data === null || data === void 0 ? void 0 : data[key], MAX_SECTION_HEIGHT * 0.6);
15523
+ childSplits.forEach((splitItem, splitIndex) => {
15524
+ // Check if current subsection has room
15525
+ if (currentHeight + splitItem.estimatedHeight > MAX_SECTION_HEIGHT && Object.keys(currentSubSection).length > 4) {
15526
+ // Save current sub-section
15527
+ subSections.push({
15528
+ key: "".concat(sectionKey, "_part_").concat(subSectionIndex),
15529
+ section: _objectSpread2({}, currentSubSection),
15530
+ title: section.label
15531
+ });
15532
+
15533
+ // Start new sub-section
15534
+ currentSubSection = {
15535
+ id: section.id,
15536
+ label: section.label,
15537
+ position: section.position + subSectionIndex + 1,
15538
+ subTitle: section.subTitle
15539
+ };
15540
+ currentHeight = 80;
15541
+ subSectionIndex++;
15542
+ }
15543
+
15544
+ // Add split item to current sub-section
15545
+ currentSubSection[splitItem.key] = splitItem.config;
15546
+ currentHeight += splitItem.estimatedHeight;
15547
+ });
15548
+ } else {
15549
+ // Regular processing for items that fit or can't be split
15550
+ // Check if adding this item would exceed height limit
15551
+ if (currentHeight + estimatedHeight > MAX_SECTION_HEIGHT && Object.keys(currentSubSection).length > 4) {
15552
+ // Save current sub-section
15553
+ subSections.push({
15554
+ key: "".concat(sectionKey, "_part_").concat(subSectionIndex),
15555
+ section: _objectSpread2({}, currentSubSection),
15556
+ title: section.label
15557
+ });
15558
+
15559
+ // Start new sub-section
15560
+ currentSubSection = {
15561
+ id: section.id,
15562
+ label: section.label,
15563
+ position: section.position + subSectionIndex + 1,
15564
+ subTitle: section.subTitle
15565
+ };
15566
+ currentHeight = 80;
15567
+ subSectionIndex++;
15568
+ }
15569
+
15570
+ // Add item to current sub-section
15571
+ currentSubSection[key] = config;
15572
+ currentHeight += estimatedHeight;
15573
+ }
15574
+ });
15575
+
15576
+ // Add the final sub-section if it has content
15577
+ if (Object.keys(currentSubSection).length > 4) {
15578
+ subSections.push({
15579
+ key: subSectionIndex === 0 ? sectionKey : "".concat(sectionKey, "_part_").concat(subSectionIndex),
15580
+ section: currentSubSection,
15581
+ title: section.label
15582
+ });
15583
+ }
15584
+ return subSections.length > 0 ? subSections : [{
15585
+ key: sectionKey,
15586
+ section: section,
15587
+ title: section.label
15588
+ }];
15589
+ };
15590
+
15591
+ // Helper function to split large items at the child level
15592
+ const splitLargeItem = (parentKey, parentConfig, parentValue, maxHeight) => {
15593
+ if (!(parentConfig !== null && parentConfig !== void 0 && parentConfig.inputs)) {
15594
+ return [{
15595
+ key: parentKey,
15596
+ config: parentConfig,
15597
+ estimatedHeight: estimateTreeNodeHeight(parentKey, parentConfig, parentValue)
15598
+ }];
15599
+ }
15600
+ const childItems = Object.keys(parentConfig.inputs).filter(childKey => {
15601
+ const childConfig = parentConfig.inputs[childKey];
15602
+ return !(childConfig !== null && childConfig !== void 0 && childConfig.showIf) || evaluateShowIfCondition(childConfig.showIf, data);
15603
+ }).map(childKey => ({
15604
+ key: childKey,
15605
+ config: parentConfig.inputs[childKey],
15606
+ estimatedHeight: estimateTreeNodeHeight(childKey, parentConfig.inputs[childKey], parentValue === null || parentValue === void 0 ? void 0 : parentValue[childKey])
15607
+ })).sort((a, b) => {
15608
+ var _a$config2, _b$config2;
15609
+ return (((_a$config2 = a.config) === null || _a$config2 === void 0 ? void 0 : _a$config2.position) || 0) - (((_b$config2 = b.config) === null || _b$config2 === void 0 ? void 0 : _b$config2.position) || 0);
15610
+ });
15611
+ const splits = [];
15612
+ let currentSplit = {
15613
+ key: "".concat(parentKey, "_part_0"),
15614
+ config: _objectSpread2(_objectSpread2({}, parentConfig), {}, {
15615
+ inputs: {}
15616
+ }),
15617
+ estimatedHeight: 40 // Base height for parent structure
15618
+ };
15619
+ let splitIndex = 0;
15620
+ childItems.forEach(child => {
15621
+ if (currentSplit.estimatedHeight + child.estimatedHeight > maxHeight && Object.keys(currentSplit.config.inputs).length > 0) {
15622
+ splits.push(currentSplit);
15623
+ splitIndex++;
15624
+ currentSplit = {
15625
+ key: "".concat(parentKey, "_part_").concat(splitIndex),
15626
+ config: _objectSpread2(_objectSpread2({}, parentConfig), {}, {
15627
+ label: parentConfig.label,
15628
+ inputs: {}
15629
+ }),
15630
+ estimatedHeight: 40
15631
+ };
15632
+ }
15633
+ currentSplit.config.inputs[child.key] = child.config;
15634
+ currentSplit.estimatedHeight += child.estimatedHeight;
15635
+ });
15636
+ if (Object.keys(currentSplit.config.inputs).length > 0) {
15637
+ splits.push(currentSplit);
15638
+ }
15639
+ return splits.length > 0 ? splits : [{
15640
+ key: parentKey,
15641
+ config: parentConfig,
15642
+ estimatedHeight: estimateTreeNodeHeight(parentKey, parentConfig, parentValue)
15643
+ }];
15644
+ };
15595
15645
  const pdfConfig = React.useMemo(() => {
15596
15646
  const sections = [];
15597
15647
  Object.keys(organizedForm).forEach(sectionKey => {
@@ -15599,28 +15649,40 @@ const PdfForm = _ref3 => {
15599
15649
  if (typeof section !== 'object' || !section.label) {
15600
15650
  return;
15601
15651
  }
15602
- sections.push({
15603
- render: () => /*#__PURE__*/jsxRuntime.jsx("div", {
15604
- className: "pdf-form-section",
15605
- children: /*#__PURE__*/jsxRuntime.jsx(PdfFormContent, {
15606
- form: {
15607
- [sectionKey]: section
15608
- },
15609
- data: data,
15610
- t: t,
15611
- user: user,
15612
- title: formName,
15613
- source: source,
15614
- version: version,
15615
- getApiBaseUrl: getApiBaseUrl,
15616
- getAppHeader: getAppHeader,
15617
- app: app
15618
- })
15619
- }, sectionKey),
15620
- style: {
15621
- marginBottom: '20px',
15622
- padding: '0 20px'
15623
- }
15652
+
15653
+ // Create height-constrained sub-sections
15654
+ const subSections = createHeightConstrainedSections(sectionKey, section);
15655
+ subSections.forEach(_ref4 => {
15656
+ let {
15657
+ key,
15658
+ section: subSection,
15659
+ title
15660
+ } = _ref4;
15661
+ sections.push({
15662
+ render: () => /*#__PURE__*/jsxRuntime.jsx("div", {
15663
+ className: "pdf-form-section",
15664
+ children: /*#__PURE__*/jsxRuntime.jsx(PdfFormContent, {
15665
+ form: {
15666
+ [key]: _objectSpread2(_objectSpread2({}, subSection), {}, {
15667
+ label: title
15668
+ })
15669
+ },
15670
+ data: data,
15671
+ t: t,
15672
+ user: user,
15673
+ title: formName,
15674
+ source: source,
15675
+ version: version,
15676
+ getApiBaseUrl: getApiBaseUrl,
15677
+ getAppHeader: getAppHeader,
15678
+ app: app
15679
+ })
15680
+ }, key),
15681
+ style: {
15682
+ marginBottom: '20px',
15683
+ padding: '0 20px'
15684
+ }
15685
+ });
15624
15686
  });
15625
15687
  });
15626
15688
  return sections;
@@ -20714,16 +20776,13 @@ function DashboardLayout(_ref) {
20714
20776
  let {
20715
20777
  children,
20716
20778
  header,
20717
- footer,
20718
- isCollapsed
20779
+ footer
20719
20780
  } = _ref;
20720
20781
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
20721
20782
  className: "daf-analysis",
20722
- style: _objectSpread2({
20783
+ style: {
20723
20784
  backgroundColor: "#F9FAFB"
20724
- }, isCollapsed === undefined ? {} : {
20725
- maxWidth: isCollapsed ? "calc(100vw - 70px)" : "calc(100vw - 250px)"
20726
- }),
20785
+ },
20727
20786
  children: [header, /*#__PURE__*/jsxRuntime.jsx("div", {
20728
20787
  className: "content",
20729
20788
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -21265,7 +21324,7 @@ function SdgList({
21265
21324
  }) {
21266
21325
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
21267
21326
  children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
21268
- children: "SDGs"
21327
+ children: "SDGs:"
21269
21328
  }), /*#__PURE__*/jsxRuntime.jsx(SDGIcons, {
21270
21329
  sdgList: sdgList,
21271
21330
  t: t
@@ -21348,8 +21407,7 @@ function ProjectWidget(_ref) {
21348
21407
  }), !hideSDGList && /*#__PURE__*/jsxRuntime.jsx("div", {
21349
21408
  style: {
21350
21409
  borderTop: "1px solid var(--base-gray-30)",
21351
- paddingTop: "10px",
21352
- minHeight: "50px"
21410
+ paddingTop: "10px"
21353
21411
  },
21354
21412
  children: /*#__PURE__*/jsxRuntime.jsx(SdgList, {
21355
21413
  sdgList: sdgList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.248",
3
+ "version": "0.6.249",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -5,17 +5,12 @@
5
5
  *
6
6
  * Every Widget inside the component (children) must be wrapped by a section tag, because i say so and if you dont like it you can change the code in the entire codebase, included but not limited to the following projects: nashiriki, tazama, kustawi, sbg, cukura, kota, mmt, and wherever the daf library is used.
7
7
  */
8
- export default function DashboardLayout({ children, header, footer, isCollapsed }) {
8
+ export default function DashboardLayout({ children, header, footer }) {
9
9
  return (
10
10
  <div
11
11
  className="daf-analysis"
12
12
  style={{
13
13
  backgroundColor: `#F9FAFB`,
14
- ...(isCollapsed === undefined
15
- ? {}
16
- : {
17
- maxWidth: isCollapsed ? `calc(100vw - 70px)` : `calc(100vw - 250px)`,
18
- }),
19
14
  }}
20
15
  >
21
16
  {header}
@@ -1,10 +1,10 @@
1
1
  import { Label } from "../style";
2
2
  import SDGIcons from "../../../../UI/SDGIcon/index.jsx";
3
3
  export default function SdgList({ sdgList = [], t }) {
4
- return (
5
- <>
6
- <Label>SDGs</Label>
7
- <SDGIcons sdgList={sdgList} t={t} />
8
- </>
9
- );
4
+ return (
5
+ <>
6
+ <Label>SDGs:</Label>
7
+ <SDGIcons sdgList={sdgList} t={t} />
8
+ </>
9
+ );
10
10
  }
@@ -83,7 +83,6 @@ export default function ProjectWidget({
83
83
  style={{
84
84
  borderTop: "1px solid var(--base-gray-30)",
85
85
  paddingTop: "10px",
86
- minHeight: "50px",
87
86
  }}
88
87
  >
89
88
  <SdgList sdgList={sdgList} t={t} />
@@ -525,6 +525,227 @@ const PdfForm = ({
525
525
 
526
526
  const organizedForm = useMemo(() => organizeFormByHeaders(form), [form]);
527
527
 
528
+ // Constants for height calculations (same as PdfView)
529
+ const PAGE_HEIGHT = 1587;
530
+ const FOOTER_HEIGHT = 70;
531
+ const HEADER_HEIGHT = 100;
532
+
533
+ // Helper function to estimate tree node height based on content and type
534
+ const estimateTreeNodeHeight = (key, config, value, level = 0) => {
535
+ const baseHeight = 28; // Base height per tree node
536
+ const indentHeight = level * 2; // Additional height per level
537
+ let totalHeight = baseHeight + indentHeight;
538
+
539
+ // Adjust height based on node type
540
+ if (config?.type === 'header') {
541
+ totalHeight += 15; // Headers need more space
542
+ } else if (config?.type === 'textarea') {
543
+ totalHeight += 40; // Textareas are taller
544
+ } else if (config?.type === 'dataLink' || config?.type === 'dataLinkGroup') {
545
+ totalHeight += 20; // Data links often have more content
546
+ }
547
+
548
+ // Add height for value content if it exists
549
+ if (value && typeof value === 'string' && value.length > 50) {
550
+ totalHeight += Math.ceil(value.length / 50) * 15; // Multi-line content
551
+ }
552
+
553
+ // Add height for children recursively
554
+ if (config?.inputs) {
555
+ const childKeys = Object.keys(config.inputs)
556
+ .filter(childKey => {
557
+ const childConfig = config.inputs[childKey];
558
+ // Check showIf condition
559
+ if (childConfig?.showIf && !evaluateShowIfCondition(childConfig.showIf, data)) {
560
+ return false;
561
+ }
562
+ return true;
563
+ })
564
+ .sort((a, b) => {
565
+ const positionA = config.inputs[a]?.position || 0;
566
+ const positionB = config.inputs[b]?.position || 0;
567
+ return positionA - positionB;
568
+ });
569
+
570
+ childKeys.forEach(childKey => {
571
+ const childConfig = config.inputs[childKey];
572
+ const childValue = value?.[childKey] || data?.[childKey];
573
+ totalHeight += estimateTreeNodeHeight(childKey, childConfig, childValue, level + 1);
574
+ });
575
+ }
576
+
577
+ // Handle array/repeated content
578
+ if (Array.isArray(value)) {
579
+ value.forEach(itemValue => {
580
+ totalHeight += estimateTreeNodeHeight(key, config, itemValue, level);
581
+ });
582
+ }
583
+
584
+ return totalHeight;
585
+ };
586
+
587
+ // Helper function to split section based on height constraints (goes deep if needed)
588
+ const createHeightConstrainedSections = (sectionKey, section) => {
589
+ const MAX_SECTION_HEIGHT = PAGE_HEIGHT - HEADER_HEIGHT - FOOTER_HEIGHT - 150; // Conservative buffer
590
+ const subSections = [];
591
+
592
+ // Get all top-level items in the section with detailed analysis
593
+ const topLevelItems = Object.keys(section)
594
+ .filter(key => !(key === 'id' || key === 'label' || key === 'position' || key === 'subTitle'))
595
+ .map(key => ({
596
+ key,
597
+ config: section[key],
598
+ estimatedHeight: estimateTreeNodeHeight(key, section[key], data?.[key]),
599
+ canSplit: section[key]?.inputs && Object.keys(section[key].inputs).length > 1 // Can this item be further split?
600
+ }))
601
+ .sort((a, b) => (a.config?.position || 0) - (b.config?.position || 0));
602
+
603
+ let currentSubSection = {
604
+ ...section,
605
+ };
606
+
607
+ // Remove all items from the base section structure
608
+ Object.keys(section).forEach(key => {
609
+ if (!(key === 'id' || key === 'label' || key === 'position' || key === 'subTitle')) {
610
+ delete currentSubSection[key];
611
+ }
612
+ });
613
+
614
+ let currentHeight = 80; // Base height for section header
615
+ let subSectionIndex = 0;
616
+
617
+ topLevelItems.forEach((item, index) => {
618
+ const { key, config, estimatedHeight, canSplit } = item;
619
+
620
+ // If a single item is too large and can be split, split it at the child level
621
+ if (estimatedHeight > MAX_SECTION_HEIGHT * 0.8 && canSplit) {
622
+ // Split this large item into smaller parts
623
+ const childSplits = splitLargeItem(key, config, data?.[key], MAX_SECTION_HEIGHT * 0.6);
624
+
625
+ childSplits.forEach((splitItem, splitIndex) => {
626
+ // Check if current subsection has room
627
+ if (currentHeight + splitItem.estimatedHeight > MAX_SECTION_HEIGHT && Object.keys(currentSubSection).length > 4) {
628
+ // Save current sub-section
629
+ subSections.push({
630
+ key: `${sectionKey}_part_${subSectionIndex}`,
631
+ section: { ...currentSubSection },
632
+ title: section.label
633
+ });
634
+
635
+ // Start new sub-section
636
+ currentSubSection = {
637
+ id: section.id,
638
+ label: section.label,
639
+ position: section.position + subSectionIndex + 1,
640
+ subTitle: section.subTitle
641
+ };
642
+ currentHeight = 80;
643
+ subSectionIndex++;
644
+ }
645
+
646
+ // Add split item to current sub-section
647
+ currentSubSection[splitItem.key] = splitItem.config;
648
+ currentHeight += splitItem.estimatedHeight;
649
+ });
650
+ } else {
651
+ // Regular processing for items that fit or can't be split
652
+ // Check if adding this item would exceed height limit
653
+ if (currentHeight + estimatedHeight > MAX_SECTION_HEIGHT && Object.keys(currentSubSection).length > 4) {
654
+ // Save current sub-section
655
+ subSections.push({
656
+ key: `${sectionKey}_part_${subSectionIndex}`,
657
+ section: { ...currentSubSection },
658
+ title: section.label
659
+ });
660
+
661
+ // Start new sub-section
662
+ currentSubSection = {
663
+ id: section.id,
664
+ label: section.label,
665
+ position: section.position + subSectionIndex + 1,
666
+ subTitle: section.subTitle
667
+ };
668
+ currentHeight = 80;
669
+ subSectionIndex++;
670
+ }
671
+
672
+ // Add item to current sub-section
673
+ currentSubSection[key] = config;
674
+ currentHeight += estimatedHeight;
675
+ }
676
+ });
677
+
678
+ // Add the final sub-section if it has content
679
+ if (Object.keys(currentSubSection).length > 4) {
680
+ subSections.push({
681
+ key: subSectionIndex === 0 ? sectionKey : `${sectionKey}_part_${subSectionIndex}`,
682
+ section: currentSubSection,
683
+ title: section.label
684
+ });
685
+ }
686
+
687
+ return subSections.length > 0 ? subSections : [{
688
+ key: sectionKey,
689
+ section: section,
690
+ title: section.label
691
+ }];
692
+ };
693
+
694
+ // Helper function to split large items at the child level
695
+ const splitLargeItem = (parentKey, parentConfig, parentValue, maxHeight) => {
696
+ if (!parentConfig?.inputs) {
697
+ return [{ key: parentKey, config: parentConfig, estimatedHeight: estimateTreeNodeHeight(parentKey, parentConfig, parentValue) }];
698
+ }
699
+
700
+ const childItems = Object.keys(parentConfig.inputs)
701
+ .filter(childKey => {
702
+ const childConfig = parentConfig.inputs[childKey];
703
+ return !childConfig?.showIf || evaluateShowIfCondition(childConfig.showIf, data);
704
+ })
705
+ .map(childKey => ({
706
+ key: childKey,
707
+ config: parentConfig.inputs[childKey],
708
+ estimatedHeight: estimateTreeNodeHeight(childKey, parentConfig.inputs[childKey], parentValue?.[childKey])
709
+ }))
710
+ .sort((a, b) => (a.config?.position || 0) - (b.config?.position || 0));
711
+
712
+ const splits = [];
713
+ let currentSplit = {
714
+ key: `${parentKey}_part_0`,
715
+ config: {
716
+ ...parentConfig,
717
+ inputs: {}
718
+ },
719
+ estimatedHeight: 40 // Base height for parent structure
720
+ };
721
+ let splitIndex = 0;
722
+
723
+ childItems.forEach(child => {
724
+ if (currentSplit.estimatedHeight + child.estimatedHeight > maxHeight && Object.keys(currentSplit.config.inputs).length > 0) {
725
+ splits.push(currentSplit);
726
+ splitIndex++;
727
+ currentSplit = {
728
+ key: `${parentKey}_part_${splitIndex}`,
729
+ config: {
730
+ ...parentConfig,
731
+ label: parentConfig.label,
732
+ inputs: {}
733
+ },
734
+ estimatedHeight: 40
735
+ };
736
+ }
737
+
738
+ currentSplit.config.inputs[child.key] = child.config;
739
+ currentSplit.estimatedHeight += child.estimatedHeight;
740
+ });
741
+
742
+ if (Object.keys(currentSplit.config.inputs).length > 0) {
743
+ splits.push(currentSplit);
744
+ }
745
+
746
+ return splits.length > 0 ? splits : [{ key: parentKey, config: parentConfig, estimatedHeight: estimateTreeNodeHeight(parentKey, parentConfig, parentValue) }];
747
+ };
748
+
528
749
  const pdfConfig = useMemo(() => {
529
750
  const sections = [];
530
751
 
@@ -535,27 +756,32 @@ const PdfForm = ({
535
756
  return;
536
757
  }
537
758
 
538
- sections.push({
539
- render: () => (
540
- <div key={sectionKey} className="pdf-form-section">
541
- <PdfFormContent
542
- form={{ [sectionKey]: section }}
543
- data={data}
544
- t={t}
545
- user={user}
546
- title={formName}
547
- source={source}
548
- version={version}
549
- getApiBaseUrl={getApiBaseUrl}
550
- getAppHeader={getAppHeader}
551
- app={app}
552
- />
553
- </div>
554
- ),
555
- style: {
556
- marginBottom: '20px',
557
- padding: '0 20px'
558
- }
759
+ // Create height-constrained sub-sections
760
+ const subSections = createHeightConstrainedSections(sectionKey, section);
761
+
762
+ subSections.forEach(({ key, section: subSection, title }) => {
763
+ sections.push({
764
+ render: () => (
765
+ <div key={key} className="pdf-form-section">
766
+ <PdfFormContent
767
+ form={{ [key]: { ...subSection, label: title } }}
768
+ data={data}
769
+ t={t}
770
+ user={user}
771
+ title={formName}
772
+ source={source}
773
+ version={version}
774
+ getApiBaseUrl={getApiBaseUrl}
775
+ getAppHeader={getAppHeader}
776
+ app={app}
777
+ />
778
+ </div>
779
+ ),
780
+ style: {
781
+ marginBottom: '20px',
782
+ padding: '0 20px'
783
+ }
784
+ });
559
785
  });
560
786
  });
561
787
 
package/.env DELETED
@@ -1,8 +0,0 @@
1
- REACT_APP_API_KEY=
2
- REACT_APP_AUTH_DOMAIN=
3
- REACT_APP_PROJECT_ID=
4
- REACT_APP_STORAGE_BUCKED=
5
- REACT_APP_SENDER_ID=
6
- REACT_APP_APP_ID=
7
- REACT_APP_MEASUREMENT_ID=
8
- REACT_APP_VAPID_KEY=
@@ -1,13 +0,0 @@
1
- {
2
- "cSpell.words": ["cukura"],
3
- "files.autoSave": "afterDelay",
4
- "editor.wordWrap": "on",
5
- "editor.autoClosingBrackets": "always",
6
- "editor.autoClosingComments": "always",
7
- "editor.autoClosingQuotes": "always",
8
- "editor.defaultFormatter": "esbenp.prettier-vscode",
9
- "editor.formatOnPaste": true,
10
- "editor.formatOnSave": true,
11
- "notebook.defaultFormatter": "esbenp.prettier-vscode",
12
- "javascript.format.semicolons": "insert"
13
- }