neo-cmp-cli 1.13.21 → 1.13.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/array-set2.js +1 -0
- package/dist/_virtual/base64-vlq2.js +1 -0
- package/dist/_virtual/base642.js +1 -0
- package/dist/_virtual/binary-search2.js +1 -0
- package/dist/_virtual/mapping-list2.js +1 -0
- package/dist/_virtual/picocolors.js +1 -0
- package/dist/_virtual/quick-sort2.js +1 -0
- package/dist/_virtual/source-map-consumer2.js +1 -0
- package/dist/_virtual/source-map-generator2.js +1 -0
- package/dist/_virtual/source-map2.js +1 -0
- package/dist/_virtual/source-node2.js +1 -0
- package/dist/_virtual/symbols.js +1 -0
- package/dist/_virtual/util2.js +1 -0
- package/dist/loaders/component-scope-style-loader2.js +1 -1
- package/dist/node_modules/nanoid/non-secure/index.js +1 -0
- package/dist/node_modules/picocolors/picocolors.js +1 -0
- package/dist/node_modules/postcss/lib/at-rule.js +1 -0
- package/dist/node_modules/postcss/lib/comment.js +1 -0
- package/dist/node_modules/postcss/lib/container.js +1 -0
- package/dist/node_modules/postcss/lib/css-syntax-error.js +1 -0
- package/dist/node_modules/postcss/lib/declaration.js +1 -0
- package/dist/node_modules/postcss/lib/document.js +1 -0
- package/dist/node_modules/postcss/lib/fromJSON.js +1 -0
- package/dist/node_modules/postcss/lib/input.js +1 -0
- package/dist/node_modules/postcss/lib/lazy-result.js +1 -0
- package/dist/node_modules/postcss/lib/list.js +1 -0
- package/dist/node_modules/postcss/lib/map-generator.js +1 -0
- package/dist/node_modules/postcss/lib/no-work-result.js +1 -0
- package/dist/node_modules/postcss/lib/node.js +1 -0
- package/dist/node_modules/postcss/lib/parse.js +1 -0
- package/dist/node_modules/postcss/lib/parser.js +1 -0
- package/dist/node_modules/postcss/lib/postcss.js +1 -0
- package/dist/node_modules/postcss/lib/previous-map.js +1 -0
- package/dist/node_modules/postcss/lib/processor.js +1 -0
- package/dist/node_modules/postcss/lib/result.js +1 -0
- package/dist/node_modules/postcss/lib/root.js +1 -0
- package/dist/node_modules/postcss/lib/rule.js +1 -0
- package/dist/node_modules/postcss/lib/stringifier.js +1 -0
- package/dist/node_modules/postcss/lib/stringify.js +1 -0
- package/dist/node_modules/postcss/lib/symbols.js +1 -0
- package/dist/node_modules/postcss/lib/terminal-highlight.js +1 -0
- package/dist/node_modules/postcss/lib/tokenize.js +1 -0
- package/dist/node_modules/postcss/lib/warn-once.js +1 -0
- package/dist/node_modules/postcss/lib/warning.js +1 -0
- package/dist/node_modules/source-map/lib/array-set.js +1 -1
- package/dist/node_modules/source-map/lib/base64-vlq.js +1 -1
- package/dist/node_modules/source-map/lib/base64.js +1 -1
- package/dist/node_modules/source-map/lib/binary-search.js +1 -1
- package/dist/node_modules/source-map/lib/mapping-list.js +1 -1
- package/dist/node_modules/source-map/lib/quick-sort.js +1 -1
- package/dist/node_modules/source-map/lib/source-map-consumer.js +1 -1
- package/dist/node_modules/source-map/lib/source-map-generator.js +1 -1
- package/dist/node_modules/source-map/lib/source-node.js +1 -1
- package/dist/node_modules/source-map/lib/util.js +1 -1
- package/dist/node_modules/source-map/source-map.js +1 -1
- package/dist/node_modules/source-map-js/lib/array-set.js +1 -0
- package/dist/node_modules/source-map-js/lib/base64-vlq.js +1 -0
- package/dist/node_modules/source-map-js/lib/base64.js +1 -0
- package/dist/node_modules/source-map-js/lib/binary-search.js +1 -0
- package/dist/node_modules/source-map-js/lib/mapping-list.js +1 -0
- package/dist/node_modules/source-map-js/lib/quick-sort.js +1 -0
- package/dist/node_modules/source-map-js/lib/source-map-consumer.js +1 -0
- package/dist/node_modules/source-map-js/lib/source-map-generator.js +1 -0
- package/dist/node_modules/source-map-js/lib/source-node.js +1 -0
- package/dist/node_modules/source-map-js/lib/util.js +1 -0
- package/dist/node_modules/source-map-js/source-map.js +1 -0
- package/dist/package.json.js +1 -1
- package/package.json +7 -5
- package/template/antd-custom-cmp-template/package.json +1 -1
- package/template/asset-manage-template/package.json +1 -1
- package/template/echarts-custom-cmp-template/package.json +1 -1
- package/template/empty-custom-cmp-template/package.json +1 -1
- package/template/map-custom-cmp-template/package.json +1 -1
- package/template/neo-bi-cmps/package.json +1 -1
- package/template/neo-custom-cmp-template/CODEBUDDY.md +92 -0
- package/template/neo-custom-cmp-template/package.json +1 -1
- package/template/neo-custom-cmp-template/src/components/customApi__c/index.tsx +8 -4
- package/template/neo-custom-cmp-template/src/components/customApi__c/style.scss +21 -18
- package/template/neo-custom-cmp-template/src/components/entityCardList__c/index.tsx +4 -3
- package/template/neo-custom-cmp-template/src/components/entityCardList__c/model.ts +10 -2
- package/template/neo-custom-cmp-template/src/components/entityCardList__c/style.scss +1 -1
- package/template/neo-custom-cmp-template/src/components/entityDetail__c/index.tsx +1 -1
- package/template/neo-custom-cmp-template/src/components/entityDetail__c/style.scss +51 -39
- package/template/neo-custom-cmp-template/src/components/entityForm__c/model.ts +10 -2
- package/template/neo-custom-cmp-template/src/components/entityForm__c/style.scss +1 -1
- package/template/neo-custom-cmp-template/src/components/entityTable__c/index.tsx +11 -9
- package/template/neo-custom-cmp-template/src/components/entityTable__c/model.ts +11 -2
- package/template/neo-custom-cmp-template/src/components/entityTable__c/style.scss +169 -114
- package/template/neo-custom-cmp-template/src/components/simpleCmp__c/index.tsx +1 -1
- package/template/neo-custom-cmp-template/src/components/simpleCmp__c/style.scss +94 -13
- package/template/neo-h5-cmps/package.json +1 -1
- package/template/neo-order-cmps/package.json +1 -1
- package/template/neo-pipeline-cmps/package.json +1 -1
- package/template/neo-web-entity-grid/package.json +1 -1
- package/template/neo-web-entity-grid/src/components/entityGrid2__c/model.ts +1 -1
- package/template/neo-web-entity-grid/src/components/entityGrid2__c/style.scss +1 -5
- package/template/neo-web-entity-grid/src/components/entityGrid3__c/model.ts +2 -0
- package/template/neo-web-entity-grid/src/components/entityGrid3__c/style.scss +1 -6
- package/template/neo-web-entity-grid/src/components/entityGrid__c/style.scss +1 -6
- package/template/neo-web-entity-grid/src/components/searchForm__c/model.ts +10 -2
- package/template/neo-web-form/package.json +1 -1
- package/template/react-custom-cmp-template/package.json +1 -1
- package/template/react-ts-custom-cmp-template/package.json +1 -1
- package/template/vue2-custom-cmp-template/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/source-map-consumer.js"),n=require("./util.js"),r=require("./binary-search.js"),t=require("./array-set.js"),o=require("./base64-vlq.js"),i=require("./quick-sort.js");var s;exports.__require=function(){if(s)return e.__exports;s=1;var a=n.__require(),u=r.__require(),l=t.__require().ArraySet,g=o.__require(),p=i.__require().quickSort;function c(e,n){var r=e;return"string"==typeof e&&(r=a.parseSourceMapInput(e)),null!=r.sections?new d(r,n):new h(r,n)}function h(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var t=a.getArg(r,"version"),o=a.getArg(r,"sources"),i=a.getArg(r,"names",[]),s=a.getArg(r,"sourceRoot",null),u=a.getArg(r,"sourcesContent",null),g=a.getArg(r,"mappings"),p=a.getArg(r,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);s&&(s=a.normalize(s)),o=o.map(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return a.computeSourceURL(s,e,n)}),this.sourceRoot=s,this.sourcesContent=u,this._mappings=g,this._sourceMapURL=n,this.file=p}function f(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}c.fromSourceMap=function(e,n){return h.fromSourceMap(e,n)},c.prototype._version=3,c.prototype.__generatedMappings=null,Object.defineProperty(c.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),c.prototype.__originalMappings=null,Object.defineProperty(c.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),c.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return";"===r||","===r},c.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},c.GENERATED_ORDER=1,c.ORIGINAL_ORDER=2,c.GREATEST_LOWER_BOUND=1,c.LEAST_UPPER_BOUND=2,c.prototype.eachMapping=function(e,n,r){var t,o=n||null;switch(r||c.GENERATED_ORDER){case c.GENERATED_ORDER:t=this._generatedMappings;break;case c.ORIGINAL_ORDER:t=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var i=this.sourceRoot,s=e.bind(o),u=this._names,l=this._sources,g=this._sourceMapURL,p=0,h=t.length;p<h;p++){var f=t[p],_=null===f.source?null:l.at(f.source);null!==_&&(_=a.computeSourceURL(i,_,g)),s({source:_,generatedLine:f.generatedLine,generatedColumn:f.generatedColumn,originalLine:f.originalLine,originalColumn:f.originalColumn,name:null===f.name?null:u.at(f.name)})}},c.prototype.allGeneratedPositionsFor=function(e){var n=a.getArg(e,"line"),r={source:a.getArg(e,"source"),originalLine:n,originalColumn:a.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var t=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},e.__exports.SourceMapConsumer=c,h.prototype=Object.create(c.prototype),h.prototype.consumer=c,h.prototype._findSourceIndex=function(e){var n,r=e;if(null!=this.sourceRoot&&(r=a.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==e)return n;return-1},h.fromSourceMap=function(e,n){var r=Object.create(h.prototype),t=r._names=l.fromArray(e._names.toArray(),!0),o=r._sources=l.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(e){return a.computeSourceURL(r.sourceRoot,e,n)});for(var i=e._mappings.toArray().slice(),s=r.__generatedMappings=[],u=r.__originalMappings=[],g=0,c=i.length;g<c;g++){var _=i[g],m=new f;m.generatedLine=_.generatedLine,m.generatedColumn=_.generatedColumn,_.source&&(m.source=o.indexOf(_.source),m.originalLine=_.originalLine,m.originalColumn=_.originalColumn,_.name&&(m.name=t.indexOf(_.name)),u.push(m)),s.push(m)}return p(r.__originalMappings,a.compareByOriginalPositions),r},h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});const _=a.compareByGeneratedPositionsDeflatedNoLine;function m(e,n){let r=e.length,t=e.length-n;if(!(t<=1))if(2==t){let r=e[n],t=e[n+1];_(r,t)>0&&(e[n]=t,e[n+1]=r)}else if(t<20)for(let t=n;t<r;t++)for(let r=t;r>n;r--){let n=e[r-1],t=e[r];if(_(n,t)<=0)break;e[r-1]=t,e[r]=n}else p(e,_,n)}function d(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var t=a.getArg(r,"version"),o=a.getArg(r,"sections");if(t!=this._version)throw new Error("Unsupported version: "+t);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=a.getArg(e,"offset"),t=a.getArg(r,"line"),o=a.getArg(r,"column");if(t<i.line||t===i.line&&o<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=r,{generatedOffset:{generatedLine:t+1,generatedColumn:o+1},consumer:new c(a.getArg(e,"map"),n)}})}return h.prototype._parseMappings=function(e,n){var r,t,o,i,s=1,u=0,l=0,c=0,h=0,_=0,d=e.length,C=0,v={},L=[],y=[];let A=0;for(;C<d;)if(";"===e.charAt(C))s++,C++,u=0,m(y,A),A=y.length;else if(","===e.charAt(C))C++;else{for((r=new f).generatedLine=s,o=C;o<d&&!this._charIsMappingSeparator(e,o);o++);for(e.slice(C,o),t=[];C<o;)g.decode(e,C,v),i=v.value,C=v.rest,t.push(i);if(2===t.length)throw new Error("Found a source, but no line and column");if(3===t.length)throw new Error("Found a source and line, but no column");if(r.generatedColumn=u+t[0],u=r.generatedColumn,t.length>1&&(r.source=h+t[1],h+=t[1],r.originalLine=l+t[2],l=r.originalLine,r.originalLine+=1,r.originalColumn=c+t[3],c=r.originalColumn,t.length>4&&(r.name=_+t[4],_+=t[4])),y.push(r),"number"==typeof r.originalLine){let e=r.source;for(;L.length<=e;)L.push(null);null===L[e]&&(L[e]=[]),L[e].push(r)}}m(y,A),this.__generatedMappings=y;for(var M=0;M<L.length;M++)null!=L[M]&&p(L[M],a.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...L)},h.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},h.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},h.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",c.GREATEST_LOWER_BOUND));if(r>=0){var t=this._generatedMappings[r];if(t.generatedLine===n.generatedLine){var o=a.getArg(t,"source",null);null!==o&&(o=this._sources.at(o),o=a.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var i=a.getArg(t,"name",null);return null!==i&&(i=this._names.at(i)),{source:o,line:a.getArg(t,"originalLine",null),column:a.getArg(t,"originalColumn",null),name:i}}}return{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},h.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var t,o=e;if(null!=this.sourceRoot&&(o=a.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(t=a.urlParse(this.sourceRoot))){var i=o.replace(/^file:\/\//,"");if("file"==t.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!t.path||"/"==t.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(n)return null;throw new Error('"'+o+'" is not in the SourceMap.')},h.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if((n=this._findSourceIndex(n))<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},t=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",c.GREATEST_LOWER_BOUND));if(t>=0){var o=this._originalMappings[t];if(o.source===r.source)return{line:a.getArg(o,"generatedLine",null),column:a.getArg(o,"generatedColumn",null),lastColumn:a.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},e.__exports.BasicSourceMapConsumer=h,d.prototype=Object.create(c.prototype),d.prototype.constructor=c,d.prototype._version=3,Object.defineProperty(d.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}}),d.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=u.search(n,this._sections,function(e,n){var r=e.generatedLine-n.generatedOffset.generatedLine;return r||e.generatedColumn-n.generatedOffset.generatedColumn}),t=this._sections[r];return t?t.consumer.originalPositionFor({line:n.generatedLine-(t.generatedOffset.generatedLine-1),column:n.generatedColumn-(t.generatedOffset.generatedLine===n.generatedLine?t.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},d.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},d.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r].consumer.sourceContentFor(e,!0);if(t||""===t)return t}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},d.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(-1!==r.consumer._findSourceIndex(a.getArg(e,"source"))){var t=r.consumer.generatedPositionFor(e);if(t)return{line:t.line+(r.generatedOffset.generatedLine-1),column:t.column+(r.generatedOffset.generatedLine===t.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},d.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var t=this._sections[r],o=t.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],u=t.consumer._sources.at(s.source);null!==u&&(u=a.computeSourceURL(t.consumer.sourceRoot,u,this._sourceMapURL)),this._sources.add(u),u=this._sources.indexOf(u);var l=null;s.name&&(l=t.consumer._names.at(s.name),this._names.add(l),l=this._names.indexOf(l));var g={source:u,generatedLine:s.generatedLine+(t.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(t.generatedOffset.generatedLine===s.generatedLine?t.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:l};this.__generatedMappings.push(g),"number"==typeof g.originalLine&&this.__originalMappings.push(g)}p(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),p(this.__originalMappings,a.compareByOriginalPositions)},e.__exports.IndexedSourceMapConsumer=d,e.__exports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/source-map-generator.js"),n=require("./base64-vlq.js"),o=require("./util.js"),r=require("./array-set.js"),t=require("./mapping-list.js");var i;exports.__require=function(){if(i)return e.__exports;i=1;var s=n.__require(),l=o.__require(),u=r.__require().ArraySet,a=t.__require().MappingList;function c(e){e||(e={}),this._file=l.getArg(e,"file",null),this._sourceRoot=l.getArg(e,"sourceRoot",null),this._skipValidation=l.getArg(e,"skipValidation",!1),this._ignoreInvalidMapping=l.getArg(e,"ignoreInvalidMapping",!1),this._sources=new u,this._names=new u,this._mappings=new a,this._sourcesContents=null}return c.prototype._version=3,c.fromSourceMap=function(e,n){var o=e.sourceRoot,r=new c(Object.assign(n||{},{file:e.file,sourceRoot:o}));return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=o&&(n.source=l.relative(o,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(n){var t=n;null!==o&&(t=l.relative(o,n)),r._sources.has(t)||r._sources.add(t);var i=e.sourceContentFor(n);null!=i&&r.setSourceContent(n,i)}),r},c.prototype.addMapping=function(e){var n=l.getArg(e,"generated"),o=l.getArg(e,"original",null),r=l.getArg(e,"source",null),t=l.getArg(e,"name",null);(this._skipValidation||!1!==this._validateMapping(n,o,r,t))&&(null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=t&&(t=String(t),this._names.has(t)||this._names.add(t)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=o&&o.line,originalColumn:null!=o&&o.column,source:r,name:t}))},c.prototype.setSourceContent=function(e,n){var o=e;null!=this._sourceRoot&&(o=l.relative(this._sourceRoot,o)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[l.toSetString(o)]=n):this._sourcesContents&&(delete this._sourcesContents[l.toSetString(o)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},c.prototype.applySourceMap=function(e,n,o){var r=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var t=this._sourceRoot;null!=t&&(r=l.relative(t,r));var i=new u,s=new u;this._mappings.unsortedForEach(function(n){if(n.source===r&&null!=n.originalLine){var u=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=u.source&&(n.source=u.source,null!=o&&(n.source=l.join(o,n.source)),null!=t&&(n.source=l.relative(t,n.source)),n.originalLine=u.line,n.originalColumn=u.column,null!=u.name&&(n.name=u.name))}var a=n.source;null==a||i.has(a)||i.add(a);var c=n.name;null==c||s.has(c)||s.add(c)},this),this._sources=i,this._names=s,e.sources.forEach(function(n){var r=e.sourceContentFor(n);null!=r&&(null!=o&&(n=l.join(o,n)),null!=t&&(n=l.relative(t,n)),this.setSourceContent(n,r))},this)},c.prototype._validateMapping=function(e,n,o,r){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column){var t="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return"undefined"!=typeof console&&console.warn&&console.warn(t),!1;throw new Error(t)}if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||o||r)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&o)){t="Invalid mapping: "+JSON.stringify({generated:e,source:o,original:n,name:r});if(this._ignoreInvalidMapping)return"undefined"!=typeof console&&console.warn&&console.warn(t),!1;throw new Error(t)}},c.prototype._serializeMappings=function(){for(var e,n,o,r,t=0,i=1,u=0,a=0,c=0,p=0,g="",h=this._mappings.toArray(),_=0,m=h.length;_<m;_++){if(e="",(n=h[_]).generatedLine!==i)for(t=0;n.generatedLine!==i;)e+=";",i++;else if(_>0){if(!l.compareByGeneratedPositionsInflated(n,h[_-1]))continue;e+=","}e+=s.encode(n.generatedColumn-t),t=n.generatedColumn,null!=n.source&&(r=this._sources.indexOf(n.source),e+=s.encode(r-p),p=r,e+=s.encode(n.originalLine-1-a),a=n.originalLine-1,e+=s.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(o=this._names.indexOf(n.name),e+=s.encode(o-c),c=o)),g+=e}return g},c.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=l.relative(n,e));var o=l.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)},c.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},c.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.__exports.SourceMapGenerator=c,e.__exports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/source-node.js"),n=require("./source-map-generator.js"),r=require("./util.js");var t;exports.__require=function(){if(t)return e.__exports;t=1;var o=n.__require().SourceMapGenerator,i=r.__require(),l=/(\r?\n)/,u="$$$isSourceNode$$$";function s(e,n,r,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==r?null:r,this.name=null==o?null:o,this[u]=!0,null!=t&&this.add(t)}return s.fromStringWithSourceMap=function(e,n,r){var t=new s,o=e.split(l),u=0,c=function(){return e()+(e()||"");function e(){return u<o.length?o[u++]:void 0}},a=1,h=0,d=null;return n.eachMapping(function(e){if(null!==d){if(!(a<e.generatedLine)){var n=(r=o[u]||"").substr(0,e.generatedColumn-h);return o[u]=r.substr(e.generatedColumn-h),h=e.generatedColumn,p(d,n),void(d=e)}p(d,c()),a++,h=0}for(;a<e.generatedLine;)t.add(c()),a++;if(h<e.generatedColumn){var r=o[u]||"";t.add(r.substr(0,e.generatedColumn)),o[u]=r.substr(e.generatedColumn),h=e.generatedColumn}d=e},this),u<o.length&&(d&&p(d,c()),t.add(o.splice(u).join(""))),n.sources.forEach(function(e){var o=n.sourceContentFor(e);null!=o&&(null!=r&&(e=i.join(r,e)),t.setSourceContent(e,o))}),t;function p(e,n){if(null===e||void 0===e.source)t.add(n);else{var o=r?i.join(r,e.source):e.source;t.add(new s(e.originalLine,e.originalColumn,o,n,e.name))}}},s.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},s.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},s.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r<t;r++)(n=this.children[r])[u]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},s.prototype.join=function(e){var n,r,t=this.children.length;if(t>0){for(n=[],r=0;r<t-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this},s.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},s.prototype.setSourceContent=function(e,n){this.sourceContents[i.toSetString(e)]=n},s.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][u]&&this.children[n].walkSourceContents(e);var t=Object.keys(this.sourceContents);for(n=0,r=t.length;n<r;n++)e(i.fromSetString(t[n]),this.sourceContents[t[n]])},s.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},s.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new o(e),t=!1,i=null,l=null,u=null,s=null;return this.walk(function(e,o){n.code+=e,null!==o.source&&null!==o.line&&null!==o.column?(i===o.source&&l===o.line&&u===o.column&&s===o.name||r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name}),i=o.source,l=o.line,u=o.column,s=o.name,t=!0):t&&(r.addMapping({generated:{line:n.line,column:n.column}}),i=null,t=!1);for(var c=0,a=e.length;c<a;c++)10===e.charCodeAt(c)?(n.line++,n.column=0,c+1===a?(i=null,t=!1):t&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name})):n.column++}),this.walkSourceContents(function(e,n){r.setSourceContent(e,n)}),{code:n.code,map:r}},e.__exports.SourceNode=s,e.__exports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../_virtual/util.js");var r;exports.__require=function(){return r||(r=1,function(e){e.getArg=function(e,r,n){if(r in e)return e[r];if(3===arguments.length)return n;throw new Error('"'+r+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function t(e){var n=e.match(r);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function i(e){var r="";return e.scheme&&(r+=e.scheme+":"),r+="//",e.auth&&(r+=e.auth+"@"),e.host&&(r+=e.host),e.port&&(r+=":"+e.port),e.path&&(r+=e.path),r}e.urlParse=t,e.urlGenerate=i;var o,a,u=(o=function(r){var n=r,o=t(r);if(o){if(!o.path)return r;n=o.path}for(var a=e.isAbsolute(n),u=[],l=0,c=0;;){if(l=c,-1===(c=n.indexOf("/",l))){u.push(n.slice(l));break}for(u.push(n.slice(l,c));c<n.length&&"/"===n[c];)c++}var s,f=0;for(c=u.length-1;c>=0;c--)"."===(s=u[c])?u.splice(c,1):".."===s?f++:f>0&&(""===s?(u.splice(c+1,f),f=0):(u.splice(c,2),f--));return""===(n=u.join("/"))&&(n=a?"/":"."),o?(o.path=n,i(o)):n},a=[],function(e){for(var r=0;r<a.length;r++)if(a[r].input===e){var n=a[0];return a[0]=a[r],a[r]=n,a[0].result}var t=o(e);return a.unshift({input:e,result:t}),a.length>32&&a.pop(),t});function l(e,r){""===e&&(e="."),""===r&&(r=".");var o=t(r),a=t(e);if(a&&(e=a.path||"/"),o&&!o.scheme)return a&&(o.scheme=a.scheme),i(o);if(o||r.match(n))return r;if(a&&!a.host&&!a.path)return a.host=r,i(a);var l="/"===r.charAt(0)?r:u(e.replace(/\/+$/,"")+"/"+r);return a?(a.path=l,i(a)):l}e.normalize=u,e.join=l,e.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},e.relative=function(e,r){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==r.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return r;if((e=e.slice(0,t)).match(/^([^\/]+:\/)?\/*$/))return r;++n}return Array(n+1).join("../")+r.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function s(e){return e}function f(e){if(!e)return!1;var r=e.length;if(r<9)return!1;if(95!==e.charCodeAt(r-1)||95!==e.charCodeAt(r-2)||111!==e.charCodeAt(r-3)||116!==e.charCodeAt(r-4)||111!==e.charCodeAt(r-5)||114!==e.charCodeAt(r-6)||112!==e.charCodeAt(r-7)||95!==e.charCodeAt(r-8)||95!==e.charCodeAt(r-9))return!1;for(var n=r-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function g(e,r){return e===r?0:null===e?1:null===r?-1:e>r?1:-1}e.toSetString=c?s:function(e){return f(e)?"$"+e:e},e.fromSetString=c?s:function(e){return f(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,r,n){var t=g(e.source,r.source);return 0!==t||0!==(t=e.originalLine-r.originalLine)||0!==(t=e.originalColumn-r.originalColumn)||n||0!==(t=e.generatedColumn-r.generatedColumn)||0!==(t=e.generatedLine-r.generatedLine)?t:g(e.name,r.name)},e.compareByOriginalPositionsNoSource=function(e,r,n){var t;return 0!==(t=e.originalLine-r.originalLine)||0!==(t=e.originalColumn-r.originalColumn)||n||0!==(t=e.generatedColumn-r.generatedColumn)||0!==(t=e.generatedLine-r.generatedLine)?t:g(e.name,r.name)},e.compareByGeneratedPositionsDeflated=function(e,r,n){var t=e.generatedLine-r.generatedLine;return 0!==t||0!==(t=e.generatedColumn-r.generatedColumn)||n||0!==(t=g(e.source,r.source))||0!==(t=e.originalLine-r.originalLine)||0!==(t=e.originalColumn-r.originalColumn)?t:g(e.name,r.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,r,n){var t=e.generatedColumn-r.generatedColumn;return 0!==t||n||0!==(t=g(e.source,r.source))||0!==(t=e.originalLine-r.originalLine)||0!==(t=e.originalColumn-r.originalColumn)?t:g(e.name,r.name)},e.compareByGeneratedPositionsInflated=function(e,r){var n=e.generatedLine-r.generatedLine;return 0!==n||0!==(n=e.generatedColumn-r.generatedColumn)||0!==(n=g(e.source,r.source))||0!==(n=e.originalLine-r.originalLine)||0!==(n=e.originalColumn-r.originalColumn)?n:g(e.name,r.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,r,n){if(r=r||"",e&&("/"!==e[e.length-1]&&"/"!==r[0]&&(e+="/"),r=e+r),n){var o=t(n);if(!o)throw new Error("sourceMapURL could not be parsed");if(o.path){var a=o.path.lastIndexOf("/");a>=0&&(o.path=o.path.substring(0,a+1))}r=l(i(o),r)}return u(r)}}(e.__exports)),e.__exports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../_virtual/source-map.js"),r=require("./lib/source-map-generator.js"),o=require("./lib/source-map-consumer.js"),u=require("./lib/source-node.js");var s;exports.__require=function(){return s||(s=1,e.__exports.SourceMapGenerator=r.__require().SourceMapGenerator,e.__exports.SourceMapConsumer=o.__require().SourceMapConsumer,e.__exports.SourceNode=u.__require().SourceNode),e.__exports};
|
package/dist/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.13.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.13.22";const o={version:e};exports.default=o,exports.version=e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo-cmp-cli",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.22",
|
|
4
4
|
"description": "Neo 自定义组件开发工具,支持react 和 vue2.0技术栈。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"neo-cli",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"url": "https://github.com/xsy-neoui/neo-cmp-cli/issues"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
+
"@cloudbase/js-sdk": "^1.7.1",
|
|
43
44
|
"adm-zip": "^0.5.10",
|
|
44
45
|
"akfun": "^5.3.3",
|
|
45
46
|
"axios": "^1.7.0",
|
|
@@ -51,14 +52,15 @@
|
|
|
51
52
|
"form-data": "^4.0.0",
|
|
52
53
|
"fs-extra": "^10.1.0",
|
|
53
54
|
"inquirer": "^8.2.7",
|
|
55
|
+
"jsdom": "^28.0.0",
|
|
54
56
|
"lodash": "^4.17.23",
|
|
55
57
|
"open": "^8.4.2",
|
|
56
58
|
"ora": "^4.0.4",
|
|
57
59
|
"portfinder": "^1.0.38",
|
|
60
|
+
"postcss-less": "^6.0.0",
|
|
61
|
+
"postcss-scss": "^4.0.9",
|
|
58
62
|
"webpack-sources": "^3.2.3",
|
|
59
|
-
"yargs": "^17.7.2"
|
|
60
|
-
"jsdom": "^28.0.0",
|
|
61
|
-
"@cloudbase/js-sdk": "^1.7.1"
|
|
63
|
+
"yargs": "^17.7.2"
|
|
62
64
|
},
|
|
63
65
|
"devDependencies": {
|
|
64
66
|
"@commitlint/cli": "^18.0.0",
|
|
@@ -82,4 +84,4 @@
|
|
|
82
84
|
"Firefox >= 20",
|
|
83
85
|
"Android > 4.4"
|
|
84
86
|
]
|
|
85
|
-
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# CODEBUDDY.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to CodeBuddy Code when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
NeoCRM 自定义业务组件模板项目。基于 React 16 + TypeScript + Ant Design 4 + SCSS,通过 `neo-cmp-cli` 工具链进行预览、调试和发布。
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i # 安装依赖
|
|
13
|
+
npm run preview # 预览组件 (neo preview)
|
|
14
|
+
npm run linkDebug # 外链调试 - 在线上页面设计器端预览自定义组件
|
|
15
|
+
npm run neoLogin # OAuth2 登录 NeoCRM 平台
|
|
16
|
+
npm run pushCmp # 构建并发布组件到 NeoCRM 平台
|
|
17
|
+
npm run pullCmp # 从平台拉取组件
|
|
18
|
+
npm run deleteCmp # 删除平台上的组件
|
|
19
|
+
npm run format # Prettier 格式化
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
没有标准的 build/dev/test 命令。构建在 `neo push cmp` 时隐式执行,无测试框架配置。
|
|
23
|
+
|
|
24
|
+
## Architecture
|
|
25
|
+
|
|
26
|
+
### Component Structure
|
|
27
|
+
|
|
28
|
+
每个自定义组件位于 `src/components/` 下,以 `cmpType__c` 命名(`__c` 后缀表示自定义):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
src/components/xxCmp__c/
|
|
32
|
+
├── index.tsx # 组件实现(默认入口)
|
|
33
|
+
├── model.ts # 模型文件 - 对接页面设计器的属性/事件/函数声明
|
|
34
|
+
├── style.scss # 组件样式
|
|
35
|
+
└── README.md # 组件文档(可选)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
当 `neo.config.js` 的 `entry` 为空时,CLI 根据 `src/components/` 目录结构自动生成 entry 和注册文件,开发者无需关注 `neo-register`。
|
|
39
|
+
|
|
40
|
+
### Component Base Class
|
|
41
|
+
|
|
42
|
+
- `BaseCmp`(来自 `neo-ui-common`):主要基类,继承自 `React.PureComponent`
|
|
43
|
+
- 部分组件也可直接继承 `React.PureComponent`
|
|
44
|
+
- 类型定义在 `@types/neo-ui-common.d.ts`
|
|
45
|
+
|
|
46
|
+
### Model File
|
|
47
|
+
|
|
48
|
+
`model.ts` 定义组件在设计器中的配置,关键字段:
|
|
49
|
+
|
|
50
|
+
- `label` / `description`:组件名称和描述
|
|
51
|
+
- `targetPage`:支持页面类型(`all` / `entityFormPage` / `customPage`)
|
|
52
|
+
- `targetDevice`:支持终端(`web` / `mobile`)
|
|
53
|
+
- `iconUrl`:组件图标
|
|
54
|
+
- `defaultComProps`:默认属性
|
|
55
|
+
- `propsSchema`:编辑器属性面板配置
|
|
56
|
+
- `events`:组件事件声明
|
|
57
|
+
- `functions`:组件对外暴露的函数
|
|
58
|
+
|
|
59
|
+
### Platform APIs
|
|
60
|
+
|
|
61
|
+
- **neo-open-api / xObject**:实体数据 CRUD(`query`, `get`, `create`, `update`, `delete`, `getDesc`, `getEntityTypeList`)
|
|
62
|
+
- **neo-open-api / customApi**:自定义 API 代理调用(`customApi.run`)
|
|
63
|
+
- **neo-ui-common / NeoEvent**:事件系统
|
|
64
|
+
- `@NeoEvent.function` 装饰器:声明可被其他组件调用的函数
|
|
65
|
+
- `@NeoEvent.dispatch`:声明事件派发
|
|
66
|
+
- `NeoEvent.broadcast` / `NeoEvent.listen`:广播/监听事件
|
|
67
|
+
- **props.data.__NeoSystemInfo**:平台系统信息
|
|
68
|
+
|
|
69
|
+
### Data Fetching Modes
|
|
70
|
+
|
|
71
|
+
1. **自动获取**(`autoFetchData: true`):平台自动注入 `props.entityData` 和 `props.xObjectDataApi.fieldDescList`
|
|
72
|
+
2. **手动获取**:组件自行通过 `neo-open-api` SDK 调用接口
|
|
73
|
+
|
|
74
|
+
### Path Aliases (webpack)
|
|
75
|
+
|
|
76
|
+
- `@` → `./src`
|
|
77
|
+
- `$assets` → `./src/assets`
|
|
78
|
+
- `$public` → `./public`
|
|
79
|
+
- `$utils` → `./src/utils`
|
|
80
|
+
|
|
81
|
+
### SCSS Auto-injection
|
|
82
|
+
|
|
83
|
+
`src/assets/css/common.scss`(变量、函数)和 `src/assets/css/mixin.scss`(通用 mixin)通过 `sassResources` 自动注入所有 SCSS 文件,无需手动 import。
|
|
84
|
+
|
|
85
|
+
## Key Rules
|
|
86
|
+
|
|
87
|
+
- **React 16**:必须使用 React 16 版本
|
|
88
|
+
- **样式隔离**:组件最外层设置唯一 className(如 `entityForm__c`),所有样式放在该选择器内
|
|
89
|
+
- **组件命名**:目录名使用 `cmpType__c` 格式
|
|
90
|
+
- **发布要求**:`package.json` 的 `name` 值必须唯一,`version` 值不能重复
|
|
91
|
+
- **代码风格**:Prettier 配置为单引号、分号、2 空格缩进、尾逗号 all
|
|
92
|
+
- **Commit 规范**:type 必须是 feat/fix/bug/docs/style/refactor/test/chore/perf/build/ci 之一
|
|
@@ -145,13 +145,13 @@ export default class CustomApiCmp extends BaseCmp<
|
|
|
145
145
|
const { className, title: propsTitle } = this.props;
|
|
146
146
|
const displayTitle = propsTitle || '自定义 API 示例';
|
|
147
147
|
|
|
148
|
-
console.log('this.props:', this.props);
|
|
149
|
-
|
|
150
148
|
return (
|
|
151
149
|
<div className={`customApi__c ${className || ''}`}>
|
|
152
150
|
<div className="table-wrapper">
|
|
153
151
|
<div className="panel-header">
|
|
154
|
-
<
|
|
152
|
+
<div className="panel-header-text">
|
|
153
|
+
<h3>{displayTitle}</h3>
|
|
154
|
+
</div>
|
|
155
155
|
</div>
|
|
156
156
|
<div className="table-container">
|
|
157
157
|
<Spin spinning={loading} tip="加载数据中...">
|
|
@@ -171,7 +171,11 @@ export default class CustomApiCmp extends BaseCmp<
|
|
|
171
171
|
columns={POST_COLUMNS}
|
|
172
172
|
dataSource={dataSource}
|
|
173
173
|
rowKey="id"
|
|
174
|
-
pagination={{
|
|
174
|
+
pagination={{
|
|
175
|
+
pageSize: 10,
|
|
176
|
+
showSizeChanger: true,
|
|
177
|
+
showTotal: (total) => `共 ${total} 条`,
|
|
178
|
+
}}
|
|
175
179
|
scroll={{ y: 'max-content' }}
|
|
176
180
|
/>
|
|
177
181
|
)}
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
.customApi__c {
|
|
2
|
+
background: #fff;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
|
|
2
5
|
.table-wrapper {
|
|
3
|
-
|
|
4
|
-
border-radius: 4px;
|
|
6
|
+
padding: 16px 20px;
|
|
5
7
|
display: flex;
|
|
6
8
|
flex-direction: column;
|
|
7
9
|
overflow: hidden;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
.panel-header {
|
|
11
|
-
padding:
|
|
12
|
-
background: #
|
|
13
|
-
border-bottom: 1px solid #ddd;
|
|
13
|
+
padding: 12px 0 8px 0;
|
|
14
|
+
background: #fff;
|
|
14
15
|
display: flex;
|
|
15
16
|
justify-content: space-between;
|
|
16
|
-
align-items:
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
|
|
19
|
+
.panel-header-text {
|
|
20
|
+
flex: 1;
|
|
21
|
+
min-width: 0;
|
|
22
|
+
}
|
|
17
23
|
|
|
18
24
|
h3 {
|
|
19
25
|
margin: 0;
|
|
20
26
|
font-size: 16px;
|
|
21
27
|
font-weight: 600;
|
|
22
|
-
color: #
|
|
28
|
+
color: #434343;
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
|
|
@@ -38,6 +44,7 @@
|
|
|
38
44
|
font-size: 13px;
|
|
39
45
|
position: sticky;
|
|
40
46
|
top: 0;
|
|
47
|
+
z-index: 1;
|
|
41
48
|
}
|
|
42
49
|
|
|
43
50
|
.ant-table-tbody > tr > td {
|
|
@@ -52,6 +59,11 @@
|
|
|
52
59
|
}
|
|
53
60
|
}
|
|
54
61
|
|
|
62
|
+
.ant-pagination {
|
|
63
|
+
padding: 12px 0 0;
|
|
64
|
+
margin: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
55
67
|
.ant-empty {
|
|
56
68
|
padding: 40px 0;
|
|
57
69
|
|
|
@@ -73,14 +85,9 @@
|
|
|
73
85
|
}
|
|
74
86
|
}
|
|
75
87
|
|
|
76
|
-
// 响应式设计
|
|
77
88
|
@media (max-width: 768px) {
|
|
78
89
|
.panel-header {
|
|
79
|
-
padding: 12px;
|
|
80
|
-
|
|
81
|
-
h3 {
|
|
82
|
-
font-size: 14px;
|
|
83
|
-
}
|
|
90
|
+
padding: 12px 0 6px 0;
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
.table-container {
|
|
@@ -96,11 +103,7 @@
|
|
|
96
103
|
|
|
97
104
|
@media (max-width: 576px) {
|
|
98
105
|
.panel-header {
|
|
99
|
-
padding: 10px;
|
|
100
|
-
|
|
101
|
-
h3 {
|
|
102
|
-
font-size: 13px;
|
|
103
|
-
}
|
|
106
|
+
padding: 10px 0 6px 0;
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
.table-container {
|
|
@@ -135,6 +135,7 @@ export default class EntityCardList extends BaseCmp<
|
|
|
135
135
|
<UserOutlined className="info-icon" />
|
|
136
136
|
<span className="name-text">
|
|
137
137
|
{object.name ||
|
|
138
|
+
object.contactName ||
|
|
138
139
|
object.accountName ||
|
|
139
140
|
object.productName ||
|
|
140
141
|
'未知姓名'}
|
|
@@ -145,6 +146,7 @@ export default class EntityCardList extends BaseCmp<
|
|
|
145
146
|
<span className="phone-text">
|
|
146
147
|
{object.phone__c ||
|
|
147
148
|
object.phone ||
|
|
149
|
+
object.mobile ||
|
|
148
150
|
object.phoneNumber ||
|
|
149
151
|
'未填写手机号'}
|
|
150
152
|
</span>
|
|
@@ -159,8 +161,8 @@ export default class EntityCardList extends BaseCmp<
|
|
|
159
161
|
render() {
|
|
160
162
|
const { title, className } = this.props;
|
|
161
163
|
const { objectDataList, loading, error } = this.state;
|
|
162
|
-
const curAmisData = this.props.data || {};
|
|
163
|
-
const systemInfo = curAmisData.__NeoSystemInfo || {};
|
|
164
|
+
// const curAmisData = this.props.data || {}; // 组件上下文信息
|
|
165
|
+
// const systemInfo = curAmisData.__NeoSystemInfo || {}; // 系统信息
|
|
164
166
|
console.log('this.props:', this.props);
|
|
165
167
|
|
|
166
168
|
return (
|
|
@@ -169,7 +171,6 @@ export default class EntityCardList extends BaseCmp<
|
|
|
169
171
|
<div className="header-content">
|
|
170
172
|
<h3 className="header-title">
|
|
171
173
|
{title || '数据卡片列表'}
|
|
172
|
-
{systemInfo.tenantName ? `【${systemInfo.tenantName}】` : ''}
|
|
173
174
|
</h3>
|
|
174
175
|
<Button
|
|
175
176
|
type="primary"
|
|
@@ -38,8 +38,16 @@ export class EntityCardListModel {
|
|
|
38
38
|
title: '数据卡片列表',
|
|
39
39
|
label: '数据卡片列表',
|
|
40
40
|
xObjectDataApi: {
|
|
41
|
-
xObjectApiKey: '
|
|
42
|
-
fields: [
|
|
41
|
+
xObjectApiKey: 'contact',
|
|
42
|
+
fields: [
|
|
43
|
+
'entityType',
|
|
44
|
+
'contactName',
|
|
45
|
+
'accountId',
|
|
46
|
+
'depart',
|
|
47
|
+
'mobile',
|
|
48
|
+
'email',
|
|
49
|
+
'comment',
|
|
50
|
+
],
|
|
43
51
|
},
|
|
44
52
|
};
|
|
45
53
|
|
|
@@ -289,7 +289,7 @@ export default class EntityDetail extends React.PureComponent<
|
|
|
289
289
|
console.log('this.props:', this.props);
|
|
290
290
|
|
|
291
291
|
return (
|
|
292
|
-
<div className={
|
|
292
|
+
<div className={['entityDetail__c', className].filter(Boolean).join(' ')}>
|
|
293
293
|
{showTitle && (
|
|
294
294
|
<div className="detail-header">
|
|
295
295
|
<div className="header-content">
|
|
@@ -28,15 +28,26 @@
|
|
|
28
28
|
font-size: 18px;
|
|
29
29
|
font-weight: 500;
|
|
30
30
|
line-height: 1.4;
|
|
31
|
-
color: #
|
|
31
|
+
color: #434343;
|
|
32
32
|
flex: 1;
|
|
33
33
|
display: flex;
|
|
34
34
|
align-items: center;
|
|
35
35
|
gap: 8px;
|
|
36
36
|
|
|
37
|
+
&.ant-typography {
|
|
38
|
+
color: #434343;
|
|
39
|
+
}
|
|
40
|
+
|
|
37
41
|
.title-icon {
|
|
38
42
|
color: #1890ff;
|
|
39
43
|
font-size: 20px;
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
> span:not(.anticon):not(.ant-tag) {
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
white-space: nowrap;
|
|
40
51
|
}
|
|
41
52
|
}
|
|
42
53
|
|
|
@@ -56,12 +67,18 @@
|
|
|
56
67
|
|
|
57
68
|
&:active {
|
|
58
69
|
transform: translateY(0);
|
|
70
|
+
box-shadow: 0 1px 2px rgba(24, 144, 255, 0.2);
|
|
59
71
|
}
|
|
60
72
|
|
|
61
73
|
.anticon {
|
|
62
74
|
font-size: 12px;
|
|
63
75
|
}
|
|
64
76
|
}
|
|
77
|
+
|
|
78
|
+
.ant-divider {
|
|
79
|
+
margin: 12px 0;
|
|
80
|
+
border-color: #f0f0f0;
|
|
81
|
+
}
|
|
65
82
|
}
|
|
66
83
|
|
|
67
84
|
.detail-content {
|
|
@@ -69,6 +86,26 @@
|
|
|
69
86
|
overflow-y: auto;
|
|
70
87
|
overflow-x: hidden;
|
|
71
88
|
|
|
89
|
+
&::-webkit-scrollbar {
|
|
90
|
+
width: 6px;
|
|
91
|
+
height: 6px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&::-webkit-scrollbar-track {
|
|
95
|
+
background: #f0f0f0;
|
|
96
|
+
border-radius: 3px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&::-webkit-scrollbar-thumb {
|
|
100
|
+
background: #bfbfbf;
|
|
101
|
+
border-radius: 3px;
|
|
102
|
+
transition: background 0.3s;
|
|
103
|
+
|
|
104
|
+
&:hover {
|
|
105
|
+
background: #8c8c8c;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
72
109
|
.error-container {
|
|
73
110
|
display: flex;
|
|
74
111
|
justify-content: center;
|
|
@@ -81,6 +118,7 @@
|
|
|
81
118
|
height: 100%;
|
|
82
119
|
background: #fafafa;
|
|
83
120
|
border-radius: 8px;
|
|
121
|
+
border: 1px solid #f0f0f0;
|
|
84
122
|
|
|
85
123
|
.ant-card-body {
|
|
86
124
|
padding: 0;
|
|
@@ -97,6 +135,8 @@
|
|
|
97
135
|
font-size: 14px;
|
|
98
136
|
padding: 12px 16px;
|
|
99
137
|
border-right: 1px solid #e8e8e8;
|
|
138
|
+
width: 35%;
|
|
139
|
+
vertical-align: middle;
|
|
100
140
|
}
|
|
101
141
|
|
|
102
142
|
.ant-descriptions-item-content {
|
|
@@ -105,6 +145,7 @@
|
|
|
105
145
|
font-size: 14px;
|
|
106
146
|
padding: 12px 16px;
|
|
107
147
|
word-break: break-word;
|
|
148
|
+
vertical-align: middle;
|
|
108
149
|
}
|
|
109
150
|
|
|
110
151
|
.ant-descriptions-row {
|
|
@@ -119,7 +160,6 @@
|
|
|
119
160
|
}
|
|
120
161
|
}
|
|
121
162
|
|
|
122
|
-
// 空状态样式
|
|
123
163
|
.ant-empty {
|
|
124
164
|
padding: 60px 20px;
|
|
125
165
|
|
|
@@ -129,7 +169,14 @@
|
|
|
129
169
|
}
|
|
130
170
|
}
|
|
131
171
|
|
|
132
|
-
|
|
172
|
+
.ant-spin-nested-loading {
|
|
173
|
+
min-height: 200px;
|
|
174
|
+
|
|
175
|
+
> div > .ant-spin {
|
|
176
|
+
max-height: none;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
133
180
|
.ant-tag {
|
|
134
181
|
margin: 0;
|
|
135
182
|
border-radius: 4px;
|
|
@@ -138,7 +185,6 @@
|
|
|
138
185
|
line-height: 20px;
|
|
139
186
|
}
|
|
140
187
|
|
|
141
|
-
// 链接样式
|
|
142
188
|
a {
|
|
143
189
|
color: #1890ff;
|
|
144
190
|
text-decoration: none;
|
|
@@ -154,7 +200,6 @@
|
|
|
154
200
|
}
|
|
155
201
|
}
|
|
156
202
|
|
|
157
|
-
// 响应式设计
|
|
158
203
|
@media (max-width: 1200px) {
|
|
159
204
|
.detail-content {
|
|
160
205
|
.ant-col-md-8 {
|
|
@@ -234,6 +279,7 @@
|
|
|
234
279
|
|
|
235
280
|
.refresh-button {
|
|
236
281
|
width: 100%;
|
|
282
|
+
justify-content: center;
|
|
237
283
|
}
|
|
238
284
|
}
|
|
239
285
|
|
|
@@ -256,37 +302,3 @@
|
|
|
256
302
|
}
|
|
257
303
|
}
|
|
258
304
|
}
|
|
259
|
-
|
|
260
|
-
// 加载状态样式
|
|
261
|
-
.ant-spin-container {
|
|
262
|
-
min-height: 200px;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.ant-spin-nested-loading {
|
|
266
|
-
> div > .ant-spin {
|
|
267
|
-
max-height: none;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
// 自定义滚动条样式
|
|
272
|
-
.entityDetail__c .detail-content {
|
|
273
|
-
&::-webkit-scrollbar {
|
|
274
|
-
width: 6px;
|
|
275
|
-
height: 6px;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
&::-webkit-scrollbar-track {
|
|
279
|
-
background: #f0f0f0;
|
|
280
|
-
border-radius: 3px;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
&::-webkit-scrollbar-thumb {
|
|
284
|
-
background: #bfbfbf;
|
|
285
|
-
border-radius: 3px;
|
|
286
|
-
transition: background 0.3s;
|
|
287
|
-
|
|
288
|
-
&:hover {
|
|
289
|
-
background: #8c8c8c;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|