@pisell/materials 1.10.9 → 1.10.11

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.
Files changed (67) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/PisellCards/index.d.ts +0 -1
  8. package/es/components/PisellFields/index.d.ts +0 -1
  9. package/es/components/PisellLayouts/index.d.ts +0 -1
  10. package/es/components/PisellMetrics/index.d.ts +0 -1
  11. package/es/components/PisellSuperTabs/PisellSuperTabs.js +13 -4
  12. package/es/components/appVersionControl/types.d.ts +0 -1
  13. package/es/components/calendar/index.d.ts +0 -1
  14. package/es/components/checkbox/index.d.ts +0 -1
  15. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  16. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
  17. package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
  18. package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
  19. package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
  20. package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
  21. package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
  22. package/es/components/date-picker/index.d.ts +0 -1
  23. package/es/components/drag-sort-tree/types.d.ts +0 -1
  24. package/es/components/filter/components/FilterButton/types.d.ts +0 -1
  25. package/es/components/input/index.d.ts +0 -1
  26. package/es/components/pisell-config-provider/context.d.ts +0 -1
  27. package/es/components/pisellDatePicker/index.d.ts +0 -1
  28. package/es/components/pisellGridPro/ToolBar/type.d.ts +0 -1
  29. package/es/components/pisellMenu/types.d.ts +0 -1
  30. package/es/components/pisellQuickFilter/type.d.ts +0 -1
  31. package/es/components/radio/index.d.ts +0 -1
  32. package/es/components/section-footers/index.d.ts +0 -1
  33. package/es/components/skeleton/index.d.ts +0 -1
  34. package/es/components/time-picker/index.d.ts +0 -1
  35. package/es/components/upload/index.d.ts +0 -1
  36. package/es/components/virtual-keyboard/Amount/types.d.ts +0 -1
  37. package/lib/components/PisellCards/index.d.ts +0 -1
  38. package/lib/components/PisellFields/index.d.ts +0 -1
  39. package/lib/components/PisellLayouts/index.d.ts +0 -1
  40. package/lib/components/PisellMetrics/index.d.ts +0 -1
  41. package/lib/components/PisellSuperTabs/PisellSuperTabs.js +13 -4
  42. package/lib/components/appVersionControl/types.d.ts +0 -1
  43. package/lib/components/calendar/index.d.ts +0 -1
  44. package/lib/components/checkbox/index.d.ts +0 -1
  45. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  46. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
  47. package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
  48. package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
  49. package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
  50. package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
  51. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
  52. package/lib/components/date-picker/index.d.ts +0 -1
  53. package/lib/components/drag-sort-tree/types.d.ts +0 -1
  54. package/lib/components/filter/components/FilterButton/types.d.ts +0 -1
  55. package/lib/components/input/index.d.ts +0 -1
  56. package/lib/components/pisell-config-provider/context.d.ts +0 -1
  57. package/lib/components/pisellDatePicker/index.d.ts +0 -1
  58. package/lib/components/pisellGridPro/ToolBar/type.d.ts +0 -1
  59. package/lib/components/pisellMenu/types.d.ts +0 -1
  60. package/lib/components/pisellQuickFilter/type.d.ts +0 -1
  61. package/lib/components/radio/index.d.ts +0 -1
  62. package/lib/components/section-footers/index.d.ts +0 -1
  63. package/lib/components/skeleton/index.d.ts +0 -1
  64. package/lib/components/time-picker/index.d.ts +0 -1
  65. package/lib/components/upload/index.d.ts +0 -1
  66. package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -1
  67. package/package.json +1 -1
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellBasicCardProps } from "./types.js";
3
2
  import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
4
3
  import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellSingleLineTextProps } from "../pisellSingleLineText/types.js";
3
2
  import { PisellLongTextProps } from "../pisellLongText/types.js";
4
3
  import { PisellNumberProps } from "../pisellNumber/types.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
3
2
  import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
4
3
  import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellMetricCardProps } from "../pisellMetricCard/types.js";
3
2
  import { PisellStatisticListProps } from "../pisellStatisticList/index.js";
4
3
  import { PisellStatisticProps } from "../cardMetricItem/index.js";
