@12-apps/ui 6.77.2 → 6.78.0
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/NATIVE.md +1 -1
- package/components-catalog.md +8 -0
- package/dist/_internal/components/data-display/Badge/Badge.js +3 -3
- package/dist/_internal/components/data-display/Badge/Badge.styles.js +3 -3
- package/dist/_internal/components/data-display/Badge/BadgeContent.js +3 -3
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +5 -5
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +5 -5
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +5 -5
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +3 -3
- package/dist/_internal/components/data-display/Chart/Chart.js +3 -3
- package/dist/_internal/components/data-display/Chart/SpecChart.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-context.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-internals.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +57 -57
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +71 -71
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +5 -5
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +6 -6
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-bar-controls.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-card-body.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +19 -19
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-day-input.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +30 -30
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +54 -54
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +31 -31
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +25 -25
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +28 -28
- package/dist/_internal/components/data-display/DataViews/data-views-number-input.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-quick-chip.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-search.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +17 -17
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +18 -18
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +16 -16
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +5 -5
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +7 -7
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +7 -7
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +6 -6
- package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js +2 -2
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +9 -9
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +5 -5
- package/dist/_internal/components/data-display/MapPreview/MapSearchBar.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +3 -3
- package/dist/_internal/components/data-display/index.js +10 -10
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +5 -5
- package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +5 -5
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.js +56 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.metrics.js +8 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.metrics.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.parts.js +52 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.parts.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.styles.js +58 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.styles.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.types.js +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.types.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/sequence-model.js +28 -0
- package/dist/_internal/components/feedback/SequenceResolver/sequence-model.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/useSequenceRun.js +9 -0
- package/dist/_internal/components/feedback/SequenceResolver/useSequenceRun.js.map +1 -0
- package/dist/_internal/components/feedback/TutorialOverlay/TutorialOverlay.js +2 -2
- package/dist/_internal/components/feedback/index.js +40 -23
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +11 -11
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +5 -5
- package/dist/_internal/components/form/AddressAutocomplete/AddressFallbackField.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressInputField.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressTextField.js +3 -3
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +4 -4
- package/dist/_internal/components/form/Autocomplete/Autocomplete.parts.js +3 -3
- package/dist/_internal/components/form/Button/Button.js +4 -4
- package/dist/_internal/components/form/Button/Button.styles.js +3 -3
- package/dist/_internal/components/form/Calendar/Calendar.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +8 -8
- package/dist/_internal/components/form/CategorySelect/CategoryPanelFoot.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategoryPanelHead.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +5 -5
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +11 -11
- package/dist/_internal/components/form/CategorySelect/CategorySelect.styles.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryTrigger.js +4 -4
- package/dist/_internal/components/form/CepField/CepField.js +6 -6
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +3 -3
- package/dist/_internal/components/form/Command/Command.js +5 -5
- package/dist/_internal/components/form/Command/Command.styles.js +3 -3
- package/dist/_internal/components/form/CreatableSelect/CreatableSelect.js +3 -3
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.hooks.js +5 -5
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +9 -9
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.range.js +4 -4
- package/dist/_internal/components/form/DateRangePicker/DateRangePickerFields.js +5 -5
- package/dist/_internal/components/form/Input/Input.factory.js +4 -4
- package/dist/_internal/components/form/Input/Input.js +5 -5
- package/dist/_internal/components/form/Input/Input.styles.js +3 -3
- package/dist/_internal/components/form/InputOTP/InputOTP.js +4 -4
- package/dist/_internal/components/form/InputOTP/InputOTP.styles.js +3 -3
- package/dist/_internal/components/form/Label/Label.js +3 -3
- package/dist/_internal/components/form/Label/Label.styles.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.item.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.js +5 -5
- package/dist/_internal/components/form/Menubar/Menubar.styles.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +3 -3
- package/dist/_internal/components/form/NumberField/NumberField.js +6 -6
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +3 -3
- package/dist/_internal/components/form/PickerSheet/PickerSheet.js +6 -6
- package/dist/_internal/components/form/PickerSheet/PickerSheet.parts.js +4 -4
- package/dist/_internal/components/form/PickerSheet/PickerSheet.styles.js +3 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.js +5 -5
- package/dist/_internal/components/form/RadioGroup/RadioGroup.styles.js +3 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.variants.js +4 -4
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/_internal/components/form/Select/Select.js +6 -6
- package/dist/_internal/components/form/Select/Select.menu.js +4 -4
- package/dist/_internal/components/form/Select/Select.searchable.js +4 -4
- package/dist/_internal/components/form/Select/Select.styles.js +3 -3
- package/dist/_internal/components/form/Textarea/Textarea.js +3 -3
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js +4 -4
- package/dist/_internal/components/form/Toggle/Toggle.js +4 -4
- package/dist/_internal/components/form/Toggle/Toggle.styles.js +3 -3
- package/dist/_internal/components/form/ToggleGroup/ToggleGroup.js +3 -3
- package/dist/_internal/components/form/UploadButton/UploadButton.js +2 -2
- package/dist/_internal/components/form/index.js +64 -64
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +12 -12
- package/dist/_internal/components/form/total-form/Fields/CepField.js +7 -7
- package/dist/_internal/components/form/total-form/Fields/SelectField.js +7 -7
- package/dist/_internal/components/form/total-form/Fields/TextField.js +6 -6
- package/dist/_internal/components/form/total-form/Fields/ToggleField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/index.js +30 -30
- package/dist/_internal/components/form/total-form/SubmitButton.js +5 -5
- package/dist/_internal/components/index.js +165 -155
- package/dist/_internal/components/layout/Box/Box.js +6 -6
- package/dist/_internal/components/layout/ContentToolbar/ColumnsMenu.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/FilterTrigger.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectDropdown.js +4 -4
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectTriggers.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/SavedViewsMenu.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/SortByDropdown.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/ViewSelector.js +3 -3
- package/dist/_internal/components/layout/Screen/Screen.js +7 -7
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +11 -11
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +9 -9
- package/dist/_internal/components/layout/SettingCard/SettingCard.summary.js +10 -10
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +10 -10
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +13 -13
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +11 -11
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +13 -13
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +3 -3
- package/dist/_internal/components/layout/SettingsLayout/SettingsPanel.js +2 -2
- package/dist/_internal/components/layout/Stack/Stack.js +7 -7
- package/dist/_internal/components/layout/TableFilter/TableFilter.js +3 -3
- package/dist/_internal/components/layout/index.js +36 -36
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +6 -6
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +4 -4
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +2 -2
- package/dist/_internal/components/navigation/Pagination/Pagination.js +4 -4
- package/dist/_internal/components/navigation/Pagination/PaginationParts.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +6 -6
- package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js +3 -3
- package/dist/_internal/components/navigation/Tabs/Tabs.js +2 -2
- package/dist/_internal/components/navigation/Tabs/Tabs.styles.js +2 -2
- package/dist/_internal/components/navigation/index.js +29 -29
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +3 -3
- package/dist/_internal/components/utility/index.js +7 -7
- package/dist/_internal/en-US.data-display.js +2 -2
- package/dist/_internal/icons/Icon.js +6 -6
- package/dist/_internal/provider/UiProvider.js +5 -5
- package/dist/_internal/provider/mui-bridge.js +4 -4
- package/dist/_internal/provider/use-ui-theme.js +5 -5
- package/dist/_internal/social-login-button/social-login-button.js +5 -5
- package/dist/_internal/tokens/density.js +3 -3
- package/dist/_internal/tokens/field-height.js +2 -2
- package/dist/_internal/user-avatar/user-avatar.js +5 -5
- package/dist/charts.js +3 -3
- package/dist/{chunk-75FHDUJW.js → chunk-2D4WKET2.js} +5 -5
- package/dist/{chunk-3O2OJW4O.js → chunk-2QO3BKUQ.js} +8 -8
- package/dist/{chunk-HXCUKZOB.js → chunk-2VHAD4NE.js} +3 -3
- package/dist/{chunk-FJ3UZ4RC.js → chunk-33MMQHYU.js} +2 -2
- package/dist/{chunk-CBO46LJH.js → chunk-3HSLEUVW.js} +5 -5
- package/dist/chunk-3LUT2C5M.js +122 -0
- package/dist/chunk-3LUT2C5M.js.map +1 -0
- package/dist/{chunk-6VTOGR36.js → chunk-3XZZSHE5.js} +5 -5
- package/dist/{chunk-BLINEMVO.js → chunk-3YLRR4JM.js} +3 -3
- package/dist/{chunk-PD7MKJCM.js → chunk-4AJY7HMH.js} +5 -5
- package/dist/{chunk-UXQVJXQ3.js → chunk-4HUSG5MR.js} +2 -2
- package/dist/{chunk-7CPLKAL6.js → chunk-4M5GEKPM.js} +2 -2
- package/dist/{chunk-WEMI4PV7.js → chunk-4MQ6XTIJ.js} +5 -5
- package/dist/{chunk-7FFY4LJY.js → chunk-5463SZOH.js} +3 -3
- package/dist/{chunk-CAX3NFFE.js → chunk-555TUQ7E.js} +4 -4
- package/dist/{chunk-5KGABAQB.js → chunk-5752357K.js} +4 -4
- package/dist/{chunk-ZOLUUX4B.js → chunk-5J7SA4CZ.js} +4 -4
- package/dist/chunk-5UBP2DJ4.js +102 -0
- package/dist/chunk-5UBP2DJ4.js.map +1 -0
- package/dist/{chunk-YOXYSAUI.js → chunk-5USHYSCO.js} +2 -2
- package/dist/{chunk-5AQLJ4AL.js → chunk-62XVHRTX.js} +2 -2
- package/dist/{chunk-SO5OU2ZV.js → chunk-64AOS2WA.js} +2 -2
- package/dist/{chunk-75I42HHE.js → chunk-66QQ7YQN.js} +2 -2
- package/dist/{chunk-GG7IOJAG.js → chunk-6J7RGNSF.js} +4 -4
- package/dist/{chunk-GCBWZ3MX.js → chunk-6LMYQJZP.js} +2 -2
- package/dist/{chunk-4SQ2WCZA.js → chunk-6MOJK2QT.js} +2 -2
- package/dist/{chunk-Q6MZHT2F.js → chunk-6RTE4UNO.js} +5 -5
- package/dist/{chunk-CW5Z67NA.js → chunk-72GJRV5J.js} +2 -2
- package/dist/{chunk-LYB6YYTG.js → chunk-72OG3AGH.js} +2 -2
- package/dist/{chunk-Y46R26TE.js → chunk-7AC2UGTU.js} +3 -3
- package/dist/{chunk-NPSARV2I.js → chunk-7P5PNRBT.js} +8 -8
- package/dist/{chunk-RPKUZDRY.js → chunk-7QXEEZFO.js} +2 -2
- package/dist/{chunk-SUXT6QAY.js → chunk-7RG37FVT.js} +2 -2
- package/dist/{chunk-5F7HYYGM.js → chunk-7ZROYGUG.js} +3 -3
- package/dist/{chunk-LY5I3ZSV.js → chunk-A2YLFKQU.js} +4 -4
- package/dist/{chunk-WOUJSKQB.js → chunk-A5NXBOWS.js} +7 -7
- package/dist/{chunk-7TKQIZ3K.js → chunk-AAREDFH6.js} +2 -2
- package/dist/{chunk-X2GWR75Q.js → chunk-AEYLFBZT.js} +3 -3
- package/dist/{chunk-VPGDYI63.js → chunk-AKBL7S7A.js} +5 -5
- package/dist/{chunk-6DGNMASB.js → chunk-ALREWFRX.js} +4 -4
- package/dist/{chunk-NQ6P7O7C.js → chunk-ASZGMKB4.js} +2 -2
- package/dist/{chunk-CWCNLITK.js → chunk-AXZCCX7O.js} +2 -2
- package/dist/{chunk-FVL6U72V.js → chunk-B2JYQBO4.js} +2 -2
- package/dist/{chunk-IU2WSJ4F.js → chunk-BARTUKJU.js} +2 -2
- package/dist/{chunk-4JNC5AEF.js → chunk-BTGXHQX3.js} +2 -2
- package/dist/{chunk-VMTOLAZ5.js → chunk-BWFQEASG.js} +5 -5
- package/dist/{chunk-7LMR2H7O.js → chunk-C47LBKEG.js} +4 -4
- package/dist/{chunk-2K2Q7VGV.js → chunk-C5JCARNE.js} +2 -2
- package/dist/{chunk-OK3OJGJY.js → chunk-C7CIUDXZ.js} +3 -3
- package/dist/chunk-CHP3QIS3.js +218 -0
- package/dist/chunk-CHP3QIS3.js.map +1 -0
- package/dist/{chunk-YWXCLPCX.js → chunk-CO7GH3W7.js} +2 -2
- package/dist/{chunk-ARVLS57B.js → chunk-CW6Y32N2.js} +2 -2
- package/dist/{chunk-LZJHHMOF.js → chunk-DRJL3JHR.js} +2 -2
- package/dist/chunk-DTNXP7ZS.js +1 -0
- package/dist/chunk-DTNXP7ZS.js.map +1 -0
- package/dist/{chunk-7IXXASQ6.js → chunk-DXFKPY2K.js} +4 -4
- package/dist/chunk-E53MMMDA.js +209 -0
- package/dist/chunk-E53MMMDA.js.map +1 -0
- package/dist/{chunk-C2NNJMVY.js → chunk-EBCEDBHX.js} +3 -3
- package/dist/{chunk-BRHRK7BK.js → chunk-ENRB6PIN.js} +2 -2
- package/dist/{chunk-HHFVDOA7.js → chunk-F6IMOMA3.js} +3 -3
- package/dist/{chunk-YTDUIU7X.js → chunk-F6LZHF4O.js} +2 -2
- package/dist/{chunk-NZXRPWPW.js → chunk-FAIQCGSL.js} +5 -5
- package/dist/{chunk-HMWSMRLM.js → chunk-FTDGFWB5.js} +5 -5
- package/dist/{chunk-ZE4HF3KC.js → chunk-GFXS5PJL.js} +3 -3
- package/dist/{chunk-YEKPQAOW.js → chunk-GQ2T44BC.js} +2 -2
- package/dist/{chunk-ZAZOBTVS.js → chunk-GSXYXMCV.js} +3 -3
- package/dist/{chunk-IZ7JTG3Z.js → chunk-GTT5UKKO.js} +4 -4
- package/dist/{chunk-WDSJ6SVY.js → chunk-GXSHLMT4.js} +2 -2
- package/dist/chunk-HHPFWEJY.js +28 -0
- package/dist/chunk-HHPFWEJY.js.map +1 -0
- package/dist/{chunk-3EIRRLCQ.js → chunk-HTGK7QCX.js} +3 -3
- package/dist/{chunk-Y3LK6ZQG.js → chunk-I2KAN3YB.js} +2 -2
- package/dist/{chunk-M5DBOM7R.js → chunk-ICRVLGWD.js} +2 -2
- package/dist/{chunk-FVNY5BNV.js → chunk-IQ2U5MVO.js} +7 -7
- package/dist/{chunk-LABIUXDM.js → chunk-J7C7FPVO.js} +2 -2
- package/dist/{chunk-CYH5QQUP.js → chunk-KHIUYLKY.js} +4 -4
- package/dist/{chunk-PPEHBI5O.js → chunk-KXTNTDRD.js} +2 -2
- package/dist/{chunk-IBOFASAZ.js → chunk-LC6ND4ET.js} +2 -2
- package/dist/{chunk-2ONUSNPZ.js → chunk-LG52LMAM.js} +3 -3
- package/dist/{chunk-3Y7LSMGV.js → chunk-LH4VKUZC.js} +2 -2
- package/dist/{chunk-CFDWKQZT.js → chunk-LODYTVOO.js} +2 -2
- package/dist/{chunk-QITQFCFY.js → chunk-LUNN5GTB.js} +2 -2
- package/dist/{chunk-ACBHZG3Z.js → chunk-M74YHHJE.js} +5 -5
- package/dist/{chunk-BGGVYKVZ.js → chunk-MA6SUE7F.js} +4 -4
- package/dist/{chunk-AT6UKTH4.js → chunk-MHFXJRLD.js} +2 -2
- package/dist/{chunk-3BDMYTH6.js → chunk-MHLYX6QW.js} +4 -4
- package/dist/{chunk-FXECKKPW.js → chunk-MO4FFK62.js} +3 -3
- package/dist/{chunk-SAKSIN7E.js → chunk-MQVIYTH5.js} +2 -2
- package/dist/{chunk-X3DN2BE3.js → chunk-MSC43MCJ.js} +2 -2
- package/dist/{chunk-RHVJ3L4U.js → chunk-MWPD2BXO.js} +2 -2
- package/dist/{chunk-TSID4257.js → chunk-N34AOGK3.js} +7 -7
- package/dist/{chunk-NZBEE2PR.js → chunk-N3LW5ER5.js} +3 -3
- package/dist/{chunk-Q3HYEAVQ.js → chunk-N3ZOZWP5.js} +2 -2
- package/dist/{chunk-AO4NDR6W.js → chunk-NTO5DALI.js} +2 -2
- package/dist/{chunk-RVZMKGWQ.js → chunk-NYWAAXDX.js} +2 -2
- package/dist/{chunk-CHGUN7OF.js → chunk-O6SAU5JA.js} +2 -2
- package/dist/{chunk-TDWA2XFJ.js → chunk-OE3SQOZV.js} +2 -2
- package/dist/{chunk-VLH3IMJG.js → chunk-OFXCSLGX.js} +2 -2
- package/dist/{chunk-E54XIRY2.js → chunk-PIP7XII2.js} +5 -5
- package/dist/{chunk-SKIAWOUC.js → chunk-PTQRJEPN.js} +5 -5
- package/dist/{chunk-S5VIN3EB.js → chunk-Q6PRGXR2.js} +2 -2
- package/dist/{chunk-DQ3O252B.js → chunk-QCNUMOTL.js} +2 -2
- package/dist/{chunk-5IIHAYFF.js → chunk-QCQWOSSD.js} +2 -2
- package/dist/{chunk-Y2CHJLWD.js → chunk-QIYX33SH.js} +9 -9
- package/dist/{chunk-RGVNXES5.js → chunk-QQHZBJMU.js} +4 -4
- package/dist/{chunk-XZFTRGRW.js → chunk-QVO4SIS7.js} +2 -2
- package/dist/{chunk-OY437NRJ.js → chunk-QYX4567K.js} +2 -2
- package/dist/{chunk-7JKDB5J5.js → chunk-R53ZOW4B.js} +4 -4
- package/dist/{chunk-HSIUVFXE.js → chunk-RA6W37NZ.js} +2 -2
- package/dist/{chunk-HDTFLW42.js → chunk-REMODSVN.js} +2 -2
- package/dist/{chunk-R2ODLE6G.js → chunk-RIDCGFGM.js} +2 -2
- package/dist/{chunk-RNQ2PGBB.js → chunk-RKVS5AA6.js} +3 -3
- package/dist/{chunk-MKNW4FRR.js → chunk-RS576GOH.js} +7 -7
- package/dist/{chunk-NRADSKGH.js → chunk-SCAPSX6T.js} +2 -2
- package/dist/{chunk-HG2YLNGJ.js → chunk-SFVHZAGE.js} +2 -2
- package/dist/{chunk-5HFB4WFE.js → chunk-T743IIER.js} +3 -3
- package/dist/{chunk-C6LW34TV.js → chunk-THD3N4BJ.js} +2 -2
- package/dist/{chunk-IDRVQVDL.js → chunk-TNDTEI6D.js} +2 -2
- package/dist/{chunk-U2QV4TTZ.js → chunk-TR7ZA67L.js} +2 -2
- package/dist/chunk-TWAKMV5B.js +1 -0
- package/dist/chunk-TWAKMV5B.js.map +1 -0
- package/dist/{chunk-EP3DRILI.js → chunk-U36BXXQ7.js} +2 -2
- package/dist/{chunk-AJ5LXKLQ.js → chunk-U4G3KY6L.js} +6 -6
- package/dist/{chunk-UAFSEZ2E.js → chunk-UQUN2NGE.js} +2 -2
- package/dist/{chunk-6A4PTK5Q.js → chunk-V4JMZZGH.js} +5 -5
- package/dist/{chunk-5M7T36AT.js → chunk-VBGC7G4F.js} +3 -3
- package/dist/{chunk-IWJTLCTF.js → chunk-VD72JGHA.js} +3 -3
- package/dist/{chunk-4NG3LTRX.js → chunk-VJG43WKU.js} +2 -2
- package/dist/{chunk-BGSUSSAV.js → chunk-VMN6KG2U.js} +2 -2
- package/dist/{chunk-YRF7WFAQ.js → chunk-WA6F4NOO.js} +8 -8
- package/dist/{chunk-HOJL2GKW.js → chunk-WC3W36AM.js} +4 -4
- package/dist/{chunk-OQW4OERS.js → chunk-WNIL2KTB.js} +3 -3
- package/dist/{chunk-NQYC7V5N.js → chunk-WOSUYOAU.js} +5 -5
- package/dist/{chunk-DDNUPFPE.js → chunk-WT7VZDTI.js} +5 -5
- package/dist/{chunk-DOWVAC4U.js → chunk-XODBYGTH.js} +2 -2
- package/dist/{chunk-YNZUYZ2O.js → chunk-XRDH24J7.js} +2 -2
- package/dist/{chunk-DQKMOGYZ.js → chunk-XYFBJH6F.js} +4 -4
- package/dist/{chunk-ZCXQ4ZB6.js → chunk-XYSE2QZN.js} +2 -2
- package/dist/{chunk-MIUPTZS6.js → chunk-Y4KR4LT2.js} +2 -2
- package/dist/{chunk-D7PVIC33.js → chunk-Y7YJYUNV.js} +4 -4
- package/dist/{chunk-GHP5JLL3.js → chunk-YASSCBWN.js} +2 -2
- package/dist/{chunk-QLJU7UUI.js → chunk-YH7G44WL.js} +2 -2
- package/dist/chunk-YJBWDDW7.js +162 -0
- package/dist/chunk-YJBWDDW7.js.map +1 -0
- package/dist/{chunk-FS55MQ4Q.js → chunk-YNDTLBOH.js} +2 -2
- package/dist/{chunk-6E4L53DF.js → chunk-YZX4DVRS.js} +2 -2
- package/dist/{chunk-WULEQKU7.js → chunk-Z7COWR4K.js} +2 -2
- package/dist/{chunk-NYA26GV2.js → chunk-ZCCKIWZU.js} +2 -2
- package/dist/{chunk-5WUXJDFP.js → chunk-ZTPB7PVI.js} +2 -2
- package/dist/{chunk-NKHNUTTY.js → chunk-ZXHODKHH.js} +3 -3
- package/dist/{chunk-7LOCLC24.js → chunk-ZYKDUKAH.js} +2 -2
- package/dist/data-display/Badge.js +3 -3
- package/dist/data-display/CardKit.js +6 -6
- package/dist/data-display/Carousel.js +3 -3
- package/dist/data-display/Chart.js +3 -3
- package/dist/data-display/DataViews.js +71 -71
- package/dist/data-display/FleetMap.js +9 -9
- package/dist/data-display/LazyImage.js +3 -3
- package/dist/data-display/MapPreview.js +5 -5
- package/dist/data-display/Sheet.js +3 -3
- package/dist/en-US.js +6 -6
- package/dist/feedback/ConfirmAction.js +5 -5
- package/dist/feedback/NotificationStatusNotice.js +5 -5
- package/dist/feedback/SequenceResolver.js +56 -0
- package/dist/feedback/SequenceResolver.js.map +1 -0
- package/dist/feedback/TutorialOverlay.js +2 -2
- package/dist/form/AddressAutocomplete.js +11 -11
- package/dist/form/Autocomplete.js +4 -4
- package/dist/form/Button.js +4 -4
- package/dist/form/Calendar.js +2 -2
- package/dist/form/CategorySelect.js +11 -11
- package/dist/form/CepField.js +6 -6
- package/dist/form/CodeEditor.js +3 -3
- package/dist/form/Command.js +5 -5
- package/dist/form/CreatableSelect.js +3 -3
- package/dist/form/DateRangePicker.js +9 -9
- package/dist/form/Input/outlined.js +5 -5
- package/dist/form/Input.js +5 -5
- package/dist/form/InputOTP.js +4 -4
- package/dist/form/Label.js +3 -3
- package/dist/form/MenuSelect.js +4 -4
- package/dist/form/Menubar.js +5 -5
- package/dist/form/NumberField.js +6 -6
- package/dist/form/PhoneInput.js +3 -3
- package/dist/form/PickerSheet.js +6 -6
- package/dist/form/RadioGroup.js +5 -5
- package/dist/form/RichTextEditor.js +2 -2
- package/dist/form/Select.js +6 -6
- package/dist/form/Textarea.js +3 -3
- package/dist/form/Toggle.js +4 -4
- package/dist/form/ToggleGroup.js +3 -3
- package/dist/form/UploadButton.js +2 -2
- package/dist/form/total-form.js +32 -32
- package/dist/icons.js +6 -6
- package/dist/layout/Box.js +6 -6
- package/dist/layout/ContentToolbar.js +11 -11
- package/dist/layout/Screen.js +7 -7
- package/dist/layout/SettingCard.js +18 -18
- package/dist/layout/SettingsLayout.js +3 -3
- package/dist/layout/Stack.js +7 -7
- package/dist/layout/TableFilter.js +3 -3
- package/dist/locales.js +11 -11
- package/dist/navigation/AppHeader.js +8 -8
- package/dist/navigation/NavigationMenu.js +4 -4
- package/dist/navigation/Pagination.js +4 -4
- package/dist/navigation/SectionNav.js +6 -6
- package/dist/navigation/Tabs.js +2 -2
- package/dist/provider.js +6 -6
- package/dist/pt-BR.js +5 -5
- package/dist/social-login-button.js +5 -5
- package/dist/tokens.js +4 -4
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.d.ts +17 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.metrics.d.ts +33 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.metrics.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.parts.d.ts +61 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.parts.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.styles.d.ts +51 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.styles.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.types.d.ts +175 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.types.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/index.d.ts +3 -0
- package/dist/types/components/feedback/SequenceResolver/index.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/sequence-model.d.ts +85 -0
- package/dist/types/components/feedback/SequenceResolver/sequence-model.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/useSequenceRun.d.ts +24 -0
- package/dist/types/components/feedback/SequenceResolver/useSequenceRun.d.ts.map +1 -0
- package/dist/types/components/feedback/index.d.ts +1 -0
- package/dist/types/components/feedback/index.d.ts.map +1 -1
- package/dist/user-avatar.js +5 -5
- package/dist/utility/WorkflowStep.js +3 -3
- package/package.json +5 -1
- package/src/components/feedback/SequenceResolver/SequenceResolver.md +136 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.metrics.ts +26 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.parts.tsx +307 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.styles.ts +238 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.tsx +179 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.types.ts +185 -0
- package/src/components/feedback/SequenceResolver/index.ts +14 -0
- package/src/components/feedback/SequenceResolver/sequence-model.ts +181 -0
- package/src/components/feedback/SequenceResolver/useSequenceRun.ts +205 -0
- package/src/components/feedback/index.ts +1 -0
- package/dist/chunk-6YIKVXAV.js +0 -1
- /package/dist/{chunk-6YIKVXAV.js.map → _internal/components/feedback/SequenceResolver/SequenceResolver.js.map} +0 -0
- /package/dist/{chunk-75FHDUJW.js.map → chunk-2D4WKET2.js.map} +0 -0
- /package/dist/{chunk-3O2OJW4O.js.map → chunk-2QO3BKUQ.js.map} +0 -0
- /package/dist/{chunk-HXCUKZOB.js.map → chunk-2VHAD4NE.js.map} +0 -0
- /package/dist/{chunk-FJ3UZ4RC.js.map → chunk-33MMQHYU.js.map} +0 -0
- /package/dist/{chunk-CBO46LJH.js.map → chunk-3HSLEUVW.js.map} +0 -0
- /package/dist/{chunk-6VTOGR36.js.map → chunk-3XZZSHE5.js.map} +0 -0
- /package/dist/{chunk-BLINEMVO.js.map → chunk-3YLRR4JM.js.map} +0 -0
- /package/dist/{chunk-PD7MKJCM.js.map → chunk-4AJY7HMH.js.map} +0 -0
- /package/dist/{chunk-UXQVJXQ3.js.map → chunk-4HUSG5MR.js.map} +0 -0
- /package/dist/{chunk-7CPLKAL6.js.map → chunk-4M5GEKPM.js.map} +0 -0
- /package/dist/{chunk-WEMI4PV7.js.map → chunk-4MQ6XTIJ.js.map} +0 -0
- /package/dist/{chunk-7FFY4LJY.js.map → chunk-5463SZOH.js.map} +0 -0
- /package/dist/{chunk-CAX3NFFE.js.map → chunk-555TUQ7E.js.map} +0 -0
- /package/dist/{chunk-5KGABAQB.js.map → chunk-5752357K.js.map} +0 -0
- /package/dist/{chunk-ZOLUUX4B.js.map → chunk-5J7SA4CZ.js.map} +0 -0
- /package/dist/{chunk-YOXYSAUI.js.map → chunk-5USHYSCO.js.map} +0 -0
- /package/dist/{chunk-5AQLJ4AL.js.map → chunk-62XVHRTX.js.map} +0 -0
- /package/dist/{chunk-SO5OU2ZV.js.map → chunk-64AOS2WA.js.map} +0 -0
- /package/dist/{chunk-75I42HHE.js.map → chunk-66QQ7YQN.js.map} +0 -0
- /package/dist/{chunk-GG7IOJAG.js.map → chunk-6J7RGNSF.js.map} +0 -0
- /package/dist/{chunk-GCBWZ3MX.js.map → chunk-6LMYQJZP.js.map} +0 -0
- /package/dist/{chunk-4SQ2WCZA.js.map → chunk-6MOJK2QT.js.map} +0 -0
- /package/dist/{chunk-Q6MZHT2F.js.map → chunk-6RTE4UNO.js.map} +0 -0
- /package/dist/{chunk-CW5Z67NA.js.map → chunk-72GJRV5J.js.map} +0 -0
- /package/dist/{chunk-LYB6YYTG.js.map → chunk-72OG3AGH.js.map} +0 -0
- /package/dist/{chunk-Y46R26TE.js.map → chunk-7AC2UGTU.js.map} +0 -0
- /package/dist/{chunk-NPSARV2I.js.map → chunk-7P5PNRBT.js.map} +0 -0
- /package/dist/{chunk-RPKUZDRY.js.map → chunk-7QXEEZFO.js.map} +0 -0
- /package/dist/{chunk-SUXT6QAY.js.map → chunk-7RG37FVT.js.map} +0 -0
- /package/dist/{chunk-5F7HYYGM.js.map → chunk-7ZROYGUG.js.map} +0 -0
- /package/dist/{chunk-LY5I3ZSV.js.map → chunk-A2YLFKQU.js.map} +0 -0
- /package/dist/{chunk-WOUJSKQB.js.map → chunk-A5NXBOWS.js.map} +0 -0
- /package/dist/{chunk-7TKQIZ3K.js.map → chunk-AAREDFH6.js.map} +0 -0
- /package/dist/{chunk-X2GWR75Q.js.map → chunk-AEYLFBZT.js.map} +0 -0
- /package/dist/{chunk-VPGDYI63.js.map → chunk-AKBL7S7A.js.map} +0 -0
- /package/dist/{chunk-6DGNMASB.js.map → chunk-ALREWFRX.js.map} +0 -0
- /package/dist/{chunk-NQ6P7O7C.js.map → chunk-ASZGMKB4.js.map} +0 -0
- /package/dist/{chunk-CWCNLITK.js.map → chunk-AXZCCX7O.js.map} +0 -0
- /package/dist/{chunk-FVL6U72V.js.map → chunk-B2JYQBO4.js.map} +0 -0
- /package/dist/{chunk-IU2WSJ4F.js.map → chunk-BARTUKJU.js.map} +0 -0
- /package/dist/{chunk-4JNC5AEF.js.map → chunk-BTGXHQX3.js.map} +0 -0
- /package/dist/{chunk-VMTOLAZ5.js.map → chunk-BWFQEASG.js.map} +0 -0
- /package/dist/{chunk-7LMR2H7O.js.map → chunk-C47LBKEG.js.map} +0 -0
- /package/dist/{chunk-2K2Q7VGV.js.map → chunk-C5JCARNE.js.map} +0 -0
- /package/dist/{chunk-OK3OJGJY.js.map → chunk-C7CIUDXZ.js.map} +0 -0
- /package/dist/{chunk-YWXCLPCX.js.map → chunk-CO7GH3W7.js.map} +0 -0
- /package/dist/{chunk-ARVLS57B.js.map → chunk-CW6Y32N2.js.map} +0 -0
- /package/dist/{chunk-LZJHHMOF.js.map → chunk-DRJL3JHR.js.map} +0 -0
- /package/dist/{chunk-7IXXASQ6.js.map → chunk-DXFKPY2K.js.map} +0 -0
- /package/dist/{chunk-C2NNJMVY.js.map → chunk-EBCEDBHX.js.map} +0 -0
- /package/dist/{chunk-BRHRK7BK.js.map → chunk-ENRB6PIN.js.map} +0 -0
- /package/dist/{chunk-HHFVDOA7.js.map → chunk-F6IMOMA3.js.map} +0 -0
- /package/dist/{chunk-YTDUIU7X.js.map → chunk-F6LZHF4O.js.map} +0 -0
- /package/dist/{chunk-NZXRPWPW.js.map → chunk-FAIQCGSL.js.map} +0 -0
- /package/dist/{chunk-HMWSMRLM.js.map → chunk-FTDGFWB5.js.map} +0 -0
- /package/dist/{chunk-ZE4HF3KC.js.map → chunk-GFXS5PJL.js.map} +0 -0
- /package/dist/{chunk-YEKPQAOW.js.map → chunk-GQ2T44BC.js.map} +0 -0
- /package/dist/{chunk-ZAZOBTVS.js.map → chunk-GSXYXMCV.js.map} +0 -0
- /package/dist/{chunk-IZ7JTG3Z.js.map → chunk-GTT5UKKO.js.map} +0 -0
- /package/dist/{chunk-WDSJ6SVY.js.map → chunk-GXSHLMT4.js.map} +0 -0
- /package/dist/{chunk-3EIRRLCQ.js.map → chunk-HTGK7QCX.js.map} +0 -0
- /package/dist/{chunk-Y3LK6ZQG.js.map → chunk-I2KAN3YB.js.map} +0 -0
- /package/dist/{chunk-M5DBOM7R.js.map → chunk-ICRVLGWD.js.map} +0 -0
- /package/dist/{chunk-FVNY5BNV.js.map → chunk-IQ2U5MVO.js.map} +0 -0
- /package/dist/{chunk-LABIUXDM.js.map → chunk-J7C7FPVO.js.map} +0 -0
- /package/dist/{chunk-CYH5QQUP.js.map → chunk-KHIUYLKY.js.map} +0 -0
- /package/dist/{chunk-PPEHBI5O.js.map → chunk-KXTNTDRD.js.map} +0 -0
- /package/dist/{chunk-IBOFASAZ.js.map → chunk-LC6ND4ET.js.map} +0 -0
- /package/dist/{chunk-2ONUSNPZ.js.map → chunk-LG52LMAM.js.map} +0 -0
- /package/dist/{chunk-3Y7LSMGV.js.map → chunk-LH4VKUZC.js.map} +0 -0
- /package/dist/{chunk-CFDWKQZT.js.map → chunk-LODYTVOO.js.map} +0 -0
- /package/dist/{chunk-QITQFCFY.js.map → chunk-LUNN5GTB.js.map} +0 -0
- /package/dist/{chunk-ACBHZG3Z.js.map → chunk-M74YHHJE.js.map} +0 -0
- /package/dist/{chunk-BGGVYKVZ.js.map → chunk-MA6SUE7F.js.map} +0 -0
- /package/dist/{chunk-AT6UKTH4.js.map → chunk-MHFXJRLD.js.map} +0 -0
- /package/dist/{chunk-3BDMYTH6.js.map → chunk-MHLYX6QW.js.map} +0 -0
- /package/dist/{chunk-FXECKKPW.js.map → chunk-MO4FFK62.js.map} +0 -0
- /package/dist/{chunk-SAKSIN7E.js.map → chunk-MQVIYTH5.js.map} +0 -0
- /package/dist/{chunk-X3DN2BE3.js.map → chunk-MSC43MCJ.js.map} +0 -0
- /package/dist/{chunk-RHVJ3L4U.js.map → chunk-MWPD2BXO.js.map} +0 -0
- /package/dist/{chunk-TSID4257.js.map → chunk-N34AOGK3.js.map} +0 -0
- /package/dist/{chunk-NZBEE2PR.js.map → chunk-N3LW5ER5.js.map} +0 -0
- /package/dist/{chunk-Q3HYEAVQ.js.map → chunk-N3ZOZWP5.js.map} +0 -0
- /package/dist/{chunk-AO4NDR6W.js.map → chunk-NTO5DALI.js.map} +0 -0
- /package/dist/{chunk-RVZMKGWQ.js.map → chunk-NYWAAXDX.js.map} +0 -0
- /package/dist/{chunk-CHGUN7OF.js.map → chunk-O6SAU5JA.js.map} +0 -0
- /package/dist/{chunk-TDWA2XFJ.js.map → chunk-OE3SQOZV.js.map} +0 -0
- /package/dist/{chunk-VLH3IMJG.js.map → chunk-OFXCSLGX.js.map} +0 -0
- /package/dist/{chunk-E54XIRY2.js.map → chunk-PIP7XII2.js.map} +0 -0
- /package/dist/{chunk-SKIAWOUC.js.map → chunk-PTQRJEPN.js.map} +0 -0
- /package/dist/{chunk-S5VIN3EB.js.map → chunk-Q6PRGXR2.js.map} +0 -0
- /package/dist/{chunk-DQ3O252B.js.map → chunk-QCNUMOTL.js.map} +0 -0
- /package/dist/{chunk-5IIHAYFF.js.map → chunk-QCQWOSSD.js.map} +0 -0
- /package/dist/{chunk-Y2CHJLWD.js.map → chunk-QIYX33SH.js.map} +0 -0
- /package/dist/{chunk-RGVNXES5.js.map → chunk-QQHZBJMU.js.map} +0 -0
- /package/dist/{chunk-XZFTRGRW.js.map → chunk-QVO4SIS7.js.map} +0 -0
- /package/dist/{chunk-OY437NRJ.js.map → chunk-QYX4567K.js.map} +0 -0
- /package/dist/{chunk-7JKDB5J5.js.map → chunk-R53ZOW4B.js.map} +0 -0
- /package/dist/{chunk-HSIUVFXE.js.map → chunk-RA6W37NZ.js.map} +0 -0
- /package/dist/{chunk-HDTFLW42.js.map → chunk-REMODSVN.js.map} +0 -0
- /package/dist/{chunk-R2ODLE6G.js.map → chunk-RIDCGFGM.js.map} +0 -0
- /package/dist/{chunk-RNQ2PGBB.js.map → chunk-RKVS5AA6.js.map} +0 -0
- /package/dist/{chunk-MKNW4FRR.js.map → chunk-RS576GOH.js.map} +0 -0
- /package/dist/{chunk-NRADSKGH.js.map → chunk-SCAPSX6T.js.map} +0 -0
- /package/dist/{chunk-HG2YLNGJ.js.map → chunk-SFVHZAGE.js.map} +0 -0
- /package/dist/{chunk-5HFB4WFE.js.map → chunk-T743IIER.js.map} +0 -0
- /package/dist/{chunk-C6LW34TV.js.map → chunk-THD3N4BJ.js.map} +0 -0
- /package/dist/{chunk-IDRVQVDL.js.map → chunk-TNDTEI6D.js.map} +0 -0
- /package/dist/{chunk-U2QV4TTZ.js.map → chunk-TR7ZA67L.js.map} +0 -0
- /package/dist/{chunk-EP3DRILI.js.map → chunk-U36BXXQ7.js.map} +0 -0
- /package/dist/{chunk-AJ5LXKLQ.js.map → chunk-U4G3KY6L.js.map} +0 -0
- /package/dist/{chunk-UAFSEZ2E.js.map → chunk-UQUN2NGE.js.map} +0 -0
- /package/dist/{chunk-6A4PTK5Q.js.map → chunk-V4JMZZGH.js.map} +0 -0
- /package/dist/{chunk-5M7T36AT.js.map → chunk-VBGC7G4F.js.map} +0 -0
- /package/dist/{chunk-IWJTLCTF.js.map → chunk-VD72JGHA.js.map} +0 -0
- /package/dist/{chunk-4NG3LTRX.js.map → chunk-VJG43WKU.js.map} +0 -0
- /package/dist/{chunk-BGSUSSAV.js.map → chunk-VMN6KG2U.js.map} +0 -0
- /package/dist/{chunk-YRF7WFAQ.js.map → chunk-WA6F4NOO.js.map} +0 -0
- /package/dist/{chunk-HOJL2GKW.js.map → chunk-WC3W36AM.js.map} +0 -0
- /package/dist/{chunk-OQW4OERS.js.map → chunk-WNIL2KTB.js.map} +0 -0
- /package/dist/{chunk-NQYC7V5N.js.map → chunk-WOSUYOAU.js.map} +0 -0
- /package/dist/{chunk-DDNUPFPE.js.map → chunk-WT7VZDTI.js.map} +0 -0
- /package/dist/{chunk-DOWVAC4U.js.map → chunk-XODBYGTH.js.map} +0 -0
- /package/dist/{chunk-YNZUYZ2O.js.map → chunk-XRDH24J7.js.map} +0 -0
- /package/dist/{chunk-DQKMOGYZ.js.map → chunk-XYFBJH6F.js.map} +0 -0
- /package/dist/{chunk-ZCXQ4ZB6.js.map → chunk-XYSE2QZN.js.map} +0 -0
- /package/dist/{chunk-MIUPTZS6.js.map → chunk-Y4KR4LT2.js.map} +0 -0
- /package/dist/{chunk-D7PVIC33.js.map → chunk-Y7YJYUNV.js.map} +0 -0
- /package/dist/{chunk-GHP5JLL3.js.map → chunk-YASSCBWN.js.map} +0 -0
- /package/dist/{chunk-QLJU7UUI.js.map → chunk-YH7G44WL.js.map} +0 -0
- /package/dist/{chunk-FS55MQ4Q.js.map → chunk-YNDTLBOH.js.map} +0 -0
- /package/dist/{chunk-6E4L53DF.js.map → chunk-YZX4DVRS.js.map} +0 -0
- /package/dist/{chunk-WULEQKU7.js.map → chunk-Z7COWR4K.js.map} +0 -0
- /package/dist/{chunk-NYA26GV2.js.map → chunk-ZCCKIWZU.js.map} +0 -0
- /package/dist/{chunk-5WUXJDFP.js.map → chunk-ZTPB7PVI.js.map} +0 -0
- /package/dist/{chunk-NKHNUTTY.js.map → chunk-ZXHODKHH.js.map} +0 -0
- /package/dist/{chunk-7LOCLC24.js.map → chunk-ZYKDUKAH.js.map} +0 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import Box from '@mui/material/Box/index.js';
|
|
4
|
+
import { useTheme } from '@mui/material/styles/index.js';
|
|
5
|
+
import useMediaQuery from '@mui/material/useMediaQuery/index.js';
|
|
6
|
+
import React, { useCallback, useId, useRef } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Dialog } from '../Dialog';
|
|
9
|
+
import { currentOf, positionOf, progressOf, summaryOf, type RunState } from './sequence-model';
|
|
10
|
+
import { SequenceDoneBody, SequenceHeader, SequenceIntroBody, SequenceStepBody } from './SequenceResolver.parts';
|
|
11
|
+
import { SEQUENCE_METRICS } from './SequenceResolver.metrics';
|
|
12
|
+
import { chromeSx, columnSx, paperSx, scrollBodySx } from './SequenceResolver.styles';
|
|
13
|
+
import type { SequenceItem, SequenceResolverProps, SequenceStepApi } from './SequenceResolver.types';
|
|
14
|
+
import { useSequenceRun, type SequenceRun } from './useSequenceRun';
|
|
15
|
+
|
|
16
|
+
/** What the header's label says on the screen showing. */
|
|
17
|
+
function headerLabelOf<I extends SequenceItem, R>(
|
|
18
|
+
props: SequenceResolverProps<I, R>,
|
|
19
|
+
run: RunState<I, R>,
|
|
20
|
+
current: I | undefined,
|
|
21
|
+
): string {
|
|
22
|
+
const { labels } = props;
|
|
23
|
+
if (props.intro) return labels.introStep;
|
|
24
|
+
if (!current) return labels.doneStep;
|
|
25
|
+
return labels.step(positionOf(run), summaryOf(run).total, current);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** The header's back button, once a previous step exists and the host allows it. */
|
|
29
|
+
function backOf<I extends SequenceItem, R>(props: SequenceResolverProps<I, R>, state: SequenceRun<I, R>) {
|
|
30
|
+
const { intro, labels, canGoBack = true } = props;
|
|
31
|
+
if (intro || !canGoBack || state.run.visits.length === 0) return undefined;
|
|
32
|
+
return { label: labels.back, accessible: labels.backAccessible, onClick: state.back, disabled: state.busy };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Esc closes. `persistent` turns MUI's own Esc off together with the veil's
|
|
37
|
+
* click (the prototype's veil does nothing), so Esc is put back here; a popup
|
|
38
|
+
* inside a step that handles its own Esc stops it before it gets here.
|
|
39
|
+
*/
|
|
40
|
+
function escapeCloses(close: () => void) {
|
|
41
|
+
return (event: React.KeyboardEvent): void => {
|
|
42
|
+
if (event.key !== 'Escape' || event.defaultPrevented) return;
|
|
43
|
+
event.stopPropagation();
|
|
44
|
+
close();
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface BodyProps<I extends SequenceItem, R> {
|
|
49
|
+
props: SequenceResolverProps<I, R>;
|
|
50
|
+
state: SequenceRun<I, R>;
|
|
51
|
+
current: I | undefined;
|
|
52
|
+
api: SequenceStepApi<R>;
|
|
53
|
+
titleId: string;
|
|
54
|
+
stepTitleRef: React.RefObject<HTMLElement | null>;
|
|
55
|
+
touch: boolean;
|
|
56
|
+
testId: string;
|
|
57
|
+
close: () => void;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** The intro, the step on screen, or the end screen. */
|
|
61
|
+
function SequenceBody<I extends SequenceItem, R>(body: BodyProps<I, R>): React.JSX.Element {
|
|
62
|
+
const { props, state, current, api, titleId, stepTitleRef, touch, testId, close } = body;
|
|
63
|
+
if (props.intro) {
|
|
64
|
+
return <SequenceIntroBody intro={props.intro} titleId={titleId} testId={testId} screenKey="intro" />;
|
|
65
|
+
}
|
|
66
|
+
if (current) {
|
|
67
|
+
return (
|
|
68
|
+
<SequenceStepBody
|
|
69
|
+
step={props.renderStep(current, api)}
|
|
70
|
+
skip={{ label: props.labels.skip, onClick: state.skip }}
|
|
71
|
+
busy={state.busy}
|
|
72
|
+
error={state.error}
|
|
73
|
+
touch={touch}
|
|
74
|
+
testId={testId}
|
|
75
|
+
screenKey={`step:${current.key}`}
|
|
76
|
+
titleRef={stepTitleRef}
|
|
77
|
+
/>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
const summary = summaryOf(state.run);
|
|
81
|
+
return (
|
|
82
|
+
<SequenceDoneBody
|
|
83
|
+
done={typeof props.done === 'function' ? props.done(summary) : props.done}
|
|
84
|
+
titleId={titleId}
|
|
85
|
+
error={state.error}
|
|
86
|
+
touch={touch}
|
|
87
|
+
onConfirm={close}
|
|
88
|
+
testId={testId}
|
|
89
|
+
screenKey="done"
|
|
90
|
+
/>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Resolve a queue of problems one at a time, in ONE dialog whose body is
|
|
96
|
+
* replaced step by step: a header with "‹ Back", the step's label and close,
|
|
97
|
+
* a progress bar, the host's step, and an end screen (FUT-3671).
|
|
98
|
+
*
|
|
99
|
+
* A centred `Dialog` from the `sm` breakpoint up; the `Dialog` inset
|
|
100
|
+
* bottom-sheet variant below it, never taller than 95% of the viewport. Either
|
|
101
|
+
* way the paper scrolls inside the viewport, so a long step is never cut off.
|
|
102
|
+
*
|
|
103
|
+
* The component owns the run — which step is on screen, what was answered or
|
|
104
|
+
* skipped, where Back returns to — and nothing about the domain: every step
|
|
105
|
+
* body, every word and every server call is the host's.
|
|
106
|
+
*/
|
|
107
|
+
export function SequenceResolver<I extends SequenceItem, R = unknown>(
|
|
108
|
+
props: SequenceResolverProps<I, R>,
|
|
109
|
+
): React.JSX.Element {
|
|
110
|
+
const { open, onClose, intro, labels } = props;
|
|
111
|
+
const testId = props.dataTestId ?? 'sequence-resolver';
|
|
112
|
+
const theme = useTheme();
|
|
113
|
+
const touch = useMediaQuery(theme.breakpoints.down(SEQUENCE_METRICS.sheetBreakpoint));
|
|
114
|
+
const titleId = `${useId()}-title`;
|
|
115
|
+
const stepTitleRef = useRef<HTMLElement | null>(null);
|
|
116
|
+
const titleRef = useCallback((node: HTMLElement | null) => {
|
|
117
|
+
stepTitleRef.current = node;
|
|
118
|
+
}, []);
|
|
119
|
+
|
|
120
|
+
const state = useSequenceRun<I, R>({
|
|
121
|
+
open,
|
|
122
|
+
active: open && !intro,
|
|
123
|
+
queue: props.queue,
|
|
124
|
+
onBack: props.onBack,
|
|
125
|
+
failed: labels.failed,
|
|
126
|
+
});
|
|
127
|
+
const { run, busy } = state;
|
|
128
|
+
const current = intro ? undefined : currentOf(run);
|
|
129
|
+
const close = (): void => onClose(summaryOf(run));
|
|
130
|
+
const api: SequenceStepApi<R> = {
|
|
131
|
+
resolve: state.resolve,
|
|
132
|
+
skip: state.skip,
|
|
133
|
+
back: state.back,
|
|
134
|
+
busy,
|
|
135
|
+
titleProps: { id: titleId, tabIndex: -1, ref: titleRef },
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<Dialog
|
|
140
|
+
open={open}
|
|
141
|
+
onClose={close}
|
|
142
|
+
persistent
|
|
143
|
+
variant={touch ? 'bottom-sheet' : 'default'}
|
|
144
|
+
size="sm"
|
|
145
|
+
aria-labelledby={titleId}
|
|
146
|
+
onKeyDown={escapeCloses(close)}
|
|
147
|
+
slotProps={{ paper: { sx: paperSx(touch) } }}
|
|
148
|
+
dataTestId={testId}
|
|
149
|
+
>
|
|
150
|
+
<Box sx={columnSx}>
|
|
151
|
+
<Box sx={chromeSx}>
|
|
152
|
+
<SequenceHeader
|
|
153
|
+
touch={touch}
|
|
154
|
+
label={headerLabelOf(props, run, current)}
|
|
155
|
+
back={backOf(props, state)}
|
|
156
|
+
closeLabel={labels.close}
|
|
157
|
+
onClose={close}
|
|
158
|
+
progress={intro ? 0 : progressOf(run)}
|
|
159
|
+
progressLabel={labels.progress}
|
|
160
|
+
testId={testId}
|
|
161
|
+
/>
|
|
162
|
+
</Box>
|
|
163
|
+
<Box sx={scrollBodySx} data-testid={`${testId}-body`}>
|
|
164
|
+
<SequenceBody
|
|
165
|
+
props={props}
|
|
166
|
+
state={state}
|
|
167
|
+
current={current}
|
|
168
|
+
api={api}
|
|
169
|
+
titleId={titleId}
|
|
170
|
+
stepTitleRef={stepTitleRef}
|
|
171
|
+
touch={touch}
|
|
172
|
+
testId={testId}
|
|
173
|
+
close={close}
|
|
174
|
+
/>
|
|
175
|
+
</Box>
|
|
176
|
+
</Box>
|
|
177
|
+
</Dialog>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One entry of the queue a {@link SequenceResolverProps} walks through.
|
|
5
|
+
*
|
|
6
|
+
* Extend it with whatever the host's step needs (`item.payload`, an id, the
|
|
7
|
+
* row it came from): the component only reads `key` and `kindLabel`, and hands
|
|
8
|
+
* the WHOLE item back to `renderStep` and `onBack`.
|
|
9
|
+
*/
|
|
10
|
+
export interface SequenceItem {
|
|
11
|
+
/** Stable identity across re-renders and refetches — what the run tracks. */
|
|
12
|
+
key: string;
|
|
13
|
+
/** The kind word the header shows next to the position ("Purchase"). */
|
|
14
|
+
kindLabel: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Where the run stands, handed to the end screen, `onClose` and `labels.step`. */
|
|
18
|
+
export interface SequenceSummary {
|
|
19
|
+
/** Steps answered with `resolve`. */
|
|
20
|
+
resolved: number;
|
|
21
|
+
/** Steps passed over with `skip`. */
|
|
22
|
+
skipped: number;
|
|
23
|
+
/** Every step of the run so far: answered + skipped + still ahead. */
|
|
24
|
+
total: number;
|
|
25
|
+
/**
|
|
26
|
+
* Problems the host reported as resolved TOGETHER with an answered step
|
|
27
|
+
* (`api.resolve(result, { alsoResolved })` — "apply to every sibling"),
|
|
28
|
+
* which never became steps. `resolved + alsoResolved` is what a close toast
|
|
29
|
+
* counts; the end screen's "N of M" counts steps.
|
|
30
|
+
*/
|
|
31
|
+
alsoResolved: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** What an answer can say besides its result. */
|
|
35
|
+
export interface SequenceResolveOptions {
|
|
36
|
+
/** How many OTHER problems this answer resolved too (siblings that never became steps). */
|
|
37
|
+
alsoResolved?: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** A button a step puts in the resolver's footer. */
|
|
41
|
+
export interface SequenceAction {
|
|
42
|
+
label: string;
|
|
43
|
+
onClick: () => void;
|
|
44
|
+
/** Disabled on top of the resolver's own `busy`. */
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** What `renderStep` gets: the run's verbs and its state. */
|
|
49
|
+
export interface SequenceStepApi<R> {
|
|
50
|
+
/**
|
|
51
|
+
* Answer this step and move to the next one. Pass the result itself, or the
|
|
52
|
+
* PROMISE of it (the host's server write): the step stays on screen and
|
|
53
|
+
* `busy` until it settles; a rejection keeps it and shows the rejection's
|
|
54
|
+
* message. The result is what `onBack` receives if the reader returns.
|
|
55
|
+
*/
|
|
56
|
+
resolve: (result: R | PromiseLike<R>, options?: SequenceResolveOptions) => void;
|
|
57
|
+
/** Leave this step unanswered and move on. */
|
|
58
|
+
skip: () => void;
|
|
59
|
+
/** Return to the previous step (the header's back button does the same). */
|
|
60
|
+
back: () => void;
|
|
61
|
+
/** True while a `resolve` promise or an `onBack` is pending — disable the step's own answers. */
|
|
62
|
+
busy: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Spread on the step's TITLE — the item's name, first and large. It names
|
|
65
|
+
* the dialog (`aria-labelledby`) and takes focus on every advance.
|
|
66
|
+
*/
|
|
67
|
+
titleProps: {
|
|
68
|
+
id: string;
|
|
69
|
+
tabIndex: -1;
|
|
70
|
+
ref: React.RefCallback<HTMLElement>;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** What a step renders: its body and, at most, two footer actions plus one tertiary. */
|
|
75
|
+
export interface SequenceStep {
|
|
76
|
+
/** The body: item name (spread `titleProps` on it), question, facts, inputs. */
|
|
77
|
+
content: React.ReactNode;
|
|
78
|
+
/** The step's verb ("Save limits"). Omit for a step answered from its body (a list of reasons). */
|
|
79
|
+
primary?: SequenceAction;
|
|
80
|
+
/**
|
|
81
|
+
* The secondary action. Omitted, it is SKIP with `labels.skip`; pass one to
|
|
82
|
+
* reword it ("Not bought yet") or to replace it (a split mode's "One reason
|
|
83
|
+
* only"); `false` removes it.
|
|
84
|
+
*/
|
|
85
|
+
secondary?: SequenceAction | false;
|
|
86
|
+
/** One text button above the footer ("It was a stock count, not a loss"). */
|
|
87
|
+
tertiary?: SequenceAction;
|
|
88
|
+
/**
|
|
89
|
+
* How the footer lays its actions out on a pointer: `'end'` (default) —
|
|
90
|
+
* auto-width, right-aligned, over a hairline; `'split'` — two equal
|
|
91
|
+
* full-width columns, no hairline (a form step: limits, a purchase). On a
|
|
92
|
+
* phone the actions always share the row, with no hairline.
|
|
93
|
+
*/
|
|
94
|
+
footer?: 'end' | 'split';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** One kind on the intro screen. */
|
|
98
|
+
export interface SequenceCategory {
|
|
99
|
+
label: string;
|
|
100
|
+
description?: string;
|
|
101
|
+
/** How many problems of this kind there are. A kind at zero should not be listed. */
|
|
102
|
+
count: number;
|
|
103
|
+
/** Resolve only this kind: set the queue to it and drop `intro`. */
|
|
104
|
+
onPick: () => void;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** The screen before the run: the kinds with their counts, and "resolve them all". */
|
|
108
|
+
export interface SequenceIntro {
|
|
109
|
+
title: string;
|
|
110
|
+
description?: string;
|
|
111
|
+
categories: SequenceCategory[];
|
|
112
|
+
startAllLabel: string;
|
|
113
|
+
/** Resolve every kind: set the queue to all of them and drop `intro`. */
|
|
114
|
+
onStartAll: () => void;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** The end screen's words. */
|
|
118
|
+
export interface SequenceDone {
|
|
119
|
+
title: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
/** The one button there; it closes the resolver. */
|
|
122
|
+
confirmLabel: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** The chrome's words. The package ships none: every one is the host's. */
|
|
126
|
+
export interface SequenceResolverLabels {
|
|
127
|
+
/** The back button's visible word ("Back"); a chevron icon precedes it. */
|
|
128
|
+
back: string;
|
|
129
|
+
/** The back button's accessible name, when it says more ("Back to the previous problem"). Must contain `back`. */
|
|
130
|
+
backAccessible?: string;
|
|
131
|
+
/** The close button's accessible name. */
|
|
132
|
+
close: string;
|
|
133
|
+
/** The default secondary action: leave the step unanswered. */
|
|
134
|
+
skip: string;
|
|
135
|
+
/** The header label on a step: `"Problem 3 of 13 · Purchase"`. `position` is 1-based. */
|
|
136
|
+
step: (position: number, total: number, item: SequenceItem) => string;
|
|
137
|
+
/** The header label on the intro screen. */
|
|
138
|
+
introStep: string;
|
|
139
|
+
/** The header label on the end screen. */
|
|
140
|
+
doneStep: string;
|
|
141
|
+
/** The progress bar's accessible name. */
|
|
142
|
+
progress: string;
|
|
143
|
+
/** Shown when `onBack` / a `resolve` promise rejects with no message of its own. */
|
|
144
|
+
failed: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface SequenceResolverProps<I extends SequenceItem = SequenceItem, R = unknown> {
|
|
148
|
+
open: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* The close button, Esc, and the end screen's button. Gets where the run
|
|
151
|
+
* stood, for the host's "N resolved · Undo" toast.
|
|
152
|
+
*/
|
|
153
|
+
onClose: (summary: SequenceSummary) => void;
|
|
154
|
+
/**
|
|
155
|
+
* While given, the intro screen shows instead of the run. The host drops it
|
|
156
|
+
* (and sets `queue`) in the same update as a category's `onPick` / `onStartAll`.
|
|
157
|
+
*/
|
|
158
|
+
intro?: SequenceIntro;
|
|
159
|
+
/**
|
|
160
|
+
* The problems to walk, in order. The host's live data: it may shrink while
|
|
161
|
+
* the run goes (an answer that resolves siblings too) or grow; the run keeps
|
|
162
|
+
* pointing at the next unresolved key and never runs past the end.
|
|
163
|
+
*/
|
|
164
|
+
queue: readonly I[];
|
|
165
|
+
/** The body and actions of the current step. */
|
|
166
|
+
renderStep: (item: I, api: SequenceStepApi<R>) => SequenceStep;
|
|
167
|
+
/**
|
|
168
|
+
* Undo the previous answer before showing its step again — the host's server
|
|
169
|
+
* inverse. Called only when the step being returned to was RESOLVED (a skipped
|
|
170
|
+
* one has nothing to undo). A rejection keeps the current step and shows its message.
|
|
171
|
+
*/
|
|
172
|
+
onBack?: (item: I, result: R) => Promise<void> | void;
|
|
173
|
+
/** Offer the back button at all (default `true`). It shows only once a previous step exists. */
|
|
174
|
+
canGoBack?: boolean;
|
|
175
|
+
/** The end screen's words, from the run's summary. */
|
|
176
|
+
done: SequenceDone | ((summary: SequenceSummary) => SequenceDone);
|
|
177
|
+
labels: SequenceResolverLabels;
|
|
178
|
+
/**
|
|
179
|
+
* Base test id (default `sequence-resolver`). Parts get `${id}-back`,
|
|
180
|
+
* `${id}-close`, `${id}-step-label`, `${id}-progress`, `${id}-category-${index}`,
|
|
181
|
+
* `${id}-start-all`, `${id}-primary`, `${id}-secondary`, `${id}-tertiary`,
|
|
182
|
+
* `${id}-error`, `${id}-done`, `${id}-done-confirm`.
|
|
183
|
+
*/
|
|
184
|
+
dataTestId?: string;
|
|
185
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { SequenceResolver } from './SequenceResolver';
|
|
2
|
+
export type {
|
|
3
|
+
SequenceAction,
|
|
4
|
+
SequenceCategory,
|
|
5
|
+
SequenceDone,
|
|
6
|
+
SequenceIntro,
|
|
7
|
+
SequenceItem,
|
|
8
|
+
SequenceResolverLabels,
|
|
9
|
+
SequenceResolveOptions,
|
|
10
|
+
SequenceResolverProps,
|
|
11
|
+
SequenceStep,
|
|
12
|
+
SequenceStepApi,
|
|
13
|
+
SequenceSummary,
|
|
14
|
+
} from './SequenceResolver.types';
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { SequenceItem, SequenceSummary } from './SequenceResolver.types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* THE RUN, as pure data: what was answered or passed over, and what is ahead.
|
|
5
|
+
*
|
|
6
|
+
* The queue is the host's live data, not a snapshot. An answer can resolve
|
|
7
|
+
* other entries with it (one limit saved for every sibling of a product), a
|
|
8
|
+
* refetch can drop the entry just answered, and a realtime push can add one —
|
|
9
|
+
* so the run is NOT an index into the queue. It keeps the visited steps in the
|
|
10
|
+
* order they were visited, and the steps still ahead in the order the queue
|
|
11
|
+
* gave them; `syncRun` reconciles the second list with each new queue.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** How a visited step was left. */
|
|
15
|
+
export type Visit<I extends SequenceItem, R> =
|
|
16
|
+
| { item: I; outcome: 'resolved'; result: R; alsoResolved?: number }
|
|
17
|
+
| { item: I; outcome: 'skipped' };
|
|
18
|
+
|
|
19
|
+
export interface RunState<I extends SequenceItem, R> {
|
|
20
|
+
/** Every step left behind, oldest first. Back pops the last one. */
|
|
21
|
+
visits: Visit<I, R>[];
|
|
22
|
+
/** The steps still ahead; the first is on screen. Empty means the end screen. */
|
|
23
|
+
ahead: I[];
|
|
24
|
+
/**
|
|
25
|
+
* The step whose answer is being written, kept ahead even while the queue
|
|
26
|
+
* lacks it (the host's refetch may drop it before the write returns).
|
|
27
|
+
* Cleared when the run leaves it.
|
|
28
|
+
*/
|
|
29
|
+
pinned?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The steps Back returned to, kept ahead while the queue lacks them (the
|
|
32
|
+
* host's inverse ran, its refetch has not put the entry back yet). A SET:
|
|
33
|
+
* two Backs before one refetch hold both. A key leaves it when the queue
|
|
34
|
+
* confirms the entry or the run leaves the step.
|
|
35
|
+
*/
|
|
36
|
+
held: readonly string[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function dedupe<I extends SequenceItem>(items: readonly I[], skip: ReadonlySet<string>): I[] {
|
|
40
|
+
const seen = new Set(skip);
|
|
41
|
+
const out: I[] = [];
|
|
42
|
+
for (const item of items) {
|
|
43
|
+
if (seen.has(item.key)) continue;
|
|
44
|
+
seen.add(item.key);
|
|
45
|
+
out.push(item);
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A fresh run over `queue` (a repeated key counts once). */
|
|
51
|
+
export function startRun<I extends SequenceItem, R>(queue: readonly I[]): RunState<I, R> {
|
|
52
|
+
return { visits: [], ahead: dedupe(queue, new Set()), held: [] };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The run against a new queue.
|
|
57
|
+
*
|
|
58
|
+
* - A step ahead that the queue no longer has is dropped — it was resolved
|
|
59
|
+
* elsewhere (siblings answered together, another device) — unless it is
|
|
60
|
+
* `pinned` or `held`.
|
|
61
|
+
* - A held key the queue has again is released: the host confirmed it.
|
|
62
|
+
* - A queue entry the run has not seen is appended, in queue order.
|
|
63
|
+
* - The entries kept are refreshed from the queue (same key, newer data).
|
|
64
|
+
* - Visited steps are history and never change.
|
|
65
|
+
*/
|
|
66
|
+
export function syncRun<I extends SequenceItem, R>(
|
|
67
|
+
state: RunState<I, R>,
|
|
68
|
+
queue: readonly I[],
|
|
69
|
+
): RunState<I, R> {
|
|
70
|
+
const fresh = new Map(queue.map((item) => [item.key, item] as const));
|
|
71
|
+
const kept = state.ahead.flatMap((item) => {
|
|
72
|
+
const next = fresh.get(item.key);
|
|
73
|
+
if (next) return [next];
|
|
74
|
+
return item.key === state.pinned || state.held.includes(item.key) ? [item] : [];
|
|
75
|
+
});
|
|
76
|
+
const known = new Set([...state.visits.map((visit) => visit.item.key), ...kept.map((item) => item.key)]);
|
|
77
|
+
const held = state.held.filter((key) => !fresh.has(key));
|
|
78
|
+
return { ...state, ahead: [...kept, ...dedupe(queue, known)], held };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Keep `key` ahead whatever the queue says, until the run moves on (see {@link RunState.pinned}). */
|
|
82
|
+
export function pinRun<I extends SequenceItem, R>(state: RunState<I, R>, key: string): RunState<I, R> {
|
|
83
|
+
return { ...state, pinned: key };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** The step on screen, or `undefined` at the end. */
|
|
87
|
+
export function currentOf<I extends SequenceItem, R>(state: RunState<I, R>): I | undefined {
|
|
88
|
+
return state.ahead[0];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** The pins once the run leaves `key`: neither the write pin nor the held set keeps it. */
|
|
92
|
+
function leaving<I extends SequenceItem, R>(state: RunState<I, R>, key: string): Pick<RunState<I, R>, 'pinned' | 'held'> {
|
|
93
|
+
return {
|
|
94
|
+
pinned: state.pinned === key ? undefined : state.pinned,
|
|
95
|
+
held: state.held.filter((held) => held !== key),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Answer `item` — the step that was on screen when the answer began (a pending
|
|
101
|
+
* write keeps it there, see {@link RunState.pinned}). An item no longer ahead
|
|
102
|
+
* was already answered (a double call): a no-op, as at the end.
|
|
103
|
+
*/
|
|
104
|
+
export function resolveRun<I extends SequenceItem, R>(
|
|
105
|
+
state: RunState<I, R>,
|
|
106
|
+
result: R,
|
|
107
|
+
item: I | undefined = state.ahead[0],
|
|
108
|
+
alsoResolved = 0,
|
|
109
|
+
): RunState<I, R> {
|
|
110
|
+
if (!item || !state.ahead.some((entry) => entry.key === item.key)) return state;
|
|
111
|
+
const visit: Visit<I, R> = alsoResolved > 0 ? { item, outcome: 'resolved', result, alsoResolved } : { item, outcome: 'resolved', result };
|
|
112
|
+
return {
|
|
113
|
+
visits: [...state.visits, visit],
|
|
114
|
+
ahead: state.ahead.filter((entry) => entry.key !== item.key),
|
|
115
|
+
...leaving(state, item.key),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Pass over the step on screen. Given the `key` that was on screen when the
|
|
121
|
+
* skip began, a step that has moved on since (a double call) is left alone. At
|
|
122
|
+
* the end it is a no-op.
|
|
123
|
+
*/
|
|
124
|
+
export function skipRun<I extends SequenceItem, R>(state: RunState<I, R>, key?: string): RunState<I, R> {
|
|
125
|
+
const [item, ...rest] = state.ahead;
|
|
126
|
+
if (!item || (key !== undefined && item.key !== key)) return state;
|
|
127
|
+
return { visits: [...state.visits, { item, outcome: 'skipped' }], ahead: rest, ...leaving(state, item.key) };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** The step Back would return to, or `undefined` on the first one. */
|
|
131
|
+
export function previousOf<I extends SequenceItem, R>(state: RunState<I, R>): Visit<I, R> | undefined {
|
|
132
|
+
return state.visits[state.visits.length - 1];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Return to the previous step: it is on screen again, ahead of the rest, and
|
|
137
|
+
* held until the queue confirms it. Given the `key` Back began from, a step
|
|
138
|
+
* already returned to (a double call) is left alone.
|
|
139
|
+
*/
|
|
140
|
+
export function backRun<I extends SequenceItem, R>(state: RunState<I, R>, key?: string): RunState<I, R> {
|
|
141
|
+
const last = previousOf(state);
|
|
142
|
+
if (!last || (key !== undefined && last.item.key !== key)) return state;
|
|
143
|
+
const ahead = state.ahead.filter((item) => item.key !== last.item.key);
|
|
144
|
+
// The step being left keeps no write pin: `pinned` is for a write in flight
|
|
145
|
+
// on the step ON SCREEN, and a failed one must not hold an entry the
|
|
146
|
+
// host's refetch has since dropped (it was applied server-side).
|
|
147
|
+
const leftKey = state.ahead[0]?.key;
|
|
148
|
+
return {
|
|
149
|
+
...state,
|
|
150
|
+
pinned: state.pinned === leftKey ? undefined : state.pinned,
|
|
151
|
+
visits: state.visits.slice(0, -1),
|
|
152
|
+
ahead: [last.item, ...ahead],
|
|
153
|
+
held: [...state.held.filter((held) => held !== last.item.key), last.item.key],
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** Where the run stands. */
|
|
158
|
+
export function summaryOf<I extends SequenceItem, R>(state: RunState<I, R>): SequenceSummary {
|
|
159
|
+
const resolved = state.visits.filter((visit) => visit.outcome === 'resolved').length;
|
|
160
|
+
const alsoResolved = state.visits.reduce(
|
|
161
|
+
(sum, visit) => sum + (visit.outcome === 'resolved' ? Math.max(0, visit.alsoResolved ?? 0) : 0),
|
|
162
|
+
0,
|
|
163
|
+
);
|
|
164
|
+
return {
|
|
165
|
+
alsoResolved,
|
|
166
|
+
resolved,
|
|
167
|
+
skipped: state.visits.length - resolved,
|
|
168
|
+
total: state.visits.length + state.ahead.length,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** 1-based position of the step on screen (`total + 1` never happens: at the end it is `total`). */
|
|
173
|
+
export function positionOf<I extends SequenceItem, R>(state: RunState<I, R>): number {
|
|
174
|
+
return Math.min(state.visits.length + 1, state.visits.length + state.ahead.length);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** How far along, 0..100. An empty run is complete. */
|
|
178
|
+
export function progressOf<I extends SequenceItem, R>(state: RunState<I, R>): number {
|
|
179
|
+
const total = state.visits.length + state.ahead.length;
|
|
180
|
+
return total === 0 ? 100 : Math.round((state.visits.length / total) * 100);
|
|
181
|
+
}
|