diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 5bb6deb..f520eea 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -20,10 +20,10 @@ import {JoyrideService} from 'ngx-joyride'; export class AppComponent implements AfterViewInit { title = 'Netgrif Application Builder'; - @HostListener('window:beforeunload', ['$event']) - WindowBeforeUnload($event: any) { - $event.returnValue = 'Your data will be lost!'; - } + // @HostListener('window:beforeunload', ['$event']) + // WindowBeforeUnload($event: any) { + // $event.returnValue = 'Your data will be lost!'; + // } constructor( private router: Router, diff --git a/src/app/modeler/actions-mode/action-detail/action-detail.component.html b/src/app/modeler/actions-mode/action-detail/action-detail.component.html index 71b0f07..9ed48f9 100644 --- a/src/app/modeler/actions-mode/action-detail/action-detail.component.html +++ b/src/app/modeler/actions-mode/action-detail/action-detail.component.html @@ -1,21 +1,17 @@
+ > - @defer (on viewport) { -
+
- } @placeholder { -
loading...
- } -
+
-
-
- -
-
- -
- - + + + +
+ +
+
+ +
+
+ +
+
+
+
diff --git a/src/app/modeler/actions-mode/action-editor/action-editor-menu/action-editor-menu.component.scss b/src/app/modeler/actions-mode/action-editor/action-editor-menu/action-editor-menu.component.scss index f6c2e57..a947e9d 100644 --- a/src/app/modeler/actions-mode/action-editor/action-editor-menu/action-editor-menu.component.scss +++ b/src/app/modeler/actions-mode/action-editor/action-editor-menu/action-editor-menu.component.scss @@ -1,5 +1,6 @@ .action-menu-panel { font-size: 14px; + letter-spacing: normal; } .description-info-button { @@ -18,6 +19,7 @@ .actions-list-expansion-panel { box-shadow: none !important; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); } .itemLabel { @@ -32,3 +34,8 @@ mat-expansion-panel-header { .mat-expansion-panel-body { padding-left: 0 !important; } + +.menu-list-item { + padding-left: 0; + padding-right: 0; +} diff --git a/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.html b/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.html index d95f9e1..13e3666 100644 --- a/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.html +++ b/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.html @@ -12,60 +12,62 @@ - - action + + Action: {{action.id}} -
-
- -
+ Functions + +
-
- - - - - - - + + + + References + + keyboard_arrow_up + + + + keyboard_arrow_down + + + +
+
+
+ +
-
-
- - -
+
diff --git a/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.scss b/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.scss index 3590a3a..8b658bb 100644 --- a/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.scss +++ b/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.scss @@ -32,3 +32,12 @@ .mat-action-row { padding: 4px 16px 4px 16px; } + +.header { + height: 48px !important; +} + +.panel-fix { + margin: 0; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); +} diff --git a/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.ts b/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.ts index 86ea47f..08aebef 100644 --- a/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.ts +++ b/src/app/modeler/actions-mode/action-editor/action-editor/action-editor.component.ts @@ -364,7 +364,7 @@ export class ActionEditorComponent implements OnInit { element.style.height = newHeight + 'px'; const innerSize = newHeight - headerSize - bottomSize - 45; div.style.height = innerSize + 'px'; - if (editorObject !== undefined) { + if (editorObject !== undefined && editorObject !== null) { editorObject.style.height = innerSize + 'px'; } diff --git a/src/app/modeler/actions-mode/action-master/action-master.component.html b/src/app/modeler/actions-mode/action-master/action-master.component.html index 894058e..59012ba 100644 --- a/src/app/modeler/actions-mode/action-master/action-master.component.html +++ b/src/app/modeler/actions-mode/action-master/action-master.component.html @@ -1,6 +1,6 @@
- -
+
+

ID

Name

@@ -12,7 +12,7 @@ [masterService]="masterService" >
-
+

Name

Scope

@@ -27,7 +27,7 @@ [masterService]="masterService" >
- +
diff --git a/src/app/modeler/actions-mode/action-master/action-master.component.scss b/src/app/modeler/actions-mode/action-master/action-master.component.scss index 395d6a9..ac80227 100644 --- a/src/app/modeler/actions-mode/action-master/action-master.component.scss +++ b/src/app/modeler/actions-mode/action-master/action-master.component.scss @@ -35,3 +35,9 @@ mat-paginator { .height-fix { height: calc(100vh - 42px); } + +.height-100 { + box-sizing: border-box; + height: calc(100%); + overflow: auto; +} diff --git a/src/app/modeler/components/master-detail/master-detail.component.scss b/src/app/modeler/components/master-detail/master-detail.component.scss index 31fec8b..502452b 100644 --- a/src/app/modeler/components/master-detail/master-detail.component.scss +++ b/src/app/modeler/components/master-detail/master-detail.component.scss @@ -9,7 +9,7 @@ overflow: auto; } -ng-template { +.fill-space { width: 100%; height: 100%; } @@ -22,6 +22,3 @@ ng-template { border-left: 1px solid #dddddd; } -mwlResizable { - box-sizing: border-box; // required for the enableGhostResize option to work -} diff --git a/src/app/modeler/i18n-mode/languages/languages.component.ts b/src/app/modeler/i18n-mode/languages/languages.component.ts index a53c44a..ed1c0b2 100644 --- a/src/app/modeler/i18n-mode/languages/languages.component.ts +++ b/src/app/modeler/i18n-mode/languages/languages.component.ts @@ -14,9 +14,8 @@ import {map, startWith} from 'rxjs/operators'; }) export class LanguagesComponent implements OnInit { - @ViewChild('newLanguageSelect') - newLanguageSelect: MatSelect; - newLocaleFormControl = new FormControl('', { + @ViewChild('newLanguageSelect') newLanguageSelect: MatSelect; + newLocaleFormControl = new FormControl(undefined, { validators: [this.autocompleteStringValidator(), Validators.required] }); filteredLocales: Observable>; @@ -68,8 +67,7 @@ export class LanguagesComponent implements OnInit { addLocal() { console.log(this.newLocaleFormControl.value); - // TODO: release/4.0.0 - // this.i18nService.addLocale(this.newLocaleFormControl.value.languageCode); - // this.newLocaleFormControl.reset(); + this.i18nService.addLocale(this.newLocaleFormControl.value.languageCode); + this.newLocaleFormControl.reset(); } } diff --git a/src/app/modeler/i18n-mode/languages/progress/progress.component.html b/src/app/modeler/i18n-mode/languages/progress/progress.component.html index 8b0ec33..9f91d01 100644 --- a/src/app/modeler/i18n-mode/languages/progress/progress.component.html +++ b/src/app/modeler/i18n-mode/languages/progress/progress.component.html @@ -1,7 +1,7 @@ - +
{{locale.prettyName}} - +
diff --git a/src/app/modeler/i18n-mode/languages/progress/progress.component.scss b/src/app/modeler/i18n-mode/languages/progress/progress.component.scss index 7a45060..525b502 100644 --- a/src/app/modeler/i18n-mode/languages/progress/progress.component.scss +++ b/src/app/modeler/i18n-mode/languages/progress/progress.component.scss @@ -4,7 +4,12 @@ nab-flag { padding-right: 16px; } -button { +.button-line { width: 40px; max-width: 40px; } + +.card { + padding: 0 16px; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); +} diff --git a/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.html b/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.html index 79876b4..e1e6a11 100644 --- a/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.html +++ b/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.html @@ -1,19 +1,27 @@ -
-

{{dataVariable.title.value}} [{{dataVariable.id}}]

- - - - -
-

Options:

- -
-
-

Validations:

- -
- + @defer (on viewport) { +
+

{{dataVariable.title.value}} [{{dataVariable.id}}]

+ + + + +
+

Options:

+ +
+
+

Validations:

+ +
+ +
+ } @placeholder { +
+

{{dataVariable.title.value}} [{{dataVariable.id}}]

+ +
+ }
diff --git a/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.scss b/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.scss index dd75488..ec79209 100644 --- a/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.scss +++ b/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.scss @@ -1,3 +1,6 @@ .options { - margin-left: 16px; +} + +.viewport { + height: calc(100vh - 253px); } diff --git a/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.ts b/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.ts index d22febb..fcb0b8c 100644 --- a/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.ts +++ b/src/app/modeler/i18n-mode/translations/translation-group/data-translation/data-translation.component.ts @@ -1,4 +1,4 @@ -import {Component, Input, OnInit} from '@angular/core'; +import {Component, Input} from '@angular/core'; import {DataVariable, I18nTranslations, PetriNet} from '@netgrif/petriflow'; import {I18nModeService} from '../../../i18n-mode.service'; import {ModelService} from '../../../../services/model/model.service'; diff --git a/src/app/modeler/i18n-mode/translations/translation-group/model-translation/model-translation.component.html b/src/app/modeler/i18n-mode/translations/translation-group/model-translation/model-translation.component.html index 908c8cc..538dc8e 100644 --- a/src/app/modeler/i18n-mode/translations/translation-group/model-translation/model-translation.component.html +++ b/src/app/modeler/i18n-mode/translations/translation-group/model-translation/model-translation.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/src/app/modeler/i18n-mode/translations/translation-group/model-translation/model-translation.component.scss b/src/app/modeler/i18n-mode/translations/translation-group/model-translation/model-translation.component.scss index e69de29..c8c3576 100644 --- a/src/app/modeler/i18n-mode/translations/translation-group/model-translation/model-translation.component.scss +++ b/src/app/modeler/i18n-mode/translations/translation-group/model-translation/model-translation.component.scss @@ -0,0 +1,3 @@ +.padding-top { + padding-top: 8px; +} diff --git a/src/app/modeler/i18n-mode/translations/translation-group/role-translation/role-translation.component.html b/src/app/modeler/i18n-mode/translations/translation-group/role-translation/role-translation.component.html index a5f393d..be15d3b 100644 --- a/src/app/modeler/i18n-mode/translations/translation-group/role-translation/role-translation.component.html +++ b/src/app/modeler/i18n-mode/translations/translation-group/role-translation/role-translation.component.html @@ -1,12 +1,21 @@
-

{{role.title.value}} [{{role.id}}]

- -
-

Events:

-
- - + @defer (on viewport) { +
+

{{role.title.value}} [{{role.id}}]

+ +
+

Events:

+
+ + +
-
- + +
+ } @placeholder { +
+

{{role.title.value}} [{{role.id}}]

+ +
+ }
diff --git a/src/app/modeler/i18n-mode/translations/translation-group/task-translation/task-translation.component.html b/src/app/modeler/i18n-mode/translations/translation-group/task-translation/task-translation.component.html index 391e80f..6506a5f 100644 --- a/src/app/modeler/i18n-mode/translations/translation-group/task-translation/task-translation.component.html +++ b/src/app/modeler/i18n-mode/translations/translation-group/task-translation/task-translation.component.html @@ -1,12 +1,22 @@
-

{{task.label.value}} [{{task.id}}]

- -
-

Events:

-
- - + + @defer (on viewport) { +
+

{{task.label.value}} [{{task.id}}]

+ +
+

Events:

+
+ + +
+
+
-
- + } @placeholder { +
+

{{task.label.value}} [{{task.id}}]

+ +
+ }
diff --git a/src/app/modeler/i18n-mode/translations/translation-group/translation-group.component.html b/src/app/modeler/i18n-mode/translations/translation-group/translation-group.component.html deleted file mode 100644 index 83ab01e..0000000 --- a/src/app/modeler/i18n-mode/translations/translation-group/translation-group.component.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - {{config.icon}} - {{config.title}} - - - {{config.disabled() ? config.disabledDescription : config.description}} - - - - - - - - diff --git a/src/app/modeler/i18n-mode/translations/translation-group/translation-group.component.scss b/src/app/modeler/i18n-mode/translations/translation-group/translation-group.component.scss deleted file mode 100644 index 9cacd21..0000000 --- a/src/app/modeler/i18n-mode/translations/translation-group/translation-group.component.scss +++ /dev/null @@ -1,13 +0,0 @@ -.mat-expansion-panel-header-title, -.mat-expansion-panel-header-description { - flex-basis: 0; -} - -.mat-expansion-panel-header-description { - justify-content: space-between; - align-items: center; -} - -mat-icon { - margin-right: 16px; -} diff --git a/src/app/modeler/i18n-mode/translations/translation-group/translation-group.component.ts b/src/app/modeler/i18n-mode/translations/translation-group/translation-group.component.ts deleted file mode 100644 index 0609a0a..0000000 --- a/src/app/modeler/i18n-mode/translations/translation-group/translation-group.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import {Component, Input, OnInit} from '@angular/core'; -import {TranslationGroupConfiguration, Type} from './translation-group-configuration'; -import {Locale} from '../../classes/locale'; -import {I18nTranslations} from '@netgrif/petriflow'; - -@Component({ - selector: 'nab-translation-group', - templateUrl: './translation-group.component.html', - styleUrls: ['./translation-group.component.scss'] -}) -export class TranslationGroupComponent { - - @Input() - config: TranslationGroupConfiguration; - private _translation: I18nTranslations; - - constructor() { - } - - get translation(): I18nTranslations { - return this._translation; - } - - @Input() - set translation(value: I18nTranslations) { - this._translation = value; - } - - isModel(): boolean { - return this.config.type === Type.MODEL; - } - - isTask(): boolean { - return this.config.type === Type.TASK; - } - - isData(): boolean { - return this.config.type === Type.DATA; - } - - isRole(): boolean { - return this.config.type === Type.ROLE; - } -} diff --git a/src/app/modeler/i18n-mode/translations/translations.component.html b/src/app/modeler/i18n-mode/translations/translations.component.html index 7085fac..7c51aae 100644 --- a/src/app/modeler/i18n-mode/translations/translations.component.html +++ b/src/app/modeler/i18n-mode/translations/translations.component.html @@ -7,10 +7,42 @@ - - - - - - + + + + {{modelMetadataConfig.icon}} + {{modelMetadataConfig.title}} + + + + + + + + {{taskMetadataConfig.icon}} + {{taskMetadataConfig.title}} + + + + + + + + {{dataMetadataConfig.icon}} + {{dataMetadataConfig.title}} + + + + + + + + {{roleMetadataConfig.icon}} + {{roleMetadataConfig.title}} + + + + + +
diff --git a/src/app/modeler/i18n-mode/translations/translations.component.scss b/src/app/modeler/i18n-mode/translations/translations.component.scss index 865b5df..5f24b37 100644 --- a/src/app/modeler/i18n-mode/translations/translations.component.scss +++ b/src/app/modeler/i18n-mode/translations/translations.component.scss @@ -1,3 +1,9 @@ .localeSelect { margin-bottom: 16px; } + +.example-tab-icon { + margin-right: 8px; +} + + diff --git a/src/app/modeler/modeler.module.ts b/src/app/modeler/modeler.module.ts index b052184..92b186f 100644 --- a/src/app/modeler/modeler.module.ts +++ b/src/app/modeler/modeler.module.ts @@ -29,7 +29,6 @@ import {TranslationsComponent} from './i18n-mode/translations/translations.compo import {ProgressComponent} from './i18n-mode/languages/progress/progress.component'; import {FlagComponent} from './i18n-mode/languages/flag/flag.component'; import {FlagFallbackDirective} from './i18n-mode/languages/flag/flag-fallback.directive'; -import {TranslationGroupComponent} from './i18n-mode/translations/translation-group/translation-group.component'; import { ModelTranslationComponent } from './i18n-mode/translations/translation-group/model-translation/model-translation.component'; @@ -67,6 +66,7 @@ import { FunctionMasterItemComponent } from './actions-mode/action-master/function-master-item/function-master-item.component'; import {ActionDetailComponent} from './actions-mode/action-detail/action-detail.component'; +import {ScrollingModule} from '@angular/cdk/scrolling'; @NgModule({ declarations: [ @@ -91,7 +91,6 @@ import {ActionDetailComponent} from './actions-mode/action-detail/action-detail. ProgressComponent, FlagComponent, FlagFallbackDirective, - TranslationGroupComponent, ModelTranslationComponent, I18nFieldComponent, DataTranslationComponent, @@ -134,6 +133,7 @@ import {ActionDetailComponent} from './actions-mode/action-detail/action-detail. ResizableModule, RouterModule, TaskContentComponentModule, + ScrollingModule ] }) export class ModelerModule {