File

src/app/shared/widgets/widget.module.ts

Declarations

import { ModuleWithProviders, NgModule } from "@angular/core";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { CommonModule } from "@angular/common";

import {
  EmptyWidgetComponent,
  SwitchLayoutWidgetComponent,
  InteractionLayoutWidgetComponent,
} from "./layoutcontainer/layoutcontainer.component";

import { HeaderAssetDetailsWidgetComponent } from "./buy/head-assetdetails/head-assetdetails.component";
import { AttributeListWidgetComponent } from "./buy/attributelist/attributelist.component";
import { ItemWidgetComponent } from "./itemlist/itemlist.component";
import { TextListWidgetComponent } from "./buy/textlist/textlist.component";
import { LightTableWidgetComponent } from "./buy/lighttable/lighttable.component";
import { CategoryWidgetComponent } from "./buy/category/category.component";
import { SearchWidgetComponent } from "./buy/search/search.component";
import { SearchAttributesWidgetComponent } from "./buy/search-attributes/search-attributes.component";
import { StartdownloadWidgetComponent } from "./buy/startdownload/startdownload.component";
import { ProductSearchResetWidgetComponent } from "./buy/productsearchreset/productsearchreset.component";
import { SynchronizeDataWidgetComponent } from "./buy/synchronization/synchronization.component";
import { MenuWidgetComponent } from "./buttons/menu/menuwidget.component";

import { ClearButtonWidgetComponent } from "./buttons/clearbutton/clearbutton.component";
import { EventButtonWidgetComponent } from "./buttons/eventbutton/eventbutton.component";
import { EventIconButtonWidgetComponent } from "./buttons/eventiconbutton/eventiconbutton.component";
import { EventWidgetButtonWidgetComponent } from "./buttons/eventwidgetbutton/eventwidgetbutton.component";
import { TabsWidgetComponent } from "./tabs/tabs.component";
import { ActionButtonWidgetComponent } from "./buttons/actionbutton/actionbutton.component";
import { ListComponentWidget } from "./list/list.component";
import { DocumentationListWidgetComponent } from "./portal/documentationlist/documentationlist.component";
import { ConfigWidgetComponent } from "./portal/config/config.component";
import { KibanaAdminWidgetComponent } from "./analytics/kibana-admin/kibana-admin.component";
import { ModulesComponentWidget } from "./portal/modules/modules.component";
import { WorklistsComponentWidget } from "./portal/worklists/worklists.component";
import { AddModuleDialogComponent } from "./portal/modules/addModuleDialog.component";
import { ModuleService } from "./portal/modules/module.service";
import { InfoProductStatusComponentWidget } from "./portal/info-productstatus/info-productstatus.component";
import { InfoLastUpdateComponentWidget } from "./portal/info-lastupdate/info-lastupdate.component";
import { InfoCountComponentWidget } from "./portal/info-itemcount/info-count.component";
import {
  WorklistexportComponent,
  WorklistexportComponentPopup,
  WorklistexportService,
} from "./analytics/worklistexport/index";
import { LinkExportComponent } from "./analytics/linkexport/index";
import { LoginComponent } from "./login/login.component";
import { ListService } from "./list/list.service";
import { ExternalModule } from "../../app.module.external";
import { WidgetframeService } from "./widgetframe/widgetframe.service";
import { NmPageComponent } from "./page.component";
import { FormInputComponent } from "./form/input.component";
import { FormDatepickerComponent } from "./form/datepicker.component";
import { FooterWidgetComponent } from "./footer/footer.component";
import { NmFormComponent } from "./form.component";
import { FormSelectDynamicSubFormComponent } from "./form/dynamic-form.component";
import { FormSelectComponent } from "./form/select.component";
import { IframeWidgetComponent } from "./iframe/iframe.component";
import { NmSharedModule } from "./../../nm.shared.module";
import {
  ExportConfigComponent,
  ExportConfigService,
} from "./buy/exportconfig/index";
import { GoogleTranslateComponent } from "./apps/google-translate/google-translate.component";
import { ClickworkerComponent } from "./apps/clickworker/clickworker.component";
import { IagentReviewComponent } from "./apps/iagent-review/iagent-review.component";
import { OverviewWidgetComponent } from "./apps/ipim-content-object/content-overview/overview.component";
import { IshopRatingsComponent } from "./apps/ishop-ratings/ishop-ratings.component";
import { IpimMobileComponent } from "./apps/ipim-mobile/ipim-mobile.component";
import { ProductInfoWidgetComponent } from "./apps/my-texter/product-info/index";
import { ItemInfoWidgetComponent } from "./apps/my-texter/item-info/index";
import { EditAttributesWidgetComponent } from "./edit-attributes/index";
import { EditTextAndAttributesWidgetComponent } from "./apps/my-text-edit/edit-text-and-attributes/index";
import { ProductInfoViewWidgetComponent } from "./apps/my-text-edit/product-info-view/index";
import { EditFooterWidgetComponent } from "./edit-footer/index";
import {
  EditFooterTextGenerationWidgetComponent,
  EditFooterTextgenPopupComponent,
} from "./apps/my-texter/edit-footer-textgen/index";
import { ItemListSelectionWidgetComponent } from "./apps/my-texter/item-list/item-list.component";
import { SelectWidgetComponent } from "./select/index";
import { LabelWidgetComponent } from "./label/index";
import { HtmlContentWidgetComponent } from "./html-content/html-content.component";
import { EditInputWidgetComponent } from "./edit-input/index";
import { CopyProductAttributesWidgetComponent } from "./apps/my-client-copy/copy-product-attributes/index";
import {
  CopyAssetsPopupComponent,
  CopyItemAttributesWidgetComponent,
} from "./apps/my-client-copy/copy-item-attributes/index";
import { CopyProductAssetsWidgetComponent } from "./apps/my-client-copy/copy-product-assets/index";
import { ColorListWidgetComponent } from "./apps/my-shop-md/color-list/index";
import { ColorListSortWidgetComponent } from "./apps/my-shop-md/color-list-sort/index";
import { ColorSearchWidgetComponent } from "./apps/my-shop-md/color-search/index";
import { ColorSearchButtonWidgetComponent } from "./apps/my-shop-md/color-search-button/index";
import {
  ShopCategoryDetailsPopupComponent,
  ShopCategoryPropertiesPopupComponent,
  ShopCategoryWidgetComponent,
} from "./apps/my-shop-md/shop-category/index";

