@pisell/materials 6.11.276 → 6.11.277

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 (32) 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.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/components/PisellFields/index.js +11 -0
  10. package/es/components/PisellSelectionFlow/PisellSelectionFlow.js +30 -26
  11. package/es/components/PisellSelectionFlow/hooks/useFlowNavigation.js +2 -1
  12. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +2 -0
  13. package/es/components/filter/components/FilterItem/index.js +11 -0
  14. package/es/components/pisellCurrency/index.js +13 -0
  15. package/es/components/pisellEmail/index.js +13 -0
  16. package/es/components/pisellLongText/index.js +13 -0
  17. package/es/components/pisellModal/components/PcModal/index.less +31 -1
  18. package/es/components/pisellMultipleSelect/index.js +13 -0
  19. package/es/components/pisellNumber/index.js +13 -0
  20. package/es/components/pisellPercent/index.js +13 -0
  21. package/es/components/pisellPhone/index.js +14 -0
  22. package/es/components/pisellRating/index.js +13 -0
  23. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +2 -0
  24. package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +11 -0
  25. package/es/components/pisellSingleLineText/index.js +13 -0
  26. package/es/components/pisellSingleSelect/index.js +13 -0
  27. package/es/components/pisellUrl/index.js +13 -0
  28. package/es/index.js +11 -0
  29. package/lib/components/PisellSelectionFlow/PisellSelectionFlow.js +30 -26
  30. package/lib/components/PisellSelectionFlow/hooks/useFlowNavigation.js +2 -1
  31. package/lib/components/pisellModal/components/PcModal/index.less +31 -1
  32. package/package.json +3 -3
@@ -1,14 +1,25 @@
1
1
  import PisellSingleLineText_default from "../pisellSingleLineText/PisellSingleLineText.js";
2
+ import "../pisellSingleLineText/index.js";
2
3
  import PisellLongText_default from "../pisellLongText/PisellLongText.js";
4
+ import "../pisellLongText/index.js";
3
5
  import MemoizedPisellNumber from "../pisellNumber/PisellNumber.js";
6
+ import "../pisellNumber/index.js";
4
7
  import MemoizedPisellCurrency from "../pisellCurrency/PisellCurrency.js";
8
+ import "../pisellCurrency/index.js";
5
9
  import MemoizedPisellPercent from "../pisellPercent/PisellPercent.js";
10
+ import "../pisellPercent/index.js";
6
11
  import PisellPhone_default from "../pisellPhone/PisellPhone.js";
12
+ import "../pisellPhone/index.js";
7
13
  import PisellEmail_default from "../pisellEmail/PisellEmail.js";
14
+ import "../pisellEmail/index.js";
8
15
  import PisellUrl_default from "../pisellUrl/PisellUrl.js";
16
+ import "../pisellUrl/index.js";
9
17
  import PisellRating_default from "../pisellRating/PisellRating.js";
18
+ import "../pisellRating/index.js";
10
19
  import PisellSingleSelect from "../pisellSingleSelect/PisellSingleSelect.js";
20
+ import "../pisellSingleSelect/index.js";
11
21
  import PisellMultipleSelect from "../pisellMultipleSelect/PisellMultipleSelect.js";
22
+ import "../pisellMultipleSelect/index.js";
12
23
  //#region src/components/PisellFields/index.tsx
