@pisell/materials 6.12.89 → 6.12.91
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/PisellCards/index.d.ts +0 -1
- package/es/components/PisellFields/index.d.ts +0 -1
- package/es/components/PisellFields/index.js +0 -11
- package/es/components/PisellLayouts/index.d.ts +0 -1
- package/es/components/PisellMetrics/index.d.ts +0 -1
- package/es/components/PisellSelectionFlow/PisellSelectionFlow.js +16 -5
- package/es/components/PisellSelectionFlow/hooks/useFlowNavigation.js +37 -8
- package/es/components/PisellSelectionFlow/types.d.ts +2 -0
- package/es/components/appVersionControl/types.d.ts +0 -1
- package/es/components/calendar/index.d.ts +0 -1
- package/es/components/checkbox/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/drag-sort-tree/types.d.ts +0 -1
- package/es/components/filter/components/FilterButton/types.d.ts +0 -1
- package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +0 -2
- package/es/components/filter/components/FilterItem/index.js +0 -11
- package/es/components/input/index.d.ts +0 -1
- package/es/components/pisell-config-provider/context.d.ts +0 -1
- package/es/components/pisellDatePicker/index.d.ts +0 -1
- package/es/components/pisellGridPro/ToolBar/type.d.ts +0 -1
- package/es/components/pisellMenu/types.d.ts +0 -1
- package/es/components/pisellModal/components/PcModal/index.less +31 -1
- package/es/components/pisellQuickFilter/type.d.ts +0 -1
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +0 -2
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +0 -11
- package/es/components/radio/index.d.ts +0 -1
- package/es/components/section-footers/index.d.ts +0 -1
- package/es/components/skeleton/index.d.ts +0 -1
- package/es/components/time-picker/index.d.ts +0 -1
- package/es/components/upload/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -1
- package/es/index.js +0 -11
- package/lib/components/PisellCards/index.d.ts +0 -1
- package/lib/components/PisellFields/index.d.ts +0 -1
- package/lib/components/PisellLayouts/index.d.ts +0 -1
- package/lib/components/PisellMetrics/index.d.ts +0 -1
- package/lib/components/PisellSelectionFlow/PisellSelectionFlow.js +16 -5
- package/lib/components/PisellSelectionFlow/hooks/useFlowNavigation.js +37 -8
- package/lib/components/PisellSelectionFlow/types.d.ts +2 -0
- package/lib/components/appVersionControl/types.d.ts +0 -1
- package/lib/components/calendar/index.d.ts +0 -1
- package/lib/components/checkbox/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/types.d.ts +0 -1
- package/lib/components/filter/components/FilterButton/types.d.ts +0 -1
- package/lib/components/input/index.d.ts +0 -1
- package/lib/components/pisell-config-provider/context.d.ts +0 -1
- package/lib/components/pisellDatePicker/index.d.ts +0 -1
- package/lib/components/pisellGridPro/ToolBar/type.d.ts +0 -1
- package/lib/components/pisellMenu/types.d.ts +0 -1
- package/lib/components/pisellModal/components/PcModal/index.less +31 -1
- package/lib/components/pisellQuickFilter/type.d.ts +0 -1
- package/lib/components/radio/index.d.ts +0 -1
- package/lib/components/section-footers/index.d.ts +0 -1
- package/lib/components/skeleton/index.d.ts +0 -1
- package/lib/components/time-picker/index.d.ts +0 -1
- package/lib/components/upload/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -1
- package/package.json +3 -3
- package/es/components/pisellCurrency/index.js +0 -13
- package/es/components/pisellEmail/index.js +0 -13
- package/es/components/pisellLongText/index.js +0 -13
- package/es/components/pisellMultipleSelect/index.js +0 -13
- package/es/components/pisellNumber/index.js +0 -13
- package/es/components/pisellPercent/index.js +0 -13
- package/es/components/pisellPhone/index.js +0 -14
- package/es/components/pisellRating/index.js +0 -13
- package/es/components/pisellSingleLineText/index.js +0 -13
- package/es/components/pisellSingleSelect/index.js +0 -13
- package/es/components/pisellUrl/index.js +0 -13
|
@@ -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,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,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";
|
|
@@ -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;
|
|
@@ -360,6 +362,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
360
362
|
const autoAdvanceAttemptRef = useRef();
|
|
361
363
|
useEffect(() => {
|
|
362
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;
|
|
363
366
|
const direction = navigationDirectionRef.current;
|
|
364
367
|
const key = `${direction}:${currentStep.key}:${draftRevisionRef.current}:${currentStep.modules.map((module) => `${module.key}:${moduleRevisionRef.current.get(module.key) || 0}`).join("|")}`;
|
|
365
368
|
if (autoAdvanceAttemptRef.current === key) return;
|
|
@@ -378,14 +381,15 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
378
381
|
back,
|
|
379
382
|
next,
|
|
380
383
|
preparePresentation,
|
|
381
|
-
presentationReady
|
|
384
|
+
presentationReady,
|
|
385
|
+
automaticModuleKeys
|
|
382
386
|
]);
|
|
383
387
|
useEffect(() => {
|
|
384
388
|
if (!preparePresentation || presentationReadyRef.current || configurationError || presentationTaskRef.current) return;
|
|
385
389
|
const generation = flowGenerationRef.current;
|
|
386
390
|
const isCurrent = () => mountedRef.current && flowGenerationRef.current === generation;
|
|
387
391
|
const task = _asyncToGenerator(function* () {
|
|
388
|
-
var
|
|
392
|
+
var _visibleSteps$0$index, _visibleSteps$, _compiledStepsRef$cur, _onPresentationReadyR2;
|
|
389
393
|
const modules = compiledStepsRef.current.reduce((allModules, step) => allModules.concat(step.modules), []);
|
|
390
394
|
for (let pass = 0; pass <= modules.length; pass += 1) {
|
|
391
395
|
for (const module of modules) {
|
|
@@ -417,8 +421,15 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
417
421
|
}).map((module) => module.key);
|
|
418
422
|
automaticModuleKeysRef.current = automatic;
|
|
419
423
|
setAutomaticModuleKeys(automatic);
|
|
420
|
-
const
|
|
421
|
-
|
|
424
|
+
const visibleSteps = compiledStepsRef.current.filter((step) => step.modules.some((module) => !automatic.includes(module.key)));
|
|
425
|
+
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);
|
|
426
|
+
try {
|
|
427
|
+
var _resolveInitialStepIn;
|
|
428
|
+
const context = getFreshContext();
|
|
429
|
+
const requestedIndex = context && ((_resolveInitialStepIn = resolveInitialStepIndexRef.current) === null || _resolveInitialStepIn === void 0 ? void 0 : _resolveInitialStepIn.call(resolveInitialStepIndexRef, context));
|
|
430
|
+
const requestedStep = visibleSteps.find((step) => step.index === requestedIndex);
|
|
431
|
+
if (requestedStep) initialIndex = requestedStep.index;
|
|
432
|
+
} catch (_unused2) {}
|
|
422
433
|
currentStepIndexRef.current = initialIndex;
|
|
423
434
|
currentStepKeyRef.current = (_compiledStepsRef$cur = compiledStepsRef.current[initialIndex]) === null || _compiledStepsRef$cur === void 0 ? void 0 : _compiledStepsRef$cur.key;
|
|
424
435
|
setCurrentStepIndex(initialIndex);
|
|
@@ -14,6 +14,7 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
|
|
|
14
14
|
return step.modules.every((module) => {
|
|
15
15
|
var _moduleStateRef$curre;
|
|
16
16
|
if (((_moduleStateRef$curre = moduleStateRef.current[module.key]) === null || _moduleStateRef$curre === void 0 ? void 0 : _moduleStateRef$curre.status) !== "ready") return false;
|
|
17
|
+
if (automaticModuleKeysRef.current.includes(module.key)) return true;
|
|
17
18
|
try {
|
|
18
19
|
var _resolveFlowModuleAda, _resolveFlowModuleAda2;
|
|
19
20
|
return ((_resolveFlowModuleAda = resolveFlowModuleAdapter(registry, module.type)) === null || _resolveFlowModuleAda === void 0 || (_resolveFlowModuleAda2 = _resolveFlowModuleAda.isSkippable) === null || _resolveFlowModuleAda2 === void 0 ? void 0 : _resolveFlowModuleAda2.call(_resolveFlowModuleAda, context, module)) === true;
|
|
@@ -365,9 +366,32 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
|
|
|
365
366
|
const preparationGeneration = flowGenerationRef.current;
|
|
366
367
|
const preparationNavigation = navigationRevisionRef.current;
|
|
367
368
|
const isCurrentPreparation = () => mountedRef.current && !configurationErrorRef.current && flowGenerationRef.current === preparationGeneration && navigationRevisionRef.current === preparationNavigation && currentStepIndexRef.current === currentIndex && getCompiledStepsFingerprint(compiledStepsRef.current) === preparationFingerprint;
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
const automaticModules = [];
|
|
370
|
+
for (const step of allSteps) for (const module of step.modules) if (automaticModuleKeysRef.current.includes(module.key)) automaticModules.push(module);
|
|
371
|
+
for (let pass = 0; pass <= automaticModules.length; pass += 1) {
|
|
372
|
+
for (const module of automaticModules) {
|
|
373
|
+
var _moduleStateRef$curre4;
|
|
374
|
+
if (!isCurrentPreparation()) return false;
|
|
375
|
+
if (pass > 0 && ((_moduleStateRef$curre4 = moduleStateRef.current[module.key]) === null || _moduleStateRef$curre4 === void 0 ? void 0 : _moduleStateRef$curre4.status) === "ready") continue;
|
|
376
|
+
if (!(yield validateModule(module)) || !isCurrentPreparation()) return false;
|
|
377
|
+
}
|
|
378
|
+
if (automaticModules.every((module) => {
|
|
379
|
+
var _moduleStateRef$curre5;
|
|
380
|
+
return ((_moduleStateRef$curre5 = moduleStateRef.current[module.key]) === null || _moduleStateRef$curre5 === void 0 ? void 0 : _moduleStateRef$curre5.status) === "ready";
|
|
381
|
+
})) break;
|
|
382
|
+
}
|
|
383
|
+
const unresolvedAutomatic = automaticModules.find((module) => {
|
|
384
|
+
var _moduleStateRef$curre6;
|
|
385
|
+
return ((_moduleStateRef$curre6 = moduleStateRef.current[module.key]) === null || _moduleStateRef$curre6 === void 0 ? void 0 : _moduleStateRef$curre6.status) !== "ready";
|
|
386
|
+
});
|
|
387
|
+
if (unresolvedAutomatic) {
|
|
388
|
+
onAutomaticModuleFailure === null || onAutomaticModuleFailure === void 0 || onAutomaticModuleFailure(unresolvedAutomatic);
|
|
389
|
+
const state = moduleStateRef.current[unresolvedAutomatic.key];
|
|
390
|
+
onValidationFailed === null || onValidationFailed === void 0 || onValidationFailed(unresolvedAutomatic, {
|
|
391
|
+
message: state === null || state === void 0 ? void 0 : state.message,
|
|
392
|
+
reason: (state === null || state === void 0 ? void 0 : state.reason) || createRuntimeIssue("previous-step-review")
|
|
393
|
+
});
|
|
394
|
+
return false;
|
|
371
395
|
}
|
|
372
396
|
const preparationDraftRevision = draftRevisionRef.current;
|
|
373
397
|
for (const step of allSteps) {
|
|
@@ -405,8 +429,8 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
|
|
|
405
429
|
const latestRevisionFingerprint = latestSteps.flatMap((step) => step.modules).map((module) => `${module.key}:${moduleRevisionRef.current.get(module.key) || 0}`).join("|");
|
|
406
430
|
if (compiledFingerprint !== latestCompiledFingerprint || revisionFingerprint !== latestRevisionFingerprint || draftRevision !== draftRevisionRef.current) {
|
|
407
431
|
const targetStep = latestSteps.find((step) => step.modules.some((module) => {
|
|
408
|
-
var _moduleStateRef$
|
|
409
|
-
return ((_moduleStateRef$
|
|
432
|
+
var _moduleStateRef$curre7;
|
|
433
|
+
return ((_moduleStateRef$curre7 = moduleStateRef.current[module.key]) === null || _moduleStateRef$curre7 === void 0 ? void 0 : _moduleStateRef$curre7.status) !== "ready";
|
|
410
434
|
})) || latestSteps[0];
|
|
411
435
|
const targetModule = targetStep === null || targetStep === void 0 ? void 0 : targetStep.modules[0];
|
|
412
436
|
if (targetStep && targetModule) {
|
|
@@ -438,6 +462,7 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
|
|
|
438
462
|
}), [
|
|
439
463
|
commitModuleState,
|
|
440
464
|
createRuntimeIssue,
|
|
465
|
+
onAutomaticModuleFailure,
|
|
441
466
|
onValidationFailed,
|
|
442
467
|
revalidateModuleBeforeComplete,
|
|
443
468
|
validateCurrentStep,
|
|
@@ -541,15 +566,19 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
|
|
|
541
566
|
validateCurrentStep
|
|
542
567
|
]),
|
|
543
568
|
back: useCallback(() => {
|
|
544
|
-
var _compiledStepsRef$cur2
|
|
569
|
+
var _compiledStepsRef$cur2;
|
|
545
570
|
if (!mountedRef.current || transitionPendingRef.current || currentStepIndexRef.current <= 0) return false;
|
|
546
571
|
let nextIndex = currentStepIndexRef.current - 1;
|
|
547
|
-
while (nextIndex >= 0
|
|
572
|
+
while (nextIndex >= 0) {
|
|
573
|
+
const step = compiledStepsRef.current[nextIndex];
|
|
574
|
+
if (!((step === null || step === void 0 ? void 0 : step.modules.length) > 0 && step.modules.every((module) => automaticModuleKeysRef.current.includes(module.key))) && !isStepSkippable(nextIndex)) break;
|
|
575
|
+
nextIndex -= 1;
|
|
576
|
+
}
|
|
548
577
|
if (nextIndex < 0) return false;
|
|
549
578
|
navigationDirectionRef.current = "backward";
|
|
550
579
|
navigationRevisionRef.current += 1;
|
|
551
580
|
currentStepIndexRef.current = nextIndex;
|
|
552
|
-
currentStepKeyRef.current = (_compiledStepsRef$
|
|
581
|
+
currentStepKeyRef.current = (_compiledStepsRef$cur2 = compiledStepsRef.current[nextIndex]) === null || _compiledStepsRef$cur2 === void 0 ? void 0 : _compiledStepsRef$cur2.key;
|
|
553
582
|
setCurrentStepIndex(nextIndex);
|
|
554
583
|
return true;
|
|
555
584
|
}, [isStepSkippable]),
|
|
@@ -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,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,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/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js
CHANGED
|
@@ -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
|
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,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 { 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";
|
|
@@ -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;
|
|
@@ -362,6 +364,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
362
364
|
const autoAdvanceAttemptRef = (0, react.useRef)();
|
|
363
365
|
(0, react.useEffect)(() => {
|
|
364
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;
|
|
365
368
|
const direction = navigationDirectionRef.current;
|
|
366
369
|
const key = `${direction}:${currentStep.key}:${draftRevisionRef.current}:${currentStep.modules.map((module) => `${module.key}:${moduleRevisionRef.current.get(module.key) || 0}`).join("|")}`;
|
|
367
370
|
if (autoAdvanceAttemptRef.current === key) return;
|
|
@@ -380,14 +383,15 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
380
383
|
back,
|
|
381
384
|
next,
|
|
382
385
|
preparePresentation,
|
|
383
|
-
presentationReady
|
|
386
|
+
presentationReady,
|
|
387
|
+
automaticModuleKeys
|
|
384
388
|
]);
|
|
385
389
|
(0, react.useEffect)(() => {
|
|
386
390
|
if (!preparePresentation || presentationReadyRef.current || configurationError || presentationTaskRef.current) return;
|
|
387
391
|
const generation = flowGenerationRef.current;
|
|
388
392
|
const isCurrent = () => mountedRef.current && flowGenerationRef.current === generation;
|
|
389
393
|
const task = require_asyncToGenerator._asyncToGenerator(function* () {
|
|
390
|
-
var
|
|
394
|
+
var _visibleSteps$0$index, _visibleSteps$, _compiledStepsRef$cur, _onPresentationReadyR2;
|
|
391
395
|
const modules = compiledStepsRef.current.reduce((allModules, step) => allModules.concat(step.modules), []);
|
|
392
396
|
for (let pass = 0; pass <= modules.length; pass += 1) {
|
|
393
397
|
for (const module of modules) {
|
|
@@ -419,8 +423,15 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
419
423
|
}).map((module) => module.key);
|
|
420
424
|
automaticModuleKeysRef.current = automatic;
|
|
421
425
|
setAutomaticModuleKeys(automatic);
|
|
422
|
-
const
|
|
423
|
-
|
|
426
|
+
const visibleSteps = compiledStepsRef.current.filter((step) => step.modules.some((module) => !automatic.includes(module.key)));
|
|
427
|
+
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);
|
|
428
|
+
try {
|
|
429
|
+
var _resolveInitialStepIn;
|
|
430
|
+
const context = getFreshContext();
|
|
431
|
+
const requestedIndex = context && ((_resolveInitialStepIn = resolveInitialStepIndexRef.current) === null || _resolveInitialStepIn === void 0 ? void 0 : _resolveInitialStepIn.call(resolveInitialStepIndexRef, context));
|
|
432
|
+
const requestedStep = visibleSteps.find((step) => step.index === requestedIndex);
|
|
433
|
+
if (requestedStep) initialIndex = requestedStep.index;
|
|
434
|
+
} catch (_unused2) {}
|
|
424
435
|
currentStepIndexRef.current = initialIndex;
|
|
425
436
|
currentStepKeyRef.current = (_compiledStepsRef$cur = compiledStepsRef.current[initialIndex]) === null || _compiledStepsRef$cur === void 0 ? void 0 : _compiledStepsRef$cur.key;
|
|
426
437
|
setCurrentStepIndex(initialIndex);
|