ll-package
Version:
2 lines (1 loc) • 1.24 kB
JavaScript
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const $=require("../utils/dateUtil.js"),h=require("../utils/miscUtil.js");function q(I){let{cellPrefixCls:e,generateConfig:t,rangedValue:R,hoverRangedValue:S,isInView:u,isSameCell:a,offsetCell:C,today:y,value:b}=I;function p(n){const s=C(n,-1),g=C(n,1),i=h.getValue(R,0),l=h.getValue(R,1),o=h.getValue(S,0),r=h.getValue(S,1),f=$.isInRange(t,o,r,n);function d(c){return a(i,c)}function v(c){return a(l,c)}const E=a(o,n),V=a(r,n),m=(f||V)&&(!u(s)||v(s)),H=(f||E)&&(!u(g)||d(g));return{[`${e}-in-view`]:u(n),[`${e}-in-range`]:$.isInRange(t,i,l,n),[`${e}-range-start`]:d(n),[`${e}-range-end`]:v(n),[`${e}-range-start-single`]:d(n)&&!l,[`${e}-range-end-single`]:v(n)&&!i,[`${e}-range-start-near-hover`]:d(n)&&(a(s,o)||$.isInRange(t,o,r,s)),[`${e}-range-end-near-hover`]:v(n)&&(a(g,r)||$.isInRange(t,o,r,g)),[`${e}-range-hover`]:f,[`${e}-range-hover-start`]:E,[`${e}-range-hover-end`]:V,[`${e}-range-hover-edge-start`]:m,[`${e}-range-hover-edge-end`]:H,[`${e}-range-hover-edge-start-near-range`]:m&&a(s,l),[`${e}-range-hover-edge-end-near-range`]:H&&a(g,i),[`${e}-today`]:a(y,n),[`${e}-selected`]:a(b,n)}}return p}exports.default=q;
;