UNPKG

ant-design-x-vue-next

Version:

Ant Design X for Vue — community continuation aligned with @ant-design/x

2 lines (1 loc) 1.17 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./utils.js");function u(e,r){if(s.isPathObject(e))return s.getValueByPath(r,e.path);if(s.isPathValue(e))return s.getValueByPath(r,e);if(Array.isArray(e))return e.map(t=>u(t,r));if(e&&typeof e=="object"){const t={};for(const[o,n]of Object.entries(e))t[o]=u(n,r);return t}return e}function p(e,r){if(!e||typeof e!="object")return e;const t={};for(const[o,n]of Object.entries(e))o==="context"?t[o]=n:t[o]=u(n,r);return t}function a(e,r){if(!e||typeof e!="object")return e;const t={};for(const[o,n]of Object.entries(e))o==="event"?t[o]=p(n,r):t[o]=u(n,r);return t}function y(e,r){const t={};for(const[o,n]of Object.entries(e))o==="action"?t[o]=a(n,r):t[o]=u(n,r);return t}function l(e,r){var n;const t=(n=e==null?void 0:e.event)==null?void 0:n.context;if(!t||typeof t!="object"||Array.isArray(t))return[];const o=[];for(const[i,c]of Object.entries(t))if(s.isPathObject(c)){const f=r[i];f!==void 0&&o.push({path:c.path,value:f})}return o}function V(e,r,t){return s.setValueByPath(e,r,t)}exports.applyDataModelUpdateV09=V;exports.extractDataUpdatesV09=l;exports.resolvePropsV09=y;