@pisell/materials 6.11.275 → 6.11.276

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 (86) 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 +1 -0
  8. package/es/components/PisellFields/index.d.ts +1 -0
  9. package/es/components/PisellFields/index.js +0 -11
  10. package/es/components/PisellLayouts/index.d.ts +1 -0
  11. package/es/components/PisellMetrics/index.d.ts +1 -0
  12. package/es/components/PisellSelectionFlow/PisellSelectionFlow.js +13 -4
  13. package/es/components/PisellSelectionFlow/types.d.ts +2 -0
  14. package/es/components/appVersionControl/types.d.ts +1 -0
  15. package/es/components/calendar/index.d.ts +1 -0
  16. package/es/components/checkbox/index.d.ts +1 -0
  17. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  18. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
  19. package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +1 -0
  20. package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +1 -0
  21. package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
  22. package/es/components/dataSourceComponents/fields/Translation/type.d.ts +1 -0
  23. package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +1 -0
  24. package/es/components/date-picker/index.d.ts +1 -0
  25. package/es/components/drag-sort-tree/types.d.ts +1 -0
  26. package/es/components/filter/components/FilterButton/types.d.ts +1 -0
  27. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +0 -2
  28. package/es/components/filter/components/FilterItem/index.js +0 -11
  29. package/es/components/input/index.d.ts +1 -0
  30. package/es/components/pisell-config-provider/context.d.ts +1 -0
  31. package/es/components/pisellDatePicker/index.d.ts +1 -0
  32. package/es/components/pisellGridPro/ToolBar/type.d.ts +1 -0
  33. package/es/components/pisellMenu/types.d.ts +1 -0
  34. package/es/components/pisellQuickFilter/type.d.ts +1 -0
  35. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +0 -2
  36. package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +0 -11
  37. package/es/components/radio/index.d.ts +1 -0
  38. package/es/components/section-footers/index.d.ts +1 -0
  39. package/es/components/skeleton/index.d.ts +1 -0
  40. package/es/components/time-picker/index.d.ts +1 -0
  41. package/es/components/upload/index.d.ts +1 -0
  42. package/es/components/virtual-keyboard/Amount/types.d.ts +1 -0
  43. package/es/index.js +0 -11
  44. package/lib/components/PisellCards/index.d.ts +1 -0
  45. package/lib/components/PisellFields/index.d.ts +1 -0
  46. package/lib/components/PisellLayouts/index.d.ts +1 -0
  47. package/lib/components/PisellMetrics/index.d.ts +1 -0
  48. package/lib/components/PisellSelectionFlow/PisellSelectionFlow.js +13 -4
  49. package/lib/components/PisellSelectionFlow/types.d.ts +2 -0
  50. package/lib/components/appVersionControl/types.d.ts +1 -0
  51. package/lib/components/calendar/index.d.ts +1 -0
  52. package/lib/components/checkbox/index.d.ts +1 -0
  53. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  54. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
  55. package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +1 -0
  56. package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +1 -0
  57. package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
  58. package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +1 -0
  59. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +1 -0
  60. package/lib/components/date-picker/index.d.ts +1 -0
  61. package/lib/components/drag-sort-tree/types.d.ts +1 -0
  62. package/lib/components/filter/components/FilterButton/types.d.ts +1 -0
  63. package/lib/components/input/index.d.ts +1 -0
  64. package/lib/components/pisell-config-provider/context.d.ts +1 -0
  65. package/lib/components/pisellDatePicker/index.d.ts +1 -0
  66. package/lib/components/pisellGridPro/ToolBar/type.d.ts +1 -0
  67. package/lib/components/pisellMenu/types.d.ts +1 -0
  68. package/lib/components/pisellQuickFilter/type.d.ts +1 -0
  69. package/lib/components/radio/index.d.ts +1 -0
  70. package/lib/components/section-footers/index.d.ts +1 -0
  71. package/lib/components/skeleton/index.d.ts +1 -0
  72. package/lib/components/time-picker/index.d.ts +1 -0
  73. package/lib/components/upload/index.d.ts +1 -0
  74. package/lib/components/virtual-keyboard/Amount/types.d.ts +1 -0
  75. package/package.json +3 -3
  76. package/es/components/pisellCurrency/index.js +0 -13
  77. package/es/components/pisellEmail/index.js +0 -13
  78. package/es/components/pisellLongText/index.js +0 -13
  79. package/es/components/pisellMultipleSelect/index.js +0 -13
  80. package/es/components/pisellNumber/index.js +0 -13
  81. package/es/components/pisellPercent/index.js +0 -13
  82. package/es/components/pisellPhone/index.js +0 -14
  83. package/es/components/pisellRating/index.js +0 -13
  84. package/es/components/pisellSingleLineText/index.js +0 -13
  85. package/es/components/pisellSingleSelect/index.js +0 -13
  86. package/es/components/pisellUrl/index.js +0 -13
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellBasicCardProps } from "./types.js";
2
3
  import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