13
24
  /**
14
25
  * PisellFields 命名空间
@@ -359,13 +359,38 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
359
359
  setCompletionReason,
360
360
  setIsCompleting
361
361
  });
362
+ const autoAdvanceAttemptRef = useRef();
363
+ useEffect(() => {
364
+ if (configurationError || completedRef.current || transitionPendingRef.current || preparePresentation && !presentationReadyRef.current || !currentStep || !isStepSkippable(resolvedCurrentStepIndex)) return;
365
+ if (currentStep.modules.every((module) => automaticModuleKeysRef.current.includes(module.key))) return;
366
+ const direction = navigationDirectionRef.current;
367
+ const key = `${direction}:${currentStep.key}:${draftRevisionRef.current}:${currentStep.modules.map((module) => `${module.key}:${moduleRevisionRef.current.get(module.key) || 0}`).join("|")}`;
368
+ if (autoAdvanceAttemptRef.current === key) return;
369
+ autoAdvanceAttemptRef.current = key;
370
+ if (direction === "backward") back();
371
+ else next();
372
+ }, [
373
+ configurationError,
374
+ currentStep,
375
+ resolvedCurrentStepIndex,
376
+ moduleState,
377
+ moduleData,
378
+ draft,
379
+ isStepSkippable,
380
+ navigationDirectionRef,
381
+ back,
382
+ next,
383
+ preparePresentation,
384
+ presentationReady,
385
+ automaticModuleKeys
386
+ ]);
362
387
  useEffect(() => {
363
388
  if (!preparePresentation || presentationReadyRef.current || configurationError || presentationTaskRef.current) return;
364
389
  const generation = flowGenerationRef.current;
365
390
  const isCurrent = () => mountedRef.current && flowGenerationRef.current === generation;
366
391
  const task = _asyncToGenerator(function* () {
367
392
  var _visibleSteps$0$index, _visibleSteps$, _compiledStepsRef$cur, _onPresentationReadyR2;
368
- const modules = compiledStepsRef.current.flatMap((step) => step.modules);
393
+ const modules = compiledStepsRef.current.reduce((allModules, step) => allModules.concat(step.modules), []);
369
394
  for (let pass = 0; pass <= modules.length; pass += 1) {
370
395
  for (const module of modules) {
371
396
  if (!isCurrent()) return;
@@ -411,8 +436,11 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
411
436
  presentationReadyRef.current = true;
412
437
  setPresentationReady(true);
413
438
  (_onPresentationReadyR2 = onPresentationReadyRef.current) === null || _onPresentationReadyR2 === void 0 || _onPresentationReadyR2.call(onPresentationReadyRef, automatic);
414
- })().finally(() => {
439
+ })().then(() => {
415
440
  if (presentationTaskRef.current === task) presentationTaskRef.current = null;
441
+ }, (error) => {
442
+ if (presentationTaskRef.current === task) presentationTaskRef.current = null;
443
+ throw error;
416
444
  });
417
445
  presentationTaskRef.current = task;
418
446
  }, [
@@ -423,30 +451,6 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
423
451
  preparePresentation,
424
452
  registry
425
453
  ]);
426
- const autoAdvanceAttemptRef = useRef();
427
- useEffect(() => {
428
- if (!presentationReady || configurationError || completedRef.current || transitionPendingRef.current || !currentStep || !isStepSkippable(resolvedCurrentStepIndex)) return;
429
- if (currentStep.modules.every((module) => automaticModuleKeysRef.current.includes(module.key))) return;
430
- const direction = navigationDirectionRef.current;
431
- const key = `${direction}:${currentStep.key}:${draftRevisionRef.current}:${currentStep.modules.map((module) => `${module.key}:${moduleRevisionRef.current.get(module.key) || 0}`).join("|")}`;
432
- if (autoAdvanceAttemptRef.current === key) return;
433
- autoAdvanceAttemptRef.current = key;
434
- if (direction === "backward") back();
435
- else next();
436
- }, [
437
- presentationReady,
438
- automaticModuleKeys,
439
- configurationError,
440
- currentStep,
441
- resolvedCurrentStepIndex,
442
- moduleState,
443
- moduleData,
444
- draft,
445
- isStepSkippable,
446
- navigationDirectionRef,
447
- back,
448
- next
449
- ]);
450
454
  const getState = useCallback(() => {
451
455
  const stepIndex = currentStepIndexRef.current;
452
456
  return {
@@ -366,7 +366,8 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
366
366
  const preparationGeneration = flowGenerationRef.current;
367
367
  const preparationNavigation = navigationRevisionRef.current;
368
368
  const isCurrentPreparation = () => mountedRef.current && !configurationErrorRef.current && flowGenerationRef.current === preparationGeneration && navigationRevisionRef.current === preparationNavigation && currentStepIndexRef.current === currentIndex && getCompiledStepsFingerprint(compiledStepsRef.current) === preparationFingerprint;
369
- const automaticModules = allSteps.flatMap((step) => step.modules).filter((module) => automaticModuleKeysRef.current.includes(module.key));
369
+ const automaticModules = [];
370
+ for (const step of allSteps) for (const module of step.modules) if (automaticModuleKeysRef.current.includes(module.key)) automaticModules.push(module);
370
371
  for (let pass = 0; pass <= automaticModules.length; pass += 1) {
371
372
  for (const module of automaticModules) {
372
373
  var _moduleStateRef$curre4;
@@ -1,7 +1,9 @@
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";
4
5
  import PisellMultipleSelect from "../../../pisellMultipleSelect/PisellMultipleSelect.js";
6
+ import "../../../pisellMultipleSelect/index.js";
5
7
  import React, { useEffect, useState } from "react";
6
8
  import { Spin } from "antd";
7
9
  //#region src/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.tsx
@@ -1,17 +1,28 @@
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";
4
5
  import PisellLongText_default from "../../../pisellLongText/PisellLongText.js";
6
+ import "../../../pisellLongText/index.js";
5
7
  import MemoizedPisellNumber from "../../../pisellNumber/PisellNumber.js";
8
+ import "../../../pisellNumber/index.js";
6
9
  import MemoizedPisellCurrency from "../../../pisellCurrency/PisellCurrency.js";
10
+ import "../../../pisellCurrency/index.js";
7
11
  import MemoizedPisellPercent from "../../../pisellPercent/PisellPercent.js";
12
+ import "../../../pisellPercent/index.js";
8
13
  import PisellPhone_default from "../../../pisellPhone/PisellPhone.js";
14
+ import "../../../pisellPhone/index.js";
9
15
  import PisellEmail_default from "../../../pisellEmail/PisellEmail.js";
16
+ import "../../../pisellEmail/index.js";
10
17
  import PisellUrl_default from "../../../pisellUrl/PisellUrl.js";
18
+ import "../../../pisellUrl/index.js";
11
19
  import PisellRating_default from "../../../pisellRating/PisellRating.js";
20
+ import "../../../pisellRating/index.js";
12
21
  import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
13
22
  import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
23
+ import "../../../pisellSingleSelect/index.js";
14
24
  import PisellMultipleSelect from "../../../pisellMultipleSelect/PisellMultipleSelect.js";
25
+ import "../../../pisellMultipleSelect/index.js";
15
26
  import { fieldMaps } from "../../../table/Table/fields/index.js";
16
27
  import { PisellMobileDateRangePicker } from "../../../pisellMobileDateRangePicker/PisellMobileDateRangePicker.js";
17
28
  import AsyncOptionsSelectWrapper from "./AsyncOptionsSelectWrapper.js";
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import MemoizedPisellCurrency from "./PisellCurrency.js";
3
+ //#region src/components/pisellCurrency/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 0 → 9 / 9 → 0 */
5
+ MemoizedPisellCurrency.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-0-9")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-9-0")
11
+ }] };
12
+ //#endregion
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import PisellEmail_default from "./PisellEmail.js";
3
+ //#region src/components/pisellEmail/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
5
+ PisellEmail_default.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-a-z")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-z-a")
11
+ }] };
12
+ //#endregion
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import PisellLongText_default from "./PisellLongText.js";
3
+ //#region src/components/pisellLongText/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
5
+ PisellLongText_default.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-a-z")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-z-a")
11
+ }] };
12
+ //#endregion
13
+ export {};
@@ -1,6 +1,36 @@
1
1
  .pisell-lowcode-modal-root {
2
2
  .pisell-pc-modal {
3
3
  overflow: hidden;
4
+ &:not(.pisell-mobile-modal) {
5
+ > .pisell-lowcode-modal {
6
+ // body 缩放后按实际容器限制宽度,避免居中弹窗换行到屏幕外。
7
+ max-width: 100%;
8
+ }
9
+ &.pisell-lowcode-modal-centered {
10
+ > .pisell-lowcode-modal {
11
+ // 使用缩放后 wrap 的高度;inline-flex 保留原有居中和遮罩点击区域。
12
+ display: inline-flex;
13
+ flex-direction: column;
14
+ min-height: min(260px, 90%);
15
+ max-height: 90%;
16
+
17
+ > .pisell-lowcode-modal-content {
18
+ flex: 1 1 auto;
19
+ min-height: 0;
20
+ max-height: none;
21
+
22
+ > .pisell-lowcode-modal-header,
23
+ > .pisell-lowcode-modal-footer {
24
+ flex-shrink: 0;
25
+ }
26
+
27
+ > .pisell-lowcode-modal-body {
28
+ min-height: 0;
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
4
34
  .pisell-lowcode-modal-content {
5
35
  padding: 0 !important;
6
36
  display: flex;
@@ -102,4 +132,4 @@
102
132
  }
103
133
  .pisell-move-down-leave {
104
134
  animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
105
- }
135
+ }
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import PisellMultipleSelect from "./PisellMultipleSelect.js";
3
+ //#region src/components/pisellMultipleSelect/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 First → Last / Last → First */
5
+ PisellMultipleSelect.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-first-last")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-last-first")
11
+ }] };
12
+ //#endregion
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import MemoizedPisellNumber from "./PisellNumber.js";
3
+ //#region src/components/pisellNumber/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 0 → 9 / 9 → 0 */
5
+ MemoizedPisellNumber.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-0-9")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-9-0")
11
+ }] };
12
+ //#endregion
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import MemoizedPisellPercent from "./PisellPercent.js";
3
+ //#region src/components/pisellPercent/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 0 → 9 / 9 → 0 */
5
+ MemoizedPisellPercent.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-0-9")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-9-0")
11
+ }] };
12
+ //#endregion
13
+ export {};
@@ -0,0 +1,14 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import "./constants/countryCodes.js";
3
+ import PisellPhone_default from "./PisellPhone.js";
4
+ //#region src/components/pisellPhone/index.tsx
5
+ /** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
6
+ PisellPhone_default.SortOptions = { getSortItems: (fieldKey) => [{
7
+ key: `${fieldKey}:asc`,
8
+ label: getText("sort-a-z")
9
+ }, {
10
+ key: `${fieldKey}:desc`,
11
+ label: getText("sort-z-a")
12
+ }] };
13
+ //#endregion
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import PisellRating_default from "./PisellRating.js";
3
+ //#region src/components/pisellRating/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 0 → 9 / 9 → 0 */
5
+ PisellRating_default.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-0-9")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-9-0")
11
+ }] };
12
+ //#endregion
13
+ export {};
@@ -1,6 +1,8 @@
1
1
  import { getText } from "../../../../locales/index.js";
