From 62882fb42b7289bfd0574c5dfc313e39effb70b1 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 28 May 2020 11:59:23 +0800 Subject: [PATCH] Addon-docs: Update Angular prop extraction snapshots --- .../doc-button/argtypes.snapshot | 130 ++++++++++-------- .../docs/src/frameworks/angular/compodoc.ts | 2 +- 2 files changed, 77 insertions(+), 55 deletions(-) diff --git a/addons/docs/src/frameworks/angular/__testfixtures__/doc-button/argtypes.snapshot b/addons/docs/src/frameworks/angular/__testfixtures__/doc-button/argtypes.snapshot index 82765f71b3b8..2eb0d33f0cba 100644 --- a/addons/docs/src/frameworks/angular/__testfixtures__/doc-button/argtypes.snapshot +++ b/addons/docs/src/frameworks/angular/__testfixtures__/doc-button/argtypes.snapshot @@ -3,9 +3,7 @@ exports[`angular component properties doc-button 1`] = ` Object { "_inputValue": Object { - "defaultValue": Object { - "summary": "'some value'", - }, + "defaultValue": "some value", "description": "", "name": "_inputValue", "table": Object { @@ -15,11 +13,12 @@ Object { "summary": "string", }, }, + "type": Object { + "name": "void", + }, }, "_value": Object { - "defaultValue": Object { - "summary": "'Private hello'", - }, + "defaultValue": "Private hello", "description": "

Private value.

", "name": "_value", @@ -30,11 +29,12 @@ Object { "summary": "string", }, }, + "type": Object { + "name": "void", + }, }, "appearance": Object { - "defaultValue": Object { - "summary": "'secondary'", - }, + "defaultValue": "secondary", "description": "

Appearance style of the button.

", "name": "appearance", @@ -45,11 +45,16 @@ Object { "summary": "\\"primary\\" | \\"secondary\\"", }, }, + "type": Object { + "name": "enum", + "value": Array [ + "primary", + "secondary", + ], + }, }, "buttonRef": Object { - "defaultValue": Object { - "summary": undefined, - }, + "defaultValue": undefined, "description": "", "name": "buttonRef", "table": Object { @@ -59,11 +64,12 @@ Object { "summary": "ElementRef", }, }, + "type": Object { + "name": "void", + }, }, "calc": Object { - "defaultValue": Object { - "summary": "", - }, + "defaultValue": undefined, "description": "

An internal calculation method which adds x and y together.

", "name": "calc", @@ -74,11 +80,12 @@ Object { "summary": "(x: number, y: string | number) => number", }, }, + "type": Object { + "name": "void", + }, }, "inputValue": Object { - "defaultValue": Object { - "summary": undefined, - }, + "defaultValue": undefined, "description": "

Setter for inputValue that is also an @Input.

", "name": "inputValue", @@ -89,11 +96,12 @@ Object { "summary": "string", }, }, + "type": Object { + "name": "string", + }, }, "internalProperty": Object { - "defaultValue": Object { - "summary": "'Public hello'", - }, + "defaultValue": "Public hello", "description": "

Public value.

", "name": "internalProperty", @@ -104,11 +112,12 @@ Object { "summary": "string", }, }, + "type": Object { + "name": "void", + }, }, "isDisabled": Object { - "defaultValue": Object { - "summary": "false", - }, + "defaultValue": false, "description": "

Sets the button to a disabled state.

", "name": "isDisabled", @@ -119,11 +128,12 @@ Object { "summary": undefined, }, }, + "type": Object { + "name": "boolean", + }, }, "item": Object { - "defaultValue": Object { - "summary": undefined, - }, + "defaultValue": undefined, "description": undefined, "name": "item", "table": Object { @@ -133,11 +143,12 @@ Object { "summary": "[]", }, }, + "type": Object { + "name": "object", + }, }, "label": Object { - "defaultValue": Object { - "summary": undefined, - }, + "defaultValue": undefined, "description": "

The inner text of the button.

", "name": "label", @@ -148,11 +159,12 @@ Object { "summary": "string", }, }, + "type": Object { + "name": "string", + }, }, "onClick": Object { - "defaultValue": Object { - "summary": "new EventEmitter()", - }, + "defaultValue": undefined, "description": "

Handler to be called when the button is clicked by a user.

Will also block the emission of the event if isDisabled is true.

", @@ -164,11 +176,12 @@ Object { "summary": "EventEmitter", }, }, + "type": Object { + "name": "void", + }, }, "privateMethod": Object { - "defaultValue": Object { - "summary": "", - }, + "defaultValue": undefined, "description": "

A private method.

", "name": "privateMethod", @@ -179,11 +192,12 @@ Object { "summary": "(password: string) => void", }, }, + "type": Object { + "name": "void", + }, }, "processedItem": Object { - "defaultValue": Object { - "summary": undefined, - }, + "defaultValue": undefined, "description": "", "name": "processedItem", "table": Object { @@ -193,11 +207,12 @@ Object { "summary": "T[]", }, }, + "type": Object { + "name": "void", + }, }, "protectedMethod": Object { - "defaultValue": Object { - "summary": "", - }, + "defaultValue": undefined, "description": "

A protected method.

", "name": "protectedMethod", @@ -208,11 +223,12 @@ Object { "summary": "(id?: number) => void", }, }, + "type": Object { + "name": "void", + }, }, "publicMethod": Object { - "defaultValue": Object { - "summary": "", - }, + "defaultValue": undefined, "description": "

A public method using an interface.

", "name": "publicMethod", @@ -223,11 +239,12 @@ Object { "summary": "(things: ISomeInterface) => void", }, }, + "type": Object { + "name": "void", + }, }, "showKeyAlias": Object { - "defaultValue": Object { - "summary": undefined, - }, + "defaultValue": undefined, "description": undefined, "name": "showKeyAlias", "table": Object { @@ -237,11 +254,12 @@ Object { "summary": "", }, }, + "type": Object { + "name": "void", + }, }, "size": Object { - "defaultValue": Object { - "summary": "'medium'", - }, + "defaultValue": "medium", "description": "

Size of the button.

", "name": "size", @@ -252,11 +270,12 @@ Object { "summary": "ButtonSize", }, }, + "type": Object { + "name": "object", + }, }, "somethingYouShouldNotUse": Object { - "defaultValue": Object { - "summary": "false", - }, + "defaultValue": false, "description": "

Some input you shouldn't use.

", "name": "somethingYouShouldNotUse", @@ -267,6 +286,9 @@ Object { "summary": undefined, }, }, + "type": Object { + "name": "boolean", + }, }, } `; diff --git a/addons/docs/src/frameworks/angular/compodoc.ts b/addons/docs/src/frameworks/angular/compodoc.ts index 747c2d217e4a..a8fef84d7e48 100644 --- a/addons/docs/src/frameworks/angular/compodoc.ts +++ b/addons/docs/src/frameworks/angular/compodoc.ts @@ -127,7 +127,7 @@ const extractDefaultValue = (property: Property) => { const value = eval(property.defaultValue); return value; } catch (err) { - logger.warn(`Error extracting ${property.name}: $ {property.defaultValue}`); + logger.info(`Error extracting ${property.name}: $ {property.defaultValue}`); return undefined; } };