"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[2132],{611950:(e,t,n)=>{var r=n(564836),o=n(475263);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.HOOK_MARK=void 0;var i=o(n(667294)),a=r(n(645520));t.HOOK_MARK="RC_FORM_INTERNAL_HOOKS";var l=function(){(0,a.default)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},u=i.createContext({getFieldValue:l,getFieldsValue:l,getFieldError:l,getFieldsError:l,isFieldsTouched:l,isFieldTouched:l,isFieldValidating:l,isFieldsValidating:l,resetFields:l,setFields:l,setFieldsValue:l,validateFields:l,submit:l,getInternalHooks:function(){return l(),{dispatch:l,initEntityValue:l,registerField:l,useSubscribe:l,setInitialValues:l,setCallbacks:l,getFields:l,setValidateMessages:l,setPreserve:l}}});t.default=u},367265:(e,t,n)=>{var r=n(475263).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=o.useRef({});return"value"in r.current&&!n(r.current.condition,t)||(r.current.value=e(),r.current.condition=t),r.current.value};var o=r(n(667294))},564543:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return+setTimeout(e,16)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(n=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var o=0,i=new Map;function a(e){i.delete(e)}var l=function(e){var t=o+=1;return function r(o){if(0===o)a(t),e();else{var l=n((function(){r(o-1)}));i.set(t,l)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};l.cancel=function(e){var t=i.get(e);return a(e),r(t)},t.default=l},475531:(e,t,n)=>{var r=n(564836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.useComposeRef=t.supportRef=t.supportNodeRef=t.getNodeRef=t.fillRef=t.composeRef=void 0;var o=r(n(918698)),i=n(667294),a=n(211805),l=r(n(367265)),u=t.fillRef=function(e,t){"function"==typeof e?e(t):"object"===(0,o.default)(e)&&e&&"current"in e&&(e.current=t)},s=t.composeRef=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);return r.length<=1?r[0]:function(e){t.forEach((function(t){u(t,e)}))}},d=(t.useComposeRef=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,l.default)((function(){return s.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))},t.supportRef=function(e){var t,n,r=(0,a.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render||r.$$typeof===a.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===a.ForwardRef)});function f(e){return(0,i.isValidElement)(e)&&!(0,a.isFragment)(e)}t.supportNodeRef=function(e){return f(e)&&d(e)},t.getNodeRef=Number(i.version.split(".")[0])>=19?function(e){return f(e)?e.props.ref:null}:function(e){return f(e)?e.ref:null}},804591:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(897538);const o=(0,n(751995).iK)(r.Z.Item)`
  ${({theme:e})=>`\n    .ant-form-item-label {\n      padding-bottom: ${e.gridUnit}px;\n      & > label {\n        text-transform: uppercase;\n        font-size: ${e.typography.sizes.s}px;\n        color: ${e.colors.grayscale.base};\n\n        &.ant-form-item-required:not(.ant-form-item-required-mark-optional) {\n          &::before {\n            display: none;\n          }\n          &::after {\n            display: inline-block;\n            color: ${e.colors.error.base};\n            font-size: ${e.typography.sizes.s}px;\n            content: '*';\n          }\n        }\n      }\n    }\n  `}
`},24572:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(355786),o=n(88889),i=n(61988),a=n(667294),l=n(104715),u=n(174448),s=n(135944);function d(e){const{data:t,formData:n,height:d,width:f,setDataMask:c,setHoveredFilter:p,unsetHoveredFilter:v,setFocusedFilter:m,unsetFocusedFilter:g,setFilterActive:h,filterState:F,inputRef:y}=e,{defaultValue:b}=n,[w,R]=(0,a.useState)(null!=b?b:[]),_=e=>{const t=(0,r.Z)(e);R(t);const n={};t.length&&(n.granularity_sqla=t[0]),c({extraFormData:n,filterState:{value:t.length?t:null}})};(0,a.useEffect)((()=>{_(null!=b?b:null)}),[JSON.stringify(b)]),(0,a.useEffect)((()=>{var e;_(null!=(e=F.value)?e:null)}),[JSON.stringify(F.value)]);const M=(t||[]).filter((e=>e.dtype===o.Z.Temporal)),$=0===M.length?(0,i.t)("No time columns"):(0,i.tn)("%s option","%s options",M.length,M.length),O={};F.validateMessage&&(O.extra=(0,s.tZ)(u.Am,{status:F.validateStatus,children:F.validateMessage}));const C=M.map((e=>{const{column_name:t,verbose_name:n}=e;return{label:null!=n?n:t,value:t}}));return(0,s.tZ)(u.un,{height:d,width:f,children:(0,s.tZ)(u.jp,{validateStatus:F.validateStatus,...O,children:(0,s.tZ)(l.Ph,{allowClear:!0,value:w,placeholder:$,onChange:_,onBlur:g,onFocus:m,onMouseEnter:p,onMouseLeave:v,ref:y,options:C,onDropdownVisibleChange:h})})})}},174448:(e,t,n)=>{n.d(t,{Am:()=>u,h2:()=>i,jp:()=>l,un:()=>a});var r=n(751995),o=n(804591);const i=0,a=r.iK.div`
  min-height: ${({height:e})=>e}px;
  width: ${({width:e})=>e===i?"100%":`${e}px`};
`,l=(0,r.iK)(o.Z)`
  &.ant-row.ant-form-item {
    margin: 0;
  }
`,u=r.iK.div`
  color: ${({theme:e,status:t="error"})=>{var n;return null==(n=e.colors[t])?void 0:n.base}};
`}}]);
//# sourceMappingURL=dfcc40a4a852cbb4f60c.chunk.js.map