@casual-simulation/aux-runtime 3.8.0 → 3.8.1-alpha.18755991904
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/package.json +4 -4
- package/runtime/AuxLibrary.d.ts +2 -1
- package/runtime/AuxLibrary.js +36 -1
- package/runtime/AuxLibrary.js.map +1 -1
- package/runtime/AuxLibraryDefinitions.def +232 -194
- package/runtime/RecordsEvents.js +1 -1
- package/runtime/RecordsEvents.js.map +1 -1
- package/runtime/Transpiler.js +1 -1
- package/runtime/Transpiler.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casual-simulation/aux-runtime",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1-alpha.18755991904",
|
|
4
4
|
"description": "Runtime for AUX projects",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@casual-simulation/aux-common": "^3.8.
|
|
36
|
-
"@casual-simulation/aux-records": "^3.8.
|
|
35
|
+
"@casual-simulation/aux-common": "^3.8.1-alpha.18755991904",
|
|
36
|
+
"@casual-simulation/aux-records": "^3.8.1-alpha.18755991904",
|
|
37
37
|
"@casual-simulation/crypto": "^3.5.0",
|
|
38
38
|
"@casual-simulation/engine262": "0.0.1-4de2170374e22761996e46eb1362f4496ee57f8f",
|
|
39
39
|
"@casual-simulation/error-stack-parser": "^2.0.7",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"**/*.d.ts",
|
|
84
84
|
"**/*.def"
|
|
85
85
|
],
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "20f206790fb0aa7189d2dd15f8bb3c16cd4899a0"
|
|
87
87
|
}
|
package/runtime/AuxLibrary.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AuxGlobalContext } from './AuxGlobalContext';
|
|
2
2
|
import { DEBUG_STRING } from './AuxGlobalContext';
|
|
3
|
-
import type { BotTags, Bot, ShowChatOptions, BotAction, BotsState, CameraType, BarcodeFormat, PortalType, ShowInputOptions, LocalFormAnimationAction, ShareOptions, Easing, BotAnchorPoint, RuntimeBot, BotSpace, EaseType, RegisterPrefixOptions, OpenCircleWipeOptions, SuperShoutAction, ShowToastAction, ShowJoinCodeAction, RequestFullscreenAction, ExitFullscreenAction, ShowHtmlAction, HideHtmlAction, SetClipboardAction, FocusOnBotAction, ShowChatBarAction, EnableARAction, EnableVRAction, DownloadAction, ShowUploadAuxFileAction, OpenQRCodeScannerAction, ShowQRCodeAction, OpenBarcodeScannerAction, ShowBarcodeAction, LoadServerAction, UnloadServerAction, ReplaceDragBotAction, ShowInputForTagAction, GoToDimensionAction, GoToURLAction, OpenURLAction, OpenConsoleAction, RejectAction, FocusOnOptions, SnapTarget, AddDropSnapTargetsAction, RecordingOptions, Recording, SyntheticVoice, EnablePOVAction, EnableCustomDraggingAction, SetAppOutputAction, PartialBotsState, ParsedBotLink, ConvertGeolocationToWhat3WordsOptions, BeginAudioRecordingAction, MediaPermssionOptions, ImageClassifierOptions, ClassifyImagesOptions, ClassifyImagesResult, AddDropGridTargetsAction, InstUpdate, StartFormAnimationOptions, StopFormAnimationOptions, FormAnimationData, WakeLockConfiguration, EnableXROptions, ShowConfirmOptions, StoredAux, Geolocation, OpenPhotoCameraOptions, Photo, Point2D, RecordLoomOptions, LoomVideo, LoomVideoEmbedMetadata, InstallAuxFileMode, LoadServerConfigAction, InstConfig, UnloadServerConfigAction, Point3D, MapLayer, DynamicListener, TrackConfigBotTagsAction } from '@casual-simulation/aux-common/bots';
|
|
3
|
+
import type { BotTags, Bot, ShowChatOptions, BotAction, BotsState, CameraType, BarcodeFormat, PortalType, ShowInputOptions, LocalFormAnimationAction, ShareOptions, Easing, BotAnchorPoint, RuntimeBot, BotSpace, EaseType, RegisterPrefixOptions, OpenCircleWipeOptions, SuperShoutAction, ShowToastAction, ShowJoinCodeAction, RequestFullscreenAction, ExitFullscreenAction, ShowHtmlAction, HideHtmlAction, SetClipboardAction, FocusOnBotAction, ShowChatBarAction, EnableARAction, EnableVRAction, DownloadAction, ShowUploadAuxFileAction, OpenQRCodeScannerAction, ShowQRCodeAction, OpenBarcodeScannerAction, ShowBarcodeAction, LoadServerAction, UnloadServerAction, ReplaceDragBotAction, ShowInputForTagAction, GoToDimensionAction, GoToURLAction, OpenURLAction, OpenConsoleAction, RejectAction, FocusOnOptions, SnapTarget, AddDropSnapTargetsAction, RecordingOptions, Recording, SyntheticVoice, EnablePOVAction, EnableCustomDraggingAction, SetAppOutputAction, PartialBotsState, ParsedBotLink, ConvertGeolocationToWhat3WordsOptions, BeginAudioRecordingAction, MediaPermssionOptions, ImageClassifierOptions, ClassifyImagesOptions, ClassifyImagesResult, AddDropGridTargetsAction, InstUpdate, StartFormAnimationOptions, StopFormAnimationOptions, FormAnimationData, WakeLockConfiguration, EnableXROptions, ShowConfirmOptions, ShowAlertOptions, StoredAux, Geolocation, OpenPhotoCameraOptions, Photo, Point2D, RecordLoomOptions, LoomVideo, LoomVideoEmbedMetadata, InstallAuxFileMode, LoadServerConfigAction, InstConfig, UnloadServerConfigAction, Point3D, MapLayer, DynamicListener, TrackConfigBotTagsAction } from '@casual-simulation/aux-common/bots';
|
|
4
4
|
import type { AIChatOptions, AIGenerateSkyboxOptions, AIGenerateImageOptions, JoinRoomActionOptions, RoomOptions, RoomTrackOptions, SetRoomTrackOptions, RoomRemoteOptions, DataRecordOptions, RecordActionOptions, ListDataOptions, AISloydGenerateModelOptions, ListWebhooksOptions, ListNotificationsOptions, SendNotificationOptions, GrantEntitlementsRequest, GrantEntitlementsResult, InstallPackageResult, ListPermissionsRequest, ListedChatModel } from './RecordsEvents';
|
|
5
5
|
import type { RemoteAction, AvailablePermissions, Entitlement, VersionNumber, GenericResult, SimpleError } from '@casual-simulation/aux-common';
|
|
6
6
|
import '@casual-simulation/aux-common/polyfill/Array.first.polyfill';
|
|
@@ -2532,6 +2532,7 @@ export declare function createDefaultLibrary(context: AuxGlobalContext): {
|
|
|
2532
2532
|
_showInput: (currentValue?: any, options?: Partial<ShowInputOptions>) => Promise<any>;
|
|
2533
2533
|
showInput: ((currentValue?: any, options?: Partial<ShowInputOptions>) => Promise<any>) & MaskableFunction;
|
|
2534
2534
|
showConfirm: (options: ShowConfirmOptions) => Promise<boolean>;
|
|
2535
|
+
showAlert: (options: ShowAlertOptions) => Promise<void>;
|
|
2535
2536
|
goToDimension: (dimension: string) => GoToDimensionAction;
|
|
2536
2537
|
goToURL: (url: string) => GoToURLAction;
|
|
2537
2538
|
openURL: (url: string) => OpenURLAction;
|
package/runtime/AuxLibrary.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEBUG_STRING, debugStringifyFunction } from './AuxGlobalContext';
|
|
2
|
-
import { hasValue, trimTag, isBot, BOT_SPACE_TAG, toast as toastMessage, getScriptIssues as scriptIssues, tip as tipMessage, hideTips as hideTipMessages, showJoinCode as calcShowJoinCode, requestFullscreen, exitFullscreen, html as htmlMessage, hideHtml as hideHtmlMessage, setClipboard as calcSetClipboard, tweenTo as calcTweenTo, showChat as calcShowChat, hideChat as calcHideChat, runScript, getMediaPermission as calcGetMediaPermission, getAverageFrameRate as calcGetAverageFrameRate, enableAR as calcEnableAR, disableAR as calcDisableAR, enableVR as calcEnableVR, disableVR as calcDisableVR, arSupported as calcARSupported, vrSupported as calcVRSupported, showUploadAuxFile as calcShowUploadAuxFile, openQRCodeScanner as calcOpenQRCodeScanner, showQRCode as calcShowQRCode, openBarcodeScanner as calcOpenBarcodeScanner, showBarcode as calcShowBarcode, importAUX as calcImportAUX, showInputForTag as calcShowInputForTag, showInput as calcShowInput, showConfirm as calcShowConfirm, replaceDragBot as calcReplaceDragBot, goToDimension as calcGoToDimension, goToURL as calcGoToURL, openURL as calcOpenURL, playSound as calcPlaySound, bufferSound as calcBufferSound, cancelSound as calcCancelSound, shell as calcShell, reject as calcReject, localFormAnimation as calcLocalFormAnimation, webhook as calcWebhook, superShout as calcSuperShout, share as calcShare, registerPrefix as calcRegisterPrefix, localPositionTween as calcLocalPositionTween, localRotationTween as calcLocalRotationTween, showUploadFiles as calcShowUploadFiles, download, loadSimulation, unloadSimulation, getUploadState, addState, getPortalTag, KNOWN_PORTALS, openConsole, tagsOnBot, getOriginalObject, getBotSpace, trimEvent, CREATE_ACTION_NAME, CREATE_ANY_ACTION_NAME, DESTROY_ACTION_NAME, ORIGINAL_OBJECT, getRemoteCount, getRemotes, listInstUpdates as calcListInstUpdates, getInstStateFromUpdates as calcGetInstStateFromUpdates, action, calculateAnchorPoint, calculateAnchorPointOffset, getBotPosition as calcGetBotPosition, getBotRotation as calcGetBotRotation, isRuntimeBot, SET_TAG_MASK_SYMBOL, CLEAR_TAG_MASKS_SYMBOL, getBotScale, EDIT_TAG_SYMBOL, EDIT_TAG_MASK_SYMBOL, circleWipe, addDropSnap as calcAddDropSnap, addDropGrid as calcAddDropGrid, animateToPosition, beginAudioRecording as calcBeginAudioRecording, endAudioRecording as calcEndAudioRecording, beginRecording as calcBeginRecording, endRecording as calcEndRecording, speakText as calcSpeakText, getVoices as calcGetVoices, getGeolocation as calcGetGeolocation, cancelAnimation, disablePOV, enablePOV, enableCustomDragging as calcEnableCustomDragging, MINI_PORTAL, registerCustomApp, setAppOutput, unregisterCustomApp, requestAuthData as calcRequestAuthData, createBot, defineGlobalBot as calcDefineGlobalBot, TEMPORARY_BOT_PARTITION_ID, convertToString, GET_TAG_MASKS_SYMBOL, isBotLink, parseBotLink, createBotLink, convertGeolocationToWhat3Words as calcConvertGeolocationToWhat3Words, meetCommand as calcMeetCommand, meetFunction as calcMeetFunction, openImageClassifier as calcOpenImageClassifier, classifyImages as calcOpenClassifyImages, isBotDate, DATE_TAG_PREFIX, parseBotDate, realNumberOrDefault, raycastFromCamera as calcRaycastFromCamera, raycastInPortal as calcRaycastInPortal, calculateRayFromCamera as calcCalculateRayFromCamera, bufferFormAddressGltf, startFormAnimation as calcStartFormAnimation, stopFormAnimation as calcStopFormAnimation, listFormAnimations as calcListFormAnimations, calculateStringTagValue, createInitializationUpdate as calcCreateInitalizationUpdate, applyUpdatesToInst as calcApplyUpdatesToInst, configureWakeLock, getWakeLockConfiguration as calcGetWakeLockConfiguration, analyticsRecordEvent as calcAnalyticsRecordEvent, KNOWN_TAGS, isStoredVersion2, getCurrentInstUpdate as calcGetCurrentInstUpdate, openPhotoCamera as calcOpenPhotoCamera, getEasing, enableCollaboration as calcEnableCollaboration, showAccountInfo as calcShowAccountInfo, reportInst as calcReportInst, getRecordsEndpoint as calcGetRecordsEndpoint, ldrawCountAddressBuildSteps as calcLdrawCountAddressBuildSteps, ldrawCountTextBuildSteps as calcLdrawCountTextBuildSteps, calculateViewportCoordinatesFromPosition as calcCalculateViewportCoordinatesFromPosition, calculateScreenCoordinatesFromViewportCoordinates as calcCalculateScreenCoordinatesFromViewportCoordinates, calculateViewportCoordinatesFromScreenCoordinates as calcCalculateViewportCoordinatesFromScreenCoordinates, capturePortalScreenshot as calcCapturePortalScreenshot, createStaticHtml as calcCreateStaticHtmlFromBots, recordLoom, watchLoom, getLoomMetadata, loadSharedDocument, installAuxFile as calcInstallAuxFile, calculateStringListTagValue, calculateScreenCoordinatesFromPosition as calcCalculateScreenCoordinatesFromPosition, addMapLayer as calcAddMapLayer, removeMapLayer as calcRemoveMapLayer, GET_DYNAMIC_LISTENERS_SYMBOL, ADD_BOT_LISTENER_SYMBOL, REMOVE_BOT_LISTENER_SYMBOL, trackConfigBotTags as calcTrackConfigBotTags, } from '@casual-simulation/aux-common/bots';
|
|
2
|
+
import { hasValue, trimTag, isBot, BOT_SPACE_TAG, toast as toastMessage, getScriptIssues as scriptIssues, tip as tipMessage, hideTips as hideTipMessages, showJoinCode as calcShowJoinCode, requestFullscreen, exitFullscreen, html as htmlMessage, hideHtml as hideHtmlMessage, setClipboard as calcSetClipboard, tweenTo as calcTweenTo, showChat as calcShowChat, hideChat as calcHideChat, runScript, getMediaPermission as calcGetMediaPermission, getAverageFrameRate as calcGetAverageFrameRate, enableAR as calcEnableAR, disableAR as calcDisableAR, enableVR as calcEnableVR, disableVR as calcDisableVR, arSupported as calcARSupported, vrSupported as calcVRSupported, showUploadAuxFile as calcShowUploadAuxFile, openQRCodeScanner as calcOpenQRCodeScanner, showQRCode as calcShowQRCode, openBarcodeScanner as calcOpenBarcodeScanner, showBarcode as calcShowBarcode, importAUX as calcImportAUX, showInputForTag as calcShowInputForTag, showInput as calcShowInput, showConfirm as calcShowConfirm, showAlert as calcShowAlert, replaceDragBot as calcReplaceDragBot, goToDimension as calcGoToDimension, goToURL as calcGoToURL, openURL as calcOpenURL, playSound as calcPlaySound, bufferSound as calcBufferSound, cancelSound as calcCancelSound, shell as calcShell, reject as calcReject, localFormAnimation as calcLocalFormAnimation, webhook as calcWebhook, superShout as calcSuperShout, share as calcShare, registerPrefix as calcRegisterPrefix, localPositionTween as calcLocalPositionTween, localRotationTween as calcLocalRotationTween, showUploadFiles as calcShowUploadFiles, download, loadSimulation, unloadSimulation, getUploadState, addState, getPortalTag, KNOWN_PORTALS, openConsole, tagsOnBot, getOriginalObject, getBotSpace, trimEvent, CREATE_ACTION_NAME, CREATE_ANY_ACTION_NAME, DESTROY_ACTION_NAME, ORIGINAL_OBJECT, getRemoteCount, getRemotes, listInstUpdates as calcListInstUpdates, getInstStateFromUpdates as calcGetInstStateFromUpdates, action, calculateAnchorPoint, calculateAnchorPointOffset, getBotPosition as calcGetBotPosition, getBotRotation as calcGetBotRotation, isRuntimeBot, SET_TAG_MASK_SYMBOL, CLEAR_TAG_MASKS_SYMBOL, getBotScale, EDIT_TAG_SYMBOL, EDIT_TAG_MASK_SYMBOL, circleWipe, addDropSnap as calcAddDropSnap, addDropGrid as calcAddDropGrid, animateToPosition, beginAudioRecording as calcBeginAudioRecording, endAudioRecording as calcEndAudioRecording, beginRecording as calcBeginRecording, endRecording as calcEndRecording, speakText as calcSpeakText, getVoices as calcGetVoices, getGeolocation as calcGetGeolocation, cancelAnimation, disablePOV, enablePOV, enableCustomDragging as calcEnableCustomDragging, MINI_PORTAL, registerCustomApp, setAppOutput, unregisterCustomApp, requestAuthData as calcRequestAuthData, createBot, defineGlobalBot as calcDefineGlobalBot, TEMPORARY_BOT_PARTITION_ID, convertToString, GET_TAG_MASKS_SYMBOL, isBotLink, parseBotLink, createBotLink, convertGeolocationToWhat3Words as calcConvertGeolocationToWhat3Words, meetCommand as calcMeetCommand, meetFunction as calcMeetFunction, openImageClassifier as calcOpenImageClassifier, classifyImages as calcOpenClassifyImages, isBotDate, DATE_TAG_PREFIX, parseBotDate, realNumberOrDefault, raycastFromCamera as calcRaycastFromCamera, raycastInPortal as calcRaycastInPortal, calculateRayFromCamera as calcCalculateRayFromCamera, bufferFormAddressGltf, startFormAnimation as calcStartFormAnimation, stopFormAnimation as calcStopFormAnimation, listFormAnimations as calcListFormAnimations, calculateStringTagValue, createInitializationUpdate as calcCreateInitalizationUpdate, applyUpdatesToInst as calcApplyUpdatesToInst, configureWakeLock, getWakeLockConfiguration as calcGetWakeLockConfiguration, analyticsRecordEvent as calcAnalyticsRecordEvent, KNOWN_TAGS, isStoredVersion2, getCurrentInstUpdate as calcGetCurrentInstUpdate, openPhotoCamera as calcOpenPhotoCamera, getEasing, enableCollaboration as calcEnableCollaboration, showAccountInfo as calcShowAccountInfo, reportInst as calcReportInst, getRecordsEndpoint as calcGetRecordsEndpoint, ldrawCountAddressBuildSteps as calcLdrawCountAddressBuildSteps, ldrawCountTextBuildSteps as calcLdrawCountTextBuildSteps, calculateViewportCoordinatesFromPosition as calcCalculateViewportCoordinatesFromPosition, calculateScreenCoordinatesFromViewportCoordinates as calcCalculateScreenCoordinatesFromViewportCoordinates, calculateViewportCoordinatesFromScreenCoordinates as calcCalculateViewportCoordinatesFromScreenCoordinates, capturePortalScreenshot as calcCapturePortalScreenshot, createStaticHtml as calcCreateStaticHtmlFromBots, recordLoom, watchLoom, getLoomMetadata, loadSharedDocument, installAuxFile as calcInstallAuxFile, calculateStringListTagValue, calculateScreenCoordinatesFromPosition as calcCalculateScreenCoordinatesFromPosition, addMapLayer as calcAddMapLayer, removeMapLayer as calcRemoveMapLayer, GET_DYNAMIC_LISTENERS_SYMBOL, ADD_BOT_LISTENER_SYMBOL, REMOVE_BOT_LISTENER_SYMBOL, trackConfigBotTags as calcTrackConfigBotTags, } from '@casual-simulation/aux-common/bots';
|
|
3
3
|
import { aiChat, aiChatStream, aiListChatModels, aiGenerateSkybox, aiGenerateImage, grantRecordPermission as calcGrantRecordPermission, revokeRecordPermission as calcRevokeRecordPermission, listPermissions as calcListPermissions, grantInstAdminPermission as calcGrantInstAdminPermission, grantUserRole as calcGrantUserRole, revokeUserRole as calcRevokeUserRole, grantInstRole as calcGrantInstRole, revokeInstRole as calcRevokeInstRole, listUserStudios as calcListUserStudios, listStudioRecords as calcListStudioRecords, joinRoom as calcJoinRoom, leaveRoom as calcLeaveRoom, setRoomOptions as calcSetRoomOptions, getRoomOptions as calcGetRoomOptions, getRoomTrackOptions as calcGetRoomTrackOptions, setRoomTrackOptions as calcSetRoomTrackOptions, getRoomRemoteOptions as calcGetRoomRemoteOptions, listDataRecord, recordEvent as calcRecordEvent, getEventCount as calcGetEventCount, getFile as calcGetFile, eraseFile as calcEraseFile, getPublicRecordKey as calcGetPublicRecordKey, recordData as calcRecordData, getRecordData, eraseRecordData, recordFile as calcRecordFile, listDataRecordByMarker, aiHumeGetAccessToken, aiSloydGenerateModel, recordWebhook as calcRecordWebhook, getWebhook as calcGetWebhook, listWebhooks as calcListWebhooks, listWebhooksByMarker as calcListWebhooksByMarker, eraseWebhook as calcEraseWebhook, runWebhook as calcRunWebhook, recordNotification as calcRecordNotification, getNotification as calcGetNotification, listNotifications as calcListNotifications, listNotificationsByMarker as calcListNotificationsByMarker, eraseNotification as calcEraseNotification, subscribeToNotification as calcSubscribeToNotification, unsubscribeFromNotification as calcUnsubscribeFromNotification, sendNotification as calcSendNotification, listNotificationSubscriptions as calcListNotificationSubscriptions, listUserNotificationSubscriptions as calcListUserNotificationSubscriptions, aiOpenAICreateRealtimeSession, grantEntitlements as calcGrantEntitlements, recordPackageVersion as calcRecordPackageVersion, erasePackageVersion as calcErasePackageVersion, listPackageVersions as calcListPackageVersions, getPackageVersion as calcGetPackageVersion, recordPackageContainer as calcRecordPackageContainer, erasePackageContaienr as calcErasePackageContainer, listPackageContainers as calcListPackageContainers, listPackageContainersByMarker as calcListPackageContainersByMarker, getPackageContainer as calcGetPackageContainer, installPackage as calcInstallPackage, listInstalledPackages as calcListInstalledPackages, listInsts as calcListInsts, listInstsByMarker as calcListInstsByMarker, recordsCallProcedure, } from './RecordsEvents';
|
|
4
4
|
import { sortBy, cloneDeep, union, isEqual } from 'es-toolkit/compat';
|
|
5
5
|
import { remote as calcRemote, DEFAULT_BRANCH_NAME, formatVersionNumber, parseVersionNumber, PRIVATE_MARKER, } from '@casual-simulation/aux-common';
|
|
@@ -690,6 +690,7 @@ export function createDefaultLibrary(context) {
|
|
|
690
690
|
_showInput: showInput,
|
|
691
691
|
showInput: makeMockableFunction(showInput, 'os.showInput'),
|
|
692
692
|
showConfirm,
|
|
693
|
+
showAlert,
|
|
693
694
|
goToDimension,
|
|
694
695
|
goToURL,
|
|
695
696
|
openURL,
|
|
@@ -4436,6 +4437,40 @@ export function createDefaultLibrary(context) {
|
|
|
4436
4437
|
const event = calcShowConfirm(options, task.taskId);
|
|
4437
4438
|
return addAsyncAction(task, event);
|
|
4438
4439
|
}
|
|
4440
|
+
/**
|
|
4441
|
+
* Shows an alert dialog using the given options. Alert dialogs are useful for displaying information that needs to be manually dismissed by the user.
|
|
4442
|
+
*
|
|
4443
|
+
* Returns a promise that resolves when the user dismisses the alert.
|
|
4444
|
+
*
|
|
4445
|
+
* @param options the options that should be used for the alert dialog.
|
|
4446
|
+
*
|
|
4447
|
+
* @example Show a basic alert
|
|
4448
|
+
* await os.showAlert({
|
|
4449
|
+
* title: 'Alert',
|
|
4450
|
+
* content: 'This is an important message.'
|
|
4451
|
+
* });
|
|
4452
|
+
*
|
|
4453
|
+
* os.toast('Alert dismissed');
|
|
4454
|
+
*
|
|
4455
|
+
* @example Show an alert with custom button text
|
|
4456
|
+
* await os.showAlert({
|
|
4457
|
+
* title: 'Warning',
|
|
4458
|
+
* content: 'Please read this carefully.',
|
|
4459
|
+
* dismissText: 'Got it'
|
|
4460
|
+
* });
|
|
4461
|
+
*
|
|
4462
|
+
* @dochash actions/os/portals
|
|
4463
|
+
* @docname os.showAlert
|
|
4464
|
+
* @docgroup 10-showInput
|
|
4465
|
+
*/
|
|
4466
|
+
function showAlert(options) {
|
|
4467
|
+
if (!options) {
|
|
4468
|
+
throw new Error('You must provide an options object for os.showAlert()');
|
|
4469
|
+
}
|
|
4470
|
+
const task = context.createTask();
|
|
4471
|
+
const event = calcShowAlert(options, task.taskId);
|
|
4472
|
+
return addAsyncAction(task, event);
|
|
4473
|
+
}
|
|
4439
4474
|
/**
|
|
4440
4475
|
* Loads the given dimension into the {@tag gridPortal} portal. Triggers the {@tag @onPortalChanged} shout for the gridPortal.
|
|
4441
4476
|
* @param dimension the dimension that should be loaded.
|