UNPKG

@jivanf/vest

Version:

Declarative Form Validations Framework

3 lines (2 loc) 1.94 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vestjs-runtime"),require("vest-utils")):"function"==typeof define&&define.amd?define(["exports","vestjs-runtime","vest-utils"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SuiteSerializer={},e["vestjs-runtime"],e["vest-utils"])}(this,(function(e,t,i){"use strict";var E;!function(e){e.Type="$type",e.Keys="keys",e.Key="key",e.Parent="parent",e.Data="data",e.AllowReorder="allowReorder",e.Status="status",e.AbortController="abortController",e.Children="children"}(E||(E={})),new Set([E.AbortController,E.Parent,E.Keys]);const N="PENDING",s="INITIAL",r="DONE",I={[N]:N,[s]:s,[r]:r},D={initial:I.INITIAL,states:{[I.DONE]:{},[I.INITIAL]:{[I.PENDING]:I.PENDING,[I.DONE]:I.DONE},[I.PENDING]:{[I.DONE]:I.DONE}}};i.StateMachine(D);const n={[N]:N,CANCELED:"CANCELED",FAILED:"FAILED",OMITTED:"OMITTED",PASSING:"PASSING",SKIPPED:"SKIPPED",UNTESTED:"UNTESTED",WARNING:"WARNING"},a={initial:n.UNTESTED,states:{"*":{[n.OMITTED]:n.OMITTED,RESET:n.UNTESTED},[n.UNTESTED]:{[n.CANCELED]:n.CANCELED,[n.FAILED]:n.FAILED,[n.PASSING]:n.PASSING,[n.PENDING]:n.PENDING,[n.SKIPPED]:n.SKIPPED,[n.WARNING]:n.WARNING},[n.PENDING]:{[n.CANCELED]:n.CANCELED,[n.FAILED]:n.FAILED,[n.PASSING]:n.PASSING,[n.SKIPPED]:[n.SKIPPED,e=>!0===e],[n.WARNING]:n.WARNING},[n.SKIPPED]:{},[n.FAILED]:{},[n.WARNING]:{},[n.PASSING]:{},[n.CANCELED]:{},[n.OMITTED]:{}}};i.StateMachine(a);class S{static serialize(e){const i=Object.assign({},e.dump());return t.IsolateSerializer.serialize(i,o)}static deserialize(e){return t.IsolateSerializer.deserialize(e)}static resume(e,t){const i=S.deserialize(t);e.resume(i)}}function o(e,t){if("output"!==t){if(t===E.Status)return A.has(e)?e:void 0;if(!l.has(t))return e}}const A=new Set([n.FAILED,n.PASSING,n.WARNING]),l=new Set(["focusMode","match","matchAll","severity"]);e.SuiteSerializer=S})); //# sourceMappingURL=SuiteSerializer.production.js.map