@@ -33,14 +33,23 @@ const PisellSuperTabs = (props, ref) => {
33
33
  if (!item || !scrollContainer) return;
34
34
  const containerRect = scrollContainer.getBoundingClientRect();
35
35
  const itemRect = item.getBoundingClientRect();
36
+ const containerStyle = window.getComputedStyle(scrollContainer);
37
+ const scrollPaddingLeft = Number.parseFloat(containerStyle.scrollPaddingLeft) || 0;
38
+ const scrollPaddingRight = Number.parseFloat(containerStyle.scrollPaddingRight) || 0;
39
+ const scrollPaddingTop = Number.parseFloat(containerStyle.scrollPaddingTop) || 0;
40
+ const scrollPaddingBottom = Number.parseFloat(containerStyle.scrollPaddingBottom) || 0;
41
+ const visibleLeft = containerRect.left + scrollPaddingLeft;
42
+ const visibleRight = containerRect.right - scrollPaddingRight;
43
+ const visibleTop = containerRect.top + scrollPaddingTop;
44
+ const visibleBottom = containerRect.bottom - scrollPaddingBottom;
36
45
  const canScrollX = scrollContainer.scrollWidth > scrollContainer.clientWidth + 1;
37
46
  const canScrollY = scrollContainer.scrollHeight > scrollContainer.clientHeight + 1;
38
47
  let nextLeft = scrollContainer.scrollLeft;
39
48
  let nextTop = scrollContainer.scrollTop;
40
- if (canScrollX && itemRect.left < containerRect.left) nextLeft -= containerRect.left - itemRect.left;
41
- else if (canScrollX && itemRect.right > containerRect.right) nextLeft += itemRect.right - containerRect.right;
42
- if (canScrollY && itemRect.top < containerRect.top) nextTop -= containerRect.top - itemRect.top;
43
- else if (canScrollY && itemRect.bottom > containerRect.bottom) nextTop += itemRect.bottom - containerRect.bottom;
49
+ if (canScrollX && itemRect.left < visibleLeft) nextLeft -= visibleLeft - itemRect.left;
50
+ else if (canScrollX && itemRect.right > visibleRight) nextLeft += itemRect.right - visibleRight;
51
+ if (canScrollY && itemRect.top < visibleTop) nextTop -= visibleTop - itemRect.top;
52
+ else if (canScrollY && itemRect.bottom > visibleBottom) nextTop += itemRect.bottom - visibleBottom;
44
53
  if (nextLeft === scrollContainer.scrollLeft && nextTop === scrollContainer.scrollTop) return;
45
54
  scrollContainer.scrollTo({
46
55
  left: nextLeft,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  //#region src/components/appVersionControl/types.d.ts
3
2
  interface Version {
4
3
  id: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/calendar/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/checkbox/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LocalSettingsType } from "../../table/types.js";
3
2
  import { DataSourceType } from "../provider/dataSource/DataSourceContext.js";
4
3
  import { ColumnType } from "antd/es/table";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CheckboxGroupProps } from "./type.js";
3
2
  import { WithModeProps } from "../../dataSourceForm/utils.js";
4
3
  import * as _$react from "react";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WithModeProps } from "../../dataSourceForm/utils.js";
3
2
  import { RadioGroupProps } from "./type.js";
4
3
  import * as _$react from "react";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WithFormItemProps, WithModeProps } from "../../dataSourceForm/utils.js";
3
2
  import { TabsProps } from "./type.js";
4
3
  import * as _$react from "react";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ModeType } from "../../dataSourceForm/type.js";
3
2
 
4
3
  //#region src/components/dataSourceComponents/fields/Translation/type.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionsItem } from "../../dataSourceForm/serve.js";
3
2
  import { Result } from "ahooks/es/useRequest/src/types";
4
3
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/date-picker/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  //#region src/components/drag-sort-tree/types.d.ts
3
2
  type IdType = string | number;
4
3
  type ValueProps = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterItemProps } from "../../types.js";
3
2
 
4
3
  //#region src/components/filter/components/FilterButton/types.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
  import { InputProps, InputRef } from "antd";
4
3
  import * as _$antd_es_input0 from "antd/es/input";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/pisell-config-provider/context.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/pisellDatePicker/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  //#region src/components/pisellGridPro/ToolBar/type.d.ts
3
2
  interface ToolBarProps {
4
3
  className?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuProps } from "antd";
3
2
 
4
3
  //#region src/components/pisellMenu/types.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterItemProps } from "../filter/types.js";
3
2
  import { FormInstance } from "antd";
4
3
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/radio/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/section-footers/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/skeleton/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/time-picker/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/upload/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BaseNumberKeyboardProps } from "../BaseNumberKeyboard/index.js";
3
2
 
4
3
  //#region src/components/virtual-keyboard/Amount/types.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellBasicCardProps } from "./types.js";
3
2
  import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
4
3
  import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellSingleLineTextProps } from "../pisellSingleLineText/types.js";
3
2
  import { PisellLongTextProps } from "../pisellLongText/types.js";
4
3
  import { PisellNumberProps } from "../pisellNumber/types.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
3
2
  import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
4
3
  import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellMetricCardProps } from "../pisellMetricCard/types.js";
3
2
  import { PisellStatisticListProps } from "../pisellStatisticList/index.js";
4
3
  import { PisellStatisticProps } from "../cardMetricItem/index.js";
