shineout 3.0.0-alpha.26 → 3.0.0-alpha.28

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/cjs/index.js CHANGED
@@ -456,6 +456,6 @@ exports.TYPE = _TYPE;
456
456
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
457
457
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
458
458
  var _default = {
459
- version: '3.0.0-alpha.26'
459
+ version: '3.0.0-alpha.28'
460
460
  };
461
461
  exports.default = _default;
package/dist/shineout.js CHANGED
@@ -18466,6 +18466,8 @@ var css_jss_esm_css = createCss();
18466
18466
  /* harmony default export */ var css_jss_esm = (css_jss_esm_css);
18467
18467
 
18468
18468
  ;// CONCATENATED MODULE: ../../node_modules/.pnpm/react-jss@10.9.2_react@18.2.0/node_modules/react-jss/dist/react-jss.esm.js
18469
+ "use client";
18470
+
18469
18471
 
18470
18472
 
18471
18473
 
@@ -19118,7 +19120,7 @@ var handleStyle = function handleStyle(style) {
19118
19120
  };
19119
19121
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
19120
19122
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
19121
- /* harmony default export */ var version = ('3.0.0-alpha.26');
19123
+ /* harmony default export */ var version = ('3.0.0-alpha.28');
19122
19124
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
19123
19125
 
19124
19126
 
@@ -22400,8 +22402,10 @@ var formItemStyle = {
22400
22402
  marginRight: esm/* default.formItemMarginXEnd */.ZP.formItemMarginXEnd
22401
22403
  },