3
4
  import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellSingleLineTextProps } from "../pisellSingleLineText/types.js";
2
3
  import { PisellLongTextProps } from "../pisellLongText/types.js";
3
4
  import { PisellNumberProps } from "../pisellNumber/types.js";
@@ -1,25 +1,14 @@
1
1
  import PisellSingleLineText_default from "../pisellSingleLineText/PisellSingleLineText.js";
2
- import "../pisellSingleLineText/index.js";
3
2
  import PisellLongText_default from "../pisellLongText/PisellLongText.js";
4
- import "../pisellLongText/index.js";
5
3
  import MemoizedPisellNumber from "../pisellNumber/PisellNumber.js";
6
- import "../pisellNumber/index.js";
7
4
  import MemoizedPisellCurrency from "../pisellCurrency/PisellCurrency.js";
8
- import "../pisellCurrency/index.js";
9
5
  import MemoizedPisellPercent from "../pisellPercent/PisellPercent.js";
10
- import "../pisellPercent/index.js";
11
6
  import PisellPhone_default from "../pisellPhone/PisellPhone.js";
12
- import "../pisellPhone/index.js";
13
7
  import PisellEmail_default from "../pisellEmail/PisellEmail.js";
14
- import "../pisellEmail/index.js";
15
8
  import PisellUrl_default from "../pisellUrl/PisellUrl.js";
16
- import "../pisellUrl/index.js";
17
9
  import PisellRating_default from "../pisellRating/PisellRating.js";
18
- import "../pisellRating/index.js";
19
10
  import PisellSingleSelect from "../pisellSingleSelect/PisellSingleSelect.js";
20
- import "../pisellSingleSelect/index.js";
21
11
  import PisellMultipleSelect from "../pisellMultipleSelect/PisellMultipleSelect.js";
22
- import "../pisellMultipleSelect/index.js";
23
12
  //#region src/components/PisellFields/index.tsx
