@magic-xpa/cli 4.900.0-dev490.25 → 4.900.0-dev490.250

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-xpa/cli",
3
- "version": "4.900.0-dev490.25",
3
+ "version": "4.900.0-dev490.250",
4
4
  "license": "SEE LICENSE IN EULA.pdf",
5
5
  "description": "Magic CLI for MagicWeb applications",
6
6
  "keywords": [
@@ -24,9 +24,10 @@ exports.dependencies = [
24
24
  { name: "font-awesome", version: '^4.7.0' },
25
25
  { name: "hammerjs", version: '^2.0.8' },
26
26
  { name: "ngx-infinite-scroll", version: '^10.0.0' },
27
- { name: "ng-dynamic-component", version: '^10.0.0' },
27
+ { name: "ng-dynamic-component", version: '~10.1.0' },
28
28
  { name: "rxjs-compat", version: "^6.6.0" },
29
- { name: "ngx-currency", version: "^2.5.2" }
29
+ { name: "ngx-currency", version: "^2.5.2" },
30
+ { name: "ngx-mask", version: "^13.1.15" }
30
31
  ];
31
32
  exports.devDependencies = [
32
33
  { name: "@types/stacktrace-js", version: '^0.0.32' }
@@ -1 +1 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["env.ts"],"names":[],"mappings":";;;AAKa,QAAA,YAAY,GAAW,gBAAgB,CAAC;AACxC,QAAA,oBAAoB,GAAG,oBAAoB,CAAC;AAC5C,QAAA,mBAAmB,GAAI,kBAAkB,CAAC;AAC1C,QAAA,UAAU,GAAa,OAAO,CAAC;AAC/B,QAAA,gBAAgB,GAAO,+BAA+B,CAAC;AACvD,QAAA,2BAA2B,GAAI,oBAAoB,CAAC;AACpD,QAAA,aAAa,GAAI,KAAK,oBAAY,gBAAgB,CAAC;AACnD,QAAA,WAAW,GAAM,KAAK,oBAAY,cAAc,CAAC;AAE9D,MAAa,aAAa;IACxB,YAAY,OAAc,EAAE,UAAiB;QAC3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;IAC5B,CAAC;CAGF;AAPD,sCAOC;AAEU,QAAA,YAAY,GAAG;IAExB,wBAAwB;IACxB,EAAC,IAAI,EAAE,mBAAmB,EAAI,OAAO,EAAE,SAAS,EAAC;IACjD,EAAC,IAAI,EAAE,cAAc,EAAS,OAAO,EAAE,SAAS,EAAC;IACjD,EAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,SAAS,EAAC;IACjD,EAAC,IAAI,EAAE,cAAc,EAAS,OAAO,EAAE,QAAQ,EAAC;IAChD,EAAC,IAAI,EAAE,UAAU,EAAa,OAAO,EAAE,QAAQ,EAAC;IAEhD,EAAC,IAAI,EAAE,qBAAqB,EAAG,OAAO,EAAE,SAAS,EAAC;IAClD,EAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,SAAS,EAAC;IAClD,EAAC,IAAI,EAAE,aAAa,EAAW,OAAO,EAAE,QAAQ,EAAC;IACjD,EAAC,IAAI,EAAE,cAAc,EAAU,OAAO,EAAE,QAAQ,EAAC;CAClD,CAAC;AAEW,QAAA,eAAe,GAAG;IAC7B,EAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,SAAS,EAAC;CACnD,CAAC;AACW,QAAA,GAAG,GAAU,EAAS,CAAC","sourcesContent":["// TODO(PK): hard-code for now, will query npm repo\n// to get this info in the future\nimport { MagicMetadata } from \"./metadata.class\";\nimport { IEnv } from \"../../types/interfaces/env.interface\";\n\nexport const METADATA_DIR = `magic-metadata`;\nexport const GEN_COMPONENTS_ARRAY = 'magicGenComponents';\nexport const GEN_COMPONENTS_HASH = 'magicGenCmpsHash';\nexport const GEN_FOLDER = 'magic';\nexport const MAGIC_CLI_FOLDER = './node_modules/@magic-xpa/cli';\nexport const GEN_LAZY_LOAD_MODULES_ARRAY = 'LazyLoadModulesMap';\nexport const manifest_path = `./${METADATA_DIR}/manifest.json`;\nexport const config_path = `./${METADATA_DIR}/config.json`;\n\nexport class Idependencies {\n constructor(setName:string, setVersion:string){\n this.name = setName;\n this.version = setVersion;\n }\n name:string;\n version:string;\n}\n\nexport var dependencies = [\n\n // material dependencies\n {name: \"@angular/material\" , version: '^13.0.0'},\n {name: \"@angular/cdk\" , version: '^13.0.0'},\n {name: \"@angular/animations\", version: '^13.0.0'},\n {name: \"font-awesome\" , version: '^4.7.0'},\n {name: \"hammerjs\" , version: '^2.0.8'},\n\n {name: \"ngx-infinite-scroll\" , version: '^10.0.0'},\n {name: \"ng-dynamic-component\", version: '^10.0.0'},\n {name: \"rxjs-compat\" , version: \"^6.6.0\"},\n {name: \"ngx-currency\" , version: \"^2.5.2\"}\n];\n\nexport const devDependencies = [\n {name: \"@types/stacktrace-js\", version: '^0.0.32'}\n];\nexport const env : IEnv = {} as any;\n\n"]}
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["env.ts"],"names":[],"mappings":";;;AAKa,QAAA,YAAY,GAAW,gBAAgB,CAAC;AACxC,QAAA,oBAAoB,GAAG,oBAAoB,CAAC;AAC5C,QAAA,mBAAmB,GAAI,kBAAkB,CAAC;AAC1C,QAAA,UAAU,GAAa,OAAO,CAAC;AAC/B,QAAA,gBAAgB,GAAO,+BAA+B,CAAC;AACvD,QAAA,2BAA2B,GAAI,oBAAoB,CAAC;AACpD,QAAA,aAAa,GAAI,KAAK,oBAAY,gBAAgB,CAAC;AACnD,QAAA,WAAW,GAAM,KAAK,oBAAY,cAAc,CAAC;AAE9D,MAAa,aAAa;IACxB,YAAY,OAAc,EAAE,UAAiB;QAC3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;IAC5B,CAAC;CAGF;AAPD,sCAOC;AAEU,QAAA,YAAY,GAAG;IAExB,wBAAwB;IACxB,EAAC,IAAI,EAAE,mBAAmB,EAAI,OAAO,EAAE,SAAS,EAAC;IACjD,EAAC,IAAI,EAAE,cAAc,EAAS,OAAO,EAAE,SAAS,EAAC;IACjD,EAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,SAAS,EAAC;IACjD,EAAC,IAAI,EAAE,cAAc,EAAS,OAAO,EAAE,QAAQ,EAAC;IAChD,EAAC,IAAI,EAAE,UAAU,EAAa,OAAO,EAAE,QAAQ,EAAC;IAEhD,EAAC,IAAI,EAAE,qBAAqB,EAAG,OAAO,EAAE,SAAS,EAAC;IAClD,EAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,SAAS,EAAC;IAClD,EAAC,IAAI,EAAE,aAAa,EAAW,OAAO,EAAE,QAAQ,EAAC;IACjD,EAAC,IAAI,EAAE,cAAc,EAAU,OAAO,EAAE,QAAQ,EAAC;IACjD,EAAC,IAAI,EAAE,UAAU,EAAc,OAAO,EAAE,UAAU,EAAC;CACpD,CAAC;AAEW,QAAA,eAAe,GAAG;IAC7B,EAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,SAAS,EAAC;CACnD,CAAC;AACW,QAAA,GAAG,GAAU,EAAS,CAAC","sourcesContent":["// TODO(PK): hard-code for now, will query npm repo\n// to get this info in the future\nimport { MagicMetadata } from \"./metadata.class\";\nimport { IEnv } from \"../../types/interfaces/env.interface\";\n\nexport const METADATA_DIR = `magic-metadata`;\nexport const GEN_COMPONENTS_ARRAY = 'magicGenComponents';\nexport const GEN_COMPONENTS_HASH = 'magicGenCmpsHash';\nexport const GEN_FOLDER = 'magic';\nexport const MAGIC_CLI_FOLDER = './node_modules/@magic-xpa/cli';\nexport const GEN_LAZY_LOAD_MODULES_ARRAY = 'LazyLoadModulesMap';\nexport const manifest_path = `./${METADATA_DIR}/manifest.json`;\nexport const config_path = `./${METADATA_DIR}/config.json`;\n\nexport class Idependencies {\n constructor(setName:string, setVersion:string){\n this.name = setName;\n this.version = setVersion;\n }\n name:string;\n version:string;\n}\n\nexport var dependencies = [\n\n // material dependencies\n {name: \"@angular/material\" , version: '^13.0.0'},\n {name: \"@angular/cdk\" , version: '^13.0.0'},\n {name: \"@angular/animations\", version: '^13.0.0'},\n {name: \"font-awesome\" , version: '^4.7.0'},\n {name: \"hammerjs\" , version: '^2.0.8'},\n\n {name: \"ngx-infinite-scroll\" , version: '^10.0.0'},\n {name: \"ng-dynamic-component\", version: '~10.1.0'},\n {name: \"rxjs-compat\" , version: \"^6.6.0\"},\n {name: \"ngx-currency\" , version: \"^2.5.2\"},\n {name: \"ngx-mask\" , version: \"^13.1.15\"}\n];\n\nexport const devDependencies = [\n {name: \"@types/stacktrace-js\", version: '^0.0.32'}\n];\nexport const env : IEnv = {} as any;\n\n"]}
@@ -31,9 +31,10 @@ export var dependencies = [
31
31
  {name: "hammerjs" , version: '^2.0.8'},
32
32
 
33
33
  {name: "ngx-infinite-scroll" , version: '^10.0.0'},
34
- {name: "ng-dynamic-component", version: '^10.0.0'},
34
+ {name: "ng-dynamic-component", version: '~10.1.0'},
35
35
  {name: "rxjs-compat" , version: "^6.6.0"},
36
- {name: "ngx-currency" , version: "^2.5.2"}
36
+ {name: "ngx-currency" , version: "^2.5.2"},
37
+ {name: "ngx-mask" , version: "^13.1.15"}
37
38
  ];