2
2
  import MemoizedPisellNumber from "../../../pisellNumber/PisellNumber.js";
3
+ import "../../../pisellNumber/index.js";
3
4
  import PisellSingleSelect from "../../../pisellSingleSelect/PisellSingleSelect.js";
5
+ import "../../../pisellSingleSelect/index.js";
4
6
  import React from "react";
5
7
  //#region src/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.tsx
6
8
  /** 控制台「资源 / 布局」分页:预设、自定义行列、翻页停留、主文案宽度 */
@@ -1,16 +1,27 @@
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";
4
5
  import PisellLongText_default from "../../pisellLongText/PisellLongText.js";
6
+ import "../../pisellLongText/index.js";
5
7
  import MemoizedPisellNumber from "../../pisellNumber/PisellNumber.js";
8
+ import "../../pisellNumber/index.js";
6
9
  import MemoizedPisellCurrency from "../../pisellCurrency/PisellCurrency.js";
10
+ import "../../pisellCurrency/index.js";
7
11
  import MemoizedPisellPercent from "../../pisellPercent/PisellPercent.js";
12
+ import "../../pisellPercent/index.js";
8
13
  import PisellPhone_default from "../../pisellPhone/PisellPhone.js";
14
+ import "../../pisellPhone/index.js";
9
15
  import PisellEmail_default from "../../pisellEmail/PisellEmail.js";
