@rws-framework/client 2.21.0 → 2.21.2
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.
|
@@ -37,8 +37,8 @@ module.exports = async function(content) {
|
|
|
37
37
|
let templateName = null;
|
|
38
38
|
let stylesPath = null;
|
|
39
39
|
|
|
40
|
-
if(decoratorData.decoratorArgs){
|
|
41
|
-
const decoratorArgs =
|
|
40
|
+
if(decoratorData.decoratorArgs){
|
|
41
|
+
const decoratorArgs = decoratorData.decoratorArgs
|
|
42
42
|
|
|
43
43
|
if(decoratorArgs.template){
|
|
44
44
|
templateName = decoratorData.decoratorArgs.template || null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
|
+
const json5 = require('json5');
|
|
2
3
|
const fs = require('fs');
|
|
3
4
|
const os = require('os');
|
|
4
5
|
|
|
@@ -191,14 +192,22 @@ function extractRWSViewArgs(content, noReplace = false) {
|
|
|
191
192
|
|
|
192
193
|
let fastOptions = _defaultRWSLoaderOptions.fastOptions;
|
|
193
194
|
|
|
195
|
+
if(decoratorArgs && decoratorArgs !== ''){
|
|
196
|
+
try {
|
|
197
|
+
decoratorArgs = json5.parse(decoratorArgs);
|
|
198
|
+
}catch(e){
|
|
199
|
+
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
194
203
|
if (decoratorArgs && decoratorArgs.fastElementOptions) {
|
|
195
204
|
fastOptions = decoratorArgs.fastElementOptions;
|
|
196
205
|
}
|
|
197
206
|
|
|
198
207
|
let replacedDecorator = null;
|
|
199
208
|
|
|
200
|
-
if(!noReplace){
|
|
201
|
-
const [addedParamDefs, addedParams] = _extractRWSViewDefs(fastOptions, decoratorArgs);
|
|
209
|
+
if(!noReplace){
|
|
210
|
+
const [addedParamDefs, addedParams] = _extractRWSViewDefs(fastOptions, decoratorArgs);
|
|
202
211
|
const replacedViewDecoratorContent = processedContent.replace(
|
|
203
212
|
viewReg,
|
|
204
213
|
`@RWSView('$1', null, { template: rwsTemplate, styles${addedParams.length ? ', options: {' + (addedParams.join(', ')) + '}' : ''} })\n$3class $4 extends RWSViewComponent `
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -15,7 +15,6 @@ import RWSWindow, { RWSWindowComponentRegister, loadRWSRichWindow } from './type
|
|
|
15
15
|
|
|
16
16
|
import { DI, Container, Registration } from './components/_container';
|
|
17
17
|
|
|
18
|
-
import { declareRWSComponents } from './components/index';
|
|
19
18
|
import RWSContainer from './components/_container';
|
|
20
19
|
import TheRWSService from './services/_service';
|
|
21
20
|
|
|
@@ -206,4 +205,4 @@ class RWSClient {
|
|
|
206
205
|
}
|
|
207
206
|
|
|
208
207
|
export default DI.createInterface<RWSClient>(x => x.singleton(RWSClient));
|
|
209
|
-
export { RWSClient as RWSClientInstance
|
|
208
|
+
export { RWSClient as RWSClientInstance };
|
|
@@ -11,7 +11,9 @@ import { handleExternalChange } from './_attrs/_external_handler';
|
|
|
11
11
|
interface RWSDecoratorOptions {
|
|
12
12
|
template?: string,
|
|
13
13
|
styles?: string,
|
|
14
|
-
fastElementOptions?:
|
|
14
|
+
fastElementOptions?: {
|
|
15
|
+
shadowOptions?: ShadowRootInit
|
|
16
|
+
},
|
|
15
17
|
ignorePackaging?: boolean,
|
|
16
18
|
debugPackaging?: boolean
|
|
17
19
|
oreoMode?: boolean
|