24
13
  /**
25
14
  * PisellFields 命名空间
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
2
3
  import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
3
4
  import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellMetricCardProps } from "../pisellMetricCard/types.js";
2
3
  import { PisellStatisticListProps } from "../pisellStatisticList/index.js";
3
4
  import { PisellStatisticProps } from "../cardMetricItem/index.js";
@@ -15,7 +15,7 @@ const createUnexpectedCompileError = (error) => {
15
15
  message: `Selection flow compilation failed: ${getSelectionFlowErrorMessage(error)}`
16
16
  }]);
17
17
  };
18
- const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialStepIndex = 0, preparePresentation = false, onPresentationReady, hostContext, services, children, onDraftChange, onStepChange, onCompiledStepsChange, onValidationFailed, onConfigurationError, onComplete }, ref) => {
18
+ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialStepIndex = 0, preparePresentation = false, resolveInitialStepIndex, onPresentationReady, hostContext, services, children, onDraftChange, onStepChange, onCompiledStepsChange, onValidationFailed, onConfigurationError, onComplete }, ref) => {
19
19
  const mountedRef = useRef(true);
20
20
  const flowGenerationRef = useRef(1);
21
21
  const draftRevisionRef = useRef(0);
@@ -29,6 +29,8 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
29
29
  const presentationTaskRef = useRef(null);
30
30
  const onPresentationReadyRef = useRef(onPresentationReady);
31
31
  onPresentationReadyRef.current = onPresentationReady;
32
+ const resolveInitialStepIndexRef = useRef(resolveInitialStepIndex);
33
+ resolveInitialStepIndexRef.current = resolveInitialStepIndex;
32
34
  const processDraftChangeRef = useRef(() => void 0);
33
35
  const onDraftChangeRef = useRef(onDraftChange);
34
36
  onDraftChangeRef.current = onDraftChange;
@@ -362,7 +364,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
362
364
  const generation = flowGenerationRef.current;
363
365
  const isCurrent = () => mountedRef.current && flowGenerationRef.current === generation;
364
366
  const task = _asyncToGenerator(function* () {
365
- var _firstVisible$index, _compiledStepsRef$cur, _onPresentationReadyR2;
367
+ var _visibleSteps$0$index, _visibleSteps$, _compiledStepsRef$cur, _onPresentationReadyR2;
366
368
  const modules = compiledStepsRef.current.flatMap((step) => step.modules);
367
369
  for (let pass = 0; pass <= modules.length; pass += 1) {
368
370
  for (const module of modules) {
@@ -394,8 +396,15 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
394
396
  }).map((module) => module.key);
395
397
  automaticModuleKeysRef.current = automatic;
396
398
  setAutomaticModuleKeys(automatic);
397
- const firstVisible = compiledStepsRef.current.find((step) => step.modules.some((module) => !automatic.includes(module.key)));
398
- const initialIndex = (_firstVisible$index = firstVisible === null || firstVisible === void 0 ? void 0 : firstVisible.index) !== null && _firstVisible$index !== void 0 ? _firstVisible$index : Math.max(0, compiledStepsRef.current.length - 1);
399
+ const visibleSteps = compiledStepsRef.current.filter((step) => step.modules.some((module) => !automatic.includes(module.key)));
400
+ let initialIndex = (_visibleSteps$0$index = (_visibleSteps$ = visibleSteps[0]) === null || _visibleSteps$ === void 0 ? void 0 : _visibleSteps$.index) !== null && _visibleSteps$0$index !== void 0 ? _visibleSteps$0$index : Math.max(0, compiledStepsRef.current.length - 1);
401
+ try {
402
+ var _resolveInitialStepIn;
403
+ const context = getFreshContext();
404
+ const requestedIndex = context && ((_resolveInitialStepIn = resolveInitialStepIndexRef.current) === null || _resolveInitialStepIn === void 0 ? void 0 : _resolveInitialStepIn.call(resolveInitialStepIndexRef, context));
405
+ const requestedStep = visibleSteps.find((step) => step.index === requestedIndex);
406
+ if (requestedStep) initialIndex = requestedStep.index;
407
+ } catch (_unused2) {}
399
408
  currentStepIndexRef.current = initialIndex;
400
409
  currentStepKeyRef.current = (_compiledStepsRef$cur = compiledStepsRef.current[initialIndex]) === null || _compiledStepsRef$cur === void 0 ? void 0 : _compiledStepsRef$cur.key;
401
410
  setCurrentStepIndex(initialIndex);
@@ -188,6 +188,8 @@ interface PisellSelectionFlowProps<TDraft, TDraftUpdate, TField extends string,
188
188
  initialStepIndex?: number;
189
189
  /** Resolve a stable presentation before mounting interactive module components. */
190
190
  preparePresentation?: boolean;
191
+ /** Choose the entry step from prepared defaults without hiding earlier steps. */
192
+ resolveInitialStepIndex?: (context: SelectionFlowContextValue<TDraft, TDraftUpdate, TField, TModuleType, TServices, THostContext>) => number | undefined;
191
193
  onPresentationReady?: (automaticModuleKeys: readonly string[]) => void;
192
194
  hostContext?: THostContext;
193
195
  services: TServices;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  //#region src/components/appVersionControl/types.d.ts
2
3
  interface Version {
3
4
  id: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/calendar/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/checkbox/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { LocalSettingsType } from "../../table/types.js";
2
3
  import { DataSourceType } from "../provider/dataSource/DataSourceContext.js";
3
4
  import { ColumnType } from "antd/es/table";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CheckboxGroupProps } from "./type.js";
