datastake-daf 0.6.272 → 0.6.273
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.
- package/dist/components/index.js +373 -317
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Globe/Globe.stories.js +30 -5
- package/src/@daf/core/components/Dashboard/Globe/README.md +106 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobe.jsx +259 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobe.stories.js +202 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeDebug.jsx +85 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeExample.jsx +75 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeTest.jsx +48 -0
- package/src/@daf/core/components/Dashboard/Globe/hook.js +63 -7
- package/src/@daf/core/components/Dashboard/Globe/index.jsx +24 -6
- package/src/@daf/core/components/Dashboard/Globe/storyConfig.js +243 -0
- package/src/@daf/core/components/Dashboard/Globe/storyConfig1.js +354 -0
- package/src/@daf/core/components/Dashboard/Globe/style.js +7 -23
- package/src/@daf/core/components/EditForm/EditForm.stories.js +0 -1
- package/src/@daf/core/components/EditForm/_index.scss +18 -64
- package/src/@daf/core/components/EditForm/form.jsx +2 -3
- package/src/@daf/core/components/ViewForm/ViewForm.stories.js +0 -1
- package/src/@daf/core/components/ViewForm/content.jsx +346 -386
- package/src/index.js +1 -0
- package/.env +0 -8
- package/.vscode/settings.json +0 -13
package/dist/components/index.js
CHANGED
|
@@ -3215,7 +3215,7 @@ const config$3 = {
|
|
|
3215
3215
|
Lightning: config$4
|
|
3216
3216
|
};
|
|
3217
3217
|
|
|
3218
|
-
const _excluded$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
11058
|
-
const Style$J = dt.div(_templateObject$
|
|
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$
|
|
11131
|
-
const _excluded$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
11771
|
+
const _excluded$r = ["children"];
|
|
11772
11772
|
const BorderedButton = _ref => {
|
|
11773
11773
|
let {
|
|
11774
11774
|
children
|
|
11775
11775
|
} = _ref,
|
|
11776
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
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$
|
|
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$
|
|
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$
|
|
11916
|
+
const _excluded$q = ["icon"];
|
|
11917
11917
|
function GetIcon(_ref) {
|
|
11918
11918
|
let {
|
|
11919
11919
|
icon
|
|
11920
11920
|
} = _ref,
|
|
11921
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
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$
|
|
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$
|
|
12333
|
+
restProps = _objectWithoutProperties(_ref, _excluded$p);
|
|
12334
12334
|
const {
|
|
12335
12335
|
token
|
|
12336
12336
|
} = useToken$l();
|
|
@@ -12655,7 +12655,7 @@ const {
|
|
|
12655
12655
|
Paragraph: Paragraph$1
|
|
12656
12656
|
} = antd.Typography;
|
|
12657
12657
|
const checkHasActiveFilterValues = filtersConfig => {
|
|
12658
|
-
if (!filtersConfig
|
|
12658
|
+
if (!(filtersConfig !== null && filtersConfig !== void 0 && filtersConfig.filtersConfig) || !(filtersConfig !== null && filtersConfig !== void 0 && filtersConfig.selectedFilters)) return false;
|
|
12659
12659
|
const filterConfigKeys = Object.keys(filtersConfig.filtersConfig);
|
|
12660
12660
|
const selectedFilters = filtersConfig.selectedFilters;
|
|
12661
12661
|
return filterConfigKeys.some(key => {
|
|
@@ -12663,27 +12663,28 @@ const checkHasActiveFilterValues = filtersConfig => {
|
|
|
12663
12663
|
return value !== undefined && value !== null && value !== '';
|
|
12664
12664
|
});
|
|
12665
12665
|
};
|
|
12666
|
-
const useHeader =
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12666
|
+
const useHeader = _ref => {
|
|
12667
|
+
let {
|
|
12668
|
+
title = '',
|
|
12669
|
+
tooltip = '',
|
|
12670
|
+
supportText = '',
|
|
12671
|
+
tags = [],
|
|
12672
|
+
actionButtons: _actionButtons = [],
|
|
12673
|
+
titleTooltip,
|
|
12674
|
+
className,
|
|
12675
|
+
addedHeader = null,
|
|
12676
|
+
addedHeaderFirst,
|
|
12677
|
+
extraButtons: _extraButtons = [],
|
|
12678
|
+
onDownload,
|
|
12679
|
+
downloadDisabled,
|
|
12680
|
+
goBackTo,
|
|
12681
|
+
loading,
|
|
12682
|
+
renderExtraComponents,
|
|
12683
|
+
app = '',
|
|
12684
|
+
isViewMode = false,
|
|
12685
|
+
filtersConfig = {}
|
|
12686
|
+
} = _ref;
|
|
12687
|
+
const hasActiveFilterValues = React.useMemo(() => checkHasActiveFilterValues(filtersConfig), [filtersConfig === null || filtersConfig === void 0 ? void 0 : filtersConfig.filtersConfig, filtersConfig === null || filtersConfig === void 0 ? void 0 : filtersConfig.selectedFilters]);
|
|
12687
12688
|
const [showFilters, setShowFilters] = React.useState(() => checkHasActiveFilterValues(filtersConfig));
|
|
12688
12689
|
const hasFilters = filtersConfig && Object.keys(filtersConfig).length > 0;
|
|
12689
12690
|
React.useEffect(() => {
|
|
@@ -12725,9 +12726,9 @@ const useHeader = ({
|
|
|
12725
12726
|
const buttonCont = React.useRef();
|
|
12726
12727
|
const [mainContWidth, setMainContWidth] = React.useState(600);
|
|
12727
12728
|
const [buttonContWidth, setButtonContWidth] = React.useState(0);
|
|
12728
|
-
const hasSupportText = !!supportText
|
|
12729
|
-
const hasTags = !!tags
|
|
12730
|
-
const hasButtons = !!(actionButtons
|
|
12729
|
+
const hasSupportText = !!(supportText !== null && supportText !== void 0 && supportText.length);
|
|
12730
|
+
const hasTags = !!(tags !== null && tags !== void 0 && tags.length);
|
|
12731
|
+
const hasButtons = !!(actionButtons !== null && actionButtons !== void 0 && actionButtons.length || extraButtons !== null && extraButtons !== void 0 && extraButtons.length);
|
|
12731
12732
|
React.useEffect(() => {
|
|
12732
12733
|
const mainContObserver = new ResizeObserver(entries => {
|
|
12733
12734
|
const _mainEntry = entries[0];
|
|
@@ -13045,7 +13046,7 @@ DAFHeader.propTypes = {
|
|
|
13045
13046
|
filtersConfig: PropTypes__default["default"].any
|
|
13046
13047
|
};
|
|
13047
13048
|
|
|
13048
|
-
const _excluded$
|
|
13049
|
+
const _excluded$o = ["tabs", "onChange", "value", "className"];
|
|
13049
13050
|
function TabsHeader(_ref) {
|
|
13050
13051
|
let {
|
|
13051
13052
|
tabs = [],
|
|
@@ -13053,7 +13054,7 @@ function TabsHeader(_ref) {
|
|
|
13053
13054
|
value = '',
|
|
13054
13055
|
className = 'mt-2'
|
|
13055
13056
|
} = _ref,
|
|
13056
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13057
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
13057
13058
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
13058
13059
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
13059
13060
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -13150,14 +13151,16 @@ DrawerHeader.propTypes = {
|
|
|
13150
13151
|
tabsConfig: PropTypes__default["default"].any
|
|
13151
13152
|
};
|
|
13152
13153
|
|
|
13153
|
-
const
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
|
|
13160
|
-
|
|
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;
|
|
13161
13164
|
const renderFooterContent = React.useMemo(() => {
|
|
13162
13165
|
const FooterContent = () => /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
13163
13166
|
className: "daf-footer-content",
|
|
@@ -13173,18 +13176,18 @@ const useFooter = ({
|
|
|
13173
13176
|
className: "daf-footer-actions",
|
|
13174
13177
|
children: actionButtons.map((button, index) => {
|
|
13175
13178
|
const {
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
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({
|
|
13188
13191
|
content: label,
|
|
13189
13192
|
type: type,
|
|
13190
13193
|
size: BTN_SIZE.MD,
|
|
@@ -13196,9 +13199,8 @@ const useFooter = ({
|
|
|
13196
13199
|
loading: loading,
|
|
13197
13200
|
title: tooltip,
|
|
13198
13201
|
style: style,
|
|
13199
|
-
className: className
|
|
13200
|
-
|
|
13201
|
-
}, index);
|
|
13202
|
+
className: className
|
|
13203
|
+
}, restProps), index);
|
|
13202
13204
|
})
|
|
13203
13205
|
})]
|
|
13204
13206
|
})]
|
|
@@ -13211,180 +13213,8 @@ const useFooter = ({
|
|
|
13211
13213
|
};
|
|
13212
13214
|
};
|
|
13213
13215
|
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
background: #ffffff;
|
|
13217
|
-
border-top: 1px solid #e8e8e8;
|
|
13218
|
-
border-left: none;
|
|
13219
|
-
border-right: none;
|
|
13220
|
-
border-bottom: none;
|
|
13221
|
-
border-radius: 0;
|
|
13222
|
-
padding: 24px;
|
|
13223
|
-
margin: 0;
|
|
13224
|
-
box-shadow: none;
|
|
13225
|
-
z-index: 100;
|
|
13226
|
-
position: relative;
|
|
13227
|
-
min-height: 80px;
|
|
13228
|
-
|
|
13229
|
-
&.daf-footer-fixed {
|
|
13230
|
-
position: fixed;
|
|
13231
|
-
bottom: 0;
|
|
13232
|
-
left: 0;
|
|
13233
|
-
right: 0;
|
|
13234
|
-
z-index: 1000;
|
|
13235
|
-
}
|
|
13236
|
-
|
|
13237
|
-
.daf-footer-content {
|
|
13238
|
-
display: flex;
|
|
13239
|
-
align-items: center;
|
|
13240
|
-
justify-content: space-between;
|
|
13241
|
-
width: 100%;
|
|
13242
|
-
min-height: 32px;
|
|
13243
|
-
|
|
13244
|
-
.daf-footer-left {
|
|
13245
|
-
flex: 1;
|
|
13246
|
-
display: flex;
|
|
13247
|
-
align-items: center;
|
|
13248
|
-
justify-content: flex-start;
|
|
13249
|
-
}
|
|
13250
|
-
|
|
13251
|
-
.daf-footer-center {
|
|
13252
|
-
flex: 1;
|
|
13253
|
-
display: flex;
|
|
13254
|
-
align-items: center;
|
|
13255
|
-
justify-content: center;
|
|
13256
|
-
}
|
|
13257
|
-
|
|
13258
|
-
.daf-footer-right {
|
|
13259
|
-
flex: 1;
|
|
13260
|
-
display: flex;
|
|
13261
|
-
align-items: center;
|
|
13262
|
-
justify-content: flex-end;
|
|
13263
|
-
gap: 12px;
|
|
13264
|
-
|
|
13265
|
-
.daf-footer-actions {
|
|
13266
|
-
.ant-btn {
|
|
13267
|
-
height: 40px;
|
|
13268
|
-
padding: 0 24px;
|
|
13269
|
-
border-radius: 6px;
|
|
13270
|
-
font-weight: 500;
|
|
13271
|
-
font-size: 14px;
|
|
13272
|
-
transition: all 0.3s ease;
|
|
13273
|
-
border: 1px solid transparent;
|
|
13274
|
-
|
|
13275
|
-
&.ant-btn-primary {
|
|
13276
|
-
background-color: var(--color-primary-70);
|
|
13277
|
-
color: #ffffff;
|
|
13278
|
-
border-color: var(--color-primary-70);
|
|
13279
|
-
|
|
13280
|
-
&:hover {
|
|
13281
|
-
background-color: var(--color-primary-60);
|
|
13282
|
-
border-color: var(--color-primary-60);
|
|
13283
|
-
}
|
|
13284
|
-
|
|
13285
|
-
&:active {
|
|
13286
|
-
background-color: var(--color-primary-80);
|
|
13287
|
-
border-color: var(--color-primary-80);
|
|
13288
|
-
}
|
|
13289
|
-
|
|
13290
|
-
&:disabled {
|
|
13291
|
-
background-color: #f5f5f5;
|
|
13292
|
-
color: #bfbfbf;
|
|
13293
|
-
border-color: #d9d9d9;
|
|
13294
|
-
}
|
|
13295
|
-
}
|
|
13296
|
-
|
|
13297
|
-
&.ant-btn-default {
|
|
13298
|
-
background: #ffffff;
|
|
13299
|
-
color: #666666;
|
|
13300
|
-
border-color: #d9d9d9;
|
|
13301
|
-
|
|
13302
|
-
&:hover {
|
|
13303
|
-
border-color: var(--color-primary-70);
|
|
13304
|
-
color: var(--color-primary-70);
|
|
13305
|
-
}
|
|
13306
|
-
|
|
13307
|
-
&:active {
|
|
13308
|
-
border-color: var(--color-primary-80);
|
|
13309
|
-
color: var(--color-primary-80);
|
|
13310
|
-
}
|
|
13311
|
-
|
|
13312
|
-
&:disabled {
|
|
13313
|
-
background-color: #f5f5f5;
|
|
13314
|
-
color: #bfbfbf;
|
|
13315
|
-
border-color: #d9d9d9;
|
|
13316
|
-
}
|
|
13317
|
-
}
|
|
13318
|
-
|
|
13319
|
-
&.ant-btn-ghost {
|
|
13320
|
-
background: transparent;
|
|
13321
|
-
color: #666666;
|
|
13322
|
-
border-color: #d9d9d9;
|
|
13323
|
-
|
|
13324
|
-
&:hover {
|
|
13325
|
-
border-color: var(--color-primary-70);
|
|
13326
|
-
color: var(--color-primary-70);
|
|
13327
|
-
background: rgba(0, 0, 0, 0.02);
|
|
13328
|
-
}
|
|
13329
|
-
|
|
13330
|
-
&:active {
|
|
13331
|
-
border-color: var(--color-primary-80);
|
|
13332
|
-
color: var(--color-primary-80);
|
|
13333
|
-
}
|
|
13334
|
-
|
|
13335
|
-
&:disabled {
|
|
13336
|
-
color: #bfbfbf;
|
|
13337
|
-
border-color: #d9d9d9;
|
|
13338
|
-
}
|
|
13339
|
-
}
|
|
13340
|
-
}
|
|
13341
|
-
}
|
|
13342
|
-
}
|
|
13343
|
-
}
|
|
13344
|
-
}
|
|
13345
|
-
|
|
13346
|
-
/* Responsive design */
|
|
13347
|
-
@media (max-width: 768px) {
|
|
13348
|
-
.daf-footer {
|
|
13349
|
-
margin: 0;
|
|
13350
|
-
padding: 16px;
|
|
13351
|
-
|
|
13352
|
-
.daf-footer-content {
|
|
13353
|
-
flex-direction: column;
|
|
13354
|
-
gap: 16px;
|
|
13355
|
-
align-items: stretch;
|
|
13356
|
-
|
|
13357
|
-
.daf-footer-left,
|
|
13358
|
-
.daf-footer-center,
|
|
13359
|
-
.daf-footer-right {
|
|
13360
|
-
flex: none;
|
|
13361
|
-
justify-content: center;
|
|
13362
|
-
}
|
|
13363
|
-
|
|
13364
|
-
.daf-footer-right {
|
|
13365
|
-
.daf-footer-actions {
|
|
13366
|
-
justify-content: center;
|
|
13367
|
-
}
|
|
13368
|
-
}
|
|
13369
|
-
}
|
|
13370
|
-
}
|
|
13371
|
-
}
|
|
13372
|
-
|
|
13373
|
-
/* App-specific styling */
|
|
13374
|
-
&.sbg-app {
|
|
13375
|
-
.daf-footer {
|
|
13376
|
-
background: #f8f9fa;
|
|
13377
|
-
border-color: #e9ecef;
|
|
13378
|
-
}
|
|
13379
|
-
}
|
|
13380
|
-
|
|
13381
|
-
&.nashiriki-app {
|
|
13382
|
-
.daf-footer {
|
|
13383
|
-
background: #fff;
|
|
13384
|
-
border-color: #d9d9d9;
|
|
13385
|
-
}
|
|
13386
|
-
}
|
|
13387
|
-
`;
|
|
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"])));
|
|
13388
13218
|
|
|
13389
13219
|
function DAFFooter(_ref) {
|
|
13390
13220
|
let {
|
|
@@ -14252,8 +14082,9 @@ const determineHasChildren = ({
|
|
|
14252
14082
|
|
|
14253
14083
|
const sortByPosition = (items, getConfig) => {
|
|
14254
14084
|
return items.sort((a, b) => {
|
|
14255
|
-
|
|
14256
|
-
const
|
|
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;
|
|
14257
14088
|
return positionA - positionB;
|
|
14258
14089
|
});
|
|
14259
14090
|
};
|
|
@@ -14270,7 +14101,7 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
|
|
|
14270
14101
|
const parts = labelKey.split(' is ');
|
|
14271
14102
|
if (parts.length === 2) {
|
|
14272
14103
|
const [conditionKey, conditionValue] = parts;
|
|
14273
|
-
if (item
|
|
14104
|
+
if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
|
|
14274
14105
|
return labelConfig[labelKey];
|
|
14275
14106
|
}
|
|
14276
14107
|
}
|
|
@@ -19532,39 +19363,23 @@ const Style$A = dt.div`
|
|
|
19532
19363
|
height: 100%;
|
|
19533
19364
|
}
|
|
19534
19365
|
|
|
19366
|
+
/* Narrow marker styling used by legacy components; avoid width/height overrides for SimpleGlobe */
|
|
19535
19367
|
.map-marker {
|
|
19536
19368
|
text-align: center;
|
|
19537
|
-
width 100%;
|
|
19538
|
-
height: 100%;
|
|
19539
19369
|
border-radius: 50% 50% 50% 0;
|
|
19540
19370
|
|
|
19541
19371
|
span {
|
|
19542
19372
|
color: white;
|
|
19543
19373
|
}
|
|
19544
19374
|
|
|
19545
|
-
&.rounded {
|
|
19546
|
-
|
|
19547
|
-
}
|
|
19548
|
-
|
|
19549
|
-
&.incident {
|
|
19550
|
-
border-radius: 100%;
|
|
19551
|
-
|
|
19552
|
-
.main {
|
|
19553
|
-
border-radius: 100%;
|
|
19554
|
-
height: 100%;
|
|
19555
|
-
display: flex;
|
|
19556
|
-
flex-direction: column;
|
|
19557
|
-
justify-content: center;
|
|
19558
|
-
}
|
|
19559
|
-
}
|
|
19560
|
-
|
|
19561
|
-
&.marker {
|
|
19562
|
-
background: var(--color-primary-70);
|
|
19563
|
-
border: 1px solid white;
|
|
19564
|
-
box-shadow: 0px 3.45px 3.45px 0px #00000029;
|
|
19565
|
-
}
|
|
19375
|
+
&.rounded { border-radius: 100%; }
|
|
19376
|
+
&.incident { border-radius: 100%; }
|
|
19377
|
+
&.marker { background: var(--color-primary-70); border: 1px solid white; box-shadow: 0px 3.45px 3.45px 0px #00000029; }
|
|
19566
19378
|
}
|
|
19567
19379
|
|
|
19380
|
+
/* Scoped class used by SimpleGlobe to avoid picking up broad .map-marker rules */
|
|
19381
|
+
.daf-globe-marker { text-align: center; }
|
|
19382
|
+
|
|
19568
19383
|
#globe {
|
|
19569
19384
|
flex: 1;
|
|
19570
19385
|
background: rgb(0, 0, 0);
|
|
@@ -20097,14 +19912,26 @@ const useGlobe = ({
|
|
|
20097
19912
|
const addedSources = React.useRef(new Set());
|
|
20098
19913
|
const isMounted = React.useRef(true);
|
|
20099
19914
|
const addAllDataToMap = React.useCallback(() => {
|
|
20100
|
-
|
|
19915
|
+
console.log('🚀 [GLOBE HOOK] addAllDataToMap called');
|
|
19916
|
+
console.log('🚀 [GLOBE HOOK] data:', data);
|
|
19917
|
+
console.log('🚀 [GLOBE HOOK] mapRef exists:', !!mapRef);
|
|
19918
|
+
console.log('🚀 [GLOBE HOOK] style loaded:', mapRef?.isStyleLoaded());
|
|
19919
|
+
if (!data || !mapRef) {
|
|
19920
|
+
console.log('❌ [GLOBE HOOK] addAllDataToMap early return - missing data or mapRef');
|
|
19921
|
+
return;
|
|
19922
|
+
}
|
|
19923
|
+
if (!mapRef.isStyleLoaded()) {
|
|
19924
|
+
console.log('⏳ [GLOBE HOOK] Style not loaded yet, retrying in 100ms...');
|
|
19925
|
+
setTimeout(() => {
|
|
19926
|
+
addAllDataToMap();
|
|
19927
|
+
}, 100);
|
|
20101
19928
|
return;
|
|
20102
19929
|
}
|
|
20103
|
-
|
|
20104
|
-
// Prevent multiple calls with empty data
|
|
20105
19930
|
if (data.length === 0) {
|
|
19931
|
+
console.log('❌ [GLOBE HOOK] addAllDataToMap early return - no data');
|
|
20106
19932
|
return;
|
|
20107
19933
|
}
|
|
19934
|
+
console.log('✅ [GLOBE HOOK] Starting to add markers to map...');
|
|
20108
19935
|
|
|
20109
19936
|
// Clear existing markers using functional update to avoid dependency issues
|
|
20110
19937
|
setMapMarkers(currentMarkers => {
|
|
@@ -20156,8 +19983,13 @@ const useGlobe = ({
|
|
|
20156
19983
|
if (data && mapRef) {
|
|
20157
19984
|
const newMarkers = [];
|
|
20158
19985
|
const maxTotal = Math.max(...(data || []).map(d => d.total || 0));
|
|
19986
|
+
console.log('🎯 [GLOBE HOOK] Processing data items:', data.length);
|
|
20159
19987
|
data.forEach((d, i) => {
|
|
19988
|
+
console.log(`🎯 [GLOBE HOOK] Processing item ${i}:`, d);
|
|
19989
|
+
console.log(`🎯 [GLOBE HOOK] Item ${i} marker:`, d?.marker);
|
|
19990
|
+
console.log(`🎯 [GLOBE HOOK] Item ${i} lat/lng:`, d?.marker?.lat, d?.marker?.lng);
|
|
20160
19991
|
if (d?.marker?.lat && d?.marker?.lng) {
|
|
19992
|
+
console.log(`✅ [GLOBE HOOK] Item ${i} has valid coordinates, creating marker...`);
|
|
20161
19993
|
let marker;
|
|
20162
19994
|
let iconClassName = "";
|
|
20163
19995
|
let iconSize = [25, 25];
|
|
@@ -20237,6 +20069,7 @@ const useGlobe = ({
|
|
|
20237
20069
|
el.style.fontWeight = 'bold';
|
|
20238
20070
|
el.innerHTML = `<span>${d.total || 0}</span>`;
|
|
20239
20071
|
marker = new mapboxgl.Marker(el).setLngLat([d.marker.lng, d.marker.lat]).setPopup(new mapboxgl.Popup().setDOMContent(div)).addTo(mapRef);
|
|
20072
|
+
console.log(`🎉 [GLOBE HOOK] Marker ${i} added to map at:`, [d.marker.lng, d.marker.lat]);
|
|
20240
20073
|
} else if (type === "territory") {
|
|
20241
20074
|
// Handle territory polygons
|
|
20242
20075
|
if (d.area && Array.isArray(d.area)) {
|
|
@@ -20306,6 +20139,7 @@ const useGlobe = ({
|
|
|
20306
20139
|
}));
|
|
20307
20140
|
roots.current.push(root);
|
|
20308
20141
|
marker = new mapboxgl.Marker(el).setLngLat([d.marker.lng, d.marker.lat]).setPopup(new mapboxgl.Popup().setDOMContent(div)).addTo(mapRef);
|
|
20142
|
+
console.log(`🎉 [GLOBE HOOK] Default marker ${i} added to map at:`, [d.marker.lng, d.marker.lat]);
|
|
20309
20143
|
}
|
|
20310
20144
|
|
|
20311
20145
|
// Add click handler
|
|
@@ -20339,6 +20173,7 @@ const useGlobe = ({
|
|
|
20339
20173
|
mapboxgl.accessToken = MAP_TOKEN;
|
|
20340
20174
|
|
|
20341
20175
|
// Create the map with Mapbox GL JS - 3D globe
|
|
20176
|
+
console.log('🗺️ [GLOBE HOOK] Creating map with style:', STYLE_URL);
|
|
20342
20177
|
const map = new mapboxgl.Map({
|
|
20343
20178
|
container: container.current,
|
|
20344
20179
|
style: STYLE_URL,
|
|
@@ -20357,8 +20192,13 @@ const useGlobe = ({
|
|
|
20357
20192
|
|
|
20358
20193
|
// Configure the map when style loads
|
|
20359
20194
|
map.on('style.load', () => {
|
|
20195
|
+
console.log('🎨 [GLOBE HOOK] Style loaded event triggered');
|
|
20196
|
+
console.log('🎨 [GLOBE HOOK] Map style loaded:', map.isStyleLoaded());
|
|
20197
|
+
|
|
20360
20198
|
// Wait a bit for the style to fully load
|
|
20361
20199
|
setTimeout(() => {
|
|
20200
|
+
console.log('🎨 [GLOBE HOOK] After timeout - Map style loaded:', map.isStyleLoaded());
|
|
20201
|
+
|
|
20362
20202
|
// Set fog for the space background effect with stars - simplified to avoid errors
|
|
20363
20203
|
try {
|
|
20364
20204
|
map.setFog({
|
|
@@ -20454,9 +20294,10 @@ const useGlobe = ({
|
|
|
20454
20294
|
|
|
20455
20295
|
// Add navigation controls
|
|
20456
20296
|
map.addControl(new mapboxgl.NavigationControl(), 'top-right');
|
|
20297
|
+
console.log('🗺️ [GLOBE HOOK] Map created successfully');
|
|
20457
20298
|
return map;
|
|
20458
20299
|
} catch (error) {
|
|
20459
|
-
console.error('Error creating Mapbox GL JS globe:', error);
|
|
20300
|
+
console.error('❌ [GLOBE HOOK] Error creating Mapbox GL JS globe:', error);
|
|
20460
20301
|
return null;
|
|
20461
20302
|
}
|
|
20462
20303
|
}, []);
|
|
@@ -20469,9 +20310,12 @@ const useGlobe = ({
|
|
|
20469
20310
|
// }, [initialMarkerSetIsDone]);
|
|
20470
20311
|
|
|
20471
20312
|
React.useEffect(() => {
|
|
20313
|
+
console.log('🔄 [GLOBE HOOK] useEffect for map creation - mapRef:', !!mapRef);
|
|
20472
20314
|
if (!mapRef) {
|
|
20315
|
+
console.log('🔄 [GLOBE HOOK] Creating map instance...');
|
|
20473
20316
|
const instance = createInstance();
|
|
20474
20317
|
if (instance) {
|
|
20318
|
+
console.log('🔄 [GLOBE HOOK] Map instance created, setting mapRef');
|
|
20475
20319
|
setMapRef(instance);
|
|
20476
20320
|
|
|
20477
20321
|
// Add comprehensive resize detection for Mapbox GL JS responsiveness
|
|
@@ -20552,14 +20396,22 @@ const useGlobe = ({
|
|
|
20552
20396
|
}
|
|
20553
20397
|
}, [polygon, mapRef]);
|
|
20554
20398
|
React.useEffect(() => {
|
|
20399
|
+
console.log('📥 [GLOBE HOOK] allData received:', allData);
|
|
20400
|
+
console.log('📥 [GLOBE HOOK] allData length:', allData?.length);
|
|
20555
20401
|
if (allData) {
|
|
20556
20402
|
if (allData.length === 0) {
|
|
20403
|
+
console.log('⚠️ [GLOBE HOOK] Empty data array');
|
|
20557
20404
|
setEmptyStateIsVisible(true);
|
|
20558
20405
|
} else if (emptyStateIsVisible) {
|
|
20559
20406
|
setEmptyStateIsVisible(false);
|
|
20560
20407
|
}
|
|
20561
|
-
|
|
20408
|
+
console.log('🔍 [GLOBE HOOK] Filtering data with filterValidGPS...');
|
|
20409
|
+
const filteredData = filterValidGPS(allData);
|
|
20410
|
+
console.log('🔍 [GLOBE HOOK] filtered data result:', filteredData);
|
|
20411
|
+
console.log('🔍 [GLOBE HOOK] filtered data length:', filteredData.length);
|
|
20412
|
+
setData(filteredData);
|
|
20562
20413
|
} else {
|
|
20414
|
+
console.log('❌ [GLOBE HOOK] No allData provided');
|
|
20563
20415
|
setData(null);
|
|
20564
20416
|
}
|
|
20565
20417
|
}, [allData, emptyStateIsVisible]);
|
|
@@ -20589,7 +20441,19 @@ const useGlobe = ({
|
|
|
20589
20441
|
}
|
|
20590
20442
|
}, [user, mapRef, allData]);
|
|
20591
20443
|
React.useEffect(() => {
|
|
20592
|
-
|
|
20444
|
+
console.log('🔄 [GLOBE HOOK] useEffect triggered:', {
|
|
20445
|
+
mapRef: !!mapRef,
|
|
20446
|
+
data: !!data,
|
|
20447
|
+
dataLength: data?.length,
|
|
20448
|
+
initialMarkerSetIsDone,
|
|
20449
|
+
styleLoaded: mapRef?.isStyleLoaded()
|
|
20450
|
+
});
|
|
20451
|
+
if (mapRef && data && !initialMarkerSetIsDone) {
|
|
20452
|
+
console.log('🚀 [GLOBE HOOK] Attempting to add markers...');
|
|
20453
|
+
console.log('🚀 [GLOBE HOOK] Style loaded check:', mapRef.isStyleLoaded());
|
|
20454
|
+
|
|
20455
|
+
// Try to add markers immediately, and if style isn't loaded,
|
|
20456
|
+
// the addAllDataToMap function will handle it
|
|
20593
20457
|
setInitialMarkerSetIsDone(true);
|
|
20594
20458
|
addAllDataToMap();
|
|
20595
20459
|
}
|
|
@@ -20802,7 +20666,7 @@ function Globe(_ref) {
|
|
|
20802
20666
|
renderSider = null,
|
|
20803
20667
|
renderMarker = null,
|
|
20804
20668
|
type = "default",
|
|
20805
|
-
showSider =
|
|
20669
|
+
showSider = false,
|
|
20806
20670
|
filtersConfig,
|
|
20807
20671
|
onFilterChange = () => {},
|
|
20808
20672
|
isSatellite = false,
|
|
@@ -20812,15 +20676,29 @@ function Globe(_ref) {
|
|
|
20812
20676
|
onUnmount
|
|
20813
20677
|
} = _ref;
|
|
20814
20678
|
// Map data to include marker coordinates
|
|
20815
|
-
const mappedData = React.useMemo(() =>
|
|
20816
|
-
|
|
20817
|
-
|
|
20818
|
-
|
|
20819
|
-
|
|
20820
|
-
|
|
20821
|
-
|
|
20679
|
+
const mappedData = React.useMemo(() => {
|
|
20680
|
+
console.log('📊 [GLOBE COMPONENT] Original data received:', data);
|
|
20681
|
+
console.log('📊 [GLOBE COMPONENT] Data length:', data === null || data === void 0 ? void 0 : data.length);
|
|
20682
|
+
if (!data || data.length === 0) {
|
|
20683
|
+
console.log('❌ [GLOBE COMPONENT] No data to map');
|
|
20684
|
+
return [];
|
|
20685
|
+
}
|
|
20686
|
+
const mapped = data.map((d, i) => {
|
|
20687
|
+
var _d$gps, _d$gps2;
|
|
20688
|
+
console.log("\uD83D\uDCCA [GLOBE COMPONENT] Mapping item ".concat(i, ":"), d);
|
|
20689
|
+
console.log("\uD83D\uDCCA [GLOBE COMPONENT] Item ".concat(i, " GPS:"), d === null || d === void 0 ? void 0 : d.gps);
|
|
20690
|
+
const result = _objectSpread2(_objectSpread2({}, d), {}, {
|
|
20691
|
+
marker: {
|
|
20692
|
+
lat: d === null || d === void 0 || (_d$gps = d.gps) === null || _d$gps === void 0 ? void 0 : _d$gps.latitude,
|
|
20693
|
+
lng: d === null || d === void 0 || (_d$gps2 = d.gps) === null || _d$gps2 === void 0 ? void 0 : _d$gps2.longitude
|
|
20694
|
+
}
|
|
20695
|
+
});
|
|
20696
|
+
console.log("\uD83D\uDCCA [GLOBE COMPONENT] Item ".concat(i, " mapped result:"), result);
|
|
20697
|
+
return result;
|
|
20822
20698
|
});
|
|
20823
|
-
|
|
20699
|
+
console.log('📊 [GLOBE COMPONENT] Final mapped data:', mapped);
|
|
20700
|
+
return mapped;
|
|
20701
|
+
}, [data]);
|
|
20824
20702
|
|
|
20825
20703
|
// Get resize context for sidebar state changes
|
|
20826
20704
|
const {
|
|
@@ -21004,6 +20882,183 @@ Globe.propTypes = {
|
|
|
21004
20882
|
nameAsSiderTitle: PropTypes__default["default"].bool
|
|
21005
20883
|
};
|
|
21006
20884
|
|
|
20885
|
+
const SimpleGlobe = _ref => {
|
|
20886
|
+
let {
|
|
20887
|
+
projects = [],
|
|
20888
|
+
mapConfig = {},
|
|
20889
|
+
showSider = false,
|
|
20890
|
+
onProjectClick = () => {},
|
|
20891
|
+
type = "default",
|
|
20892
|
+
color = "var(--color-primary-60)"
|
|
20893
|
+
} = _ref;
|
|
20894
|
+
const mapContainer = React.useRef(null);
|
|
20895
|
+
const map = React.useRef(null);
|
|
20896
|
+
React.useEffect(() => {
|
|
20897
|
+
if (map.current) return; // Initialize map only once
|
|
20898
|
+
|
|
20899
|
+
console.log('🗺️ [SIMPLE GLOBE] Creating map...');
|
|
20900
|
+
|
|
20901
|
+
// Set Mapbox access token
|
|
20902
|
+
mapboxgl.accessToken = 'pk.eyJ1IjoicmVkaXM5OTkiLCJhIjoiY2x4YWV5MzA5MmtuZzJpcXM5Y201Z2E2YiJ9.m5bwPg-Tj4Akesl1yQUa3w';
|
|
20903
|
+
|
|
20904
|
+
// Create map with custom Straatos style
|
|
20905
|
+
map.current = new mapboxgl.Map({
|
|
20906
|
+
container: mapContainer.current,
|
|
20907
|
+
style: 'mapbox://styles/pietragottardo/cm9tt9zfi00d101pg1vdx26si',
|
|
20908
|
+
center: [0, 0],
|
|
20909
|
+
zoom: mapConfig.maxZoom || 3,
|
|
20910
|
+
projection: 'globe',
|
|
20911
|
+
attributionControl: false
|
|
20912
|
+
});
|
|
20913
|
+
|
|
20914
|
+
// Add markers when map loads
|
|
20915
|
+
map.current.on('load', () => {
|
|
20916
|
+
console.log('🗺️ [SIMPLE GLOBE] Map loaded, adding markers...');
|
|
20917
|
+
|
|
20918
|
+
// Hide Mapbox logo and attribution completely
|
|
20919
|
+
map.current.getContainer();
|
|
20920
|
+
const style = document.createElement('style');
|
|
20921
|
+
style.textContent = "\n .mapboxgl-ctrl-logo,\n .mapboxgl-ctrl-attrib,\n .mapboxgl-ctrl-bottom-left,\n .mapboxgl-ctrl-bottom-right {\n display: none !important;\n }\n .mapboxgl-canvas-container {\n overflow: hidden !important;\n }\n .mapboxgl-canvas {\n overflow: hidden !important;\n }\n ";
|
|
20922
|
+
document.head.appendChild(style);
|
|
20923
|
+
|
|
20924
|
+
// Set the space background with stars
|
|
20925
|
+
try {
|
|
20926
|
+
map.current.setFog({
|
|
20927
|
+
'color': 'rgb(0, 0, 0)',
|
|
20928
|
+
'high-color': 'rgb(0, 0, 0)',
|
|
20929
|
+
'horizon-blend': 0.1,
|
|
20930
|
+
'space-color': 'rgb(0, 0, 0)',
|
|
20931
|
+
'star-intensity': 0.6
|
|
20932
|
+
});
|
|
20933
|
+
console.log('✨ [SIMPLE GLOBE] Space background with stars set');
|
|
20934
|
+
} catch (e) {
|
|
20935
|
+
console.log('⚠️ [SIMPLE GLOBE] Could not set fog, trying alternative...');
|
|
20936
|
+
// Fallback: try simpler fog configuration
|
|
20937
|
+
try {
|
|
20938
|
+
map.current.setFog({
|
|
20939
|
+
'color': 'rgb(0, 0, 0)',
|
|
20940
|
+
'high-color': 'rgb(0, 0, 0)',
|
|
20941
|
+
'horizon-blend': 0.1
|
|
20942
|
+
});
|
|
20943
|
+
console.log('✨ [SIMPLE GLOBE] Alternative space background set');
|
|
20944
|
+
} catch (e2) {
|
|
20945
|
+
console.log('⚠️ [SIMPLE GLOBE] Could not set any fog configuration');
|
|
20946
|
+
}
|
|
20947
|
+
}
|
|
20948
|
+
|
|
20949
|
+
// Calculate bounds to fit all markers
|
|
20950
|
+
const bounds = new mapboxgl.LngLatBounds();
|
|
20951
|
+
let hasValidCoordinates = false;
|
|
20952
|
+
projects.forEach((project, index) => {
|
|
20953
|
+
var _project$author;
|
|
20954
|
+
console.log("\uD83D\uDCCD [SIMPLE GLOBE] Adding marker ".concat(index, ":"), project);
|
|
20955
|
+
|
|
20956
|
+
// Create marker element based on type
|
|
20957
|
+
const el = document.createElement('div');
|
|
20958
|
+
// Use a scoped class to avoid picking up broad styles like `.map-marker { width:100% }`
|
|
20959
|
+
el.className = 'daf-globe-marker';
|
|
20960
|
+
el.style.cursor = 'pointer';
|
|
20961
|
+
el.style.boxShadow = '0px 3.45px 3.45px 0px #00000029';
|
|
20962
|
+
el.style.display = 'flex';
|
|
20963
|
+
el.style.alignItems = 'center';
|
|
20964
|
+
el.style.justifyContent = 'center';
|
|
20965
|
+
if (type === "location") {
|
|
20966
|
+
// Location marker - SVG map pin style
|
|
20967
|
+
el.style.width = '28px';
|
|
20968
|
+
el.style.height = '33px';
|
|
20969
|
+
el.innerHTML = "\n <svg\n width=\"28\"\n height=\"33\"\n viewBox=\"0 0 28 33\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.14346 4.87419C10.0688 -0.15896 18.0528 -0.162058 22.9757 4.86861C27.6563 9.65161 27.8841 17.2616 23.6622 22.3255H23.6608C23.427 22.6141 23.1808 22.894 22.9211 23.1623L14.0671 32.2101L5.44057 23.3948L5.13868 23.096C0.215857 18.0655 0.218422 9.90737 5.14346 4.87419Z\"\n fill=\"".concat(color, "\"\n stroke=\"white\"\n />\n </svg>\n ");
|
|
20970
|
+
} else {
|
|
20971
|
+
// Default circular marker style
|
|
20972
|
+
el.style.width = '30px';
|
|
20973
|
+
el.style.height = '30px';
|
|
20974
|
+
el.style.backgroundColor = color;
|
|
20975
|
+
el.style.borderRadius = '50%';
|
|
20976
|
+
el.style.border = '2px solid white';
|
|
20977
|
+
el.style.color = 'white';
|
|
20978
|
+
el.style.fontWeight = 'bold';
|
|
20979
|
+
el.style.fontSize = '14px';
|
|
20980
|
+
el.style.textAlign = 'center';
|
|
20981
|
+
el.style.lineHeight = '1';
|
|
20982
|
+
el.innerHTML = "<span style=\"display: block; line-height: 1;\">".concat(project.percentageCompletion || 0, "</span>");
|
|
20983
|
+
}
|
|
20984
|
+
|
|
20985
|
+
// Create popup content using the same structure as minesitemap
|
|
20986
|
+
const popupContent = "\n <div class=\"daf-tooltip-cont\">\n <div class=\"daf-tooltip-head\">\n <div class=\"daf-tooltip-title\">\n <div>\n <h4>".concat(project.name, "</h4>\n <h5>").concat(project.sectoralScope || 'Project', "</h5>\n </div>\n </div>\n </div>\n <div class=\"daf-tooltip-list\">\n <div class=\"daf-tooltip-list-item\">\n <span class=\"daf-tooltip-name\">Country</span>\n <span class=\"daf-tooltip-value\">").concat(project.country || 'N/A', "</span>\n </div>\n <div class=\"daf-tooltip-list-item\">\n <span class=\"daf-tooltip-name\">Completion</span>\n <span class=\"daf-tooltip-value\">").concat(project.percentageCompletion || 0, "%</span>\n </div>\n <div class=\"daf-tooltip-list-item\">\n <span class=\"daf-tooltip-name\">Author</span>\n <span class=\"daf-tooltip-value\">").concat(((_project$author = project.author) === null || _project$author === void 0 ? void 0 : _project$author.name) || 'N/A', "</span>\n </div>\n <div class=\"daf-tooltip-list-item\">\n <span class=\"daf-tooltip-name\">ID</span>\n <span class=\"daf-tooltip-value\">").concat(project.datastakeId || 'N/A', "</span>\n </div>\n </div>\n </div>\n ");
|
|
20987
|
+
|
|
20988
|
+
// Create popup
|
|
20989
|
+
const popup = new mapboxgl.Popup({
|
|
20990
|
+
offset: 25,
|
|
20991
|
+
closeButton: true,
|
|
20992
|
+
closeOnClick: false
|
|
20993
|
+
}).setHTML(popupContent);
|
|
20994
|
+
|
|
20995
|
+
// Ensure coordinates are valid numbers
|
|
20996
|
+
const lng = Number(project.longitude);
|
|
20997
|
+
const lat = Number(project.latitude);
|
|
20998
|
+
console.log("\uD83D\uDCCD [SIMPLE GLOBE] Marker ".concat(index, " coordinates:"), {
|
|
20999
|
+
lng,
|
|
21000
|
+
lat
|
|
21001
|
+
});
|
|
21002
|
+
|
|
21003
|
+
// Validate coordinates
|
|
21004
|
+
if (isNaN(lng) || isNaN(lat) || lng < -180 || lng > 180 || lat < -90 || lat > 90) {
|
|
21005
|
+
console.error("\u274C [SIMPLE GLOBE] Invalid coordinates for project ".concat(index, ":"), {
|
|
21006
|
+
lng,
|
|
21007
|
+
lat
|
|
21008
|
+
});
|
|
21009
|
+
return;
|
|
21010
|
+
}
|
|
21011
|
+
|
|
21012
|
+
// Add coordinates to bounds
|
|
21013
|
+
bounds.extend([lng, lat]);
|
|
21014
|
+
hasValidCoordinates = true;
|
|
21015
|
+
|
|
21016
|
+
// Add marker to map with proper coordinate order [lng, lat]
|
|
21017
|
+
new mapboxgl.Marker(el).setLngLat([lng, lat]).setPopup(popup).addTo(map.current);
|
|
21018
|
+
|
|
21019
|
+
// Add click handler
|
|
21020
|
+
el.addEventListener('click', () => {
|
|
21021
|
+
console.log('📍 [SIMPLE GLOBE] Marker clicked:', project);
|
|
21022
|
+
onProjectClick(project);
|
|
21023
|
+
});
|
|
21024
|
+
console.log("\u2705 [SIMPLE GLOBE] Marker ".concat(index, " added at:"), [lng, lat]);
|
|
21025
|
+
});
|
|
21026
|
+
|
|
21027
|
+
// Fit map to show all markers if we have valid coordinates
|
|
21028
|
+
if (hasValidCoordinates && !bounds.isEmpty()) {
|
|
21029
|
+
console.log('🗺️ [SIMPLE GLOBE] Fitting map to bounds:', bounds);
|
|
21030
|
+
map.current.fitBounds(bounds, {
|
|
21031
|
+
padding: {
|
|
21032
|
+
top: 20,
|
|
21033
|
+
bottom: 20,
|
|
21034
|
+
left: 20,
|
|
21035
|
+
right: 20
|
|
21036
|
+
},
|
|
21037
|
+
maxZoom: 6,
|
|
21038
|
+
duration: 1000
|
|
21039
|
+
});
|
|
21040
|
+
}
|
|
21041
|
+
});
|
|
21042
|
+
return () => {
|
|
21043
|
+
if (map.current) {
|
|
21044
|
+
map.current.remove();
|
|
21045
|
+
map.current = null;
|
|
21046
|
+
}
|
|
21047
|
+
};
|
|
21048
|
+
}, [projects, onProjectClick, mapConfig]);
|
|
21049
|
+
return /*#__PURE__*/jsxRuntime.jsx(Style$A, {
|
|
21050
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
21051
|
+
ref: mapContainer,
|
|
21052
|
+
style: {
|
|
21053
|
+
width: '100%',
|
|
21054
|
+
height: '500px',
|
|
21055
|
+
overflow: 'hidden',
|
|
21056
|
+
position: 'relative'
|
|
21057
|
+
}
|
|
21058
|
+
})
|
|
21059
|
+
});
|
|
21060
|
+
};
|
|
21061
|
+
|
|
21007
21062
|
function WidgetPlaceholder(_ref) {
|
|
21008
21063
|
let {
|
|
21009
21064
|
icon = "",
|
|
@@ -27476,12 +27531,11 @@ const Content = _ref => {
|
|
|
27476
27531
|
getApiBaseUrl,
|
|
27477
27532
|
getAppHeader,
|
|
27478
27533
|
user,
|
|
27479
|
-
evaluationConfig = []
|
|
27480
|
-
fullWidth = false
|
|
27534
|
+
evaluationConfig = []
|
|
27481
27535
|
} = _ref;
|
|
27482
27536
|
const groupSingle = grps => {
|
|
27483
27537
|
const form = Object.keys(grps).reduce((f, gKey) => {
|
|
27484
|
-
if (grps[gKey].type !==
|
|
27538
|
+
if (grps[gKey].type !== 'modal' && !isGroupInput(grps[gKey], false, data) && !isGroupInput(grps[gKey], true, data) && grps[gKey].display !== 'group' && !grps[gKey].viewGroup && !grps[gKey].component) {
|
|
27485
27539
|
var _grps$gKey, _grps$gKey2, _grps$gKey4, _grps$gKey5;
|
|
27486
27540
|
if (grps[gKey].group && !f[grps[gKey].group]) {
|
|
27487
27541
|
f[grps[gKey].group] = {};
|
|
@@ -27532,7 +27586,7 @@ const Content = _ref => {
|
|
|
27532
27586
|
};
|
|
27533
27587
|
const getComponent = (component, key, config) => {
|
|
27534
27588
|
switch (component) {
|
|
27535
|
-
case
|
|
27589
|
+
case 'repeatableModals':
|
|
27536
27590
|
return /*#__PURE__*/jsxRuntime.jsx(RepeatableModals, {
|
|
27537
27591
|
app: app,
|
|
27538
27592
|
t: t,
|
|
@@ -27555,9 +27609,9 @@ const Content = _ref => {
|
|
|
27555
27609
|
});
|
|
27556
27610
|
}
|
|
27557
27611
|
};
|
|
27558
|
-
const isDisplayGroup = input => input.display && input.display ===
|
|
27559
|
-
const isSingleModal = input => input.type && input.type ===
|
|
27560
|
-
const hasComponent = input => input.component && typeof input.component ===
|
|
27612
|
+
const isDisplayGroup = input => input.display && input.display === 'group';
|
|
27613
|
+
const isSingleModal = input => input.type && input.type === 'modal';
|
|
27614
|
+
const hasComponent = input => input.component && typeof input.component === 'string';
|
|
27561
27615
|
const typeRender = (groups, singleGroupsKeys, addedContent) => {
|
|
27562
27616
|
const _length = Object.keys(groups || {}).length;
|
|
27563
27617
|
const isEven = _length % 2 === 0;
|
|
@@ -27596,9 +27650,10 @@ const Content = _ref => {
|
|
|
27596
27650
|
getToken: getToken,
|
|
27597
27651
|
evaluationConfig: evaluationConfig,
|
|
27598
27652
|
ajaxOptions: ajaxOptions
|
|
27599
|
-
}, key)
|
|
27653
|
+
}, key)
|
|
27654
|
+
|
|
27600
27655
|
// repeatable group
|
|
27601
|
-
isGroupInput(groups[key], true, data) ? /*#__PURE__*/jsxRuntime.jsx(RepeatableGroup, {
|
|
27656
|
+
: isGroupInput(groups[key], true, data) ? /*#__PURE__*/jsxRuntime.jsx(RepeatableGroup, {
|
|
27602
27657
|
app: app,
|
|
27603
27658
|
t: t,
|
|
27604
27659
|
ajaxForms: ajaxForms,
|
|
@@ -27614,9 +27669,9 @@ const Content = _ref => {
|
|
|
27614
27669
|
linkingData: linkingData,
|
|
27615
27670
|
linkingForms: linkingForms,
|
|
27616
27671
|
ajaxOptions: ajaxOptions
|
|
27617
|
-
}, key)
|
|
27672
|
+
}, key)
|
|
27618
27673
|
// single inputs grouped
|
|
27619
|
-
singleGroupsKeys.includes(key) ? (() => {
|
|
27674
|
+
: singleGroupsKeys.includes(key) ? (() => {
|
|
27620
27675
|
if (!addedContent.includes(key)) {
|
|
27621
27676
|
var _groups$key;
|
|
27622
27677
|
const currentGroup = Object.keys(groupSingle(groups)).find(k => Object.keys(groupSingle(groups)[k]).includes(key));
|
|
@@ -27650,7 +27705,7 @@ const Content = _ref => {
|
|
|
27650
27705
|
data: data,
|
|
27651
27706
|
allData: data,
|
|
27652
27707
|
linkingData: linkingData,
|
|
27653
|
-
className: isEven ? ind === _length - 1 || ind === _length - 2 ?
|
|
27708
|
+
className: isEven ? ind === _length - 1 || ind === _length - 2 ? 'last' : undefined : ind === _length - 1 ? 'last' : undefined,
|
|
27654
27709
|
linkingForms: linkingForms,
|
|
27655
27710
|
ajaxOptions: ajaxOptions,
|
|
27656
27711
|
evaluationConfig: evaluationConfig,
|
|
@@ -27658,9 +27713,9 @@ const Content = _ref => {
|
|
|
27658
27713
|
}, key)]
|
|
27659
27714
|
}, "".concat(currentGroup, "-").concat(Date.now()));
|
|
27660
27715
|
}
|
|
27661
|
-
})()
|
|
27716
|
+
})()
|
|
27662
27717
|
// display group
|
|
27663
|
-
isDisplayGroup(groups[key]) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
27718
|
+
: isDisplayGroup(groups[key]) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
27664
27719
|
className: "group display",
|
|
27665
27720
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
27666
27721
|
className: "title",
|
|
@@ -27668,9 +27723,10 @@ const Content = _ref => {
|
|
|
27668
27723
|
children: groups[key].label
|
|
27669
27724
|
})
|
|
27670
27725
|
}), typeRender(getDisplayGroupConfig(groups, key), singleGroupsKeys, addedContent)]
|
|
27671
|
-
}, key)
|
|
27726
|
+
}, key)
|
|
27727
|
+
|
|
27672
27728
|
// single modal
|
|
27673
|
-
isSingleModal(groups[key]) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
27729
|
+
: isSingleModal(groups[key]) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
27674
27730
|
className: "group",
|
|
27675
27731
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
27676
27732
|
className: "title",
|
|
@@ -27706,18 +27762,18 @@ const Content = _ref => {
|
|
|
27706
27762
|
};
|
|
27707
27763
|
React.useEffect(() => {
|
|
27708
27764
|
setTimeout(() => {
|
|
27709
|
-
const groups = Array.from(document.getElementsByClassName(
|
|
27710
|
-
const rows = Array.from(document.querySelectorAll(
|
|
27765
|
+
const groups = Array.from(document.getElementsByClassName('group'));
|
|
27766
|
+
const rows = Array.from(document.querySelectorAll('.repetable-row-extra'));
|
|
27711
27767
|
rows.forEach(row => {
|
|
27712
|
-
const inputs = Array.from(row.querySelectorAll(
|
|
27768
|
+
const inputs = Array.from(row.querySelectorAll('.input'));
|
|
27713
27769
|
const lasts = getLastRow(inputs.map((i, ind) => ind), 4);
|
|
27714
27770
|
if (lasts) {
|
|
27715
|
-
lasts.forEach(index => inputs[index].classList.add(
|
|
27771
|
+
lasts.forEach(index => inputs[index].classList.add('last'));
|
|
27716
27772
|
}
|
|
27717
27773
|
});
|
|
27718
27774
|
groups.forEach(group => {
|
|
27719
27775
|
// const isRepeatable = Array.from(group.classList).includes('repeatable');
|
|
27720
|
-
const inputs = Array.from(group.querySelectorAll(
|
|
27776
|
+
const inputs = Array.from(group.querySelectorAll('.input'));
|
|
27721
27777
|
// if (inputs.length && !isRepeatable) {
|
|
27722
27778
|
// if (inputs.length % 2 === 0) {
|
|
27723
27779
|
// inputs[inputs.length - 1].classList.add('last');
|
|
@@ -27738,8 +27794,8 @@ const Content = _ref => {
|
|
|
27738
27794
|
React.useState({});
|
|
27739
27795
|
const renderContent = function (f) {
|
|
27740
27796
|
if (f) {
|
|
27741
|
-
const alertType = [
|
|
27742
|
-
if (f.alertConf && f.alertConf.type ===
|
|
27797
|
+
const alertType = ['error', 'warning', 'info', 'success'];
|
|
27798
|
+
if (f.alertConf && f.alertConf.type === 'warning') {
|
|
27743
27799
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
|
|
27744
27800
|
message: f.alertConf.text,
|
|
27745
27801
|
type: f.alertConf.type,
|
|
@@ -27760,15 +27816,15 @@ const Content = _ref => {
|
|
|
27760
27816
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
27761
27817
|
className: "wrapper",
|
|
27762
27818
|
style: {
|
|
27763
|
-
width:
|
|
27819
|
+
width: 700
|
|
27764
27820
|
},
|
|
27765
27821
|
children: [f.alertConf ? /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
|
|
27766
27822
|
className: "w-100",
|
|
27767
27823
|
style: {
|
|
27768
|
-
marginBottom:
|
|
27824
|
+
marginBottom: '20px'
|
|
27769
27825
|
},
|
|
27770
27826
|
message: f.alertConf.text,
|
|
27771
|
-
type: alertType.includes(f.alertConf.type) ? f.alertConf.type :
|
|
27827
|
+
type: alertType.includes(f.alertConf.type) ? f.alertConf.type : 'info',
|
|
27772
27828
|
showIcon: true
|
|
27773
27829
|
}) : null, typeRender(groups, singleGroupsKeys, addedContent)]
|
|
27774
27830
|
}, Date.now())
|
|
@@ -33963,8 +34019,7 @@ const EditForm = _ref => {
|
|
|
33963
34019
|
errors = {},
|
|
33964
34020
|
changeErrors = () => {},
|
|
33965
34021
|
evaluationConfig = [],
|
|
33966
|
-
staticWidth = "614px"
|
|
33967
|
-
fullWidth = false
|
|
34022
|
+
staticWidth = "614px"
|
|
33968
34023
|
} = _ref;
|
|
33969
34024
|
const [isSubmitting] = React.useState(false);
|
|
33970
34025
|
const formData = JSON.parse(JSON.stringify(convertUndefinedToNull(data) || {}));
|
|
@@ -34182,9 +34237,9 @@ const EditForm = _ref => {
|
|
|
34182
34237
|
name: id,
|
|
34183
34238
|
layout: "vertical",
|
|
34184
34239
|
style: {
|
|
34185
|
-
maxWidth:
|
|
34240
|
+
maxWidth: 700
|
|
34186
34241
|
},
|
|
34187
|
-
className: "main-form".concat(formClass ? " ".concat(formClass) : ""
|
|
34242
|
+
className: "main-form".concat(formClass ? " ".concat(formClass) : ""),
|
|
34188
34243
|
onValuesChange: (_changedValue, _allValues) => {
|
|
34189
34244
|
const changedValue = _objectSpread2({}, _changedValue);
|
|
34190
34245
|
const allValues = _objectSpread2({}, _allValues);
|
|
@@ -61777,6 +61832,7 @@ exports.SelectFiltersTimeFrame = Timeframe;
|
|
|
61777
61832
|
exports.SettingsPopover = SettingsPopover;
|
|
61778
61833
|
exports.Sidenav = Sidenav;
|
|
61779
61834
|
exports.SidenavMenu = SidenavMenu;
|
|
61835
|
+
exports.SimpleGlobe = SimpleGlobe;
|
|
61780
61836
|
exports.StackChart = StackChart;
|
|
61781
61837
|
exports.StakeholderMappings = index$1;
|
|
61782
61838
|
exports.Steps = DAFSteps;
|