@rws-framework/client 2.10.4 → 2.10.6
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
|
@@ -109,7 +109,7 @@ let rwsTemplate: any = T.html\`${templateContent}\`;
|
|
|
109
109
|
this.addDependency(templatePath);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
const viewReg = /@RWSView\(["']([^"']+)["'].*\)\s*
|
|
112
|
+
const viewReg = /@RWSView\(["']([^"']+)["'].*\)\s*(.*?\s+)?class\s+([a-zA-Z0-9_-]+)\s+extends\s+RWSViewComponent/gm
|
|
113
113
|
|
|
114
114
|
let m;
|
|
115
115
|
let className = null;
|
|
@@ -127,23 +127,16 @@ let rwsTemplate: any = T.html\`${templateContent}\`;
|
|
|
127
127
|
className = match;
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if(filePath === '/app/frontend/rws/src/components/exampleRws/component.ts'){
|
|
133
|
-
console.log({className, processedContent});
|
|
134
|
-
}
|
|
130
|
+
}
|
|
135
131
|
|
|
136
132
|
if(className){
|
|
137
133
|
const replacedViewDecoratorContent = processedContent.replace(
|
|
138
134
|
viewReg,
|
|
139
|
-
`@RWSView('$1', null, { template: rwsTemplate, styles${addedParams.length? ', options: {' + (addedParams.join(', ')) + '}': ''} })\
|
|
135
|
+
`@RWSView('$1', null, { template: rwsTemplate, styles${addedParams.length? ', options: {' + (addedParams.join(', ')) + '}': ''} })\n$2class $3 extends RWSViewComponent `
|
|
140
136
|
);
|
|
141
137
|
processedContent = `${template}\n${styles}\n${addedParamDefs.join('\n')}\n` + replacedViewDecoratorContent;
|
|
142
138
|
}
|
|
143
139
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
140
|
processedContent = `${htmlFastImports ? htmlFastImports + '\n' : ''}${processedContent}`;
|
|
148
141
|
}
|
|
149
142
|
|