@workday/canvas-kit-docs 8.5.2 → 8.5.4
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/dist/es6/docgen/plugins/enhancedComponentParser.d.ts.map +1 -1
- package/dist/es6/docgen/plugins/enhancedComponentParser.js +8 -2
- package/dist/es6/lib/docs.js +0 -2469
- package/dist/es6/lib/widgetUtils.d.ts.map +1 -1
- package/dist/es6/lib/widgetUtils.js +78 -22
- package/lib/widgetUtils.tsx +150 -34
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enhancedComponentParser.d.ts","sourceRoot":"","sources":["../../../../docgen/plugins/enhancedComponentParser.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,eAAe,CAAC;AA2IvB,aAAK,eAAe,GAChB,sBAAsB,GACtB,gBAAgB,GAChB,kBAAkB,GAClB,0BAA0B,GAC1B,0BAA0B,CAAC;AAE/B,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"enhancedComponentParser.d.ts","sourceRoot":"","sources":["../../../../docgen/plugins/enhancedComponentParser.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,eAAe,CAAC;AA2IvB,aAAK,eAAe,GAChB,sBAAsB,GACtB,gBAAgB,GAChB,kBAAkB,GAClB,0BAA0B,GAC1B,0BAA0B,CAAC;AAE/B,eAAO,MAAM,uBAAuB,sDAmYlC,CAAC"}
|
|
@@ -363,9 +363,11 @@ export var enhancedComponentParser = createParserPlugin(function (node, parser)
|
|
|
363
363
|
var type = node.initializer.typeArguments
|
|
364
364
|
? parser.checker.getTypeAtLocation(node.initializer.typeArguments[0])
|
|
365
365
|
: undefined;
|
|
366
|
-
var props = (type ? getComponentProps(parser, signature, type, baseElement) : [])
|
|
366
|
+
var props = (type ? getComponentProps(parser, signature, type, baseElement) : [])
|
|
367
|
+
.filter(
|
|
367
368
|
// Filter out `model` and `elemPropsHook` that might come if we extend an interface
|
|
368
|
-
function (p) { return !['model', 'elemPropsHook'].includes(p.name); })
|
|
369
|
+
function (p) { return !['model', 'elemPropsHook'].includes(p.name); })
|
|
370
|
+
.filter(filterOutModelProps);
|
|
369
371
|
props.push(getModelProp(parser, modelName));
|
|
370
372
|
props.push(getElemProp(parser, modelName));
|
|
371
373
|
var styleComponent = getStyleComponent(displayName, props);
|
|
@@ -421,6 +423,10 @@ export var enhancedComponentParser = createParserPlugin(function (node, parser)
|
|
|
421
423
|
}
|
|
422
424
|
return undefined;
|
|
423
425
|
});
|
|
426
|
+
function filterOutModelProps(prop) {
|
|
427
|
+
var _a, _b;
|
|
428
|
+
return !((_b = (_a = prop.declarations[0]) === null || _a === void 0 ? void 0 : _a.filePath) === null || _b === void 0 ? void 0 : _b.includes('Model.ts'));
|
|
429
|
+
}
|
|
424
430
|
function getDisplayName(parser, node) {
|
|
425
431
|
if (t.isObjectLiteralExpression(node)) {
|
|
426
432
|
var displayProperty = node.properties.find(function (p) { return p.name && t.isIdentifier(p.name) && p.name.text === 'displayName'; });
|