import { AppGlobalChannelsService } from "./configuration/app.global-channels.service";
import { DatafeeddownloadWidgetComponent } from "./apps/category-feed/datafeed-download/datafeed-download.component";
import { HalActionButtonComponent } from "./buy/hal-action/hal-action-button.component";
import { PopoverModule } from "ngx-bootstrap/popover";
import { WorkflowViewerComponent } from "./portal/workflow-viewer/workflow-viewer.component";
import { BpmnjsViewerComponent } from "./portal/workflow-viewer/bmnjs-viewer/bpmnjs-viewer.component";
import { ButtonContainerWidgetComponent } from "./buttons/buttoncontainer/buttoncontainer.component";
import { HeaderWidgetComponent } from "./buy/head/head.component";
import { IMarketProgressComponent } from "./apps/imarket/progress/imarket-progress.component";
import { DataListComponentWidget } from "./data-list/data-list.component.widget";
import { SearchAppSearchWidgetComponent } from "./search-app-search-widget/search-app-search-widget.component";
import { SearchAppSearchWidgetInputComponent } from "./search-app-search-widget/search-app-search-input/search-app-search-widget-input.component";
import { HistorySearchWidgetComponent } from "./apps/history/search/search.component";
import { WorklistSelectComponentWidget } from "./worklist-select/worklist-select.component";
import { EditVisibleFieldsDialog } from "./search-app-search-widget/edit-visible-fields-dialog/edit-visible-fields-dialog.component";
import { RatingSearchWidgetComponent } from "./search/rating-search-widget.component";
import { SearchAttributeSelectionDialog } from "./search/attribute-selection/search-attribute-selection.component";
import { SearchAttributeConfigurationDialog } from "./search/attribute-configuration/search-attribute-configuration.component";
import { CreateFolderEntryDialogComponent } from "./worklist-select/worklist-create-dialog/create-folder-entry-dialog.component";
import { DataHierarchicalListComponentWidget } from "./data-list/data-hierarchical-list.component";
import { DataListHierachicalComponent } from "./data-list/data-list-hierachical-component/data-list-hierachical.component";
import { PriceAppAddPriceComponent } from "./price-app/price-app-add-price/price-app-add-price.component";
import { DefaultDataListFooterComponent } from "./data-list/default-footer-component/default-data-list-footer.component";
import { TextAppMultiEditComponent } from "../components/text-app/multi-edit/text-app-multi-edit.component";
import { DynamicFormComponentWidget } from "./dynamic-form/dynamic-form.component.widget";
import { AttributeBulkEditDialog } from "../components/attribute-bulk-edit-dialog/attribute-bulk-edit-dialog";
import { TableConfigWidgetComponent } from "./configuration/table-config/table-config.component";
import { TreeGridComponent } from "./tree-grid/tree-grid.component";
import { ListCellSentimentsWidgetComponent } from "./data-list/list-cell-widgets/list-cell-sentiments/list-cell-sentiments-widget.component";
import { ListCellInteractionLinkWidgetComponent } from "./data-list/list-cell-widgets/list-cell-interaction-link/list-cell-interaction-link-widget.component";
import { DataListTreeComponentWidget } from "./data-list/data-list-tree.component.widget";
import { AutoCompleteComponentWidget } from "./autocomplete/autocomplete.component";
import { ProductDetailsKpiComponent } from "./apps/product-details/kpi/product-details-kpi.component";
import { SearchArticleSelectionComponent } from "./search/article-selection/search-article-selection.component";
import {
  CellClassesCallbackRegistry,
  ControllerRegistry,
  HeaderClassesCallbackRegistry,
} from "./configuration";
import { SelectAssetControllerFactory } from "../components/select-asset/SelectAssetController";
import { StepperWidgetComponent } from "./stepper/stepper-widget.component";
import { ConfigService } from "./portal/config/config.service";
import { VerticalBarChartStackedWidgetComponent } from "./vertical-bar-chart-stacked/vertical-bar-chart-stacked.component";
import { DateTimeRangePickerWidgetComponent } from "./date-time-range-picker/date-time-range-picker.component.widget";
import { SelectUserRightControllerFactory } from "../components/select-userRight/SelectUserRightController";
import { SelectWorklistControllerFactory } from "../components/select-worklist/SelectWorklistController";

