@nyuccl/smile 0.2.0-beta.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/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/module.d.mts +8 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +102 -0
- package/dist/runtime/components/builtins/AdvertisementView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/AdvertisementView.vue +62 -0
- package/dist/runtime/components/builtins/AdvertisementView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/DebriefView.d.vue.ts +22 -0
- package/dist/runtime/components/builtins/DebriefView.vue +43 -0
- package/dist/runtime/components/builtins/DebriefView.vue.d.ts +22 -0
- package/dist/runtime/components/builtins/DemographicSurveyView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/DemographicSurveyView.vue +1206 -0
- package/dist/runtime/components/builtins/DemographicSurveyView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/DeviceSurveyView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/DeviceSurveyView.vue +452 -0
- package/dist/runtime/components/builtins/DeviceSurveyView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/ExpView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/ExpView.vue +39 -0
- package/dist/runtime/components/builtins/ExpView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/ExperimentStatusBar.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/ExperimentStatusBar.vue +12 -0
- package/dist/runtime/components/builtins/ExperimentStatusBar.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/FavoriteColor.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/FavoriteColor.vue +57 -0
- package/dist/runtime/components/builtins/FavoriteColor.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/FavoriteNumber.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/FavoriteNumber.vue +57 -0
- package/dist/runtime/components/builtins/FavoriteNumber.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/InformedConsentModal.d.vue.ts +28 -0
- package/dist/runtime/components/builtins/InformedConsentModal.vue +82 -0
- package/dist/runtime/components/builtins/InformedConsentModal.vue.d.ts +28 -0
- package/dist/runtime/components/builtins/InformedConsentView.d.vue.ts +13 -0
- package/dist/runtime/components/builtins/InformedConsentView.vue +127 -0
- package/dist/runtime/components/builtins/InformedConsentView.vue.d.ts +13 -0
- package/dist/runtime/components/builtins/InstructionsQuiz.d.vue.ts +36 -0
- package/dist/runtime/components/builtins/InstructionsQuiz.vue +274 -0
- package/dist/runtime/components/builtins/InstructionsQuiz.vue.d.ts +36 -0
- package/dist/runtime/components/builtins/InstructionsView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/InstructionsView.vue +58 -0
- package/dist/runtime/components/builtins/InstructionsView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/MTurkRecruitView.d.vue.ts +21 -0
- package/dist/runtime/components/builtins/MTurkRecruitView.vue +137 -0
- package/dist/runtime/components/builtins/MTurkRecruitView.vue.d.ts +21 -0
- package/dist/runtime/components/builtins/PresentationModeView.d.vue.ts +93 -0
- package/dist/runtime/components/builtins/PresentationModeView.vue +254 -0
- package/dist/runtime/components/builtins/PresentationModeView.vue.d.ts +93 -0
- package/dist/runtime/components/builtins/StatusBar.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/StatusBar.vue +128 -0
- package/dist/runtime/components/builtins/StatusBar.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/StudyPreviewText.d.vue.ts +21 -0
- package/dist/runtime/components/builtins/StudyPreviewText.vue +102 -0
- package/dist/runtime/components/builtins/StudyPreviewText.vue.d.ts +21 -0
- package/dist/runtime/components/builtins/TaskFeedbackSurveyView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/TaskFeedbackSurveyView.vue +203 -0
- package/dist/runtime/components/builtins/TaskFeedbackSurveyView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/ThanksView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/ThanksView.vue +451 -0
- package/dist/runtime/components/builtins/ThanksView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/WindowSizerView.d.vue.ts +7 -0
- package/dist/runtime/components/builtins/WindowSizerView.vue +94 -0
- package/dist/runtime/components/builtins/WindowSizerView.vue.d.ts +7 -0
- package/dist/runtime/components/builtins/WithdrawModal.d.vue.ts +56 -0
- package/dist/runtime/components/builtins/WithdrawModal.vue +208 -0
- package/dist/runtime/components/builtins/WithdrawModal.vue.d.ts +56 -0
- package/dist/runtime/components/builtins/WithdrawView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/WithdrawView.vue +99 -0
- package/dist/runtime/components/builtins/WithdrawView.vue.d.ts +3 -0
- package/dist/runtime/components/dev/RecruitmentChooserView.d.vue.ts +3 -0
- package/dist/runtime/components/dev/RecruitmentChooserView.vue +258 -0
- package/dist/runtime/components/dev/RecruitmentChooserView.vue.d.ts +3 -0
- package/dist/runtime/components/dev/ResponsiveDeviceContainer.d.vue.ts +12 -0
- package/dist/runtime/components/dev/ResponsiveDeviceContainer.vue +215 -0
- package/dist/runtime/components/dev/ResponsiveDeviceContainer.vue.d.ts +12 -0
- package/dist/runtime/components/dev/console/ConfigList.d.vue.ts +26 -0
- package/dist/runtime/components/dev/console/ConfigList.vue +106 -0
- package/dist/runtime/components/dev/console/ConfigList.vue.d.ts +26 -0
- package/dist/runtime/components/dev/console/ConsoleConfigPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleConfigPanel.vue +135 -0
- package/dist/runtime/components/dev/console/ConsoleConfigPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleDatabaseBrowsePanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleDatabaseBrowsePanel.vue +124 -0
- package/dist/runtime/components/dev/console/ConsoleDatabaseBrowsePanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleLogPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleLogPanel.vue +227 -0
- package/dist/runtime/components/dev/console/ConsoleLogPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/console/DatabaseList.d.vue.ts +26 -0
- package/dist/runtime/components/dev/console/DatabaseList.vue +110 -0
- package/dist/runtime/components/dev/console/DatabaseList.vue.d.ts +26 -0
- package/dist/runtime/components/dev/console/SmileDevConsole.d.vue.ts +3 -0
- package/dist/runtime/components/dev/console/SmileDevConsole.vue +117 -0
- package/dist/runtime/components/dev/console/SmileDevConsole.vue.d.ts +3 -0
- package/dist/runtime/components/dev/devicePresets.d.ts +91 -0
- package/dist/runtime/components/dev/devicePresets.js +40 -0
- package/dist/runtime/components/dev/menu/DevConfigPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/menu/DevConfigPanel.vue +178 -0
- package/dist/runtime/components/dev/menu/DevConfigPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/menu/ResponsiveDeviceSelect.d.vue.ts +3 -0
- package/dist/runtime/components/dev/menu/ResponsiveDeviceSelect.vue +108 -0
- package/dist/runtime/components/dev/menu/ResponsiveDeviceSelect.vue.d.ts +3 -0
- package/dist/runtime/components/dev/menu/SmileDevAppMenu.d.vue.ts +62 -0
- package/dist/runtime/components/dev/menu/SmileDevAppMenu.vue +184 -0
- package/dist/runtime/components/dev/menu/SmileDevAppMenu.vue.d.ts +62 -0
- package/dist/runtime/components/dev/navbar/CircleProgress.d.vue.ts +15 -0
- package/dist/runtime/components/dev/navbar/CircleProgress.vue +26 -0
- package/dist/runtime/components/dev/navbar/CircleProgress.vue.d.ts +15 -0
- package/dist/runtime/components/dev/navbar/ColorModeButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ColorModeButton.vue +33 -0
- package/dist/runtime/components/dev/navbar/ColorModeButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/DatabaseButtonGroup.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/DatabaseButtonGroup.vue +86 -0
- package/dist/runtime/components/dev/navbar/DatabaseButtonGroup.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/FullScreenButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/FullScreenButton.vue +35 -0
- package/dist/runtime/components/dev/navbar/FullScreenButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/KeyCommandNotification.d.vue.ts +41 -0
- package/dist/runtime/components/dev/navbar/KeyCommandNotification.vue +58 -0
- package/dist/runtime/components/dev/navbar/KeyCommandNotification.vue.d.ts +41 -0
- package/dist/runtime/components/dev/navbar/ReloadButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ReloadButton.vue +23 -0
- package/dist/runtime/components/dev/navbar/ReloadButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/ResetButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ResetButton.vue +23 -0
- package/dist/runtime/components/dev/navbar/ResetButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/RouteJumper.d.vue.ts +7 -0
- package/dist/runtime/components/dev/navbar/RouteJumper.vue +90 -0
- package/dist/runtime/components/dev/navbar/RouteJumper.vue.d.ts +7 -0
- package/dist/runtime/components/dev/navbar/SmileDevNavBar.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/SmileDevNavBar.vue +248 -0
- package/dist/runtime/components/dev/navbar/SmileDevNavBar.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/StepInfoButtonGroup.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/StepInfoButtonGroup.vue +63 -0
- package/dist/runtime/components/dev/navbar/StepInfoButtonGroup.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/ViewButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ViewButton.vue +159 -0
- package/dist/runtime/components/dev/navbar/ViewButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/ViewInfoButtonGroup.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ViewInfoButtonGroup.vue +147 -0
- package/dist/runtime/components/dev/navbar/ViewInfoButtonGroup.vue.d.ts +3 -0
- package/dist/runtime/components/dev/presentation/DarkModeButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/presentation/DarkModeButton.vue +43 -0
- package/dist/runtime/components/dev/presentation/DarkModeButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/presentation/LogoutButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/presentation/LogoutButton.vue +38 -0
- package/dist/runtime/components/dev/presentation/LogoutButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/presentation/PresentationModeResetButton.d.vue.ts +7 -0
- package/dist/runtime/components/dev/presentation/PresentationModeResetButton.vue +25 -0
- package/dist/runtime/components/dev/presentation/PresentationModeResetButton.vue.d.ts +7 -0
- package/dist/runtime/components/dev/presentation/PresentationNavBar.d.vue.ts +3 -0
- package/dist/runtime/components/dev/presentation/PresentationNavBar.vue +70 -0
- package/dist/runtime/components/dev/presentation/PresentationNavBar.vue.d.ts +3 -0
- package/dist/runtime/components/dev/presentation/QRCodeButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/presentation/QRCodeButton.vue +66 -0
- package/dist/runtime/components/dev/presentation/QRCodeButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/AppProgressPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/AppProgressPanel.vue +125 -0
- package/dist/runtime/components/dev/sidebar/AppProgressPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/ConfigurationVariablesPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/ConfigurationVariablesPanel.vue +219 -0
- package/dist/runtime/components/dev/sidebar/ConfigurationVariablesPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/DatabaseStatusInfoPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/DatabaseStatusInfoPanel.vue +117 -0
- package/dist/runtime/components/dev/sidebar/DatabaseStatusInfoPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/RandomizationSidebarPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/RandomizationSidebarPanel.vue +151 -0
- package/dist/runtime/components/dev/sidebar/RandomizationSidebarPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/SmileDevSideBar.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/SmileDevSideBar.vue +70 -0
- package/dist/runtime/components/dev/sidebar/SmileDevSideBar.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/StepDataViewer.d.vue.ts +22 -0
- package/dist/runtime/components/dev/sidebar/StepDataViewer.vue +82 -0
- package/dist/runtime/components/dev/sidebar/StepDataViewer.vue.d.ts +22 -0
- package/dist/runtime/components/dev/sidebar/StepExplorerPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/StepExplorerPanel.vue +318 -0
- package/dist/runtime/components/dev/sidebar/StepExplorerPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/StepNode.d.vue.ts +84 -0
- package/dist/runtime/components/dev/sidebar/StepNode.vue +95 -0
- package/dist/runtime/components/dev/sidebar/StepNode.vue.d.ts +84 -0
- package/dist/runtime/components/dev/sidebar/StudyInfoPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/StudyInfoPanel.vue +17 -0
- package/dist/runtime/components/dev/sidebar/StudyInfoPanel.vue.d.ts +3 -0
- package/dist/runtime/components/forms/MonthYearDayPicker.d.vue.ts +240 -0
- package/dist/runtime/components/forms/MonthYearDayPicker.vue +191 -0
- package/dist/runtime/components/forms/MonthYearDayPicker.vue.d.ts +240 -0
- package/dist/runtime/components/layouts/CenteredContent.d.vue.ts +22 -0
- package/dist/runtime/components/layouts/CenteredContent.vue +14 -0
- package/dist/runtime/components/layouts/CenteredContent.vue.d.ts +22 -0
- package/dist/runtime/components/layouts/ConstrainedPage.d.vue.ts +55 -0
- package/dist/runtime/components/layouts/ConstrainedPage.vue +56 -0
- package/dist/runtime/components/layouts/ConstrainedPage.vue.d.ts +55 -0
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.d.vue.ts +66 -0
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue +73 -0
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue.d.ts +66 -0
- package/dist/runtime/components/layouts/TitleTwoCol.d.vue.ts +61 -0
- package/dist/runtime/components/layouts/TitleTwoCol.vue +54 -0
- package/dist/runtime/components/layouts/TitleTwoCol.vue.d.ts +61 -0
- package/dist/runtime/components/layouts/TwoCol.d.vue.ts +59 -0
- package/dist/runtime/components/layouts/TwoCol.vue +51 -0
- package/dist/runtime/components/layouts/TwoCol.vue.d.ts +59 -0
- package/dist/runtime/components/layouts/index.d.ts +1 -0
- package/dist/runtime/components/layouts/index.js +5 -0
- package/dist/runtime/components/layouts/layoutUtils.d.ts +1 -0
- package/dist/runtime/components/layouts/layoutUtils.js +27 -0
- package/dist/runtime/components/ui/avatar/Avatar.d.vue.ts +20 -0
- package/dist/runtime/components/ui/avatar/Avatar.vue +15 -0
- package/dist/runtime/components/ui/avatar/Avatar.vue.d.ts +20 -0
- package/dist/runtime/components/ui/avatar/AvatarFallback.d.vue.ts +46 -0
- package/dist/runtime/components/ui/avatar/AvatarFallback.vue +21 -0
- package/dist/runtime/components/ui/avatar/AvatarFallback.vue.d.ts +46 -0
- package/dist/runtime/components/ui/avatar/AvatarImage.d.vue.ts +54 -0
- package/dist/runtime/components/ui/avatar/AvatarImage.vue +20 -0
- package/dist/runtime/components/ui/avatar/AvatarImage.vue.d.ts +54 -0
- package/dist/runtime/components/ui/avatar/index.d.ts +1 -0
- package/dist/runtime/components/ui/avatar/index.js +3 -0
- package/dist/runtime/components/ui/badge/Badge.d.vue.ts +46 -0
- package/dist/runtime/components/ui/badge/Badge.vue +22 -0
- package/dist/runtime/components/ui/badge/Badge.vue.d.ts +46 -0
- package/dist/runtime/components/ui/badge/index.d.ts +4 -0
- package/dist/runtime/components/ui/badge/index.js +21 -0
- package/dist/runtime/components/ui/breadcrumb/Breadcrumb.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/Breadcrumb.vue +15 -0
- package/dist/runtime/components/ui/breadcrumb/Breadcrumb.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbItem.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbItem.vue +14 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbItem.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbLink.d.vue.ts +41 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbLink.vue +19 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbLink.vue.d.ts +41 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbList.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbList.vue +14 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbList.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbPage.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbPage.vue +17 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbPage.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +19 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/index.d.ts +1 -0
- package/dist/runtime/components/ui/breadcrumb/index.js +7 -0
- package/dist/runtime/components/ui/button/Button.d.vue.ts +57 -0
- package/dist/runtime/components/ui/button/Button.vue +22 -0
- package/dist/runtime/components/ui/button/Button.vue.d.ts +57 -0
- package/dist/runtime/components/ui/button/index.d.ts +5 -0
- package/dist/runtime/components/ui/button/index.js +60 -0
- package/dist/runtime/components/ui/button-group/ButtonGroup.d.vue.ts +85 -0
- package/dist/runtime/components/ui/button-group/ButtonGroup.vue +33 -0
- package/dist/runtime/components/ui/button-group/ButtonGroup.vue.d.ts +85 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupItem.d.vue.ts +66 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupItem.vue +38 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupItem.vue.d.ts +66 -0
- package/dist/runtime/components/ui/button-group/index.d.ts +1 -0
- package/dist/runtime/components/ui/button-group/index.js +2 -0
- package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +237 -0
- package/dist/runtime/components/ui/calendar/Calendar.vue +103 -0
- package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +237 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.d.vue.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.vue +27 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.vue.d.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.d.vue.ts +57 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +39 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue.d.ts +57 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.vue +21 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGridBody.d.vue.ts +30 -0
- package/dist/runtime/components/ui/calendar/CalendarGridBody.vue +16 -0
- package/dist/runtime/components/ui/calendar/CalendarGridBody.vue.d.ts +30 -0
- package/dist/runtime/components/ui/calendar/CalendarGridHead.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGridHead.vue +17 -0
- package/dist/runtime/components/ui/calendar/CalendarGridHead.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.vue +21 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue +21 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.vue +21 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.d.vue.ts +35 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.vue +25 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.vue.d.ts +35 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.d.vue.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +33 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue.d.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.d.vue.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +33 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue.d.ts +46 -0
- package/dist/runtime/components/ui/calendar/index.d.ts +12 -0
- package/dist/runtime/components/ui/calendar/index.js +12 -0
- package/dist/runtime/components/ui/card/Card.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/Card.vue +14 -0
- package/dist/runtime/components/ui/card/Card.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardAction.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardAction.vue +14 -0
- package/dist/runtime/components/ui/card/CardAction.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardContent.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardContent.vue +14 -0
- package/dist/runtime/components/ui/card/CardContent.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardDescription.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardDescription.vue +14 -0
- package/dist/runtime/components/ui/card/CardDescription.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardFooter.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardFooter.vue +14 -0
- package/dist/runtime/components/ui/card/CardFooter.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardHeader.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardHeader.vue +19 -0
- package/dist/runtime/components/ui/card/CardHeader.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardTitle.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardTitle.vue +14 -0
- package/dist/runtime/components/ui/card/CardTitle.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/index.d.ts +1 -0
- package/dist/runtime/components/ui/card/index.js +7 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.d.vue.ts +122 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +51 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.vue.d.ts +122 -0
- package/dist/runtime/components/ui/checkbox/index.d.ts +5 -0
- package/dist/runtime/components/ui/checkbox/index.js +35 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenu.d.vue.ts +52 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenu.vue +20 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +52 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.d.vue.ts +69 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +36 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +69 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +195 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue +46 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +195 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuGroup.d.vue.ts +30 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuGroup.vue +16 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +30 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.d.vue.ts +75 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue +32 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +75 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.d.vue.ts +47 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +47 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.d.vue.ts +42 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +19 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +42 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.d.vue.ts +67 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +36 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +67 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.d.vue.ts +31 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue +18 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +31 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.d.vue.ts +20 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +20 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSub.d.vue.ts +35 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +35 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +180 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue +50 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +180 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.d.vue.ts +64 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +64 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.d.vue.ts +39 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.vue +18 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +39 -0
- package/dist/runtime/components/ui/dropdown-menu/index.d.ts +1 -0
- package/dist/runtime/components/ui/dropdown-menu/index.js +16 -0
- package/dist/runtime/components/ui/input/Input.d.vue.ts +33 -0
- package/dist/runtime/components/ui/input/Input.vue +28 -0
- package/dist/runtime/components/ui/input/Input.vue.d.ts +33 -0
- package/dist/runtime/components/ui/input/index.d.ts +1 -0
- package/dist/runtime/components/ui/input/index.js +1 -0
- package/dist/runtime/components/ui/label/Label.d.vue.ts +46 -0
- package/dist/runtime/components/ui/label/Label.vue +26 -0
- package/dist/runtime/components/ui/label/Label.vue.d.ts +46 -0
- package/dist/runtime/components/ui/label/index.d.ts +1 -0
- package/dist/runtime/components/ui/label/index.js +1 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.d.vue.ts +80 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.vue +98 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.vue.d.ts +80 -0
- package/dist/runtime/components/ui/multiselect/index.d.ts +1 -0
- package/dist/runtime/components/ui/multiselect/index.js +1 -0
- package/dist/runtime/components/ui/pagination/Pagination.d.vue.ts +103 -0
- package/dist/runtime/components/ui/pagination/Pagination.vue +30 -0
- package/dist/runtime/components/ui/pagination/Pagination.vue.d.ts +103 -0
- package/dist/runtime/components/ui/pagination/PaginationContent.d.vue.ts +45 -0
- package/dist/runtime/components/ui/pagination/PaginationContent.vue +21 -0
- package/dist/runtime/components/ui/pagination/PaginationContent.vue.d.ts +45 -0
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.d.vue.ts +38 -0
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue +24 -0
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue.d.ts +38 -0
- package/dist/runtime/components/ui/pagination/PaginationFirst.d.vue.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationFirst.vue +27 -0
- package/dist/runtime/components/ui/pagination/PaginationFirst.vue.d.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationItem.d.vue.ts +66 -0
- package/dist/runtime/components/ui/pagination/PaginationItem.vue +32 -0
- package/dist/runtime/components/ui/pagination/PaginationItem.vue.d.ts +66 -0
- package/dist/runtime/components/ui/pagination/PaginationLast.d.vue.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationLast.vue +27 -0
- package/dist/runtime/components/ui/pagination/PaginationLast.vue.d.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationNext.d.vue.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationNext.vue +27 -0
- package/dist/runtime/components/ui/pagination/PaginationNext.vue.d.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationPrevious.d.vue.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +27 -0
- package/dist/runtime/components/ui/pagination/PaginationPrevious.vue.d.ts +49 -0
- package/dist/runtime/components/ui/pagination/index.d.ts +1 -0
- package/dist/runtime/components/ui/pagination/index.js +8 -0
- package/dist/runtime/components/ui/popover/Popover.d.vue.ts +44 -0
- package/dist/runtime/components/ui/popover/Popover.vue +19 -0
- package/dist/runtime/components/ui/popover/Popover.vue.d.ts +44 -0
- package/dist/runtime/components/ui/popover/PopoverAnchor.d.vue.ts +38 -0
- package/dist/runtime/components/ui/popover/PopoverAnchor.vue +17 -0
- package/dist/runtime/components/ui/popover/PopoverAnchor.vue.d.ts +38 -0
- package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +200 -0
- package/dist/runtime/components/ui/popover/PopoverContent.vue +56 -0
- package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +200 -0
- package/dist/runtime/components/ui/popover/PopoverTrigger.d.vue.ts +30 -0
- package/dist/runtime/components/ui/popover/PopoverTrigger.vue +16 -0
- package/dist/runtime/components/ui/popover/PopoverTrigger.vue.d.ts +30 -0
- package/dist/runtime/components/ui/popover/index.d.ts +1 -0
- package/dist/runtime/components/ui/popover/index.js +4 -0
- package/dist/runtime/components/ui/progress/Progress.d.vue.ts +66 -0
- package/dist/runtime/components/ui/progress/Progress.vue +28 -0
- package/dist/runtime/components/ui/progress/Progress.vue.d.ts +66 -0
- package/dist/runtime/components/ui/progress/index.d.ts +1 -0
- package/dist/runtime/components/ui/progress/index.js +1 -0
- package/dist/runtime/components/ui/resizable/ResizableHandle.d.vue.ts +77 -0
- package/dist/runtime/components/ui/resizable/ResizableHandle.vue +37 -0
- package/dist/runtime/components/ui/resizable/ResizableHandle.vue.d.ts +77 -0
- package/dist/runtime/components/ui/resizable/ResizablePanel.d.vue.ts +101 -0
- package/dist/runtime/components/ui/resizable/ResizablePanel.vue +50 -0
- package/dist/runtime/components/ui/resizable/ResizablePanel.vue.d.ts +101 -0
- package/dist/runtime/components/ui/resizable/ResizablePanelGroup.d.vue.ts +82 -0
- package/dist/runtime/components/ui/resizable/ResizablePanelGroup.vue +27 -0
- package/dist/runtime/components/ui/resizable/ResizablePanelGroup.vue.d.ts +82 -0
- package/dist/runtime/components/ui/resizable/index.d.ts +1 -0
- package/dist/runtime/components/ui/resizable/index.js +3 -0
- package/dist/runtime/components/ui/select/Select.d.vue.ts +112 -0
- package/dist/runtime/components/ui/select/Select.vue +27 -0
- package/dist/runtime/components/ui/select/Select.vue.d.ts +112 -0
- package/dist/runtime/components/ui/select/SelectContent.d.vue.ts +199 -0
- package/dist/runtime/components/ui/select/SelectContent.vue +65 -0
- package/dist/runtime/components/ui/select/SelectContent.vue.d.ts +199 -0
- package/dist/runtime/components/ui/select/SelectGroup.d.vue.ts +30 -0
- package/dist/runtime/components/ui/select/SelectGroup.vue +16 -0
- package/dist/runtime/components/ui/select/SelectGroup.vue.d.ts +30 -0
- package/dist/runtime/components/ui/select/SelectItem.d.vue.ts +63 -0
- package/dist/runtime/components/ui/select/SelectItem.vue +38 -0
- package/dist/runtime/components/ui/select/SelectItem.vue.d.ts +63 -0
- package/dist/runtime/components/ui/select/SelectItemText.d.vue.ts +30 -0
- package/dist/runtime/components/ui/select/SelectItemText.vue +16 -0
- package/dist/runtime/components/ui/select/SelectItemText.vue.d.ts +30 -0
- package/dist/runtime/components/ui/select/SelectLabel.d.vue.ts +46 -0
- package/dist/runtime/components/ui/select/SelectLabel.vue +18 -0
- package/dist/runtime/components/ui/select/SelectLabel.vue.d.ts +46 -0
- package/dist/runtime/components/ui/select/SelectScrollDownButton.d.vue.ts +38 -0
- package/dist/runtime/components/ui/select/SelectScrollDownButton.vue +24 -0
- package/dist/runtime/components/ui/select/SelectScrollDownButton.vue.d.ts +38 -0
- package/dist/runtime/components/ui/select/SelectScrollUpButton.d.vue.ts +38 -0
- package/dist/runtime/components/ui/select/SelectScrollUpButton.vue +24 -0
- package/dist/runtime/components/ui/select/SelectScrollUpButton.vue.d.ts +38 -0
- package/dist/runtime/components/ui/select/SelectSeparator.d.vue.ts +31 -0
- package/dist/runtime/components/ui/select/SelectSeparator.vue +18 -0
- package/dist/runtime/components/ui/select/SelectSeparator.vue.d.ts +31 -0
- package/dist/runtime/components/ui/select/SelectTrigger.d.vue.ts +66 -0
- package/dist/runtime/components/ui/select/SelectTrigger.vue +34 -0
- package/dist/runtime/components/ui/select/SelectTrigger.vue.d.ts +66 -0
- package/dist/runtime/components/ui/select/SelectValue.d.vue.ts +38 -0
- package/dist/runtime/components/ui/select/SelectValue.vue +17 -0
- package/dist/runtime/components/ui/select/SelectValue.vue.d.ts +38 -0
- package/dist/runtime/components/ui/select/index.d.ts +11 -0
- package/dist/runtime/components/ui/select/index.js +11 -0
- package/dist/runtime/components/ui/separator/Separator.d.vue.ts +53 -0
- package/dist/runtime/components/ui/separator/Separator.vue +25 -0
- package/dist/runtime/components/ui/separator/Separator.vue.d.ts +53 -0
- package/dist/runtime/components/ui/separator/index.d.ts +1 -0
- package/dist/runtime/components/ui/separator/index.js +1 -0
- package/dist/runtime/components/ui/sheet/Sheet.d.vue.ts +44 -0
- package/dist/runtime/components/ui/sheet/Sheet.vue +19 -0
- package/dist/runtime/components/ui/sheet/Sheet.vue.d.ts +44 -0
- package/dist/runtime/components/ui/sheet/SheetClose.d.vue.ts +30 -0
- package/dist/runtime/components/ui/sheet/SheetClose.vue +16 -0
- package/dist/runtime/components/ui/sheet/SheetClose.vue.d.ts +30 -0
- package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +90 -0
- package/dist/runtime/components/ui/sheet/SheetContent.vue +61 -0
- package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +90 -0
- package/dist/runtime/components/ui/sheet/SheetDescription.d.vue.ts +38 -0
- package/dist/runtime/components/ui/sheet/SheetDescription.vue +20 -0
- package/dist/runtime/components/ui/sheet/SheetDescription.vue.d.ts +38 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.vue +14 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.vue +14 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.d.vue.ts +47 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue +26 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue.d.ts +47 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.d.vue.ts +38 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.vue +20 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.vue.d.ts +38 -0
- package/dist/runtime/components/ui/sheet/SheetTrigger.d.vue.ts +30 -0
- package/dist/runtime/components/ui/sheet/SheetTrigger.vue +16 -0
- package/dist/runtime/components/ui/sheet/SheetTrigger.vue.d.ts +30 -0
- package/dist/runtime/components/ui/sheet/index.d.ts +1 -0
- package/dist/runtime/components/ui/sheet/index.js +8 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.d.vue.ts +58 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.vue +97 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.vue.d.ts +58 -0
- package/dist/runtime/components/ui/sidebar/SidebarContent.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarContent.vue +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarContent.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.d.vue.ts +38 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue +27 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue.d.ts +38 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.d.vue.ts +38 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue +26 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +38 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.vue +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.d.vue.ts +50 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +33 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue.d.ts +50 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue +25 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.d.vue.ts +82 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue +49 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue.d.ts +82 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.d.vue.ts +72 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue +27 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +72 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.d.vue.ts +23 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +30 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +23 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue +21 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.d.vue.ts +61 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue +33 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +61 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.d.vue.ts +47 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.vue +67 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.vue.d.ts +47 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.vue +31 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.d.vue.ts +13 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +22 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/ui/sidebar/index.d.ts +28 -0
- package/dist/runtime/components/ui/sidebar/index.js +49 -0
- package/dist/runtime/components/ui/sidebar/utils.d.ts +8 -0
- package/dist/runtime/components/ui/sidebar/utils.js +10 -0
- package/dist/runtime/components/ui/skeleton/Skeleton.d.vue.ts +13 -0
- package/dist/runtime/components/ui/skeleton/Skeleton.vue +12 -0
- package/dist/runtime/components/ui/skeleton/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/components/ui/skeleton/index.d.ts +1 -0
- package/dist/runtime/components/ui/skeleton/index.js +1 -0
- package/dist/runtime/components/ui/sonner/Sonner.d.vue.ts +162 -0
- package/dist/runtime/components/ui/sonner/Sonner.vue +36 -0
- package/dist/runtime/components/ui/sonner/Sonner.vue.d.ts +162 -0
- package/dist/runtime/components/ui/sonner/index.d.ts +1 -0
- package/dist/runtime/components/ui/sonner/index.js +1 -0
- package/dist/runtime/components/ui/stepper/Stepper.d.vue.ts +95 -0
- package/dist/runtime/components/ui/stepper/Stepper.vue +27 -0
- package/dist/runtime/components/ui/stepper/Stepper.vue.d.ts +95 -0
- package/dist/runtime/components/ui/stepper/StepperDescription.d.vue.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperDescription.vue +21 -0
- package/dist/runtime/components/ui/stepper/StepperDescription.vue.d.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperIndicator.d.vue.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperIndicator.vue +31 -0
- package/dist/runtime/components/ui/stepper/StepperIndicator.vue.d.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperItem.d.vue.ts +78 -0
- package/dist/runtime/components/ui/stepper/StepperItem.vue +42 -0
- package/dist/runtime/components/ui/stepper/StepperItem.vue.d.ts +78 -0
- package/dist/runtime/components/ui/stepper/StepperSeparator.d.vue.ts +48 -0
- package/dist/runtime/components/ui/stepper/StepperSeparator.vue +29 -0
- package/dist/runtime/components/ui/stepper/StepperSeparator.vue.d.ts +48 -0
- package/dist/runtime/components/ui/stepper/StepperTitle.d.vue.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperTitle.vue +20 -0
- package/dist/runtime/components/ui/stepper/StepperTitle.vue.d.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperTrigger.d.vue.ts +48 -0
- package/dist/runtime/components/ui/stepper/StepperTrigger.vue +37 -0
- package/dist/runtime/components/ui/stepper/StepperTrigger.vue.d.ts +48 -0
- package/dist/runtime/components/ui/stepper/index.d.ts +1 -0
- package/dist/runtime/components/ui/stepper/index.js +7 -0
- package/dist/runtime/components/ui/switch/Switch.d.vue.ts +123 -0
- package/dist/runtime/components/ui/switch/Switch.vue +69 -0
- package/dist/runtime/components/ui/switch/Switch.vue.d.ts +123 -0
- package/dist/runtime/components/ui/switch/index.d.ts +5 -0
- package/dist/runtime/components/ui/switch/index.js +33 -0
- package/dist/runtime/components/ui/table/Table.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/Table.vue +19 -0
- package/dist/runtime/components/ui/table/Table.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableBody.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableBody.vue +14 -0
- package/dist/runtime/components/ui/table/TableBody.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableCaption.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableCaption.vue +14 -0
- package/dist/runtime/components/ui/table/TableCaption.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableCell.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableCell.vue +19 -0
- package/dist/runtime/components/ui/table/TableCell.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableEmpty.d.vue.ts +32 -0
- package/dist/runtime/components/ui/table/TableEmpty.vue +23 -0
- package/dist/runtime/components/ui/table/TableEmpty.vue.d.ts +32 -0
- package/dist/runtime/components/ui/table/TableFooter.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableFooter.vue +14 -0
- package/dist/runtime/components/ui/table/TableFooter.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableHead.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableHead.vue +19 -0
- package/dist/runtime/components/ui/table/TableHead.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableHeader.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableHeader.vue +14 -0
- package/dist/runtime/components/ui/table/TableHeader.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableRow.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableRow.vue +14 -0
- package/dist/runtime/components/ui/table/TableRow.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/index.d.ts +1 -0
- package/dist/runtime/components/ui/table/index.js +9 -0
- package/dist/runtime/components/ui/table/utils.d.ts +1 -0
- package/dist/runtime/components/ui/table/utils.js +3 -0
- package/dist/runtime/components/ui/tabs/Tabs.d.vue.ts +91 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue +28 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue.d.ts +91 -0
- package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +55 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue +22 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +55 -0
- package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +47 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue +26 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +47 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +55 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue +28 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +55 -0
- package/dist/runtime/components/ui/tabs/index.d.ts +1 -0
- package/dist/runtime/components/ui/tabs/index.js +4 -0
- package/dist/runtime/components/ui/tags-input/TagsInput.d.vue.ts +174 -0
- package/dist/runtime/components/ui/tags-input/TagsInput.vue +41 -0
- package/dist/runtime/components/ui/tags-input/TagsInput.vue.d.ts +174 -0
- package/dist/runtime/components/ui/tags-input/TagsInputInput.d.vue.ts +56 -0
- package/dist/runtime/components/ui/tags-input/TagsInputInput.vue +21 -0
- package/dist/runtime/components/ui/tags-input/TagsInputInput.vue.d.ts +56 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.d.vue.ts +55 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.vue +27 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.vue.d.ts +55 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.d.vue.ts +38 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue +23 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue.d.ts +38 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemText.d.vue.ts +31 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemText.vue +18 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemText.vue.d.ts +31 -0
- package/dist/runtime/components/ui/tags-input/index.d.ts +1 -0
- package/dist/runtime/components/ui/tags-input/index.js +5 -0
- package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +33 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue +26 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +33 -0
- package/dist/runtime/components/ui/textarea/index.d.ts +1 -0
- package/dist/runtime/components/ui/textarea/index.js +1 -0
- package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +114 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue +31 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +114 -0
- package/dist/runtime/components/ui/toggle/index.d.ts +5 -0
- package/dist/runtime/components/ui/toggle/index.js +24 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.d.vue.ts +144 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue +42 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue.d.ts +144 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.d.vue.ts +76 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.vue +40 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +76 -0
- package/dist/runtime/components/ui/toggle-group/index.d.ts +1 -0
- package/dist/runtime/components/ui/toggle-group/index.js +2 -0
- package/dist/runtime/components/ui/tooltip/Tooltip.d.vue.ts +79 -0
- package/dist/runtime/components/ui/tooltip/Tooltip.vue +23 -0
- package/dist/runtime/components/ui/tooltip/Tooltip.vue.d.ts +79 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.d.vue.ts +162 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue +50 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue.d.ts +162 -0
- package/dist/runtime/components/ui/tooltip/TooltipProvider.d.vue.ts +68 -0
- package/dist/runtime/components/ui/tooltip/TooltipProvider.vue +17 -0
- package/dist/runtime/components/ui/tooltip/TooltipProvider.vue.d.ts +68 -0
- package/dist/runtime/components/ui/tooltip/TooltipTrigger.d.vue.ts +38 -0
- package/dist/runtime/components/ui/tooltip/TooltipTrigger.vue +17 -0
- package/dist/runtime/components/ui/tooltip/TooltipTrigger.vue.d.ts +38 -0
- package/dist/runtime/components/ui/tooltip/index.d.ts +1 -0
- package/dist/runtime/components/ui/tooltip/index.js +4 -0
- package/dist/runtime/composables/useAPI.d.ts +463 -0
- package/dist/runtime/composables/useAPI.js +991 -0
- package/dist/runtime/composables/useColorMode.d.ts +19 -0
- package/dist/runtime/composables/useColorMode.js +292 -0
- package/dist/runtime/composables/useStepper.d.ts +19 -0
- package/dist/runtime/composables/useStepper.js +71 -0
- package/dist/runtime/composables/useTimeline.d.ts +6 -0
- package/dist/runtime/composables/useTimeline.js +188 -0
- package/dist/runtime/composables/useViewAPI.d.ts +513 -0
- package/dist/runtime/composables/useViewAPI.js +965 -0
- package/dist/runtime/core/config.d.ts +166 -0
- package/dist/runtime/core/config.js +118 -0
- package/dist/runtime/core/stepper/StepState.d.ts +332 -0
- package/dist/runtime/core/stepper/StepState.js +775 -0
- package/dist/runtime/core/stepper/Stepper.d.ts +165 -0
- package/dist/runtime/core/stepper/Stepper.js +618 -0
- package/dist/runtime/core/stepper/StepperProxy.d.ts +21 -0
- package/dist/runtime/core/stepper/StepperProxy.js +57 -0
- package/dist/runtime/core/stepper/StepperSerializer.d.ts +29 -0
- package/dist/runtime/core/stepper/StepperSerializer.js +234 -0
- package/dist/runtime/core/timeline/Timeline.d.ts +101 -0
- package/dist/runtime/core/timeline/Timeline.js +495 -0
- package/dist/runtime/css/main.css +1 -0
- package/dist/runtime/css/smile.css +1 -0
- package/dist/runtime/layouts/development.d.vue.ts +10 -0
- package/dist/runtime/layouts/development.vue +189 -0
- package/dist/runtime/layouts/development.vue.d.ts +10 -0
- package/dist/runtime/layouts/experiment.d.vue.ts +13 -0
- package/dist/runtime/layouts/experiment.vue +10 -0
- package/dist/runtime/layouts/experiment.vue.d.ts +13 -0
- package/dist/runtime/layouts/presentation.d.vue.ts +10 -0
- package/dist/runtime/layouts/presentation.vue +45 -0
- package/dist/runtime/layouts/presentation.vue.d.ts +10 -0
- package/dist/runtime/lib/utils.d.ts +1 -0
- package/dist/runtime/lib/utils.js +6 -0
- package/dist/runtime/middleware/timeline.global.d.ts +21 -0
- package/dist/runtime/middleware/timeline.global.js +422 -0
- package/dist/runtime/pages/[...slug].d.vue.ts +3 -0
- package/dist/runtime/pages/[...slug].vue +40 -0
- package/dist/runtime/pages/[...slug].vue.d.ts +3 -0
- package/dist/runtime/pages/dev/[...slug].d.vue.ts +3 -0
- package/dist/runtime/pages/dev/[...slug].vue +53 -0
- package/dist/runtime/pages/dev/[...slug].vue.d.ts +3 -0
- package/dist/runtime/pages/dev-login.d.vue.ts +3 -0
- package/dist/runtime/pages/dev-login.vue +56 -0
- package/dist/runtime/pages/dev-login.vue.d.ts +3 -0
- package/dist/runtime/pages/info.d.vue.ts +3 -0
- package/dist/runtime/pages/info.vue +462 -0
- package/dist/runtime/pages/info.vue.d.ts +3 -0
- package/dist/runtime/pages/presentation/[...slug].d.vue.ts +3 -0
- package/dist/runtime/pages/presentation/[...slug].vue +65 -0
- package/dist/runtime/pages/presentation/[...slug].vue.d.ts +3 -0
- package/dist/runtime/plugins/dev-sync.client.d.ts +2 -0
- package/dist/runtime/plugins/dev-sync.client.js +26 -0
- package/dist/runtime/plugins/seed.client.d.ts +2 -0
- package/dist/runtime/plugins/seed.client.js +44 -0
- package/dist/runtime/plugins/store-sync.client.d.ts +2 -0
- package/dist/runtime/plugins/store-sync.client.js +74 -0
- package/dist/runtime/plugins/timeline.client.d.ts +6 -0
- package/dist/runtime/plugins/timeline.client.js +10 -0
- package/dist/runtime/server/api/auth/login.post.d.ts +2 -0
- package/dist/runtime/server/api/auth/login.post.js +29 -0
- package/dist/runtime/server/api/auth/logout.post.d.ts +2 -0
- package/dist/runtime/server/api/auth/logout.post.js +12 -0
- package/dist/runtime/server/api/auth/session.get.d.ts +2 -0
- package/dist/runtime/server/api/auth/session.get.js +15 -0
- package/dist/runtime/server/api/participants/[id]/private.patch.d.ts +2 -0
- package/dist/runtime/server/api/participants/[id]/private.patch.js +20 -0
- package/dist/runtime/server/api/participants/[id]/private.post.d.ts +2 -0
- package/dist/runtime/server/api/participants/[id]/private.post.js +21 -0
- package/dist/runtime/server/api/participants/[id].get.d.ts +2 -0
- package/dist/runtime/server/api/participants/[id].get.js +15 -0
- package/dist/runtime/server/api/participants/[id].patch.d.ts +2 -0
- package/dist/runtime/server/api/participants/[id].patch.js +20 -0
- package/dist/runtime/server/api/participants/index.post.d.ts +2 -0
- package/dist/runtime/server/api/participants/index.post.js +17 -0
- package/dist/runtime/server/api/qr.get.d.ts +2 -0
- package/dist/runtime/server/api/qr.get.js +19 -0
- package/dist/runtime/server/database/schema.d.ts +235 -0
- package/dist/runtime/server/database/schema.js +19 -0
- package/dist/runtime/server/middleware/dev-auth.d.ts +2 -0
- package/dist/runtime/server/middleware/dev-auth.js +32 -0
- package/dist/runtime/server/plugins/migrate.d.ts +2 -0
- package/dist/runtime/server/plugins/migrate.js +30 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/server/utils/db.d.ts +3 -0
- package/dist/runtime/server/utils/db.js +21 -0
- package/dist/runtime/stores/log.d.ts +37 -0
- package/dist/runtime/stores/log.js +211 -0
- package/dist/runtime/stores/smilestore.d.ts +8234 -0
- package/dist/runtime/stores/smilestore.js +577 -0
- package/dist/runtime/utils/randomization.d.ts +57 -0
- package/dist/runtime/utils/randomization.js +189 -0
- package/dist/runtime/utils/utils.d.ts +19 -0
- package/dist/runtime/utils/utils.js +147 -0
- package/dist/types.d.mts +3 -0
- package/package.json +107 -0
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module smilestore
|
|
3
|
+
* @description Pinia store for managing global application state. Handles:
|
|
4
|
+
* - User data and consent management
|
|
5
|
+
* - Server-side data persistence via API routes
|
|
6
|
+
* - Experiment condition randomization and routing
|
|
7
|
+
* - Trial/step data recording and management
|
|
8
|
+
* - Global UI state and dev tools
|
|
9
|
+
* The store serves as the central state management system for the SMILE framework,
|
|
10
|
+
* coordinating data flow between components, views, and external services.
|
|
11
|
+
*
|
|
12
|
+
* State is split into two persistence tiers:
|
|
13
|
+
* - cookieState: Small gate flags (knownUser, consented, etc.) persisted via cookies
|
|
14
|
+
* so they're available during SSR for hydration. Client-side sync plugin handles writes.
|
|
15
|
+
* - localState: Larger/complex data (viewSteppers, routes, conditions, etc.) persisted
|
|
16
|
+
* via localStorage. Client-side sync plugin patches on load and watches for writes.
|
|
17
|
+
*/
|
|
18
|
+
import { defineStore } from 'pinia'
|
|
19
|
+
import { useCookie } from '#imports'
|
|
20
|
+
import axios from 'axios'
|
|
21
|
+
import appconfig from '../core/config.js'
|
|
22
|
+
import useLog from './log.js'
|
|
23
|
+
|
|
24
|
+
// Cookie max age: 30 days in seconds
|
|
25
|
+
const COOKIE_MAX_AGE = 86400 * 30
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns the current local time as an ISO-like string in the user's timezone
|
|
29
|
+
* @returns {string} Local time string (e.g., "2024-12-03T16:04:00.000-05:00")
|
|
30
|
+
*/
|
|
31
|
+
function getLocalTimeString() {
|
|
32
|
+
const now = new Date()
|
|
33
|
+
const offset = -now.getTimezoneOffset()
|
|
34
|
+
const sign = offset >= 0 ? '+' : '-'
|
|
35
|
+
const pad = n => String(Math.abs(n)).padStart(2, '0')
|
|
36
|
+
const offsetHours = pad(Math.floor(Math.abs(offset) / 60))
|
|
37
|
+
const offsetMins = pad(Math.abs(offset) % 60)
|
|
38
|
+
|
|
39
|
+
const year = now.getFullYear()
|
|
40
|
+
const month = pad(now.getMonth() + 1)
|
|
41
|
+
const day = pad(now.getDate())
|
|
42
|
+
const hours = pad(now.getHours())
|
|
43
|
+
const minutes = pad(now.getMinutes())
|
|
44
|
+
const seconds = pad(now.getSeconds())
|
|
45
|
+
const ms = String(now.getMilliseconds()).padStart(3, '0')
|
|
46
|
+
|
|
47
|
+
return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}.${ms}${sign}${offsetHours}:${offsetMins}`
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const initDev = {
|
|
51
|
+
viewProvidesAutofill: null,
|
|
52
|
+
viewProvidesStepper: false,
|
|
53
|
+
showConsoleBar: false,
|
|
54
|
+
showSideBar: false,
|
|
55
|
+
pinnedRoute: null,
|
|
56
|
+
mainView: 'devmode',
|
|
57
|
+
consoleBarHeight: 300,
|
|
58
|
+
consoleBarTab: 'browse',
|
|
59
|
+
sideBarTab: 'steps',
|
|
60
|
+
searchParams: '',
|
|
61
|
+
logFilter: 'All',
|
|
62
|
+
notificationFilter: 'Errors only',
|
|
63
|
+
lastViewLimit: false,
|
|
64
|
+
dataPath: null,
|
|
65
|
+
configPath: null,
|
|
66
|
+
selectedDevice: 'desktop2',
|
|
67
|
+
deviceWidth: 1024,
|
|
68
|
+
deviceHeight: 768,
|
|
69
|
+
isRotated: false,
|
|
70
|
+
isFullscreen: false,
|
|
71
|
+
routePanelVisible: false,
|
|
72
|
+
globalColorMode: 'auto',
|
|
73
|
+
experimentColorMode: 'auto',
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Tier 1: Cookie-backed state — small gate flags.
|
|
78
|
+
* useCookie() in state() provides server-side read for SSR hydration.
|
|
79
|
+
* Client-side store-sync plugin handles writing changes back to document.cookie.
|
|
80
|
+
*/
|
|
81
|
+
const initCookieState = {
|
|
82
|
+
knownUser: false,
|
|
83
|
+
lastRoute: 'landing',
|
|
84
|
+
docRef: null,
|
|
85
|
+
completionCode: null,
|
|
86
|
+
consented: false,
|
|
87
|
+
withdrawn: false,
|
|
88
|
+
done: false,
|
|
89
|
+
seedID: '',
|
|
90
|
+
seedSet: false,
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Tier 2: localStorage-backed state — larger/complex data.
|
|
95
|
+
* Plain defaults in state(). Client-side store-sync plugin patches from
|
|
96
|
+
* localStorage on load and watches for changes to write back.
|
|
97
|
+
*/
|
|
98
|
+
const initLocalState = {
|
|
99
|
+
privateDocRef: null,
|
|
100
|
+
verifiedVisibility: false,
|
|
101
|
+
reset: false,
|
|
102
|
+
totalWrites: 0,
|
|
103
|
+
lastWrite: null,
|
|
104
|
+
approxDataSize: 0,
|
|
105
|
+
useSeed: true,
|
|
106
|
+
viewSteppers: {},
|
|
107
|
+
possibleConditions: {},
|
|
108
|
+
seqtimeline: [],
|
|
109
|
+
routes: [],
|
|
110
|
+
conditions: {},
|
|
111
|
+
randomizedRoutes: {},
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const initBrowserEphemeral = {
|
|
115
|
+
currentViewDone: false,
|
|
116
|
+
forceNavigate: false,
|
|
117
|
+
tooSmall: false,
|
|
118
|
+
steppers: {},
|
|
119
|
+
dataLoaded: false,
|
|
120
|
+
unsavedChanges: true,
|
|
121
|
+
urls: {
|
|
122
|
+
prolific: '/welcome/prolific?PROLIFIC_PID=XXXX&STUDY_ID=XXXX&SESSION_ID=XXXXX',
|
|
123
|
+
cloudresearch:
|
|
124
|
+
'/welcome/cloudresearch?assignmentId=123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE&hitId=123RVWYBAZW00EXAMPLE&turkSubmitTo=https://www.mturk.com/&workerId=AZ3456EXAMPLE',
|
|
125
|
+
mturk:
|
|
126
|
+
'/mturk?assignmentId=123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE&hitId=123RVWYBAZW00EXAMPLE&turkSubmitTo=https://www.mturk.com/&workerId=AZ3456EXAMPLE',
|
|
127
|
+
citizensci:
|
|
128
|
+
'/welcome/citizensci?CITIZEN_ID=XXXXX&CITIZEN_STUDY_ID=123RVWYBAZW00EXAMPLE&CITIZEN_SESSION_ID=AZ3456EXAMPLE',
|
|
129
|
+
sona: '/welcome/sona?survey_code=SONA_TEST_12345',
|
|
130
|
+
sona_paid: '/welcome/sona_paid?survey_code=SONA_PAID_TEST_67890',
|
|
131
|
+
spark: '/welcome/spark?subject_ID=SPARK_TEST_001&participant_ID=SPARK_PID_001&age=14&gender=female',
|
|
132
|
+
panda: '/welcome/panda?ID=PANDA_TEST_001',
|
|
133
|
+
web: '/welcome',
|
|
134
|
+
},
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Export initial values so plugins can reference them
|
|
138
|
+
export { initCookieState, initLocalState, initDev, COOKIE_MAX_AGE }
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @module smilestore
|
|
142
|
+
* @description Main Pinia store for managing SMILE application state.
|
|
143
|
+
*
|
|
144
|
+
* The store is divided into several namespaces:
|
|
145
|
+
* - cookieState: Tier 1 persisted state (cookies, SSR-accessible)
|
|
146
|
+
* - localState: Tier 2 persisted state (localStorage, client-only)
|
|
147
|
+
* - browserPersisted: Compatibility getter merging both tiers (read-only)
|
|
148
|
+
* - browserEphemeral: Ephemeral state that resets on refresh
|
|
149
|
+
* - dev: Development-only state and configuration
|
|
150
|
+
* - private: Sensitive user data not synced to database
|
|
151
|
+
* - data: Public experiment data synced to database
|
|
152
|
+
* - config: Application configuration settings
|
|
153
|
+
*/
|
|
154
|
+
export default defineStore('smilestore', {
|
|
155
|
+
state: () => {
|
|
156
|
+
const prefix = `smile_${appconfig.codeName}_`
|
|
157
|
+
|
|
158
|
+
// Tier 1: useCookie() for server-side read; client sync plugin handles writes
|
|
159
|
+
const cookieState = {
|
|
160
|
+
knownUser: useCookie(`${prefix}knownUser`, { default: () => false, maxAge: COOKIE_MAX_AGE }).value ?? false,
|
|
161
|
+
lastRoute: useCookie(`${prefix}lastRoute`, { default: () => 'landing', maxAge: COOKIE_MAX_AGE }).value ?? 'landing',
|
|
162
|
+
docRef: useCookie(`${prefix}docRef`, { default: () => null, maxAge: COOKIE_MAX_AGE }).value ?? null,
|
|
163
|
+
completionCode: useCookie(`${prefix}completionCode`, { default: () => null, maxAge: COOKIE_MAX_AGE }).value ?? null,
|
|
164
|
+
consented: useCookie(`${prefix}consented`, { default: () => false, maxAge: COOKIE_MAX_AGE }).value ?? false,
|
|
165
|
+
withdrawn: useCookie(`${prefix}withdrawn`, { default: () => false, maxAge: COOKIE_MAX_AGE }).value ?? false,
|
|
166
|
+
done: useCookie(`${prefix}done`, { default: () => false, maxAge: COOKIE_MAX_AGE }).value ?? false,
|
|
167
|
+
seedID: useCookie(`${prefix}seedID`, { default: () => '', maxAge: COOKIE_MAX_AGE }).value ?? '',
|
|
168
|
+
seedSet: useCookie(`${prefix}seedSet`, { default: () => false, maxAge: COOKIE_MAX_AGE }).value ?? false,
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Tier 2: plain defaults; client sync plugin patches from localStorage and writes back
|
|
172
|
+
const localState = { ...initLocalState }
|
|
173
|
+
|
|
174
|
+
return {
|
|
175
|
+
cookieState,
|
|
176
|
+
localState,
|
|
177
|
+
browserEphemeral: { ...initBrowserEphemeral },
|
|
178
|
+
dev:
|
|
179
|
+
appconfig.mode === 'development'
|
|
180
|
+
? useCookie(`smile_${appconfig.codeName}_dev`, { default: () => ({ ...initDev }), maxAge: 86400 * 365 }).value ?? { ...initDev }
|
|
181
|
+
: { ...initDev },
|
|
182
|
+
private: {
|
|
183
|
+
recruitmentInfo: {},
|
|
184
|
+
withdrawData: {},
|
|
185
|
+
browserFingerprint: {},
|
|
186
|
+
},
|
|
187
|
+
data: {
|
|
188
|
+
appStartTime: Date.now(),
|
|
189
|
+
seedID: '',
|
|
190
|
+
trialNum: 0,
|
|
191
|
+
consented: false,
|
|
192
|
+
verifiedVisibility: false,
|
|
193
|
+
done: false,
|
|
194
|
+
starttime: null,
|
|
195
|
+
endtime: null,
|
|
196
|
+
starttimeLocal: null,
|
|
197
|
+
endtimeLocal: null,
|
|
198
|
+
userTimezone: null,
|
|
199
|
+
userTimezoneOffset: null,
|
|
200
|
+
recruitmentService: 'web',
|
|
201
|
+
browserData: [],
|
|
202
|
+
withdrawn: false,
|
|
203
|
+
routeOrder: [],
|
|
204
|
+
conditions: {},
|
|
205
|
+
randomizedRoutes: {},
|
|
206
|
+
smileConfig: { ...appconfig },
|
|
207
|
+
studyData: [],
|
|
208
|
+
},
|
|
209
|
+
config: appconfig,
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
|
|
213
|
+
getters: {
|
|
214
|
+
// Compatibility getter: merges both tiers for read-only access
|
|
215
|
+
browserPersisted: state => ({ ...state.localState, ...state.cookieState }),
|
|
216
|
+
isDataBarVisible: state => state.dev.showConsoleBar,
|
|
217
|
+
isKnownUser: state => state.cookieState.knownUser,
|
|
218
|
+
isConsented: state => state.cookieState.consented,
|
|
219
|
+
isWithdrawn: state => state.cookieState.withdrawn,
|
|
220
|
+
isDone: state => state.cookieState.done,
|
|
221
|
+
lastRoute: state => state.cookieState.lastRoute,
|
|
222
|
+
isDataLoaded: state => state.browserEphemeral.dataLoaded,
|
|
223
|
+
hasAutofill: state => state.dev?.viewProvidesAutofill,
|
|
224
|
+
searchParams: state => state.dev?.searchParams,
|
|
225
|
+
recruitmentService: state => state.data.recruitmentService,
|
|
226
|
+
isSeedSet: state => state.cookieState.seedSet,
|
|
227
|
+
getSeedID: state => state.cookieState.seedID,
|
|
228
|
+
getLocal: state => ({ ...state.localState, ...state.cookieState }),
|
|
229
|
+
getConditions: state => state.localState.conditions,
|
|
230
|
+
getRandomizedRoutes: state => state.localState.randomizedRoutes,
|
|
231
|
+
verifiedVisibility: state => state.data.verifiedVisibility,
|
|
232
|
+
getAllPageData: (state) => {
|
|
233
|
+
const pageDataFields = {}
|
|
234
|
+
for (const key in state.data) {
|
|
235
|
+
if (key.startsWith('pageData_')) {
|
|
236
|
+
pageDataFields[key] = state.data[key]
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return pageDataFields
|
|
240
|
+
},
|
|
241
|
+
getShortId: (state) => {
|
|
242
|
+
if (!state.cookieState.docRef || typeof state.cookieState.docRef !== 'string') return 'N/A'
|
|
243
|
+
return `${state.cookieState.docRef.substring(0, 10)}`
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
|
|
247
|
+
actions: {
|
|
248
|
+
manualSyncLocalToData() {
|
|
249
|
+
const log = useLog()
|
|
250
|
+
log.debug('SMILESTORE: syncing conditions, randomized routes to remote')
|
|
251
|
+
this.data.conditions = this.localState.conditions
|
|
252
|
+
this.data.randomizedRoutes = this.localState.randomizedRoutes
|
|
253
|
+
this.data.seedID = this.cookieState.seedID
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
setDataLoaded() {
|
|
257
|
+
if (this.browserEphemeral.dataLoaded === false) {
|
|
258
|
+
this.manualSyncLocalToData()
|
|
259
|
+
}
|
|
260
|
+
this.browserEphemeral.dataLoaded = true
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
setSearchParams(searchParams) {
|
|
264
|
+
this.dev.searchParams = searchParams
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
setConsented() {
|
|
268
|
+
this.cookieState.consented = true
|
|
269
|
+
this.data.consented = true
|
|
270
|
+
this.data.starttime = Date.now()
|
|
271
|
+
this.data.starttimeLocal = getLocalTimeString()
|
|
272
|
+
this.data.userTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
273
|
+
this.data.userTimezoneOffset = new Date().getTimezoneOffset()
|
|
274
|
+
},
|
|
275
|
+
|
|
276
|
+
setUnconsented() {
|
|
277
|
+
this.cookieState.consented = false
|
|
278
|
+
this.data.consented = false
|
|
279
|
+
},
|
|
280
|
+
|
|
281
|
+
setWithdrawn(forminfo) {
|
|
282
|
+
this.cookieState.withdrawn = true
|
|
283
|
+
this.data.withdrawn = true
|
|
284
|
+
this.private.withdrawData = forminfo
|
|
285
|
+
this.data.endtime = Date.now()
|
|
286
|
+
this.data.endtimeLocal = getLocalTimeString()
|
|
287
|
+
},
|
|
288
|
+
|
|
289
|
+
verifyVisibility(value) {
|
|
290
|
+
this.localState.verifiedVisibility = value
|
|
291
|
+
this.data.verifiedVisibility = value
|
|
292
|
+
},
|
|
293
|
+
|
|
294
|
+
setDone() {
|
|
295
|
+
this.cookieState.done = true
|
|
296
|
+
this.data.done = true
|
|
297
|
+
this.data.endtime = Date.now()
|
|
298
|
+
this.data.endtimeLocal = getLocalTimeString()
|
|
299
|
+
},
|
|
300
|
+
|
|
301
|
+
setCompletionCode(code) {
|
|
302
|
+
this.cookieState.completionCode = code
|
|
303
|
+
},
|
|
304
|
+
|
|
305
|
+
resetApp() {
|
|
306
|
+
this.localState.reset = true
|
|
307
|
+
},
|
|
308
|
+
|
|
309
|
+
setSeedID(seed) {
|
|
310
|
+
if (seed === this.cookieState.seedID) {
|
|
311
|
+
console.debug('SMILESTORE: seed already set to', seed)
|
|
312
|
+
return
|
|
313
|
+
}
|
|
314
|
+
this.cookieState.seedID = seed
|
|
315
|
+
this.data.seedID = seed
|
|
316
|
+
this.cookieState.seedSet = true
|
|
317
|
+
|
|
318
|
+
// After setting a seed we should clear out randomized settings
|
|
319
|
+
this.localState.conditions = {}
|
|
320
|
+
this.localState.randomizedRoutes = {}
|
|
321
|
+
this.data.conditions = {}
|
|
322
|
+
this.data.randomizedRoutes = {}
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
registerStepper(view, stepper = null) {
|
|
326
|
+
this.localState.viewSteppers[view] = {}
|
|
327
|
+
|
|
328
|
+
if (stepper) {
|
|
329
|
+
if (!this.browserEphemeral.steppers) {
|
|
330
|
+
this.browserEphemeral.steppers = {}
|
|
331
|
+
}
|
|
332
|
+
this.browserEphemeral.steppers[view] = stepper
|
|
333
|
+
stepper.save(view)
|
|
334
|
+
}
|
|
335
|
+
return this.browserEphemeral.steppers?.[view]
|
|
336
|
+
},
|
|
337
|
+
|
|
338
|
+
getStepper(view) {
|
|
339
|
+
return this.localState.viewSteppers[view]
|
|
340
|
+
},
|
|
341
|
+
|
|
342
|
+
resetStepper(view) {
|
|
343
|
+
if (this.localState.viewSteppers[view]) {
|
|
344
|
+
this.localState.viewSteppers[view] = {}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
recordWindowEvent(type, event_data = null) {
|
|
349
|
+
if (event_data) {
|
|
350
|
+
this.data.browserData.push({
|
|
351
|
+
event_type: type,
|
|
352
|
+
timestamp: Date.now(),
|
|
353
|
+
event_data,
|
|
354
|
+
})
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
this.data.browserData.push({
|
|
358
|
+
event_type: type,
|
|
359
|
+
timestamp: Date.now(),
|
|
360
|
+
})
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
|
|
364
|
+
getBrowserFingerprint() {
|
|
365
|
+
let ip = 'unknown'
|
|
366
|
+
const log = useLog()
|
|
367
|
+
axios
|
|
368
|
+
.get('https://api.ipify.org/?format=json')
|
|
369
|
+
.then((response) => {
|
|
370
|
+
if (response.data.ip) {
|
|
371
|
+
ip = response.data.ip
|
|
372
|
+
log.success('SMILESTORE: User IP address detected (using api.ipify.org): ' + ip)
|
|
373
|
+
}
|
|
374
|
+
})
|
|
375
|
+
.catch((error) => {
|
|
376
|
+
log.log(error)
|
|
377
|
+
})
|
|
378
|
+
.finally(() => {
|
|
379
|
+
if (typeof window !== 'undefined') {
|
|
380
|
+
const { language } = window.navigator
|
|
381
|
+
const { webdriver } = window.navigator
|
|
382
|
+
const { userAgent } = window.navigator
|
|
383
|
+
this.setFingerPrint(ip, userAgent, language, webdriver)
|
|
384
|
+
}
|
|
385
|
+
})
|
|
386
|
+
},
|
|
387
|
+
|
|
388
|
+
setFingerPrint(ip, userAgent, language, webdriver) {
|
|
389
|
+
const log = useLog()
|
|
390
|
+
this.private.browserFingerprint = {
|
|
391
|
+
ip,
|
|
392
|
+
userAgent,
|
|
393
|
+
language,
|
|
394
|
+
webdriver,
|
|
395
|
+
}
|
|
396
|
+
log.log('Browser fingerprint: ' + JSON.stringify(this.private.browserFingerprint))
|
|
397
|
+
},
|
|
398
|
+
|
|
399
|
+
setAutofill(fn) {
|
|
400
|
+
if (this.dev) this.dev.viewProvidesAutofill = fn
|
|
401
|
+
},
|
|
402
|
+
|
|
403
|
+
removeAutofill() {
|
|
404
|
+
if (this.dev) this.dev.viewProvidesAutofill = null
|
|
405
|
+
},
|
|
406
|
+
|
|
407
|
+
setRecruitmentService(service, info) {
|
|
408
|
+
this.data.recruitmentService = service
|
|
409
|
+
this.private.recruitmentInfo = info
|
|
410
|
+
},
|
|
411
|
+
|
|
412
|
+
autofill() {
|
|
413
|
+
if (this.dev?.viewProvidesAutofill) {
|
|
414
|
+
this.dev.viewProvidesAutofill()
|
|
415
|
+
const log = useLog()
|
|
416
|
+
log.warn('DEV MODE: View was autofilled by a user-provided component function')
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
|
|
420
|
+
recordData(data) {
|
|
421
|
+
this.data.studyData.push(JSON.parse(JSON.stringify(data)))
|
|
422
|
+
},
|
|
423
|
+
|
|
424
|
+
recordProperty(name, data) {
|
|
425
|
+
this.data[name] = JSON.parse(JSON.stringify(data))
|
|
426
|
+
},
|
|
427
|
+
|
|
428
|
+
setCondition(name, cond) {
|
|
429
|
+
this.localState.conditions[name] = cond
|
|
430
|
+
this.data.conditions[name] = cond
|
|
431
|
+
},
|
|
432
|
+
|
|
433
|
+
setRandomizedRoute(name, route) {
|
|
434
|
+
this.localState.randomizedRoutes[name] = route
|
|
435
|
+
this.data.randomizedRoutes[name] = route
|
|
436
|
+
},
|
|
437
|
+
|
|
438
|
+
async setKnown() {
|
|
439
|
+
const log = useLog()
|
|
440
|
+
this.cookieState.knownUser = true
|
|
441
|
+
this.data.seedID = this.cookieState.seedID
|
|
442
|
+
try {
|
|
443
|
+
const { id } = await $fetch('/api/participants', {
|
|
444
|
+
method: 'POST',
|
|
445
|
+
body: { data: this.data, projectRef: appconfig.projectRef },
|
|
446
|
+
})
|
|
447
|
+
this.cookieState.docRef = id
|
|
448
|
+
const { id: privateId } = await $fetch(`/api/participants/${id}/private`, {
|
|
449
|
+
method: 'POST',
|
|
450
|
+
body: { data: this.private },
|
|
451
|
+
})
|
|
452
|
+
this.localState.privateDocRef = privateId
|
|
453
|
+
this.setDataLoaded()
|
|
454
|
+
}
|
|
455
|
+
catch (err) {
|
|
456
|
+
log.error('SMILESTORE: could not create participant record: ' + err)
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
|
|
460
|
+
async loadData() {
|
|
461
|
+
if (this.cookieState.docRef) {
|
|
462
|
+
try {
|
|
463
|
+
const result = await $fetch(`/api/participants/${this.cookieState.docRef}`)
|
|
464
|
+
if (result?.data) {
|
|
465
|
+
this.data = result.data
|
|
466
|
+
this.localState.approxDataSize = JSON.stringify(result.data).length
|
|
467
|
+
this.setDataLoaded()
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
catch (err) {
|
|
471
|
+
const log = useLog()
|
|
472
|
+
log.error('SMILESTORE: could not load participant data: ' + err)
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
|
|
477
|
+
setLastRoute(route) {
|
|
478
|
+
this.cookieState.lastRoute = route
|
|
479
|
+
},
|
|
480
|
+
|
|
481
|
+
recordRoute(route) {
|
|
482
|
+
const currentTime = Date.now()
|
|
483
|
+
|
|
484
|
+
if (this.data.routeOrder.length > 0) {
|
|
485
|
+
const lastIndex = this.data.routeOrder.length - 1
|
|
486
|
+
const lastRoute = this.data.routeOrder[lastIndex]
|
|
487
|
+
|
|
488
|
+
this.data.routeOrder[lastIndex] = {
|
|
489
|
+
...lastRoute,
|
|
490
|
+
timeDelta: currentTime - lastRoute.timestamp,
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
this.data.routeOrder.push({
|
|
495
|
+
route,
|
|
496
|
+
timestamp: currentTime,
|
|
497
|
+
timeDelta: null,
|
|
498
|
+
})
|
|
499
|
+
},
|
|
500
|
+
|
|
501
|
+
async saveData(force = false) {
|
|
502
|
+
const log = useLog()
|
|
503
|
+
if (this.isDataLoaded) {
|
|
504
|
+
if (!force && this.localState.totalWrites >= appconfig.maxWrites) {
|
|
505
|
+
log.error(
|
|
506
|
+
'SMILESTORE: max writes reached. Data NOT saved. Call saveData() less frequently.',
|
|
507
|
+
)
|
|
508
|
+
return
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
if (
|
|
512
|
+
!force
|
|
513
|
+
&& this.localState.lastWrite
|
|
514
|
+
&& Date.now() - this.localState.lastWrite < appconfig.minWriteInterval
|
|
515
|
+
) {
|
|
516
|
+
log.error(
|
|
517
|
+
`SMILESTORE: write interval too short (${appconfig.minWriteInterval}ms). Data NOT saved.`,
|
|
518
|
+
)
|
|
519
|
+
return
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
try {
|
|
523
|
+
await $fetch(`/api/participants/${this.cookieState.docRef}`, {
|
|
524
|
+
method: 'PATCH',
|
|
525
|
+
body: { data: this.data },
|
|
526
|
+
})
|
|
527
|
+
if (this.localState.privateDocRef) {
|
|
528
|
+
await $fetch(`/api/participants/${this.cookieState.docRef}/private`, {
|
|
529
|
+
method: 'PATCH',
|
|
530
|
+
body: { data: this.private },
|
|
531
|
+
})
|
|
532
|
+
}
|
|
533
|
+
this.localState.approxDataSize = JSON.stringify(this.data).length
|
|
534
|
+
this.localState.totalWrites += 1
|
|
535
|
+
this.localState.lastWrite = Date.now()
|
|
536
|
+
this.browserEphemeral.unsavedChanges = false
|
|
537
|
+
log.success('SMILESTORE: saveData() successful (force = ' + force + ')')
|
|
538
|
+
}
|
|
539
|
+
catch (err) {
|
|
540
|
+
log.error('SMILESTORE: error saving data: ' + err)
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
else if (!this.data.consented && !this.cookieState.consented) {
|
|
544
|
+
log.log('SMILESTORE: not saving because not consented')
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
log.error('SMILESTORE: can\'t save data, not connected to server')
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Clears all smile cookies by resetting cookieState to defaults
|
|
553
|
+
*/
|
|
554
|
+
clearSmileCookies() {
|
|
555
|
+
const defaults = { ...initCookieState }
|
|
556
|
+
Object.keys(defaults).forEach((key) => {
|
|
557
|
+
this.cookieState[key] = defaults[key]
|
|
558
|
+
})
|
|
559
|
+
},
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Resets the local state to initial values and clears cookies
|
|
563
|
+
*/
|
|
564
|
+
resetLocal() {
|
|
565
|
+
this.clearSmileCookies()
|
|
566
|
+
this.$reset()
|
|
567
|
+
},
|
|
568
|
+
|
|
569
|
+
getConditionByName(name) {
|
|
570
|
+
return this.localState.conditions[name]
|
|
571
|
+
},
|
|
572
|
+
|
|
573
|
+
getRandomizedRouteByName(name) {
|
|
574
|
+
return this.localState.randomizedRoutes[name]
|
|
575
|
+
},
|
|
576
|
+
},
|
|
577
|
+
})
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets random integer between min (inclusive) and max (inclusive)
|
|
3
|
+
* @param {number} min - Minimum value (inclusive)
|
|
4
|
+
* @param {number} max - Maximum value (inclusive)
|
|
5
|
+
* @returns {number} Random integer between min and max
|
|
6
|
+
*/
|
|
7
|
+
export function randomInt(min: number, max: number): number;
|
|
8
|
+
/**
|
|
9
|
+
* Shuffles array in place using Fisher-Yates algorithm
|
|
10
|
+
* @param {Array} array - Array to shuffle
|
|
11
|
+
* @returns {Array} New shuffled array
|
|
12
|
+
*/
|
|
13
|
+
export function shuffle(array: any[]): any[];
|
|
14
|
+
/**
|
|
15
|
+
* Samples elements from array without replacement
|
|
16
|
+
* @param {Array} array - Array to sample from
|
|
17
|
+
* @param {number} sampleSize - Number of elements to sample
|
|
18
|
+
* @returns {Array} Array of sampled elements
|
|
19
|
+
*/
|
|
20
|
+
export function sampleWithoutReplacement(array: any[], sampleSize: number): any[];
|
|
21
|
+
/**
|
|
22
|
+
* Samples elements from array with replacement, optionally using weights
|
|
23
|
+
* @param {Array} array - Array to sample from
|
|
24
|
+
* @param {number} sampleSize - Number of elements to sample
|
|
25
|
+
* @param {Array<number>} [weights] - Optional array of weights for weighted sampling
|
|
26
|
+
* @returns {Array} Array of sampled elements
|
|
27
|
+
*/
|
|
28
|
+
export function sampleWithReplacement(array: any[], sampleSize: number, weights?: Array<number>): any[];
|
|
29
|
+
/**
|
|
30
|
+
* Computes Cartesian product of input arrays
|
|
31
|
+
* @param {...Array} arr - Arrays to compute product of
|
|
32
|
+
* @returns {Array} Array containing all combinations
|
|
33
|
+
*/
|
|
34
|
+
export function expandProduct(...arr: any[][]): any[];
|
|
35
|
+
export namespace fakerDistributions {
|
|
36
|
+
function rnorm(mean: number, sd: number): {
|
|
37
|
+
val: number;
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
function runif(min: number, max: number): {
|
|
41
|
+
val: number;
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
function rbinom(n: number, p: number): {
|
|
45
|
+
val: number;
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
function rexGaussian(mu: number, sigma: number, tau: number): {
|
|
49
|
+
val: number;
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
function rchoice(options: any[]): {
|
|
53
|
+
val: any;
|
|
54
|
+
type: string;
|
|
55
|
+
};
|
|
56
|
+
function render(trial: object): object;
|
|
57
|
+
}
|