38
39
 
39
40
  export const devDependencies = [
@@ -4,9 +4,6 @@ exports.MagicMetadata = exports.MagicPaths = void 0;
4
4
  const env_1 = require("./env");
5
5
  const utils_1 = require("./utils");
6
6
  class MagicPaths {
7
- constructor(project) {
8
- this.project = project;
9
- }
10
7
  // return the current module path
11
8
  // for example : for module "WebModule1" it returns 'src/app/magic/WebModule1'
12
9
  currentModulePath(module_name) {
@@ -71,15 +68,12 @@ class MagicPaths {
71
68
  get manifestPath() { return `./${this.project.root}/${env_1.METADATA_DIR}/manifest.json`; }
72
69
  get configPath() { return `./${this.project.root}/${env_1.METADATA_DIR}/config.json`; }
73
70
  get routesPath() { return `./${this.project.root}/${env_1.METADATA_DIR}/routes.json`; }
71
+ constructor(project) {
72
+ this.project = project;
73
+ }
74
74
  }
75
75
  exports.MagicPaths = MagicPaths;
76
76
  class MagicMetadata {
77
- constructor(host, context, options) {
78
- this.host = host;
79
- this.context = context;
80
- this.options = options;
81
- this.paths = new MagicPaths((0, utils_1.getProject)(host, options.project));
82
- }
83
77
  get theme() {
84
78
  if (!this.options.theme) {
85
79
  this.options.theme = env_1.env.metadata.config ? env_1.env.metadata.config.theme : 'basicHTML';
@@ -102,6 +96,12 @@ class MagicMetadata {
102
96
  return this._routesTable;
103
97
  return this.loadRoutes();
104
98
  }
99
+ constructor(host, context, options) {
100
+ this.host = host;
101
+ this.context = context;
102
+ this.options = options;
103
+ this.paths = new MagicPaths((0, utils_1.getProject)(host, options.project));
104
+ }
105
105
  loadConfig() {
106
106
  this._config = (0, utils_1.readJson)(this.host, this.paths.configPath);
107
107
  return this._config;
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.class.js","sourceRoot":"","sources":["metadata.class.ts"],"names":[],"mappings":";;;AAIA,+BAAsD;AAEtD,mCAA+C;AAG/C,MAAa,UAAU;IAuFrB,YAAsB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IACrC,CAAC;IAtFD,iCAAiC;IACjC,8EAA8E;IAC/E,iBAAiB,CAAC,WAAkB;QACjC,IAAI,WAAW,KAAK,EAAE,EAAE;YACtB,OAAO,GAAG,IAAI,CAAC,kBAAkB,IAAI,gBAAU,IAAI,WAAW,EAAE,CAAC;SAClE;QAED,OAAO,GAAG,IAAI,CAAC,kBAAkB,IAAI,gBAAU,EAAE,CAAC;IAGpD,CAAC;IAED,uDAAuD;IACvD,kHAAkH;IAClH,uBAAuB,CAAC,WAAkB,EAAE,aAAoB;QAC5D,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,IAAI,aAAa,EAAE,CAAC;IACrE,CAAC;IAED,uBAAuB,CAAC,WAAkB;QACxC,OAAO,GAAG,IAAI,CAAC,kBAAkB,IAAI,WAAW,OAAO,CAAC;IAC1D,CAAC;IAED,mCAAmC,CAAC,WAAkB,EAAE,WAAkB;QACxE,IAAI,gCAAgC,G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ACD,IAAI,WAAW;QACb,IAAI,IAAI,CAAC,YAAY;YAAE,OAAO,IAAI,CAAC,YAAY,CAAC;QAChD,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAMD,UAAU;QACR,IAAI,CAAC,OAAO,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,UAAU;QACR,IAAI,CAAC,YAAY,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;CACF;AAzCD,sCAyCC","sourcesContent":["import { SchematicContext, Tree } from \"@angular-devkit/schematics\";\nimport { AppConfig, ComponentId, Route, RouteTable } from \"../../types/interfaces/app\";\nimport { MagicOptionScheme } from \"./rules/magic-option.scheme\";\nimport { Project } from \"../utils/devkit-utils/config\";\nimport { env, GEN_FOLDER, METADATA_DIR } from \"./env\";\nimport { Manifest } from \"./manifest\";\nimport { getProject, readJson } from \"./utils\";\n\n\nexport class MagicPaths {\n\n // return the current module path\n // for example : for module \"WebModule1\" it returns 'src/app/magic/WebModule1'\n currentModulePath(module_name:string) {\n if (module_name !== \"\") {\n return `${this.rootMagicGenFolder}/${GEN_FOLDER}/${module_name}`;\n }\n\n return `${this.rootMagicGenFolder}/${GEN_FOLDER}`;\n\n\n }\n\n // return the destanation path for create the component\n // for example : for module \"WebModule1\" component \"WebModule1/folder1/bb/cc/it returns 'src/app/magic/WebModule1'\n getDestPathForComponent(module_name:string, componentPath:string) {\n return `${this.currentModulePath(module_name)}/${componentPath}`;\n }\n\n getJsonPathForComponent(cmpJsonPath:string) {\n return `${this.metadataFolderPath}/${cmpJsonPath}.json`;\n }\n\n getRelativePathForComponentInModule(module_name:string, cmpJsonPath:string) {\n let relativePathForComponentInModule = `${cmpJsonPath}`;\n if (module_name !== \"\")\n relativePathForComponentInModule = `${module_name}/${cmpJsonPath}`;\n\n return relativePathForComponentInModule;\n }\n\n getRoutePathForWebModule(module_name:string) {\n\n if (module_name == \"\")\n return this.appRoutesPath;\n\n return `${this.rootMagicGenFolder}/${GEN_FOLDER}/${module_name}/app.routes.ts`;\n }\n get rootMagicGenFolder(){ return `./${this.project.root}/src/app`; }\n get appComponentPath(){ return `./${this.project.root}/src/app/app.component.html`}\n get appRoutesPath(){ return `./${this.project.root}/src/app/app.routes.ts`}\n get appModulePath(){ return `./${this.project.root}/src/app/app.module.ts`}\n get executionPath(){ return `./${this.project.root}/src/assets/execution.properties`}\n get magicStylePath(){ return `./${this.project.root}/src/magic-styles.css`}\n get angularJsonPath(){ return `./angular.json`}\n get tsConfigAppJsonPath(){ return `./${this.project.root}/tsconfig.app.json`}\n\n // get the relative path of module to be used in LazyLoadMap\n magicGenLibModulePath (moduleName){\n\n let rootPath = this.project.root == '' ? this.project.root: this.project.root + '/';\n let modulepath = rootPath+`src/app/${GEN_FOLDER}`;\n if (moduleName !== \"\") {\n return `${modulepath}/${moduleName}/magic.gen.lib.module`;\n }\n return `${modulepath}/magic.gen.lib.module`;\n }\n\n // Files under gen folder\n get magicGenFolderPath (){ return `./${this.project.root}/src/app/${GEN_FOLDER}`}\n\n componentListPathForCurrentModuleName (module_name:string):string{\n return `./${this.project.root}/src/app/${GEN_FOLDER}/${module_name}/component-list.g.ts`\n }\n componentListPath (module_name:string):string{\n\n if (module_name !== \"\"){\n return this.componentListPathForCurrentModuleName(module_name);\n }\n return this.rootMagicComponentListPath;\n }\n\n get rootMagicComponentListPath (){\n\n return `./${this.project.root}/src/app/${GEN_FOLDER}/component-list.g.ts`\n }\n\n get magicGenLibModule (){ return `./${this.project.root}/src/app/${GEN_FOLDER}/magic.gen.lib.module.ts`}\n\n get favIconPath(){ return `./${this.project.root}/src/favicon.ico`; }\n\n get metadataFolderPath(){ return `./${this.project.root}/${METADATA_DIR}`; }\n get manifestPath (){ return `./${this.project.root}/${METADATA_DIR}/manifest.json`; }\n get configPath (){ return `./${this.project.root}/${METADATA_DIR}/config.json`; }\n get routesPath (){ return `./${this.project.root}/${METADATA_DIR}/routes.json`; }\n\n constructor(protected project:Project){\n }\n}\n\n\nexport class MagicMetadata {\n\n private _config: AppConfig;\n private _routesTable: RouteTable[];\n\n paths: MagicPaths;\n\n get theme() {\n if (!this.options.theme) {\n this.options.theme = env.metadata.config ?env.metadata.config.theme : 'basicHTML';\n }\n return this.options.theme;\n }\n\n get allow_testing() {\n if (!this.options.allowTesting) {\n this.options.allowTesting = env.metadata.config ?env.metadata.config.allow_testing: false;\n }\n return this.options.allowTesting;\n }\n get config() {\n if (this._config) return this._config;\n return this.loadConfig();\n }\n get routesTable(){\n if (this._routesTable) return this._routesTable;\n return this.loadRoutes();\n }\n\n constructor(public host: Tree, public context: SchematicContext, public options: MagicOptionScheme) {\n this.paths = new MagicPaths(getProject(host, options.project));\n }\n\n loadConfig() {\n this._config = readJson(this.host, this.paths.configPath);\n return this._config;\n }\n loadRoutes() {\n this._routesTable = readJson(this.host, this.paths.routesPath);\n return this._routesTable;\n }\n}\n\n\n"]}
1
+ {"version":3,"file":"metadata.class.js","sourceRoot":"","sources":["metadata.class.ts"],"names":[],"mappings":";;;AAIA,+BAAsD;AAEtD,mCAA+C;AAG/C,MAAa,UAAU;IAErB,iCAAiC;IACjC,8EAA8E;IAC/E,iBAAiB,CAAC,WAAkB;QACjC,IAAI,WAAW,KAAK,EAAE,EAAE;YACtB,OAAO,GAAG,IAAI,CAAC,kBAAkB,IAAI,gBAAU,IAAI,WAAW,EAAE,CAAC;SAClE;QAED,OAAO,GAAG,IAAI,CAAC,kBAAkB,IAAI,gBAAU,EAAE,CAAC;IAGpD,CAAC;IAED,uDAAuD;IACvD,kHAAkH;IAClH,uBAAuB,CAAC,WAAkB,EAAE,aAAoB;QAC5D,OAAO,GAAG,IAAI,CAAC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C;IAC3B,CAAC;IACD,IAAI,WAAW;QACb,IAAI,IAAI,CAAC,YAAY;YAAE,OAAO,IAAI,CAAC,YAAY,CAAC;QAChD,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAED,YAAmB,IAAU,EAAS,OAAyB,EAAS,OAA0B;QAA/E,SAAI,GAAJ,IAAI,CAAM;QAAS,YAAO,GAAP,OAAO,CAAkB;QAAS,YAAO,GAAP,OAAO,CAAmB;QAChG,IAAI,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,IAAA,kBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,UAAU;QACR,IAAI,CAAC,OAAO,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,UAAU;QACR,IAAI,CAAC,YAAY,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;CACF;AAzCD,sCAyCC","sourcesContent":["import { SchematicContext, Tree } from \"@angular-devkit/schematics\";\nimport { AppConfig, ComponentId, Route, RouteTable } from \"../../types/interfaces/app\";\nimport { MagicOptionScheme } from \"./rules/magic-option.scheme\";\nimport { Project } from \"../utils/devkit-utils/config\";\nimport { env, GEN_FOLDER, METADATA_DIR } from \"./env\";\nimport { Manifest } from \"./manifest\";\nimport { getProject, readJson } from \"./utils\";\n\n\nexport class MagicPaths {\n\n // return the current module path\n // for example : for module \"WebModule1\" it returns 'src/app/magic/WebModule1'\n currentModulePath(module_name:string) {\n if (module_name !== \"\") {\n return `${this.rootMagicGenFolder}/${GEN_FOLDER}/${module_name}`;\n }\n\n return `${this.rootMagicGenFolder}/${GEN_FOLDER}`;\n\n\n }\n\n // return the destanation path for create the component\n // for example : for module \"WebModule1\" component \"WebModule1/folder1/bb/cc/it returns 'src/app/magic/WebModule1'\n getDestPathForComponent(module_name:string, componentPath:string) {\n return `${this.currentModulePath(module_name)}/${componentPath}`;\n }\n\n getJsonPathForComponent(cmpJsonPath:string) {\n return `${this.metadataFolderPath}/${cmpJsonPath}.json`;\n }\n\n getRelativePathForComponentInModule(module_name:string, cmpJsonPath:string) {\n let relativePathForComponentInModule = `${cmpJsonPath}`;\n if (module_name !== \"\")\n relativePathForComponentInModule = `${module_name}/${cmpJsonPath}`;\n\n return relativePathForComponentInModule;\n }\n\n getRoutePathForWebModule(module_name:string) {\n\n if (module_name == \"\")\n return this.appRoutesPath;\n\n return `${this.rootMagicGenFolder}/${GEN_FOLDER}/${module_name}/app.routes.ts`;\n }\n get rootMagicGenFolder(){ return `./${this.project.root}/src/app`; }\n get appComponentPath(){ return `./${this.project.root}/src/app/app.component.html`}\n get appRoutesPath(){ return `./${this.project.root}/src/app/app.routes.ts`}\n get appModulePath(){ return `./${this.project.root}/src/app/app.module.ts`}\n get executionPath(){ return `./${this.project.root}/src/assets/execution.properties`}\n get magicStylePath(){ return `./${this.project.root}/src/magic-styles.css`}\n get angularJsonPath(){ return `./angular.json`}\n get tsConfigAppJsonPath(){ return `./${this.project.root}/tsconfig.app.json`}\n\n // get the relative path of module to be used in LazyLoadMap\n magicGenLibModulePath (moduleName){\n\n let rootPath = this.project.root == '' ? this.project.root: this.project.root + '/';\n let modulepath = rootPath+`src/app/${GEN_FOLDER}`;\n if (moduleName !== \"\") {\n return `${modulepath}/${moduleName}/magic.gen.lib.module`;\n }\n return `${modulepath}/magic.gen.lib.module`;\n }\n\n // Files under gen folder\n get magicGenFolderPath (){ return `./${this.project.root}/src/app/${GEN_FOLDER}`}\n\n componentListPathForCurrentModuleName (module_name:string):string{\n return `./${this.project.root}/src/app/${GEN_FOLDER}/${module_name}/component-list.g.ts`\n }\n componentListPath (module_name:string):string{\n\n if (module_name !== \"\"){\n return this.componentListPathForCurrentModuleName(module_name);\n }\n return this.rootMagicComponentListPath;\n }\n\n get rootMagicComponentListPath (){\n\n return `./${this.project.root}/src/app/${GEN_FOLDER}/component-list.g.ts`\n }\n\n get magicGenLibModule (){ return `./${this.project.root}/src/app/${GEN_FOLDER}/magic.gen.lib.module.ts`}\n\n get favIconPath(){ return `./${this.project.root}/src/favicon.ico`; }\n\n get metadataFolderPath(){ return `./${this.project.root}/${METADATA_DIR}`; }\n get manifestPath (){ return `./${this.project.root}/${METADATA_DIR}/manifest.json`; }\n get configPath (){ return `./${this.project.root}/${METADATA_DIR}/config.json`; }\n get routesPath (){ return `./${this.project.root}/${METADATA_DIR}/routes.json`; }\n\n constructor(protected project:Project){\n }\n}\n\n\nexport class MagicMetadata {\n\n private _config: AppConfig;\n private _routesTable: RouteTable[];\n\n paths: MagicPaths;\n\n get theme() {\n if (!this.options.theme) {\n this.options.theme = env.metadata.config ?env.metadata.config.theme : 'basicHTML';\n }\n return this.options.theme;\n }\n\n get allow_testing() {\n if (!this.options.allowTesting) {\n this.options.allowTesting = env.metadata.config ?env.metadata.config.allow_testing: false;\n }\n return this.options.allowTesting;\n }\n get config() {\n if (this._config) return this._config;\n return this.loadConfig();\n }\n get routesTable(){\n if (this._routesTable) return this._routesTable;\n return this.loadRoutes();\n }\n\n constructor(public host: Tree, public context: SchematicContext, public options: MagicOptionScheme) {\n this.paths = new MagicPaths(getProject(host, options.project));\n }\n\n loadConfig() {\n this._config = readJson(this.host, this.paths.configPath);\n return this._config;\n }\n loadRoutes() {\n this._routesTable = readJson(this.host, this.paths.routesPath);\n return this._routesTable;\n }\n}\n\n\n"]}
@@ -284,10 +284,12 @@ function addComponentsToArray(source, info, cmpsToAdd) {
284
284
  const prefix = source.substring(0, info.endPos);
285
285
  const suffix = source.substring(info.endPos);
286
286
  let toAdd = `${cmpsToAdd}`;
287
- toAdd = `${toAdd.replace(/,/g, ",\n")}`;
287
+ toAdd = `${toAdd.replace(/,/g, ",\n\t")}`;
288
288
  return info.isEmpty ?
289
- `${prefix} ${toAdd} ${suffix}` :
290
- `${prefix} ${toAdd} , ${suffix}`;
289
+ `${prefix}
290
+ \t${toAdd} ${suffix}` :
291
+ `${prefix}
292
+ \t${toAdd},${suffix}`;
291
293
  }
292
294
  function addComponentsToHash(source, info, cmpsToAdd) {
293
295
  const prefix = source.substring(0, info.endPos);
@@ -1 +1 @@
1
- {"version":3,"file":"component-list.rule.js","sourceRoot":"","sources":["component-list.rule.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,2BAA2B;AAC3B,2DAAoG;AACpG,gCAAmG;AAEnG,0CAAoF;AACpF,mDAAyC;AACzC,yCAA8C;AAC9C,sEAAiF;AAEjF,kEAA6D;AAC7D,kCAA8B;AAC9B,+BAAuC;AAGvC,IAAI,eAA4B,CAAC;AACjC,IAAI,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;AAC9B,IAAI,YAAY,GAAY,IAAI,CAAC;AACjC,IAAI,aAAa,GAAG,SAAG,CAAC,WAAW,CAAC;AAGpC,SAAgB,gBAAgB,CAAC,OAA0B,EAAE,WAAmB,EAAE,YAAqB;IACrG,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,IAAA,YAAK,EAAC,8BAA8B,CAAC,CAAC;QACtC,OAAO,IAAA,kBAAK,EAAC;YACX,2BAA2B,CAAC,OAAO,EAAE,WAAW,CAAC;YACjD,uBAAuB,CAAC,OAAO,EAAE,WAAW,CAAC;YAC7C,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC;YACzC,wBAAwB,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC;YAC5D,uBAAuB,CAAC,OAAO,CAAC;YAChC,sBAAsB,CAAC,OAAO,CAAC;SAChC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpB,CAAC,CAAA;AACH,CAAC;AAZD,4CAYC;AAED,gDAAgD;AAChD,SAAS,m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MAAc;IAClC,IAAI,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import * as ts from 'typescript';\r\nimport * as EJS from \"ejs\";\r\nimport {chain, Rule, SchematicContext, SchematicsException, Tree} from \"@angular-devkit/schematics\";\r\nimport {env, GEN_COMPONENTS_ARRAY, GEN_COMPONENTS_HASH, GEN_LAZY_LOAD_MODULES_ARRAY} from \"../env\";\r\nimport {MagicOptionScheme} from \"./magic-option.scheme\";\r\nimport {GeneratedFileTypes, TemplateConfig, View, WindowType} from \"../../../types\";\r\nimport {generate} from \"./generate.rule\";\r\nimport {getSourceFile} from \"../../utils/ast\";\r\nimport {insertImport, insertImport2} from \"../../utils/devkit-utils/route-utils\";\r\nimport {InsertChange} from \"../../utils/devkit-utils/change\";\r\nimport {findNodes} from \"../../utils/devkit-utils/ast-utils\";\r\nimport {LogLn} from \"../Util\";\r\nimport {isNullOrUndefined} from \"util\";\r\n\r\n\r\nlet existCmpListSet: Set<string>;\r\nlet newCmpListSet = new Set();\r\nlet toAddImports: boolean = true;\r\nlet orgPreventLog = env.prevent_log;\r\n\r\n\r\nexport function componentlistGen(options: MagicOptionScheme, module_name: string, loadOnDemand: boolean): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n LogLn(`[>] Step 4: components-list.`);\r\n return chain([\r\n addNewCmpsToCmpListOrGenAll(options, module_name),\r\n addCmpsImportsToCmpList(options, module_name),\r\n createLazyModuleMap(options, module_name),\r\n addLazyLoadComponentList(options, module_name, loadOnDemand),\r\n addLazyModuleToMagicGen(options),\r\n addImportForLazyModule(options)\r\n ])(host, context);\r\n }\r\n}\r\n\r\n// create the lazy load map if it does not exist\r\nfunction createLazyModuleMap(options: MagicOptionScheme, module_name: string) {\r\n return (host: Tree, context: SchematicContext) => {\r\n const cmpListPath = env.metadata.paths.componentListPath(\"\");\r\n env.prevent_log = false;\r\n const source = host.read(cmpListPath).toString(\"utf-8\")\r\n\r\n const LazyModuleArrayStart = 'export const ' + GEN_LAZY_LOAD_MODULES_ARRAY + ' = {';\r\n const LazyMOduleArrayEnd = '};';\r\n // create lazy load component array if it does not exist\r\n if (source.indexOf(LazyModuleArrayStart) < 0) {\r\n LogLn(`[>] Creating LazyLoadModulesMap `);\r\n // add the code of creating map in file\r\n host.overwrite(cmpListPath, source + \"\\r\\n\" + LazyModuleArrayStart + LazyMOduleArrayEnd);\r\n }\r\n\r\n }\r\n}\r\n\r\n// add the lazy load components\r\nfunction addLazyLoadComponentList(options: MagicOptionScheme, module_name: string, loadOnDemand: boolean): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n if (loadOnDemand) {\r\n let lazyLoadedComponents: Array<View> = new Array<View>();\r\n const cmpListPath = env.metadata.paths.componentListPath(\"\");\r\n\r\n const source = host.read(cmpListPath);\r\n if (source) {\r\n let cmpListSource = getSourceFile(host, cmpListPath);\r\n\r\n let cmpListTs = getLazyLoadCompoenentsInfo(cmpListSource, GEN_LAZY_LOAD_MODULES_ARRAY);\r\n let sourceStep1 = host.read(cmpListPath).toString(\"utf-8\");\r\n\r\n env.app.views.forEach(view => {\r\n if( isNullOrUndefined(cmpListTs.components) || !(cmpListTs.components.includes(view.props.component_uniquename))) {\r\n lazyLoadedComponents.push(view); // if component does not exist add it to list\r\n LogLn(`[>] Add ${view.props.component_uniquename} component to LazyLoadModulesMap`, );\r\n }\r\n });\r\n\r\n // add components to map\r\n if (lazyLoadedComponents.length > 0) {\r\n let sourceStep2 = addComponentsToLazyLoad(sourceStep1, cmpListTs, lazyLoadedComponents, module_name);\r\n host.overwrite(cmpListPath, sourceStep2);\r\n }\r\n }\r\n env.prevent_log = orgPreventLog;\r\n }\r\n return host;\r\n }\r\n}\r\n\r\nfunction addImportForLazyModule(options) {\r\n return (tree: Tree, context: SchematicContext) => {\r\n\r\n let genLibPath= env.metadata.paths.rootMagicGenFolder + '/magic/magic.gen.lib.module.ts';\r\n const recorder = tree.beginUpdate(genLibPath);\r\n let genLibSource = getSourceFile(tree, genLibPath);\r\n\r\n const importChange = insertImport(genLibSource, genLibPath, GEN_LAZY_LOAD_MODULES_ARRAY, './component-list.g') as InsertChange;\r\n if (importChange.toAdd) {\r\n recorder.insertLeft(importChange.pos, importChange.toAdd);\r\n }\r\n tree.commitUpdate(recorder);\r\n }\r\n}\r\n\r\n// add the lazy load module to magic.gen.lib\r\nfunction addLazyModuleToMagicGen(options) {\r\n return (tree: Tree, context: SchematicContext) => {\r\n\r\n let origModuleFileName= env.metadata.paths.rootMagicGenFolder + '/magic/magic.gen.lib.module.ts';\r\n if(!tree.exists(origModuleFileName)){\r\n LogLn(` [>Error] File cannot be overwrite, The file is not exist !!! : ${origModuleFileName}`);\r\n }\r\n const text = tree.read(origModuleFileName);\r\n\r\n if (text === null) {\r\n throw new SchematicsException(`File ${origModuleFileName} does not exist.`);\r\n }\r\n let sourceText = text.toString('utf-8');\r\n const lazyModuleStatement = '\\r\\n componentList.lazyLoadModulesMap = '+ GEN_LAZY_LOAD_MODULES_ARRAY+';';\r\n if (sourceText !== \"\" && sourceText.indexOf(lazyModuleStatement)== -1) {\r\n let genLibSource = getSourceFile(tree, origModuleFileName);\r\n let newLazyModuleText: string = sourceText.replace(lazyModuleStatement, '').trim();\r\n const constNode: ts.FunctionLikeDeclarationBase = findNodes(genLibSource, ts.SyntaxKind.Constructor)[0] as ts.FunctionLikeDeclarationBase;\r\n\r\n let lastStatementEnd = (<ts.Block>constNode.body).statements.end;\r\n\r\n const prefix = sourceText.substring(0, lastStatementEnd);\r\n const suffix = sourceText.substring(lastStatementEnd );\r\n tree.overwrite(origModuleFileName, `${prefix} ${lazyModuleStatement} ${suffix}` );\r\n\r\n }\r\n return tree;\r\n }\r\n}\r\n\r\n/*\r\n* Add new component to component-list.g file (Array and Hash).\r\n* If the file not exist new file will create by componentListGenIfNotExist function.\r\n* */\r\nfunction addNewCmpsToCmpListOrGenAll(options: MagicOptionScheme, module_name: string): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n const metadata = env.metadata;\r\n const cmpsToGen = env.app.views;\r\n const cmpListPath = env.metadata.paths.componentListPath(module_name);\r\n const source = host.read(cmpListPath);\r\n if (source) {\r\n let cmpToGenNum = 0;\r\n let sourceStep1 = source.toString(\"utf-8\");\r\n let cmpListSource = getSourceFile(host, cmpListPath);\r\n\r\n let cmpListTs = getComponentsArrayInfo(cmpListSource, GEN_COMPONENTS_ARRAY);\r\n existCmpListSet = new Set(cmpListTs.components);\r\n newCmpListSet = new Set<string>();\r\n\r\n // merge between components in the file and new component to gen\r\n cmpsToGen.forEach(newCmpGen => {\r\n if (!existCmpListSet.has(newCmpGen.props.component_uniquename)) {\r\n newCmpListSet.add(newCmpGen.props.component_uniquename);\r\n }\r\n });\r\n const newCmpListArray: string[] = <string[]>Array.from(newCmpListSet);\r\n if (newCmpListArray && newCmpListArray.length > 0) {\r\n let sourceStep2 = addComponentsToArray(sourceStep1, cmpListTs, newCmpListArray);\r\n\r\n let cmpListHashTs = getComponentsHashInfo(cmpListSource, GEN_COMPONENTS_HASH);\r\n let sourceStep3 = addComponentsToHash(sourceStep2, cmpListHashTs, newCmpListArray);\r\n\r\n LogLn(` Total old components: ${existCmpListSet.size}, added components: ${newCmpListSet.size}. `);\r\n\r\n host.overwrite(cmpListPath, sourceStep3);\r\n }\r\n } else {\r\n // If component-list.g.ts doesn't exist.\r\n toAddImports = false; // We generate the entire file with imports.\r\n return componentListGenIfNotExist(options)(host, context);\r\n }\r\n\r\n return host;\r\n }\r\n}\r\n\r\n/*\r\n* Create new component-list.g file.\r\n* */\r\nfunction componentListGenIfNotExist(options: MagicOptionScheme): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n\r\n console.log(\"creating component-list\");\r\n const metadata = env.metadata;\r\n const cmpList = new Set<string>();\r\n const data: any = {\r\n app: env.app,\r\n cmpList: env.app.views\r\n };\r\n\r\n const componentFile: TemplateConfig = {\r\n template: `./templates/angular/src/app/component-list.g.ts`,\r\n name: 'component-list.g.ts',\r\n destination: metadata.paths.magicGenFolderPath,\r\n type: GeneratedFileTypes.TS,\r\n data: data\r\n };\r\n\r\n return chain([\r\n generate(componentFile, options)\r\n ])(host, context);\r\n }\r\n}\r\n\r\n/*\r\n* Add new imports to component-list.g file.\r\n* */\r\nfunction addCmpsImportsToCmpList(options: MagicOptionScheme, module_name: string): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n if (toAddImports) {\r\n const cmpsToGen = env.app.views;\r\n let cmpListSource = getSourceFile(host, env.metadata.paths.componentListPath(module_name));\r\n\r\n const recorder = host.beginUpdate(env.metadata.paths.componentListPath(module_name));\r\n\r\n cmpsToGen.forEach(cmp => {\r\n let name = cmp.props.id;\r\n let uniqueName = cmp.props.component_uniquename;\r\n let cmpPath = cmp.props.component_path;\r\n\r\n if (newCmpListSet.has(uniqueName)) {\r\n const importsChange =\r\n insertImport2(\r\n cmpListSource,\r\n env.metadata.paths.componentListPath(module_name),\r\n name,\r\n uniqueName,\r\n `./${cmpPath}${name}.component`\r\n ) as InsertChange;\r\n\r\n if (importsChange.toAdd) {\r\n recorder.insertLeft(importsChange.pos, importsChange.toAdd);\r\n }\r\n }\r\n });\r\n\r\n host.commitUpdate(recorder);\r\n }\r\n return host;\r\n }\r\n}\r\n\r\n\r\n// //-------------------------------------------------------------------------------------------------\r\n// //\r\n// //-------------------------------------------------------------------------------------------------\r\n// function checkIfTheComponentNeedToBeRemoveFromGeneralMagicModule\r\n// (options: MagicOptionScheme, modulePath:string, moduleName:string, srcModuleName:string) : Rule {\r\n// return (tree: Tree , context : SchematicContext)=>{\r\n// const project = env.project;\r\n//\r\n// if (env.metadata.paths.generateCompForModuleName != \"\") {\r\n// LogLn(` [>] checking component name [${moduleName}]\r\n// from ${srcModuleName}]\r\n// To App Module : [${modulePath}]`);\r\n// const moduleSourceFile = getSourceFile(tree, modulePath);\r\n// if (isImported(moduleSourceFile, moduleName, srcModuleName)) {\r\n//\r\n// }\r\n// }\r\n//\r\n// return tree;\r\n// }\r\n// }\r\n\r\n/**************************\r\n * Helper Functions\r\n ***************************/\r\n\r\ninterface IComponentListParser {\r\n components: string[];\r\n endPos: number;\r\n isEmpty: boolean;\r\n}\r\n\r\nfunction getComponentsHashInfo(source: ts.SourceFile, variable: string): IComponentListParser {\r\n\r\n const rootNode = source;\r\n const cmpListVars: ts.Node[] = findNodes(rootNode, ts.SyntaxKind.VariableDeclaration);\r\n let endPos = -1;\r\n let isEmpty = true;\r\n\r\n let magicGenCmpsInfo = cmpListVars.filter(\r\n (node: any) => node.name.escapedText === variable);\r\n\r\n if (magicGenCmpsInfo && magicGenCmpsInfo.length > 0) {\r\n const firstPunctuation: ts.Node[] = findNodes(magicGenCmpsInfo[0], ts.SyntaxKind.FirstPunctuation);\r\n if (!(firstPunctuation && firstPunctuation.length > 0)) {\r\n throw new Error('magicGenCmpsHash variable has no open bracket ( { )');\r\n }\r\n endPos = firstPunctuation[0].end;\r\n const propertyAssignment = findNodes(firstPunctuation[0].parent, ts.SyntaxKind.PropertyAssignment);\r\n if (propertyAssignment && propertyAssignment.length > 0) {\r\n isEmpty = false;\r\n }\r\n }\r\n return {\r\n components: null,\r\n endPos,\r\n isEmpty\r\n };\r\n}\r\n\r\nfunction getComponentsArrayInfo(source: ts.SourceFile, variable: string): IComponentListParser {\r\n\r\n const rootNode = source;\r\n const cmpListVars: ts.Node[] = findNodes(rootNode, ts.SyntaxKind.VariableDeclaration);\r\n let endPos = -1;\r\n let cmpListArray;\r\n let isEmpty = true;\r\n let magicGenCmpsInfo = cmpListVars.filter(\r\n (node: any) => node.name.escapedText === variable);\r\n\r\n if (magicGenCmpsInfo && magicGenCmpsInfo.length > 0) {\r\n const openBracketToken: ts.Node[] = findNodes(magicGenCmpsInfo[0], ts.SyntaxKind.OpenBracketToken);\r\n if (!(openBracketToken && openBracketToken.length > 0)) {\r\n throw new Error('magicGenComponents variable has no open bracket ([)');\r\n }\r\n endPos = openBracketToken[0].end;\r\n const identifiers = findNodes(openBracketToken[0].parent, ts.SyntaxKind.Identifier);\r\n\r\n\r\n // Array with items\r\n if (identifiers && identifiers.length > 0) {\r\n isEmpty = false;\r\n //endPos = identifiers[identifiers.length - 1].end;\r\n cmpListArray = identifiers.map((i: any) => i.escapedText) as string[];\r\n }\r\n // Array with no items\r\n // else{\r\n // endPos = openBracketToken[0].end;\r\n // }\r\n }\r\n return {\r\n components: cmpListArray,\r\n endPos,\r\n isEmpty\r\n };\r\n}\r\n\r\n\r\nfunction getLazyLoadCompoenentsInfo(source: ts.SourceFile, variable: string): IComponentListParser {\r\n\r\n const cmpListVars: ts.Node[] = findNodes(source, ts.SyntaxKind.VariableDeclaration);\r\n let endPos = -1;\r\n let cmpListArray;\r\n let isEmpty = true;\r\n let magicGenCmpsInfo = cmpListVars.filter(\r\n (node: any) => node.name.escapedText === variable);\r\n\r\n if (magicGenCmpsInfo && magicGenCmpsInfo.length > 0) {\r\n const openBracketToken: ts.Node[] = findNodes(magicGenCmpsInfo[0], ts.SyntaxKind.FirstPunctuation);\r\n if (!(openBracketToken && openBracketToken.length > 0)) {\r\n throw new Error('FirstPunctuation variable has no open bracket ([)');\r\n }\r\n endPos = openBracketToken[0].end;\r\n const identifiers = findNodes(openBracketToken[0].parent, ts.SyntaxKind.PropertyAssignment);\r\n const identifiers1 = findNodes(openBracketToken[0].parent, ts.SyntaxKind.Identifier);\r\n\r\n // Array with items\r\n if (identifiers && identifiers.length > 0) {\r\n isEmpty = false;\r\n cmpListArray = identifiers.map((i: any) => i.name.escapedText ).filter(id => id !== \"moduleName\" && id !== \"modulePath\");\r\n }\r\n }\r\n return {\r\n components: cmpListArray,\r\n endPos,\r\n isEmpty\r\n };\r\n}\r\n\r\nfunction addComponentsToArray(source: string, info: IComponentListParser, cmpsToAdd: string[]): string {\r\n const prefix = source.substring(0, info.endPos);\r\n const suffix = source.substring(info.endPos);\r\n let toAdd = `${cmpsToAdd}`;\r\n toAdd = `${toAdd.replace(/,/g, \",\\n\")}`;\r\n\r\n return info.isEmpty ?\r\n `${prefix} ${toAdd} ${suffix}` :\r\n `${prefix} ${toAdd} , ${suffix}`;\r\n}\r\n\r\nfunction addComponentsToHash(source: string, info: IComponentListParser, cmpsToAdd: string[]): string {\r\n const prefix = source.substring(0, info.endPos);\r\n const suffix = source.substring(info.endPos);\r\n const cmpHashStr = EJS.render(`\r\n <% components.forEach(componentUniqueName => { %>\r\n <%= componentUniqueName %>:<%- componentUniqueName %>,\r\n <%})%>`, {components: cmpsToAdd});\r\n let toAdd = `${cmpHashStr.replace(/\\n/g, '').replace(/,/g, \",\\n\")}`;\r\n // update source\r\n return `${prefix} ${toAdd} ${suffix}`;\r\n /*return info.isEmpty ?\r\n `${prefix} ${delLastComma(cmpHashStr)} ${suffix}` :\r\n `${prefix} ${delLastComma(cmpHashStr)}, ${suffix}` ;*/\r\n}\r\n\r\n// add the lazy loaded components to map\r\nfunction addComponentsToLazyLoad(source: string, info: IComponentListParser, cmpsToAdd: View[], module_name: string): string {\r\n const prefix = source.substring(0, info.endPos);\r\n const suffix = source.substring(info.endPos);\r\n\r\n // get the module path\r\n let currentModulePath = env.metadata.paths.magicGenLibModulePath(module_name);\r\n\r\n const cmpHashStr = EJS.render(`\r\n<%{components.forEach(view =>{-%>\r\n<%=view.props.component_uniquename %> : { moduleName : 'Magic<%=moduleName%>Module'},\r\n<%})}-%>`, {components: cmpsToAdd, moduleName: module_name, modulePath: currentModulePath});\r\n\r\n let toAdd = `${cmpHashStr.replace(/\\n/g, '').replace(/,/g, \",\\n\")}`;\r\n // update source\r\n return `${prefix} ${toAdd} ${suffix}`;\r\n}\r\n\r\nfunction delLastComma(source: string) {\r\n let index = source.lastIndexOf(',');\r\n return source.substring(0, index);\r\n}\r\n\r\n\r\n\r\n"]}
1
+ {"version":3,"file":"component-list.rule.js","sourceRoot":"","sources":["component-list.rule.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,2BAA2B;AAC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AChB,OAAO,GAAG,MAAM,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;IACtC;;4DAEwD;AAC1D,CAAC;AAED,wCAAwC;AACxC,SAAS,uBAAuB,CAAC,MAAc,EAAE,IAA0B,EAAE,SAAiB,EAAE,WAAmB;IACjH,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE7C,sBAAsB;IACtB,IAAI,iBAAiB,GAAG,SAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAE9E,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC;;;SAGvB,EAAE,EAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAC,CAAC,CAAC;IAE1F,IAAI,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;IACpE,gBAAgB;IAChB,OAAO,GAAG,MAAM,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;AACxC,CAAC;AAED,SAAS,YAAY,CAAC,MAAc;IAClC,IAAI,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import * as ts from 'typescript';\r\nimport * as EJS from \"ejs\";\r\nimport {chain, Rule, SchematicContext, SchematicsException, Tree} from \"@angular-devkit/schematics\";\r\nimport {env, GEN_COMPONENTS_ARRAY, GEN_COMPONENTS_HASH, GEN_LAZY_LOAD_MODULES_ARRAY} from \"../env\";\r\nimport {MagicOptionScheme} from \"./magic-option.scheme\";\r\nimport {GeneratedFileTypes, TemplateConfig, View, WindowType} from \"../../../types\";\r\nimport {generate} from \"./generate.rule\";\r\nimport {getSourceFile} from \"../../utils/ast\";\r\nimport {insertImport, insertImport2} from \"../../utils/devkit-utils/route-utils\";\r\nimport {InsertChange} from \"../../utils/devkit-utils/change\";\r\nimport {findNodes} from \"../../utils/devkit-utils/ast-utils\";\r\nimport {LogLn} from \"../Util\";\r\nimport {isNullOrUndefined} from \"util\";\r\n\r\n\r\nlet existCmpListSet: Set<string>;\r\nlet newCmpListSet = new Set();\r\nlet toAddImports: boolean = true;\r\nlet orgPreventLog = env.prevent_log;\r\n\r\n\r\nexport function componentlistGen(options: MagicOptionScheme, module_name: string, loadOnDemand: boolean): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n LogLn(`[>] Step 4: components-list.`);\r\n return chain([\r\n addNewCmpsToCmpListOrGenAll(options, module_name),\r\n addCmpsImportsToCmpList(options, module_name),\r\n createLazyModuleMap(options, module_name),\r\n addLazyLoadComponentList(options, module_name, loadOnDemand),\r\n addLazyModuleToMagicGen(options),\r\n addImportForLazyModule(options)\r\n ])(host, context);\r\n }\r\n}\r\n\r\n// create the lazy load map if it does not exist\r\nfunction createLazyModuleMap(options: MagicOptionScheme, module_name: string) {\r\n return (host: Tree, context: SchematicContext) => {\r\n const cmpListPath = env.metadata.paths.componentListPath(\"\");\r\n env.prevent_log = false;\r\n const source = host.read(cmpListPath).toString(\"utf-8\")\r\n\r\n const LazyModuleArrayStart = 'export const ' + GEN_LAZY_LOAD_MODULES_ARRAY + ' = {';\r\n const LazyMOduleArrayEnd = '};';\r\n // create lazy load component array if it does not exist\r\n if (source.indexOf(LazyModuleArrayStart) < 0) {\r\n LogLn(`[>] Creating LazyLoadModulesMap `);\r\n // add the code of creating map in file\r\n host.overwrite(cmpListPath, source + \"\\r\\n\" + LazyModuleArrayStart + LazyMOduleArrayEnd);\r\n }\r\n\r\n }\r\n}\r\n\r\n// add the lazy load components\r\nfunction addLazyLoadComponentList(options: MagicOptionScheme, module_name: string, loadOnDemand: boolean): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n if (loadOnDemand) {\r\n let lazyLoadedComponents: Array<View> = new Array<View>();\r\n const cmpListPath = env.metadata.paths.componentListPath(\"\");\r\n\r\n const source = host.read(cmpListPath);\r\n if (source) {\r\n let cmpListSource = getSourceFile(host, cmpListPath);\r\n\r\n let cmpListTs = getLazyLoadCompoenentsInfo(cmpListSource, GEN_LAZY_LOAD_MODULES_ARRAY);\r\n let sourceStep1 = host.read(cmpListPath).toString(\"utf-8\");\r\n\r\n env.app.views.forEach(view => {\r\n if( isNullOrUndefined(cmpListTs.components) || !(cmpListTs.components.includes(view.props.component_uniquename))) {\r\n lazyLoadedComponents.push(view); // if component does not exist add it to list\r\n LogLn(`[>] Add ${view.props.component_uniquename} component to LazyLoadModulesMap`, );\r\n }\r\n });\r\n\r\n // add components to map\r\n if (lazyLoadedComponents.length > 0) {\r\n let sourceStep2 = addComponentsToLazyLoad(sourceStep1, cmpListTs, lazyLoadedComponents, module_name);\r\n host.overwrite(cmpListPath, sourceStep2);\r\n }\r\n }\r\n env.prevent_log = orgPreventLog;\r\n }\r\n return host;\r\n }\r\n}\r\n\r\nfunction addImportForLazyModule(options) {\r\n return (tree: Tree, context: SchematicContext) => {\r\n\r\n let genLibPath= env.metadata.paths.rootMagicGenFolder + '/magic/magic.gen.lib.module.ts';\r\n const recorder = tree.beginUpdate(genLibPath);\r\n let genLibSource = getSourceFile(tree, genLibPath);\r\n\r\n const importChange = insertImport(genLibSource, genLibPath, GEN_LAZY_LOAD_MODULES_ARRAY, './component-list.g') as InsertChange;\r\n if (importChange.toAdd) {\r\n recorder.insertLeft(importChange.pos, importChange.toAdd);\r\n }\r\n tree.commitUpdate(recorder);\r\n }\r\n}\r\n\r\n// add the lazy load module to magic.gen.lib\r\nfunction addLazyModuleToMagicGen(options) {\r\n return (tree: Tree, context: SchematicContext) => {\r\n\r\n let origModuleFileName= env.metadata.paths.rootMagicGenFolder + '/magic/magic.gen.lib.module.ts';\r\n if(!tree.exists(origModuleFileName)){\r\n LogLn(` [>Error] File cannot be overwrite, The file is not exist !!! : ${origModuleFileName}`);\r\n }\r\n const text = tree.read(origModuleFileName);\r\n\r\n if (text === null) {\r\n throw new SchematicsException(`File ${origModuleFileName} does not exist.`);\r\n }\r\n let sourceText = text.toString('utf-8');\r\n const lazyModuleStatement = '\\r\\n componentList.lazyLoadModulesMap = '+ GEN_LAZY_LOAD_MODULES_ARRAY+';';\r\n if (sourceText !== \"\" && sourceText.indexOf(lazyModuleStatement)== -1) {\r\n let genLibSource = getSourceFile(tree, origModuleFileName);\r\n let newLazyModuleText: string = sourceText.replace(lazyModuleStatement, '').trim();\r\n const constNode: ts.FunctionLikeDeclarationBase = findNodes(genLibSource, ts.SyntaxKind.Constructor)[0] as ts.FunctionLikeDeclarationBase;\r\n\r\n let lastStatementEnd = (<ts.Block>constNode.body).statements.end;\r\n\r\n const prefix = sourceText.substring(0, lastStatementEnd);\r\n const suffix = sourceText.substring(lastStatementEnd );\r\n tree.overwrite(origModuleFileName, `${prefix} ${lazyModuleStatement} ${suffix}` );\r\n\r\n }\r\n return tree;\r\n }\r\n}\r\n\r\n/*\r\n* Add new component to component-list.g file (Array and Hash).\r\n* If the file not exist new file will create by componentListGenIfNotExist function.\r\n* */\r\nfunction addNewCmpsToCmpListOrGenAll(options: MagicOptionScheme, module_name: string): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n const metadata = env.metadata;\r\n const cmpsToGen = env.app.views;\r\n const cmpListPath = env.metadata.paths.componentListPath(module_name);\r\n const source = host.read(cmpListPath);\r\n if (source) {\r\n let cmpToGenNum = 0;\r\n let sourceStep1 = source.toString(\"utf-8\");\r\n let cmpListSource = getSourceFile(host, cmpListPath);\r\n\r\n let cmpListTs = getComponentsArrayInfo(cmpListSource, GEN_COMPONENTS_ARRAY);\r\n existCmpListSet = new Set(cmpListTs.components);\r\n newCmpListSet = new Set<string>();\r\n\r\n // merge between components in the file and new component to gen\r\n cmpsToGen.forEach(newCmpGen => {\r\n if (!existCmpListSet.has(newCmpGen.props.component_uniquename)) {\r\n newCmpListSet.add(newCmpGen.props.component_uniquename);\r\n }\r\n });\r\n const newCmpListArray: string[] = <string[]>Array.from(newCmpListSet);\r\n if (newCmpListArray && newCmpListArray.length > 0) {\r\n let sourceStep2 = addComponentsToArray(sourceStep1, cmpListTs, newCmpListArray);\r\n\r\n let cmpListHashTs = getComponentsHashInfo(cmpListSource, GEN_COMPONENTS_HASH);\r\n let sourceStep3 = addComponentsToHash(sourceStep2, cmpListHashTs, newCmpListArray);\r\n\r\n LogLn(` Total old components: ${existCmpListSet.size}, added components: ${newCmpListSet.size}. `);\r\n\r\n host.overwrite(cmpListPath, sourceStep3);\r\n }\r\n } else {\r\n // If component-list.g.ts doesn't exist.\r\n toAddImports = false; // We generate the entire file with imports.\r\n return componentListGenIfNotExist(options)(host, context);\r\n }\r\n\r\n return host;\r\n }\r\n}\r\n\r\n/*\r\n* Create new component-list.g file.\r\n* */\r\nfunction componentListGenIfNotExist(options: MagicOptionScheme): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n\r\n console.log(\"creating component-list\");\r\n const metadata = env.metadata;\r\n const cmpList = new Set<string>();\r\n const data: any = {\r\n app: env.app,\r\n cmpList: env.app.views\r\n };\r\n\r\n const componentFile: TemplateConfig = {\r\n template: `./templates/angular/src/app/component-list.g.ts`,\r\n name: 'component-list.g.ts',\r\n destination: metadata.paths.magicGenFolderPath,\r\n type: GeneratedFileTypes.TS,\r\n data: data\r\n };\r\n\r\n return chain([\r\n generate(componentFile, options)\r\n ])(host, context);\r\n }\r\n}\r\n\r\n/*\r\n* Add new imports to component-list.g file.\r\n* */\r\nfunction addCmpsImportsToCmpList(options: MagicOptionScheme, module_name: string): Rule {\r\n return (host: Tree, context: SchematicContext) => {\r\n if (toAddImports) {\r\n const cmpsToGen = env.app.views;\r\n let cmpListSource = getSourceFile(host, env.metadata.paths.componentListPath(module_name));\r\n\r\n const recorder = host.beginUpdate(env.metadata.paths.componentListPath(module_name));\r\n\r\n cmpsToGen.forEach(cmp => {\r\n let name = cmp.props.id;\r\n let uniqueName = cmp.props.component_uniquename;\r\n let cmpPath = cmp.props.component_path;\r\n\r\n if (newCmpListSet.has(uniqueName)) {\r\n const importsChange =\r\n insertImport2(\r\n cmpListSource,\r\n env.metadata.paths.componentListPath(module_name),\r\n name,\r\n uniqueName,\r\n `./${cmpPath}${name}.component`\r\n ) as InsertChange;\r\n\r\n if (importsChange.toAdd) {\r\n recorder.insertLeft(importsChange.pos, importsChange.toAdd);\r\n }\r\n }\r\n });\r\n\r\n host.commitUpdate(recorder);\r\n }\r\n return host;\r\n }\r\n}\r\n\r\n\r\n// //-------------------------------------------------------------------------------------------------\r\n// //\r\n// //-------------------------------------------------------------------------------------------------\r\n// function checkIfTheComponentNeedToBeRemoveFromGeneralMagicModule\r\n// (options: MagicOptionScheme, modulePath:string, moduleName:string, srcModuleName:string) : Rule {\r\n// return (tree: Tree , context : SchematicContext)=>{\r\n// const project = env.project;\r\n//\r\n// if (env.metadata.paths.generateCompForModuleName != \"\") {\r\n// LogLn(` [>] checking component name [${moduleName}]\r\n// from ${srcModuleName}]\r\n// To App Module : [${modulePath}]`);\r\n// const moduleSourceFile = getSourceFile(tree, modulePath);\r\n// if (isImported(moduleSourceFile, moduleName, srcModuleName)) {\r\n//\r\n// }\r\n// }\r\n//\r\n// return tree;\r\n// }\r\n// }\r\n\r\n/**************************\r\n * Helper Functions\r\n ***************************/\r\n\r\ninterface IComponentListParser {\r\n components: string[];\r\n endPos: number;\r\n isEmpty: boolean;\r\n}\r\n\r\nfunction getComponentsHashInfo(source: ts.SourceFile, variable: string): IComponentListParser {\r\n\r\n const rootNode = source;\r\n const cmpListVars: ts.Node[] = findNodes(rootNode, ts.SyntaxKind.VariableDeclaration);\r\n let endPos = -1;\r\n let isEmpty = true;\r\n\r\n let magicGenCmpsInfo = cmpListVars.filter(\r\n (node: any) => node.name.escapedText === variable);\r\n\r\n if (magicGenCmpsInfo && magicGenCmpsInfo.length > 0) {\r\n const firstPunctuation: ts.Node[] = findNodes(magicGenCmpsInfo[0], ts.SyntaxKind.FirstPunctuation);\r\n if (!(firstPunctuation && firstPunctuation.length > 0)) {\r\n throw new Error('magicGenCmpsHash variable has no open bracket ( { )');\r\n }\r\n endPos = firstPunctuation[0].end;\r\n const propertyAssignment = findNodes(firstPunctuation[0].parent, ts.SyntaxKind.PropertyAssignment);\r\n if (propertyAssignment && propertyAssignment.length > 0) {\r\n isEmpty = false;\r\n }\r\n }\r\n return {\r\n components: null,\r\n endPos,\r\n isEmpty\r\n };\r\n}\r\n\r\nfunction getComponentsArrayInfo(source: ts.SourceFile, variable: string): IComponentListParser {\r\n\r\n const rootNode = source;\r\n const cmpListVars: ts.Node[] = findNodes(rootNode, ts.SyntaxKind.VariableDeclaration);\r\n let endPos = -1;\r\n let cmpListArray;\r\n let isEmpty = true;\r\n let magicGenCmpsInfo = cmpListVars.filter(\r\n (node: any) => node.name.escapedText === variable);\r\n\r\n if (magicGenCmpsInfo && magicGenCmpsInfo.length > 0) {\r\n const openBracketToken: ts.Node[] = findNodes(magicGenCmpsInfo[0], ts.SyntaxKind.OpenBracketToken);\r\n if (!(openBracketToken && openBracketToken.length > 0)) {\r\n throw new Error('magicGenComponents variable has no open bracket ([)');\r\n }\r\n endPos = openBracketToken[0].end;\r\n const identifiers = findNodes(openBracketToken[0].parent, ts.SyntaxKind.Identifier);\r\n\r\n\r\n // Array with items\r\n if (identifiers && identifiers.length > 0) {\r\n isEmpty = false;\r\n //endPos = identifiers[identifiers.length - 1].end;\r\n cmpListArray = identifiers.map((i: any) => i.escapedText) as string[];\r\n }\r\n // Array with no items\r\n // else{\r\n // endPos = openBracketToken[0].end;\r\n // }\r\n }\r\n return {\r\n components: cmpListArray,\r\n endPos,\r\n isEmpty\r\n };\r\n}\r\n\r\n\r\nfunction getLazyLoadCompoenentsInfo(source: ts.SourceFile, variable: string): IComponentListParser {\r\n\r\n const cmpListVars: ts.Node[] = findNodes(source, ts.SyntaxKind.VariableDeclaration);\r\n let endPos = -1;\r\n let cmpListArray;\r\n let isEmpty = true;\r\n let magicGenCmpsInfo = cmpListVars.filter(\r\n (node: any) => node.name.escapedText === variable);\r\n\r\n if (magicGenCmpsInfo && magicGenCmpsInfo.length > 0) {\r\n const openBracketToken: ts.Node[] = findNodes(magicGenCmpsInfo[0], ts.SyntaxKind.FirstPunctuation);\r\n if (!(openBracketToken && openBracketToken.length > 0)) {\r\n throw new Error('FirstPunctuation variable has no open bracket ([)');\r\n }\r\n endPos = openBracketToken[0].end;\r\n const identifiers = findNodes(openBracketToken[0].parent, ts.SyntaxKind.PropertyAssignment);\r\n const identifiers1 = findNodes(openBracketToken[0].parent, ts.SyntaxKind.Identifier);\r\n\r\n // Array with items\r\n if (identifiers && identifiers.length > 0) {\r\n isEmpty = false;\r\n cmpListArray = identifiers.map((i: any) => i.name.escapedText ).filter(id => id !== \"moduleName\" && id !== \"modulePath\");\r\n }\r\n }\r\n return {\r\n components: cmpListArray,\r\n endPos,\r\n isEmpty\r\n };\r\n}\r\n\r\nfunction addComponentsToArray(source: string, info: IComponentListParser, cmpsToAdd: string[]): string {\r\n const prefix = source.substring(0, info.endPos);\r\n const suffix = source.substring(info.endPos);\r\n let toAdd = `${cmpsToAdd}`;\r\n toAdd = `${toAdd.replace(/,/g, \",\\n\\t\")}`;\r\n\r\n return info.isEmpty ?\r\n`${prefix}\r\n\\t${toAdd} ${suffix}` :\r\n`${prefix}\r\n\\t${toAdd},${suffix}` ;\r\n}\r\n\r\nfunction addComponentsToHash(source: string, info: IComponentListParser, cmpsToAdd: string[]): string {\r\n const prefix = source.substring(0, info.endPos);\r\n const suffix = source.substring(info.endPos);\r\n const cmpHashStr = EJS.render(`\r\n <% components.forEach(componentUniqueName => { %>\r\n <%= componentUniqueName %>:<%- componentUniqueName %>,\r\n <%})%>`, {components: cmpsToAdd});\r\n let toAdd = `${cmpHashStr.replace(/\\n/g, '').replace(/,/g, \",\\n\")}`;\r\n // update source\r\n return `${prefix} ${toAdd} ${suffix}`;\r\n /*return info.isEmpty ?\r\n `${prefix} ${delLastComma(cmpHashStr)} ${suffix}` :\r\n `${prefix} ${delLastComma(cmpHashStr)}, ${suffix}` ;*/\r\n}\r\n\r\n// add the lazy loaded components to map\r\nfunction addComponentsToLazyLoad(source: string, info: IComponentListParser, cmpsToAdd: View[], module_name: string): string {\r\n const prefix = source.substring(0, info.endPos);\r\n const suffix = source.substring(info.endPos);\r\n\r\n // get the module path\r\n let currentModulePath = env.metadata.paths.magicGenLibModulePath(module_name);\r\n\r\n const cmpHashStr = EJS.render(`\r\n<%{components.forEach(view =>{-%>\r\n<%=view.props.component_uniquename %> : { moduleName : 'Magic<%=moduleName%>Module'},\r\n<%})}-%>`, {components: cmpsToAdd, moduleName: module_name, modulePath: currentModulePath});\r\n\r\n let toAdd = `${cmpHashStr.replace(/\\n/g, '').replace(/,/g, \",\\n\")}`;\r\n // update source\r\n return `${prefix} ${toAdd} ${suffix}`;\r\n}\r\n\r\nfunction delLastComma(source: string) {\r\n let index = source.lastIndexOf(',');\r\n return source.substring(0, index);\r\n}\r\n\r\n\r\n\r\n"]}
@@ -377,11 +377,13 @@ function addComponentsToArray(source: string, info: IComponentListParser, cmpsTo
377
377
  const prefix = source.substring(0, info.endPos);
378
378
  const suffix = source.substring(info.endPos);
379
379
  let toAdd = `${cmpsToAdd}`;
380
- toAdd = `${toAdd.replace(/,/g, ",\n")}`;
380
+ toAdd = `${toAdd.replace(/,/g, ",\n\t")}`;
381
381
 
382
382
  return info.isEmpty ?
383
- `${prefix} ${toAdd} ${suffix}` :
384
- `${prefix} ${toAdd} , ${suffix}`;
383
+ `${prefix}
384
+ \t${toAdd} ${suffix}` :
385
+ `${prefix}
386
+ \t${toAdd},${suffix}` ;
385
387
  }
386
388
 
387
389
  function addComponentsToHash(source: string, info: IComponentListParser, cmpsToAdd: string[]): string {
@@ -28,6 +28,9 @@ import {MatTooltipModule} from "@angular/material/tooltip";
28
28
  import {MatButtonModule} from "@angular/material/button";
29
29
  import {MatAutocompleteModule} from "@angular/material/autocomplete";
30
30
  import {CurrencyMaskConfig, CurrencyMaskInputMode, NgxCurrencyModule} from "ngx-currency";
31
+ import { NgxMaskModule, IConfig } from "ngx-mask";
32
+
33
+ export const options: Partial<IConfig> | (() => Partial<IConfig>) = {};
31
34
 
32
35
  export const customCurrencyMaskConfig: CurrencyMaskConfig = {
33
36
  align: "right",
@@ -63,6 +66,7 @@ export const customCurrencyMaskConfig: CurrencyMaskConfig = {
63
66
  DynamicModule,
64
67
  InfiniteScrollModule,
65
68
  NgxCurrencyModule.forRoot(customCurrencyMaskConfig),
69
+ NgxMaskModule.forRoot(),
66
70
 
67
71
  // Material Modules
68
72
  MatTableModule,
@@ -53,6 +53,7 @@ export interface Control {
53
53
  row_editing_type?: RowEditingTypes;
54
54
  mgformat?: string;
55
55
  currency?: string;
56
+ mask?: string;
56
57
  directive?: string;
57
58
  validator?: string;
58
59
  formatter?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"control.js","sourceRoot":"","sources":["control.ts"],"names":[],"mappings":"","sourcesContent":["import {HorizontalAlignments} from '../enums/horizontal-alignments.enum';\nimport {\n CtrlImageStyle,\n MgControlType,\n SideType,\n StorageAttributeType,\n TableWebStyle,\n RowEditingTypes,\n WindowPosition,\n WindowType\n} from \"../enums/Enums\";\nimport {CtrlButtonTypeGui} from '../enums/Enums';\n\nexport interface Exp\n{\n\thas_exp?: boolean\n}\n\nexport interface Boolean_Exp extends Exp\n{\n\tvalue?: boolean,\n}\n\nexport interface Number_Exp extends Exp\n{\n\tvalue?: number,\n}\n\nexport interface String_Exp extends Exp\n{\n\tvalue?: string,\n}\n\nexport interface Control {\n\tcontrolType: MgControlType\n\tclasses?: string\n\thasClassExpression?: boolean\n\tstyle: {\n\t\tfont?: Number_Exp,\n\t\tcolor?: Number_Exp,\n\t\tborder?: Boolean_Exp,\n\t\tborder_style?: Number_Exp,\n\t\tfocus_color?: Number_Exp,\n\t\talignment: {\n\t\t\thorizontal?: HorizontalAlignments,\n\t\t\tvertical?: number,\n\t\t},\n line_divider?:Boolean_Exp;\n multiline_edit?: boolean,\n\t},\n\tprops: {\n\t\tid: string,\n\t\tname?: string,\n component_uniquename?: string;\n component_path?:string;\n visible?: Exp,\n\t\tenabled?: Exp,\n\t\ttab_order?: Number_Exp,\n\t\tpassword_edit?: Boolean_Exp,\n\t\tbutton_style?:CtrlButtonTypeGui,\n is_table_child?: boolean,\n table_row_height?: number,\n table_title_height?: number,\n scroll_bar?: boolean;\n no_modifiable_descendants?: boolean;\n modifiable?: Boolean_Exp,\n\t\tlayer?: number,\n tab_control_side?: SideType;\n attribute?: StorageAttributeType;\n web_style?: TableWebStyle;\n row_editing_type?: RowEditingTypes;\n mgformat?: string;\n currency?:string;\n directive?: string;\n validator?: string;\n formatter?: string;\n window_type?: WindowType;\n is_router_outlet?: boolean;\n default_outlet?: boolean;\n wallpaper?: string;\n wallpaper_style?: CtrlImageStyle;\n sortable?: boolean;\n common_line_id?: number;\n dataexp?:boolean;\n showsecs?:boolean;\n enum_id:string; // simple enum name, for method calls\n directive_id:string; // enum name as {{id}} for things such as directive name or formcontrol name\n\t}\n\n\thint: {\n\t\ttext?: String_Exp,\n\t}\n\tcoordinates:{\n x?:\tnumber,\n y?:\tnumber,\n width:\tnumber,\n height?:\tnumber\n\t}\n\tchildren: null | Control[],\n\n\n\t/// incode members:\n\t// class_name_in_css: string;\n\n}\n"]}
1
+ {"version":3,"file":"control.js","sourceRoot":"","sources":["control.ts"],"names":[],"mappings":"","sourcesContent":["import {HorizontalAlignments} from '../enums/horizontal-alignments.enum';\nimport {\n CtrlImageStyle,\n MgControlType,\n SideType,\n StorageAttributeType,\n TableWebStyle,\n RowEditingTypes,\n WindowPosition,\n WindowType\n} from \"../enums/Enums\";\nimport {CtrlButtonTypeGui} from '../enums/Enums';\n\nexport interface Exp\n{\n\thas_exp?: boolean\n}\n\nexport interface Boolean_Exp extends Exp\n{\n\tvalue?: boolean,\n}\n\nexport interface Number_Exp extends Exp\n{\n\tvalue?: number,\n}\n\nexport interface String_Exp extends Exp\n{\n\tvalue?: string,\n}\n\nexport interface Control {\n\tcontrolType: MgControlType\n\tclasses?: string\n\thasClassExpression?: boolean\n\tstyle: {\n\t\tfont?: Number_Exp,\n\t\tcolor?: Number_Exp,\n\t\tborder?: Boolean_Exp,\n\t\tborder_style?: Number_Exp,\n\t\tfocus_color?: Number_Exp,\n\t\talignment: {\n\t\t\thorizontal?: HorizontalAlignments,\n\t\t\tvertical?: number,\n\t\t},\n line_divider?:Boolean_Exp;\n multiline_edit?: boolean,\n\t},\n\tprops: {\n\t\tid: string,\n\t\tname?: string,\n component_uniquename?: string;\n component_path?:string;\n visible?: Exp,\n\t\tenabled?: Exp,\n\t\ttab_order?: Number_Exp,\n\t\tpassword_edit?: Boolean_Exp,\n\t\tbutton_style?:CtrlButtonTypeGui,\n is_table_child?: boolean,\n table_row_height?: number,\n table_title_height?: number,\n scroll_bar?: boolean;\n no_modifiable_descendants?: boolean;\n modifiable?: Boolean_Exp,\n\t\tlayer?: number,\n tab_control_side?: SideType;\n attribute?: StorageAttributeType;\n web_style?: TableWebStyle;\n row_editing_type?: RowEditingTypes;\n mgformat?: string;\n currency?: string;\n mask?: string;\n directive?: string;\n validator?: string;\n formatter?: string;\n window_type?: WindowType;\n is_router_outlet?: boolean;\n default_outlet?: boolean;\n wallpaper?: string;\n wallpaper_style?: CtrlImageStyle;\n sortable?: boolean;\n common_line_id?: number;\n dataexp?:boolean;\n showsecs?:boolean;\n enum_id:string; // simple enum name, for method calls\n directive_id:string; // enum name as {{id}} for things such as directive name or formcontrol name\n\t}\n\n\thint: {\n\t\ttext?: String_Exp,\n\t}\n\tcoordinates:{\n x?:\tnumber,\n y?:\tnumber,\n width:\tnumber,\n height?:\tnumber\n\t}\n\tchildren: null | Control[],\n\n\n\t/// incode members:\n\t// class_name_in_css: string;\n\n}\n"]}
@@ -70,7 +70,8 @@ export interface Control {
70
70
  web_style?: TableWebStyle;
71
71
  row_editing_type?: RowEditingTypes;
72
72
  mgformat?: string;
73
- currency?:string;
73
+ currency?: string;
74
+ mask?: string;
74
75
  directive?: string;
75
76
  validator?: string;
76
77
  formatter?: string;
@@ -43,6 +43,9 @@
43
43
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>
44
44
  <%- include('../../attributes/common/input_attributes', {ctrl : ctrl}) %>
45
45
  <% if (ctrl.props.mgformat) { %><%- ctrl.props.mgformat %> <%}%>
46
+ <% if (ctrl.props.mask) { %>
47
+ [mask]="mg.getAlphaMask(<%- ctrl.props.enum_id %>) [showMaskTyped]='true'"
48
+ <% } %>
46
49
  <% if (ctrl.props.must_input && !ctrl.props.must_input.has_exp) { %> required <%}%>
47
50
  <% if (ctrl.props.directive) { %><%- ctrl.props.directive %><%}%>
48
51
  <%- ' '%>
@@ -70,6 +70,10 @@ default: %>
70
70
  [matAutocomplete]="<%= ctrl.props.id %>"
71
71
  <% } %>
72
72
  <% if (ctrl.props.mgformat) { %><%- ctrl.props.mgformat %> <%}%>
73
+ <% if (ctrl.props.mask) { %>
74
+ [mask]="mg.getAlphaMask(<%- ctrl.props.enum_id %>)"
75
+ [showMaskTyped]='true'
76
+ <% } %>
73
77
  <% if (ctrl.props.must_input && !ctrl.props.must_input.has_exp) { %>
74
78
  required
75
79
  <% } %>
@@ -153,9 +157,9 @@ case StorageAttributeType.Date: %>
153
157
  <mat-datepicker-toggle matSuffix
154
158
  [for]="<%- ctrl.props.id %>"
155
159
  <% if ( child.props.is_table_child ) {%>
156
- *ngIf="mg.checkIsReadOnly(<%- ctrl.props.enum_id %>) && mg.isRowInRowEditing(row)"
160
+ *ngIf="!mg.checkIsReadOnly(<%- ctrl.props.enum_id %>) && mg.isRowInRowEditing(row)"
157
161
  <%} else { %>
158
- *ngIf="mg.checkIsReadOnly(<%- ctrl.props.enum_id %>)"
162
+ *ngIf="!mg.checkIsReadOnly(<%- ctrl.props.enum_id %>)"
159
163
  <%}%>
160
164
  >
161
165