2
3
  import { WithModeProps } from "../../dataSourceForm/utils.js";
3
4
  import * as _$react from "react";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { WithModeProps } from "../../dataSourceForm/utils.js";
2
3
  import { RadioGroupProps } from "./type.js";
3
4
  import * as _$react from "react";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { WithFormItemProps, WithModeProps } from "../../dataSourceForm/utils.js";
2
3
  import { TabsProps } from "./type.js";
3
4
  import * as _$react from "react";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ModeType } from "../../dataSourceForm/type.js";
2
3
 
3
4
  //#region src/components/dataSourceComponents/fields/Translation/type.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionsItem } from "../../dataSourceForm/serve.js";
2
3
  import { Result } from "ahooks/es/useRequest/src/types";
3
4
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/date-picker/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  //#region src/components/drag-sort-tree/types.d.ts
2
3
  type IdType = string | number;
3
4
  type ValueProps = {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FilterItemProps } from "../../types.js";
2
3
 
3
4
  //#region src/components/filter/components/FilterButton/types.d.ts
@@ -1,9 +1,7 @@
1
1
  import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
2
2
  import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
3
3
  import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
4
- import "../../../pisellSingleSelect/index.js";
5
4
  import PisellMultipleSelect from "../../../pisellMultipleSelect/PisellMultipleSelect.js";
6
- import "../../../pisellMultipleSelect/index.js";
7
5
  import React, { useEffect, useState } from "react";
8
6
  import { Spin } from "antd";
9
7
  //#region src/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.tsx
@@ -1,28 +1,17 @@
1
1
  import { getText } from "../../../../locales/index.js";
2
2
  import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
3
3
  import PisellSingleLineText_default from "../../../pisellSingleLineText/PisellSingleLineText.js";
4
- import "../../../pisellSingleLineText/index.js";
5
4
  import PisellLongText_default from "../../../pisellLongText/PisellLongText.js";
6
- import "../../../pisellLongText/index.js";
7
5
  import MemoizedPisellNumber from "../../../pisellNumber/PisellNumber.js";
8
- import "../../../pisellNumber/index.js";
9
6
  import MemoizedPisellCurrency from "../../../pisellCurrency/PisellCurrency.js";
10
- import "../../../pisellCurrency/index.js";
11
7
  import MemoizedPisellPercent from "../../../pisellPercent/PisellPercent.js";
12
- import "../../../pisellPercent/index.js";
13
8
  import PisellPhone_default from "../../../pisellPhone/PisellPhone.js";
14
- import "../../../pisellPhone/index.js";
15
9
  import PisellEmail_default from "../../../pisellEmail/PisellEmail.js";
16
- import "../../../pisellEmail/index.js";
17
10
  import PisellUrl_default from "../../../pisellUrl/PisellUrl.js";
18
- import "../../../pisellUrl/index.js";
19
11
  import PisellRating_default from "../../../pisellRating/PisellRating.js";
20
- import "../../../pisellRating/index.js";
21
12
  import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
22
13
  import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
23
- import "../../../pisellSingleSelect/index.js";
24
14
  import PisellMultipleSelect from "../../../pisellMultipleSelect/PisellMultipleSelect.js";
25
- import "../../../pisellMultipleSelect/index.js";
26
15
  import { fieldMaps } from "../../../table/Table/fields/index.js";
27
16
  import { PisellMobileDateRangePicker } from "../../../pisellMobileDateRangePicker/PisellMobileDateRangePicker.js";
28
17
  import AsyncOptionsSelectWrapper from "./AsyncOptionsSelectWrapper.js";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
  import { InputProps, InputRef } from "antd";
3
4
  import * as _$antd_es_input0 from "antd/es/input";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/pisell-config-provider/context.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/pisellDatePicker/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  //#region src/components/pisellGridPro/ToolBar/type.d.ts
2
3
  interface ToolBarProps {
3
4
  className?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MenuProps } from "antd";
2
3
 
3
4
  //#region src/components/pisellMenu/types.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FilterItemProps } from "../filter/types.js";
2
3
  import { FormInstance } from "antd";
3
4
 
@@ -1,8 +1,6 @@
1
1
  import { getText } from "../../../../locales/index.js";
