libs/dynamic-form-playground-bbs/src/lib/playground-dynamic-form-with-config-editor/playground-dynamic-form-with-config-editor.module.ts
dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_PlaygroundDynamicFormWithConfigEditorModule cluster_PlaygroundDynamicFormWithConfigEditorModule_exports cluster_PlaygroundDynamicFormWithConfigEditorModule_imports cluster_PlaygroundDynamicFormWithConfigEditorModule_PlaygroundDynamicFormWithConfigEditorComponent_providers PlaygroundDynamicFormWithConfigEditorComponent PlaygroundDynamicFormWithConfigEditorComponent PlaygroundDynamicFormWithConfigEditorModule PlaygroundDynamicFormWithConfigEditorModule PlaygroundDynamicFormWithConfigEditorComponent->PlaygroundDynamicFormWithConfigEditorModule PlaygroundDynamicFormWithConfigEditorComponent PlaygroundDynamicFormWithConfigEditorComponent PlaygroundDynamicFormWithConfigEditorModule->PlaygroundDynamicFormWithConfigEditorComponent createBuildingBlockProvider(forwardRef(() => PlaygroundDynamicFormWithConfigEditorComponent)) createBuildingBlockProvider(forwardRef(() => PlaygroundDynamicFormWithConfigEditorComponent)) createBuildingBlockProvider(forwardRef(() => PlaygroundDynamicFormWithConfigEditorComponent))->PlaygroundDynamicFormWithConfigEditorComponent DynamicFormConfigEditorComponent DynamicFormConfigEditorComponent DynamicFormConfigEditorComponent->PlaygroundDynamicFormWithConfigEditorModule DynamicFormConfigEditorComponent->PlaygroundDynamicFormWithConfigEditorModule EditorComponent EditorComponent EditorComponent->PlaygroundDynamicFormWithConfigEditorModule MonacoEditorModule MonacoEditorModule MonacoEditorModule->PlaygroundDynamicFormWithConfigEditorModule TalyCoreModule TalyCoreModule TalyCoreModule->PlaygroundDynamicFormWithConfigEditorModule TalyDynamicFormComponent TalyDynamicFormComponent TalyDynamicFormComponent->PlaygroundDynamicFormWithConfigEditorModule ValidationErrorsModule ValidationErrorsModule ValidationErrorsModule->PlaygroundDynamicFormWithConfigEditorModule
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReactiveFormsModule } from '@angular/forms';
import { TalyCoreModule } from '@allianz/taly-core';
import { ValidationErrorsModule } from '@allianz/taly-core/ui';
import { NxHeadlineModule } from '@allianz/ng-aquila/headline';
import { NxGridModule } from '@allianz/ng-aquila/grid';
import { NxFormfieldModule } from '@allianz/ng-aquila/formfield';
import { NxInputModule } from '@allianz/ng-aquila/input';
import { PlaygroundDynamicFormWithConfigEditorComponent } from './playground-dynamic-form-with-config-editor.component';
import {
  provideDynamicFormNativeComponents,
  TalyDynamicFormComponent
} from '@allianz/taly-core/dynamic-form/standalone';
import {
  EditorComponent,
  MonacoEditorModule,
  NgxMonacoEditorConfig
} from '@allianz/taly-core/monaco-editor';
import { dynamicFormConfigSchema } from '@allianz/taly-core/schemas';
import { NxButtonComponent } from '@allianz/ng-aquila/button';
import { NxCheckboxComponent } from '@allianz/ng-aquila/checkbox';
import { NxDropdownComponent, NxDropdownItemComponent } from '@allianz/ng-aquila/dropdown';
import { NxIconComponent } from '@allianz/ng-aquila/icon';
import { NxLinkComponent } from '@allianz/ng-aquila/link';
import { DynamicFormConfigEditorComponent } from './dynamic-form-config-editor/dynamic-form-config-editor.component';

function monacoLoaded() {
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  const monaco = (window as any).monaco;
  monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
    validate: true,
    schemas: [
      {
        uri: 'http://localhost/dynamic-form-schema.json',
        fileMatch: ['*dynamic-form.json'],
        schema: dynamicFormConfigSchema
      }
    ]
  });
}

const monacoConfig: NgxMonacoEditorConfig = {
  baseUrl: window.location.origin + '/assets/monaco/min/vs',
  defaultOptions: { scrollBeyondLastLine: false },
  onMonacoLoad: monacoLoaded
};

@NgModule({
  declarations: [PlaygroundDynamicFormWithConfigEditorComponent],
  imports: [
    CommonModule,
    ReactiveFormsModule,
    TalyCoreModule,
    ValidationErrorsModule,
    MonacoEditorModule.forRoot(monacoConfig),
    NxHeadlineModule,
    NxGridModule,
    NxFormfieldModule,
    NxInputModule,
    TalyDynamicFormComponent,
    DynamicFormConfigEditorComponent,
    EditorComponent,
    NxButtonComponent,
    NxCheckboxComponent,
    NxDropdownComponent,
    NxDropdownItemComponent,
    NxIconComponent,
    NxLinkComponent,
    DynamicFormConfigEditorComponent
  ],
  providers: [provideDynamicFormNativeComponents()],
  exports: [PlaygroundDynamicFormWithConfigEditorComponent]
})
export class PlaygroundDynamicFormWithConfigEditorModule {}

results matching ""

    No results matching ""