22402
22404
  wrapperLabelTop: {
22403
- flexFlow: 'column nowrap',
22404
- alignItems: 'stretch',
22405
+ // flexFlow: 'column nowrap',
22406
+ // alignItems: 'stretch',
22407
+ display: 'block',
22408
+ width: '100%',
22405
22409
  '& $label': {
22406
22410
  textAlign: 'start',
22407
22411
  width: 'auto',
@@ -24263,9 +24267,10 @@ var modalStyle = objectSpread2_default()(objectSpread2_default()({}, animationSt
24263
24267
  },
24264
24268
  body: {
24265
24269
  flex: '1 1 auto',
24266
- minHeight: '1px',
24267
- overflow: 'auto'
24270
+ minHeight: '1px'
24271
+ // overflow: 'auto',
24268
24272
  },
24273
+
24269
24274
  bodyWithIcon: {
24270
24275
  paddingLeft: "calc(".concat(esm/* default.modalHeaderIconMarginEnd */.ZP.modalHeaderIconMarginEnd, " + ").concat(esm/* default.modalHeaderIconSize */.ZP.modalHeaderIconSize, ")")
24271
24276
  },
@@ -31877,7 +31882,9 @@ function useClickAway(params) {
31877
31882
  var onClickAway = params.onClickAway,
31878
31883
  _params$effect = params.effect,
31879
31884
  effect = _params$effect === void 0 ? true : _params$effect,
31880
- t = params.target;
31885
+ t = params.target,
31886
+ _params$event = params.event,
31887
+ event = _params$event === void 0 ? 'click' : _params$event;
31881
31888
  var context = useLatestObj({
31882
31889
  onClickAway: onClickAway
31883
31890
  });
@@ -31896,7 +31903,7 @@ function useClickAway(params) {
31896
31903
  if (effect) {
31897
31904
  // fix 点击绑定事件后会立马触发事件的问题
31898
31905
  setTimeout(function () {
31899
- return document.addEventListener('click',
31906
+ return document.addEventListener(event,
31900
31907
  // @ts-ignore
31901
31908
  handleClickAway, {
31902
31909
  // 解决 点击后立刻删除dom导致获取不到元素; contains(target) 为 false 的问题
@@ -31906,7 +31913,7 @@ function useClickAway(params) {
31906
31913
  }
31907
31914
  return function () {
31908
31915
  // @ts-ignore
31909
- document.removeEventListener('click', handleClickAway);
31916
+ document.removeEventListener(event, handleClickAway);
31910
31917
  };
31911
31918
  }, [effect]);
31912
31919
  }
@@ -32158,7 +32165,8 @@ var usePopup = function usePopup(props) {
32158
32165
  return handleBlur();
32159
32166
  },
32160
32167
  target: context.chain,
32161
- effect: (trigger === 'click' || trigger === 'hover') && open
32168
+ effect: (trigger === 'click' || trigger === 'hover') && open,
32169
+ event: 'mousedown'
32162
32170
  });
32163
32171
  var providerValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
32164
32172
  return {
@@ -44466,7 +44474,8 @@ var useRangePick = function useRangePick(props) {
44466
44474
  newArr[1] = rangeMax;
44467
44475
  }
44468
44476
  } else if (date.getTime() > newArr[1].getTime()) {
44469
- newArr[1] = new Date(date);
44477
+ var a = util.cloneTime(new Date(date), defaultTimeArr[1], 'HH:mm:ss', options);
44478
+ newArr[1] = a.getTime() > date.getTime() ? a : new Date(date);
44470
44479
  }
44471
44480
  }
44472
44481
  if (!noClose) {
@@ -47055,6 +47064,10 @@ EmptyComp.displayName = 'ShineoutEmpty';
47055
47064
 
47056
47065
 
47057
47066
 
47067
+
47068
+ var topPath = {
47069
+ path: ''
47070
+ };
47058
47071
  var Provider = function Provider(props) {
47059
47072
  var children = props.children,
47060
47073
  formConfig = props.formConfig,
@@ -47064,9 +47077,12 @@ var Provider = function Provider(props) {
47064
47077
  value: formFunc,
47065
47078
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(FormBindContext.Provider, {
47066
47079
  value: formValue,
47067
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(FormConfigContext.Provider, {
47068
- value: formConfig,
47069
- children: children
47080
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(fieldset_context.Provider, {
47081
+ value: topPath,
47082
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(FormConfigContext.Provider, {
47083
+ value: formConfig,
47084
+ children: children
47085
+ })
47070
47086
  })
47071
47087
  })
47072
47088
  });
@@ -47123,7 +47139,8 @@ var useForm = function useForm(props) {
47123
47139
  lastValue: props.value || emptyObj,
47124
47140
  resetTime: 0,
47125
47141
  mounted: false,
47126
- unmounted: false
47142
+ unmounted: false,
47143
+ removeLock: false
47127
47144
  }),
47128
47145
  context = _React$useRef.current;
47129
47146
  var update = function update(name) {
@@ -47373,7 +47390,7 @@ var useForm = function useForm(props) {
47373
47390
  delete context.defaultValues[n];
47374
47391
  delete context.updateMap[n];
47375
47392
  context.names.delete(n);
47376
- if (!reserveAble) {
47393
+ if (!reserveAble && !context.removeLock) {
47377
47394
  addRemove(n);
47378
47395
  }
47379
47396
  },
@@ -47449,6 +47466,7 @@ var useForm = function useForm(props) {
47449
47466
 
47450
47467
  // 默认值更新
47451
47468
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
47469
+ context.removeLock = false;
47452
47470
  if (props.value === context.lastValue) return;
47453
47471
  context.value = props.value || emptyObj;
47454
47472
  if (initValidate && !context.resetTime) {
@@ -47471,6 +47489,9 @@ var useForm = function useForm(props) {
47471
47489
  context.unmounted = true;
47472
47490
  };
47473
47491
  }, []);
47492
+ if (props.value !== context.lastValue) {
47493
+ context.removeLock = true;
47494
+ }
47474
47495
  return {
47475
47496
  getFormProps: getFormProps,
47476
47497
  Provider: Provider,
@@ -56392,6 +56413,14 @@ var Sticky = function Sticky(props) {
56392
56413
  } else {
56393
56414
  target.parentNode.insertBefore(context.div, target);
56394
56415
  }
56416
+ var _style4 = window.getComputedStyle(target);
56417
+ if (_style4.position === 'absolute' || _style4.position === 'fixed') {
56418
+ context.div.style.position = _style4.position;
56419
+ context.div.style.top = _style4.top;
56420
+ context.div.style.left = _style4.left;
56421
+ context.div.style.right = _style4.right;
56422
+ context.div.style.bottom = _style4.bottom;
56423
+ }
56395
56424
  if (window.IntersectionObserver) {
56396
56425
  var observer = new IntersectionObserver(handlePosition, {
56397
56426
  root: target,
@@ -64961,7 +64990,7 @@ var upload_interface = __webpack_require__(7818);
64961
64990
 
64962
64991
 
64963
64992
  /* harmony default export */ var src_0 = ({
64964
- version: '3.0.0-alpha.26'
64993
+ version: '3.0.0-alpha.28'
64965
64994
  });
64966
64995
  }();
64967
64996
  /******/ return __webpack_exports__;