feat(modal): add cancellable shared runtime
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0647c501ba
commit
d79b063bf9
12 files changed
+999
-392
No files matched your search
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Shared modal state vocabulary.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
(function (window) {
|
||||
"use strict";
|
||||
|
||||
var statuses = {
|
||||
idle: "idle",
|
||||
loading: "loading",
|
||||
ready: "ready",
|
||||
empty: "empty",
|
||||
submitting: "submitting",
|
||||
success: "success",
|
||||
error: "error",
|
||||
unauthorized: "unauthorized",
|
||||
stale: "stale",
|
||||
};
|
||||
|
||||
function create(kind) {
|
||||
return {
|
||||
kind: String(kind || "generic"),
|
||||
status: statuses.idle,
|
||||
updatedAt: 0,
|
||||
error: null,
|
||||
};
|
||||
}
|
||||
|
||||
window.AksrtModalState = {
|
||||
statuses: statuses,
|
||||
create: create,
|
||||
};
|
||||
})(window);
|
||||
Reference in new issue
Block a user