2
2
  import MemoizedPisellNumber from "../../../pisellNumber/PisellNumber.js";
3
- import "../../../pisellNumber/index.js";
4
3
  import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
5
- import "../../../pisellSingleSelect/index.js";
6
4
  import React from "react";
7
5
  //#region src/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.tsx
8
6
  /** 控制台「资源 / 布局」分页:预设、自定义行列、翻页停留、主文案宽度 */
@@ -1,27 +1,16 @@
1
1
  import { getText } from "../../../locales/index.js";
2
2
  import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
3
3
  import PisellSingleLineText_default from "../../pisellSingleLineText/PisellSingleLineText.js";
4
- import "../../pisellSingleLineText/index.js";
5
4
  import PisellLongText_default from "../../pisellLongText/PisellLongText.js";
6
- import "../../pisellLongText/index.js";
7
5
  import MemoizedPisellNumber from "../../pisellNumber/PisellNumber.js";
8
- import "../../pisellNumber/index.js";
9
6
  import MemoizedPisellCurrency from "../../pisellCurrency/PisellCurrency.js";
10
- import "../../pisellCurrency/index.js";
11
7
  import MemoizedPisellPercent from "../../pisellPercent/PisellPercent.js";
12
- import "../../pisellPercent/index.js";
13
8
  import PisellPhone_default from "../../pisellPhone/PisellPhone.js";
14
- import "../../pisellPhone/index.js";
15
9
  import PisellEmail_default from "../../pisellEmail/PisellEmail.js";
16
- import "../../pisellEmail/index.js";
17
10
  import PisellUrl_default from "../../pisellUrl/PisellUrl.js";
18
- import "../../pisellUrl/index.js";
19
11
  import PisellRating_default from "../../pisellRating/PisellRating.js";
20
- import "../../pisellRating/index.js";
21
12
  import PisellSingleSelect from "../../pisellSingleSelect/PisellSingleSelect.js";
22
- import "../../pisellSingleSelect/index.js";
23
13
  import PisellMultipleSelect from "../../pisellMultipleSelect/PisellMultipleSelect.js";
24
- import "../../pisellMultipleSelect/index.js";
25
14
  import PisellDateTimeDisplay_default from "../../pisellDateTimeDisplay/PisellDateTimeDisplay.js";
26
15
  import React, { useEffect, useState } from "react";
27
16
  //#region src/components/pisellRecordBoard/utils/recordBoardColumns.tsx
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/radio/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/section-footers/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/skeleton/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/time-picker/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/upload/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BaseNumberKeyboardProps } from "../BaseNumberKeyboard/index.js";
2
3
 
3
4
  //#region src/components/virtual-keyboard/Amount/types.d.ts
package/es/index.js CHANGED
@@ -1,26 +1,15 @@
1
1
  import PisellContext, { globalConfig } from "./components/pisell-config-provider/context.js";
2
2
  import PisellSingleLineText_default from "./components/pisellSingleLineText/PisellSingleLineText.js";
3
- import "./components/pisellSingleLineText/index.js";
4
3
  import PisellLongText_default from "./components/pisellLongText/PisellLongText.js";
5
- import "./components/pisellLongText/index.js";
6
4
  import MemoizedPisellNumber from "./components/pisellNumber/PisellNumber.js";
7
- import "./components/pisellNumber/index.js";
8
5
  import MemoizedPisellCurrency from "./components/pisellCurrency/PisellCurrency.js";
9
- import "./components/pisellCurrency/index.js";
10
6
  import MemoizedPisellPercent from "./components/pisellPercent/PisellPercent.js";
11
- import "./components/pisellPercent/index.js";
12
7
  import PisellPhone_default from "./components/pisellPhone/PisellPhone.js";
13
- import "./components/pisellPhone/index.js";
14
8
  import PisellEmail_default from "./components/pisellEmail/PisellEmail.js";
15
- import "./components/pisellEmail/index.js";
16
9
  import PisellUrl_default from "./components/pisellUrl/PisellUrl.js";
17
- import "./components/pisellUrl/index.js";
18
10
  import PisellRating_default from "./components/pisellRating/PisellRating.js";
