From 73181ef4f96bfcde22f6629250f46f374035afdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Mon, 1 Jul 2024 18:17:47 +0300 Subject: [PATCH] Message | Fix type mismatch --- src/app/components/message/message.ts | 4 +- src/app/showcase/doc/apidoc/index.json | 71 +++++++++----------------- 2 files changed, 27 insertions(+), 48 deletions(-) diff --git a/src/app/components/message/message.ts b/src/app/components/message/message.ts index 5387ee5aa35..4f976e39d0f 100755 --- a/src/app/components/message/message.ts +++ b/src/app/components/message/message.ts @@ -36,7 +36,7 @@ export class UIMessage { * Severity level of the message. * @group Props */ - @Input() severity: 'success' | 'info' | 'warning' | 'danger' | 'help' | 'primary' | 'secondary' | 'contrast' | null | undefined; + @Input() severity: 'success' | 'info' | 'warn' | 'error' | 'help' | 'primary' | 'secondary' | 'contrast' | string | null | undefined; /** * Text content. * @group Props @@ -60,7 +60,7 @@ export class UIMessage { get icon() { if (this.severity) { - return this.severity === 'success' ? 'success' : this.severity === 'info' ? 'info' : this.severity === 'warning' ? 'warn' : this.severity === 'danger' ? 'error' : 'info'; + return this.severity; } else { return 'info'; } diff --git a/src/app/showcase/doc/apidoc/index.json b/src/app/showcase/doc/apidoc/index.json index a316803b222..64913dd3ba0 100644 --- a/src/app/showcase/doc/apidoc/index.json +++ b/src/app/showcase/doc/apidoc/index.json @@ -702,8 +702,7 @@ "name": "forceUpdate", "optional": true, "readonly": false, - "type": "Function", - "description": "A function that can be called to force an update in the lazy loaded data." + "type": "Function" } ] } @@ -805,8 +804,7 @@ "name": "command", "optional": true, "readonly": false, - "type": "Function", - "description": "Callback to execute when item is clicked." + "type": "Function" }, { "name": "url", @@ -1274,7 +1272,7 @@ "name": "severity", "optional": false, "readonly": false, - "type": "\"success\" | \"info\" | \"warning\" | \"primary\" | \"help\" | \"danger\" | \"secondary\" | \"contrast\"", + "type": "string", "description": "Severity level of the message." }, { @@ -1736,8 +1734,7 @@ "name": "listener", "optional": true, "readonly": false, - "type": "Function", - "description": "A listener function for handling events related to the overlay." + "type": "Function" }, { "name": "responsive", @@ -1750,43 +1747,37 @@ "name": "onBeforeShow", "optional": true, "readonly": false, - "type": "Function", - "description": "A callback function that is invoked before the overlay is shown." + "type": "Function" }, { "name": "onShow", "optional": true, "readonly": false, - "type": "Function", - "description": "A callback function that is invoked when the overlay is shown." + "type": "Function" }, { "name": "onBeforeHide", "optional": true, "readonly": false, - "type": "Function", - "description": "A callback function that is invoked before the overlay is hidden." + "type": "Function" }, { "name": "onHide", "optional": true, "readonly": false, - "type": "Function", - "description": "A callback function that is invoked when the overlay is hidden." + "type": "Function" }, { "name": "onAnimationStart", "optional": true, "readonly": false, - "type": "Function", - "description": "A callback function that is invoked when the overlay's animation starts." + "type": "Function" }, { "name": "onAnimationDone", "optional": true, "readonly": false, - "type": "Function", - "description": "A callback function that is invoked when the overlay's animation is done." + "type": "Function" } ] } @@ -5869,7 +5860,7 @@ "parameters": [ { "name": "context", - "type": "{\n \t clickCallBack: undefined, // Click callback\n }", + "type": "{\n \t clickCallBack: undefined, // undefined\n }", "description": "input icon template params." } ], @@ -10591,15 +10582,13 @@ "name": "filter", "optional": true, "readonly": false, - "type": "Function", - "description": "Filter function." + "type": "Function" }, { "name": "reset", "optional": true, "readonly": false, - "type": "Function", - "description": "Reset function." + "type": "Function" } ] } @@ -15173,15 +15162,13 @@ "name": "filter", "optional": true, "readonly": false, - "type": "Function", - "description": "Callback to filter options." + "type": "Function" }, { "name": "reset", "optional": true, "readonly": false, - "type": "Function", - "description": "Callback to reset filter." + "type": "Function" } ] } @@ -16840,7 +16827,7 @@ "parameters": [ { "name": "context", - "type": "{\n \t $implicit: any, // Selected option value.\n \t removeChip: undefined, // Function to remove chip.\n }", + "type": "{\n \t $implicit: any, // Selected option value.\n \t removeChip: undefined, // undefined\n }", "description": "selected items data." } ], @@ -22758,8 +22745,7 @@ "name": "onClick", "optional": false, "readonly": false, - "type": "Function", - "description": "Header click function." + "type": "Function" } ] }, @@ -22820,22 +22806,19 @@ "name": "onClick", "optional": false, "readonly": false, - "type": "Function", - "description": "Content click function." + "type": "Function" }, { "name": "prevCallback", "optional": false, "readonly": false, - "type": "Function", - "description": "Content previous panel click function." + "type": "Function" }, { "name": "nextCallback", "optional": false, "readonly": false, - "type": "Function", - "description": "Content next panel click function." + "type": "Function" } ] }, @@ -23255,7 +23238,7 @@ "parameters": [ { "name": "context", - "type": "{\n \t $implicit: string, // filterConstraint.value.\n \t filterCallback: undefined, // filter callback.\n \t type: string, // Type of the input.\n \t filterConstraint: string, // Filter constraint.\n \t placeholder: boolean, // Input placeholder.\n \t minFractionDigits: number, // Minimum fraction of digits.\n \t maxFractionDigits: number, // Maximum fraction of digits.\n \t prefix: string, // Input prefix.\n \t suffix: string, // Input suffix.\n \t locale: string, // Locale.\n \t localeMatcher: string, // Locale matcher.\n \t currency: boolean, // Enables currency input.\n \t currencyDisplay: boolean, // Display of the currency input.\n \t useGrouping: boolean, // Defines if filter grouping will be enabled.\n \t showButtons: boolean, // Defines the visibility of buttons.\n }" + "type": "{\n \t $implicit: string, // filterConstraint.value.\n \t filterCallback: undefined, // undefined\n \t type: string, // Type of the input.\n \t filterConstraint: string, // Filter constraint.\n \t placeholder: boolean, // Input placeholder.\n \t minFractionDigits: number, // Minimum fraction of digits.\n \t maxFractionDigits: number, // Maximum fraction of digits.\n \t prefix: string, // Input prefix.\n \t suffix: string, // Input suffix.\n \t locale: string, // Locale.\n \t localeMatcher: string, // Locale matcher.\n \t currency: boolean, // Enables currency input.\n \t currencyDisplay: boolean, // Display of the currency input.\n \t useGrouping: boolean, // Defines if filter grouping will be enabled.\n \t showButtons: boolean, // Defines the visibility of buttons.\n }" } ], "description": "Custom filter template." @@ -23531,8 +23514,7 @@ "name": "rowSelectable", "optional": false, "readonly": false, - "type": "Function", - "description": "Defines if the row is selectable." + "type": "Function" }, { "name": "rowTrackBy", @@ -25562,15 +25544,13 @@ "name": "sendCommand", "optional": false, "readonly": false, - "type": "Function", - "description": "Emits command value." + "type": "Function" }, { "name": "sendResponse", "optional": false, "readonly": false, - "type": "Function", - "description": "Emits response value." + "type": "Function" } ] } @@ -29228,8 +29208,7 @@ "name": "filterConstraint", "optional": false, "readonly": false, - "type": "Function", - "description": "Filter constraints." + "type": "Function" }, { "name": "isStrictMode",