Liferay.Loader.define("data-engine-js-components-web@1.0.79/js/core/schema/DataLayout.es",["module","exports","require","./Schema.es"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.DataLayoutSchema=t.DataLayoutPageSchema=t.DataLayoutRowSchema=void 0;var r=a("./Schema.es");function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?i(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class e extends r.Schema{constructor(e){super("data_engine","dataLayoutRow",e)}get dataLayoutColumns(){return this[r.SYMBOL_RAW].columns.map((e=>({columnSize:e.size,fieldNames:e.fields.map((({fieldName:e})=>e))})))}serialize(){return{dataLayoutColumns:this.dataLayoutColumns}}}t.DataLayoutRowSchema=e;class s extends r.Schema{constructor(e){super("data_engine","dataLayoutPage",e)}get dataLayoutRows(){return this[r.SYMBOL_RAW].rows.map((t=>new e(t)))}get description(){var e;const t=this[r.SYMBOL_RAW].defaultLanguageId;return null!==(e=this[r.SYMBOL_RAW].localizedDescription)&&void 0!==e?e:{[t]:""}}get title(){var e;const t=this[r.SYMBOL_RAW].defaultLanguageId;return null!==(e=this[r.SYMBOL_RAW].localizedTitle)&&void 0!==e?e:{[t]:""}}serialize(){return{dataLayoutRows:this.dataLayoutRows.map((e=>e.serialize())),description:this.description,title:this.title}}}t.DataLayoutPageSchema=s;class u extends r.Schema{constructor(e){super("data_engine","dataLayout",e)}get dataRules(){return this[r.SYMBOL_RAW].rules.map((e=>o(o({},e),{},{name:{en_US:e.name}})))}get dataLayoutFields(){return this[r.SYMBOL_RAW].dataLayout.dataLayoutFields}get dataLayoutPages(){return this[r.SYMBOL_RAW].pages.map((e=>new s(e)))}get name(){return this[r.SYMBOL_RAW].name}get id(){var e;const{dataLayout:t,id:a}=this[r.SYMBOL_RAW];return null!=a?a:null==t||null===(e=t.dataLayout)||void 0===e?void 0:e.id}get paginationMode(){return this[r.SYMBOL_RAW].paginationMode}serialize(){return{dataLayoutFields:this.dataLayoutFields,dataLayoutPages:this.dataLayoutPages.map((e=>e.serialize())),dataRules:this.dataRules,id:this.id,name:this.name,paginationMode:this.paginationMode}}}t.DataLayoutSchema=u,n(u,"props",["dataLayout","id","name","pages","paginationMode","rules"])}}));
//# sourceMappingURL=DataLayout.es.js.map