import { FileUploadComponentWidget } from "./upload/file-upload.component";
import { FilePreviewComponent } from "./upload/preview/file-preview.component";

import { ActionbarWidgetComponent } from "./actionbar/actionbar.component";
import { TypePickerWidgetComponent } from "./apps/actions/copy-from/type-picker.component.widget";
import { AddCategoryControllerFactory } from "../components/controller/add-category/AddCategoryController";
import { JobDowntimeWidget } from "./jobs/downtime/job-downtime.component";
import { JobParametersWidget } from "./jobs/parameters/job-parameters.component";
import { JobSettingsWidget } from "./jobs/settings/job-settings.component";
import { EditComplexTypeControllerFactory } from "../components/controller/EditComplexTypeController";
import { SelectTableOperationsComponent } from "../widgets/select-table-operations/select-table-operations.component";
import { ExcelConfigControllerFactory } from "../components/controller/ExcelConfigController";
import { Attributes } from "../components/edit-attribute";
import { InfoDetailsComponentWidget } from "./info-details/info-details.component";
import { TimeSeriesChartWidgetComponent } from "./charts/time-series-chart/time-series-chart.component";
import { SelectContextComponent } from "./select-context/select-context.component";
import { ListCellChipSelect } from "./data-list/list-cell-chip-select/list-cell-chip-select-widget.component";
import { ExpansionPanelWidgetComponent } from "./expansion-panel/expansion-panel.component";
import { IMarketWidgetsModule } from "./imarket-widget.module";
import { registerWidgetComponents } from "./widget.metadata.registry";
import { SelectComboComponent } from "./select-combo/select-combo.component";
import { EditTextControllerFactory } from "../components/controller/EditTextController";

