Liferay.Loader.define("data-engine-js-components-web@1.0.89/js/utils/setDataRecord.es",["module","exports","require","../utils/extractDataRecordValueKey.es"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function setDataRecord({locale:e,localizable:t,localizedValue:r={[e]:""},localizedValueEdited:n,name:c,transient:i,value:a="",visible:l},u,s,d){const f=(0,o.default)(c);if(i)return void(u[f]="");let b=a;"string"!=typeof a&&(b=JSON.stringify(a));l||(b="");if(t){const e=!!(null==r?void 0:r[s])||n&&n[s];let t;Object.keys(r).filter((e=>!(null==n?void 0:n[e])&&(""===r[e]||"[]"===r[e]||"{}"===r[e]))).forEach((e=>{delete r[e]})),t=r?Object.keys(r):[],t.includes(s)||t.push(s),u[f]=_objectSpread({},r),e?u[f]=_objectSpread(_objectSpread({},r),{},{[s]:b}):d&&(u[f]=_objectSpread(_objectSpread({},r),{},{[s]:a}))}else u[f]=b};var o=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r("../utils/extractDataRecordValueKey.es"));function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}}}));
//# sourceMappingURL=setDataRecord.es.js.map