@@ -36,14 +36,23 @@ const PisellSuperTabs = (props, ref) => {
36
36
  if (!item || !scrollContainer) return;
37
37
  const containerRect = scrollContainer.getBoundingClientRect();
38
38
  const itemRect = item.getBoundingClientRect();
39
+ const containerStyle = window.getComputedStyle(scrollContainer);
40
+ const scrollPaddingLeft = Number.parseFloat(containerStyle.scrollPaddingLeft) || 0;
41
+ const scrollPaddingRight = Number.parseFloat(containerStyle.scrollPaddingRight) || 0;
42
+ const scrollPaddingTop = Number.parseFloat(containerStyle.scrollPaddingTop) || 0;
43
+ const scrollPaddingBottom = Number.parseFloat(containerStyle.scrollPaddingBottom) || 0;
44
+ const visibleLeft = containerRect.left + scrollPaddingLeft;
45
+ const visibleRight = containerRect.right - scrollPaddingRight;
46
+ const visibleTop = containerRect.top + scrollPaddingTop;
47
+ const visibleBottom = containerRect.bottom - scrollPaddingBottom;
39
48
  const canScrollX = scrollContainer.scrollWidth > scrollContainer.clientWidth + 1;
40
49
  const canScrollY = scrollContainer.scrollHeight > scrollContainer.clientHeight + 1;
41
50
  let nextLeft = scrollContainer.scrollLeft;
42
51
  let nextTop = scrollContainer.scrollTop;
43
- if (canScrollX && itemRect.left < containerRect.left) nextLeft -= containerRect.left - itemRect.left;
44
- else if (canScrollX && itemRect.right > containerRect.right) nextLeft += itemRect.right - containerRect.right;
45
- if (canScrollY && itemRect.top < containerRect.top) nextTop -= containerRect.top - itemRect.top;
46
- else if (canScrollY && itemRect.bottom > containerRect.bottom) nextTop += itemRect.bottom - containerRect.bottom;
52
+ if (canScrollX && itemRect.left < visibleLeft) nextLeft -= visibleLeft - itemRect.left;
53
+ else if (canScrollX && itemRect.right > visibleRight) nextLeft += itemRect.right - visibleRight;
54
+ if (canScrollY && itemRect.top < visibleTop) nextTop -= visibleTop - itemRect.top;
55
+ else if (canScrollY && itemRect.bottom > visibleBottom) nextTop += itemRect.bottom - visibleBottom;
47
56
  if (nextLeft === scrollContainer.scrollLeft && nextTop === scrollContainer.scrollTop) return;
48
57
  scrollContainer.scrollTo({
49
58
  left: nextLeft,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  //#region src/components/appVersionControl/types.d.ts
3
2
  interface Version {
4
3
  id: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/calendar/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/checkbox/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LocalSettingsType } from "../../table/types.js";
3
2
  import { DataSourceType } from "../provider/dataSource/DataSourceContext.js";
4
3
  import { ColumnType } from "antd/es/table";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CheckboxGroupProps } from "./type.js";
3
2
  import { WithModeProps } from "../../dataSourceForm/utils.js";
4
3
  import * as _$react from "react";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WithModeProps } from "../../dataSourceForm/utils.js";
3
2
  import { RadioGroupProps } from "./type.js";
4
3
  import * as _$react from "react";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WithFormItemProps, WithModeProps } from "../../dataSourceForm/utils.js";
3
2
  import { TabsProps } from "./type.js";
4
3
  import * as _$react from "react";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ModeType } from "../../dataSourceForm/type.js";
3
2
 
4
3
  //#region src/components/dataSourceComponents/fields/Translation/type.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionsItem } from "../../dataSourceForm/serve.js";
3
2
  import { Result } from "ahooks/es/useRequest/src/types";
4
3
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/date-picker/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  //#region src/components/drag-sort-tree/types.d.ts
3
2
  type IdType = string | number;
4
3
  type ValueProps = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterItemProps } from "../../types.js";
3
2
 
4
3
  //#region src/components/filter/components/FilterButton/types.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
  import { InputProps, InputRef } from "antd";
4
3
  import * as _$antd_es_input0 from "antd/es/input";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/pisell-config-provider/context.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/pisellDatePicker/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  //#region src/components/pisellGridPro/ToolBar/type.d.ts
3
2
  interface ToolBarProps {
4
3
  className?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuProps } from "antd";
3
2
 
4
3
  //#region src/components/pisellMenu/types.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterItemProps } from "../filter/types.js";
3
2
  import { FormInstance } from "antd";
4
3
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/radio/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/section-footers/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/skeleton/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/time-picker/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/upload/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BaseNumberKeyboardProps } from "../BaseNumberKeyboard/index.js";
3
2
 
4
3
  //#region src/components/virtual-keyboard/Amount/types.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.10.9",
3
+ "version": "1.10.11",
4
4
  "scripts": {
5
5
  "dev:tailwind-css": "tailwindcss -c ./tailwind.materials.config.cjs --postcss ./postcss.materials-tailwind.cjs -i ./src/tailwind-input.css -o ./src/pisell-materials.tw.css --watch",
6
6
  "build:tailwind-css:once": "tailwindcss -c ./tailwind.materials.config.cjs --postcss ./postcss.materials-tailwind.cjs -i ./src/tailwind-input.css -o ./src/pisell-materials.tw.css",