datastake-daf 0.6.205 → 0.6.207
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 +179 -236
- package/package.json +1 -1
- package/public/assets/images/no-image.svg +18 -0
- package/src/@daf/core/components/Dashboard/Widget/CarouselWidget/index.jsx +6 -4
- package/src/@daf/core/components/Dashboard/Widget/ImageCarousel/ImageCarousel.stories.js +83 -1
- package/src/@daf/core/components/Dashboard/Widget/ImageCarousel/components/CustomArrowButton/index.js +52 -0
- package/src/@daf/core/components/Dashboard/Widget/ImageCarousel/index.jsx +95 -23
- package/src/@daf/core/components/Dashboard/Widget/ImageCarousel/style.js +15 -0
- package/src/@daf/core/components/UI/SDGIcon/SGDIcon.stories.jsx +19 -1
- package/.env +0 -8
- package/.vscode/settings.json +0 -13
- package/src/@daf/core/components/Dashboard/Widget/ScrollWidget/ScrollWidget.stories.jsx +0 -39
- package/src/@daf/core/components/Dashboard/Widget/ScrollWidget/index.jsx +0 -22
package/dist/components/index.js
CHANGED
|
@@ -3164,7 +3164,7 @@ const config$3 = {
|
|
|
3164
3164
|
LinkChain: config$4
|
|
3165
3165
|
};
|
|
3166
3166
|
|
|
3167
|
-
const _excluded$
|
|
3167
|
+
const _excluded$v = ["width", "height", "size", "name", "fill"];
|
|
3168
3168
|
const CustomIcon = _ref => {
|
|
3169
3169
|
let {
|
|
3170
3170
|
width = 14,
|
|
@@ -3173,7 +3173,7 @@ const CustomIcon = _ref => {
|
|
|
3173
3173
|
name = "",
|
|
3174
3174
|
fill = "none"
|
|
3175
3175
|
} = _ref,
|
|
3176
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3176
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
3177
3177
|
const conf = config$3[name];
|
|
3178
3178
|
if (conf) {
|
|
3179
3179
|
return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -9375,7 +9375,7 @@ createCommonjsModule(function (module, exports) {
|
|
|
9375
9375
|
!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])+"]"}}}));
|
|
9376
9376
|
});
|
|
9377
9377
|
|
|
9378
|
-
const _excluded$
|
|
9378
|
+
const _excluded$u = ["view", "module", "scope", "form", "meta"];
|
|
9379
9379
|
dayjs__default["default"].extend(customParseFormat);
|
|
9380
9380
|
dayjs__default["default"].extend(utc);
|
|
9381
9381
|
dayjs__default["default"].extend(utc);
|
|
@@ -9749,7 +9749,7 @@ const filterCreateData = data => {
|
|
|
9749
9749
|
form,
|
|
9750
9750
|
meta
|
|
9751
9751
|
} = data,
|
|
9752
|
-
rest = _objectWithoutProperties(data, _excluded$
|
|
9752
|
+
rest = _objectWithoutProperties(data, _excluded$u);
|
|
9753
9753
|
const _meta = isObjectEmpty(meta) ? undefined : meta;
|
|
9754
9754
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
9755
9755
|
meta: _meta
|
|
@@ -10128,7 +10128,7 @@ SelectFilters.propTypes = {
|
|
|
10128
10128
|
apiUrl: PropTypes__default["default"].string
|
|
10129
10129
|
};
|
|
10130
10130
|
|
|
10131
|
-
const _excluded$
|
|
10131
|
+
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"];
|
|
10132
10132
|
function DAFTable(_ref) {
|
|
10133
10133
|
let {
|
|
10134
10134
|
columns = [],
|
|
@@ -10159,7 +10159,7 @@ function DAFTable(_ref) {
|
|
|
10159
10159
|
app,
|
|
10160
10160
|
doEmptyRows
|
|
10161
10161
|
} = _ref,
|
|
10162
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10162
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
10163
10163
|
const [source, setSource] = React.useState([]);
|
|
10164
10164
|
const projectData = (projects || []).find(p => p.id === selectedProject);
|
|
10165
10165
|
const [filtersInit, setFiltersInit] = React.useState(!loading);
|
|
@@ -11002,8 +11002,8 @@ var unitlessKeys = {
|
|
|
11002
11002
|
|
|
11003
11003
|
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);
|
|
11004
11004
|
|
|
11005
|
-
var _templateObject$
|
|
11006
|
-
const Style$J = dt.div(_templateObject$
|
|
11005
|
+
var _templateObject$d;
|
|
11006
|
+
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"])));
|
|
11007
11007
|
|
|
11008
11008
|
/**
|
|
11009
11009
|
* ComponentWithFocus
|
|
@@ -11075,8 +11075,8 @@ function ComponentWithFocus(_ref) {
|
|
|
11075
11075
|
});
|
|
11076
11076
|
}
|
|
11077
11077
|
|
|
11078
|
-
var _templateObject$
|
|
11079
|
-
const _excluded$
|
|
11078
|
+
var _templateObject$c;
|
|
11079
|
+
const _excluded$s = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
|
|
11080
11080
|
function StickyTable(_ref) {
|
|
11081
11081
|
let {
|
|
11082
11082
|
size = "small",
|
|
@@ -11087,7 +11087,7 @@ function StickyTable(_ref) {
|
|
|
11087
11087
|
pagination = false,
|
|
11088
11088
|
doEmptyRows = true
|
|
11089
11089
|
} = _ref,
|
|
11090
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11090
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
11091
11091
|
const data = React__default["default"].useMemo(() => {
|
|
11092
11092
|
if (!doEmptyRows) {
|
|
11093
11093
|
return dataSource;
|
|
@@ -11133,7 +11133,7 @@ function StickyTable(_ref) {
|
|
|
11133
11133
|
})
|
|
11134
11134
|
});
|
|
11135
11135
|
}
|
|
11136
|
-
const Style$I = dt.div(_templateObject$
|
|
11136
|
+
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"])));
|
|
11137
11137
|
StickyTable.propTypes = {
|
|
11138
11138
|
size: PropTypes__default["default"].any,
|
|
11139
11139
|
maxHeight: PropTypes__default["default"].number,
|
|
@@ -11583,7 +11583,7 @@ const BTN_SIZE = {
|
|
|
11583
11583
|
LG: 'large'
|
|
11584
11584
|
};
|
|
11585
11585
|
|
|
11586
|
-
const _excluded$
|
|
11586
|
+
const _excluded$r = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
|
|
11587
11587
|
function DafButton(_ref) {
|
|
11588
11588
|
let {
|
|
11589
11589
|
content = '',
|
|
@@ -11597,7 +11597,7 @@ function DafButton(_ref) {
|
|
|
11597
11597
|
style = {},
|
|
11598
11598
|
className = ''
|
|
11599
11599
|
} = _ref,
|
|
11600
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
11600
|
+
restProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
11601
11601
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
11602
11602
|
icon: icon,
|
|
11603
11603
|
type: type,
|
|
@@ -11716,12 +11716,12 @@ const Style$H = dt.div`
|
|
|
11716
11716
|
}
|
|
11717
11717
|
`;
|
|
11718
11718
|
|
|
11719
|
-
const _excluded$
|
|
11719
|
+
const _excluded$q = ["children"];
|
|
11720
11720
|
const BorderedButton = _ref => {
|
|
11721
11721
|
let {
|
|
11722
11722
|
children
|
|
11723
11723
|
} = _ref,
|
|
11724
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11724
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
11725
11725
|
return /*#__PURE__*/jsxRuntime.jsx(Style$H, {
|
|
11726
11726
|
className: "d-btn-cont",
|
|
11727
11727
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -11730,7 +11730,7 @@ const BorderedButton = _ref => {
|
|
|
11730
11730
|
});
|
|
11731
11731
|
};
|
|
11732
11732
|
|
|
11733
|
-
var _templateObject$
|
|
11733
|
+
var _templateObject$b;
|
|
11734
11734
|
const variantConfig = {
|
|
11735
11735
|
default: {
|
|
11736
11736
|
className: "default-badge",
|
|
@@ -11848,7 +11848,7 @@ function Badge(_ref) {
|
|
|
11848
11848
|
})
|
|
11849
11849
|
});
|
|
11850
11850
|
}
|
|
11851
|
-
const Style$G = dt.div(_templateObject$
|
|
11851
|
+
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"])));
|
|
11852
11852
|
Badge.propTypes = {
|
|
11853
11853
|
children: PropTypes__default["default"].node,
|
|
11854
11854
|
className: PropTypes__default["default"].string,
|
|
@@ -11861,12 +11861,12 @@ Badge.propTypes = {
|
|
|
11861
11861
|
props: PropTypes__default["default"].object
|
|
11862
11862
|
};
|
|
11863
11863
|
|
|
11864
|
-
const _excluded$
|
|
11864
|
+
const _excluded$p = ["icon"];
|
|
11865
11865
|
function GetIcon(_ref) {
|
|
11866
11866
|
let {
|
|
11867
11867
|
icon
|
|
11868
11868
|
} = _ref,
|
|
11869
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11869
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
11870
11870
|
let Icon = Icons__namespace.CloseOutlined;
|
|
11871
11871
|
if (Icons__namespace[icon]) {
|
|
11872
11872
|
Icon = Icons__namespace[icon];
|
|
@@ -12185,7 +12185,7 @@ GoToSelect.propTypes = {
|
|
|
12185
12185
|
t: PropTypes__default["default"].func
|
|
12186
12186
|
};
|
|
12187
12187
|
|
|
12188
|
-
const _excluded$
|
|
12188
|
+
const _excluded$o = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
|
|
12189
12189
|
const {
|
|
12190
12190
|
useToken: useToken$k
|
|
12191
12191
|
} = antd.theme;
|
|
@@ -12278,7 +12278,7 @@ function Multiselect(_ref) {
|
|
|
12278
12278
|
isSingle = false,
|
|
12279
12279
|
selectionType = SELECTION_TYPES.DEFAULT
|
|
12280
12280
|
} = _ref,
|
|
12281
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
12281
|
+
restProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
12282
12282
|
const {
|
|
12283
12283
|
token
|
|
12284
12284
|
} = useToken$k();
|
|
@@ -12979,7 +12979,7 @@ DAFHeader.propTypes = {
|
|
|
12979
12979
|
filtersConfig: PropTypes__default["default"].any
|
|
12980
12980
|
};
|
|
12981
12981
|
|
|
12982
|
-
const _excluded$
|
|
12982
|
+
const _excluded$n = ["tabs", "onChange", "value", "className"];
|
|
12983
12983
|
function TabsHeader(_ref) {
|
|
12984
12984
|
let {
|
|
12985
12985
|
tabs = [],
|
|
@@ -12987,7 +12987,7 @@ function TabsHeader(_ref) {
|
|
|
12987
12987
|
value = '',
|
|
12988
12988
|
className = 'mt-2'
|
|
12989
12989
|
} = _ref,
|
|
12990
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12990
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
12991
12991
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
12992
12992
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
12993
12993
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -13084,14 +13084,16 @@ DrawerHeader.propTypes = {
|
|
|
13084
13084
|
tabsConfig: PropTypes__default["default"].any
|
|
13085
13085
|
};
|
|
13086
13086
|
|
|
13087
|
-
const
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13087
|
+
const _excluded$m = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
|
|
13088
|
+
const useFooter = _ref => {
|
|
13089
|
+
let {
|
|
13090
|
+
leftContent,
|
|
13091
|
+
centerContent,
|
|
13092
|
+
rightContent,
|
|
13093
|
+
actionButtons,
|
|
13094
|
+
app,
|
|
13095
|
+
isViewMode
|
|
13096
|
+
} = _ref;
|
|
13095
13097
|
const renderFooterContent = React.useMemo(() => {
|
|
13096
13098
|
const FooterContent = () => /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
13097
13099
|
className: "daf-footer-content",
|
|
@@ -13107,18 +13109,18 @@ const useFooter = ({
|
|
|
13107
13109
|
className: "daf-footer-actions",
|
|
13108
13110
|
children: actionButtons.map((button, index) => {
|
|
13109
13111
|
const {
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
return /*#__PURE__*/jsxRuntime.jsx(DafButton, {
|
|
13112
|
+
label,
|
|
13113
|
+
onClick,
|
|
13114
|
+
icon,
|
|
13115
|
+
type = BTN_TYPES.PRIMARY,
|
|
13116
|
+
tooltip,
|
|
13117
|
+
disabled = false,
|
|
13118
|
+
loading = false,
|
|
13119
|
+
style = {},
|
|
13120
|
+
className = ""
|
|
13121
|
+
} = button,
|
|
13122
|
+
restProps = _objectWithoutProperties(button, _excluded$m);
|
|
13123
|
+
return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
|
|
13122
13124
|
content: label,
|
|
13123
13125
|
type: type,
|
|
13124
13126
|
size: BTN_SIZE.MD,
|
|
@@ -13130,9 +13132,8 @@ const useFooter = ({
|
|
|
13130
13132
|
loading: loading,
|
|
13131
13133
|
title: tooltip,
|
|
13132
13134
|
style: style,
|
|
13133
|
-
className: className
|
|
13134
|
-
|
|
13135
|
-
}, index);
|
|
13135
|
+
className: className
|
|
13136
|
+
}, restProps), index);
|
|
13136
13137
|
})
|
|
13137
13138
|
})]
|
|
13138
13139
|
})]
|
|
@@ -13145,180 +13146,8 @@ const useFooter = ({
|
|
|
13145
13146
|
};
|
|
13146
13147
|
};
|
|
13147
13148
|
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
background: #ffffff;
|
|
13151
|
-
border-top: 1px solid #e8e8e8;
|
|
13152
|
-
border-left: none;
|
|
13153
|
-
border-right: none;
|
|
13154
|
-
border-bottom: none;
|
|
13155
|
-
border-radius: 0;
|
|
13156
|
-
padding: 24px;
|
|
13157
|
-
margin: 0;
|
|
13158
|
-
box-shadow: none;
|
|
13159
|
-
z-index: 100;
|
|
13160
|
-
position: relative;
|
|
13161
|
-
min-height: 80px;
|
|
13162
|
-
|
|
13163
|
-
&.daf-footer-fixed {
|
|
13164
|
-
position: fixed;
|
|
13165
|
-
bottom: 0;
|
|
13166
|
-
left: 0;
|
|
13167
|
-
right: 0;
|
|
13168
|
-
z-index: 1000;
|
|
13169
|
-
}
|
|
13170
|
-
|
|
13171
|
-
.daf-footer-content {
|
|
13172
|
-
display: flex;
|
|
13173
|
-
align-items: center;
|
|
13174
|
-
justify-content: space-between;
|
|
13175
|
-
width: 100%;
|
|
13176
|
-
min-height: 32px;
|
|
13177
|
-
|
|
13178
|
-
.daf-footer-left {
|
|
13179
|
-
flex: 1;
|
|
13180
|
-
display: flex;
|
|
13181
|
-
align-items: center;
|
|
13182
|
-
justify-content: flex-start;
|
|
13183
|
-
}
|
|
13184
|
-
|
|
13185
|
-
.daf-footer-center {
|
|
13186
|
-
flex: 1;
|
|
13187
|
-
display: flex;
|
|
13188
|
-
align-items: center;
|
|
13189
|
-
justify-content: center;
|
|
13190
|
-
}
|
|
13191
|
-
|
|
13192
|
-
.daf-footer-right {
|
|
13193
|
-
flex: 1;
|
|
13194
|
-
display: flex;
|
|
13195
|
-
align-items: center;
|
|
13196
|
-
justify-content: flex-end;
|
|
13197
|
-
gap: 12px;
|
|
13198
|
-
|
|
13199
|
-
.daf-footer-actions {
|
|
13200
|
-
.ant-btn {
|
|
13201
|
-
height: 40px;
|
|
13202
|
-
padding: 0 24px;
|
|
13203
|
-
border-radius: 6px;
|
|
13204
|
-
font-weight: 500;
|
|
13205
|
-
font-size: 14px;
|
|
13206
|
-
transition: all 0.3s ease;
|
|
13207
|
-
border: 1px solid transparent;
|
|
13208
|
-
|
|
13209
|
-
&.ant-btn-primary {
|
|
13210
|
-
background-color: var(--color-primary-70);
|
|
13211
|
-
color: #ffffff;
|
|
13212
|
-
border-color: var(--color-primary-70);
|
|
13213
|
-
|
|
13214
|
-
&:hover {
|
|
13215
|
-
background-color: var(--color-primary-60);
|
|
13216
|
-
border-color: var(--color-primary-60);
|
|
13217
|
-
}
|
|
13218
|
-
|
|
13219
|
-
&:active {
|
|
13220
|
-
background-color: var(--color-primary-80);
|
|
13221
|
-
border-color: var(--color-primary-80);
|
|
13222
|
-
}
|
|
13223
|
-
|
|
13224
|
-
&:disabled {
|
|
13225
|
-
background-color: #f5f5f5;
|
|
13226
|
-
color: #bfbfbf;
|
|
13227
|
-
border-color: #d9d9d9;
|
|
13228
|
-
}
|
|
13229
|
-
}
|
|
13230
|
-
|
|
13231
|
-
&.ant-btn-default {
|
|
13232
|
-
background: #ffffff;
|
|
13233
|
-
color: #666666;
|
|
13234
|
-
border-color: #d9d9d9;
|
|
13235
|
-
|
|
13236
|
-
&:hover {
|
|
13237
|
-
border-color: var(--color-primary-70);
|
|
13238
|
-
color: var(--color-primary-70);
|
|
13239
|
-
}
|
|
13240
|
-
|
|
13241
|
-
&:active {
|
|
13242
|
-
border-color: var(--color-primary-80);
|
|
13243
|
-
color: var(--color-primary-80);
|
|
13244
|
-
}
|
|
13245
|
-
|
|
13246
|
-
&:disabled {
|
|
13247
|
-
background-color: #f5f5f5;
|
|
13248
|
-
color: #bfbfbf;
|
|
13249
|
-
border-color: #d9d9d9;
|
|
13250
|
-
}
|
|
13251
|
-
}
|
|
13252
|
-
|
|
13253
|
-
&.ant-btn-ghost {
|
|
13254
|
-
background: transparent;
|
|
13255
|
-
color: #666666;
|
|
13256
|
-
border-color: #d9d9d9;
|
|
13257
|
-
|
|
13258
|
-
&:hover {
|
|
13259
|
-
border-color: var(--color-primary-70);
|
|
13260
|
-
color: var(--color-primary-70);
|
|
13261
|
-
background: rgba(0, 0, 0, 0.02);
|
|
13262
|
-
}
|
|
13263
|
-
|
|
13264
|
-
&:active {
|
|
13265
|
-
border-color: var(--color-primary-80);
|
|
13266
|
-
color: var(--color-primary-80);
|
|
13267
|
-
}
|
|
13268
|
-
|
|
13269
|
-
&:disabled {
|
|
13270
|
-
color: #bfbfbf;
|
|
13271
|
-
border-color: #d9d9d9;
|
|
13272
|
-
}
|
|
13273
|
-
}
|
|
13274
|
-
}
|
|
13275
|
-
}
|
|
13276
|
-
}
|
|
13277
|
-
}
|
|
13278
|
-
}
|
|
13279
|
-
|
|
13280
|
-
/* Responsive design */
|
|
13281
|
-
@media (max-width: 768px) {
|
|
13282
|
-
.daf-footer {
|
|
13283
|
-
margin: 0;
|
|
13284
|
-
padding: 16px;
|
|
13285
|
-
|
|
13286
|
-
.daf-footer-content {
|
|
13287
|
-
flex-direction: column;
|
|
13288
|
-
gap: 16px;
|
|
13289
|
-
align-items: stretch;
|
|
13290
|
-
|
|
13291
|
-
.daf-footer-left,
|
|
13292
|
-
.daf-footer-center,
|
|
13293
|
-
.daf-footer-right {
|
|
13294
|
-
flex: none;
|
|
13295
|
-
justify-content: center;
|
|
13296
|
-
}
|
|
13297
|
-
|
|
13298
|
-
.daf-footer-right {
|
|
13299
|
-
.daf-footer-actions {
|
|
13300
|
-
justify-content: center;
|
|
13301
|
-
}
|
|
13302
|
-
}
|
|
13303
|
-
}
|
|
13304
|
-
}
|
|
13305
|
-
}
|
|
13306
|
-
|
|
13307
|
-
/* App-specific styling */
|
|
13308
|
-
&.sbg-app {
|
|
13309
|
-
.daf-footer {
|
|
13310
|
-
background: #f8f9fa;
|
|
13311
|
-
border-color: #e9ecef;
|
|
13312
|
-
}
|
|
13313
|
-
}
|
|
13314
|
-
|
|
13315
|
-
&.nashiriki-app {
|
|
13316
|
-
.daf-footer {
|
|
13317
|
-
background: #fff;
|
|
13318
|
-
border-color: #d9d9d9;
|
|
13319
|
-
}
|
|
13320
|
-
}
|
|
13321
|
-
`;
|
|
13149
|
+
var _templateObject$a;
|
|
13150
|
+
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"])));
|
|
13322
13151
|
|
|
13323
13152
|
function DAFFooter(_ref) {
|
|
13324
13153
|
let {
|
|
@@ -21397,7 +21226,7 @@ const WidgetCard = _ref => {
|
|
|
21397
21226
|
};
|
|
21398
21227
|
|
|
21399
21228
|
const _excluded$e = ["title", "children"];
|
|
21400
|
-
|
|
21229
|
+
const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
21401
21230
|
let {
|
|
21402
21231
|
title,
|
|
21403
21232
|
children
|
|
@@ -21412,19 +21241,91 @@ function CarouselWidget(_ref) {
|
|
|
21412
21241
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
21413
21242
|
title: title,
|
|
21414
21243
|
className: "with-border-header h-w-btn-header",
|
|
21415
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Carousel, _objectSpread2(_objectSpread2({
|
|
21244
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Carousel, _objectSpread2(_objectSpread2({
|
|
21245
|
+
ref: ref
|
|
21246
|
+
}, rest), {}, {
|
|
21416
21247
|
children: children
|
|
21417
21248
|
}))
|
|
21418
21249
|
});
|
|
21250
|
+
});
|
|
21251
|
+
CarouselWidget.displayName = 'CarouselWidget';
|
|
21252
|
+
|
|
21253
|
+
function CustomArrowButton({
|
|
21254
|
+
icon,
|
|
21255
|
+
onClick = () => {},
|
|
21256
|
+
isLeft = false,
|
|
21257
|
+
iconColor = "#666",
|
|
21258
|
+
hoverIconColor = "#1890ff"
|
|
21259
|
+
}) {
|
|
21260
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
21261
|
+
|
|
21262
|
+
// Clone the icon and add color styling
|
|
21263
|
+
const styledIcon = icon && typeof icon === 'object' ? {
|
|
21264
|
+
...icon,
|
|
21265
|
+
props: {
|
|
21266
|
+
...icon.props,
|
|
21267
|
+
style: {
|
|
21268
|
+
color: isHovered ? hoverIconColor : iconColor
|
|
21269
|
+
}
|
|
21270
|
+
}
|
|
21271
|
+
} : icon;
|
|
21272
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
21273
|
+
type: "default",
|
|
21274
|
+
shape: "circle",
|
|
21275
|
+
icon: styledIcon,
|
|
21276
|
+
onClick: onClick,
|
|
21277
|
+
style: {
|
|
21278
|
+
position: "absolute",
|
|
21279
|
+
right: !isLeft ? "40px" : "auto",
|
|
21280
|
+
left: !isLeft ? "auto" : "40px",
|
|
21281
|
+
top: "58%",
|
|
21282
|
+
transform: "translateY(-50%)",
|
|
21283
|
+
zIndex: 10,
|
|
21284
|
+
backgroundColor: "rgba(255, 255, 255, 0.4)",
|
|
21285
|
+
border: "1px solid rgba(0, 0, 0, 0.1)",
|
|
21286
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.2)",
|
|
21287
|
+
width: "40px",
|
|
21288
|
+
height: "40px",
|
|
21289
|
+
display: "flex",
|
|
21290
|
+
alignItems: "center",
|
|
21291
|
+
justifyContent: "center"
|
|
21292
|
+
},
|
|
21293
|
+
onMouseEnter: e => {
|
|
21294
|
+
e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 1)";
|
|
21295
|
+
setIsHovered(true);
|
|
21296
|
+
},
|
|
21297
|
+
onMouseLeave: e => {
|
|
21298
|
+
e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.4)";
|
|
21299
|
+
setIsHovered(false);
|
|
21300
|
+
}
|
|
21301
|
+
});
|
|
21419
21302
|
}
|
|
21420
21303
|
|
|
21421
|
-
const
|
|
21304
|
+
const StyledCarouselWrapper = dt.div`
|
|
21305
|
+
position: relative;
|
|
21306
|
+
|
|
21307
|
+
.ant-carousel .slick-dots li button {
|
|
21308
|
+
background: ${props => props.inactiveDotColor} !important;
|
|
21309
|
+
opacity: 1 !important;
|
|
21310
|
+
}
|
|
21311
|
+
|
|
21312
|
+
.ant-carousel .slick-dots li.slick-active button {
|
|
21313
|
+
background: ${props => props.activeDotColor} !important;
|
|
21314
|
+
opacity: 1 !important;
|
|
21315
|
+
}
|
|
21316
|
+
`;
|
|
21317
|
+
|
|
21318
|
+
const _excluded$d = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor"];
|
|
21422
21319
|
function ImageCarousel(_ref) {
|
|
21423
21320
|
let {
|
|
21424
21321
|
title,
|
|
21425
21322
|
images,
|
|
21426
21323
|
height = 400,
|
|
21427
|
-
fallback = "/assets/images/empty-box.svg"
|
|
21324
|
+
fallback = "/assets/images/empty-box.svg",
|
|
21325
|
+
activeDotColor = "#1890ff",
|
|
21326
|
+
inactiveDotColor = "rgba(255, 255, 255, 0.3)",
|
|
21327
|
+
arrowIconColor = "#666",
|
|
21328
|
+
arrowHoverIconColor = "#1890ff"
|
|
21428
21329
|
} = _ref,
|
|
21429
21330
|
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
21430
21331
|
const [previewVisible, setPreviewVisible] = React.useState(false);
|
|
@@ -21433,16 +21334,30 @@ function ImageCarousel(_ref) {
|
|
|
21433
21334
|
const handleCarouselChange = index => {
|
|
21434
21335
|
setCurrent(index);
|
|
21435
21336
|
};
|
|
21337
|
+
const goToPrevious = () => {
|
|
21338
|
+
var _carouselRef$current;
|
|
21339
|
+
(_carouselRef$current = carouselRef.current) === null || _carouselRef$current === void 0 || _carouselRef$current.prev();
|
|
21340
|
+
};
|
|
21341
|
+
const goToNext = () => {
|
|
21342
|
+
var _carouselRef$current2;
|
|
21343
|
+
(_carouselRef$current2 = carouselRef.current) === null || _carouselRef$current2 === void 0 || _carouselRef$current2.next();
|
|
21344
|
+
};
|
|
21345
|
+
|
|
21346
|
+
// Check if images array is empty or invalid
|
|
21347
|
+
const hasImages = images && images.length > 0;
|
|
21436
21348
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
21437
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
21438
|
-
|
|
21439
|
-
|
|
21440
|
-
|
|
21441
|
-
|
|
21349
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(StyledCarouselWrapper, {
|
|
21350
|
+
activeDotColor: activeDotColor,
|
|
21351
|
+
inactiveDotColor: inactiveDotColor,
|
|
21352
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CarouselWidget, _objectSpread2(_objectSpread2({
|
|
21353
|
+
title: title
|
|
21354
|
+
}, rest), {}, {
|
|
21355
|
+
arrows: false,
|
|
21442
21356
|
ref: carouselRef,
|
|
21443
21357
|
afterChange: handleCarouselChange,
|
|
21444
|
-
infinite:
|
|
21445
|
-
|
|
21358
|
+
infinite: hasImages,
|
|
21359
|
+
dots: hasImages,
|
|
21360
|
+
children: hasImages ? images.map((image, index) => {
|
|
21446
21361
|
const imageSrc = typeof image === "string" ? image : image.src;
|
|
21447
21362
|
const imageAlt = typeof image === "string" ? "".concat(title, " - Image ").concat(index + 1) : image.alt;
|
|
21448
21363
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -21462,9 +21377,37 @@ function ImageCarousel(_ref) {
|
|
|
21462
21377
|
}
|
|
21463
21378
|
})
|
|
21464
21379
|
}, imageSrc);
|
|
21380
|
+
}) :
|
|
21381
|
+
/*#__PURE__*/
|
|
21382
|
+
// No images - show placeholder
|
|
21383
|
+
jsxRuntime.jsx("div", {
|
|
21384
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Image, {
|
|
21385
|
+
src: "/assets/images/no-image.svg",
|
|
21386
|
+
alt: "No images available",
|
|
21387
|
+
height: height,
|
|
21388
|
+
width: "100%",
|
|
21389
|
+
fallback: fallback,
|
|
21390
|
+
preview: false,
|
|
21391
|
+
style: {
|
|
21392
|
+
objectFit: "contain"
|
|
21393
|
+
}
|
|
21394
|
+
})
|
|
21465
21395
|
})
|
|
21466
|
-
})
|
|
21467
|
-
|
|
21396
|
+
})), hasImages && images.length > 1 && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
21397
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CustomArrowButton, {
|
|
21398
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(Icons.LeftOutlined, {}),
|
|
21399
|
+
onClick: goToPrevious,
|
|
21400
|
+
isLeft: true,
|
|
21401
|
+
iconColor: arrowIconColor,
|
|
21402
|
+
hoverIconColor: arrowHoverIconColor
|
|
21403
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CustomArrowButton, {
|
|
21404
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(Icons.RightOutlined, {}),
|
|
21405
|
+
onClick: goToNext,
|
|
21406
|
+
iconColor: arrowIconColor,
|
|
21407
|
+
hoverIconColor: arrowHoverIconColor
|
|
21408
|
+
})]
|
|
21409
|
+
})]
|
|
21410
|
+
}), hasImages && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
21468
21411
|
style: {
|
|
21469
21412
|
display: "none"
|
|
21470
21413
|
},
|
|
@@ -21474,9 +21417,9 @@ function ImageCarousel(_ref) {
|
|
|
21474
21417
|
current,
|
|
21475
21418
|
onVisibleChange: vis => setPreviewVisible(vis),
|
|
21476
21419
|
onChange: idx => {
|
|
21477
|
-
var _carouselRef$
|
|
21420
|
+
var _carouselRef$current3;
|
|
21478
21421
|
setCurrent(idx);
|
|
21479
|
-
(_carouselRef$
|
|
21422
|
+
(_carouselRef$current3 = carouselRef.current) === null || _carouselRef$current3 === void 0 || _carouselRef$current3.goTo(idx);
|
|
21480
21423
|
}
|
|
21481
21424
|
},
|
|
21482
21425
|
children: images.map((image, index) => {
|
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<svg width="321" height="190" viewBox="0 0 321 190" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_4160_16949)">
|
|
3
|
+
<g clip-path="url(#clip1_4160_16949)">
|
|
4
|
+
<path d="M94.375 99.5C78.3569 103.095 68.5 107.992 68.5 113.388C68.5 124.421 109.69 133.364 160.5 133.364C211.31 133.364 252.5 124.421 252.5 113.388C252.5 107.992 242.643 103.095 226.625 99.5V108.208C226.625 114.266 222.83 119.232 218.144 119.232H102.856C98.17 119.232 94.375 114.263 94.375 108.208V99.5Z" fill="#F3F4F6"/>
|
|
5
|
+
<path d="M188.137 64.8152C188.137 60.2351 190.995 56.454 194.54 56.4512H226.625V108.208C226.625 114.266 222.83 119.232 218.144 119.232H102.856C98.17 119.232 94.375 114.263 94.375 108.208V56.4512H126.46C130.005 56.4512 132.863 60.2266 132.863 64.8067V64.8695C132.863 69.4496 135.752 73.1479 139.294 73.1479H181.706C185.248 73.1479 188.137 69.4153 188.137 64.8352V64.8152Z" fill="#E5E7EB" stroke="#E5E7EB"/>
|
|
6
|
+
<path d="M226.625 56.7663L197.455 23.9435C196.055 21.7063 194.011 20.3536 191.858 20.3536H129.142C126.989 20.3536 124.945 21.7063 123.545 23.9407L94.375 56.7692" stroke="#E5E7EB"/>
|
|
7
|
+
</g>
|
|
8
|
+
<path d="M133.177 162.5H131.687V152.636H133.074L138.188 159.909H138.242V152.636H139.732V162.5H138.352L133.238 155.233H133.177V162.5ZM144.586 162.589C142.439 162.589 141.072 161.126 141.072 158.788C141.072 156.457 142.446 154.98 144.586 154.98C146.726 154.98 148.093 156.45 148.093 158.788C148.093 161.126 146.732 162.589 144.586 162.589ZM144.586 161.358C145.844 161.358 146.589 160.408 146.589 158.788C146.589 157.168 145.844 156.211 144.586 156.211C143.328 156.211 142.576 157.175 142.576 158.788C142.576 160.408 143.328 161.358 144.586 161.358ZM154.19 162.5H152.659V152.636H154.19V162.5ZM155.858 162.5V155.076H157.273V156.334H157.301C157.643 155.5 158.442 154.994 159.413 154.994C160.445 154.994 161.19 155.514 161.491 156.437H161.525C161.915 155.541 162.79 154.994 163.85 154.994C165.312 154.994 166.27 155.958 166.27 157.441V162.5H164.793V157.797C164.793 156.826 164.267 156.266 163.344 156.266C162.435 156.266 161.792 156.942 161.792 157.893V162.5H160.336V157.674C160.336 156.812 159.782 156.266 158.914 156.266C157.998 156.266 157.342 156.977 157.342 157.947V162.5H155.858ZM170.33 161.393C171.431 161.393 172.265 160.688 172.265 159.711V159.13L170.46 159.253C169.448 159.314 168.922 159.69 168.922 160.347C168.922 160.982 169.476 161.393 170.33 161.393ZM169.934 162.575C168.45 162.575 167.425 161.7 167.425 160.374C167.425 159.075 168.43 158.323 170.262 158.207L172.265 158.091V157.517C172.265 156.669 171.697 156.204 170.706 156.204C169.899 156.204 169.312 156.621 169.182 157.264H167.794C167.835 155.951 169.079 154.98 170.747 154.98C172.559 154.98 173.728 155.938 173.728 157.407V162.5H172.312V161.263H172.278C171.868 162.069 170.945 162.575 169.934 162.575ZM178.369 161.249C179.572 161.249 180.372 160.265 180.372 158.768C180.372 157.264 179.572 156.259 178.369 156.259C177.173 156.259 176.4 157.243 176.4 158.768C176.4 160.285 177.173 161.249 178.369 161.249ZM178.376 165.173C176.592 165.173 175.32 164.346 175.177 163.074H176.674C176.838 163.648 177.528 164.011 178.438 164.011C179.613 164.011 180.372 163.396 180.372 162.425V161.201H180.338C179.907 162.001 179.032 162.479 177.979 162.479C176.127 162.479 174.883 161.023 174.883 158.761C174.883 156.471 176.113 155.001 178.014 155.001C179.066 155.001 179.928 155.486 180.386 156.307H180.413V155.076H181.849V162.309C181.849 164.079 180.516 165.173 178.376 165.173ZM186.456 156.19C185.39 156.19 184.617 156.97 184.535 158.111H188.302C188.268 156.956 187.536 156.19 186.456 156.19ZM188.295 160.326H189.71C189.498 161.659 188.192 162.589 186.524 162.589C184.371 162.589 183.031 161.14 183.031 158.815C183.031 156.491 184.385 154.98 186.463 154.98C188.5 154.98 189.785 156.396 189.785 158.645V159.164H184.528V159.253C184.528 160.538 185.335 161.386 186.552 161.386C187.413 161.386 188.09 160.976 188.295 160.326Z" fill="#9DA4AE"/>
|
|
9
|
+
</g>
|
|
10
|
+
<defs>
|
|
11
|
+
<clipPath id="clip0_4160_16949">
|
|
12
|
+
<rect x="0.5" y="0.5" width="320" height="189" rx="6" fill="white"/>
|
|
13
|
+
</clipPath>
|
|
14
|
+
<clipPath id="clip1_4160_16949">
|
|
15
|
+
<rect width="184" height="117" fill="white" transform="translate(68.5 16.5)"/>
|
|
16
|
+
</clipPath>
|
|
17
|
+
</defs>
|
|
18
|
+
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { forwardRef } from 'react'
|
|
2
2
|
import Widget from '../index.jsx'
|
|
3
3
|
import { Carousel } from 'antd';
|
|
4
4
|
|
|
@@ -46,7 +46,7 @@ import { Carousel } from 'antd';
|
|
|
46
46
|
*
|
|
47
47
|
* @returns {JSX.Element} The rendered CarouselWidget component
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
const CarouselWidget = forwardRef(({title, children, ...rest}, ref) => {
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Handles carousel slide change events
|
|
@@ -59,11 +59,13 @@ function CarouselWidget({title, children, ...rest}) {
|
|
|
59
59
|
title={title}
|
|
60
60
|
className="with-border-header h-w-btn-header"
|
|
61
61
|
>
|
|
62
|
-
<Carousel {...rest}>
|
|
62
|
+
<Carousel ref={ref} {...rest}>
|
|
63
63
|
{children}
|
|
64
64
|
</Carousel>
|
|
65
65
|
</Widget>
|
|
66
66
|
)
|
|
67
|
-
}
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
CarouselWidget.displayName = 'CarouselWidget';
|
|
68
70
|
|
|
69
71
|
export default CarouselWidget;
|
|
@@ -17,7 +17,23 @@ export default {
|
|
|
17
17
|
argTypes: {
|
|
18
18
|
height: {
|
|
19
19
|
control: { type: 'range', min: 200, max: 600, step: 50 },
|
|
20
|
-
description: 'Height of the carousel images'
|
|
20
|
+
description: 'Height of the carousel images',
|
|
21
|
+
},
|
|
22
|
+
activeDotColor: {
|
|
23
|
+
control: { type: 'color' },
|
|
24
|
+
description: 'Color of the active dot in the carousel',
|
|
25
|
+
},
|
|
26
|
+
inactiveDotColor: {
|
|
27
|
+
control: { type: 'color' },
|
|
28
|
+
description: 'Color of inactive dots in the carousel',
|
|
29
|
+
},
|
|
30
|
+
arrowIconColor: {
|
|
31
|
+
control: { type: 'color' },
|
|
32
|
+
description: 'Default color of arrow icons',
|
|
33
|
+
},
|
|
34
|
+
arrowHoverIconColor: {
|
|
35
|
+
control: { type: 'color' },
|
|
36
|
+
description: 'Color of arrow icons on hover',
|
|
21
37
|
},
|
|
22
38
|
},
|
|
23
39
|
};
|
|
@@ -78,6 +94,7 @@ export const Primary = {
|
|
|
78
94
|
args: {
|
|
79
95
|
title: "Nature Gallery",
|
|
80
96
|
height: 400,
|
|
97
|
+
arrows: true
|
|
81
98
|
},
|
|
82
99
|
};
|
|
83
100
|
|
|
@@ -90,4 +107,69 @@ export const WithFallbacks = {
|
|
|
90
107
|
height={350}
|
|
91
108
|
/>
|
|
92
109
|
),
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const EmptyState = {
|
|
113
|
+
name: "Empty State (No Images)",
|
|
114
|
+
render: (args) => (
|
|
115
|
+
<div>
|
|
116
|
+
<p style={{ marginBottom: '16px', color: '#666' }}>
|
|
117
|
+
<strong>📷 Empty State:</strong> Shows placeholder when no images are provided. Notice how arrows, dots, and preview functionality are automatically disabled.
|
|
118
|
+
</p>
|
|
119
|
+
<ImageCarousel
|
|
120
|
+
title="Empty Gallery"
|
|
121
|
+
images={[]}
|
|
122
|
+
{...args}
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
),
|
|
126
|
+
args: {
|
|
127
|
+
height: 400,
|
|
128
|
+
activeDotColor: "#1890ff",
|
|
129
|
+
inactiveDotColor: "rgba(255, 255, 255, 0.3)"
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const CustomDotColors = {
|
|
134
|
+
name: "Custom Dot Colors",
|
|
135
|
+
render: (args) => (
|
|
136
|
+
<div>
|
|
137
|
+
<p style={{ marginBottom: '16px', color: '#666' }}>
|
|
138
|
+
<strong>🎨 Custom Styling:</strong> Demonstrating custom dot colors with activeDotColor and inactiveDotColor props.
|
|
139
|
+
</p>
|
|
140
|
+
<ImageCarousel
|
|
141
|
+
title="Colorful Gallery"
|
|
142
|
+
images={sampleImages}
|
|
143
|
+
{...args}
|
|
144
|
+
/>
|
|
145
|
+
</div>
|
|
146
|
+
),
|
|
147
|
+
args: {
|
|
148
|
+
height: 400,
|
|
149
|
+
activeDotColor: "#ff4757",
|
|
150
|
+
inactiveDotColor: "rgba(255, 71, 87, 0.2)"
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export const CustomArrowColors = {
|
|
155
|
+
name: "Custom Arrow Colors",
|
|
156
|
+
render: (args) => (
|
|
157
|
+
<div>
|
|
158
|
+
<p style={{ marginBottom: '16px', color: '#666' }}>
|
|
159
|
+
<strong>🎯 Arrow Styling:</strong> Demonstrating custom arrow icon colors with hover effects.
|
|
160
|
+
</p>
|
|
161
|
+
<ImageCarousel
|
|
162
|
+
title="Interactive Arrows"
|
|
163
|
+
images={sampleImages}
|
|
164
|
+
{...args}
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
),
|
|
168
|
+
args: {
|
|
169
|
+
height: 400,
|
|
170
|
+
arrowIconColor: "#333", // Dark gray normally
|
|
171
|
+
arrowHoverIconColor: "#ff6b6b", // Red on hover
|
|
172
|
+
activeDotColor: "#ff6b6b",
|
|
173
|
+
inactiveDotColor: "rgba(255, 107, 107, 0.2)"
|
|
174
|
+
},
|
|
93
175
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Button } from "antd";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
|
|
4
|
+
function CustomArrowButton({
|
|
5
|
+
icon,
|
|
6
|
+
onClick = () => {},
|
|
7
|
+
isLeft = false,
|
|
8
|
+
iconColor = "#666",
|
|
9
|
+
hoverIconColor = "#1890ff"
|
|
10
|
+
}) {
|
|
11
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
12
|
+
|
|
13
|
+
// Clone the icon and add color styling
|
|
14
|
+
const styledIcon = icon && typeof icon === 'object' ?
|
|
15
|
+
{ ...icon, props: { ...icon.props, style: { color: isHovered ? hoverIconColor : iconColor } } } :
|
|
16
|
+
icon;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<Button
|
|
20
|
+
type="default"
|
|
21
|
+
shape="circle"
|
|
22
|
+
icon={styledIcon}
|
|
23
|
+
onClick={onClick}
|
|
24
|
+
style={{
|
|
25
|
+
position: "absolute",
|
|
26
|
+
right: !isLeft ? "40px" : "auto",
|
|
27
|
+
left: !isLeft ? "auto" : "40px",
|
|
28
|
+
top: "58%",
|
|
29
|
+
transform: "translateY(-50%)",
|
|
30
|
+
zIndex: 10,
|
|
31
|
+
backgroundColor: "rgba(255, 255, 255, 0.4)",
|
|
32
|
+
border: "1px solid rgba(0, 0, 0, 0.1)",
|
|
33
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.2)",
|
|
34
|
+
width: "40px",
|
|
35
|
+
height: "40px",
|
|
36
|
+
display: "flex",
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
justifyContent: "center",
|
|
39
|
+
}}
|
|
40
|
+
onMouseEnter={(e) => {
|
|
41
|
+
e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 1)";
|
|
42
|
+
setIsHovered(true);
|
|
43
|
+
}}
|
|
44
|
+
onMouseLeave={(e) => {
|
|
45
|
+
e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.4)";
|
|
46
|
+
setIsHovered(false);
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export default CustomArrowButton
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React, { useState, useRef } from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
2
3
|
import CarouselWidget from "../CarouselWidget/index.jsx";
|
|
3
|
-
import { Image, Carousel } from "antd";
|
|
4
|
+
import { Image, Carousel, Button } from "antd";
|
|
5
|
+
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
|
|
6
|
+
import CustomArrowButton from "./components/CustomArrowButton/index.js";
|
|
7
|
+
import { StyledCarouselWrapper } from "./style.js";
|
|
4
8
|
|
|
5
9
|
/**
|
|
6
10
|
* @typedef {Object} ImageObject
|
|
@@ -36,6 +40,10 @@ import { Image, Carousel } from "antd";
|
|
|
36
40
|
* @param {(string|ImageObject)[]} props.images - Array of image URLs (strings) or image objects with src and alt properties
|
|
37
41
|
* @param {number} [props.height=400] - Height of the carousel images in pixels
|
|
38
42
|
* @param {string} [props.fallback="/assets/images/empty-box.svg"] - Fallback image URL when original image fails to load
|
|
43
|
+
* @param {string} [props.activeDotColor="#1890ff"] - Color of the active dot
|
|
44
|
+
* @param {string} [props.inactiveDotColor="rgba(255, 255, 255, 0.3)"] - Color of inactive dots
|
|
45
|
+
* @param {string} [props.arrowIconColor="#666"] - Default color of arrow icons
|
|
46
|
+
* @param {string} [props.arrowHoverIconColor="#1890ff"] - Color of arrow icons on hover
|
|
39
47
|
* @param {Object} [props.rest] - Additional props passed to the underlying CarouselWidget component
|
|
40
48
|
*
|
|
41
49
|
* @features
|
|
@@ -46,6 +54,8 @@ import { Image, Carousel } from "antd";
|
|
|
46
54
|
* - ✅ Support for both string URLs and image objects with alt text
|
|
47
55
|
* - ✅ Synchronized carousel and preview navigation
|
|
48
56
|
* - ✅ Infinite scrolling in both carousel and preview modes
|
|
57
|
+
* - ✅ Placeholder image for empty image arrays (/assets/images/no-image.svg)
|
|
58
|
+
* - ✅ Customizable dot colors via props
|
|
49
59
|
*
|
|
50
60
|
* @accessibility
|
|
51
61
|
* - Proper alt text support for screen readers
|
|
@@ -58,6 +68,10 @@ function ImageCarousel({
|
|
|
58
68
|
images,
|
|
59
69
|
height = 400,
|
|
60
70
|
fallback = "/assets/images/empty-box.svg",
|
|
71
|
+
activeDotColor = "#1890ff",
|
|
72
|
+
inactiveDotColor = "rgba(255, 255, 255, 0.3)",
|
|
73
|
+
arrowIconColor = "#666",
|
|
74
|
+
arrowHoverIconColor = "#1890ff",
|
|
61
75
|
...rest
|
|
62
76
|
}) {
|
|
63
77
|
const [previewVisible, setPreviewVisible] = useState(false);
|
|
@@ -68,11 +82,33 @@ function ImageCarousel({
|
|
|
68
82
|
setCurrent(index);
|
|
69
83
|
};
|
|
70
84
|
|
|
85
|
+
const goToPrevious = () => {
|
|
86
|
+
carouselRef.current?.prev();
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const goToNext = () => {
|
|
90
|
+
carouselRef.current?.next();
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// Check if images array is empty or invalid
|
|
94
|
+
const hasImages = images && images.length > 0;
|
|
95
|
+
|
|
71
96
|
return (
|
|
72
97
|
<>
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
98
|
+
<StyledCarouselWrapper
|
|
99
|
+
activeDotColor={activeDotColor}
|
|
100
|
+
inactiveDotColor={inactiveDotColor}
|
|
101
|
+
>
|
|
102
|
+
<CarouselWidget
|
|
103
|
+
title={title}
|
|
104
|
+
{...rest}
|
|
105
|
+
arrows={false}
|
|
106
|
+
ref={carouselRef}
|
|
107
|
+
afterChange={handleCarouselChange}
|
|
108
|
+
infinite={hasImages}
|
|
109
|
+
dots={hasImages}
|
|
110
|
+
>
|
|
111
|
+
{hasImages ? images.map((image, index) => {
|
|
76
112
|
const imageSrc = typeof image === "string" ? image : image.src;
|
|
77
113
|
const imageAlt =
|
|
78
114
|
typeof image === "string"
|
|
@@ -98,23 +134,58 @@ function ImageCarousel({
|
|
|
98
134
|
/>
|
|
99
135
|
</div>
|
|
100
136
|
);
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
|
|
137
|
+
}) : (
|
|
138
|
+
// No images - show placeholder
|
|
139
|
+
<div>
|
|
140
|
+
<Image
|
|
141
|
+
src="/assets/images/no-image.svg"
|
|
142
|
+
alt="No images available"
|
|
143
|
+
height={height}
|
|
144
|
+
width="100%"
|
|
145
|
+
fallback={fallback}
|
|
146
|
+
preview={false}
|
|
147
|
+
style={{
|
|
148
|
+
objectFit: "contain",
|
|
149
|
+
}}
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
)}
|
|
153
|
+
</CarouselWidget>
|
|
154
|
+
|
|
155
|
+
{hasImages && images.length > 1 && (
|
|
156
|
+
<>
|
|
157
|
+
<CustomArrowButton
|
|
158
|
+
icon={<LeftOutlined />}
|
|
159
|
+
onClick={goToPrevious}
|
|
160
|
+
isLeft={true}
|
|
161
|
+
iconColor={arrowIconColor}
|
|
162
|
+
hoverIconColor={arrowHoverIconColor}
|
|
163
|
+
/>
|
|
164
|
+
<CustomArrowButton
|
|
165
|
+
icon={<RightOutlined />}
|
|
166
|
+
onClick={goToNext}
|
|
167
|
+
iconColor={arrowIconColor}
|
|
168
|
+
hoverIconColor={arrowHoverIconColor}
|
|
169
|
+
/>
|
|
170
|
+
</>
|
|
171
|
+
)}
|
|
172
|
+
</StyledCarouselWrapper>
|
|
104
173
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
174
|
+
{/* Preview functionality - only show if there are images */}
|
|
175
|
+
{hasImages && (
|
|
176
|
+
<div style={{ display: "none" }}>
|
|
177
|
+
<Image.PreviewGroup
|
|
178
|
+
preview={{
|
|
179
|
+
visible: previewVisible,
|
|
180
|
+
current,
|
|
181
|
+
onVisibleChange: (vis) => setPreviewVisible(vis),
|
|
182
|
+
onChange: (idx) => {
|
|
183
|
+
setCurrent(idx);
|
|
184
|
+
carouselRef.current?.goTo(idx);
|
|
185
|
+
},
|
|
186
|
+
}}
|
|
187
|
+
>
|
|
188
|
+
{images.map((image, index) => {
|
|
118
189
|
const imageSrc = typeof image === "string" ? image : image.src;
|
|
119
190
|
const imageAlt =
|
|
120
191
|
typeof image === "string"
|
|
@@ -122,9 +193,10 @@ function ImageCarousel({
|
|
|
122
193
|
: image.alt;
|
|
123
194
|
|
|
124
195
|
return <Image key={imageSrc} src={imageSrc} alt={imageAlt} />;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
196
|
+
})}
|
|
197
|
+
</Image.PreviewGroup>
|
|
198
|
+
</div>
|
|
199
|
+
)}
|
|
128
200
|
</>
|
|
129
201
|
);
|
|
130
202
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const StyledCarouselWrapper = styled.div`
|
|
4
|
+
position: relative;
|
|
5
|
+
|
|
6
|
+
.ant-carousel .slick-dots li button {
|
|
7
|
+
background: ${props => props.inactiveDotColor} !important;
|
|
8
|
+
opacity: 1 !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ant-carousel .slick-dots li.slick-active button {
|
|
12
|
+
background: ${props => props.activeDotColor} !important;
|
|
13
|
+
opacity: 1 !important;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
@@ -52,7 +52,25 @@ export const BiggerIcons = {
|
|
|
52
52
|
export const ReverseDirection = {
|
|
53
53
|
name: "ReverseDirection",
|
|
54
54
|
args: {
|
|
55
|
-
sdgList: [
|
|
55
|
+
sdgList: [
|
|
56
|
+
"noPoverty",
|
|
57
|
+
"zeroHunger",
|
|
58
|
+
"goodHealthWellbeing",
|
|
59
|
+
"qualityEducation",
|
|
60
|
+
"genderEquality",
|
|
61
|
+
"cleanWaterSanitation",
|
|
62
|
+
"affordableCleanEnergy",
|
|
63
|
+
"decentWorkEconomicGrowth",
|
|
64
|
+
"industryInnovationInfrastructure",
|
|
65
|
+
"reducedInequalities",
|
|
66
|
+
"sustainableCitiesCommunities",
|
|
67
|
+
"responsibleConsumptionProduction",
|
|
68
|
+
"climateAction",
|
|
69
|
+
"lifeBelowWater",
|
|
70
|
+
"lifeOnLand",
|
|
71
|
+
"peaceJusticeStrongInstitutions",
|
|
72
|
+
"partnershipsForGoals",
|
|
73
|
+
],
|
|
56
74
|
reverseDirection: true,
|
|
57
75
|
},
|
|
58
76
|
};
|
package/.env
DELETED
package/.vscode/settings.json
DELETED
|
@@ -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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import ScrollWidget from "./index";
|
|
2
|
-
import ThemeLayout from "../../../ThemeLayout";
|
|
3
|
-
import DashboardLayout from "../../DashboardLayout";
|
|
4
|
-
import ProjectWidget from "../ProjectWidget";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: "Dashboard/Widgets/ScrollWidget",
|
|
8
|
-
component: ScrollWidget,
|
|
9
|
-
tags: ["autodocs"],
|
|
10
|
-
decorators: [
|
|
11
|
-
(Story) => (
|
|
12
|
-
<div style={{ margin: "3em" }}>
|
|
13
|
-
<ThemeLayout>
|
|
14
|
-
<Story />
|
|
15
|
-
</ThemeLayout>
|
|
16
|
-
</div>
|
|
17
|
-
),
|
|
18
|
-
],
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Primary = {
|
|
22
|
-
name: "Scroll Widget",
|
|
23
|
-
args: {
|
|
24
|
-
title: "Scroll Widget Title",
|
|
25
|
-
},
|
|
26
|
-
render: (args) => (
|
|
27
|
-
<DashboardLayout>
|
|
28
|
-
<ScrollWidget {...args}>
|
|
29
|
-
<section className="nowrap">
|
|
30
|
-
<ProjectWidget hideSDGList />
|
|
31
|
-
<ProjectWidget hideSDGList />
|
|
32
|
-
<ProjectWidget hideSDGList />
|
|
33
|
-
<ProjectWidget hideSDGList />
|
|
34
|
-
<ProjectWidget hideSDGList />
|
|
35
|
-
</section>
|
|
36
|
-
</ScrollWidget>
|
|
37
|
-
</DashboardLayout>
|
|
38
|
-
),
|
|
39
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import Widget from "../index.jsx";
|
|
2
|
-
|
|
3
|
-
export default function ScrollWidget({ classname, widgetClassname, children, ...props }) {
|
|
4
|
-
return (
|
|
5
|
-
<Widget className={widgetClassname} {...props}>
|
|
6
|
-
<div
|
|
7
|
-
style={{
|
|
8
|
-
overflowX: "auto",
|
|
9
|
-
overflowY: "hidden",
|
|
10
|
-
width: "100%",
|
|
11
|
-
display: "flex",
|
|
12
|
-
gap: "10px",
|
|
13
|
-
alignItems: "stretch",
|
|
14
|
-
scrollbarWidth: "thin",
|
|
15
|
-
scrollbarColor: "#ccc transparent",
|
|
16
|
-
}}
|
|
17
|
-
>
|
|
18
|
-
{children}
|
|
19
|
-
</div>
|
|
20
|
-
</Widget>
|
|
21
|
-
);
|
|
22
|
-
}
|