19
- import "./components/pisellRating/index.js";
20
11
  import PisellSingleSelect from "./components/pisellSingleSelect/PisellSingleSelect.js";
21
- import "./components/pisellSingleSelect/index.js";
22
12
  import PisellMultipleSelect from "./components/pisellMultipleSelect/PisellMultipleSelect.js";
23
- import "./components/pisellMultipleSelect/index.js";
24
13
  import PisellFields from "./components/PisellFields/index.js";
25
14
  import PisellCard from "./components/pisellCard/index.js";
26
15
  import PisellMetricCard from "./components/pisellMetricCard/PisellMetricCard.js";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellBasicCardProps } from "./types.js";
2
3
  import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
3
4
  import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellSingleLineTextProps } from "../pisellSingleLineText/types.js";
2
3
  import { PisellLongTextProps } from "../pisellLongText/types.js";
3
4
  import { PisellNumberProps } from "../pisellNumber/types.js";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
2
3
  import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
3
4
  import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellMetricCardProps } from "../pisellMetricCard/types.js";
2
3
  import { PisellStatisticListProps } from "../pisellStatisticList/index.js";
3
4
  import { PisellStatisticProps } from "../cardMetricItem/index.js";
@@ -17,7 +17,7 @@ const createUnexpectedCompileError = (error) => {
17
17
  message: `Selection flow compilation failed: ${require_utils.getSelectionFlowErrorMessage(error)}`
18
18
  }]);
19
19
  };
