UNPKG

@orchestrator/layout

Version:

> A set of simple layout components for Orchestrator library.

1 lines 12.2 kB
{"version":3,"file":"orchestrator-layout.mjs","sources":["../../../../libs/layout/src/lib/flex/flex-align-content.directive.ts","../../../../libs/layout/src/lib/flex/flex-align-items.directive.ts","../../../../libs/layout/src/lib/flex/flex-direction.directive.ts","../../../../libs/layout/src/lib/flex/flex-justify-content.directive.ts","../../../../libs/layout/src/lib/flex/flex-wrap.directive.ts","../../../../libs/layout/src/lib/flex/flex.module.ts","../../../../libs/layout/src/lib/layout-flat-host/layout-flat-config.ts","../../../../libs/layout/src/lib/layout-flat/layout-flat.component.ts","../../../../libs/layout/src/lib/layout-flat/layout-flat.component.html","../../../../libs/layout/src/lib/layout-flat-host/layout-flat-host.component.ts","../../../../libs/layout/src/lib/layout-flat-host/layout-flat-host.component.html","../../../../libs/layout/src/lib/layout-flat-host/layout-flat-host.module.ts","../../../../libs/layout/src/lib/layout.module.ts","../../../../libs/layout/src/orchestrator-layout.ts"],"sourcesContent":["import { Directive, HostBinding, Input } from '@angular/core';\n\nimport { LayoutFlatAlignContentOptions } from '../types';\n\n@Directive({\n selector: '[orcFxAlignContent]',\n})\nexport class FlexAlignContentDirective {\n @Input()\n @HostBinding('style.align-content')\n orcFxAlignContent: LayoutFlatAlignContentOptions;\n}\n","import { Directive, HostBinding, Input } from '@angular/core';\n\nimport { LayoutFlatAlignItemsOptions } from '../types';\n\n@Directive({\n selector: '[orcFxAlignItems]',\n})\nexport class FlexAlignItemsDirective {\n @Input()\n @HostBinding('style.align-items')\n orcFxAlignItems: LayoutFlatAlignItemsOptions;\n}\n","import { Directive, HostBinding, Input } from '@angular/core';\n\nimport { LayoutFlatDirectionOptions } from '../types';\n\n@Directive({\n selector: '[orcFxDirection]',\n})\nexport class FlexDirectionDirective {\n @Input()\n @HostBinding('style.flex-direction')\n orcFxDirection: LayoutFlatDirectionOptions = 'row';\n}\n","import { Directive, HostBinding, Input } from '@angular/core';\n\nimport { LayoutFlatJustifyOptions } from '../types';\n\n@Directive({\n selector: '[orcFxJustifyContent]',\n})\nexport class FlexJustifyContentDirective {\n @Input()\n @HostBinding('style.justify-content')\n orcFxJustifyContent: LayoutFlatJustifyOptions;\n}\n","import { Directive, HostBinding, Input } from '@angular/core';\n\nimport { LayoutFlatWrapOptions } from '../types';\n\n@Directive({\n selector: '[orcFxWrap]',\n})\nexport class FlexWrapDirective {\n @Input()\n @HostBinding('style.flex-wrap')\n orcFxWrap: LayoutFlatWrapOptions;\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { FlexAlignContentDirective } from './flex-align-content.directive';\nimport { FlexAlignItemsDirective } from './flex-align-items.directive';\nimport { FlexDirectionDirective } from './flex-direction.directive';\nimport { FlexJustifyContentDirective } from './flex-justify-content.directive';\nimport { FlexWrapDirective } from './flex-wrap.directive';\n\n@NgModule({\n imports: [CommonModule],\n exports: [\n FlexWrapDirective,\n FlexJustifyContentDirective,\n FlexDirectionDirective,\n FlexAlignItemsDirective,\n FlexAlignContentDirective,\n ],\n declarations: [\n FlexWrapDirective,\n FlexJustifyContentDirective,\n FlexDirectionDirective,\n FlexAlignItemsDirective,\n FlexAlignContentDirective,\n ],\n})\nexport class LayoutFlexModule {}\n","import { Injectable } from '@angular/core';\nimport { OptionAllowedValues } from '@orchestrator/core';\n\nimport {\n LayoutFlatAlignContentOptions,\n LayoutFlatAlignItemsOptions,\n LayoutFlatDirectionOptions,\n LayoutFlatJustifyOptions,\n LayoutFlatWrapOptions,\n} from '../types';\n\nconst baseOptions = ['initial', 'inherit'];\nconst spacingOptions = ['center', 'flex-end', 'flex-start'];\n\n/**\n * Default configuration for {@link LayoutFlatHostComponent}\n */\n@Injectable()\nexport class LayoutFlatConfig {\n @OptionAllowedValues(...baseOptions, 'wrap', 'nowrap', 'wrap-reverse')\n wrap?: LayoutFlatWrapOptions;\n\n @OptionAllowedValues(...baseOptions, 'row', 'column')\n direction?: LayoutFlatDirectionOptions;\n\n @OptionAllowedValues(\n ...baseOptions,\n ...spacingOptions,\n 'space-between',\n 'space-around',\n 'space-evenly',\n )\n justify?: LayoutFlatJustifyOptions;\n\n @OptionAllowedValues(...baseOptions, ...spacingOptions, 'baseline', 'stretch')\n alignItems?: LayoutFlatAlignItemsOptions;\n\n @OptionAllowedValues(\n ...baseOptions,\n ...spacingOptions,\n 'space-between',\n 'space-around',\n 'stretch',\n )\n alignContent?: LayoutFlatAlignContentOptions;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { OrchestratorConfigItem } from '@orchestrator/core';\n\n@Component({\n selector: 'orc-layout-flat',\n templateUrl: './layout-flat.component.html',\n styleUrls: ['./layout-flat.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class LayoutFlatComponent {\n @Input() items: ReadonlyArray<OrchestratorConfigItem>;\n\n /**\n * Emitted after all, and if, all the `items` have been rendered\n */\n @Output() afterItemsRendered = new EventEmitter<Array<ComponentRef<any>>>();\n\n @HostBinding('class.layout-flat-orc') readonly classLayoutFlat = true;\n\n private _itemsRendered: Array<ComponentRef<any>> = [];\n\n onComponentCreated(component: ComponentRef<any>) {\n this._itemsRendered.push(component);\n\n if (this._itemsRendered.length === this.items.length) {\n this.afterItemsRendered.emit(this._itemsRendered);\n }\n }\n}\n","<orc-render-item\n *ngFor=\"let item of items\"\n class=\"layout-flat-orc-item\"\n [item]=\"item\"\n (componentCreated)=\"onComponentCreated($event)\"\n></orc-render-item>\n","import {\n ChangeDetectionStrategy,\n Component,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n DynamicComponent,\n OrchestratorConfigItem,\n OrchestratorDynamicComponent,\n} from '@orchestrator/core';\n\nimport { LayoutFlatConfig } from './layout-flat-config';\n\n@Component({\n selector: 'orc-layout-flat-host',\n templateUrl: './layout-flat-host.component.html',\n styleUrls: ['./layout-flat-host.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\n@DynamicComponent({ config: LayoutFlatConfig })\nexport class LayoutFlatHostComponent\n implements OrchestratorDynamicComponent<LayoutFlatConfig> {\n @Input() items: OrchestratorConfigItem[];\n @Input() config: LayoutFlatConfig;\n}\n","<orc-layout-flat\n [items]=\"items\"\n [orcFxWrap]=\"config?.wrap\"\n [orcFxDirection]=\"config?.direction\"\n [orcFxJustifyContent]=\"config?.justify\"\n [orcFxAlignItems]=\"config?.alignItems\"\n [orcFxAlignContent]=\"config?.alignContent\"\n></orc-layout-flat>\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { OrchestratorCoreModule } from '@orchestrator/core';\n\nimport { LayoutFlexModule } from '../flex';\nimport { LayoutFlatComponent } from '../layout-flat';\nimport { LayoutFlatConfig } from './layout-flat-config';\nimport { LayoutFlatHostComponent } from './layout-flat-host.component';\n\n@NgModule({\n imports: [CommonModule, OrchestratorCoreModule, LayoutFlexModule],\n exports: [LayoutFlatHostComponent, LayoutFlatComponent],\n declarations: [LayoutFlatHostComponent, LayoutFlatComponent],\n})\nexport class LayoutFlatHostModule {\n static forRoot(): ModuleWithProviders<LayoutFlatHostModule> {\n return {\n ngModule: LayoutFlatHostModule,\n providers: [\n ...OrchestratorCoreModule.registerComponents([LayoutFlatHostComponent]),\n LayoutFlatConfig,\n ],\n };\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { LayoutFlexModule } from './flex';\nimport { LayoutFlatHostModule } from './layout-flat-host';\n\n@NgModule({\n exports: [LayoutFlexModule, LayoutFlatHostModule],\n})\nexport class LayoutModule {\n static forRoot(): ModuleWithProviders<LayoutModule> {\n return {\n ngModule: LayoutModule,\n providers: [...LayoutFlatHostModule.forRoot().providers],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;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