@rws-framework/client 2.10.5 → 2.10.8
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
package/src/client/components.ts
CHANGED
|
@@ -41,8 +41,6 @@ async function loadPartedComponents(this: RWSClientInstance): Promise<RWSInfoTyp
|
|
|
41
41
|
function defineAllComponents() {
|
|
42
42
|
const richWindowComponents: RWSWindowComponentRegister = (window as Window & RWSWindow).RWS.components;
|
|
43
43
|
|
|
44
|
-
console.log({richWindowComponents})
|
|
45
|
-
|
|
46
44
|
Object.keys(richWindowComponents).map(key => richWindowComponents[key].component).forEach((el: IWithCompose<RWSViewComponent>) => {
|
|
47
45
|
el.define(el as any, el.definition);
|
|
48
46
|
});
|
|
@@ -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;
|
|
@@ -123,23 +123,21 @@ let rwsTemplate: any = T.html\`${templateContent}\`;
|
|
|
123
123
|
|
|
124
124
|
// The result can be accessed through the `m`-variable.
|
|
125
125
|
m.forEach((match, groupIndex) => {
|
|
126
|
-
if(groupIndex ===
|
|
126
|
+
if(groupIndex === 3){
|
|
127
127
|
className = match;
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
-
}
|
|
130
|
+
}
|
|
131
|
+
|
|
131
132
|
|
|
132
133
|
if(className){
|
|
133
134
|
const replacedViewDecoratorContent = processedContent.replace(
|
|
134
135
|
viewReg,
|
|
135
|
-
`@RWSView('$1', null, { template: rwsTemplate, styles${addedParams.length? ', options: {' + (addedParams.join(', ')) + '}': ''} })\
|
|
136
|
+
`@RWSView('$1', null, { template: rwsTemplate, styles${addedParams.length? ', options: {' + (addedParams.join(', ')) + '}': ''} })\n$2class $3 extends RWSViewComponent `
|
|
136
137
|
);
|
|
137
138
|
processedContent = `${template}\n${styles}\n${addedParamDefs.join('\n')}\n` + replacedViewDecoratorContent;
|
|
138
|
-
}
|
|
139
|
+
}
|
|
139
140
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
141
|
processedContent = `${htmlFastImports ? htmlFastImports + '\n' : ''}${processedContent}`;
|
|
144
142
|
}
|
|
145
143
|
|