From 1b64258945369db26d84380a2b22df7a10dfb37a Mon Sep 17 00:00:00 2001 From: Dmytro Khylko Date: Wed, 5 Nov 2025 10:28:13 +0200 Subject: [PATCH 1/4] Exported UI components: `tb-phone-input`, `tb-widget-button` --- .../shared/components/button/public-api.ts | 20 +++++++++++++++++++ .../src/app/shared/components/public-api.ts | 2 ++ ui-ngx/src/app/shared/shared.module.ts | 4 ++-- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 ui-ngx/src/app/shared/components/button/public-api.ts diff --git a/ui-ngx/src/app/shared/components/button/public-api.ts b/ui-ngx/src/app/shared/components/button/public-api.ts new file mode 100644 index 0000000000..e5b2697159 --- /dev/null +++ b/ui-ngx/src/app/shared/components/button/public-api.ts @@ -0,0 +1,20 @@ +/// +/// Copyright © 2016-2025 The Thingsboard Authors +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// + +export * from './copy-button.component'; +export * from './toggle-password.component'; +export * from './widget-button-toggle.component'; +export * from './widget-button.component'; diff --git a/ui-ngx/src/app/shared/components/public-api.ts b/ui-ngx/src/app/shared/components/public-api.ts index 6c068515aa..dbf0e89797 100644 --- a/ui-ngx/src/app/shared/components/public-api.ts +++ b/ui-ngx/src/app/shared/components/public-api.ts @@ -32,3 +32,5 @@ export * from './hint-tooltip-icon.component'; export * from './grid/scroll-grid-datasource'; export * from './grid/scroll-grid.component'; export * from './table/table-datasource.abstract'; +export * from './button/public-api'; +export * from './phone-input.component'; diff --git a/ui-ngx/src/app/shared/shared.module.ts b/ui-ngx/src/app/shared/shared.module.ts index b94e72d76f..80ea2aa274 100644 --- a/ui-ngx/src/app/shared/shared.module.ts +++ b/ui-ngx/src/app/shared/shared.module.ts @@ -170,7 +170,7 @@ import { SafePipe } from '@shared/pipe/safe.pipe'; import { DragDropModule } from '@angular/cdk/drag-drop'; import { MultipleImageInputComponent } from '@shared/components/multiple-image-input.component'; import { BranchAutocompleteComponent } from '@shared/components/vc/branch-autocomplete.component'; -import { PhoneInputComponent } from '@shared/components/phone-input.component'; +import { PhoneInputComponent } from './components/phone-input.component'; import { CustomDateAdapter } from '@shared/adapter/custom-datatime-adapter'; import { CustomPaginatorIntl } from '@shared/services/custom-paginator-intl'; import { TbScriptLangComponent } from '@shared/components/script-lang.component'; @@ -208,7 +208,7 @@ import { MultipleGalleryImageInputComponent } from '@shared/components/image/mul import { EmbedImageDialogComponent } from '@shared/components/image/embed-image-dialog.component'; import { ImageGalleryDialogComponent } from '@shared/components/image/image-gallery-dialog.component'; import { RuleChainSelectPanelComponent } from '@shared/components/rule-chain/rule-chain-select-panel.component'; -import { WidgetButtonComponent } from '@shared/components/button/widget-button.component'; +import { WidgetButtonComponent } from './components/button/widget-button.component'; import { HexInputComponent } from '@shared/components/color-picker/hex-input.component'; import { TimezoneComponent } from '@shared/components/time/timezone.component'; import { TimezonePanelComponent } from '@shared/components/time/timezone-panel.component'; From 565e79b49426659ff0d0c02b967cb6cbd4123109 Mon Sep 17 00:00:00 2001 From: Dmytro Khylko Date: Wed, 5 Nov 2025 14:39:34 +0200 Subject: [PATCH 2/4] Changed components export from relative in shared.module.ts to modules-map.ts --- ui-ngx/src/app/modules/common/modules-map.ts | 8 ++++++-- ui-ngx/src/app/shared/shared.module.ts | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/common/modules-map.ts b/ui-ngx/src/app/modules/common/modules-map.ts index 0890b9e623..3ec89f0b24 100644 --- a/ui-ngx/src/app/modules/common/modules-map.ts +++ b/ui-ngx/src/app/modules/common/modules-map.ts @@ -178,6 +178,8 @@ import * as OtaPackageAutocompleteComponent from '@shared/components/ota-package import * as WidgetsBundleSearchComponent from '@shared/components/widgets-bundle-search.component'; import * as CopyButtonComponent from '@shared/components/button/copy-button.component'; import * as TogglePasswordComponent from '@shared/components/button/toggle-password.component'; +import * as WidgetButtonComponent from '@shared/components/button/widget-button.component'; +import * as WidgetButtonToggleComponent from '@shared/components/button/widget-button-toggle.component'; import * as ProtobufContentComponent from '@shared/components/protobuf-content.component'; import * as SlackConversationAutocompleteComponent from '@shared/components/slack-conversation-autocomplete.component'; import * as StringItemsListComponent from '@shared/components/string-items-list.component'; @@ -191,7 +193,7 @@ import * as ScrollGridComponent from '@shared/components/grid/scroll-grid.compon import * as GalleryImageInputComponent from '@shared/components/image/gallery-image-input.component'; import * as MultipleGalleryImageInputComponent from '@shared/components/image/multiple-gallery-image-input.component'; import * as TbPopoverService from '@shared/components/popover.service'; - +import * as PhoneInputComponent from '@shared/components/phone-input.component'; import * as CssUnitSelectComponent from '@home/components/widget/lib/settings/common/css-unit-select.component'; import * as WidgetActionsPanelComponent from '@home/components/widget/config/basic/common/widget-actions-panel.component'; @@ -520,6 +522,8 @@ class ModulesMap implements IModulesMap { '@shared/components/widgets-bundle-search.component': WidgetsBundleSearchComponent, '@shared/components/button/copy-button.component': CopyButtonComponent, '@shared/components/button/toggle-password.component': TogglePasswordComponent, + '@shared/components/button/widget-button.component': WidgetButtonComponent, + '@shared/components/button/widget-button-toggle.component': WidgetButtonToggleComponent, '@shared/components/protobuf-content.component': ProtobufContentComponent, '@shared/components/slack-conversation-autocomplete.component': SlackConversationAutocompleteComponent, '@shared/components/string-items-list.component': StringItemsListComponent, @@ -533,7 +537,7 @@ class ModulesMap implements IModulesMap { '@shared/components/image/gallery-image-input.component': GalleryImageInputComponent, '@shared/components/image/multiple-gallery-image-input.component': MultipleGalleryImageInputComponent, '@shared/components/popover.service': TbPopoverService, - + '@shared/components/phone-input.component': PhoneInputComponent, '@home/components/alarm/alarm-filter-config.component': AlarmFilterConfigComponent, '@home/components/alarm/alarm-comment-dialog.component': AlarmCommentDialogComponent, diff --git a/ui-ngx/src/app/shared/shared.module.ts b/ui-ngx/src/app/shared/shared.module.ts index 80ea2aa274..b94e72d76f 100644 --- a/ui-ngx/src/app/shared/shared.module.ts +++ b/ui-ngx/src/app/shared/shared.module.ts @@ -170,7 +170,7 @@ import { SafePipe } from '@shared/pipe/safe.pipe'; import { DragDropModule } from '@angular/cdk/drag-drop'; import { MultipleImageInputComponent } from '@shared/components/multiple-image-input.component'; import { BranchAutocompleteComponent } from '@shared/components/vc/branch-autocomplete.component'; -import { PhoneInputComponent } from './components/phone-input.component'; +import { PhoneInputComponent } from '@shared/components/phone-input.component'; import { CustomDateAdapter } from '@shared/adapter/custom-datatime-adapter'; import { CustomPaginatorIntl } from '@shared/services/custom-paginator-intl'; import { TbScriptLangComponent } from '@shared/components/script-lang.component'; @@ -208,7 +208,7 @@ import { MultipleGalleryImageInputComponent } from '@shared/components/image/mul import { EmbedImageDialogComponent } from '@shared/components/image/embed-image-dialog.component'; import { ImageGalleryDialogComponent } from '@shared/components/image/image-gallery-dialog.component'; import { RuleChainSelectPanelComponent } from '@shared/components/rule-chain/rule-chain-select-panel.component'; -import { WidgetButtonComponent } from './components/button/widget-button.component'; +import { WidgetButtonComponent } from '@shared/components/button/widget-button.component'; import { HexInputComponent } from '@shared/components/color-picker/hex-input.component'; import { TimezoneComponent } from '@shared/components/time/timezone.component'; import { TimezonePanelComponent } from '@shared/components/time/timezone-panel.component'; From 06bd505b2930ef7dd67720b80107701611e50b82 Mon Sep 17 00:00:00 2001 From: Dmytro Khylko Date: Wed, 5 Nov 2025 15:53:03 +0200 Subject: [PATCH 3/4] Sorted added imports --- ui-ngx/src/app/modules/common/modules-map.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/common/modules-map.ts b/ui-ngx/src/app/modules/common/modules-map.ts index 3ec89f0b24..85690447e3 100644 --- a/ui-ngx/src/app/modules/common/modules-map.ts +++ b/ui-ngx/src/app/modules/common/modules-map.ts @@ -180,6 +180,8 @@ import * as CopyButtonComponent from '@shared/components/button/copy-button.comp import * as TogglePasswordComponent from '@shared/components/button/toggle-password.component'; import * as WidgetButtonComponent from '@shared/components/button/widget-button.component'; import * as WidgetButtonToggleComponent from '@shared/components/button/widget-button-toggle.component'; +import * as PhoneInputComponent from '@shared/components/phone-input.component'; +import * as TbPopoverService from '@shared/components/popover.service'; import * as ProtobufContentComponent from '@shared/components/protobuf-content.component'; import * as SlackConversationAutocompleteComponent from '@shared/components/slack-conversation-autocomplete.component'; import * as StringItemsListComponent from '@shared/components/string-items-list.component'; @@ -192,8 +194,6 @@ import * as HintTooltipIconComponent from '@shared/components/hint-tooltip-icon. import * as ScrollGridComponent from '@shared/components/grid/scroll-grid.component'; import * as GalleryImageInputComponent from '@shared/components/image/gallery-image-input.component'; import * as MultipleGalleryImageInputComponent from '@shared/components/image/multiple-gallery-image-input.component'; -import * as TbPopoverService from '@shared/components/popover.service'; -import * as PhoneInputComponent from '@shared/components/phone-input.component'; import * as CssUnitSelectComponent from '@home/components/widget/lib/settings/common/css-unit-select.component'; import * as WidgetActionsPanelComponent from '@home/components/widget/config/basic/common/widget-actions-panel.component'; @@ -524,6 +524,8 @@ class ModulesMap implements IModulesMap { '@shared/components/button/toggle-password.component': TogglePasswordComponent, '@shared/components/button/widget-button.component': WidgetButtonComponent, '@shared/components/button/widget-button-toggle.component': WidgetButtonToggleComponent, + '@shared/components/popover.service': TbPopoverService, + '@shared/components/phone-input.component': PhoneInputComponent, '@shared/components/protobuf-content.component': ProtobufContentComponent, '@shared/components/slack-conversation-autocomplete.component': SlackConversationAutocompleteComponent, '@shared/components/string-items-list.component': StringItemsListComponent, @@ -536,8 +538,6 @@ class ModulesMap implements IModulesMap { '@shared/components/grid/scroll-grid.component': ScrollGridComponent, '@shared/components/image/gallery-image-input.component': GalleryImageInputComponent, '@shared/components/image/multiple-gallery-image-input.component': MultipleGalleryImageInputComponent, - '@shared/components/popover.service': TbPopoverService, - '@shared/components/phone-input.component': PhoneInputComponent, '@home/components/alarm/alarm-filter-config.component': AlarmFilterConfigComponent, '@home/components/alarm/alarm-comment-dialog.component': AlarmCommentDialogComponent, From 2008735bae6bf8cf3811ae9ef5703a0d26e17b27 Mon Sep 17 00:00:00 2001 From: Dmytro Khylko Date: Wed, 5 Nov 2025 16:03:59 +0200 Subject: [PATCH 4/4] Sorted aded public-api exports --- ui-ngx/src/app/shared/components/public-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/public-api.ts b/ui-ngx/src/app/shared/components/public-api.ts index dbf0e89797..f510328e76 100644 --- a/ui-ngx/src/app/shared/components/public-api.ts +++ b/ui-ngx/src/app/shared/components/public-api.ts @@ -14,6 +14,7 @@ /// limitations under the License. /// +export * from './button/public-api'; export * from './dialog/color-picker-dialog.component'; export * from './dialog/material-icons-dialog.component'; export * from './page.component'; @@ -32,5 +33,4 @@ export * from './hint-tooltip-icon.component'; export * from './grid/scroll-grid-datasource'; export * from './grid/scroll-grid.component'; export * from './table/table-datasource.abstract'; -export * from './button/public-api'; export * from './phone-input.component';