16
+ import "../../pisellEmail/index.js";
10
17
  import PisellUrl_default from "../../pisellUrl/PisellUrl.js";
18
+ import "../../pisellUrl/index.js";
11
19
  import PisellRating_default from "../../pisellRating/PisellRating.js";
20
+ import "../../pisellRating/index.js";
12
21
  import PisellSingleSelect from "../../pisellSingleSelect/PisellSingleSelect.js";
22
+ import "../../pisellSingleSelect/index.js";
13
23
  import PisellMultipleSelect from "../../pisellMultipleSelect/PisellMultipleSelect.js";
24
+ import "../../pisellMultipleSelect/index.js";
14
25
  import PisellDateTimeDisplay_default from "../../pisellDateTimeDisplay/PisellDateTimeDisplay.js";
15
26
  import React, { useEffect, useState } from "react";
16
27
  //#region src/components/pisellRecordBoard/utils/recordBoardColumns.tsx
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import PisellSingleLineText_default from "./PisellSingleLineText.js";
3
+ //#region src/components/pisellSingleLineText/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
5
+ PisellSingleLineText_default.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-a-z")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-z-a")
11
+ }] };
12
+ //#endregion
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import PisellSingleSelect from "./PisellSingleSelect.js";
3
+ //#region src/components/pisellSingleSelect/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 First → Last / Last → First */
5
+ PisellSingleSelect.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-first-last")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-last-first")
11
+ }] };
12
+ //#endregion
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { getText } from "../../locales/index.js";
2
+ import PisellUrl_default from "./PisellUrl.js";
3
+ //#region src/components/pisellUrl/index.tsx
4
+ /** RecordBoard 列 type 联动排序:内置 A → Z / Z → A */
5
+ PisellUrl_default.SortOptions = { getSortItems: (fieldKey) => [{
6
+ key: `${fieldKey}:asc`,
7
+ label: getText("sort-a-z")
8
+ }, {
9
+ key: `${fieldKey}:desc`,
10
+ label: getText("sort-z-a")
11
+ }] };
12
+ //#endregion
13
+ export {};
package/es/index.js CHANGED
@@ -1,15 +1,26 @@
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";
3
4
  import PisellLongText_default from "./components/pisellLongText/PisellLongText.js";
