@wavemaker/angular-codegen 11.1.0-next.24316 → 11.1.0-next.24319
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.
- angular-codegen/angular-app/angular.json +2 -2
- angular-codegen/angular-app/package-lock.json +3 -3
- angular-codegen/angular-app/package.json +2 -2
- angular-codegen/angular-app/src/assets/styles/css/wm-style.css +1 -1
- angular-codegen/dependencies/transpilation-mobile.cjs.js +1 -1
- angular-codegen/dependencies/transpilation-web.cjs.js +1 -1
- angular-codegen/package.json +1 -1
- angular-codegen/src/pages-util.js +1 -1
- angular-codegen/src/update-angular-json.js +1 -1
|
@@ -47093,7 +47093,7 @@ register('wm-partial', () => {
|
|
|
47093
47093
|
node.children.length = 0;
|
|
47094
47094
|
node.children.push(conditionalNode);
|
|
47095
47095
|
},
|
|
47096
|
-
pre: attrs => `<${tagName$c} wmPartial data-role="partial"
|
|
47096
|
+
pre: attrs => `<${tagName$c} wmPartial data-role="partial" ${getAttrMarkup(attrs)}>`,
|
|
47097
47097
|
post: () => `</${tagName$c}>`
|
|
47098
47098
|
};
|
|
47099
47099
|
});
|
|
@@ -47093,7 +47093,7 @@ register('wm-partial', () => {
|
|
|
47093
47093
|
node.children.length = 0;
|
|
47094
47094
|
node.children.push(conditionalNode);
|
|
47095
47095
|
},
|
|
47096
|
-
pre: attrs => `<${tagName$c} wmPartial data-role="partial"
|
|
47096
|
+
pre: attrs => `<${tagName$c} wmPartial data-role="partial" ${getAttrMarkup(attrs)}>`,
|
|
47097
47097
|
post: () => `</${tagName$c}>`
|
|
47098
47098
|
};
|
|
47099
47099
|
});
|
angular-codegen/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
global.$=require("jquery"),global._=require("lodash"),global._WM_APP_PROPERTIES={};const cheerio=require("cheerio"),{generatePageExpressions:generatePageExpressions}=require("./expr-parser-utils"),{readFile:readFile,isMobileProject:isMobileProject}=require("./wm-utils"),nodePolyfill=require("node-window-polyfill").register(!1),getRequiredScripts=e=>{const r={wmCalendar:["./node_modules/fullcalendar/
|
|
1
|
+
global.$=require("jquery"),global._=require("lodash"),global._WM_APP_PROPERTIES={};const cheerio=require("cheerio"),{generatePageExpressions:generatePageExpressions}=require("./expr-parser-utils"),{readFile:readFile,isMobileProject:isMobileProject}=require("./wm-utils"),nodePolyfill=require("node-window-polyfill").register(!1),getRequiredScripts=e=>{const r={wmCalendar:["./node_modules/fullcalendar/main.min.js"],wmChart:["./node_modules/d3/d3.min.js","./node_modules/@wavemaker.com/nvd3/build/nv.d3.min.js"],wmChips:["./node_modules/jquery-ui/ui/widgets/sortable.js"],wmList:["./node_modules/jquery-ui/ui/widgets/droppable.js","./node_modules/jquery-ui/ui/widgets/sortable.js"],wmRichtexteditor:["./node_modules/summernote/dist/summernote-lite.min.js"],wmTable:[global._WM_PACKAGE_PATH+"/scripts/datatable/datatable.js","./node_modules/jquery-ui/ui/widgets/resizable.js"]};let t=[];return _.each(r,(r,i)=>{e("["+i+"]").length>0&&(t=t.concat(r))}),t=t.map(e=>e.replace(/^(\.\/)/,"").replace(/\//g,"-")),_.uniq(t)},includesCustomElement=e=>{return cheerio.load(e)('[html-custom-element="true"]').length},getPageContents=async(e,r,t,i,s,o,l)=>{try{const a=`${r}/${t}`,n=await readFile(`${a}.html`,"utf8"),u=await readFile(`${a}.js`,"utf8"),d=await readFile(`${a}.css`,"utf8"),m=await readFile(`${a}.variables.json`,"utf8");let p;global._WM_APP_PROPERTIES=e,window=window||{},window._WM_APP_PROPERTIES=e;const c=(p=isMobileProject(e)?require("../dependencies/transpilation-mobile.cjs"):require("../dependencies/transpilation-web.cjs")).transpile(n),g=cheerio.load(c.markup),w=getRequiredScripts(g);return w.length>0&&(c.markup=c.markup.replace(">",` scripts-to-load="${w.join(",")}">`)),{markup:c.markup,script:u,styles:p.scopeComponentStyles(i,s,d),variables:m,expressions:l?generatePageExpressions(c.markup,m,o):"",requiredWMComponents:c.requiredWMComponents.filter(r=>!r.platformType||r.platformType===e.platformType),hasCustomElement:includesCustomElement(n)}}catch(e){throw console.error(`error occurred in transpilation of ${t}`,e),e}};module.exports={getPageContents:getPageContents};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject}=require("./wm-utils"),markScriptsAsLazy=e=>{const s=["./node_modules/d3/d3.min.js","./node_modules/@wavemaker.com/nvd3/build/nv.d3.min.js","./node_modules/fullcalendar/
|
|
1
|
+
const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject}=require("./wm-utils"),markScriptsAsLazy=e=>{const s=["./node_modules/d3/d3.min.js","./node_modules/@wavemaker.com/nvd3/build/nv.d3.min.js","./node_modules/fullcalendar/main.min.js","./node_modules/summernote/dist/summernote-lite.min.js",global._WM_PACKAGE_PATH+"/scripts/datatable/datatable.js","./node_modules/jquery-ui/ui/widgets/sortable.js","./node_modules/jquery-ui/ui/widgets/droppable.js","./node_modules/jquery-ui/ui/widgets/resizable.js","./node_modules/hammerjs/hammer.min.js","./node_modules/iscroll/build/iscroll.js"];let t=e.replace(/^(\.\/)/,"").replace(/\//g,"-");return t=t.substring(0,t.lastIndexOf(".")),t+="-NOHASH",s.includes(e)?{input:e,inject:!1,bundleName:t}:e},setBuildCustomizations=async e=>{const s=e.projects["angular-app"].architect.build,t=s.options.scripts;s.options.scripts=t.map(e=>markScriptsAsLazy(e))},addToScripts=async(e,s,t=[],i=[])=>{const n=`${s}/angular.json`;let o=readFileSync(n,!0);const a=o.projects["angular-app"].architect.build;let r=a.options.scripts;const l=`${s+"/src/app/extensions"}`,c=await readDir(l);c.length&&i.push("./src/app/extensions/"+c[0]),a.options.scripts=[...t,...r,...i],await writeFile(n,JSON.stringify(o,null,4))},updateAngularJSON=async(e,s,t,i,n,o,a,r,l)=>{const c=`${s}/angular.json`;let d=readFileSync(c,!0);const u=d.projects["angular-app"].architect.build;o&&o.trim().length>0&&(u.options.deployUrl=o);const p=u.options.styles;if(isMobileProject(t)){const e=p.findIndex(e=>{let s="object"==typeof e;if(s){return(s?e.input:e).includes("themes")}return!1}),s=p[e].input;p[e].bundleName="wm-android-styles",p[e].input=p[e].input.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/android/style.css`);const i=Object.assign({},p[e]);i.input=s.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/ios/style.css`),i.bundleName="wm-ios-styles",p.push(i);const n=p.findIndex(e=>{let s="object"==typeof e;if(s){return"src/assets/app.css"===(s?e.input:e)}return!1});p[n].bundleName="wm-android-styles";const o=Object.assign({},p[n]);o.bundleName="wm-ios-styles",p.push(o)}p.forEach((e,s)=>{let i="object"==typeof e,n=i?e.input:e;!n.includes("themes")||n.includes("/android/")||n.includes("/ios/")||(i?p[s].input=n.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/style.css`):p[s]=n.replace(new RegExp("/[a-z]*/style.css$"),`/${t.activeTheme}/style.css`))}),await setBuildCustomizations(d);const m=u.configurations.production;if(m.aot=!1!==a.aot,m.buildOptimizer=!1!==a.buildOptimizer,l){const e=u.options.assets;e.push("src/manifest.json"),e.push("src/wmsw-worker.js"),m.serviceWorker=!0,m.ngswConfigPath="ngsw-config.json",delete u.options.customWebpackConfig}await writeFile(c,JSON.stringify(d,null,4))};module.exports={updateAngularJSON:updateAngularJSON,addToScripts:addToScripts};
|