9030c948206cd34af1fc4ef028e035b648c7d50aad92cccd9cf98f1668a06b77.json 4.6 KB

1
  1. {"ast":null,"code":"export function getPlacementStyle(placement, top, bottom) {\n let style;\n switch (placement) {\n case 'top':\n style = {\n left: '50%',\n transform: 'translateX(-50%)',\n right: 'auto',\n top,\n bottom: 'auto'\n };\n break;\n case 'topLeft':\n style = {\n left: 0,\n top,\n bottom: 'auto'\n };\n break;\n case 'topRight':\n style = {\n right: 0,\n top,\n bottom: 'auto'\n };\n break;\n case 'bottom':\n style = {\n left: '50%',\n transform: 'translateX(-50%)',\n right: 'auto',\n top: 'auto',\n bottom\n };\n break;\n case 'bottomLeft':\n style = {\n left: 0,\n top: 'auto',\n bottom\n };\n break;\n default:\n style = {\n right: 0,\n top: 'auto',\n bottom\n };\n break;\n }\n return style;\n}\nexport function getMotion(prefixCls) {\n return {\n motionName: `${prefixCls}-fade`\n };\n}\nexport function getCloseIconConfig(closeIcon, notificationConfig, notification) {\n if (typeof closeIcon !== 'undefined') {\n return closeIcon;\n }\n if (typeof (notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.closeIcon) !== 'undefined') {\n return notificationConfig.closeIcon;\n }\n return notification === null || notification === void 0 ? void 0 : notification.closeIcon;\n}","map":{"version":3,"names":["getPlacementStyle","placement","top","bottom","style","left","transform","right","getMotion","prefixCls","motionName","getCloseIconConfig","closeIcon","notificationConfig","notification"],"sources":["/Users/max_liu/max_liu/company/tools_auto_pt/node_modules/antd/es/notification/util.js"],"sourcesContent":["export function getPlacementStyle(placement, top, bottom) {\n let style;\n switch (placement) {\n case 'top':\n style = {\n left: '50%',\n transform: 'translateX(-50%)',\n right: 'auto',\n top,\n bottom: 'auto'\n };\n break;\n case 'topLeft':\n style = {\n left: 0,\n top,\n bottom: 'auto'\n };\n break;\n case 'topRight':\n style = {\n right: 0,\n top,\n bottom: 'auto'\n };\n break;\n case 'bottom':\n style = {\n left: '50%',\n transform: 'translateX(-50%)',\n right: 'auto',\n top: 'auto',\n bottom\n };\n break;\n case 'bottomLeft':\n style = {\n left: 0,\n top: 'auto',\n bottom\n };\n break;\n default:\n style = {\n right: 0,\n top: 'auto',\n bottom\n };\n break;\n }\n return style;\n}\nexport function getMotion(prefixCls) {\n return {\n motionName: `${prefixCls}-fade`\n };\n}\nexport function getCloseIconConfig(closeIcon, notificationConfig, notification) {\n if (typeof closeIcon !== 'undefined') {\n return closeIcon;\n }\n if (typeof (notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.closeIcon) !== 'undefined') {\n return notificationConfig.closeIcon;\n }\n return notification === null || notification === void 0 ? void 0 : notification.closeIcon;\n}"],"mappings":"AAAA,OAAO,SAASA,iBAAiBA,CAACC,SAAS,EAAEC,GAAG,EAAEC,MAAM,EAAE;EACxD,IAAIC,KAAK;EACT,QAAQH,SAAS;IACf,KAAK,KAAK;MACRG,KAAK,GAAG;QACNC,IAAI,EAAE,KAAK;QACXC,SAAS,EAAE,kBAAkB;QAC7BC,KAAK,EAAE,MAAM;QACbL,GAAG;QACHC,MAAM,EAAE;MACV,CAAC;MACD;IACF,KAAK,SAAS;MACZC,KAAK,GAAG;QACNC,IAAI,EAAE,CAAC;QACPH,GAAG;QACHC,MAAM,EAAE;MACV,CAAC;MACD;IACF,KAAK,UAAU;MACbC,KAAK,GAAG;QACNG,KAAK,EAAE,CAAC;QACRL,GAAG;QACHC,MAAM,EAAE;MACV,CAAC;MACD;IACF,KAAK,QAAQ;MACXC,KAAK,GAAG;QACNC,IAAI,EAAE,KAAK;QACXC,SAAS,EAAE,kBAAkB;QAC7BC,KAAK,EAAE,MAAM;QACbL,GAAG,EAAE,MAAM;QACXC;MACF,CAAC;MACD;IACF,KAAK,YAAY;MACfC,KAAK,GAAG;QACNC,IAAI,EAAE,CAAC;QACPH,GAAG,EAAE,MAAM;QACXC;MACF,CAAC;MACD;IACF;MACEC,KAAK,GAAG;QACNG,KAAK,EAAE,CAAC;QACRL,GAAG,EAAE,MAAM;QACXC;MACF,CAAC;MACD;EACJ;EACA,OAAOC,KAAK;AACd;AACA,OAAO,SAASI,SAASA,CAACC,SAAS,EAAE;EACnC,OAAO;IACLC,UAAU,EAAE,GAAGD,SAAS;EAC1B,CAAC;AACH;AACA,OAAO,SAASE,kBAAkBA,CAACC,SAAS,EAAEC,kBAAkB,EAAEC,YAAY,EAAE;EAC9E,IAAI,OAAOF,SAAS,KAAK,WAAW,EAAE;IACpC,OAAOA,SAAS;EAClB;EACA,IAAI,QAAQC,kBAAkB,KAAK,IAAI,IAAIA,kBAAkB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,kBAAkB,CAACD,SAAS,CAAC,KAAK,WAAW,EAAE;IACjI,OAAOC,kBAAkB,CAACD,SAAS;EACrC;EACA,OAAOE,YAAY,KAAK,IAAI,IAAIA,YAAY,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,YAAY,CAACF,SAAS;AAC3F","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}