5
+ import "./components/pisellLongText/index.js";
4
6
  import MemoizedPisellNumber from "./components/pisellNumber/PisellNumber.js";
7
+ import "./components/pisellNumber/index.js";
5
8
  import MemoizedPisellCurrency from "./components/pisellCurrency/PisellCurrency.js";
9
+ import "./components/pisellCurrency/index.js";
6
10
  import MemoizedPisellPercent from "./components/pisellPercent/PisellPercent.js";
11
+ import "./components/pisellPercent/index.js";
7
12
  import PisellPhone_default from "./components/pisellPhone/PisellPhone.js";
13
+ import "./components/pisellPhone/index.js";
8
14
  import PisellEmail_default from "./components/pisellEmail/PisellEmail.js";
15
+ import "./components/pisellEmail/index.js";
9
16
  import PisellUrl_default from "./components/pisellUrl/PisellUrl.js";
17
+ import "./components/pisellUrl/index.js";
10
18
  import PisellRating_default from "./components/pisellRating/PisellRating.js";
19
+ import "./components/pisellRating/index.js";
11
20
  import PisellSingleSelect from "./components/pisellSingleSelect/PisellSingleSelect.js";
21
+ import "./components/pisellSingleSelect/index.js";
12
22
  import PisellMultipleSelect from "./components/pisellMultipleSelect/PisellMultipleSelect.js";
