Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
package.dist.decorators.property.js.map Maven / Gradle / Ivy
{"version":3,"file":"property.js","sourceRoot":"","sources":["../../src/decorators/property.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,CAAC,QAAmB,EAAqB,EAAE;IAC3D,OAAO,CAAC,MAAW,EAAE,WAA4B,EAAE,EAAE;QACpD,MAAM,IAAI,GAAG,MAAM,CAAC,WAAgC,CAAC;QAErD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE;YAC5D,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;SACnB;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;YACzB,QAAQ,CAAC,UAAU,GAAG,EAAE,CAAC;SACzB;QAED,MAAM,aAAa,GAAG,QAAQ,CAAC,UAAU,CAAC;QAC1C,IAAI,CAAC,aAAa,CAAC,WAAqB,CAAC,EAAE;YAC1C,aAAa,CAAC,WAAqB,CAAC,GAAG,QAAQ,IAAI,EAAE,CAAC;SACtD;IACF,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Property } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a property decorator.\n *\n * @param { Property } propData\n * @returns { PropertyDecorator }\n */\nconst property = (propData?: Property): PropertyDecorator => {\n\treturn (target: any, propertyKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.properties) {\n\t\t\tmetadata.properties = {};\n\t\t}\n\n\t\tconst propsMetadata = metadata.properties;\n\t\tif (!propsMetadata[propertyKey as string]) {\n\t\t\tpropsMetadata[propertyKey as string] = propData ?? {};\n\t\t}\n\t};\n};\n\nexport default property;\n"]}