@decaf-ts/ui-decorators 0.16.2 → 0.17.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.
@@ -1,2 +1,2 @@
1
- var e,t;e=this,t=function(e,t,r,a,o){"use strict";var s;e.UIMediaBreakPoints=void 0,(s=e.UIMediaBreakPoints||(e.UIMediaBreakPoints={})).SMALL="small",s.MEDIUM="medium",s.LARGE="large",s.XLARGE="xlarge";const n={REFLECT:"ui",UIMODEL:"uimodel",RENDERED_BY:"rendered-by",ELEMENT:"uielement",PROP:"uiprop",CHILD:"uichild",NAME:"name",NAME_PREFIX:"input-",VALIDATION_MESSAGE:"validationMessage",UILISTMODEL:"uilistmodel",UILISTPROP:"uilistprop",UILAYOUT:"uilayout",UILAYOUTPROP:"uilayoutprop",HANDLERS:"handlers",TYPE:"type",SUB_TYPE:"subType",HIDDEN:"hidden",FORMAT:"format",ORDER:"order",PAGE:"page",EVENTS:"events",FIRST:"first",LAST:"last",READ_ONLY:"readonly",SEQUENCE:"sequence",REQUIRED:t.ValidationKeys.REQUIRED,MIN:t.ValidationKeys.MIN,MIN_LENGTH:t.ValidationKeys.MIN_LENGTH,MAX:t.ValidationKeys.MAX,MAX_LENGTH:t.ValidationKeys.MAX_LENGTH,PATTERN:t.ValidationKeys.PATTERN,URL:t.ValidationKeys.URL,STEP:t.ValidationKeys.STEP,DATE:t.ValidationKeys.DATE,EMAIL:t.ValidationKeys.EMAIL,PASSWORD:t.ValidationKeys.PASSWORD,EQUALS:t.ValidationKeys.EQUALS,DIFF:t.ValidationKeys.DIFF,LESS_THAN:t.ValidationKeys.LESS_THAN,LESS_THAN_OR_EQUAL:t.ValidationKeys.LESS_THAN_OR_EQUAL,GREATER_THAN:t.ValidationKeys.GREATER_THAN,GREATER_THAN_OR_EQUAL:t.ValidationKeys.GREATER_THAN_OR_EQUAL},i={[n.EMAIL]:t.EmailValidator,[n.URL]:t.URLValidator,[n.DATE]:t.DateValidator,[n.PASSWORD]:t.PasswordValidator},d={[n.REQUIRED]:t.RequiredValidator,[n.MIN]:t.MinValidator,[n.MAX]:t.MaxValidator,[n.STEP]:t.StepValidator,[n.MIN_LENGTH]:t.MinLengthValidator,[n.MAX_LENGTH]:t.MaxLengthValidator,[n.PATTERN]:t.PatternValidator,[n.EQUALS]:t.EqualsValidator,[n.DIFF]:t.DiffValidator,[n.LESS_THAN]:t.LessThanValidator,[n.LESS_THAN_OR_EQUAL]:t.LessThanOrEqualValidator,[n.GREATER_THAN]:t.GreaterThanValidator,[n.GREATER_THAN_OR_EQUAL]:t.GreaterThanOrEqualValidator},l="yyyy-MM-dd",c={BUTTON:"button",CHECKBOX:"checkbox",COLOR:"color",DATE:n.DATE,DATETIME_LOCAL:"datetime-local",EMAIL:n.EMAIL,FILE:"file",HIDDEN:"hidden",IMAGE:"image",MONTH:"month",NUMBER:"number",PASSWORD:n.PASSWORD,RADIO:"radio",RANGE:"range",RESET:"reset",SEARCH:"search",SUBMIT:"submit",TEL:"tel",TEXT:"text",TEXTAREA:"textarea",SELECT:"select",TIME:"time",URL:n.URL,WEEK:"week"},p=[c.CHECKBOX,c.RADIO],E={cancel:"cancel",confirm:"confirm",submit:"submit",clear:"clear",back:"back",[r.OperationKeys.CREATE]:r.OperationKeys.CREATE,[r.OperationKeys.READ]:r.OperationKeys.READ,[r.OperationKeys.UPDATE]:r.OperationKeys.UPDATE,[r.OperationKeys.DELETE]:r.OperationKeys.DELETE};class u extends r.InternalError{constructor(e){super(e,u.name)}}const f=e=>"function"==typeof e&&/^class\s/.test(e+"");function h(e,t){return a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES,e,t)}function y(e,r,...a){if(e===n.DATE){if(!r)return"";const e=a.shift()||l;return t.formatDate(new Date(r),e)}return r}function M(e){if("number"==typeof e&&!isNaN(e))return e;const t=Number(e);return isNaN(t)?void 0:t}function T(e){if(!e)return e;const t={"&":"&amp;","<":"&lt;",">":"&gt;"};return(""+e).replace(/[&<>]/g,e=>t[e]||e)}function m(e){let r=Date.now();try{t.Model.pk(e.constructor)&&(r=e[t.Model.pk(e.constructor)])}catch(e){}return`${e.constructor.name}-${r}`}class R{static{this.cache={}}constructor(e){this.flavour=e,this.initialized=!1,R.register(this)}translate(e,r=!0){if(r)switch(e){case t.ReservedModels.STRING.name.toLowerCase():return c.TEXT;case t.ReservedModels.NUMBER.name.toLowerCase():case t.ReservedModels.BIGINT.name.toLowerCase():return c.NUMBER;case t.ReservedModels.BOOLEAN.name.toLowerCase():return c.CHECKBOX;case t.ReservedModels.DATE.name.toLowerCase():return c.DATE}else switch(e){case c.SELECT:case c.TEXT:case c.EMAIL:case c.COLOR:case c.PASSWORD:case c.TEL:case c.URL:case c.SEARCH:case c.HIDDEN:case c.TEXTAREA:case c.RADIO:return t.ReservedModels.STRING.name.toLowerCase();case c.NUMBER:return t.ReservedModels.NUMBER.name.toLowerCase();case c.CHECKBOX:return t.ReservedModels.BOOLEAN.name.toLowerCase();case c.DATE:case c.DATETIME_LOCAL:case c.TIME:return t.ReservedModels.DATE.name.toLowerCase()}return e}getClassDecoratorsMetadata(e){return[t.Model.uiModelOf(e.constructor),t.Model.uiListModelOf(e.constructor),t.Model.uiHandlersFor(e.constructor),t.Model.uiLayoutOf(e.constructor)].filter(Boolean)}sortChildrenByOrder(e=[]){return e.sort((r,a)=>{const o=r.props?.order??0,s=a.props?.order??0,i=r=>r===n.FIRST?0:typeof r===t.Primitives.NUMBER?1:r===n.LAST?e.length+e.indexOf(a):1,d=i(o),l=i(s);return d!==l?d-l:1===d&&typeof o===t.Primitives.NUMBER&&typeof s===t.Primitives.NUMBER?o-s:0})}isCustomValidator(e){return!Object.values(t.ValidationKeys).includes(e)&&!Object.values(n).includes(e)}isValidatableByType(e){return Object.keys(i).includes(e)}isValidatableByAttribute(e){return Object.keys(d).includes(e)}toAttributeValue(e,t){if(!Object.keys(d).includes(e))throw Error(`Invalid attribute key "${e}". Expected one of: ${Object.keys(d).join(", ")}.`);return e===n.REQUIRED||t[e]}toFieldDefinition(e,o={},s=!0){const{inheritProps:i,...d}=o;o=d;const p=this.getClassDecoratorsMetadata(e);if(!p.length)throw new u(`No ui definitions set for model ${e.constructor.name}. Did you use @uimodel?`);const E=Object.assign({},...p,i||{}),{tag:f,props:h,item:M,handlers:T}=E,R=t.Model.uiPropertiesOf(e.constructor);let O,L=M?.props||{},g={};const A=(e,t)=>e?[e,t].join("."):t;if(R){const s=a.Metadata.get(e.constructor,t.ValidationKeys.REFLECT)||{};for(const i of R){const d=t.Model.uiDecorationOf(e.constructor,i);let p;try{p=t.Model.uiTypeOf(e.constructor,i)}catch(e){if(!(e instanceof r.NotFoundError))throw e}if(t.Model.uiIsHidden(e.constructor,i)&&!t.Model.uiElementOf(e.constructor,i))throw new u(`@uielement no found in "${i}". It is required to use hiddenOn decorator.`);Object.entries(d).map(([e,t])=>({key:e,props:t})).sort(e=>[n.ELEMENT,n.CHILD].includes(e.key)?-1:1).forEach(r=>{if(!r)throw new u("No decorator found");switch(r.key){case n.PROP:L[i]=r.props;break;case n.CHILD:{const a=r.props?.props?.name||i;try{if(!t.Model.isModel(t.Model.build({},a))&&!t.Model.isPropertyModel(e,a))throw new u(`Child "${a}" must be a model.`)}catch(e){throw new u(`Child "${a}" must be a model.`)}let s;const n=e[i];if("object"!=typeof n||null===n||Array.isArray(n)){const e=r.props.props?.name;s=new(t.Model.get(e))}O=O||[];const d=Object.assign({},o||{},{model:s},{inheritProps:r.props,childOf:A(o?.childOf,i)}),l=this.toFieldDefinition(n||s,d,!1),{inheritProps:c}=d;c&&(l.props=Object.assign({},l.props,c.props||{})),O.push(l);break}case n.UILISTPROP:{g=g||{};const e=r.props;e.name&&(g[e.name]="object"==typeof e?.props&&n.SEQUENCE in e.props?e.props:i);const t=Object.assign({},E.props?.item||{},M?.props||{},e?.props||{},o);L={tag:M?.tag||t.render||"",props:Object.assign({},L?.props,{mapper:g},t)};break}case n.EVENTS:case n.HIDDEN:case n.PAGE:case n.ORDER:case n.UILAYOUTPROP:case n.ELEMENT:{O=O||[];const t=r.props,d=Object.assign({},L?.props,t.props||{},t?.props?.name?{path:A(o?.childOf,t.props.name),childOf:void 0}:{},o,{name:t.props?.name||i});if(r.key===n.ELEMENT){const r={tag:t.tag||L?.tag||f||"",props:d},o=s[i];if(o)for(const e of Object.entries(o).map(([e,t])=>({key:e,props:t})))this.isValidatableByAttribute(e.key)?r.props[this.translate(e.key)]=this.toAttributeValue(e.key,e.props):this.isValidatableByType(e.key)?(e.key===c.DATE&&(r.props[n.FORMAT]=e.props.format||l),r.props[n.TYPE]=e.key):this.isCustomValidator(e.key)&&(d[n.SUB_TYPE]=e.key,e.props?.message&&(d[n.VALIDATION_MESSAGE]=e.props.message));if(!r.props[n.TYPE]){const t=a.Metadata.type(e.constructor,i).name;r.props[n.TYPE]=this.translate(t.toLowerCase(),!0)}r.props.value=y(r.props[n.TYPE],e[i],r.props[n.FORMAT]),O.push(r)}else{const e=O.find(e=>e.props?.name===i||[n.UILAYOUTPROP,n.PAGE,n.EVENTS].includes(r.key)&&(e.props?.childOf===i||e.props?.childOf?.endsWith("."+i)));if(e)if(r.key!==n.UILAYOUTPROP)e.props=Object.assign({},e.props,{[r.key]:t});else{const{row:t,col:a,props:o}=r.props;e.props=Object.assign({},o||{},e.props,t,a)}}break}default:throw new u("Invalid key: "+r.key)}})}}o=Object.assign({},h,o,{handlers:T||{}});const D=o?.operation;O=this.sortChildrenByOrder(O).filter(e=>{const t=e?.props?.hidden||[];return t?.length&&t.includes(D)?void 0:e});const I={tag:f,item:L,props:o,children:O?.length?O:void 0};return s&&(I.rendererId=m(e)),I}static register(e){if(e.flavour in this.cache)throw new r.InternalError(`Rendering engine under ${e.flavour} already exists`);this.cache[e.flavour]=e,this.current=e}static getOrBoot(e){if(e instanceof R)return e;const t=new e;return t.initialize(),t}static get(e){if(!e)return this.getOrBoot(this.current);if(!(e in this.cache))throw new r.InternalError(`Rendering engine under ${e} does not exist`);return this.getOrBoot(this.cache[e])}static render(e,...a){if(!t.Model.get(e.constructor.name)&&!t.Model.fromObject(e))throw new r.InternalError("No model registered found");const o=t.Model.renderedBy(e.constructor);return R.get(o).render(e,...a)}}function O(...e){return(t,r)=>a.propMetadata(h(r,n.HIDDEN),e)(t,r)}function L(e,t){return(r,o)=>{a.propMetadata(h(o,n.EVENTS),{..."object"==typeof e?e:{[e]:t}})(r,o)}}class g extends t.Validator{getMessage(e,...t){return g.translateService?g.translateService.translate(e,...t):super.getMessage(e,...t)}}class A extends o.LoggedClass{constructor(){super(),this.enableDarkMode=!0,this.isDarkMode=!1,this.item={tag:""},this.props={},this.route="",this.borders=!1,this.OperationKeys=r.OperationKeys,this.initialized=!1,this.events={},this.handlers={}}get repository(){return this._repository}set repository(e){this._repository=e}async render(...e){this.log.for(this.render).info(`render for ${this.componentName} with ${JSON.stringify(e)}`)}async refresh(...e){this.log.for(this.refresh).info("Refresh called with args: "+e)}async initialize(...e){this.initialized=!0}async translate(...e){this.log.for(this.translate).info(`translate for ${this.componentName} with ${JSON.stringify(e)}`)}async preview(...e){this.log.for(this.preview).debug("Preview called with args: "+e)}async submit(...e){this.log.for(this.submit).info(`submit for ${this.componentName} with ${JSON.stringify(e)}`)}parseHandlers(e,t){const r={};return Object.entries(e).forEach(([e,a])=>{if(f(a)){const o=new a,s=e in o?o[e]:o.handle;r[e]=s,t.handlers[e]=s}else r[e]=a,t.handlers[e]=a}),r}parseEvents(e,t){const r={};return Object.entries(e).forEach(([e,a])=>{const o=e,s=a();if(f(s)){const a=(new s)[e];a&&(r[o]=a,t.events[o]=a)}else r[o]=a,t.events[o]=a}),r}}class D extends o.LoggedClass{translate(e,t){this.log.for(this.translate).info(`Must translate ${e} with params ${JSON.stringify(t||{})}`)}instant(e,t){this.log.for(this.instant).info(`Must translate ${e} with params ${JSON.stringify(t||{})}`)}}function I(e,t){return(r,o)=>{const s={tag:e||r.name,props:t};return a.metadata(a.Metadata.key(n.REFLECT,n.UIMODEL),s)(r)}}function N(e){return a.apply(a.metadata(a.Metadata.key(n.REFLECT,n.RENDERED_BY),e))}function C(e,t){return(r,o)=>{const s={item:{tag:e||r.name,props:t}};return a.metadata(a.Metadata.key(n.REFLECT,n.UILISTMODEL),s)(r)}}function b(e){return t=>{const r={handlers:e};return a.metadata(a.Metadata.key(n.REFLECT,n.HANDLERS),r)(t)}}function S(t,r=1,o=1,s={}){const i=Object.assign({..."boolean"==typeof r?{flexMode:r,cols:1}:{flexMode:!1,cols:r},rows:o,...Object.assign({breakpoint:e.UIMediaBreakPoints.LARGE},s)});return(e,r)=>(a.metadata(a.Metadata.key(n.REFLECT,n.UILAYOUT),i)(e),I(t,i)(e,r))}function P(e,t=1,r=!1,a={}){let o=[];return"object"==typeof t&&(o=t,t=o.length),I(e,{pages:t,paginated:r,pageTitles:o,props:a})}t.Model.prototype.render=function(...e){return R.render(this,...e)},t.Model.renderedBy=(e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.RENDERED_BY))).bind(t.Model),t.Model.uiPropertiesOf=(e=>{const t=a.Metadata.get(e,a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES));if(t)return Object.keys(t)}).bind(t.Model),t.Model.uiDecorationOf=(e,t,r)=>{const o=a.Metadata.get(e,a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES,t));if(o)return r?o[r]:o},t.Model.uiModelOf=e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.UIMODEL)),t.Model.uiElementOf=(e,t)=>a.Metadata.get(e,h(t,n.ELEMENT)),t.Model.uiListModelOf=e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.UILISTMODEL)),t.Model.uiHandlersFor=e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.HANDLERS)),t.Model.uiLayoutOf=e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.UILAYOUT)),t.Model.uiIsHidden=(e,t)=>!!a.Metadata.get(e,h(t,n.HIDDEN)),t.Model.uiIsHiddenOn=(e,t,r)=>{const o=a.Metadata.get(e,h(t,n.HIDDEN));return!!o&&(r?o.includes(r):o)},t.Model.uiTypeOf=(e,t)=>{const o=a.Metadata.get(e,a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES,t));if(!o)throw new r.NotFoundError(`No metadata found for property '${t}' on model '${e.name}'`);const s=Object.keys(o).filter(e=>[n.PROP,n.ELEMENT,n.CHILD].includes(e));if(0===s.length)throw new r.NotFoundError(`No UI type metadata found for property '${t}' on model '${e.name}'`);if(s.length>1)throw new u("Only one type of decoration is allowed. Please choose between @uiprop, @uichild or @uielement");return o[s[0]]},t.Model.uiListItems=(e=>{const t=a.Metadata.get(e,a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES));if(t)return Object.keys(t)}).bind(t.Model);const U=t.ModelBuilder.prototype;U.decorateClass||(U.decorateClass=function(e){return this._classDecorators||(this._classDecorators=[]),this._classDecorators.push(e),this}),U.uimodel=function(e,t){return this.decorateClass(I(e,t))},U.renderedBy=function(e){return this.decorateClass(N(e))},U.uilistmodel=function(e,t){return this.decorateClass(C(e,t))},U.uihandlers=function(e){return this.decorateClass(b(e))},U.uilayout=function(e,t,r,a){return this.decorateClass(S(e,t,r,a))},U.uisteppedmodel=function(e,t,r,a){return this.decorateClass(P(e,t,r,a))};const k="##VERSION##",w="##PACKAGE##";a.Metadata.registerLibrary(w,k),e.ActionRoles=E,e.COMMIT="4889499",e.ComponentEventNames={Render:"render",BackButtonClickEvent:"backButtonNavigationEndEvent",Refresh:"RefreshEvent",Click:"ClickEvent",Change:"ChangeEvent",Submit:"SubmitEvent",ValidationError:"validationErrorEvent",ThemeChange:"themeChangeEvent",FormGroupLoaded:"formGroupLoadedEvent"},e.DecafComponent=A,e.DecafEventHandler=class extends A{constructor(){super()}handle(...e){this.log.for(this.handle).info(`component ${this.componentName} handling ${JSON.stringify(e)}`)}handleClick(...e){this.log.for(this.handleClick).info(`component ${this.componentName} handling click ${JSON.stringify(e)}`)}handleAction(...e){this.log.for(this.handleAction).info(`component ${this.componentName} handling action ${JSON.stringify(e)}`)}},e.DecafTranslateService=D,e.ElementPositions={left:"left",center:"center",right:"right",top:"top",bottom:"bottom"},e.ElementSizes={xsmall:"xsmall",small:"small",medium:"medium",default:"default",large:"large",xLarge:"xlarge","2xLarge":"2xlarge",auto:"auto",expand:"expand",block:"block",half:"half",full:"full"},e.FULL_VERSION="0.16.1-4889499",e.HTML5CheckTypes=p,e.HTML5DateFormat=l,e.HTML5InputTypes=c,e.LayoutGridGaps={small:"small",medium:"medium",large:"large",collapse:"collapse",none:""},e.PACKAGE_NAME=w,e.RenderingEngine=R,e.RenderingError=u,e.TransactionHooks={BeforeRead:"beforeRead",AfterRead:"afterRead",BeforeCreate:"beforeCreate",AfterCreate:"afterCreate",BeforeUpdate:"beforeUpdate",AfterUpdate:"afterUpdate",BeforeDelete:"beforeDelete",AfterDelete:"afterDelete"},e.UIKeys=n,e.UIValidator=g,e.VERSION=k,e.ValidatableByAttribute=d,e.ValidatableByType=i,e.WindowColorSchemes={light:"light",dark:"dark",undefined:"undefined"},e.escapeHtml=T,e.formatByType=y,e.generateUIModelID=m,e.getUIAttributeKey=h,e.hidden=()=>O(r.OperationKeys.CREATE,r.OperationKeys.READ,r.OperationKeys.UPDATE,r.OperationKeys.DELETE),e.hideOn=O,e.isClassConstructor=f,e.parseToNumber=M,e.parseValueByType=function e(a,o,s){let n;switch(a){case Array.name:n=(Array.isArray(o)?o.map(r=>e(t.ReservedModels.STRING.name.toLowerCase(),r,s)):[o]).join(",");break;case c.NUMBER:n=M(o);break;case c.DATE:{const e=s.format;o&&(""+o).trim().length&&(n=typeof o===t.ReservedModels.NUMBER.name.toLowerCase()?new Date(o):o?e?t.parseDate(e,o):new Date(o):void 0);break}default:n=typeof o===t.ReservedModels.OBJECT.name.toLowerCase()?Array.isArray(o)?o.join(","):JSON.stringify(o):typeof o===t.ReservedModels.BOOLEAN.name.toLowerCase()?o:typeof o===t.ReservedModels.STRING.name.toLowerCase()?T(o):n}if(void 0===n)throw new r.InternalError(`Failed to parse value of type ${a} from ${typeof o} - ${o}`);return n},e.renderedBy=N,e.revertHtml=e=>{const t={"&amp;":"&","&lt;":"<","&gt;":">"};return(""+e).replace(/&lt;|&gt;|&amp;/g,e=>t[e]||e)},e.uichild=(e,t,r={},o=!1,s=!1)=>(i,d)=>{const l={tag:t,serialize:s,props:Object.assign({},r||{},{name:e||d},o?{customTypes:[Array.name],multiple:!0}:{multiple:r?.multiple||!1})};a.propMetadata(h(d,n.CHILD),l)(i,d)},e.uielement=(e,t,r=!1)=>(o,s)=>{"object"==typeof e&&(t=e,e="");const i={tag:e,serialize:r,props:Object.assign({},t||{},{name:s})};return a.propMetadata(h(s,n.ELEMENT),i)(o,s)},e.uihandlers=b,e.uilayout=S,e.uilayoutprop=(e=1,t=1)=>(r,o)=>{const s={name:o,props:Object.assign({},{row:t,col:e})};a.propMetadata(h(o,n.UILAYOUTPROP),s)(r,o)},e.uilistmodel=C,e.uilistprop=(e=void 0,t)=>(r,o)=>{const s={name:e||o,props:t||{}};a.propMetadata(h(o,n.UILISTPROP),s)(r,o)},e.uimodel=I,e.uion=L,e.uionclick=e=>L("handleClick",e),e.uionrender=e=>L("render",e),e.uiorder=(e=n.FIRST)=>(t,r)=>a.propMetadata(h(r,n.ORDER),e)(t,r),e.uipageprop=(e=1)=>(t,r)=>a.propMetadata(h(r,n.PAGE),e)(t,r),e.uiprop=(e=void 0,t=!1)=>(r,o)=>{const s={name:e||o,stringify:t};a.propMetadata(h(o,n.PROP),s)(r,o)},e.uisteppedmodel=P,e.uitablecol=(e=n.LAST,t)=>(r,o)=>{const s={name:o,props:{sequence:e,...t?{valueParserFn:t}:{}}};a.propMetadata(h(o,n.UILISTPROP),s)(r,o)}},"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@decaf-ts/decorator-validation"),require("@decaf-ts/db-decorators"),require("@decaf-ts/decoration"),require("@decaf-ts/logging")):"function"==typeof define&&define.amd?define(["exports","@decaf-ts/decorator-validation","@decaf-ts/db-decorators","@decaf-ts/decoration","@decaf-ts/logging"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["ui-decorators"]={},e.decafTsDecoratorValidation,e.decafTsDbDecorators,e.decafTsDecoration,e.decafTsLogging);
1
+ var e,t;e=this,t=function(e,t,r,a,o){"use strict";var s;e.UIMediaBreakPoints=void 0,(s=e.UIMediaBreakPoints||(e.UIMediaBreakPoints={})).SMALL="small",s.MEDIUM="medium",s.LARGE="large",s.XLARGE="xlarge";const n={REFLECT:"ui",UIMODEL:"uimodel",RENDERED_BY:"rendered-by",ELEMENT:"uielement",PROP:"uiprop",CHILD:"uichild",NAME:"name",NAME_PREFIX:"input-",VALIDATION_MESSAGE:"validationMessage",UILISTMODEL:"uilistmodel",UILISTPROP:"uilistprop",UILAYOUT:"uilayout",UILAYOUTPROP:"uilayoutprop",HANDLERS:"handlers",TYPE:"type",SUB_TYPE:"subType",HIDDEN:"hidden",FORMAT:"format",ORDER:"order",PAGE:"page",EVENTS:"events",FIRST:"first",LAST:"last",READ_ONLY:"readonly",SEQUENCE:"sequence",REQUIRED:t.ValidationKeys.REQUIRED,MIN:t.ValidationKeys.MIN,MIN_LENGTH:t.ValidationKeys.MIN_LENGTH,MAX:t.ValidationKeys.MAX,MAX_LENGTH:t.ValidationKeys.MAX_LENGTH,PATTERN:t.ValidationKeys.PATTERN,URL:t.ValidationKeys.URL,STEP:t.ValidationKeys.STEP,DATE:t.ValidationKeys.DATE,EMAIL:t.ValidationKeys.EMAIL,PASSWORD:t.ValidationKeys.PASSWORD,EQUALS:t.ValidationKeys.EQUALS,DIFF:t.ValidationKeys.DIFF,LESS_THAN:t.ValidationKeys.LESS_THAN,LESS_THAN_OR_EQUAL:t.ValidationKeys.LESS_THAN_OR_EQUAL,GREATER_THAN:t.ValidationKeys.GREATER_THAN,GREATER_THAN_OR_EQUAL:t.ValidationKeys.GREATER_THAN_OR_EQUAL},i={[n.EMAIL]:t.EmailValidator,[n.URL]:t.URLValidator,[n.DATE]:t.DateValidator,[n.PASSWORD]:t.PasswordValidator},d={[n.REQUIRED]:t.RequiredValidator,[n.MIN]:t.MinValidator,[n.MAX]:t.MaxValidator,[n.STEP]:t.StepValidator,[n.MIN_LENGTH]:t.MinLengthValidator,[n.MAX_LENGTH]:t.MaxLengthValidator,[n.PATTERN]:t.PatternValidator,[n.EQUALS]:t.EqualsValidator,[n.DIFF]:t.DiffValidator,[n.LESS_THAN]:t.LessThanValidator,[n.LESS_THAN_OR_EQUAL]:t.LessThanOrEqualValidator,[n.GREATER_THAN]:t.GreaterThanValidator,[n.GREATER_THAN_OR_EQUAL]:t.GreaterThanOrEqualValidator},l="yyyy-MM-dd",c={BUTTON:"button",CHECKBOX:"checkbox",COLOR:"color",DATE:n.DATE,DATETIME_LOCAL:"datetime-local",EMAIL:n.EMAIL,FILE:"file",HIDDEN:"hidden",IMAGE:"image",MONTH:"month",NUMBER:"number",PASSWORD:n.PASSWORD,RADIO:"radio",RANGE:"range",RESET:"reset",SEARCH:"search",SUBMIT:"submit",TEL:"tel",TEXT:"text",TEXTAREA:"textarea",SELECT:"select",TIME:"time",URL:n.URL,WEEK:"week"},p=[c.CHECKBOX,c.RADIO],E={cancel:"cancel",confirm:"confirm",submit:"submit",clear:"clear",back:"back",[r.OperationKeys.CREATE]:r.OperationKeys.CREATE,[r.OperationKeys.READ]:r.OperationKeys.READ,[r.OperationKeys.UPDATE]:r.OperationKeys.UPDATE,[r.OperationKeys.DELETE]:r.OperationKeys.DELETE};class u extends r.InternalError{constructor(e){super(e,u.name)}}const f=e=>"function"==typeof e&&/^class\s/.test(e+"");function h(e,t){return a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES,e,t)}function y(e,r,...a){if(e===n.DATE){if(!r)return"";const e=a.shift()||l;return t.formatDate(new Date(r),e)}return r}function M(e){if("number"==typeof e&&!isNaN(e))return e;const t=Number(e);return isNaN(t)?void 0:t}function T(e){if(!e)return e;const t={"&":"&amp;","<":"&lt;",">":"&gt;"};return(""+e).replace(/[&<>]/g,e=>t[e]||e)}function m(e){let r=Date.now();try{t.Model.pk(e.constructor)&&(r=e[t.Model.pk(e.constructor)])}catch(e){}return`${e.constructor.name}-${r}`}class R{static{this.cache={}}constructor(e){this.flavour=e,this.initialized=!1,R.register(this)}translate(e,r=!0){if(r)switch(e){case t.ReservedModels.STRING.name.toLowerCase():return c.TEXT;case t.ReservedModels.NUMBER.name.toLowerCase():case t.ReservedModels.BIGINT.name.toLowerCase():return c.NUMBER;case t.ReservedModels.BOOLEAN.name.toLowerCase():return c.CHECKBOX;case t.ReservedModels.DATE.name.toLowerCase():return c.DATE}else switch(e){case c.SELECT:case c.TEXT:case c.EMAIL:case c.COLOR:case c.PASSWORD:case c.TEL:case c.URL:case c.SEARCH:case c.HIDDEN:case c.TEXTAREA:case c.RADIO:return t.ReservedModels.STRING.name.toLowerCase();case c.NUMBER:return t.ReservedModels.NUMBER.name.toLowerCase();case c.CHECKBOX:return t.ReservedModels.BOOLEAN.name.toLowerCase();case c.DATE:case c.DATETIME_LOCAL:case c.TIME:return t.ReservedModels.DATE.name.toLowerCase()}return e}getClassDecoratorsMetadata(e){return[t.Model.uiModelOf(e.constructor),t.Model.uiListModelOf(e.constructor),t.Model.uiHandlersFor(e.constructor),t.Model.uiLayoutOf(e.constructor)].filter(Boolean)}sortChildrenByOrder(e=[]){return e.sort((r,a)=>{const o=r.props?.order??0,s=a.props?.order??0,i=r=>r===n.FIRST?0:typeof r===t.Primitives.NUMBER?1:r===n.LAST?e.length+e.indexOf(a):1,d=i(o),l=i(s);return d!==l?d-l:1===d&&typeof o===t.Primitives.NUMBER&&typeof s===t.Primitives.NUMBER?o-s:0})}isCustomValidator(e){return!Object.values(t.ValidationKeys).includes(e)&&!Object.values(n).includes(e)}isValidatableByType(e){return Object.keys(i).includes(e)}isValidatableByAttribute(e){return Object.keys(d).includes(e)}toAttributeValue(e,t){if(!Object.keys(d).includes(e))throw Error(`Invalid attribute key "${e}". Expected one of: ${Object.keys(d).join(", ")}.`);return e===n.REQUIRED||t[e]}toFieldDefinition(e,o={},s=!0){const{inheritProps:i,...d}=o;o=d;const p=this.getClassDecoratorsMetadata(e);if(!p.length)throw new u(`No ui definitions set for model ${e.constructor.name}. Did you use @uimodel?`);const E=Object.assign({},...p,i||{}),{tag:f,props:h,item:M,handlers:T}=E,R=t.Model.uiPropertiesOf(e.constructor);let O,L=M?.props||{},g={};const A=(e,t)=>e?[e,t].join("."):t;if(R){const s=a.Metadata.get(e.constructor,t.ValidationKeys.REFLECT)||{};for(const i of R){const d=t.Model.uiDecorationOf(e.constructor,i);let p;try{p=t.Model.uiTypeOf(e.constructor,i)}catch(e){if(!(e instanceof r.NotFoundError))throw e}if(t.Model.uiIsHidden(e.constructor,i)&&!t.Model.uiElementOf(e.constructor,i))throw new u(`@uielement no found in "${i}". It is required to use hiddenOn decorator.`);Object.entries(d).map(([e,t])=>({key:e,props:t})).sort(e=>[n.ELEMENT,n.CHILD].includes(e.key)?-1:1).forEach(r=>{if(!r)throw new u("No decorator found");switch(r.key){case n.PROP:L[i]=r.props;break;case n.CHILD:{const a=r.props?.props?.name||i;try{if(!t.Model.isModel(t.Model.build({},a))&&!t.Model.isPropertyModel(e,a))throw new u(`Child "${a}" must be a model.`)}catch(e){throw new u(`Child "${a}" must be a model.`)}let s;const n=e[i];if("object"!=typeof n||null===n||Array.isArray(n)){const e=r.props.props?.name;s=new(t.Model.get(e))}O=O||[];const d=Object.assign({},o||{},{model:s},{inheritProps:r.props,childOf:A(o?.childOf,i)}),l=this.toFieldDefinition(n||s,d,!1),{inheritProps:c}=d;c&&(l.props=Object.assign({},l.props,c.props||{})),O.push(l);break}case n.UILISTPROP:{g=g||{};const e=r.props;e.name&&(g[e.name]="object"==typeof e?.props&&n.SEQUENCE in e.props?e.props:i);const t=Object.assign({},E.props?.item||{},M?.props||{},e?.props||{},o);L={tag:M?.tag||t.render||"",props:Object.assign({},L?.props,{mapper:g},t)};break}case n.EVENTS:case n.HIDDEN:case n.PAGE:case n.ORDER:case n.UILAYOUTPROP:case n.ELEMENT:{O=O||[];const t=r.props,d=Object.assign({},L?.props,t.props||{},t?.props?.name?{path:A(o?.childOf,t.props.name),childOf:void 0}:{},o,{name:t.props?.name||i});if(r.key===n.ELEMENT){const r={tag:t.tag||L?.tag||f||"",props:d},o=s[i];if(o)for(const e of Object.entries(o).map(([e,t])=>({key:e,props:t})))this.isValidatableByAttribute(e.key)?r.props[this.translate(e.key)]=this.toAttributeValue(e.key,e.props):this.isValidatableByType(e.key)?(e.key===c.DATE&&(r.props[n.FORMAT]=e.props.format||l),r.props[n.TYPE]=e.key):this.isCustomValidator(e.key)&&(d[n.SUB_TYPE]=e.key,e.props?.message&&(d[n.VALIDATION_MESSAGE]=e.props.message));if(!r.props[n.TYPE]){const t=a.Metadata.type(e.constructor,i).name;r.props[n.TYPE]=this.translate(t.toLowerCase(),!0)}r.props.value=y(r.props[n.TYPE],e[i],r.props[n.FORMAT]),O.push(r)}else{const e=O.find(e=>e.props?.name===i||[n.UILAYOUTPROP,n.PAGE,n.EVENTS].includes(r.key)&&(e.props?.childOf===i||e.props?.childOf?.endsWith("."+i)));if(e)if(r.key!==n.UILAYOUTPROP)e.props=Object.assign({},e.props,{[r.key]:t});else{const{row:t,col:a,props:o}=r.props;e.props=Object.assign({},o||{},e.props,t,a)}}break}default:throw new u("Invalid key: "+r.key)}})}}o=Object.assign({},h,o,{handlers:T||{}});const D=o?.operation;O=this.sortChildrenByOrder(O).filter(e=>{const t=e?.props?.hidden||[];return t?.length&&t.includes(D)?void 0:e});const I={tag:f,item:L,props:o,children:O?.length?O:void 0};return s&&(I.rendererId=m(e)),I}static register(e){if(e.flavour in this.cache)throw new r.InternalError(`Rendering engine under ${e.flavour} already exists`);this.cache[e.flavour]=e,this.current=e}static getOrBoot(e){if(e instanceof R)return e;const t=new e;return t.initialize(),t}static get(e){if(!e)return this.getOrBoot(this.current);if(!(e in this.cache))throw new r.InternalError(`Rendering engine under ${e} does not exist`);return this.getOrBoot(this.cache[e])}static render(e,...a){if(!t.Model.get(e.constructor.name)&&!t.Model.fromObject(e))throw new r.InternalError("No model registered found");const o=t.Model.renderedBy(e.constructor);return R.get(o).render(e,...a)}}function O(...e){return(t,r)=>a.propMetadata(h(r,n.HIDDEN),e)(t,r)}function L(e,t){return(r,o)=>{a.propMetadata(h(o,n.EVENTS),{..."object"==typeof e?e:{[e]:t}})(r,o)}}class g extends t.Validator{getMessage(e,...t){return g.translateService?g.translateService.translate(e,...t):super.getMessage(e,...t)}}class A extends o.LoggedClass{constructor(){super(),this.enableDarkMode=!0,this.isDarkMode=!1,this.item={tag:""},this.props={},this.route="",this.borders=!1,this.OperationKeys=r.OperationKeys,this.initialized=!1,this.events={},this.handlers={}}get repository(){return this._repository}set repository(e){this._repository=e}async render(...e){this.log.for(this.render).info(`render for ${this.componentName} with ${JSON.stringify(e)}`)}async refresh(...e){this.log.for(this.refresh).info("Refresh called with args: "+e)}async initialize(...e){this.initialized=!0}async translate(...e){this.log.for(this.translate).info(`translate for ${this.componentName} with ${JSON.stringify(e)}`)}async preview(...e){this.log.for(this.preview).debug("Preview called with args: "+e)}async submit(...e){this.log.for(this.submit).info(`submit for ${this.componentName} with ${JSON.stringify(e)}`)}parseHandlers(e,t){const r={};return Object.entries(e).forEach(([e,a])=>{if(f(a)){const o=new a,s=e in o?o[e]:o.handle;r[e]=s,t.handlers[e]=s}else r[e]=a,t.handlers[e]=a}),r}parseEvents(e,t){const r={};return Object.entries(e).forEach(([e,a])=>{const o=e,s=a();if(f(s)){const a=(new s)[e];a&&(r[o]=a,t.events[o]=a)}else r[o]=a,t.events[o]=a}),r}}class D extends o.LoggedClass{translate(e,t){this.log.for(this.translate).info(`Must translate ${e} with params ${JSON.stringify(t||{})}`)}instant(e,t){this.log.for(this.instant).info(`Must translate ${e} with params ${JSON.stringify(t||{})}`)}}function I(e,t){return(r,o)=>{const s={tag:e||r.name,props:t};return a.metadata(a.Metadata.key(n.REFLECT,n.UIMODEL),s)(r)}}function N(e){return a.apply(a.metadata(a.Metadata.key(n.REFLECT,n.RENDERED_BY),e))}function C(e,t){return(r,o)=>{const s={item:{tag:e||r.name,props:t}};return a.metadata(a.Metadata.key(n.REFLECT,n.UILISTMODEL),s)(r)}}function b(e){return t=>{const r={handlers:e};return a.metadata(a.Metadata.key(n.REFLECT,n.HANDLERS),r)(t)}}function S(t,r=1,o=1,s={}){const i=Object.assign({..."boolean"==typeof r?{flexMode:r,cols:1}:{flexMode:!1,cols:r},rows:o,...Object.assign({breakpoint:e.UIMediaBreakPoints.LARGE},s)});return(e,r)=>(a.metadata(a.Metadata.key(n.REFLECT,n.UILAYOUT),i)(e),I(t,i)(e,r))}function P(e,t=1,r=!1,a={}){let o=[];return"object"==typeof t&&(o=t,t=o.length),I(e,{pages:t,paginated:r,pageTitles:o,props:a})}t.Model.prototype.render=function(...e){return R.render(this,...e)},t.Model.renderedBy=(e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.RENDERED_BY))).bind(t.Model),t.Model.uiPropertiesOf=(e=>{const t=a.Metadata.get(e,a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES));if(t)return Object.keys(t)}).bind(t.Model),t.Model.uiDecorationOf=(e,t,r)=>{const o=a.Metadata.get(e,a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES,t));if(o)return r?o[r]:o},t.Model.uiModelOf=e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.UIMODEL)),t.Model.uiElementOf=(e,t)=>a.Metadata.get(e,h(t,n.ELEMENT)),t.Model.uiListModelOf=e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.UILISTMODEL)),t.Model.uiHandlersFor=e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.HANDLERS)),t.Model.uiLayoutOf=e=>a.Metadata.get(e,a.Metadata.key(n.REFLECT,n.UILAYOUT)),t.Model.uiIsHidden=(e,t)=>!!a.Metadata.get(e,h(t,n.HIDDEN)),t.Model.uiIsHiddenOn=(e,t,r)=>{const o=a.Metadata.get(e,h(t,n.HIDDEN));return!!o&&(r?o.includes(r):o)},t.Model.uiTypeOf=(e,t)=>{const o=a.Metadata.get(e,a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES,t));if(!o)throw new r.NotFoundError(`No metadata found for property '${t}' on model '${e.name}'`);const s=Object.keys(o).filter(e=>[n.PROP,n.ELEMENT,n.CHILD].includes(e));if(0===s.length)throw new r.NotFoundError(`No UI type metadata found for property '${t}' on model '${e.name}'`);if(s.length>1)throw new u("Only one type of decoration is allowed. Please choose between @uiprop, @uichild or @uielement");return o[s[0]]},t.Model.uiListItems=(e=>{const t=a.Metadata.get(e,a.Metadata.key(n.REFLECT,a.DecorationKeys.PROPERTIES));if(t)return Object.keys(t)}).bind(t.Model);const U=t.ModelBuilder.prototype;U.decorateClass||(U.decorateClass=function(e){return this._classDecorators||(this._classDecorators=[]),this._classDecorators.push(e),this}),U.uimodel=function(e,t){return this.decorateClass(I(e,t))},U.renderedBy=function(e){return this.decorateClass(N(e))},U.uilistmodel=function(e,t){return this.decorateClass(C(e,t))},U.uihandlers=function(e){return this.decorateClass(b(e))},U.uilayout=function(e,t,r,a){return this.decorateClass(S(e,t,r,a))},U.uisteppedmodel=function(e,t,r,a){return this.decorateClass(P(e,t,r,a))};const k="##VERSION##",w="##PACKAGE##";a.Metadata.registerLibrary(w,k),e.ActionRoles=E,e.COMMIT="0f1d008",e.ComponentEventNames={Render:"render",BackButtonClickEvent:"backButtonNavigationEndEvent",Refresh:"RefreshEvent",Click:"ClickEvent",Change:"ChangeEvent",Submit:"SubmitEvent",ValidationError:"validationErrorEvent",ThemeChange:"themeChangeEvent",FormGroupLoaded:"formGroupLoadedEvent"},e.DecafComponent=A,e.DecafEventHandler=class extends A{constructor(){super()}handle(...e){this.log.for(this.handle).info(`component ${this.componentName} handling ${JSON.stringify(e)}`)}handleClick(...e){this.log.for(this.handleClick).info(`component ${this.componentName} handling click ${JSON.stringify(e)}`)}handleAction(...e){this.log.for(this.handleAction).info(`component ${this.componentName} handling action ${JSON.stringify(e)}`)}},e.DecafTranslateService=D,e.ElementPositions={left:"left",center:"center",right:"right",top:"top",bottom:"bottom"},e.ElementSizes={xsmall:"xsmall",small:"small",medium:"medium",default:"default",large:"large",xLarge:"xlarge","2xLarge":"2xlarge",auto:"auto",expand:"expand",block:"block",half:"half",full:"full"},e.FULL_VERSION="0.16.2-0f1d008",e.HTML5CheckTypes=p,e.HTML5DateFormat=l,e.HTML5InputTypes=c,e.LayoutGridGaps={small:"small",medium:"medium",large:"large",collapse:"collapse",none:""},e.PACKAGE_NAME=w,e.RenderingEngine=R,e.RenderingError=u,e.TransactionHooks={BeforeRead:"beforeRead",AfterRead:"afterRead",BeforeCreate:"beforeCreate",AfterCreate:"afterCreate",BeforeUpdate:"beforeUpdate",AfterUpdate:"afterUpdate",BeforeDelete:"beforeDelete",AfterDelete:"afterDelete"},e.UIKeys=n,e.UIValidator=g,e.VERSION=k,e.ValidatableByAttribute=d,e.ValidatableByType=i,e.WindowColorSchemes={light:"light",dark:"dark",undefined:"undefined"},e.escapeHtml=T,e.formatByType=y,e.generateUIModelID=m,e.getUIAttributeKey=h,e.hidden=()=>O(r.OperationKeys.CREATE,r.OperationKeys.READ,r.OperationKeys.UPDATE,r.OperationKeys.DELETE),e.hideOn=O,e.isClassConstructor=f,e.parseToNumber=M,e.parseValueByType=function e(a,o,s){let n;switch(a){case Array.name:n=(Array.isArray(o)?o.map(r=>e(t.ReservedModels.STRING.name.toLowerCase(),r,s)):[o]).join(",");break;case c.NUMBER:n=M(o);break;case c.DATE:{const e=s.format;o&&(""+o).trim().length&&(n=typeof o===t.ReservedModels.NUMBER.name.toLowerCase()?new Date(o):o?e?t.parseDate(e,o):new Date(o):void 0);break}default:n=typeof o===t.ReservedModels.OBJECT.name.toLowerCase()?Array.isArray(o)?o.join(","):JSON.stringify(o):typeof o===t.ReservedModels.BOOLEAN.name.toLowerCase()?o:typeof o===t.ReservedModels.STRING.name.toLowerCase()?T(o):n}if(void 0===n)throw new r.InternalError(`Failed to parse value of type ${a} from ${typeof o} - ${o}`);return n},e.renderedBy=N,e.revertHtml=e=>{const t={"&amp;":"&","&lt;":"<","&gt;":">"};return(""+e).replace(/&lt;|&gt;|&amp;/g,e=>t[e]||e)},e.uichild=(e,t,r={},o=!1,s=!1)=>(i,d)=>{const l={tag:t,serialize:s,props:Object.assign({},r||{},{name:e||d},o?{customTypes:[Array.name],multiple:!0}:{multiple:r?.multiple||!1})};a.propMetadata(h(d,n.CHILD),l)(i,d)},e.uielement=(e,t,r=!1)=>(o,s)=>{"object"==typeof e&&(t=e,e="");const i={tag:e,serialize:r,props:Object.assign({},t||{},{name:s})};return a.propMetadata(h(s,n.ELEMENT),i)(o,s)},e.uihandlers=b,e.uilayout=S,e.uilayoutprop=(e=1,t=1)=>(r,o)=>{const s={name:o,props:Object.assign({},{row:t,col:e})};a.propMetadata(h(o,n.UILAYOUTPROP),s)(r,o)},e.uilistmodel=C,e.uilistprop=(e=void 0,t)=>(r,o)=>{const s={name:e||o,props:t||{}};a.propMetadata(h(o,n.UILISTPROP),s)(r,o)},e.uimodel=I,e.uion=L,e.uionclick=e=>L("handleClick",e),e.uionrender=e=>L("render",e),e.uiorder=(e=n.FIRST)=>(t,r)=>a.propMetadata(h(r,n.ORDER),e)(t,r),e.uipageprop=(e=1)=>(t,r)=>a.propMetadata(h(r,n.PAGE),e)(t,r),e.uiprop=(e=void 0,t=!1)=>(r,o)=>{const s={name:e||o,stringify:t};a.propMetadata(h(o,n.PROP),s)(r,o)},e.uisteppedmodel=P,e.uitablecol=(e=n.LAST,t)=>(r,o)=>{const s={name:o,props:{sequence:e,...t?{valueParserFn:t}:{}}};a.propMetadata(h(o,n.UILISTPROP),s)(r,o)}},"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@decaf-ts/decorator-validation"),require("@decaf-ts/db-decorators"),require("@decaf-ts/decoration"),require("@decaf-ts/logging")):"function"==typeof define&&define.amd?define(["exports","@decaf-ts/decorator-validation","@decaf-ts/db-decorators","@decaf-ts/decoration","@decaf-ts/logging"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["ui-decorators"]={},e.decafTsDecoratorValidation,e.decafTsDbDecorators,e.decafTsDecoration,e.decafTsLogging);
2
2
  //# sourceMappingURL=ui-decorators.cjs.map
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  require("./overrides/index.cjs");
18
18
  __exportStar(require("./constants.cjs"), exports);
19
19
  __exportStar(require("./decorators.cjs"), exports);
20
+ __exportStar(require("./snapshot.cjs"), exports);
20
21
  __exportStar(require("./reader.cjs"), exports);
21
22
  __exportStar(require("./types.cjs"), exports);
22
23
  __exportStar(require("./overrides/index.cjs"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gCAA8B;AAC9B,iDAA+B;AAC/B,kDAAgC;AAChC,8CAA4B;AAC5B,6CAA2B;AAC3B,uDAAqC;AACrC,iCAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gCAA8B;AAC9B,iDAA+B;AAC/B,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,6CAA2B;AAC3B,uDAAqC;AACrC,iCAAiC"}
@@ -5,6 +5,9 @@ exports.graphWorkflowMetadataOf = graphWorkflowMetadataOf;
5
5
  exports.graphPortMetadataOf = graphPortMetadataOf;
6
6
  exports.graphPortDefinitionOf = graphPortDefinitionOf;
7
7
  exports.graphPortsOf = graphPortsOf;
8
+ exports.graphLeafPortsOf = graphLeafPortsOf;
9
+ exports.graphWorkflowInputLeafPortsOf = graphWorkflowInputLeafPortsOf;
10
+ exports.graphWorkflowOutputLeafPortsOf = graphWorkflowOutputLeafPortsOf;
8
11
  exports.graphDefinitionOf = graphDefinitionOf;
9
12
  exports.graphWorkflowDefinitionOf = graphWorkflowDefinitionOf;
10
13
  const decoration_1 = require("@decaf-ts/decoration");
@@ -35,6 +38,34 @@ function pickLabel(element, prop, fallback) {
35
38
  fallback ??
36
39
  "");
37
40
  }
41
+ function resolveNestedModelConstructor(model, property, validation) {
42
+ const directType = decoration_1.Metadata.type(model, property);
43
+ if (typeof directType === "function" && decorator_validation_1.Model.isModel(directType)) {
44
+ return directType;
45
+ }
46
+ const designTypes = (decoration_1.Metadata.getPropDesignTypes?.(model, property)?.designTypes ||
47
+ []);
48
+ for (const candidate of designTypes) {
49
+ if (typeof candidate === "function" && decorator_validation_1.Model.isModel(candidate)) {
50
+ return candidate;
51
+ }
52
+ }
53
+ const customTypes = validation?.[decorator_validation_2.ValidationKeys.TYPE]?.customTypes || [];
54
+ for (const candidate of customTypes) {
55
+ if (typeof candidate === "function" && decorator_validation_1.Model.isModel(candidate)) {
56
+ return candidate;
57
+ }
58
+ }
59
+ return undefined;
60
+ }
61
+ function prefixGraphPortPath(port, prefix) {
62
+ const path = [prefix, port.path ?? port.property].filter(Boolean).join(".");
63
+ return {
64
+ ...port,
65
+ path,
66
+ children: port.children?.map((child) => prefixGraphPortPath(child, path)),
67
+ };
68
+ }
38
69
  function graphNodeMetadataOf(model) {
39
70
  const resolved = resolveModel(model);
40
71
  return decoration_1.Metadata.get(resolved, constants_js_2.GraphKeys.NODE);
@@ -48,9 +79,10 @@ function graphPortMetadataOf(model, property) {
48
79
  return decoration_1.Metadata.get(resolved, decoration_1.Metadata.key(constants_js_2.GraphKeys.PORT, String(property)));
49
80
  }
50
81
  function graphPortDefinitionOf(model, property) {
51
- const resolved = resolveModel(model);
52
- const propertyKey = String(property);
53
- const graph = graphPortMetadataOf(resolved, property);
82
+ return graphPortDefinitionOfInternal(resolveModel(model), String(property));
83
+ }
84
+ function graphPortDefinitionOfInternal(resolved, propertyKey, visited = new Set()) {
85
+ const graph = graphPortMetadataOf(resolved, propertyKey);
54
86
  if (!graph)
55
87
  return undefined;
56
88
  const element = (decorator_validation_1.Model.uiElementOf(resolved, propertyKey) ||
@@ -62,8 +94,19 @@ function graphPortDefinitionOf(model, property) {
62
94
  element?.props?.type ??
63
95
  uiProp?.type ??
64
96
  designType?.name);
97
+ const nestedModel = resolveNestedModelConstructor(resolved, propertyKey, validation);
98
+ const shouldExpand = !!graph.expand || (!!nestedModel && !visited.has(nestedModel));
99
+ const children = shouldExpand && nestedModel
100
+ ? (() => {
101
+ const nextVisited = new Set(visited);
102
+ nextVisited.add(resolved);
103
+ nextVisited.add(nestedModel);
104
+ return graphPortsOfInternal(nestedModel, nextVisited).map((child) => prefixGraphPortPath(child, propertyKey));
105
+ })()
106
+ : undefined;
65
107
  return {
66
108
  property: propertyKey,
109
+ path: propertyKey,
67
110
  direction: graph.direction,
68
111
  name: propertyKey,
69
112
  label: pickLabel(element, uiProp, propertyKey),
@@ -76,15 +119,29 @@ function graphPortDefinitionOf(model, property) {
76
119
  validation,
77
120
  graph,
78
121
  connectionRules: graph.connectionRules,
122
+ composite: !!children?.length,
123
+ children,
124
+ model: nestedModel?.name,
79
125
  };
80
126
  }
81
127
  function graphPortsOf(model) {
82
- const resolved = resolveModel(model);
128
+ return graphPortsOfInternal(resolveModel(model));
129
+ }
130
+ function graphPortsOfInternal(resolved, visited = new Set()) {
83
131
  const properties = decoration_1.Metadata.properties(resolved) || [];
84
132
  return properties
85
- .map((property) => graphPortDefinitionOf(resolved, property))
133
+ .map((property) => graphPortDefinitionOfInternal(resolved, String(property), visited))
86
134
  .filter((property) => !!property);
87
135
  }
136
+ function graphLeafPortsOf(ports) {
137
+ return ports.flatMap((port) => port.children && port.children.length ? graphLeafPortsOf(port.children) : [port]);
138
+ }
139
+ function graphWorkflowInputLeafPortsOf(model) {
140
+ return graphLeafPortsOf(graphWorkflowDefinitionOf(model).inputs);
141
+ }
142
+ function graphWorkflowOutputLeafPortsOf(model) {
143
+ return graphLeafPortsOf(graphWorkflowDefinitionOf(model).outputs);
144
+ }
88
145
  function graphDefinitionOf(model) {
89
146
  const resolved = resolveModel(model);
90
147
  const ui = decorator_validation_1.Model.uiModelOf(resolved);
@@ -1 +1 @@
1
- {"version":3,"file":"reader.js","sourceRoot":"","sources":["reader.js"],"names":[],"mappings":";;AA4BA,kDAGC;AACD,0DAGC;AACD,kDAGC;AACD,sDA8BC;AACD,oCAMC;AACD,8CAwBC;AACD,8DA0BC;AAjID,qDAAgD;AAChD,yEAAuD;AACvD,yEAAgE;AAChE,uDAA8C;AAC9C,iDAA4C;AAC5C,iDAA+C;AAC/C,mCAAiC;AACjC,SAAS,YAAY,CAAC,KAAK;IACvB,MAAM,QAAQ,GAAG,qBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,OAAO,QAAQ,KAAK,UAAU;QAC9B,OAAO,QAAQ,CAAC;IACpB,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC;IACnC,IAAI,OAAO,QAAQ,KAAK,UAAU;QAC9B,OAAO,QAAQ,CAAC;IACpB,OAAO,KAAK,CAAC;AACjB,CAAC;AACD,SAAS,QAAQ,CAAC,KAAK;IACnB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QACrC,OAAO,SAAS,CAAC;IACrB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7D,CAAC;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ;IACtC,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7E,OAAO,CAAC,YAAY;QAChB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;QACpB,QAAQ;QACR,EAAE,CAAC,CAAC;AACZ,CAAC;AACD,SAAgB,mBAAmB,CAAC,KAAK;IACrC,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAC,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AC,IAAI,CAAC,SAAS,KAAK,4BAAa,CAAC,MAAM,CAAC,CAAC;IACzE,OAAO;QACH,GAAG,IAAI;QACP,IAAI,EAAE,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI;QAChC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ;QAC5C,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK;QACnC,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK;QACnC,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QACtC,IAAI,EAAE,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI;QAChC,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QACtC,WAAW,EAAE,QAAQ,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW;QACrD,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ;QAC5C,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK;QACnC,MAAM;QACN,OAAO;QACP,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,EAAE;QAC3B,SAAS,EAAE,QAAQ,CAAC,SAAS,IAAI,EAAE;QACnC,QAAQ;KACX,CAAC;AACN,CAAC;AACD,kCAAkC"}
@@ -0,0 +1,289 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GRAPH_WORKFLOW_SNAPSHOT_VERSION = void 0;
4
+ exports.graphWorkflowSnapshotDefinitionOf = graphWorkflowSnapshotDefinitionOf;
5
+ exports.graphWorkflowSnapshotOf = graphWorkflowSnapshotOf;
6
+ exports.graphWorkflowSnapshotRestore = graphWorkflowSnapshotRestore;
7
+ exports.graphWorkflowSnapshotToJSON = graphWorkflowSnapshotToJSON;
8
+ exports.graphWorkflowSnapshotFromJSON = graphWorkflowSnapshotFromJSON;
9
+ exports.graphWorkflowSnapshotInputValuesOf = graphWorkflowSnapshotInputValuesOf;
10
+ exports.graphWorkflowSnapshotOutputValuesOf = graphWorkflowSnapshotOutputValuesOf;
11
+ const reader_js_1 = require("./reader.cjs");
12
+ exports.GRAPH_WORKFLOW_SNAPSHOT_VERSION = 1;
13
+ function isPlainObject(value) {
14
+ return (!!value &&
15
+ typeof value === "object" &&
16
+ !Array.isArray(value) &&
17
+ !(value instanceof Date));
18
+ }
19
+ function cloneValue(value) {
20
+ if (Array.isArray(value)) {
21
+ return value.map((entry) => cloneValue(entry));
22
+ }
23
+ if (value instanceof Date) {
24
+ return new Date(value.getTime());
25
+ }
26
+ if (isPlainObject(value)) {
27
+ const cloned = {};
28
+ for (const [key, entry] of Object.entries(value)) {
29
+ cloned[key] = cloneValue(entry);
30
+ }
31
+ return cloned;
32
+ }
33
+ return value;
34
+ }
35
+ function asString(value) {
36
+ if (value === undefined || value === null)
37
+ return undefined;
38
+ return typeof value === "string" ? value : String(value);
39
+ }
40
+ function isWorkflowDefinitionLike(value) {
41
+ return (isPlainObject(value) &&
42
+ typeof value.name === "string" &&
43
+ typeof value.tag === "string" &&
44
+ typeof value.kind === "string" &&
45
+ Array.isArray(value.inputs) &&
46
+ Array.isArray(value.outputs) &&
47
+ Array.isArray(value.nodes) &&
48
+ Array.isArray(value.relations));
49
+ }
50
+ function snapshotNodeKey(node) {
51
+ return node.ref?.id ?? node.id ?? node.ref?.path ?? node.ref?.property;
52
+ }
53
+ function snapshotEdgeKey(edge) {
54
+ return (edge.id ??
55
+ [edge.sourceRef ?? edge.source, edge.sourcePort, edge.targetRef ?? edge.target, edge.targetPort]
56
+ .filter(Boolean)
57
+ .join("::"));
58
+ }
59
+ function normalizeValueEntries(entries, definitions) {
60
+ const byPath = new Map();
61
+ if (Array.isArray(entries)) {
62
+ for (const entry of entries) {
63
+ if (!entry?.path)
64
+ continue;
65
+ byPath.set(entry.path, cloneValue(entry));
66
+ }
67
+ }
68
+ else if (isPlainObject(entries)) {
69
+ for (const [path, value] of Object.entries(entries)) {
70
+ byPath.set(path, { path, value: cloneValue(value) });
71
+ }
72
+ }
73
+ const normalized = definitions.map((definition) => {
74
+ const path = definition.path ?? definition.property;
75
+ const current = byPath.get(path);
76
+ const entry = {
77
+ label: definition.label,
78
+ type: definition.type,
79
+ required: definition.required,
80
+ model: definition.model,
81
+ metadata: cloneValue(definition.graph?.metadata ??
82
+ definition.element?.props ??
83
+ definition.prop?.props ??
84
+ {}),
85
+ ...current,
86
+ path,
87
+ };
88
+ if (!Object.keys(entry.metadata || {}).length) {
89
+ delete entry.metadata;
90
+ }
91
+ return entry;
92
+ });
93
+ for (const entry of byPath.values()) {
94
+ if (normalized.some((current) => current.path === entry.path))
95
+ continue;
96
+ normalized.push(cloneValue(entry));
97
+ }
98
+ return normalized;
99
+ }
100
+ function normalizeNodes(nodes, definitions) {
101
+ const byKey = new Map();
102
+ const result = [];
103
+ for (const definition of definitions) {
104
+ const node = {
105
+ id: definition.id,
106
+ ref: {
107
+ id: definition.id,
108
+ kind: definition.kind,
109
+ },
110
+ label: definition.label,
111
+ kind: definition.kind,
112
+ data: definition.node !== undefined ? { node: cloneValue(definition.node) } : undefined,
113
+ metadata: cloneValue(definition.metadata),
114
+ };
115
+ result.push(node);
116
+ byKey.set(definition.id, node);
117
+ }
118
+ for (const entry of nodes || []) {
119
+ const key = snapshotNodeKey(entry);
120
+ const current = key ? byKey.get(key) : undefined;
121
+ if (current) {
122
+ const merged = {
123
+ ...current,
124
+ ...cloneValue(entry),
125
+ id: entry.id || current.id,
126
+ ref: {
127
+ ...current.ref,
128
+ ...entry.ref,
129
+ id: entry.ref?.id ?? current.ref?.id ?? current.id,
130
+ },
131
+ position: entry.position ? cloneValue(entry.position) : current.position,
132
+ size: entry.size ? cloneValue(entry.size) : current.size,
133
+ ports: {
134
+ ...(current.ports || {}),
135
+ ...(entry.ports || {}),
136
+ },
137
+ data: {
138
+ ...(current.data || {}),
139
+ ...(entry.data || {}),
140
+ },
141
+ metadata: {
142
+ ...(current.metadata || {}),
143
+ ...(entry.metadata || {}),
144
+ },
145
+ };
146
+ if (key)
147
+ byKey.set(key, merged);
148
+ const index = result.findIndex((value) => value.id === current.id);
149
+ if (index >= 0)
150
+ result[index] = merged;
151
+ continue;
152
+ }
153
+ const cloned = cloneValue(entry);
154
+ result.push(cloned);
155
+ if (key)
156
+ byKey.set(key, cloned);
157
+ }
158
+ return result;
159
+ }
160
+ function normalizeEdges(edges, relations) {
161
+ const byKey = new Map();
162
+ const result = [];
163
+ for (const [index, relation] of relations.entries()) {
164
+ const source = asString(relation.source) ?? `source-${index}`;
165
+ const target = asString(relation.target) ?? `target-${index}`;
166
+ const edge = {
167
+ id: relation.label || `${source}:${relation.sourcePort ?? "*"}->${target}:${relation.targetPort ?? "*"}`,
168
+ source,
169
+ sourceRef: source,
170
+ sourcePort: relation.sourcePort,
171
+ target,
172
+ targetRef: target,
173
+ targetPort: relation.targetPort,
174
+ label: relation.label,
175
+ metadata: cloneValue(relation.metadata),
176
+ };
177
+ result.push(edge);
178
+ byKey.set(edge.id, edge);
179
+ }
180
+ for (const entry of edges || []) {
181
+ const key = snapshotEdgeKey(entry);
182
+ const current = key ? byKey.get(key) : undefined;
183
+ if (current) {
184
+ const merged = {
185
+ ...current,
186
+ ...cloneValue(entry),
187
+ id: entry.id || current.id,
188
+ source: entry.source || current.source,
189
+ sourceRef: entry.sourceRef ?? current.sourceRef ?? entry.source ?? current.source,
190
+ target: entry.target || current.target,
191
+ targetRef: entry.targetRef ?? current.targetRef ?? entry.target ?? current.target,
192
+ metadata: {
193
+ ...(current.metadata || {}),
194
+ ...(entry.metadata || {}),
195
+ },
196
+ };
197
+ if (key)
198
+ byKey.set(key, merged);
199
+ const index = result.findIndex((value) => value.id === current.id);
200
+ if (index >= 0)
201
+ result[index] = merged;
202
+ continue;
203
+ }
204
+ const cloned = cloneValue(entry);
205
+ result.push(cloned);
206
+ if (key)
207
+ byKey.set(key, cloned);
208
+ }
209
+ return result;
210
+ }
211
+ function normalizeWorkflowDefinition(definition, overrides = {}) {
212
+ return {
213
+ name: overrides.name ?? definition.name,
214
+ tag: overrides.tag ?? definition.tag,
215
+ kind: overrides.kind ?? definition.kind,
216
+ category: overrides.category ?? definition.category,
217
+ color: overrides.color ?? definition.color,
218
+ group: overrides.group ?? definition.group,
219
+ height: overrides.height ?? definition.height,
220
+ icon: overrides.icon ?? definition.icon,
221
+ labels: cloneValue(overrides.labels ?? definition.labels ?? []),
222
+ maxChildren: overrides.maxChildren ?? definition.maxChildren,
223
+ minWidth: overrides.minWidth ?? definition.minWidth,
224
+ width: overrides.width ?? definition.width,
225
+ metadata: cloneValue(overrides.metadata ??
226
+ ("workflow" in definition ? definition.workflow : definition.metadata)),
227
+ inputs: cloneValue(overrides.inputs ?? definition.inputs ?? []),
228
+ outputs: cloneValue(overrides.outputs ?? definition.outputs ?? []),
229
+ nodes: cloneValue(overrides.nodes ?? definition.nodes ?? []),
230
+ relations: cloneValue(overrides.relations ?? definition.relations ?? []),
231
+ };
232
+ }
233
+ function graphWorkflowSnapshotDefinitionOf(model) {
234
+ const definition = isWorkflowDefinitionLike(model)
235
+ ? model
236
+ : (0, reader_js_1.graphWorkflowDefinitionOf)(model);
237
+ return normalizeWorkflowDefinition(definition);
238
+ }
239
+ function graphWorkflowSnapshotOf(model, input) {
240
+ const normalizedDefinition = normalizeWorkflowDefinition(graphWorkflowSnapshotDefinitionOf(model), input?.definition);
241
+ const inputPorts = (0, reader_js_1.graphLeafPortsOf)(normalizedDefinition.inputs);
242
+ const outputPorts = (0, reader_js_1.graphLeafPortsOf)(normalizedDefinition.outputs);
243
+ return {
244
+ version: exports.GRAPH_WORKFLOW_SNAPSHOT_VERSION,
245
+ definition: normalizedDefinition,
246
+ state: {
247
+ inputs: normalizeValueEntries(input?.inputs, inputPorts),
248
+ outputs: normalizeValueEntries(input?.outputs, outputPorts),
249
+ nodes: normalizeNodes(input?.nodes, normalizedDefinition.nodes),
250
+ edges: normalizeEdges(input?.edges, normalizedDefinition.relations),
251
+ ui: cloneValue(input?.ui || {}),
252
+ metadata: cloneValue(input?.metadata || {}),
253
+ },
254
+ };
255
+ }
256
+ function graphWorkflowSnapshotRestore(snapshot, model) {
257
+ if (!("version" in snapshot)) {
258
+ return graphWorkflowSnapshotOf(model ??
259
+ snapshot.definition ??
260
+ {}, snapshot);
261
+ }
262
+ const fullSnapshot = snapshot;
263
+ const definition = model
264
+ ? graphWorkflowSnapshotDefinitionOf(model)
265
+ : fullSnapshot.definition;
266
+ return graphWorkflowSnapshotOf(definition, {
267
+ inputs: fullSnapshot.state.inputs,
268
+ outputs: fullSnapshot.state.outputs,
269
+ nodes: fullSnapshot.state.nodes,
270
+ edges: fullSnapshot.state.edges,
271
+ ui: fullSnapshot.state.ui,
272
+ metadata: fullSnapshot.state.metadata,
273
+ });
274
+ }
275
+ function graphWorkflowSnapshotToJSON(snapshot, space) {
276
+ return JSON.stringify(snapshot, undefined, space);
277
+ }
278
+ function graphWorkflowSnapshotFromJSON(input, model) {
279
+ const snapshot = typeof input === "string" ? JSON.parse(input) : input;
280
+ return graphWorkflowSnapshotRestore(snapshot, model);
281
+ }
282
+ function graphWorkflowSnapshotInputValuesOf(snapshot) {
283
+ return Object.fromEntries(snapshot.state.inputs.map((entry) => [entry.path, cloneValue(entry.value)]));
284
+ }
285
+ function graphWorkflowSnapshotOutputValuesOf(snapshot) {
286
+ return Object.fromEntries(snapshot.state.outputs.map((entry) => [entry.path, cloneValue(entry.value)]));
287
+ }
288
+ //# sourceMappingURL=snapshot.js.map
289
+ //# sourceMappingURL=snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["snapshot.js"],"names":[],"mappings":";;;AA8NA,8EAKC;AACD,0DAgBC;AACD,oEAkBC;AACD,kEAEC;AACD,sEAGC;AACD,gFAEC;AACD,kFAEC;AApRD,2CAA0E;AAC7D,QAAA,+BAA+B,GAAG,CA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,CAAC;AACD,SAAgB,kCAAkC,CAAC,QAAQ;IACvD,OAAO,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC;AACD,SAAgB,mCAAmC,CAAC,QAAQ;IACxD,OAAO,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5G,CAAC;AACD,oCAAoC"}
package/lib/cjs/index.cjs CHANGED
@@ -33,21 +33,21 @@ __exportStar(require("./ui/index.cjs"), exports);
33
33
  * @const VERSION
34
34
  * @memberOf module:ui-decorators
35
35
  */
36
- exports.VERSION = "0.16.1";
36
+ exports.VERSION = "0.16.2";
37
37
  /**
38
38
  * @description Represents the current commit hash of the module build.
39
39
  * @summary Stores the current git commit hash for the package. The build replaces
40
40
  * the placeholder with the actual commit hash at publish time.
41
41
  * @const COMMIT
42
42
  */
43
- exports.COMMIT = "4889499";
43
+ exports.COMMIT = "0f1d008";
44
44
  /**
45
45
  * @description Represents the full version string of the module.
46
46
  * @summary Stores the semver version and commit hash for the package.
47
47
  * The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
48
48
  * @const FULL_VERSION
49
49
  */
50
- exports.FULL_VERSION = "0.16.1-4889499";
50
+ exports.FULL_VERSION = "0.16.2-0f1d008";
51
51
  exports.PACKAGE_NAME = "@decaf-ts/ui-decorators";
52
52
  decoration_1.Metadata.registerLibrary(exports.PACKAGE_NAME, exports.VERSION);
53
53
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
1
  import "./overrides/index.js";
2
2
  export * from "./constants.js";
3
3
  export * from "./decorators.js";
4
+ export * from "./snapshot.js";
4
5
  export * from "./reader.js";
5
6
  export * from "./types.js";
6
7
  export * from "./overrides/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graph/index.ts"],"names":[],"mappings":"AAAA,8BAAqB;AAErB,+BAA4B;AAC5B,gCAA6B;AAC7B,4BAAyB;AACzB,2BAAwB;AACxB,qCAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graph/index.ts"],"names":[],"mappings":"AAAA,8BAAqB;AAErB,+BAA4B;AAC5B,gCAA6B;AAC7B,8BAA2B;AAC3B,4BAAyB;AACzB,2BAAwB;AACxB,qCAA4B"}