23
+ import "./components/pisellMultipleSelect/index.js";
13
24
  import PisellFields from "./components/PisellFields/index.js";
14
25
  import PisellCard from "./components/pisellCard/index.js";
15
26
  import PisellMetricCard from "./components/pisellMetricCard/PisellMetricCard.js";
@@ -361,13 +361,38 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
361
361
  setCompletionReason,
362
362
  setIsCompleting
363
363
  });
364
+ const autoAdvanceAttemptRef = (0, react.useRef)();
365
+ (0, react.useEffect)(() => {
366
+ if (configurationError || completedRef.current || transitionPendingRef.current || preparePresentation && !presentationReadyRef.current || !currentStep || !isStepSkippable(resolvedCurrentStepIndex)) return;
367
+ if (currentStep.modules.every((module) => automaticModuleKeysRef.current.includes(module.key))) return;
368
+ const direction = navigationDirectionRef.current;
369
+ const key = `${direction}:${currentStep.key}:${draftRevisionRef.current}:${currentStep.modules.map((module) => `${module.key}:${moduleRevisionRef.current.get(module.key) || 0}`).join("|")}`;
370
+ if (autoAdvanceAttemptRef.current === key) return;
371
+ autoAdvanceAttemptRef.current = key;
372
+ if (direction === "backward") back();
373
+ else next();
374
+ }, [
375
+ configurationError,
376
+ currentStep,
377
+ resolvedCurrentStepIndex,
378
+ moduleState,
379
+ moduleData,
380
+ draft,
381
+ isStepSkippable,
382
+ navigationDirectionRef,
383
+ back,
384
+ next,
385
+ preparePresentation,
386
+ presentationReady,
387
+ automaticModuleKeys
388
+ ]);
364
389
  (0, react.useEffect)(() => {
365
390
  if (!preparePresentation || presentationReadyRef.current || configurationError || presentationTaskRef.current) return;
366
391
  const generation = flowGenerationRef.current;
367
392
  const isCurrent = () => mountedRef.current && flowGenerationRef.current === generation;
368
393
  const task = require_asyncToGenerator._asyncToGenerator(function* () {
369
394
  var _visibleSteps$0$index, _visibleSteps$, _compiledStepsRef$cur, _onPresentationReadyR2;
370
- const modules = compiledStepsRef.current.flatMap((step) => step.modules);
395
+ const modules = compiledStepsRef.current.reduce((allModules, step) => allModules.concat(step.modules), []);
371
396
  for (let pass = 0; pass <= modules.length; pass += 1) {
372
397
  for (const module of modules) {
373
398
  if (!isCurrent()) return;
@@ -413,8 +438,11 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
413
438
  presentationReadyRef.current = true;
414
439
  setPresentationReady(true);
415
440
  (_onPresentationReadyR2 = onPresentationReadyRef.current) === null || _onPresentationReadyR2 === void 0 || _onPresentationReadyR2.call(onPresentationReadyRef, automatic);
416
- })().finally(() => {
441
+ })().then(() => {
417
442
  if (presentationTaskRef.current === task) presentationTaskRef.current = null;
443
+ }, (error) => {
444
+ if (presentationTaskRef.current === task) presentationTaskRef.current = null;
445
+ throw error;
418
446
  });
419
447
  presentationTaskRef.current = task;
420
448
  }, [
@@ -425,30 +453,6 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
425
453
  preparePresentation,
426
454
  registry
427
455
  ]);
428
- const autoAdvanceAttemptRef = (0, react.useRef)();
429
- (0, react.useEffect)(() => {
430
- if (!presentationReady || configurationError || completedRef.current || transitionPendingRef.current || !currentStep || !isStepSkippable(resolvedCurrentStepIndex)) return;
431
- if (currentStep.modules.every((module) => automaticModuleKeysRef.current.includes(module.key))) return;
432
- const direction = navigationDirectionRef.current;
433
- const key = `${direction}:${currentStep.key}:${draftRevisionRef.current}:${currentStep.modules.map((module) => `${module.key}:${moduleRevisionRef.current.get(module.key) || 0}`).join("|")}`;
434
- if (autoAdvanceAttemptRef.current === key) return;
435
- autoAdvanceAttemptRef.current = key;
436
- if (direction === "backward") back();
437
- else next();
438
- }, [
439
- presentationReady,
440
- automaticModuleKeys,
441
- configurationError,
442
- currentStep,
443
- resolvedCurrentStepIndex,
444
- moduleState,
445
- moduleData,
446
- draft,
447
- isStepSkippable,
448
- navigationDirectionRef,
449
- back,
450
- next
451
- ]);
452
456
  const getState = (0, react.useCallback)(() => {
453
457
  const stepIndex = currentStepIndexRef.current;
454
458
  return {
@@ -367,7 +367,8 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
367
367
  const preparationGeneration = flowGenerationRef.current;
368
368
  const preparationNavigation = navigationRevisionRef.current;
369
369
  const isCurrentPreparation = () => mountedRef.current && !configurationErrorRef.current && flowGenerationRef.current === preparationGeneration && navigationRevisionRef.current === preparationNavigation && currentStepIndexRef.current === currentIndex && require_utils.getCompiledStepsFingerprint(compiledStepsRef.current) === preparationFingerprint;
370
- const automaticModules = allSteps.flatMap((step) => step.modules).filter((module) => automaticModuleKeysRef.current.includes(module.key));
370
+ const automaticModules = [];
371
+ for (const step of allSteps) for (const module of step.modules) if (automaticModuleKeysRef.current.includes(module.key)) automaticModules.push(module);
371
372
  for (let pass = 0; pass <= automaticModules.length; pass += 1) {
372
373
  for (const module of automaticModules) {
373
374
  var _moduleStateRef$curre4;
@@ -1,6 +1,36 @@
1
1
  .pisell-lowcode-modal-root {
2
2
  .pisell-pc-modal {
3
3
  overflow: hidden;
4
+ &:not(.pisell-mobile-modal) {
5
+ > .pisell-lowcode-modal {
6
+ // body 缩放后按实际容器限制宽度,避免居中弹窗换行到屏幕外。
7
+ max-width: 100%;
8
+ }
9
+ &.pisell-lowcode-modal-centered {
10
+ > .pisell-lowcode-modal {
11
+ // 使用缩放后 wrap 的高度;inline-flex 保留原有居中和遮罩点击区域。
12
+ display: inline-flex;
13
+ flex-direction: column;
14
+ min-height: min(260px, 90%);
15
+ max-height: 90%;
16
+
17
+ > .pisell-lowcode-modal-content {
18
+ flex: 1 1 auto;
19
+ min-height: 0;
20
+ max-height: none;
21
+
22
+ > .pisell-lowcode-modal-header,
23
+ > .pisell-lowcode-modal-footer {
24
+ flex-shrink: 0;
25
+ }
26
+
27
+ > .pisell-lowcode-modal-body {
28
+ min-height: 0;
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
4
34
  .pisell-lowcode-modal-content {
5
35
  padding: 0 !important;
6
36
  display: flex;
@@ -102,4 +132,4 @@
102
132
  }
103
133
  .pisell-move-down-leave {
104
134
  animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
105
- }
135
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "6.11.276",
3
+ "version": "6.11.277",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -96,8 +96,8 @@
96
96
  "antd-mobile": "^5.38.1",
97
97
  "vod-js-sdk-v6": "^1.4.11",
98
98
  "@pisell/date-picker": "3.0.12",
99
- "@pisell/utils": "3.0.7",
100
- "@pisell/icon": "0.0.11"
99
+ "@pisell/icon": "0.0.11",
100
+ "@pisell/utils": "3.0.7"
101
101
  },
102
102
  "peerDependencies": {
103
103
  "react": "^18.0.0",