UNPKG

ant-design-x-vue-next

Version:

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

2 lines (1 loc) 1.4 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./utils.js");function f(e){return e!==null&&typeof e=="object"&&typeof e.literalString=="string"}function o(e,n,i=!1){if(f(e))return e.literalString;if(s.isPathObject(e))return i?e:s.getValueByPath(n,e.path);if(s.isPathValue(e))return s.getValueByPath(n,e);if(Array.isArray(e))return e.map(t=>o(t,n,!1));if(e&&typeof e=="object"){const t={};for(const[r,a]of Object.entries(e))r==="value"&&"key"in e?t[r]=o(a,n,!0):t[r]=o(a,n,!1);return t}return e}function c(e,n){const i={};for(const[t,r]of Object.entries(e))i[t]=o(r,n);return i}function l(e,n){const i=e==null?void 0:e.context;if(!Array.isArray(i))return[];const t=[];for(const r of i)if(r&&typeof r=="object"&&"key"in r&&"value"in r){const a=r.value;if(s.isPathObject(a)){const u=n[r.key];u!==void 0&&t.push({path:a.path,value:u})}}return t}function y(e,n){const i={...e};for(const t of n)if("valueString"in t&&t.valueString!==void 0)i[t.key]=t.valueString;else if(Array.isArray(t.valueMap)){const r={};for(const{key:a,valueString:u}of t.valueMap)r[a]=u;i[t.key]=r}return i}exports.getValueByPath=s.getValueByPath;exports.isPathObject=s.isPathObject;exports.isPathValue=s.isPathValue;exports.setValueByPath=s.setValueByPath;exports.applyDataModelUpdateV08=y;exports.extractDataUpdatesV08=l;exports.isLiteralStringObject=f;exports.resolvePropsV08=c;