registerWidgetComponents([
  ActionbarWidgetComponent,
  ActionButtonWidgetComponent,
  AddModuleDialogComponent,
  AttributeBulkEditDialog,
  AttributeListWidgetComponent,
  BpmnjsViewerComponent,
  ButtonContainerWidgetComponent,
  CategoryWidgetComponent,
  ClearButtonWidgetComponent,
  ClickworkerComponent,
  ColorListSortWidgetComponent,
  ColorListWidgetComponent,
  ColorSearchButtonWidgetComponent,
  ColorSearchWidgetComponent,
  ConfigWidgetComponent,
  CopyAssetsPopupComponent,
  CopyItemAttributesWidgetComponent,
  CopyProductAssetsWidgetComponent,
  CopyProductAttributesWidgetComponent,
  CreateFolderEntryDialogComponent,
  DataHierarchicalListComponentWidget,
  DataListComponentWidget,
  DatafeeddownloadWidgetComponent,
  DefaultDataListFooterComponent,
  DocumentationListWidgetComponent,
  DynamicFormComponentWidget,
  EditAttributesWidgetComponent,
  EditFooterTextGenerationWidgetComponent,
  EditFooterTextgenPopupComponent,
  EditFooterWidgetComponent,
  EditInputWidgetComponent,
  EditTextAndAttributesWidgetComponent,
  EditVisibleFieldsDialog,
  EmptyWidgetComponent,
  EventButtonWidgetComponent,
  EventIconButtonWidgetComponent,
  EventWidgetButtonWidgetComponent,
  ExportConfigComponent,
  FooterWidgetComponent,
  FormDatepickerComponent,
  FormInputComponent,
  FormSelectComponent,
  FormSelectDynamicSubFormComponent,
  GoogleTranslateComponent,
  HalActionButtonComponent,
  HeaderAssetDetailsWidgetComponent,
  HeaderWidgetComponent,
  HistorySearchWidgetComponent,
  HtmlContentWidgetComponent,
  IagentReviewComponent,
  IframeWidgetComponent,
  IMarketProgressComponent,
  InfoCountComponentWidget,
  InfoLastUpdateComponentWidget,
  InfoProductStatusComponentWidget,
  IpimMobileComponent,
  IshopRatingsComponent,
  ItemInfoWidgetComponent,
  ItemListSelectionWidgetComponent,
  ItemWidgetComponent,
  KibanaAdminWidgetComponent,
  LabelWidgetComponent,
  LightTableWidgetComponent,
  LinkExportComponent,
  ListCellSentimentsWidgetComponent,
  ListCellInteractionLinkWidgetComponent,
  ListComponentWidget,
  DataListTreeComponentWidget,
  LoginComponent,
  MenuWidgetComponent,
  WorklistsComponentWidget,
  ModulesComponentWidget,
  NmFormComponent,
  NmPageComponent,
  OverviewWidgetComponent,
  PriceAppAddPriceComponent,
  ProductDetailsKpiComponent,
  ProductInfoViewWidgetComponent,
  ProductInfoWidgetComponent,
  ProductSearchResetWidgetComponent,
  SearchAppSearchWidgetComponent,
  SearchAttributesWidgetComponent,
  StepperWidgetComponent,
  RatingSearchWidgetComponent,
  SearchArticleSelectionComponent,
  SearchAttributeSelectionDialog,
  SearchAttributeConfigurationDialog,
  SearchWidgetComponent,
  SelectComboComponent,
  SelectWidgetComponent,
  ShopCategoryDetailsPopupComponent,
  ShopCategoryPropertiesPopupComponent,
  ShopCategoryWidgetComponent,
  StartdownloadWidgetComponent,
  SwitchLayoutWidgetComponent,
  InteractionLayoutWidgetComponent,
  SynchronizeDataWidgetComponent,
  TableConfigWidgetComponent,
  TabsWidgetComponent,
  TextAppMultiEditComponent,
  TextListWidgetComponent,
  TreeGridComponent,
  WorkflowViewerComponent,
  WorklistSelectComponentWidget,
  WorklistexportComponent,
  WorklistexportComponentPopup,
  WorkflowViewerComponent,
  SearchAppSearchWidgetComponent,
  WorklistSelectComponentWidget,
  MenuWidgetComponent,
  DynamicFormComponentWidget,
  VerticalBarChartStackedWidgetComponent,
  AutoCompleteComponentWidget,
  DateTimeRangePickerWidgetComponent,
  FileUploadComponentWidget,
  TypePickerWidgetComponent,
  JobDowntimeWidget,
  JobParametersWidget,
  JobSettingsWidget,
  SelectTableOperationsComponent,
  InfoDetailsComponentWidget,
  TimeSeriesChartWidgetComponent,
  SelectContextComponent,
  ListCellChipSelect,
  ExpansionPanelWidgetComponent,
]);

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    NmSharedModule,
    ExternalModule,
    IMarketWidgetsModule,
    PopoverModule.forRoot(),
  ],
  declarations: [
    FileUploadComponentWidget,
    FilePreviewComponent,
    ActionbarWidgetComponent,
    ActionButtonWidgetComponent,
    AddModuleDialogComponent,
    AttributeBulkEditDialog,
    AttributeListWidgetComponent,
    BpmnjsViewerComponent,
    ButtonContainerWidgetComponent,
    CategoryWidgetComponent,
    ClearButtonWidgetComponent,
    ClickworkerComponent,
    ColorListSortWidgetComponent,
    ColorListWidgetComponent,
    ColorSearchButtonWidgetComponent,
    ColorSearchWidgetComponent,
    ConfigWidgetComponent,
    CopyAssetsPopupComponent,
    CopyItemAttributesWidgetComponent,
    CopyProductAssetsWidgetComponent,
    CopyProductAttributesWidgetComponent,
    CreateFolderEntryDialogComponent,
    DataHierarchicalListComponentWidget,
    DataListComponentWidget,
    DataListHierachicalComponent,
    DatafeeddownloadWidgetComponent,
    DefaultDataListFooterComponent,
    DocumentationListWidgetComponent,
    DynamicFormComponentWidget,
    EditAttributesWidgetComponent,
    EditFooterTextGenerationWidgetComponent,
    EditFooterTextgenPopupComponent,
    EditFooterWidgetComponent,
    EditInputWidgetComponent,
    EditTextAndAttributesWidgetComponent,
    EditVisibleFieldsDialog,
    EmptyWidgetComponent,
    EventButtonWidgetComponent,
    EventIconButtonWidgetComponent,
    EventWidgetButtonWidgetComponent,
    ExportConfigComponent,
    FooterWidgetComponent,
    FormDatepickerComponent,
    FormInputComponent,
    FormSelectComponent,
    FormSelectDynamicSubFormComponent,
    GoogleTranslateComponent,
    HalActionButtonComponent,
    HeaderAssetDetailsWidgetComponent,
    HeaderWidgetComponent,
    HistorySearchWidgetComponent,
    HtmlContentWidgetComponent,
    IagentReviewComponent,
    IframeWidgetComponent,
    IMarketProgressComponent,
    InfoCountComponentWidget,
    InfoLastUpdateComponentWidget,
    InfoProductStatusComponentWidget,
    IpimMobileComponent,
    IshopRatingsComponent,
    ItemInfoWidgetComponent,
    ItemListSelectionWidgetComponent,
    ItemWidgetComponent,
    KibanaAdminWidgetComponent,
    LabelWidgetComponent,
    LightTableWidgetComponent,
    LinkExportComponent,
    ListCellSentimentsWidgetComponent,
    ListCellInteractionLinkWidgetComponent,
    ListComponentWidget,
    DataListTreeComponentWidget,
    LoginComponent,
    MenuWidgetComponent,
    ModulesComponentWidget,
    WorklistsComponentWidget,
    NmFormComponent,
    NmPageComponent,
    OverviewWidgetComponent,
    PriceAppAddPriceComponent,
    ProductDetailsKpiComponent,
    ProductInfoViewWidgetComponent,
    ProductInfoWidgetComponent,
    ProductSearchResetWidgetComponent,
    SearchAppSearchWidgetComponent,
    SearchAppSearchWidgetInputComponent,
    SearchAttributesWidgetComponent,
    RatingSearchWidgetComponent,
    SearchArticleSelectionComponent,
    SearchAttributeSelectionDialog,
    SearchAttributeConfigurationDialog,
    SearchWidgetComponent,
    SelectComboComponent,
    SelectWidgetComponent,
    ShopCategoryDetailsPopupComponent,
    ShopCategoryPropertiesPopupComponent,
    ShopCategoryWidgetComponent,
    StartdownloadWidgetComponent,
    StepperWidgetComponent,
    SwitchLayoutWidgetComponent,
    InteractionLayoutWidgetComponent,
    SynchronizeDataWidgetComponent,
    TableConfigWidgetComponent,
    TabsWidgetComponent,
    TextAppMultiEditComponent,
    TextListWidgetComponent,
    TreeGridComponent,
    VerticalBarChartStackedWidgetComponent,
    WorkflowViewerComponent,
    WorklistSelectComponentWidget,
    WorklistexportComponent,
    WorklistexportComponentPopup,
    WorkflowViewerComponent,
    SearchAppSearchWidgetComponent,
    SearchAppSearchWidgetInputComponent,
    WorklistSelectComponentWidget,
    MenuWidgetComponent,
    DynamicFormComponentWidget,
    AutoCompleteComponentWidget,
    DateTimeRangePickerWidgetComponent,
    TypePickerWidgetComponent,
    JobDowntimeWidget,
    JobParametersWidget,
    JobSettingsWidget,
    SelectTableOperationsComponent,
    InfoDetailsComponentWidget,
    TimeSeriesChartWidgetComponent,
    SelectContextComponent,
    ListCellChipSelect,
    ExpansionPanelWidgetComponent,
  ],

  exports: [
    NmPageComponent,
    NmFormComponent,
    NmSharedModule,
    DataListHierachicalComponent,
    SelectWidgetComponent,
    AutoCompleteComponentWidget,
    JobDowntimeWidget,
    JobParametersWidget,
    JobSettingsWidget,
    IMarketWidgetsModule,
  ],
})
export class WidgetModule {
  static forRoot(): ModuleWithProviders<WidgetModule> {
    return {
      ngModule: WidgetModule,
      providers: [
        WidgetframeService,
        ListService,
        WorklistexportService,
        ModuleService,
        ExportConfigService,
        AppGlobalChannelsService,
        ConfigService,
      ],
    };
  }