20
- const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialStepIndex = 0, preparePresentation = false, onPresentationReady, hostContext, services, children, onDraftChange, onStepChange, onCompiledStepsChange, onValidationFailed, onConfigurationError, onComplete }, ref) => {
20
+ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialStepIndex = 0, preparePresentation = false, resolveInitialStepIndex, onPresentationReady, hostContext, services, children, onDraftChange, onStepChange, onCompiledStepsChange, onValidationFailed, onConfigurationError, onComplete }, ref) => {
21
21
  const mountedRef = (0, react.useRef)(true);
22
22
  const flowGenerationRef = (0, react.useRef)(1);
23
23
  const draftRevisionRef = (0, react.useRef)(0);
@@ -31,6 +31,8 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
31
31
  const presentationTaskRef = (0, react.useRef)(null);
32
32
  const onPresentationReadyRef = (0, react.useRef)(onPresentationReady);
33
33
  onPresentationReadyRef.current = onPresentationReady;
34
+ const resolveInitialStepIndexRef = (0, react.useRef)(resolveInitialStepIndex);
35
+ resolveInitialStepIndexRef.current = resolveInitialStepIndex;
34
36
  const processDraftChangeRef = (0, react.useRef)(() => void 0);
35
37
  const onDraftChangeRef = (0, react.useRef)(onDraftChange);
36
38
  onDraftChangeRef.current = onDraftChange;
@@ -364,7 +366,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
364
366
  const generation = flowGenerationRef.current;
365
367
  const isCurrent = () => mountedRef.current && flowGenerationRef.current === generation;
366
368
  const task = require_asyncToGenerator._asyncToGenerator(function* () {
367
- var _firstVisible$index, _compiledStepsRef$cur, _onPresentationReadyR2;
369
+ var _visibleSteps$0$index, _visibleSteps$, _compiledStepsRef$cur, _onPresentationReadyR2;
368
370
  const modules = compiledStepsRef.current.flatMap((step) => step.modules);
369
371
  for (let pass = 0; pass <= modules.length; pass += 1) {
370
372
  for (const module of modules) {
@@ -396,8 +398,15 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
396
398
  }).map((module) => module.key);
397
399
  automaticModuleKeysRef.current = automatic;
398
400
  setAutomaticModuleKeys(automatic);
399
- const firstVisible = compiledStepsRef.current.find((step) => step.modules.some((module) => !automatic.includes(module.key)));
400
- const initialIndex = (_firstVisible$index = firstVisible === null || firstVisible === void 0 ? void 0 : firstVisible.index) !== null && _firstVisible$index !== void 0 ? _firstVisible$index : Math.max(0, compiledStepsRef.current.length - 1);
401
+ const visibleSteps = compiledStepsRef.current.filter((step) => step.modules.some((module) => !automatic.includes(module.key)));
402
+ let initialIndex = (_visibleSteps$0$index = (_visibleSteps$ = visibleSteps[0]) === null || _visibleSteps$ === void 0 ? void 0 : _visibleSteps$.index) !== null && _visibleSteps$0$index !== void 0 ? _visibleSteps$0$index : Math.max(0, compiledStepsRef.current.length - 1);
403
+ try {
404
+ var _resolveInitialStepIn;
405
+ const context = getFreshContext();
406
+ const requestedIndex = context && ((_resolveInitialStepIn = resolveInitialStepIndexRef.current) === null || _resolveInitialStepIn === void 0 ? void 0 : _resolveInitialStepIn.call(resolveInitialStepIndexRef, context));
407
+ const requestedStep = visibleSteps.find((step) => step.index === requestedIndex);
408
+ if (requestedStep) initialIndex = requestedStep.index;
409
+ } catch (_unused2) {}
401
410
  currentStepIndexRef.current = initialIndex;
402
411
  currentStepKeyRef.current = (_compiledStepsRef$cur = compiledStepsRef.current[initialIndex]) === null || _compiledStepsRef$cur === void 0 ? void 0 : _compiledStepsRef$cur.key;
403
412
  setCurrentStepIndex(initialIndex);
@@ -188,6 +188,8 @@ interface PisellSelectionFlowProps<TDraft, TDraftUpdate, TField extends string,
188
188
  initialStepIndex?: number;
189
189
  /** Resolve a stable presentation before mounting interactive module components. */
190
190
  preparePresentation?: boolean;
191
+ /** Choose the entry step from prepared defaults without hiding earlier steps. */
192
+ resolveInitialStepIndex?: (context: SelectionFlowContextValue<TDraft, TDraftUpdate, TField, TModuleType, TServices, THostContext>) => number | undefined;
191
193
  onPresentationReady?: (automaticModuleKeys: readonly string[]) => void;
192
194
  hostContext?: THostContext;
193
195
  services: TServices;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  //#region src/components/appVersionControl/types.d.ts
2
3
  interface Version {
3
4
  id: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/calendar/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/checkbox/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { LocalSettingsType } from "../../table/types.js";
2
3
  import { DataSourceType } from "../provider/dataSource/DataSourceContext.js";
3
4
  import { ColumnType } from "antd/es/table";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CheckboxGroupProps } from "./type.js";
2
3
  import { WithModeProps } from "../../dataSourceForm/utils.js";
3
4
  import * as _$react from "react";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { WithModeProps } from "../../dataSourceForm/utils.js";
2
3
  import { RadioGroupProps } from "./type.js";
3
4
  import * as _$react from "react";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { WithFormItemProps, WithModeProps } from "../../dataSourceForm/utils.js";
2
3
  import { TabsProps } from "./type.js";
3
4
  import * as _$react from "react";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ModeType } from "../../dataSourceForm/type.js";
2
3
 
3
4
  //#region src/components/dataSourceComponents/fields/Translation/type.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionsItem } from "../../dataSourceForm/serve.js";
2
3
  import { Result } from "ahooks/es/useRequest/src/types";
3
4
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/date-picker/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  //#region src/components/drag-sort-tree/types.d.ts
2
3
  type IdType = string | number;
3
4
  type ValueProps = {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FilterItemProps } from "../../types.js";
2
3
 
3
4
  //#region src/components/filter/components/FilterButton/types.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
  import { InputProps, InputRef } from "antd";
3
4
  import * as _$antd_es_input0 from "antd/es/input";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/pisell-config-provider/context.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/pisellDatePicker/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  //#region src/components/pisellGridPro/ToolBar/type.d.ts
2
3
  interface ToolBarProps {
3
4
  className?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MenuProps } from "antd";
2
3
 
3
4
  //#region src/components/pisellMenu/types.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FilterItemProps } from "../filter/types.js";
2
3
  import { FormInstance } from "antd";
3
4
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/radio/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/section-footers/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/skeleton/index.d.ts
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as _$react from "react";
2
3
 
3
4
  //#region src/components/time-picker/index.d.ts