  constructor() {
    ControllerRegistry.registerController(
      "select-asset",
      new SelectAssetControllerFactory()
    );
    ControllerRegistry.registerController(
      "select-userRight",
      new SelectUserRightControllerFactory()
    );
    ControllerRegistry.registerController(
      "excel-config",
      new ExcelConfigControllerFactory()
    );
    ControllerRegistry.registerController(
      "select-worklist",
      new SelectWorklistControllerFactory()
    );
    ControllerRegistry.registerController(
      "add-category",
      new AddCategoryControllerFactory()
    );
    ControllerRegistry.registerController(
      "edit-complex-type",
      new EditComplexTypeControllerFactory()
    );
    ControllerRegistry.registerController(
      "edit-text",
      new EditTextControllerFactory()
    );

    CellClassesCallbackRegistry.registerCallback(
      "default-mandatory-attribute",
      (rowData, column) =>
        column === "description" && rowData.mandatory === true
    );
    CellClassesCallbackRegistry.registerCallback(
      "default-readonly-attribute",
      (rowData, column) => {
        const field = Attributes.toSourceField(column);
        const value = rowData[field];
        return value?.["read-only"] === true;
      }
    );

    CellClassesCallbackRegistry.registerCallback(
      "is-dimension",
      (row, column) => {
        return row.articleType === "dimension";
      }
    );

    CellClassesCallbackRegistry.registerCallback(
      "is-product",
      (row, column) => {
        return row.articleType === "products";
      }
    );

    CellClassesCallbackRegistry.registerCallback("is-item", (row, column) => {
      return row.articleType === "items";
    });

    HeaderClassesCallbackRegistry.registerCallback(
      "is-dimension-header",
      (nmColumn) => {
        return nmColumn.articleType === "dimension";
      }
    );

    HeaderClassesCallbackRegistry.registerCallback(
      "is-product-header",
      (nmColumn) => {
        return nmColumn.articleType === "products";
      }
    );

    HeaderClassesCallbackRegistry.registerCallback(
      "is-item-header",
      (nmColumn) => {
        return nmColumn.articleType === "items";
      }
    );

    HeaderClassesCallbackRegistry.registerCallback(
      "default-mandatory-attribute",
      (nmColumn) => nmColumn.mandatory
    );
  }
}

results matching ""

    No results matching ""