├── .editorconfig ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── .vscode └── extensions.json ├── CHANGELOG.md ├── DEV-INFO.md ├── GETTING-STARTED.md ├── LICENSE ├── README.md ├── angular.json ├── apps ├── .gitkeep ├── doc-app │ ├── browserslist │ ├── karma.conf.js │ ├── src │ │ ├── app │ │ │ ├── app-routing.module.ts │ │ │ ├── app.component.html │ │ │ ├── app.component.scss │ │ │ ├── app.component.spec.ts │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ ├── app.routing.ts │ │ │ ├── components │ │ │ │ └── doc-page │ │ │ │ │ ├── doc-page-routing.module.ts │ │ │ │ │ ├── doc-page.component.ts │ │ │ │ │ └── doc-page.module.ts │ │ │ ├── layout │ │ │ │ ├── aside-nav │ │ │ │ │ ├── aside-nav.component.html │ │ │ │ │ ├── aside-nav.component.scss │ │ │ │ │ ├── aside-nav.component.spec.ts │ │ │ │ │ └── aside-nav.component.ts │ │ │ │ ├── footer │ │ │ │ │ ├── footer.component.html │ │ │ │ │ ├── footer.component.scss │ │ │ │ │ ├── footer.component.spec.ts │ │ │ │ │ └── footer.component.ts │ │ │ │ ├── header │ │ │ │ │ ├── header.component.html │ │ │ │ │ ├── header.component.scss │ │ │ │ │ ├── header.component.spec.ts │ │ │ │ │ └── header.component.ts │ │ │ │ ├── markdown │ │ │ │ │ ├── getting-started.doc.md │ │ │ │ │ ├── markdown.component.ts │ │ │ │ │ └── markdown.module.ts │ │ │ │ └── sidebar │ │ │ │ │ ├── sidebar.component.html │ │ │ │ │ ├── sidebar.component.scss │ │ │ │ │ ├── sidebar.component.spec.ts │ │ │ │ │ └── sidebar.component.ts │ │ │ └── services │ │ │ │ ├── anchor-scroll.service.ts │ │ │ │ └── headings-list.service.ts │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ ├── docs │ │ │ │ ├── getting-started.md │ │ │ │ ├── metaui-architecture.md │ │ │ │ ├── oss-rules.md │ │ │ │ └── oss-syntax.md │ │ │ └── images │ │ │ │ ├── bg-logo.svg │ │ │ │ ├── ico-github.svg │ │ │ │ ├── ico-hamburger.svg │ │ │ │ └── ico-twitter.svg │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── main.ts │ │ ├── polyfills.ts │ │ ├── styles.scss │ │ ├── test.ts │ │ └── variables.scss │ ├── tsconfig.app.json │ ├── tsconfig.editor.json │ ├── tsconfig.json │ ├── tsconfig.spec.json │ └── tslint.json ├── fiori-app │ ├── browserslist │ ├── karma.conf.js │ ├── src │ │ ├── app │ │ │ ├── app-routing.module.ts │ │ │ ├── app.component.html │ │ │ ├── app.component.scss │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ ├── model │ │ │ │ └── user.ts │ │ │ ├── rules │ │ │ │ ├── Application.oss │ │ │ │ ├── User.oss │ │ │ │ ├── index.ts │ │ │ │ └── ts │ │ │ │ │ ├── Address.oss.ts │ │ │ │ │ ├── Application.oss.ts │ │ │ │ │ ├── Invoice.oss.ts │ │ │ │ │ ├── Supplier.oss.ts │ │ │ │ │ └── User.oss.ts │ │ │ ├── user-detail │ │ │ │ ├── user-detail.component.html │ │ │ │ ├── user-detail.component.scss │ │ │ │ └── user-detail.component.ts │ │ │ └── user-rules.ts │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ ├── banner.png │ │ │ ├── chart1.png │ │ │ ├── logo.png │ │ │ └── sales.png │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── main.ts │ │ ├── polyfills.ts │ │ ├── styles.scss │ │ └── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.editor.json │ ├── tsconfig.json │ ├── tsconfig.spec.json │ └── tslint.json └── material-app │ ├── browserslist │ ├── karma.conf.js │ ├── src │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.html │ │ ├── app.component.scss │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── home │ │ │ ├── home.component.html │ │ │ └── home.component.ts │ │ ├── model │ │ │ ├── airline.ts │ │ │ ├── animal.ts │ │ │ └── user.ts │ │ ├── rules │ │ │ ├── Airline.oss │ │ │ ├── Animal.oss │ │ │ ├── README.md │ │ │ ├── User.oss │ │ │ ├── index.ts │ │ │ └── ts │ │ │ │ ├── Airline.oss.ts │ │ │ │ ├── Animal.oss.ts │ │ │ │ ├── Dummy.oss.ts │ │ │ │ └── User.oss.ts │ │ ├── user-detail-exposed │ │ │ ├── user-detail-exposed.component.html │ │ │ ├── user-detail-exposed.component.scss │ │ │ └── user-detail-exposed.component.ts │ │ ├── user-detail │ │ │ ├── custom-input │ │ │ │ ├── custom-input.component.html │ │ │ │ ├── custom-input.component.ts │ │ │ │ └── custom-input.module.ts │ │ │ ├── user-detail.component.html │ │ │ ├── user-detail.component.scss │ │ │ └── user-detail.component.ts │ │ └── user-rules.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.scss │ └── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json ├── decorate-angular-cli.js ├── docs ├── OSSRules.md ├── meta │ ├── action-links-clicked.png │ ├── action-links.png │ ├── action-save-1.png │ ├── action-save-2.png │ ├── css-rule.png │ ├── editable.png │ ├── full-name.png │ ├── getting-started-1.1.png │ ├── meta-1.0.png │ ├── meta-1.1.jpg │ ├── meta-1.2.png │ ├── meta-create.png │ ├── meta-view.png │ ├── meta-wiki-1.png │ ├── meta-wiki-2.png │ ├── metaui-age-edit.png │ ├── metaui-age-view.png │ ├── required-trait.png │ ├── rich-text.png │ ├── section-editing.png │ ├── section-expanded.png │ ├── section.png │ ├── trait-longtext.png │ └── validity-created.png ├── metaui-architecture.md └── oss-syntax.md ├── ide ├── README.md ├── dist │ └── ossplugin.jar └── ossplugin │ ├── .gitignore │ ├── .idea │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── misc.xml │ ├── modules.xml │ ├── uiDesigner.xml │ └── workspace.xml │ ├── gen │ └── ariba │ │ └── ideplugin │ │ └── idea │ │ └── lang │ │ └── grammer │ │ ├── OSSParser.java │ │ ├── _OSSLexer.java │ │ └── psi │ │ ├── OSSKey.java │ │ ├── OSSKeyImpl.java │ │ ├── OSSLocalizedString.java │ │ ├── OSSLocalizedStringImpl.java │ │ ├── OSSMap.java │ │ ├── OSSMapImpl.java │ │ ├── OSSPrecedenceChain.java │ │ ├── OSSPrecedenceChainImpl.java │ │ ├── OSSRule.java │ │ ├── OSSRuleBody.java │ │ ├── OSSRuleBodyImpl.java │ │ ├── OSSRuleBodyKeyValue.java │ │ ├── OSSRuleBodyKeyValueImpl.java │ │ ├── OSSRuleImpl.java │ │ ├── OSSSelector.java │ │ ├── OSSSelectorDef.java │ │ ├── OSSSelectorDefImpl.java │ │ ├── OSSSelectorImpl.java │ │ ├── OSSSelectorValue.java │ │ ├── OSSSelectorValueImpl.java │ │ ├── OSSSimpleValue.java │ │ ├── OSSSimpleValueImpl.java │ │ ├── OSSTraitList.java │ │ ├── OSSTraitListImpl.java │ │ ├── OSSTypes.java │ │ ├── OSSValue.java │ │ ├── OSSValueImpl.java │ │ ├── OSSValueOrList.java │ │ ├── OSSValueOrListImpl.java │ │ ├── OSSVisitor.java │ │ ├── OSSWrappedList.java │ │ └── OSSWrappedListImpl.java │ ├── idea-flex.skeleton │ ├── jflex-1.7.0-SNAPSHOT.jar │ ├── ossplugin.iml │ ├── ossplugin.jar │ ├── resources │ └── META-INF │ │ └── plugin.xml │ └── src │ └── ariba │ └── ideplugin │ ├── core │ └── WrapperRuntimeException.java │ └── idea │ ├── AppComponent.java │ ├── icons │ └── ossfile.png │ └── lang │ ├── OSSFileType.java │ ├── OSSFileTypeFactory.java │ ├── OSSFoldingBuilder.java │ ├── OSSIcons.java │ ├── OSSLanguage.java │ ├── OSSParserDefinition.java │ ├── OSSSyntaxHighlighterFactory.java │ ├── grammer │ ├── OSSLexer.flex │ ├── OSSLexer.java │ ├── OSSParserUtil.java │ ├── oss.bnf │ ├── psi │ │ ├── OSSElementType.java │ │ ├── OSSFile.java │ │ └── OSSTokenType.java │ ├── test.oss │ └── test2WP.oss │ ├── structure │ ├── OSSFileStructureViewElement.java │ ├── OSSKeyValueStructureViewElement.java │ ├── OSSPrecedenceChainStructureViewElement.java │ ├── OSSRuleStructureViewElement.java │ ├── OSSStructureViewFactory.java │ └── OSSStructureViewModel.java │ └── syntax │ └── OSSSyntaxHighlighter.java ├── karma.conf.js ├── libs ├── .gitkeep ├── fiori-rules │ ├── README.md │ ├── karma.conf.ci.js │ ├── karma.conf.js │ ├── ng-package.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── lib │ │ │ ├── entry-components.ts │ │ │ ├── fiori-rules.module.ts │ │ │ ├── metaui │ │ │ │ ├── PersistenceRules.oss │ │ │ │ ├── WidgetsRules.oss │ │ │ │ ├── fiori-ui-layout.module.ts │ │ │ │ ├── meta-bar-actions │ │ │ │ │ ├── meta-bar-actions.component.html │ │ │ │ │ ├── meta-bar-actions.component.ts │ │ │ │ │ └── meta-bar-actions.module.ts │ │ │ │ ├── meta-breadcrumb │ │ │ │ │ ├── breadcrumb.component.html │ │ │ │ │ ├── breadcrumb.component.ts │ │ │ │ │ └── breadcrumb.module.ts │ │ │ │ ├── meta-dynamic-page │ │ │ │ │ ├── dynamic-page.component.html │ │ │ │ │ ├── dynamic-page.component.ts │ │ │ │ │ ├── dynamic-page.module.ts │ │ │ │ │ └── meta-face-group │ │ │ │ │ │ ├── facet-group.component.html │ │ │ │ │ │ ├── facet-group.component.ts │ │ │ │ │ │ └── facet-group.module.ts │ │ │ │ ├── meta-element-list │ │ │ │ │ ├── element-list.component.html │ │ │ │ │ ├── element-list.component.ts │ │ │ │ │ └── element-list.module.ts │ │ │ │ ├── meta-form │ │ │ │ │ ├── meta-form-group.component.html │ │ │ │ │ ├── meta-form-group.component.ts │ │ │ │ │ └── meta-form.module.ts │ │ │ │ ├── meta-toolbar-actions │ │ │ │ │ ├── meta-toolbar-actions.component.html │ │ │ │ │ ├── meta-toolbar-actions.component.ts │ │ │ │ │ └── meta-toolbar-actions.module.ts │ │ │ │ └── ts │ │ │ │ │ ├── PersistenceRules.oss.ts │ │ │ │ │ └── WidgetsRules.oss.ts │ │ │ └── ui │ │ │ │ ├── fiori-ui.module.ts │ │ │ │ ├── form │ │ │ │ └── string │ │ │ │ │ ├── string.component.ts │ │ │ │ │ └── string.module.ts │ │ │ │ ├── object-marker │ │ │ │ ├── object-marker.component.ts │ │ │ │ └── object-marker.module.ts │ │ │ │ ├── public_api.ts │ │ │ │ └── utils │ │ │ │ └── lang.ts │ │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.spec.json │ └── tslint.json ├── material-rules │ ├── karma.conf.ci.js │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── src │ │ ├── lib │ │ │ ├── entry-components.ts │ │ │ ├── material-rules.module.ts │ │ │ ├── metaui │ │ │ │ ├── PersistenceRules.oss │ │ │ │ ├── WidgetsRules.oss │ │ │ │ ├── meta-action-list │ │ │ │ │ ├── meta-action-list.component.html │ │ │ │ │ ├── meta-action-list.component.scss │ │ │ │ │ ├── meta-action-list.component.ts │ │ │ │ │ └── meta-action-list.componnet.spec.ts │ │ │ │ ├── meta-content-page │ │ │ │ │ ├── meta-content-page.component.html │ │ │ │ │ ├── meta-content-page.component.scss │ │ │ │ │ └── meta-content-page.component.ts │ │ │ │ ├── meta-context.spec.ts │ │ │ │ ├── meta-element-list │ │ │ │ │ ├── meta-element-list.component.html │ │ │ │ │ ├── meta-element-list.component.spec.ts │ │ │ │ │ └── meta-element-list.component.ts │ │ │ │ ├── meta-form │ │ │ │ │ ├── form-field-adapter.directive.ts │ │ │ │ │ ├── meta-form-group.component.html │ │ │ │ │ ├── meta-form-group.component.scss │ │ │ │ │ └── meta-form-group.component.ts │ │ │ │ ├── meta-ui-layout.module.ts │ │ │ │ ├── public_api.ts │ │ │ │ └── ts │ │ │ │ │ ├── PersistenceRules.oss.ts │ │ │ │ │ └── WidgetsRules.oss.ts │ │ │ └── ui │ │ │ │ ├── autocomplete │ │ │ │ ├── autocomplete.component.html │ │ │ │ └── autocomplete.component.ts │ │ │ │ ├── button │ │ │ │ ├── button.component.html │ │ │ │ └── button.component.ts │ │ │ │ ├── checkbox │ │ │ │ ├── checkbox.component.html │ │ │ │ └── checkbox.component.ts │ │ │ │ ├── date-picker │ │ │ │ ├── date-picker.component.html │ │ │ │ └── date-picker.component.ts │ │ │ │ ├── input │ │ │ │ ├── input.component.html │ │ │ │ └── input.component.ts │ │ │ │ ├── radio-group │ │ │ │ ├── radio-group.component.html │ │ │ │ └── radio-group.component.ts │ │ │ │ ├── select │ │ │ │ ├── select.component.html │ │ │ │ └── select.component.ts │ │ │ │ ├── string │ │ │ │ ├── string.component.html │ │ │ │ └── string.component.ts │ │ │ │ ├── text-area │ │ │ │ ├── text-area.component.html │ │ │ │ └── text-area.component.ts │ │ │ │ └── ui.module.ts │ │ ├── public_api.ts │ │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.spec.json │ └── tslint.json ├── rules │ ├── karma.conf.ci.js │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── src │ │ ├── lib │ │ │ ├── metaui │ │ │ │ ├── core │ │ │ │ │ ├── PersistenceRules.oss │ │ │ │ │ ├── WidgetsRules.oss │ │ │ │ │ ├── binding-factory.service.ts │ │ │ │ │ ├── compiler │ │ │ │ │ │ ├── interpreter.spec.ts │ │ │ │ │ │ ├── metaui-ast.ts │ │ │ │ │ │ ├── metaui-lexer.spec.ts │ │ │ │ │ │ ├── offline-rules-visitor.ts │ │ │ │ │ │ ├── oss-lexer.ts │ │ │ │ │ │ ├── oss-parser.spec.ts │ │ │ │ │ │ ├── oss-parser.ts │ │ │ │ │ │ ├── rules-visitor.ts │ │ │ │ │ │ ├── runtime-parser.spec.ts │ │ │ │ │ │ └── runtime-parser.visitor.ts │ │ │ │ │ ├── component-registry.service.ts │ │ │ │ │ ├── config │ │ │ │ │ │ ├── environment.ts │ │ │ │ │ │ └── meta-config.ts │ │ │ │ │ ├── constants.ts │ │ │ │ │ ├── context-property.pipe.ts │ │ │ │ │ ├── context.spec.ts │ │ │ │ │ ├── context.ts │ │ │ │ │ ├── decorators │ │ │ │ │ │ ├── action.ts │ │ │ │ │ │ ├── decorators.spec.ts │ │ │ │ │ │ ├── property.ts │ │ │ │ │ │ ├── traits.ts │ │ │ │ │ │ └── utils.ts │ │ │ │ │ ├── i18n │ │ │ │ │ │ └── localized-string.ts │ │ │ │ │ ├── item-properties.ts │ │ │ │ │ ├── match.ts │ │ │ │ │ ├── meta-context │ │ │ │ │ │ └── meta-context.component.ts │ │ │ │ │ ├── meta-core.module.ts │ │ │ │ │ ├── meta.spec.ts │ │ │ │ │ ├── meta.ts │ │ │ │ │ ├── nested-map.ts │ │ │ │ │ ├── object-meta.ts │ │ │ │ │ ├── policies │ │ │ │ │ │ └── merging-policy.ts │ │ │ │ │ ├── property-value.ts │ │ │ │ │ ├── public_api.ts │ │ │ │ │ ├── rule.ts │ │ │ │ │ ├── tranformers.ts │ │ │ │ │ ├── ts │ │ │ │ │ │ ├── PersistenceRules.oss.ts │ │ │ │ │ │ └── WidgetsRules.oss.ts │ │ │ │ │ ├── uimeta.ts │ │ │ │ │ └── utils │ │ │ │ │ │ ├── basicTypes.spec.ts │ │ │ │ │ │ ├── collection.spec.ts │ │ │ │ │ │ ├── collection.ts │ │ │ │ │ │ ├── domain-model.ts │ │ │ │ │ │ ├── field-path.spec.ts │ │ │ │ │ │ ├── field-path.ts │ │ │ │ │ │ ├── lang.ts │ │ │ │ │ │ ├── routing.service.ts │ │ │ │ │ │ └── utils.spec.ts │ │ │ │ ├── entry-components.ts │ │ │ │ ├── layout │ │ │ │ │ ├── core │ │ │ │ │ │ ├── base-renderer.directive.ts │ │ │ │ │ │ ├── dom-utils.service.ts │ │ │ │ │ │ └── generic-container.component.ts │ │ │ │ │ ├── meta-layout.module.ts │ │ │ │ │ ├── meta-layout.ts │ │ │ │ │ ├── meta-renderer.component.ts │ │ │ │ │ ├── meta.base.component.ts │ │ │ │ │ ├── no-meta │ │ │ │ │ │ ├── no-meta.component.scss │ │ │ │ │ │ └── no-meta.component.ts │ │ │ │ │ └── public_api.ts │ │ │ │ ├── public_api.ts │ │ │ │ ├── rules-routing.module.ts │ │ │ │ ├── rules.module.ts │ │ │ │ └── test.rules.module.ts │ │ │ └── resources │ │ │ │ ├── bin │ │ │ │ └── oss.js │ │ │ │ └── compiler │ │ │ │ ├── PersistenceRules-core.oss │ │ │ │ ├── PersistenceRules-ui.oss │ │ │ │ ├── WidgetsRules-core.oss │ │ │ │ ├── WidgetsRules-ui-m.oss │ │ │ │ ├── WidgetsRules-ui.oss │ │ │ │ ├── context │ │ │ │ └── WidgetsRules-ui-m.oss │ │ │ │ ├── decorator │ │ │ │ └── uilib.oss │ │ │ │ ├── metaspec │ │ │ │ └── uilib.oss │ │ │ │ ├── metaui.bnf │ │ │ │ ├── parser.jj │ │ │ │ ├── persistencerules-core.ts │ │ │ │ ├── persistencerules-ui.ts │ │ │ │ ├── test.oss │ │ │ │ ├── test2WP.oss │ │ │ │ ├── widgets-rules-core.ts │ │ │ │ └── widgets-rules-ui.ts │ │ ├── public_api.ts │ │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.spec.json │ └── tslint.json └── schematics │ ├── .gitignore │ ├── .npmignore │ ├── collection.json │ ├── common │ ├── add-schema.ts │ ├── schema.ts │ └── schematics-utils.ts │ ├── ng-add │ ├── add-schema.json │ ├── files │ │ └── rules │ │ │ ├── Application.oss │ │ │ ├── README.md │ │ │ ├── ts │ │ │ ├── .gitkeep │ │ │ └── Application.oss.ts │ │ │ └── user-rules.ts │ ├── index.ts │ └── init-project │ │ ├── add-core-imports.ts │ │ ├── add-oss-compile-script.ts │ │ ├── add-rules-subsystem.ts │ │ ├── add-ui-lib-imports.ts │ │ ├── index.ts │ │ ├── register-app-rules.ts │ │ └── register-commonjs-deps.ts │ ├── ng-generate │ └── m-page │ │ ├── files │ │ ├── component │ │ │ ├── __name@dasherize__.component.html │ │ │ ├── __name@dasherize__.component.scss │ │ │ └── __name@dasherize__.component.ts │ │ ├── model │ │ │ └── __modelClass@dasherize__.ts │ │ └── rules │ │ │ └── __modelClass@classify__.oss │ │ ├── index.ts │ │ ├── page-schema.json │ │ └── page-schema.ts │ ├── ng-update │ └── index.ts │ └── tsconfig.json ├── migrations.json ├── nx.json ├── package-lock.json ├── package.json ├── scripts ├── ci │ ├── build.sh │ ├── lint.sh │ └── test.sh ├── npmPublish.sh └── release.sh ├── temp ├── demo │ ├── dashboard │ │ ├── dashboard.component.html │ │ ├── dashboard.component.scss │ │ ├── dashboard.component.ts │ │ └── dashboard.module.ts │ ├── demo-routing.module.ts │ ├── demo.module.ts │ ├── domain │ │ ├── invoice │ │ │ ├── address │ │ │ │ ├── address.component.html │ │ │ │ ├── address.component.scss │ │ │ │ └── address.component.ts │ │ │ ├── invoice-create.component.html │ │ │ ├── invoice-create.component.scss │ │ │ ├── invoice-create.component.ts │ │ │ ├── invoice-edit.component.html │ │ │ ├── invoice-edit.component.scss │ │ │ ├── invoice-edit.component.ts │ │ │ ├── invoice-view.component.html │ │ │ ├── invoice-view.component.scss │ │ │ ├── invoice-view.component.ts │ │ │ └── invoice.module.ts │ │ ├── model │ │ │ ├── address.ts │ │ │ ├── invoice.ts │ │ │ ├── payment-terms.ts │ │ │ ├── supplier.ts │ │ │ └── user.ts │ │ ├── rest │ │ │ ├── address.ts │ │ │ ├── entity-resolver.service.ts │ │ │ ├── payment-terms.ts │ │ │ ├── supplier.ts │ │ │ └── user.ts │ │ ├── supplier │ │ │ ├── supplier-view.component.html │ │ │ ├── supplier-view.component.scss │ │ │ └── supplier-view.component.ts │ │ └── user │ │ │ ├── user-view.component.html │ │ │ ├── user-view.component.scss │ │ │ └── user-view.component.ts │ ├── home.component.html │ ├── home.component.scss │ ├── home.component.ts │ ├── landing │ │ ├── landing.component.html │ │ ├── landing.component.scss │ │ ├── landing.component.ts │ │ └── landing.module.ts │ ├── landing2 │ │ ├── landing2.component.html │ │ ├── landing2.component.scss │ │ ├── landing2.component.ts │ │ └── landing2.module.ts │ ├── landing3 │ │ ├── landing3.component.html │ │ ├── landing3.component.scss │ │ ├── landing3.component.ts │ │ └── landing3.module.ts │ └── portlets │ │ ├── commodity │ │ ├── commodity.component.html │ │ ├── commodity.component.scss │ │ ├── commodity.component.ts │ │ └── commodity.module.ts │ │ ├── my-documents │ │ ├── my-documents.component.html │ │ ├── my-documents.component.scss │ │ ├── my-documents.component.ts │ │ └── my-documents.module.ts │ │ ├── my-spend │ │ ├── data.ts │ │ ├── my-spend.component.html │ │ ├── my-spend.component.scss │ │ ├── my-spend.component.ts │ │ └── my-spend.module.ts │ │ └── news │ │ ├── news.component.html │ │ ├── news.component.scss │ │ ├── news.component.ts │ │ └── news.module.ts └── mdemo │ ├── domain │ ├── invoice │ │ ├── address │ │ │ ├── address.component.html │ │ │ ├── address.component.scss │ │ │ └── address.component.ts │ │ ├── invoice.component.html │ │ ├── invoice.component.scss │ │ ├── invoice.component.ts │ │ └── invoice.module.ts │ ├── model │ │ ├── address.ts │ │ ├── invoice.ts │ │ ├── payment-terms.ts │ │ ├── supplier.ts │ │ └── user.ts │ └── rest │ │ ├── address.ts │ │ ├── entity-resolver.service.ts │ │ ├── payment-terms.ts │ │ ├── supplier.ts │ │ └── user.ts │ ├── home.component.html │ ├── home.component.scss │ ├── home.component.ts │ ├── landing2 │ ├── landing2.component.html │ ├── landing2.component.scss │ ├── landing2.component.ts │ └── landing2.module.ts │ ├── landing3 │ ├── landing3.component.html │ ├── landing3.component.scss │ ├── landing3.component.ts │ └── landing3.module.ts │ ├── meta-demo-routing.module.ts │ ├── meta-demo.module.ts │ └── portlets │ ├── commodity │ ├── commodity.component.html │ ├── commodity.component.scss │ ├── commodity.component.ts │ └── commodity.module.ts │ ├── my-documents │ ├── my-documents.component.html │ ├── my-documents.component.scss │ ├── my-documents.component.ts │ └── my-documents.module.ts │ ├── my-spend │ ├── data.ts │ ├── my-spend.component.html │ ├── my-spend.component.scss │ ├── my-spend.component.ts │ └── my-spend.module.ts │ └── news │ ├── news.component.html │ ├── news.component.scss │ ├── news.component.ts │ └── news.module.ts ├── tools ├── generators │ └── .gitkeep └── tsconfig.tools.json ├── tsconfig.base.json ├── tsconfig.ci.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | end_of_line = lf 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 2 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | max_line_length = off 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## PR Checklist 2 | Please check if your PR fulfills the following requirements: 3 | 4 | - [ ] Tests for the changes have been added (for bug fixes / features) 5 | - [ ] Docs have been added / updated (for bug fixes / features) 6 | 7 | 8 | ## PR Type 9 | What kind of change does this PR introduce? 10 | 11 | 12 | 13 | - [ ] Bugfix 14 | - [ ] Feature 15 | - [ ] Code style update (formatting, local variables) 16 | - [ ] Refactoring (no functional changes, no api changes) 17 | - [ ] Build related changes 18 | - [ ] CI related changes 19 | - [ ] Documentation content changes 20 | - [ ] Other... Please describe: 21 | 22 | 23 | ## What is the current behavior? 24 | 25 | 26 | Issue Number: N/A 27 | 28 | 29 | ## What is the new behavior? 30 | 31 | 32 | ## Does this PR introduce a breaking change? 33 | 34 | - [ ] Yes 35 | - [ ] No 36 | 37 | 38 | 39 | 40 | 41 | ## Other information 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | info-intern.txt 4 | 5 | # compiled output 6 | /dist 7 | /tmp 8 | /out-tsc 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events.json 15 | speed-measure-plugin.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | *.iml 26 | 27 | # IDE - VSCode 28 | .vscode/* 29 | !.vscode/settings.json 30 | !.vscode/tasks.json 31 | !.vscode/launch.json 32 | !.vscode/extensions.json 33 | .history/* 34 | 35 | # misc 36 | /.sass-cache 37 | /connect.lock 38 | /coverage 39 | /libpeerconnection.log 40 | npm-debug.log 41 | yarn-error.log 42 | testem.log 43 | /typings 44 | 45 | # System Files 46 | .DS_Store 47 | Thumbs.db 48 | .npmrc 49 | /libs/fiori-rules/src/__ngcc_entry_points__.json 50 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: required 3 | dist: trusty 4 | node_js: 5 | - 'v12.0.0' 6 | 7 | addons: 8 | chrome: stable 9 | 10 | 11 | branches: 12 | except: 13 | - TestRelease 14 | 15 | cache: 16 | directories: 17 | - ./node_modules 18 | 19 | before_script: 20 | - "sudo chown root /opt/google/chrome/chrome-sandbox" 21 | - "sudo chmod 4755 /opt/google/chrome/chrome-sandbox" 22 | 23 | script: 24 | - ./scripts/ci/build.sh ci 25 | - ./scripts/ci/lint.sh ci 26 | - ./scripts/ci/test.sh ci 27 | 28 | 29 | 30 | notifications: 31 | email: 32 | on_failure: change 33 | on_success: change 34 | 35 | 36 | 37 | after_success: 38 | - echo "Build ok" 39 | 40 | after_failure: 41 | - echo "Build KO" 42 | 43 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "nrwl.angular-console", 4 | "angular.ng-template", 5 | "esbenp.prettier-vscode" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /apps/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/doc-app/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # 5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed 6 | 7 | > 0.5% 8 | last 2 versions 9 | Firefox ESR 10 | not dead 11 | not IE 9-11 12 | -------------------------------------------------------------------------------- /apps/doc-app/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | const { join } = require("path"); 5 | const getBaseKarmaConfig = require("../../karma.conf"); 6 | 7 | module.exports = function(config) { 8 | const baseConfig = getBaseKarmaConfig(); 9 | config.set({ 10 | ...baseConfig, 11 | coverageIstanbulReporter: { 12 | ...baseConfig.coverageIstanbulReporter, 13 | dir: join(__dirname, "../../coverage/apps/doc-app/") 14 | } 15 | }); 16 | }; 17 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule } from '@angular/router'; 3 | 4 | import { routes } from './app.routing'; 5 | 6 | @NgModule({ 7 | imports: [RouterModule.forRoot(routes, { useHash: true, relativeLinkResolution: 'legacy' })], 8 | exports: [RouterModule] 9 | }) 10 | export class AppRoutingModule { } 11 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 | 19 | 22 |
23 | 24 | 25 |
26 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | @import "../variables"; 2 | 3 | #wrapper { 4 | display: flex; 5 | height: calc(100vh - #{$header-height}); 6 | flex-flow: column nowrap; 7 | min-width: 320px; 8 | padding-top: $header-height; 9 | } 10 | #main { 11 | flex: 1; 12 | 13 | .sidenav { 14 | position: fixed; 15 | left: 0; 16 | bottom: 0; 17 | top: $header-height; 18 | width: $sidenav-width; 19 | overflow-y: auto; 20 | } 21 | } 22 | /* mat-sidenav-container */ 23 | .mat-sidenav-container { 24 | height: 100%; 25 | } 26 | /* aside-nav */ 27 | .aside-nav { 28 | flex: 0 0 $aside-nav-width; 29 | } 30 | /* content */ 31 | #content { 32 | flex: 1; 33 | flex-flow: row nowrap; 34 | display: flex; 35 | } 36 | /* content-holder */ 37 | .content-holder { 38 | padding: 0 30px 50px; 39 | box-sizing: border-box; 40 | overflow: hidden; 41 | } 42 | /* tablet styles */ 43 | .tablet { 44 | app-aside-nav { 45 | bottom: 0; 46 | overflow: auto; 47 | } 48 | 49 | app-footer { 50 | margin-right: $aside-nav-width; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/app.routing.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | 3 | export const routes: Routes = [ 4 | { 5 | path: 'getting-started', 6 | loadChildren: () => import('./components/doc-page/doc-page.module').then(m => m.DocPageModule), 7 | data: { title: 'Getting Started' , path: 'assets/docs/getting-started.md'} 8 | }, 9 | { 10 | path: 'oss-rules', 11 | loadChildren: () => import('./components/doc-page/doc-page.module').then(m => m.DocPageModule), 12 | data: { title: 'OSS Rules' , path: 'assets/docs/oss-rules.md'} 13 | }, 14 | { 15 | path: 'oss-syntax', 16 | loadChildren: () => import('./components/doc-page/doc-page.module').then(m => m.DocPageModule), 17 | data: { title: 'OSS Syntax', path: 'assets/docs/oss-syntax.md'} 18 | }, 19 | { 20 | path: 'metaui-architecture', 21 | loadChildren: () => import('./components/doc-page/doc-page.module').then(m => m.DocPageModule), 22 | data: { title: 'MetaUI Architecture' , path: 'assets/docs/metaui-architecture.md'} 23 | }, 24 | { 25 | path: '', 26 | redirectTo: 'getting-started', 27 | pathMatch: 'full', 28 | } 29 | ]; 30 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/components/doc-page/doc-page-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { DocPageComponent } from './doc-page.component'; 4 | 5 | const routes: Routes = [ 6 | { 7 | path: '', 8 | component: DocPageComponent 9 | } 10 | ]; 11 | 12 | @NgModule({ 13 | imports: [RouterModule.forChild(routes)], 14 | exports: [RouterModule] 15 | }) 16 | export class DocPageRoutingModule { } 17 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/components/doc-page/doc-page.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {ActivatedRoute} from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'app-doc-page', 6 | template: ` 7 | ` 8 | }) 9 | export class DocPageComponent { 10 | mdFile: string = 'assets/docs/getting-started.doc.md'; 11 | 12 | constructor(public router: ActivatedRoute) { 13 | this.mdFile = router.snapshot.data.path; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/components/doc-page/doc-page.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { DocPageRoutingModule } from './doc-page-routing.module'; 5 | import { DocPageComponent } from './doc-page.component'; 6 | import { MarkdownModule } from '../../layout/markdown/markdown.module'; 7 | 8 | @NgModule({ 9 | declarations: [ 10 | DocPageComponent 11 | ], 12 | imports: [ 13 | CommonModule, 14 | DocPageRoutingModule, 15 | MarkdownModule 16 | ], 17 | }) 18 | export class DocPageModule { } 19 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/aside-nav/aside-nav.component.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/aside-nav/aside-nav.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { AsideNavComponent } from './aside-nav.component'; 4 | 5 | describe('AsideNavComponent', () => { 6 | let component: AsideNavComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AsideNavComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AsideNavComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/footer/footer.component.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/footer/footer.component.scss: -------------------------------------------------------------------------------- 1 | @import "../../../variables"; 2 | 3 | :host { 4 | display: block; 5 | } 6 | 7 | #footer { 8 | padding: 20px; 9 | border-top: 1px solid $border-color; 10 | color: $text-color; 11 | text-align: center; 12 | 13 | a { 14 | color: currentColor; 15 | text-decoration: none; 16 | transition: color 250ms ease; 17 | 18 | &:hover { 19 | text-decoration: none; 20 | color: $color-black; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/footer/footer.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { FooterComponent } from './footer.component'; 4 | 5 | describe('FooterComponent', () => { 6 | let component: FooterComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ FooterComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(FooterComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-footer', 5 | templateUrl: './footer.component.html', 6 | styleUrls: ['./footer.component.scss'] 7 | }) 8 | export class FooterComponent { 9 | 10 | constructor() { } 11 | } 12 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/header/header.component.html: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/header/header.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { HeaderComponent } from './header.component'; 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { MatToolbar } from '@angular/material/toolbar'; 6 | import { HttpClientModule } from '@angular/common/http'; 7 | 8 | describe('HeaderComponent', () => { 9 | let component: HeaderComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach(waitForAsync(() => { 13 | TestBed.configureTestingModule({ 14 | imports: [ 15 | MatIconModule, 16 | HttpClientModule 17 | ], 18 | declarations: [ 19 | HeaderComponent, 20 | MatToolbar 21 | ] 22 | }) 23 | .compileComponents(); 24 | })); 25 | 26 | beforeEach(() => { 27 | fixture = TestBed.createComponent(HeaderComponent); 28 | component = fixture.componentInstance; 29 | fixture.detectChanges(); 30 | }); 31 | 32 | it('should create', () => { 33 | expect(component).toBeTruthy(); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/header/header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, Output } from '@angular/core'; 2 | import { MatIconRegistry } from '@angular/material/icon'; 3 | import { DomSanitizer } from '@angular/platform-browser'; 4 | 5 | @Component({ 6 | selector: 'app-header', 7 | templateUrl: './header.component.html', 8 | styleUrls: ['./header.component.scss'] 9 | }) 10 | export class HeaderComponent { 11 | @Output() navBtnClick: EventEmitter = new EventEmitter(); 12 | 13 | constructor( 14 | private matIconRegistry: MatIconRegistry, 15 | private domSanitizer: DomSanitizer 16 | ) { 17 | this.matIconRegistry 18 | .addSvgIcon( 19 | 'ngx-meta-github', 20 | this.domSanitizer.bypassSecurityTrustResourceUrl('./assets/images/ico-github.svg') 21 | ).addSvgIcon( 22 | 'ngx-meta-twitter', 23 | this.domSanitizer.bypassSecurityTrustResourceUrl('./assets/images/ico-twitter.svg') 24 | ).addSvgIcon( 25 | 'ngx-meta-hamburger', 26 | this.domSanitizer.bypassSecurityTrustResourceUrl('./assets/images/ico-hamburger.svg') 27 | ); 28 | } 29 | 30 | navToggle(): void { 31 | this.navBtnClick.emit(null); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/markdown/markdown.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { MarkdownComponent } from './markdown.component'; 4 | 5 | 6 | @NgModule({ 7 | declarations: [ 8 | MarkdownComponent 9 | ], 10 | imports: [ 11 | CommonModule, 12 | ], 13 | exports: [ 14 | MarkdownComponent 15 | ] 16 | }) 17 | export class MarkdownModule { } 18 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/sidebar/sidebar.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ item.data.title }} 5 | 6 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/sidebar/sidebar.component.scss: -------------------------------------------------------------------------------- 1 | @import "../../../variables"; 2 | 3 | :host { 4 | display: block; 5 | padding-bottom: 30px; 6 | } 7 | .mat-list-base { 8 | 9 | .mat-list-item { 10 | height: auto; 11 | 12 | ::ng-deep .mat-list-item-content { 13 | padding-left: 0; 14 | padding-right: 0; 15 | } 16 | 17 | a { 18 | display: block; 19 | width: 100%; 20 | padding: 0 16px; 21 | line-height: 42px; 22 | box-sizing: border-box; 23 | font-size: 15px; 24 | font-weight: 600; 25 | 26 | &.active { 27 | color: $color-blue; 28 | } 29 | } 30 | 31 | ::ng-deep .mat-list-item-content { 32 | flex-direction: column; 33 | } 34 | } 35 | } 36 | 37 | .sub-nav { 38 | margin: 0; 39 | padding: 0 0 10px 16px; 40 | list-style: none; 41 | border-bottom: 1px solid $border-color; 42 | 43 | a { 44 | display: block; 45 | font-size: 14px; 46 | padding: 6px 10px; 47 | transition: color 250ms ease, background-color 250ms ease; 48 | 49 | &:hover { 50 | color: $color-blue; 51 | background-color: $color-grey-04; 52 | } 53 | 54 | &.active { 55 | color: $color-blue; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/layout/sidebar/sidebar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { SidebarComponent } from './sidebar.component'; 4 | import { HttpClientModule } from '@angular/common/http'; 5 | import { MatListModule } from '@angular/material/list'; 6 | 7 | describe('SidebarComponent', () => { 8 | let component: SidebarComponent; 9 | let fixture: ComponentFixture; 10 | 11 | beforeEach(waitForAsync(() => { 12 | TestBed.configureTestingModule({ 13 | imports: [ 14 | HttpClientModule, 15 | MatListModule 16 | ], 17 | declarations: [ 18 | SidebarComponent 19 | ] 20 | }) 21 | .compileComponents(); 22 | })); 23 | 24 | beforeEach(() => { 25 | fixture = TestBed.createComponent(SidebarComponent); 26 | component = fixture.componentInstance; 27 | fixture.detectChanges(); 28 | }); 29 | 30 | it('should create', () => { 31 | expect(component).toBeTruthy(); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/services/anchor-scroll.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, Inject } from '@angular/core'; 2 | import { DOCUMENT, Location } from '@angular/common'; 3 | import { PageScrollService } from 'ngx-page-scroll-core'; 4 | import { Router } from '@angular/router'; 5 | import { log } from 'util'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class AnchorScrollService { 11 | 12 | constructor( 13 | private pageScrollService: PageScrollService, 14 | private router: Router, 15 | @Inject(DOCUMENT) private document: any 16 | ) { } 17 | 18 | scrollToTarget(targetId: string): void { 19 | const parentView = this.document.getElementById('mat-content'); 20 | 21 | if (targetId) { 22 | this.pageScrollService.scroll({ 23 | document: this.document, 24 | scrollTarget: '#' + targetId, 25 | scrollViews: [ 26 | parentView 27 | ], 28 | scrollOffset: 20, 29 | duration: 250 30 | }); 31 | } 32 | 33 | if (!targetId) { 34 | parentView.scroll(0, 0); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /apps/doc-app/src/app/services/headings-list.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Subject } from 'rxjs'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class HeadingsListService { 8 | navList: Subject; 9 | 10 | constructor() { 11 | this.navList = new Subject(); 12 | } 13 | 14 | getHeaders(element) { 15 | const headings: HTMLElement[] = element.querySelectorAll('h1[id], h2[id], h3[id], h4[id]'); 16 | 17 | this.navList.next(headings); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/doc-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/doc-app/src/assets/.gitkeep -------------------------------------------------------------------------------- /apps/doc-app/src/assets/images/ico-github.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/doc-app/src/assets/images/ico-hamburger.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/doc-app/src/assets/images/ico-twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/doc-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /apps/doc-app/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /apps/doc-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/doc-app/src/favicon.ico -------------------------------------------------------------------------------- /apps/doc-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NgxMetaDocs 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /apps/doc-app/src/main.ts: -------------------------------------------------------------------------------- 1 | import {enableProdMode} from '@angular/core'; 2 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; 3 | 4 | import {AppModule} from './app/app.module'; 5 | import {environment} from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.error(err)); 14 | -------------------------------------------------------------------------------- /apps/doc-app/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import {getTestBed} from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /apps/doc-app/src/variables.scss: -------------------------------------------------------------------------------- 1 | $color-grey: #cecece; 2 | $color-grey-02: #455A64; 3 | $color-grey-03: #607d8b; 4 | $color-grey-04: #f5f5f5; 5 | $color-grey-05: #fafafa; 6 | $color-black: #253137; 7 | $color-blue: #2196f3; 8 | 9 | $border-color: $color-grey; 10 | 11 | $header-height: 64px; 12 | $sidenav-width: 260px; 13 | $aside-nav-width: 180px; 14 | $text-color: $color-grey-03; 15 | -------------------------------------------------------------------------------- /apps/doc-app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": ["node"] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/doc-app/tsconfig.editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "types": ["jasmine", "node"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/doc-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "types": ["jasmine"] 5 | }, 6 | "include": [], 7 | "files": [], 8 | "references": [ 9 | { 10 | "path": "./tsconfig.app.json" 11 | }, 12 | { 13 | "path": "./tsconfig.spec.json" 14 | }, 15 | { 16 | "path": "./tsconfig.editor.json" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /apps/doc-app/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": ["jasmine", "node"] 6 | }, 7 | "files": ["src/test.ts", "src/polyfills.ts"], 8 | "include": ["**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/doc-app/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "ngxMetaui", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | }, 17 | "linterOptions": { 18 | "exclude": [ 19 | "!**/*" 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /apps/fiori-app/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /apps/fiori-app/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | const {join} = require("path"); 5 | const getBaseKarmaConfig = require("../../karma.conf"); 6 | 7 | module.exports = function (config) { 8 | const baseConfig = getBaseKarmaConfig(); 9 | config.set({ 10 | ...baseConfig, 11 | coverageIstanbulReporter: { 12 | ...baseConfig.coverageIstanbulReporter, 13 | dir: join(__dirname, "../../coverage/apps/fiori-app") 14 | } 15 | }); 16 | }; 17 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {RouterModule, Routes} from '@angular/router'; 3 | import {UserDetailComponent} from './user-detail/user-detail.component'; 4 | 5 | 6 | const appRoutes: Routes = [ 7 | {path: 'user', component: UserDetailComponent}, 8 | {path: '', redirectTo: '/user', pathMatch: 'full'} 9 | ]; 10 | 11 | @NgModule({ 12 | imports: [ 13 | RouterModule.forRoot(appRoutes) 14 | ], 15 | exports: [ 16 | RouterModule 17 | ] 18 | }) 19 | export class AppRoutingModule { 20 | } 21 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 4 |
5 | 6 | 7 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/app.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/fiori-app/src/app/app.component.scss -------------------------------------------------------------------------------- /apps/fiori-app/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'fdp-root', 6 | templateUrl: './app.component.html', 7 | styleUrls: ['./app.component.scss'] 8 | }) 9 | export class AppComponent { 10 | 11 | 12 | constructor() { 13 | } 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/model/user.ts: -------------------------------------------------------------------------------- 1 | import {Entity} from '@ngx-metaui/rules'; 2 | 3 | export class User implements Entity { 4 | 5 | 6 | constructor( 7 | public title?: string, 8 | public uniqueName?: string, 9 | public firstName?: string, 10 | public lastName?: string, 11 | public description?: string) { 12 | } 13 | 14 | identity(): string { 15 | return this.uniqueName; 16 | } 17 | 18 | 19 | getTypes(): any { 20 | return { 21 | title: String, 22 | uniqueName: String, 23 | firstName: String, 24 | lastName: String, 25 | description: String 26 | }; 27 | } 28 | 29 | 30 | /** 31 | * Used by MetaUI to identify the name of the class once everything is minified 32 | */ 33 | className(): string { 34 | return 'User'; 35 | } 36 | 37 | toString(): string { 38 | return this.lastName; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/rules/Application.oss: -------------------------------------------------------------------------------- 1 | module { 2 | 3 | } 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/rules/index.ts: -------------------------------------------------------------------------------- 1 | export {UserRule} from './ts/User.oss'; 2 | 3 | 4 | export {InvoiceRule} from './ts/Invoice.oss'; 5 | 6 | export {AddressRule} from './ts/Address.oss'; 7 | 8 | export {SupplierRule} from './ts/Supplier.oss'; 9 | 10 | 11 | export {ApplicationRule} from './ts/Application.oss'; 12 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/rules/ts/Address.oss.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is generated file. Do not edit !! 3 | * 4 | * @formatter:off 5 | * 6 | */ 7 | /* tslint:disable */ 8 | export const AddressRule = 'class=Address { field=name { trait:labelField; } @field=(line1 , line2) { trait:derived; type:String; } zNone => *; zLeft => name; } locale=de class=Address { field=line1 { value:${object.lines }; } field=line2 { value:${object.postalCode + ", " + object.city + ", " + object.country }; } zNone => *; zLeft => line1 => line2 ; } locale=us class=Address { field=line1 { value:${object.lines + ", " + object.city}; } field=line2 { value:${object.state + ", " + object.postalCode}; } zNone => *; zLeft => line1 => line2 => country ; } locale=ja class=Address { field=line1 { value:${"家 :" + object.lines + ", " + object.city}; } field=line2 { value:${"市 : " + object.city + ", "+object.state + ", "}; } @field=line3 { trait: derived; type: String; value:${"郵便 : " + object.postalCode + ", "+object.country + "住所"} ; } zNone => *; zLeft => line1 => line2 => line3 ; } '; 9 | /* tslint:disable */ 10 | /** 11 | * @formatter:on 12 | * 13 | */ 14 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/rules/ts/Application.oss.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is generated file. Do not edit !! 3 | * 4 | * @formatter:off 5 | * 6 | */ 7 | /* tslint:disable */ 8 | export const ApplicationRule = 'module {ɵɵ}ɵɵɵɵ'; 9 | /* tslint:disable */ 10 | /** 11 | * @formatter:on 12 | * 13 | */ 14 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/rules/ts/Supplier.oss.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is generated file. Do not edit !! 3 | * 4 | * @formatter:off 5 | * 6 | */ 7 | /* tslint:disable */ 8 | export const SupplierRule = 'class=Supplier { field=uniqueName { label:"Id"; } field=name { trait:labelField; } zLeft => name => contact => lines => city => email; zRight => locationName => contactUser#withDetail; } '; 9 | /* tslint:disable */ 10 | /** 11 | * @formatter:on 12 | * 13 | */ 14 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/user-detail/user-detail.component.html: -------------------------------------------------------------------------------- 1 | | 2 | 3 | 4 | 5 | operation: {{operation}} 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | {{errors.metavalid.msg }} 15 | 16 | 17 | Required field 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /apps/fiori-app/src/app/user-detail/user-detail.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/fiori-app/src/app/user-detail/user-detail.component.scss -------------------------------------------------------------------------------- /apps/fiori-app/src/app/user-rules.ts: -------------------------------------------------------------------------------- 1 | /** Auto generated export */ 2 | export * from './rules/index'; 3 | -------------------------------------------------------------------------------- /apps/fiori-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/fiori-app/src/assets/.gitkeep -------------------------------------------------------------------------------- /apps/fiori-app/src/assets/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/fiori-app/src/assets/banner.png -------------------------------------------------------------------------------- /apps/fiori-app/src/assets/chart1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/fiori-app/src/assets/chart1.png -------------------------------------------------------------------------------- /apps/fiori-app/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/fiori-app/src/assets/logo.png -------------------------------------------------------------------------------- /apps/fiori-app/src/assets/sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/fiori-app/src/assets/sales.png -------------------------------------------------------------------------------- /apps/fiori-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /apps/fiori-app/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /apps/fiori-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/fiori-app/src/favicon.ico -------------------------------------------------------------------------------- /apps/fiori-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | FioriApp 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /apps/fiori-app/src/main.ts: -------------------------------------------------------------------------------- 1 | import {ApplicationRef, enableProdMode} from '@angular/core'; 2 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; 3 | 4 | import {AppModule} from './app/app.module'; 5 | import {environment} from './environments/environment'; 6 | import {enableDebugTools} from '@angular/platform-browser'; 7 | 8 | if (environment.production) { 9 | enableProdMode(); 10 | } 11 | 12 | platformBrowserDynamic() 13 | .bootstrapModule(AppModule).then(moduleRef => { 14 | const applicationRef = moduleRef.injector.get(ApplicationRef); 15 | const componentRef = applicationRef.components[0]; 16 | // allows to run `ng.profiler.timeChangeDetection();` 17 | enableDebugTools(componentRef); 18 | }) 19 | .catch(err => console.error(err)); 20 | 21 | -------------------------------------------------------------------------------- /apps/fiori-app/src/styles.scss: -------------------------------------------------------------------------------- 1 | 2 | @font-face { 3 | font-family: "72"; 4 | src: url("~@sap-theming/theming-base-content/content/Base/baseLib/sap_base_fiori/fonts/72-Regular-full.woff") 5 | format("woff"); 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | @font-face { 11 | font-family: "72"; 12 | src: url("~@sap-theming/theming-base-content/content/Base/baseLib/sap_base_fiori/fonts/72-Light.woff") 13 | format("woff"); 14 | font-weight: 300; 15 | font-style: normal; 16 | } 17 | 18 | @font-face { 19 | font-family: "72"; 20 | src: url("~@sap-theming/theming-base-content/content/Base/baseLib/sap_base_fiori/fonts/72-Bold.woff") 21 | format("woff"); 22 | font-weight: 700; 23 | font-style: normal; 24 | } 25 | 26 | @font-face { 27 | font-family: "SAP-icons"; 28 | src: url("~@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/fonts/SAP-icons.woff") 29 | format("woff"); 30 | font-weight: normal; 31 | font-style: normal; 32 | } 33 | -------------------------------------------------------------------------------- /apps/fiori-app/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import {getTestBed} from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /apps/fiori-app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": [] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["**/*.d.ts"], 9 | "exclude": ["src/test.ts", "**/*.spec.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/fiori-app/tsconfig.editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "types": ["jasmine", "node"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/fiori-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "types": ["jasmine"] 5 | }, 6 | "include": [], 7 | "files": [], 8 | "references": [ 9 | { 10 | "path": "./tsconfig.app.json" 11 | }, 12 | { 13 | "path": "./tsconfig.spec.json" 14 | }, 15 | { 16 | "path": "./tsconfig.editor.json" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /apps/fiori-app/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": ["jasmine", "node"] 6 | }, 7 | "files": ["src/test.ts", "src/polyfills.ts"], 8 | "include": ["**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/fiori-app/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "ngxMetaui", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "fdp", 14 | "kebab-case" 15 | ] 16 | }, 17 | "linterOptions": { 18 | "exclude": [ 19 | "!**/*" 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /apps/material-app/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # 5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed 6 | 7 | > 0.5% 8 | last 2 versions 9 | Firefox ESR 10 | not dead 11 | not IE 9-11 12 | -------------------------------------------------------------------------------- /apps/material-app/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | const { join } = require('path'); 5 | const getBaseKarmaConfig = require('../../karma.conf'); 6 | 7 | module.exports = function(config) { 8 | const baseConfig = getBaseKarmaConfig(); 9 | config.set({ 10 | ...baseConfig, 11 | coverageIstanbulReporter: { 12 | ...baseConfig.coverageIstanbulReporter, 13 | dir: join(__dirname, '../../coverage/apps/material-app') 14 | } 15 | }); 16 | }; 17 | -------------------------------------------------------------------------------- /apps/material-app/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {RouterModule, Routes} from '@angular/router'; 3 | import {UserDetailComponent} from './user-detail/user-detail.component'; 4 | import {HomeComponent} from './home/home.component'; 5 | import {UserDetailExposedComponent} from './user-detail-exposed/user-detail-exposed.component'; 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', redirectTo: '/home', pathMatch: 'full' 10 | }, 11 | {path: 'home', component: HomeComponent}, 12 | {path: 'user', component: UserDetailComponent}, 13 | {path: 'userm', component: UserDetailExposedComponent} 14 | 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })], 19 | exports: [RouterModule] 20 | }) 21 | export class AppRoutingModule { 22 | } 23 | -------------------------------------------------------------------------------- /apps/material-app/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /apps/material-app/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | .form-card { 2 | padding: 15px; 3 | width: 100%; 4 | max-width: 1000px; 5 | 6 | 7 | .form-field { 8 | width: 100%; 9 | } 10 | } 11 | 12 | .form-container { 13 | display: flex; 14 | flex-direction: row; 15 | justify-content: center; 16 | } 17 | 18 | 19 | .example-radio-group { 20 | display: inline-flex; 21 | flex-direction: column; 22 | } 23 | 24 | .example-radio-button { 25 | margin: 5px; 26 | } 27 | 28 | .example-selected-value { 29 | margin: 15px 0; 30 | } 31 | .highlight-code { 32 | background-color: #e8e8e8; 33 | } 34 | -------------------------------------------------------------------------------- /apps/material-app/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, OnInit} from '@angular/core'; 2 | import {AppRoute, RoutingService} from '@ngx-metaui/rules'; 3 | import {Observable} from 'rxjs'; 4 | import {FormControl} from '@angular/forms'; 5 | 6 | 7 | export interface Animal { 8 | name: string; 9 | sound: string; 10 | } 11 | 12 | 13 | @Component({ 14 | selector: 'ngx-metaui-root', 15 | templateUrl: './app.component.html', 16 | styleUrls: ['./app.component.scss'] 17 | }) 18 | export class AppComponent implements OnInit { 19 | contextMenu$: Observable; 20 | name = new FormControl(''); 21 | 22 | foods = [ 23 | {value: 'steak-0', viewValue: 'Steak'}, 24 | {value: 'pizza-1', viewValue: 'Pizza'}, 25 | {value: 'tacos-2', viewValue: 'Tacos'} 26 | ]; 27 | 28 | constructor(public routingService: RoutingService) { 29 | } 30 | 31 | ngOnInit(): void { 32 | this.contextMenu$ = this.routingService.contextualCommands(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /apps/material-app/src/app/home/home.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | Welcome to MetaUI Demo with Material Design 2 4 |

5 | Angular Logo 6 |
7 | -------------------------------------------------------------------------------- /apps/material-app/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ngx-metaui-home', 6 | templateUrl: './home.component.html' 7 | }) 8 | export class HomeComponent { 9 | 10 | 11 | constructor() { 12 | } 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /apps/material-app/src/app/model/airline.ts: -------------------------------------------------------------------------------- 1 | import {Entity} from '@ngx-metaui/rules'; 2 | 3 | /** 4 | * This is generated class 5 | */ 6 | export class Airline implements Entity { 7 | 8 | 9 | constructor( 10 | public id?: string, 11 | public name?: string, 12 | public aliance?: string, 13 | public country?: string) { 14 | } 15 | 16 | identity(): string { 17 | return this.id; 18 | } 19 | 20 | 21 | getTypes(): any { 22 | return { 23 | id: String, 24 | name: String, 25 | aliance: String, 26 | country: String 27 | }; 28 | } 29 | 30 | 31 | /** 32 | * Used by MetaUI to identify the name of the class once everything is minified 33 | */ 34 | className(): string { 35 | return 'Airline'; 36 | } 37 | 38 | toString(): string { 39 | return this.name; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /apps/material-app/src/app/model/animal.ts: -------------------------------------------------------------------------------- 1 | import {Entity} from '@ngx-metaui/rules'; 2 | 3 | 4 | export class Animal implements Entity { 5 | 6 | 7 | constructor( 8 | public name?: string, 9 | public sound?: string) { 10 | } 11 | 12 | identity(): string { 13 | return this.name; 14 | } 15 | 16 | 17 | getTypes(): any { 18 | return { 19 | name: String, 20 | sound: String 21 | }; 22 | } 23 | 24 | 25 | /** 26 | * Used by MetaUI to identify the name of the class once everything is minified 27 | */ 28 | className(): string { 29 | return 'Animal'; 30 | } 31 | 32 | toString(): string { 33 | return this.name; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /apps/material-app/src/app/rules/Airline.oss: -------------------------------------------------------------------------------- 1 | /* 2 | Default definition 3 | */ 4 | class=Airline { 5 | 6 | field=name { 7 | trait:labelField; 8 | } 9 | 10 | } 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /apps/material-app/src/app/rules/Animal.oss: -------------------------------------------------------------------------------- 1 | /* 2 | Default definition 3 | */ 4 | class=Animal { 5 | 6 | field=name { 7 | trait:labelField; 8 | } 9 | 10 | } 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /apps/material-app/src/app/rules/index.ts: -------------------------------------------------------------------------------- 1 | export {AirlineRule} from './ts/Airline.oss'; 2 | 3 | export {AnimalRule} from './ts/Animal.oss'; 4 | 5 | export {UserRule} from './ts/User.oss'; 6 | -------------------------------------------------------------------------------- /apps/material-app/src/app/rules/ts/Airline.oss.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is generated file. Do not edit !! 3 | * 4 | * @formatter:off 5 | * 6 | */ 7 | /* tslint:disable */ 8 | export const AirlineRule = '/*ɵ Default definitionɵ*/ɵclass=Airline {ɵɵ field=name {ɵ trait:labelField;ɵ }ɵɵ}ɵɵɵɵɵ'; 9 | /* tslint:disable */ 10 | /** 11 | * @formatter:on 12 | * 13 | */ 14 | -------------------------------------------------------------------------------- /apps/material-app/src/app/rules/ts/Animal.oss.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is generated file. Do not edit !! 3 | * 4 | * @formatter:off 5 | * 6 | */ 7 | /* tslint:disable */ 8 | export const AnimalRule = '/*ɵ Default definitionɵ*/ɵclass=Animal {ɵɵ field=name {ɵ trait:labelField;ɵ }ɵɵ}ɵɵɵɵɵ'; 9 | /* tslint:disable */ 10 | /** 11 | * @formatter:on 12 | * 13 | */ 14 | -------------------------------------------------------------------------------- /apps/material-app/src/app/rules/ts/Dummy.oss.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is generated file. Do not edit !! 3 | * 4 | * @formatter:off 5 | * 6 | */ 7 | /* tslint:disable */ 8 | export const DummyRule = 'class=Dummy { } '; 9 | /* tslint:disable */ 10 | /** 11 | * @formatter:on 12 | * 13 | */ 14 | -------------------------------------------------------------------------------- /apps/material-app/src/app/user-detail-exposed/user-detail-exposed.component.scss: -------------------------------------------------------------------------------- 1 | .highlight-code { 2 | background-color: #e8e8e8; 3 | } 4 | 5 | 6 | .form-container { 7 | display: flex; 8 | flex-direction: row; 9 | justify-content: center; 10 | } 11 | 12 | .form-card { 13 | padding: 15px; 14 | width: 100%; 15 | max-width: 1000px; 16 | } 17 | 18 | ::ng-deep .meta-fg-readonly, ::ng-deep .meta-fg-readonly.mat-form-field-appearance-legacy { 19 | .mat-form-field-underline { 20 | background-color: transparent; 21 | background-image: none; 22 | } 23 | 24 | .mat-input-element { 25 | color: rgba(0,0,0,.68); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /apps/material-app/src/app/user-detail/custom-input/custom-input.component.html: -------------------------------------------------------------------------------- 1 |

From Module

2 | 19 | -------------------------------------------------------------------------------- /apps/material-app/src/app/user-detail/custom-input/custom-input.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {FormsModule, ReactiveFormsModule} from '@angular/forms'; 3 | import {CommonModule} from '@angular/common'; 4 | import {CustomInputComponent} from './custom-input.component'; 5 | import {HttpClientModule} from '@angular/common/http'; 6 | import {BidiModule} from '@angular/cdk/bidi'; 7 | 8 | @NgModule({ 9 | declarations: [ 10 | CustomInputComponent, 11 | ], 12 | imports: [ 13 | CommonModule, 14 | FormsModule, 15 | ReactiveFormsModule, 16 | BidiModule 17 | ], 18 | exports: [], 19 | providers: [] 20 | }) 21 | export class CustomInputModule { 22 | 23 | constructor() { 24 | } 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /apps/material-app/src/app/user-detail/user-detail.component.html: -------------------------------------------------------------------------------- 1 | Edit | 2 | View 3 | 4 | 5 | 6 | 7 | 8 | {{object | json}} 9 | -------------------------------------------------------------------------------- /apps/material-app/src/app/user-detail/user-detail.component.scss: -------------------------------------------------------------------------------- 1 | .highlight-code { 2 | background-color: #e8e8e8; 3 | } 4 | -------------------------------------------------------------------------------- /apps/material-app/src/app/user-rules.ts: -------------------------------------------------------------------------------- 1 | /** Auto generated export */ 2 | export * from './rules/index'; 3 | 4 | export * from './user-detail/custom-input/custom-input.module'; 5 | -------------------------------------------------------------------------------- /apps/material-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/material-app/src/assets/.gitkeep -------------------------------------------------------------------------------- /apps/material-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /apps/material-app/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /apps/material-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/apps/material-app/src/favicon.ico -------------------------------------------------------------------------------- /apps/material-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MaterialApp 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /apps/material-app/src/main.ts: -------------------------------------------------------------------------------- 1 | import {ApplicationRef, enableProdMode} from '@angular/core'; 2 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; 3 | 4 | import {AppModule} from './app/app.module'; 5 | import {environment} from './environments/environment'; 6 | import {enableDebugTools} from '@angular/platform-browser'; 7 | 8 | if (environment.production) { 9 | enableProdMode(); 10 | } 11 | 12 | platformBrowserDynamic() 13 | .bootstrapModule(AppModule).then(moduleRef => { 14 | const applicationRef = moduleRef.injector.get(ApplicationRef); 15 | const componentRef = applicationRef.components[0]; 16 | // allows to run `ng.profiler.timeChangeDetection();` 17 | enableDebugTools(componentRef); 18 | }) 19 | .catch(err => console.error(err)); 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /apps/material-app/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /apps/material-app/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import {getTestBed} from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /apps/material-app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": [] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/material-app/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": ["jasmine", "node"] 6 | }, 7 | "files": ["src/test.ts", "src/polyfills.ts"], 8 | "include": ["**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/material-app/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "ngx-metaui", 8 | "app", 9 | "camelCase" 10 | ], 11 | "component-selector": [ 12 | true, 13 | "element", 14 | "ngx-metaui", 15 | "kebab-case" 16 | ] 17 | }, 18 | "linterOptions": { 19 | "exclude": [ 20 | "!**/*" 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docs/meta/action-links-clicked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/action-links-clicked.png -------------------------------------------------------------------------------- /docs/meta/action-links.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/action-links.png -------------------------------------------------------------------------------- /docs/meta/action-save-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/action-save-1.png -------------------------------------------------------------------------------- /docs/meta/action-save-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/action-save-2.png -------------------------------------------------------------------------------- /docs/meta/css-rule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/css-rule.png -------------------------------------------------------------------------------- /docs/meta/editable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/editable.png -------------------------------------------------------------------------------- /docs/meta/full-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/full-name.png -------------------------------------------------------------------------------- /docs/meta/getting-started-1.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/getting-started-1.1.png -------------------------------------------------------------------------------- /docs/meta/meta-1.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/meta-1.0.png -------------------------------------------------------------------------------- /docs/meta/meta-1.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/meta-1.1.jpg -------------------------------------------------------------------------------- /docs/meta/meta-1.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/meta-1.2.png -------------------------------------------------------------------------------- /docs/meta/meta-create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/meta-create.png -------------------------------------------------------------------------------- /docs/meta/meta-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/meta-view.png -------------------------------------------------------------------------------- /docs/meta/meta-wiki-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/meta-wiki-1.png -------------------------------------------------------------------------------- /docs/meta/meta-wiki-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/meta-wiki-2.png -------------------------------------------------------------------------------- /docs/meta/metaui-age-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/metaui-age-edit.png -------------------------------------------------------------------------------- /docs/meta/metaui-age-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/metaui-age-view.png -------------------------------------------------------------------------------- /docs/meta/required-trait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/required-trait.png -------------------------------------------------------------------------------- /docs/meta/rich-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/rich-text.png -------------------------------------------------------------------------------- /docs/meta/section-editing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/section-editing.png -------------------------------------------------------------------------------- /docs/meta/section-expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/section-expanded.png -------------------------------------------------------------------------------- /docs/meta/section.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/section.png -------------------------------------------------------------------------------- /docs/meta/trait-longtext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/trait-longtext.png -------------------------------------------------------------------------------- /docs/meta/validity-created.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/docs/meta/validity-created.png -------------------------------------------------------------------------------- /ide/README.md: -------------------------------------------------------------------------------- 1 | ### Tools 2 | 3 | Tools contains: 4 | 5 | ## IDE 6 | 7 | Intellij `WebStorm/Idea` plugin implementation with source codes as well as binaries that provides 8 | syntax highlighting for the `OSS files.` 9 | 10 | 11 | #### To Install 12 | 13 | **Webstorm* / IDEA* 14 | 15 | 1. Open up the Preferences dialog 16 | 2. On the left side in the sidebar select `Plugins` 17 | 3. On the right Panel click on `Install plugin from disk` 18 | 4. Locate and select the `ossplugin.jar` follow instructions 19 | 5. Restarted IDE 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ide/dist/ossplugin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/ide/dist/ossplugin.jar -------------------------------------------------------------------------------- /ide/ossplugin/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out 7 | 8 | -------------------------------------------------------------------------------- /ide/ossplugin/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | -------------------------------------------------------------------------------- /ide/ossplugin/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /ide/ossplugin/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSKey.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSKey extends PsiElement { 9 | 10 | @Nullable 11 | PsiElement getIdentifier(); 12 | 13 | @Nullable 14 | PsiElement getStringLiteral(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSKeyImpl.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.lang.ASTNode; 7 | import com.intellij.psi.PsiElement; 8 | import com.intellij.psi.PsiElementVisitor; 9 | import com.intellij.psi.util.PsiTreeUtil; 10 | import static ariba.ideplugin.idea.lang.grammer.psi.OSSTypes.*; 11 | import com.intellij.extapi.psi.ASTWrapperPsiElement; 12 | 13 | public class OSSKeyImpl extends ASTWrapperPsiElement implements OSSKey { 14 | 15 | public OSSKeyImpl(ASTNode node) { 16 | super(node); 17 | } 18 | 19 | public void accept(@NotNull OSSVisitor visitor) { 20 | visitor.visitKey(this); 21 | } 22 | 23 | public void accept(@NotNull PsiElementVisitor visitor) { 24 | if (visitor instanceof OSSVisitor) accept((OSSVisitor)visitor); 25 | else super.accept(visitor); 26 | } 27 | 28 | @Override 29 | @Nullable 30 | public PsiElement getIdentifier() { 31 | return findChildByType(IDENTIFIER); 32 | } 33 | 34 | @Override 35 | @Nullable 36 | public PsiElement getStringLiteral() { 37 | return findChildByType(STRING_LITERAL); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSLocalizedString.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSLocalizedString extends PsiElement { 9 | 10 | @NotNull 11 | OSSKey getKey(); 12 | 13 | @NotNull 14 | PsiElement getLocalizationKey(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSMap.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSMap extends PsiElement { 9 | 10 | @NotNull 11 | List getKeyList(); 12 | 13 | @NotNull 14 | List getValueList(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSPrecedenceChain.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSPrecedenceChain extends PsiElement { 9 | 10 | @NotNull 11 | List getTraitListList(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSPrecedenceChainImpl.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.lang.ASTNode; 7 | import com.intellij.psi.PsiElement; 8 | import com.intellij.psi.PsiElementVisitor; 9 | import com.intellij.psi.util.PsiTreeUtil; 10 | import static ariba.ideplugin.idea.lang.grammer.psi.OSSTypes.*; 11 | import com.intellij.extapi.psi.ASTWrapperPsiElement; 12 | 13 | public class OSSPrecedenceChainImpl extends ASTWrapperPsiElement implements OSSPrecedenceChain { 14 | 15 | public OSSPrecedenceChainImpl(ASTNode node) { 16 | super(node); 17 | } 18 | 19 | public void accept(@NotNull OSSVisitor visitor) { 20 | visitor.visitPrecedenceChain(this); 21 | } 22 | 23 | public void accept(@NotNull PsiElementVisitor visitor) { 24 | if (visitor instanceof OSSVisitor) accept((OSSVisitor)visitor); 25 | else super.accept(visitor); 26 | } 27 | 28 | @Override 29 | @NotNull 30 | public List getTraitListList() { 31 | return PsiTreeUtil.getChildrenOfTypeAsList(this, OSSTraitList.class); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSRule.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSRule extends PsiElement { 9 | 10 | @Nullable 11 | OSSRuleBody getRuleBody(); 12 | 13 | @NotNull 14 | List getSelectorList(); 15 | 16 | @Nullable 17 | OSSTraitList getTraitList(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSRuleBody.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSRuleBody extends PsiElement { 9 | 10 | @NotNull 11 | List getPrecedenceChainList(); 12 | 13 | @NotNull 14 | List getRuleList(); 15 | 16 | @NotNull 17 | List getRuleBodyKeyValueList(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSRuleBodyKeyValue.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSRuleBodyKeyValue extends PsiElement { 9 | 10 | @NotNull 11 | OSSKey getKey(); 12 | 13 | @Nullable 14 | OSSValue getValue(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSSelector.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSSelector extends PsiElement { 9 | 10 | @Nullable 11 | OSSSelectorDef getSelectorDef(); 12 | 13 | @Nullable 14 | PsiElement getIdentifier(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSSelectorDef.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSSelectorDef extends PsiElement { 9 | 10 | @Nullable 11 | OSSSelectorValue getSelectorValue(); 12 | 13 | @Nullable 14 | PsiElement getIdentifier(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSSelectorValue.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSSelectorValue extends PsiElement { 9 | 10 | @Nullable 11 | OSSSimpleValue getSimpleValue(); 12 | 13 | @Nullable 14 | OSSValueOrList getValueOrList(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSSimpleValue.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSSimpleValue extends PsiElement { 9 | 10 | @Nullable 11 | PsiElement getFltLiteral(); 12 | 13 | @Nullable 14 | PsiElement getIdentifier(); 15 | 16 | @Nullable 17 | PsiElement getIntLiteral(); 18 | 19 | @Nullable 20 | PsiElement getKeyPath(); 21 | 22 | @Nullable 23 | PsiElement getSqStringLiteral(); 24 | 25 | @Nullable 26 | PsiElement getStringLiteral(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSTraitList.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSTraitList extends PsiElement { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSTraitListImpl.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.lang.ASTNode; 7 | import com.intellij.psi.PsiElement; 8 | import com.intellij.psi.PsiElementVisitor; 9 | import com.intellij.psi.util.PsiTreeUtil; 10 | import static ariba.ideplugin.idea.lang.grammer.psi.OSSTypes.*; 11 | import com.intellij.extapi.psi.ASTWrapperPsiElement; 12 | 13 | public class OSSTraitListImpl extends ASTWrapperPsiElement implements OSSTraitList { 14 | 15 | public OSSTraitListImpl(ASTNode node) { 16 | super(node); 17 | } 18 | 19 | public void accept(@NotNull OSSVisitor visitor) { 20 | visitor.visitTraitList(this); 21 | } 22 | 23 | public void accept(@NotNull PsiElementVisitor visitor) { 24 | if (visitor instanceof OSSVisitor) accept((OSSVisitor)visitor); 25 | else super.accept(visitor); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSValue.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSValue extends PsiElement { 9 | 10 | @Nullable 11 | OSSLocalizedString getLocalizedString(); 12 | 13 | @Nullable 14 | OSSMap getMap(); 15 | 16 | @Nullable 17 | OSSValueOrList getValueOrList(); 18 | 19 | @Nullable 20 | OSSWrappedList getWrappedList(); 21 | 22 | @Nullable 23 | PsiElement getDynFieldpathbinding(); 24 | 25 | @Nullable 26 | PsiElement getExprLiteral(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSValueOrList.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSValueOrList extends PsiElement { 9 | 10 | @NotNull 11 | List getLocalizedStringList(); 12 | 13 | @NotNull 14 | List getMapList(); 15 | 16 | @NotNull 17 | List getSimpleValueList(); 18 | 19 | @NotNull 20 | List getWrappedListList(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ide/ossplugin/gen/ariba/ideplugin/idea/lang/grammer/psi/OSSWrappedList.java: -------------------------------------------------------------------------------- 1 | // This is a generated file. Not intended for manual editing. 2 | package ariba.ideplugin.idea.lang.grammer.psi; 3 | 4 | import java.util.List; 5 | import org.jetbrains.annotations.*; 6 | import com.intellij.psi.PsiElement; 7 | 8 | public interface OSSWrappedList extends PsiElement { 9 | 10 | @NotNull 11 | List getLocalizedStringList(); 12 | 13 | @NotNull 14 | List getMapList(); 15 | 16 | @NotNull 17 | List getSimpleValueList(); 18 | 19 | @NotNull 20 | List getWrappedListList(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ide/ossplugin/jflex-1.7.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/ide/ossplugin/jflex-1.7.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /ide/ossplugin/ossplugin.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ide/ossplugin/ossplugin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/ide/ossplugin/ossplugin.jar -------------------------------------------------------------------------------- /ide/ossplugin/src/ariba/ideplugin/core/WrapperRuntimeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 1996-2016 Ariba, Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | */ 16 | 17 | package ariba.ideplugin.core; 18 | 19 | public class WrapperRuntimeException extends RuntimeException 20 | { 21 | private static final long serialVersionUID = 1L; 22 | 23 | public WrapperRuntimeException (Throwable e) 24 | { 25 | super(e); 26 | } 27 | 28 | public WrapperRuntimeException (String message) 29 | { 30 | super(message); 31 | } 32 | 33 | public WrapperRuntimeException (String message, Throwable e) 34 | { 35 | super(message, e); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ide/ossplugin/src/ariba/ideplugin/idea/icons/ossfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/ide/ossplugin/src/ariba/ideplugin/idea/icons/ossfile.png -------------------------------------------------------------------------------- /ide/ossplugin/src/ariba/ideplugin/idea/lang/OSSFileTypeFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @license 4 | * Copyright 2017 SAP Ariba 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | package ariba.ideplugin.idea.lang; 20 | 21 | import org.jetbrains.annotations.NotNull; 22 | import com.intellij.openapi.fileTypes.FileTypeConsumer; 23 | import com.intellij.openapi.fileTypes.FileTypeFactory; 24 | 25 | public class OSSFileTypeFactory extends FileTypeFactory 26 | { 27 | @Override 28 | public void createFileTypes (@NotNull final FileTypeConsumer consumer) 29 | { 30 | consumer.consume(OSSFileType.INSTANCE, OSSFileType.DEFAULT_EXTENSION); 31 | } 32 | } -------------------------------------------------------------------------------- /ide/ossplugin/src/ariba/ideplugin/idea/lang/OSSIcons.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @license 4 | * Copyright 2017 SAP Ariba 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | package ariba.ideplugin.idea.lang; 20 | 21 | import javax.swing.*; 22 | import com.intellij.openapi.util.IconLoader; 23 | 24 | public class OSSIcons 25 | { 26 | public static final Icon FILE = IconLoader.getIcon("/ariba/ideplugin/idea/icons/ossfile.png"); 27 | } 28 | -------------------------------------------------------------------------------- /ide/ossplugin/src/ariba/ideplugin/idea/lang/OSSLanguage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @license 4 | * Copyright 2017 SAP Ariba 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | package ariba.ideplugin.idea.lang; 20 | 21 | import com.intellij.lang.Language; 22 | 23 | public class OSSLanguage extends Language 24 | { 25 | public static final OSSLanguage INSTANCE = new OSSLanguage(); 26 | 27 | private OSSLanguage () 28 | { 29 | super("OSS", "text/oss"); 30 | 31 | } 32 | 33 | @Override 34 | public String getDisplayName () 35 | { 36 | return "AW OSS file"; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ide/ossplugin/src/ariba/ideplugin/idea/lang/grammer/OSSLexer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @license 4 | * Copyright 2017 SAP Ariba 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | package ariba.ideplugin.idea.lang.grammer; 21 | 22 | import com.intellij.lexer.FlexAdapter; 23 | import com.intellij.lexer.LookAheadLexer; 24 | 25 | 26 | public class OSSLexer extends LookAheadLexer 27 | { 28 | public OSSLexer () 29 | { 30 | super(new FlexAdapter(new _OSSLexer())); 31 | } 32 | } -------------------------------------------------------------------------------- /ide/ossplugin/src/ariba/ideplugin/idea/lang/grammer/OSSParserUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @license 4 | * Copyright 2017 SAP Ariba 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | package ariba.ideplugin.idea.lang.grammer; 20 | 21 | import com.intellij.lang.parser.GeneratedParserUtilBase; 22 | 23 | public class OSSParserUtil extends GeneratedParserUtilBase { 24 | } 25 | -------------------------------------------------------------------------------- /ide/ossplugin/src/ariba/ideplugin/idea/lang/grammer/psi/OSSElementType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @license 4 | * Copyright 2017 SAP Ariba 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | package ariba.ideplugin.idea.lang.grammer.psi; 20 | 21 | import ariba.ideplugin.idea.lang.OSSLanguage; 22 | import org.jetbrains.annotations.NonNls; 23 | import org.jetbrains.annotations.NotNull; 24 | import com.intellij.psi.tree.IElementType; 25 | 26 | public class OSSElementType extends IElementType 27 | { 28 | 29 | public OSSElementType (@NotNull @NonNls String debugName) 30 | { 31 | super(debugName, OSSLanguage.INSTANCE); 32 | } 33 | } -------------------------------------------------------------------------------- /libs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/libs/.gitkeep -------------------------------------------------------------------------------- /libs/fiori-rules/README.md: -------------------------------------------------------------------------------- 1 | # fiori-rules 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test fiori-rules` to execute the unit tests. 8 | -------------------------------------------------------------------------------- /libs/fiori-rules/karma.conf.ci.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | const {join} = require('path'); 5 | const getBaseKarmaConfig = require('../../karma.conf'); 6 | 7 | module.exports = function (config) { 8 | const baseConfig = getBaseKarmaConfig(); 9 | config.set({ 10 | ...baseConfig, 11 | coverageIstanbulReporter: { 12 | ...baseConfig.coverageIstanbulReporter, 13 | dir: join(__dirname, '../../coverage/libs/fiori-rules') 14 | }, 15 | browsers: ['Chrome', 'ChromeHeadless'], 16 | flags: [ 17 | '--window-size=1024,768', 18 | '--disable-web-security', 19 | '--disable-gpu', 20 | '--no-sandbox' 21 | ], 22 | singleRun: true 23 | 24 | }); 25 | }; 26 | -------------------------------------------------------------------------------- /libs/fiori-rules/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | const { join } = require("path"); 5 | const getBaseKarmaConfig = require("../../karma.conf"); 6 | 7 | module.exports = function(config) { 8 | const baseConfig = getBaseKarmaConfig(); 9 | config.set({ 10 | ...baseConfig, 11 | coverageIstanbulReporter: { 12 | ...baseConfig.coverageIstanbulReporter, 13 | dir: join(__dirname, "../../coverage/libs/fiori-rules") 14 | } 15 | }); 16 | }; 17 | -------------------------------------------------------------------------------- /libs/fiori-rules/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/libs/fiori-rules", 4 | "lib": { 5 | "entryFile": "src/index.ts", 6 | "styleIncludePaths": [ 7 | "../../node_modules" 8 | ] 9 | }, 10 | "whitelistedNonPeerDependencies": [ 11 | "flexboxgrid", 12 | "fundamental-styles", 13 | "@fundamental-ngx/core", 14 | "@fundamental-ngx/platform", 15 | "@ngx-metaui/rules" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /libs/fiori-rules/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@ngx-metaui/fiori-rules", 3 | "version": "0.0.1", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@sap-theming/theming-base-content": { 8 | "version": "11.1.15", 9 | "resolved": "https://registry.npmjs.org/@sap-theming/theming-base-content/-/theming-base-content-11.1.15.tgz", 10 | "integrity": "sha512-ndJmLE3CnelEfCo4Ni5XuvM9Ejh5DfFgarYmXkcS1vr+KrZNIcgaijZWFAdB2DKs6jHwln2cYm2ULmjjlhdkcQ==" 11 | }, 12 | "flexboxgrid": { 13 | "version": "6.3.1", 14 | "resolved": "https://registry.npmjs.org/flexboxgrid/-/flexboxgrid-6.3.1.tgz", 15 | "integrity": "sha1-6ZiYr8B7cEdyK7galYpfuk1OIP0=" 16 | }, 17 | "fundamental-styles": { 18 | "version": "0.3.0", 19 | "resolved": "https://registry.npmjs.org/fundamental-styles/-/fundamental-styles-0.3.0.tgz", 20 | "integrity": "sha512-uiGY04wgWl7XpsfuIg9ktdvmy5KhD4NrpaHKIRjRXE+D1xZUb1xdMDR9jNRegmvAGPIjkxny7kBV/AjYEpcP0A==", 21 | "requires": { 22 | "@sap-theming/theming-base-content": "^11.1.10" 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libs/fiori-rules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@ngx-metaui/fiori-rules", 3 | "version": "VERSION_PLACEHOLDER", 4 | "peerDependencies": { 5 | "@angular/common": "ANGULAR_PLACEHOLDER", 6 | "@angular/core": "ANGULAR_PLACEHOLDER", 7 | "@angular/forms": "ANGULAR_PLACEHOLDER", 8 | "@angular/platform-browser": "ANGULAR_PLACEHOLDER", 9 | "@angular/platform-browser-dynamic": "ANGULAR_PLACEHOLDER", 10 | "@angular/router": "ANGULAR_PLACEHOLDER", 11 | "@angular/cdk": "MATERIAL_PLACEHOLDER" 12 | }, 13 | "dependencies": { 14 | "@ngx-metaui/rules": "^VERSION_PLACEHOLDER", 15 | "flexboxgrid": "^6.3.1", 16 | "@fundamental-ngx/core": "FD_CORE_PLACEHOLDER", 17 | "@fundamental-ngx/platform": "FD_PLATFORM_PLACEHOLDER" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/fiori-rules.module'; 2 | export * from './lib/ui/public_api'; 3 | 4 | 5 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-bar-actions/meta-bar-actions.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-breadcrumb/breadcrumb.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{link}} 5 | 6 | {{link}} 7 | 8 | 9 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-breadcrumb/breadcrumb.component.ts: -------------------------------------------------------------------------------- 1 | import {ChangeDetectorRef, Component} from '@angular/core'; 2 | import {MetaContextComponent, MetaLayout} from '@ngx-metaui/rules'; 3 | 4 | 5 | @Component({ 6 | templateUrl: 'breadcrumb.component.html' 7 | }) 8 | export class MetaBredcrumbComponent extends MetaLayout { 9 | 10 | get metaContext(): MetaContextComponent { 11 | return this._parentMC; 12 | } 13 | 14 | constructor(public _cd: ChangeDetectorRef, public _parentMC: MetaContextComponent) { 15 | super(); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-breadcrumb/breadcrumb.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @licensess 3 | * Copyright F. Kolara 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | import {NgModule} from '@angular/core'; 20 | import {CommonModule} from '@angular/common'; 21 | import {MetaUIRulesModule} from '@ngx-metaui/rules'; 22 | import {MetaBredcrumbComponent} from './breadcrumb.component'; 23 | import {BreadcrumbModule} from '@fundamental-ngx/core'; 24 | 25 | @NgModule({ 26 | declarations: [ 27 | MetaBredcrumbComponent 28 | ], 29 | imports: [ 30 | CommonModule, 31 | BreadcrumbModule, 32 | MetaUIRulesModule 33 | ] 34 | }) 35 | export class MetaBreadcrumbModule { 36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-dynamic-page/meta-face-group/facet-group.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-dynamic-page/meta-face-group/facet-group.component.ts: -------------------------------------------------------------------------------- 1 | import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ViewChild} from '@angular/core'; 2 | import {MetaBaseComponent, MetaContextComponent} from '@ngx-metaui/rules'; 3 | 4 | 5 | @Component({ 6 | templateUrl: 'facet-group.component.html', 7 | changeDetection: ChangeDetectionStrategy.OnPush 8 | }) 9 | export class MetaFacetGroupComponent extends MetaBaseComponent { 10 | @ViewChild('classMC', {static: true}) 11 | private _mc: MetaContextComponent; 12 | 13 | 14 | get metaContext(): MetaContextComponent { 15 | return this._mc; 16 | } 17 | 18 | constructor(public _cd: ChangeDetectorRef, public _parentMC: MetaContextComponent) { 19 | super(); 20 | } 21 | 22 | ngOnInit(): void { 23 | super.ngOnInit(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-dynamic-page/meta-face-group/facet-group.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @licensess 3 | * Copyright F. Kolara 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | import {NgModule} from '@angular/core'; 20 | import {CommonModule} from '@angular/common'; 21 | import {MetaUIRulesModule} from '@ngx-metaui/rules'; 22 | import {FacetModule} from '@fundamental-ngx/core'; 23 | import {MetaFacetGroupComponent} from './facet-group.component'; 24 | 25 | @NgModule({ 26 | declarations: [ 27 | MetaFacetGroupComponent 28 | ], 29 | imports: [ 30 | CommonModule, 31 | FacetModule, 32 | MetaUIRulesModule 33 | ] 34 | }) 35 | export class MetaFacetGroupModule { 36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-element-list/element-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-element-list/element-list.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @licensess 3 | * Copyright F. Kolara 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | import {NgModule} from '@angular/core'; 20 | import {CommonModule} from '@angular/common'; 21 | import {MetaUIRulesModule} from '@ngx-metaui/rules'; 22 | import {MetaElementListComponent} from './element-list.component'; 23 | 24 | @NgModule({ 25 | declarations: [ 26 | MetaElementListComponent 27 | ], 28 | imports: [ 29 | CommonModule, 30 | MetaUIRulesModule 31 | ] 32 | }) 33 | export class MetaElementListModule { 34 | } 35 | 36 | 37 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/metaui/meta-toolbar-actions/meta-toolbar-actions.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/ui/fiori-ui.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * F. Kolar 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | import {NgModule} from '@angular/core'; 20 | import {CommonModule} from '@angular/common'; 21 | 22 | 23 | @NgModule({ 24 | declarations: [ 25 | ], 26 | imports: [ 27 | CommonModule 28 | ], 29 | exports: [ 30 | ] 31 | }) 32 | export class FioriUiModule { 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/ui/form/string/string.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * F. Kolar 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | import {NgModule} from '@angular/core'; 20 | import {CommonModule} from '@angular/common'; 21 | import {StringComponent} from './string.component'; 22 | 23 | 24 | 25 | @NgModule({ 26 | declarations: [ 27 | StringComponent 28 | ], 29 | imports: [ 30 | CommonModule 31 | ], 32 | exports: [ 33 | StringComponent 34 | ] 35 | }) 36 | export class StringModule { 37 | } 38 | 39 | 40 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/ui/object-marker/object-marker.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * F. Kolar 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | import {NgModule} from '@angular/core'; 20 | import {CommonModule} from '@angular/common'; 21 | import {ObjectMarkerModule} from '@fundamental-ngx/core'; 22 | import {ObjectMarkerComponent} from './object-marker.component'; 23 | 24 | 25 | @NgModule({ 26 | declarations: [ 27 | ObjectMarkerComponent 28 | ], 29 | imports: [ 30 | CommonModule, 31 | ObjectMarkerModule 32 | ], 33 | exports: [ 34 | ObjectMarkerComponent 35 | ] 36 | }) 37 | export class MetaObjectMarkerModule { 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/lib/ui/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './form/string/string.component'; 2 | export * from './object-marker/object-marker.module'; 3 | export * from './object-marker/object-marker.component'; 4 | 5 | 6 | -------------------------------------------------------------------------------- /libs/fiori-rules/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'core-js/proposals/reflect-metadata'; 4 | import 'zone.js/dist/zone'; 5 | import 'zone.js/dist/zone-testing'; 6 | import {getTestBed} from '@angular/core/testing'; 7 | import { 8 | BrowserDynamicTestingModule, 9 | platformBrowserDynamicTesting 10 | } from '@angular/platform-browser-dynamic/testing'; 11 | 12 | declare const require: any; 13 | 14 | // First, initialize the Angular testing environment. 15 | getTestBed().initTestEnvironment( 16 | BrowserDynamicTestingModule, 17 | platformBrowserDynamicTesting() 18 | ); 19 | // Then we find all the tests. 20 | const context = require.context('./', true, /\.spec\.ts$/); 21 | // And load the modules. 22 | context.keys().map(context); 23 | -------------------------------------------------------------------------------- /libs/fiori-rules/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "target": "es2015", 6 | "module": "es2020", 7 | "declaration": true, 8 | "inlineSources": true, 9 | "importHelpers": true, 10 | "types": [], 11 | "lib": [ 12 | "dom", 13 | "es2018" 14 | ] 15 | }, 16 | "angularCompilerOptions": { 17 | "skipTemplateCodegen": true, 18 | "strictMetadataEmit": false, 19 | "fullTemplateTypeCheck": false, 20 | "strictInjectionParameters": true, 21 | "enableResourceInlining": true, 22 | "enableIvy": false 23 | }, 24 | "exclude": [ 25 | "src/test.ts", 26 | "**/*.spec.ts" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /libs/fiori-rules/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": ["jasmine", "node"] 6 | }, 7 | "files": ["src/test.ts"], 8 | "include": ["**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /libs/fiori-rules/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | [ 8 | "fdp", 9 | "m" 10 | ], 11 | "camelCase" 12 | ], 13 | "component-selector": [ 14 | true, 15 | "element", 16 | [ 17 | "fdp", 18 | "m" 19 | ], 20 | "kebab-case" 21 | ] 22 | }, 23 | "linterOptions": { 24 | "exclude": [ 25 | "!**/*" 26 | ] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /libs/material-rules/karma.conf.ci.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | const {join} = require('path'); 5 | const getBaseKarmaConfig = require('../../karma.conf'); 6 | 7 | module.exports = function (config) { 8 | const baseConfig = getBaseKarmaConfig(); 9 | config.set({ 10 | ...baseConfig, 11 | coverageIstanbulReporter: { 12 | ...baseConfig.coverageIstanbulReporter, 13 | dir: join(__dirname, '../../coverage/libs/material-rules') 14 | }, 15 | browsers: ['Chrome', 'ChromeHeadless'], 16 | flags: [ 17 | '--window-size=1024,768', 18 | '--disable-web-security', 19 | '--disable-gpu', 20 | '--no-sandbox' 21 | ], 22 | singleRun: true 23 | 24 | }); 25 | }; 26 | -------------------------------------------------------------------------------- /libs/material-rules/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | const {join} = require('path'); 5 | const getBaseKarmaConfig = require('../../karma.conf'); 6 | 7 | module.exports = function (config) { 8 | const baseConfig = getBaseKarmaConfig(); 9 | config.set({ 10 | ...baseConfig, 11 | coverageIstanbulReporter: { 12 | ...baseConfig.coverageIstanbulReporter, 13 | dir: join(__dirname, '../../coverage/libs/material-rules') 14 | } 15 | }); 16 | }; 17 | -------------------------------------------------------------------------------- /libs/material-rules/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/libs/material-rules", 4 | "lib": { 5 | "entryFile": "src/public_api.ts" 6 | }, 7 | "whitelistedNonPeerDependencies": [ 8 | "@ngx-metaui/rules" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /libs/material-rules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@ngx-metaui/material-rules", 3 | "description": "MetaUI rule implementation based on Material2 design", 4 | "version": "VERSION_PLACEHOLDER", 5 | "peerDependencies": { 6 | "@angular/animations": "ANGULAR_PLACEHOLDER", 7 | "@angular/common": "ANGULAR_PLACEHOLDER", 8 | "@angular/core": "ANGULAR_PLACEHOLDER", 9 | "@angular/forms": "ANGULAR_PLACEHOLDER", 10 | "@angular/platform-browser": "ANGULAR_PLACEHOLDER", 11 | "@angular/platform-browser-dynamic": "ANGULAR_PLACEHOLDER", 12 | "@angular/router": "ANGULAR_PLACEHOLDER", 13 | "@angular/material": "MATERIAL_PLACEHOLDER", 14 | "@angular/cdk": "MATERIAL_PLACEHOLDER", 15 | "@ngx-metaui/rules": "^VERSION_PLACEHOLDER" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/metaui/meta-action-list/meta-action-list.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 | 8 | 9 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/metaui/meta-action-list/meta-action-list.component.scss: -------------------------------------------------------------------------------- 1 | .action-pad { 2 | padding: 10px; 3 | 4 | button { 5 | margin: 5px; 6 | } 7 | } 8 | 9 | 10 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/metaui/meta-content-page/meta-content-page.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | {{label}} Detail 5 |
6 | 7 | 9 | 10 |
11 | 12 | 13 |
14 | 15 |
16 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/metaui/meta-content-page/meta-content-page.component.scss: -------------------------------------------------------------------------------- 1 | .m-obj-detail-lbl { 2 | color: #000000; 3 | font-weight: bold; 4 | font-size: 20px; 5 | display: flex; 6 | padding: 20px 0; 7 | } 8 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/metaui/meta-element-list/meta-element-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
9 | 10 |
11 |
12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/metaui/meta-form/meta-form-group.component.scss: -------------------------------------------------------------------------------- 1 | .meta-fg-readonly, .meta-fg-readonly.mat-form-field-appearance-legacy { 2 | .mat-form-field-underline { 3 | background-color: transparent; 4 | background-image: none; 5 | } 6 | 7 | .mat-input-element { 8 | color: rgba(0, 0, 0, .68); 9 | } 10 | } 11 | 12 | 13 | .form-field { 14 | width: 100%; 15 | } 16 | 17 | .form-container { 18 | display: flex; 19 | flex-direction: row; 20 | justify-content: center; 21 | } 22 | 23 | .form-card { 24 | padding: 15px; 25 | width: 100%; 26 | max-width: 1000px; 27 | } 28 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/metaui/public_api.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @license 4 | * F. Kolar 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * 19 | * 20 | */ 21 | export * from './meta-form/meta-form-group.component'; 22 | export * from './meta-form/form-field-adapter.directive'; 23 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/ui/autocomplete/autocomplete.component.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | {{displayKey ? item[displayKey] : item}} 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/ui/checkbox/checkbox.component.html: -------------------------------------------------------------------------------- 1 | 9 | {{valueLabel}} 10 | 11 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/ui/date-picker/date-picker.component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/ui/input/input.component.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/ui/radio-group/radio-group.component.html: -------------------------------------------------------------------------------- 1 | 12 | 14 | {{noValueLabel}} 15 | 16 | 17 | 19 | {{displayKey ? item[displayKey] : item}} 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/ui/select/select.component.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | {{noSelectionString}} 13 | 14 | 15 | {{displayKey ? item[displayKey] : item}} 16 | 17 | 18 | 19 | 20 | 21 | {{displayKey ? item[displayKey] : item}} 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/ui/string/string.component.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /libs/material-rules/src/lib/ui/text-area/text-area.component.html: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /libs/material-rules/src/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/material-rules.module'; 2 | export * from './lib/ui/ui.module'; 3 | export * from './lib/metaui/public_api'; 4 | -------------------------------------------------------------------------------- /libs/material-rules/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'core-js/proposals/reflect-metadata'; 4 | import 'zone.js/dist/zone'; 5 | import 'zone.js/dist/zone-testing'; 6 | import {getTestBed} from '@angular/core/testing'; 7 | import { 8 | BrowserDynamicTestingModule, 9 | platformBrowserDynamicTesting 10 | } from '@angular/platform-browser-dynamic/testing'; 11 | 12 | declare const require: any; 13 | 14 | // First, initialize the Angular testing environment. 15 | getTestBed().initTestEnvironment( 16 | BrowserDynamicTestingModule, 17 | platformBrowserDynamicTesting() 18 | ); 19 | // Then we find all the tests. 20 | const context = require.context('./', true, /\.spec\.ts$/); 21 | // And load the modules. 22 | context.keys().map(context); 23 | -------------------------------------------------------------------------------- /libs/material-rules/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "target": "es2015", 6 | "module": "es2020", 7 | "declaration": true, 8 | "inlineSources": true, 9 | "importHelpers": true, 10 | "types": [], 11 | "lib": [ 12 | "dom", 13 | "es2018" 14 | ] 15 | }, 16 | "angularCompilerOptions": { 17 | "skipTemplateCodegen": true, 18 | "strictMetadataEmit": true, 19 | "fullTemplateTypeCheck": true, 20 | "strictInjectionParameters": true, 21 | "enableResourceInlining": true, 22 | "enableIvy": false 23 | }, 24 | "exclude": [ 25 | "src/test.ts", 26 | "**/*.spec.ts" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /libs/material-rules/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": ["jasmine", "node"] 6 | }, 7 | "files": ["src/test.ts"], 8 | "include": ["**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /libs/material-rules/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | ["m"], 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | [ 14 | "ngx-metaui", 15 | "md", 16 | "m" 17 | ], 18 | "kebab-case" 19 | ] 20 | }, 21 | "linterOptions": { 22 | "exclude": [ 23 | "!**/*" 24 | ] 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libs/rules/karma.conf.ci.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | const {join} = require('path'); 5 | const getBaseKarmaConfig = require('../../karma.conf'); 6 | 7 | module.exports = function (config) { 8 | const baseConfig = getBaseKarmaConfig(); 9 | config.set({ 10 | ...baseConfig, 11 | coverageIstanbulReporter: { 12 | ...baseConfig.coverageIstanbulReporter, 13 | dir: join(__dirname, '../../coverage/libs/rules') 14 | }, 15 | browsers: ['Chrome', 'ChromeHeadlessCI'], 16 | customLaunchers: { 17 | "ChromeHeadlessCI": { 18 | "base": "ChromeHeadless", 19 | "flags": [ 20 | "--window-size=1024,768", 21 | "--no-sandbox" 22 | ] 23 | } 24 | }, 25 | singleRun: true 26 | 27 | }); 28 | }; 29 | -------------------------------------------------------------------------------- /libs/rules/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | const {join} = require('path'); 5 | const getBaseKarmaConfig = require('../../karma.conf'); 6 | 7 | module.exports = function (config) { 8 | const baseConfig = getBaseKarmaConfig(); 9 | config.set({ 10 | ...baseConfig, 11 | coverageIstanbulReporter: { 12 | ...baseConfig.coverageIstanbulReporter, 13 | dir: join(__dirname, '../../coverage/libs/rules') 14 | } 15 | }); 16 | }; 17 | -------------------------------------------------------------------------------- /libs/rules/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/libs/rules", 4 | "deleteDestPath": false, 5 | "lib": { 6 | "entryFile": "src/public_api.ts", 7 | "umdModuleIds": { 8 | "object-path": "objectPath", 9 | "typescript-collections": "Collections", 10 | "big-integer": "bigIntImported", 11 | "fnv-plus": "fnvPlus" 12 | } 13 | }, 14 | "whitelistedNonPeerDependencies": [ 15 | "@angular/cdk" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /libs/rules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@ngx-metaui/rules", 3 | "description": "Rule driven UI for Angular", 4 | "version": "VERSION_PLACEHOLDER", 5 | "license": "Apache-2.0", 6 | "peerDependencies": { 7 | "@angular/animations": "ANGULAR_PLACEHOLDER", 8 | "@angular/common": "ANGULAR_PLACEHOLDER", 9 | "@angular/core": "ANGULAR_PLACEHOLDER", 10 | "@angular/platform-browser": "ANGULAR_PLACEHOLDER", 11 | "@angular/platform-browser-dynamic": "ANGULAR_PLACEHOLDER", 12 | "@angular/router": "ANGULAR_PLACEHOLDER", 13 | "@angular/cdk": "MATERIAL_PLACEHOLDER" 14 | }, 15 | "bin": { 16 | "oss": "./lib/bin/oss.js" 17 | }, 18 | "schematics": "./lib/schematics/collection.json", 19 | "standard-version": { 20 | "skip": { 21 | "changelog": true, 22 | "commit": true, 23 | "tag": true 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libs/rules/src/lib/metaui/core/item-properties.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2017 SAP Ariba 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Based on original work: MetaUI: Craig Federighi (2008) 18 | * 19 | */ 20 | 21 | export class ItemProperties { 22 | 23 | constructor(public name: string, public properties: Map, public hidden: boolean) { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /libs/rules/src/lib/metaui/entry-components.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2017 SAP Ariba 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | export * from './layout/core/base-renderer.directive'; 20 | export * from './layout/core/generic-container.component'; 21 | export * from './layout/no-meta/no-meta.component'; 22 | export * from './core/meta-context/meta-context.component'; 23 | 24 | 25 | -------------------------------------------------------------------------------- /libs/rules/src/lib/metaui/layout/no-meta/no-meta.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/libs/rules/src/lib/metaui/layout/no-meta/no-meta.component.scss -------------------------------------------------------------------------------- /libs/rules/src/lib/metaui/layout/no-meta/no-meta.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2017 SAP Ariba 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Based on original work: MetaUI: Craig Federighi (2008) 18 | * 19 | */ 20 | import {Component, OnInit} from '@angular/core'; 21 | 22 | @Component({ 23 | selector: 'app-no-meta', 24 | template: ` 25 |

MetaRenderer Error:

26 | No componentName property resolved in Context
27 | ` 28 | , 29 | styleUrls: ['no-meta.component.scss'] 30 | }) 31 | export class NoMetaComponent implements OnInit { 32 | 33 | constructor() { 34 | } 35 | 36 | ngOnInit() { 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /libs/rules/src/lib/metaui/layout/public_api.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2017 SAP Ariba 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | export {MetaRendererComponent} from './meta-renderer.component'; 20 | export {ComponentReference, BaseRenderer} from './core/base-renderer.directive'; 21 | export {MetaBaseComponent} from './meta.base.component'; 22 | export {GenericContainerComponent} from './core/generic-container.component'; 23 | export {MetaLayout} from './meta-layout'; 24 | export {DomUtilsService} from './core/dom-utils.service'; 25 | 26 | -------------------------------------------------------------------------------- /libs/rules/src/lib/metaui/public_api.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2017 SAP Ariba 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | 20 | /* 21 | * Public API Surface of core 22 | */ 23 | 24 | 25 | export * from './core/public_api'; 26 | export * from './layout/public_api'; 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /libs/rules/src/lib/metaui/rules-routing.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2017 SAP Ariba 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | import {NgModule} from '@angular/core'; 20 | import {RouterModule} from '@angular/router'; 21 | 22 | 23 | @NgModule({ 24 | imports: [ 25 | RouterModule.forChild([]) 26 | ], 27 | exports: [RouterModule], 28 | providers: [] 29 | }) 30 | export class MetaUIRulesRoutingModule { 31 | } 32 | -------------------------------------------------------------------------------- /libs/rules/src/public_api.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Public API 3 | */ 4 | 5 | export * from './lib/metaui/public_api'; 6 | export {MetaUIRulesModule} from './lib/metaui/rules.module'; 7 | export {MetaUITestRulesModule} from './lib/metaui/test.rules.module'; 8 | -------------------------------------------------------------------------------- /libs/rules/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'core-js/proposals/reflect-metadata'; 4 | import 'zone.js/dist/zone'; 5 | 6 | import 'zone.js/dist/zone-testing'; 7 | import {getTestBed} from '@angular/core/testing'; 8 | import { 9 | BrowserDynamicTestingModule, 10 | platformBrowserDynamicTesting 11 | } from '@angular/platform-browser-dynamic/testing'; 12 | 13 | declare const require: any; 14 | 15 | // First, initialize the Angular testing environment. 16 | getTestBed().initTestEnvironment( 17 | BrowserDynamicTestingModule, 18 | platformBrowserDynamicTesting() 19 | ); 20 | // Then we find all the tests. 21 | const context = require.context('./', true, /\.spec\.ts$/); 22 | // And load the modules. 23 | context.keys().map(context); 24 | -------------------------------------------------------------------------------- /libs/rules/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "target": "es2015", 6 | "declaration": true, 7 | "inlineSources": true, 8 | "importHelpers": true, 9 | "types": [], 10 | "lib": [ 11 | "dom", 12 | "es2018" 13 | ] 14 | }, 15 | "angularCompilerOptions": { 16 | "skipTemplateCodegen": true, 17 | "strictMetadataEmit": true, 18 | "fullTemplateTypeCheck": true, 19 | "strictInjectionParameters": true, 20 | "enableResourceInlining": true, 21 | "enableIvy": false 22 | }, 23 | "exclude": [ 24 | "src/test.ts", 25 | "**/*.spec.ts" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /libs/rules/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts" 12 | ], 13 | "include": [ 14 | "**/*.spec.ts", 15 | "**/*.d.ts" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /libs/rules/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | false, 6 | "attribute", 7 | [ 8 | "ngx", 9 | "dt" 10 | ], 11 | "camelCase" 12 | ], 13 | "component-selector": [ 14 | false, 15 | "element", 16 | [ 17 | "ngx", 18 | "wrapper", 19 | "aw" 20 | ], 21 | "kebab-case" 22 | ] 23 | }, 24 | "linterOptions": { 25 | "exclude": [ 26 | "!**/*" 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /libs/schematics/.gitignore: -------------------------------------------------------------------------------- 1 | # Outputs 2 | src/**/*.js 3 | src/**/*.js.map 4 | src/**/*.d.ts 5 | 6 | # IDEs 7 | .idea/ 8 | jsconfig.json 9 | .vscode/ 10 | 11 | # Misc 12 | node_modules/ 13 | npm-debug.log* 14 | yarn-error.log* 15 | 16 | # Mac OSX Finder files. 17 | **/.DS_Store 18 | .DS_Store 19 | -------------------------------------------------------------------------------- /libs/schematics/.npmignore: -------------------------------------------------------------------------------- 1 | # Ignores TypeScript files, but keeps definitions. 2 | *.ts 3 | !*.d.ts 4 | -------------------------------------------------------------------------------- /libs/schematics/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json", 3 | "schematics": { 4 | "ng-add": { 5 | "description": "Adds MetaUI ngx-meta/rules to the application ", 6 | "factory": "./ng-add/index", 7 | "schema": "./ng-add/add-schema.json" 8 | }, 9 | "init-project": { 10 | "description": "Configure project workspace with MetaUI ", 11 | "private": true, 12 | "factory": "./ng-add/init-project/index", 13 | "schema": "./ng-add/add-schema.json" 14 | }, 15 | "mPage": { 16 | "description": "Generate simple MetaUI based page with modelClass and rules", 17 | "factory": "./ng-generate/m-page/index", 18 | "schema": "./ng-generate/m-page/page-schema.json" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /libs/schematics/common/add-schema.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Frank Kolar and others 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * 18 | */ 19 | import {Schema} from '../common/schema'; 20 | 21 | 22 | export interface AddSchema extends Schema { 23 | 24 | /** Dont run npm install. */ 25 | skipInstall: boolean; 26 | 27 | 28 | /** Dont add anything to angular.json style section. */ 29 | skipStyles: boolean; 30 | } 31 | -------------------------------------------------------------------------------- /libs/schematics/ng-add/add-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "id": "ngx-metaui-rules-ng-add", 4 | "title": "Angular Service Worker Options Schema", 5 | "type": "object", 6 | "properties": { 7 | "project": { 8 | "type": "string", 9 | "description": "The name of the project.", 10 | "$default": { 11 | "$source": "projectName" 12 | } 13 | }, 14 | "skipInstall": { 15 | "type": "boolean", 16 | "description": "Tells if we should skip npm install tasks", 17 | "default": false 18 | }, 19 | "skipStyles": { 20 | "type": "boolean", 21 | "description": "Don't add anything to angular.json style section.", 22 | "default": false 23 | }, 24 | "path": { 25 | "type": "string", 26 | "description": "Root path to the selected project - a place where template files will be copied" 27 | }, 28 | "uiLib": { 29 | "type": "string", 30 | "x-prompt": "Which UI library would you like to use?", 31 | "description": "UI library rules implementation name", 32 | "enum": [ 33 | "none", 34 | "material", 35 | "fiori" 36 | ], 37 | "default": "none" 38 | } 39 | }, 40 | "required": [] 41 | } 42 | -------------------------------------------------------------------------------- /libs/schematics/ng-add/files/rules/Application.oss: -------------------------------------------------------------------------------- 1 | /** 2 | * Module represent Global Top level application app tab. Modules are used in combination with 3 | * component. 4 | * 5 | * Application.oss is used for all global settings and OSS definitions 6 | */ 7 | module { 8 | } 9 | -------------------------------------------------------------------------------- /libs/schematics/ng-add/files/rules/README.md: -------------------------------------------------------------------------------- 1 | ### Rules directory 2 | 3 | This directory contains user defined `OSS rules` that are compiled by our proprietary OSS parser 4 | into the `./ts` directory (ts stands for `typescript`). 5 | 6 | All these rules are references and exported by `user-rules.ts` file which is 7 | registered inside application module for later use. 8 | 9 | ex: 10 | 11 | ```ts 12 | import * as userRules from './rules/user-rules'; 13 | 14 | @NgModule({ 15 | ... 16 | }) 17 | export class AppModule { 18 | 19 | constructor(private config: MetaConfig) { 20 | let rules: any[] = config.get('metaui.rules.user-rules') || []; 21 | rules.push(userRules); 22 | config.set('metaui.rules.user-rules', rules); 23 | } 24 | } 25 | ``` 26 | 27 | 28 | The reason for this is that our rule engine need a way how to lazily pre-load some dynamic 29 | content fast depending on certain path or name. 30 | 31 | Please check out [High Level Architecture][1]. 32 | 33 | 34 | [1]: https://github.com/ngx-meta/rules/blob/master/docs/metaui-architecture.md 35 | -------------------------------------------------------------------------------- /libs/schematics/ng-add/files/rules/ts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/libs/schematics/ng-add/files/rules/ts/.gitkeep -------------------------------------------------------------------------------- /libs/schematics/ng-add/files/rules/ts/Application.oss.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is generated file. Do not edit !! 3 | * 4 | * @formatter:off 5 | * 6 | */ 7 | /* tslint:disable */ 8 | export const ApplicationRule = 'module { } '; 9 | /* tslint:disable */ 10 | /** 11 | * @formatter:on 12 | * 13 | */ 14 | 15 | -------------------------------------------------------------------------------- /libs/schematics/ng-add/files/rules/user-rules.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Content of this file is automatically populated by oss compiler 3 | */ 4 | 5 | export {ApplicationRule} from './ts/Application.oss'; 6 | -------------------------------------------------------------------------------- /libs/schematics/ng-add/init-project/add-oss-compile-script.ts: -------------------------------------------------------------------------------- 1 | import {AddSchema} from '../../common/add-schema'; 2 | import {Rule, SchematicContext, SchematicsException, Tree} from '@angular-devkit/schematics'; 3 | import {normalize} from '@angular-devkit/core'; 4 | 5 | export function addOSScriptsToPackageJson(options: AddSchema): Rule { 6 | return (host: Tree, context: SchematicContext) => { 7 | 8 | const content = readPackageJson(host); 9 | if (!content['scripts']) { 10 | content['scripts'] = {}; 11 | } 12 | const srcPath = normalize(`./${options.path}/rules`); 13 | content['scripts']['compile:oss'] = `oss -i ${srcPath} -u -n user-rules`; 14 | content['scripts']['watch:oss'] = `watch --wait=8 'npm run compile:oss' ${srcPath} `; 15 | 16 | host.overwrite('package.json', JSON.stringify(content, null, 2)); 17 | return host; 18 | }; 19 | } 20 | 21 | export function readPackageJson(host: Tree) { 22 | if (host.exists('package.json')) { 23 | const jsonStr = host.read('package.json') !.toString('utf-8'); 24 | const json = JSON.parse(jsonStr); 25 | 26 | return json; 27 | } 28 | 29 | throw new SchematicsException('Cant read package.json in order to add script'); 30 | } 31 | -------------------------------------------------------------------------------- /libs/schematics/ng-add/init-project/add-rules-subsystem.ts: -------------------------------------------------------------------------------- 1 | import {AddSchema} from '../../common/add-schema'; 2 | import { 3 | apply, branchAndMerge, 4 | chain, mergeWith, 5 | move, 6 | Rule, 7 | SchematicContext, 8 | template, 9 | Tree, 10 | url 11 | } from '@angular-devkit/schematics'; 12 | import {normalize} from '@angular-devkit/core'; 13 | import {classify, dasherize} from '@angular-devkit/core/src/utils/strings'; 14 | 15 | const stringUtils = {dasherize, classify}; 16 | 17 | 18 | export function addRulesSubsystem(options: AddSchema): Rule { 19 | return (host: Tree, context: SchematicContext) => { 20 | 21 | try { 22 | const movePath = normalize(options.path); 23 | const templateSource = apply(url('../files'), [ 24 | template({ 25 | ...stringUtils, 26 | ...options as object 27 | }), 28 | move(movePath) 29 | ]); 30 | return chain([ 31 | branchAndMerge(chain([ 32 | mergeWith(templateSource) 33 | ])) 34 | ] 35 | ); 36 | 37 | } catch (e) { 38 | context.logger.log('warn', 39 | `✅️ Failed to add scripts into angular.json`); 40 | } 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /libs/schematics/ng-add/init-project/index.ts: -------------------------------------------------------------------------------- 1 | import {chain, Rule} from '@angular-devkit/schematics'; 2 | import {addRulesSubsystem} from './add-rules-subsystem'; 3 | import {addRulesRequiredModulesAndImports} from './add-core-imports'; 4 | import {addOSScriptsToPackageJson} from './add-oss-compile-script'; 5 | import {AddSchema} from '../../common/add-schema'; 6 | import {addUILibraryRequiredModulesAndImports} from './add-ui-lib-imports'; 7 | import {registerUserRulesWithMetaConfig} from './register-app-rules'; 8 | import {registerCommonJSDependecies} from './register-commonjs-deps'; 9 | 10 | export default function (options: AddSchema): Rule { 11 | return chain([ 12 | registerCommonJSDependecies(options), 13 | addRulesSubsystem(options), 14 | addRulesRequiredModulesAndImports(options), 15 | registerUserRulesWithMetaConfig(options), 16 | addUILibraryRequiredModulesAndImports(options), 17 | addOSScriptsToPackageJson(options) 18 | ]); 19 | } 20 | -------------------------------------------------------------------------------- /libs/schematics/ng-add/init-project/register-commonjs-deps.ts: -------------------------------------------------------------------------------- 1 | import {AddSchema} from '../../common/add-schema'; 2 | import {Rule, Tree} from '@angular-devkit/schematics'; 3 | import {getProject, getWorkspace} from '../../common/schematics-utils'; 4 | import {getWorkspacePath} from '@schematics/angular/utility/config'; 5 | 6 | 7 | export function registerCommonJSDependecies(options: AddSchema): Rule { 8 | return (host: Tree) => { 9 | const workspace = getWorkspace(host); 10 | const project = getProject(host, options.project); 11 | const targetOptions = workspace.projects[options.project].architect?.build?.options || {}; 12 | 13 | if (!targetOptions['allowedCommonJsDependencies']) { 14 | targetOptions['allowedCommonJsDependencies'] = []; 15 | } 16 | 17 | targetOptions['allowedCommonJsDependencies'].push('big-integer'); 18 | targetOptions['allowedCommonJsDependencies'].push('object-path'); 19 | targetOptions['allowedCommonJsDependencies'].push('typescript-collections'); 20 | 21 | 22 | host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); 23 | 24 | return host; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /libs/schematics/ng-generate/m-page/files/component/__name@dasherize__.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Object Detail

3 | <% if (uiLib === "material") { %> 4 | Create | 5 | Edit | 6 | View 7 | <% } %> 8 | 9 | <% if (uiLib === "fiori") { %> 10 | 11 | 12 | 13 | <% } %> 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | -------------------------------------------------------------------------------- /libs/schematics/ng-generate/m-page/files/component/__name@dasherize__.component.scss: -------------------------------------------------------------------------------- 1 | .page { 2 | margin: 20px 30px; 3 | max-width: 800px; 4 | } 5 | -------------------------------------------------------------------------------- /libs/schematics/ng-generate/m-page/files/component/__name@dasherize__.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, OnInit} from '@angular/core'; 2 | import {<%= classify(modelClass) %>} from <%if (flat) { %>'./<%= dasherize(modelPath) %>/<%= dasherize(modelClass) %>' <% } else { %>'../<%= dasherize(modelPath) %>/<%= dasherize(modelClass) %>' <% } %>; 3 | 4 | 5 | 6 | @Component({ 7 | selector: 'app-<%=dasherize(name)%>', 8 | templateUrl: './<%=dasherize(name)%>.component.html', 9 | styleUrls: ['./<%=dasherize(name)%>.component.scss'] 10 | }) 11 | export class <%= classify(name) %>Component implements OnInit { 12 | 13 | object: <%= classify(modelClass) %>; 14 | operation = 'view'; 15 | 16 | constructor() { 17 | } 18 | 19 | ngOnInit(): void { 20 | 21 | this.object = new <%= classify(modelClass) %>('R0001', 'Frank Kolar', 22 | 'This is my user record', new Date()); 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /libs/schematics/ng-generate/m-page/files/model/__modelClass@dasherize__.ts: -------------------------------------------------------------------------------- 1 | import {Entity} from '@ngx-metaui/rules'; 2 | 3 | /** 4 | * This is generated class 5 | */ 6 | export class <%= classify(modelClass) %> implements Entity { 7 | 8 | 9 | constructor(public uniqueName?: string, public name?: string, 10 | public description?: string, public created?: Date) { 11 | } 12 | 13 | identity(): string { 14 | return this.uniqueName; 15 | } 16 | 17 | 18 | getTypes(): any { 19 | return { 20 | uniqueName: String, 21 | name: String, 22 | description: String, 23 | created: Date 24 | }; 25 | } 26 | 27 | 28 | /** 29 | * Used by MetaUI to identify the name of the class once everything is minified 30 | */ 31 | className(): string { 32 | return '<%= classify(modelClass) %>'; 33 | } 34 | 35 | 36 | toString(): string { 37 | return this.name; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /libs/schematics/ng-generate/m-page/files/rules/__modelClass@classify__.oss: -------------------------------------------------------------------------------- 1 | /* 2 | User rules.oss -- Meta-data rules. Generated file 3 | 4 | Default definition 5 | */ 6 | class=<%= classify(modelClass) %> { 7 | 8 | field=uniqueName { 9 | label:"Id"; 10 | } 11 | 12 | field=name { 13 | label:"Name"; 14 | } 15 | 16 | field=description { 17 | trait:longtext; 18 | } 19 | 20 | zNone => *; 21 | zLeft => uniqueName => name => description => created; 22 | } 23 | 24 | /* 25 | Sample definition for operations edit and create 26 | 27 | */ 28 | class=<%= classify(modelClass) %> { 29 | operation=(edit, create) { 30 | zNone => *; 31 | zLeft => name => description; 32 | } 33 | 34 | operation=(create) { 35 | zNone => *; 36 | zLeft => name => description => created; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /libs/schematics/ng-update/index.ts: -------------------------------------------------------------------------------- 1 | import {Rule, SchematicContext, Tree} from '@angular-devkit/schematics'; 2 | 3 | 4 | // You don't have to export the function as default. You can also have more than one rule factory 5 | // per file. 6 | export function schematics(_options: any): Rule { 7 | return (tree: Tree, _context: SchematicContext) => { 8 | return tree; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /libs/schematics/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": [ 4 | "es2017", 5 | "dom" 6 | ], 7 | "module": "commonjs", 8 | "moduleResolution": "node", 9 | "outDir": "../../dist/libs/rules/lib/schematics", 10 | "noEmitOnError": false, 11 | "strictNullChecks": true, 12 | "skipDefaultLibCheck": true, 13 | "skipLibCheck": true, 14 | "sourceMap": true, 15 | "declaration": true, 16 | "target": "es6", 17 | "types": [ 18 | "jasmine", 19 | "node" 20 | ], 21 | "baseUrl": "." 22 | }, 23 | "exclude": [ 24 | "**/*.spec.ts", 25 | "*/files/**/*", 26 | "ng-generate/*/files/**/*" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /nx.json: -------------------------------------------------------------------------------- 1 | { 2 | "npmScope": "ngx-metaui", 3 | "implicitDependencies": { 4 | "angular.json": "*", 5 | "package.json": "*", 6 | "tslint.json": "*", 7 | "nx.json": "*", 8 | "tsconfig.base.json": "*" 9 | }, 10 | "projects": { 11 | "rules": { 12 | "tags": [] 13 | }, 14 | "material-rules": { 15 | "tags": [] 16 | }, 17 | "material-app": { 18 | "tags": [] 19 | }, 20 | "doc-app": { 21 | "tags": [] 22 | }, 23 | "fiori-rules": { 24 | "tags": [] 25 | }, 26 | "fiori-app": { 27 | "tags": [] 28 | } 29 | }, 30 | "affected": { 31 | "defaultBase": "master" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /scripts/ci/lint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -u -e 4 | args=("$@") 5 | 6 | 7 | if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then 8 | exit 1; 9 | fi 10 | 11 | ng lint rules 12 | ng lint material-rules 13 | ng lint fiori-rules 14 | 15 | ng lint doc-app 16 | ng lint material-app 17 | ng lint fiori-app 18 | -------------------------------------------------------------------------------- /scripts/ci/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -u -e 4 | args=("$@") 5 | 6 | 7 | if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then 8 | exit 1; 9 | fi 10 | 11 | echo "################ Testing @ngx-meta/rules ################ " 12 | rm -Rf ./dist/ && ng build rules && ng test rules --browsers=ChromeHeadless --karma-config=./libs/rules/karma.conf.ci.js --source-map=false --watch=false --progress=false 13 | 14 | 15 | echo "################ Testing @ngx-meta/material-rules ################ " 16 | rm -Rf ./dist/ && ng build rules && ng test material-rules --browsers=ChromeHeadless --karma-config=./libs/material-rules/karma.conf.ci.js --source-map=false --watch=false --progress=false 17 | 18 | 19 | # echo "################ Testing @ngx-meta/fiori-rules ################ " 20 | # rm -Rf ./dist/ && ng build rules && ng test fiori-rules --browsers=ChromeHeadless --karma-config=./libs/fiori-rules/karma.conf.ci.js --source-map=false --watch=false --progress=false 21 | -------------------------------------------------------------------------------- /temp/demo/dashboard/dashboard.component.html: -------------------------------------------------------------------------------- 1 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /temp/demo/dashboard/dashboard.component.scss: -------------------------------------------------------------------------------- 1 | .fd-page__content { 2 | background-color: #FFFFFF; 3 | } 4 | -------------------------------------------------------------------------------- /temp/demo/dashboard/dashboard.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'fdp-dashboard', 5 | templateUrl: './dashboard.component.html', 6 | styleUrls: ['./dashboard.component.scss'] 7 | }) 8 | export class DashboardComponent { 9 | 10 | 11 | constructor() { 12 | } 13 | 14 | } 15 | 16 | -------------------------------------------------------------------------------- /temp/demo/dashboard/dashboard.module.ts: -------------------------------------------------------------------------------- 1 | import {BrowserModule} from '@angular/platform-browser'; 2 | import {NgModule} from '@angular/core'; 3 | import {TabsModule} from '@fundamental-ngx/core'; 4 | import {DashboardComponent} from './dashboard.component'; 5 | import {LandingModule} from '../landing/landing.module'; 6 | import {FormsModule} from '@angular/forms'; 7 | import {Landing2Module} from '../landing2/landing2.module'; 8 | import {Landing3Module} from '../landing3/landing3.module'; 9 | import {RouterModule} from '@angular/router'; 10 | 11 | 12 | @NgModule({ 13 | declarations: [ 14 | DashboardComponent 15 | ], 16 | imports: [ 17 | BrowserModule, 18 | FormsModule, 19 | TabsModule, 20 | LandingModule, 21 | Landing2Module, 22 | Landing3Module, 23 | RouterModule 24 | ], 25 | providers: [] 26 | }) 27 | export class DashboardModule { 28 | } 29 | -------------------------------------------------------------------------------- /temp/demo/domain/invoice/address/address.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | , 15 | 16 | , 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /temp/demo/domain/invoice/address/address.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | ::ng-deep .fd-section { 3 | border: 1px solid transparent !important; 4 | margin: 0 !important; 5 | padding: 0; 6 | 7 | .fd-form-item { 8 | 9 | } 10 | 11 | .fd-form-label { 12 | margin-bottom: 0; 13 | } 14 | } 15 | 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /temp/demo/domain/invoice/address/address.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, Input} from '@angular/core'; 2 | import {Address} from '../../model/address'; 3 | import {ActivatedRoute, Router} from '@angular/router'; 4 | 5 | 6 | @Component({ 7 | selector: 'fdp-address', 8 | templateUrl: './address.component.html', 9 | styleUrls: ['./address.component.scss'] 10 | }) 11 | export class AddressComponent { 12 | @Input() 13 | address: Address; 14 | 15 | constructor(private router: Router, private route: ActivatedRoute) { 16 | } 17 | 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /temp/demo/domain/invoice/invoice-create.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | .fd-page__content { 3 | background: #FFFFFF; 4 | margin-top: 3px; 5 | } 6 | 7 | 8 | ::ng-deep .fd-section { 9 | border: 1px solid #dddddd !important; 10 | } 11 | 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /temp/demo/domain/invoice/invoice-edit.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | .fd-page__content { 3 | background: #FFFFFF; 4 | margin-top: 3px; 5 | } 6 | 7 | 8 | ::ng-deep .fd-section { 9 | border: 1px solid #dddddd !important; 10 | } 11 | 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /temp/demo/domain/invoice/invoice-view.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | .fd-page__content { 3 | background: #FFFFFF; 4 | margin-top: 3px; 5 | } 6 | 7 | 8 | } 9 | 10 | -------------------------------------------------------------------------------- /temp/demo/domain/model/address.ts: -------------------------------------------------------------------------------- 1 | import {Entity} from '@ngx-metaui/rules'; 2 | 3 | export class Address implements Entity { 4 | 5 | 6 | constructor(public readonly uniqueName: string, 7 | public readonly name: string, 8 | public readonly lines: string, 9 | public readonly city: string, 10 | public readonly state: string, 11 | public readonly postalCode: string, 12 | public readonly phone: string, 13 | public readonly fax: string, 14 | public readonly email: string, 15 | public readonly url: string, 16 | public readonly country: string) { 17 | } 18 | 19 | 20 | getTypes(): any { 21 | return { 22 | uniqueName: String, 23 | name: String, 24 | lines: String, 25 | city: String, 26 | state: String, 27 | postalCode: String, 28 | phone: String, 29 | fax: String, 30 | email: String, 31 | country: String 32 | }; 33 | } 34 | 35 | identity(): string { 36 | return this.uniqueName; 37 | } 38 | 39 | className(): string { 40 | return 'Address'; 41 | } 42 | 43 | toString() { 44 | return `${this.uniqueName} - ${this.name}`; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /temp/demo/domain/model/payment-terms.ts: -------------------------------------------------------------------------------- 1 | import {Entity} from '@ngx-metaui/rules'; 2 | 3 | export class PaymentTerms implements Entity { 4 | 5 | 6 | constructor( 7 | public uniqueName?: string, 8 | public name?: string, 9 | public description?: string) { 10 | } 11 | 12 | identity(): string { 13 | return this.uniqueName; 14 | } 15 | 16 | 17 | getTypes(): any { 18 | return { 19 | uniqueName: String, 20 | name: String, 21 | description: String 22 | }; 23 | } 24 | 25 | 26 | /** 27 | * Used by MetaUI to identify the name of the class once everything is minified 28 | */ 29 | className(): string { 30 | return 'User'; 31 | } 32 | 33 | toString(): string { 34 | return this.name; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /temp/demo/domain/model/supplier.ts: -------------------------------------------------------------------------------- 1 | import {Entity} from '@ngx-metaui/rules'; 2 | 3 | export class Supplier implements Entity { 4 | 5 | 6 | constructor( 7 | public uniqueName?: string, 8 | public name?: string, 9 | public locationName?: string, 10 | public contact?: string, 11 | public lines?: string, 12 | public city?: string, 13 | public state?: string, 14 | public postalCode?: string, 15 | public country?: string, 16 | public phone?: string, 17 | public email?: string) { 18 | } 19 | 20 | identity(): string { 21 | return this.uniqueName; 22 | } 23 | 24 | 25 | getTypes(): any { 26 | return { 27 | uniqueName: String, 28 | name: String, 29 | locationName: String, 30 | contact: String, 31 | lines: String, 32 | city: String, 33 | state: String, 34 | postalCode: String, 35 | country: String, 36 | phone: String, 37 | email: String 38 | }; 39 | } 40 | 41 | 42 | /** 43 | * Used by MetaUI to identify the name of the class once everything is minified 44 | */ 45 | className(): string { 46 | return 'User'; 47 | } 48 | 49 | toString(): string { 50 | return this.name; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /temp/demo/domain/rest/entity-resolver.service.ts: -------------------------------------------------------------------------------- 1 | import {Inject, Injectable} from '@angular/core'; 2 | import {ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot} from '@angular/router'; 3 | import {Observable} from 'rxjs'; 4 | import {DATA_PROVIDERS, DataProvider} from '@fundamental-ngx/platform'; 5 | 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class DemoEntityResolver implements Resolve { 11 | constructor(@Inject(DATA_PROVIDERS) private providers: Map>, 12 | private router: Router) { 13 | } 14 | 15 | resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | 16 | Observable { 17 | const id = route.paramMap.get('id'); 18 | const type = route.url[2].path; 19 | const dataProvider = this.providers.get(type); 20 | dataProvider.setLookupKey('uniqueName'); 21 | 22 | return dataProvider.fetch(new Map().set('query', id).set('fullText', false)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /temp/demo/domain/supplier/supplier-view.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | .fd-page__content { 3 | background: #FFFFFF; 4 | margin-top: 3px; 5 | } 6 | 7 | 8 | } 9 | 10 | -------------------------------------------------------------------------------- /temp/demo/domain/supplier/supplier-view.component.ts: -------------------------------------------------------------------------------- 1 | import {AfterViewInit, ChangeDetectorRef, Component, OnInit} from '@angular/core'; 2 | import {ActivatedRoute} from '@angular/router'; 3 | import {Supplier} from '../model/supplier'; 4 | 5 | 6 | @Component({ 7 | selector: 'fdp-supplier-view-v', 8 | templateUrl: './supplier-view.component.html', 9 | styleUrls: ['./supplier-view.component.scss'] 10 | }) 11 | export class SupplierViewComponent implements OnInit, AfterViewInit { 12 | supplier: Supplier; 13 | 14 | constructor(private route: ActivatedRoute, private _cd: ChangeDetectorRef) { 15 | } 16 | 17 | ngOnInit(): void { 18 | console.log('asdfafsd'); 19 | this.route.data.subscribe((data: Array) => { 20 | this.supplier = data['entity'][0]; 21 | }); 22 | } 23 | 24 | onBack(): void { 25 | window.history.back(); 26 | } 27 | 28 | ngAfterViewInit(): void { 29 | this._cd.detectChanges(); 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /temp/demo/domain/user/user-view.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | .fd-page__content { 3 | background: #FFFFFF; 4 | margin-top: 3px; 5 | } 6 | 7 | 8 | } 9 | 10 | -------------------------------------------------------------------------------- /temp/demo/domain/user/user-view.component.ts: -------------------------------------------------------------------------------- 1 | import {AfterViewInit, ChangeDetectorRef, Component, OnInit} from '@angular/core'; 2 | import {ActivatedRoute} from '@angular/router'; 3 | import {User} from '../model/user'; 4 | 5 | 6 | @Component({ 7 | selector: 'fdp-user-view-v', 8 | templateUrl: './user-view.component.html', 9 | styleUrls: ['./user-view.component.scss'] 10 | }) 11 | export class UserViewComponent implements OnInit, AfterViewInit { 12 | user: User; 13 | 14 | constructor(private route: ActivatedRoute, private _cd: ChangeDetectorRef) { 15 | } 16 | 17 | ngOnInit(): void { 18 | this.route.data.subscribe((data: Array) => { 19 | this.user = data['entity'][0]; 20 | }); 21 | } 22 | 23 | onBack(): void { 24 | window.history.back(); 25 | } 26 | 27 | ngAfterViewInit(): void { 28 | this._cd.detectChanges(); 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /temp/demo/home.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | background-color: #f7f7f7; 3 | 4 | .fd-shell__footer { 5 | background: #FFFFFF; 6 | } 7 | 8 | .user-info { 9 | font-size: 10px; 10 | position: absolute; 11 | color: #c4c4c4; 12 | bottom: 5px; 13 | } 14 | 15 | } 16 | 17 | 18 | .fd-shell__app { 19 | height: 1%; 20 | } 21 | 22 | .fd-app__main { 23 | background-color: #EDEFF0; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /temp/demo/landing/landing.component.scss: -------------------------------------------------------------------------------- 1 | :host .fd-page { 2 | .fd-page__content { 3 | width: 80%; 4 | align-self: center; 5 | } 6 | 7 | .portlet { 8 | min-width: 250px; 9 | height: 250px; 10 | 11 | .fd-panel__header { 12 | padding: 8px 24px; 13 | } 14 | 15 | .fd-panel__body { 16 | padding: 0px; 17 | } 18 | 19 | &.news { 20 | height: 140px; 21 | } 22 | } 23 | 24 | .right-actions { 25 | .box { 26 | margin-bottom: 15px; 27 | } 28 | 29 | .create-actions { 30 | li { 31 | cursor: pointer; 32 | 33 | span { 34 | padding: 0 4px; 35 | } 36 | } 37 | } 38 | } 39 | } 40 | 41 | .box-row { 42 | margin: 5px; 43 | position: relative; 44 | box-sizing: border-box; 45 | background: #FFFFFF; 46 | border: 1px solid #ebebeb; 47 | border-radius: 2px; 48 | overflow: hidden; 49 | text-align: center; 50 | box-shadow: 2px 2px 4px #dadada;; 51 | color: #fff; 52 | } 53 | -------------------------------------------------------------------------------- /temp/demo/landing/landing.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'fdp-landing', 5 | templateUrl: './landing.component.html', 6 | styleUrls: ['./landing.component.scss'] 7 | }) 8 | export class LandingComponent { 9 | showActionPanel = true; 10 | 11 | constructor() { 12 | } 13 | 14 | 15 | ngOnInit() { 16 | 17 | } 18 | 19 | 20 | quickLinks($event: any) { 21 | alert('quick: ' + $event); 22 | } 23 | 24 | onCreate($event: any) { 25 | alert($event); 26 | 27 | } 28 | 29 | } 30 | 31 | 32 | export interface NewsItem { 33 | text: string; 34 | link: string; 35 | } 36 | -------------------------------------------------------------------------------- /temp/demo/landing2/landing2.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | 3 | 4 | table { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /temp/demo/landing2/landing2.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import { 4 | IconModule, 5 | InputGroupModule, 6 | PanelModule, 7 | TableModule 8 | } from '@fundamental-ngx/core'; 9 | import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; 10 | import {FormsModule} from '@angular/forms'; 11 | import {Landing2Component} from './landing2.component'; 12 | import {BrowserModule} from '@angular/platform-browser'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | Landing2Component 17 | ], 18 | imports: [ 19 | CommonModule, 20 | BrowserModule, 21 | BrowserAnimationsModule, 22 | FormsModule, 23 | PanelModule, 24 | TableModule, 25 | IconModule, 26 | InputGroupModule 27 | 28 | ], 29 | exports: [ 30 | Landing2Component 31 | ], 32 | providers: [] 33 | }) 34 | export class Landing2Module { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /temp/demo/landing3/landing3.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | 3 | 4 | table { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /temp/demo/landing3/landing3.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import { 4 | IconModule, 5 | InputGroupModule, 6 | PanelModule, 7 | TableModule 8 | } from '@fundamental-ngx/core'; 9 | import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; 10 | import {FormsModule} from '@angular/forms'; 11 | import {Landing3Component} from './landing3.component'; 12 | import {BrowserModule} from '@angular/platform-browser'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | Landing3Component 17 | ], 18 | imports: [ 19 | CommonModule, 20 | BrowserModule, 21 | BrowserAnimationsModule, 22 | FormsModule, 23 | PanelModule, 24 | TableModule, 25 | IconModule, 26 | InputGroupModule 27 | 28 | ], 29 | exports: [ 30 | Landing3Component 31 | ], 32 | providers: [] 33 | }) 34 | export class Landing3Module { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /temp/demo/portlets/commodity/commodity.component.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /temp/demo/portlets/commodity/commodity.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | td, th { 3 | font-size: 13px; 4 | 5 | &:last-child, &:first-child { 6 | width: 5%; 7 | padding: 7px; 8 | text-align: center; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /temp/demo/portlets/commodity/commodity.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {CommodityComponent} from './commodity.component'; 4 | 5 | 6 | @NgModule({ 7 | declarations: [ 8 | CommodityComponent 9 | ], 10 | imports: [ 11 | CommonModule 12 | ], 13 | exports: [ 14 | CommodityComponent 15 | ], 16 | providers: [] 17 | }) 18 | export class CommodityModule { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /temp/demo/portlets/my-documents/my-documents.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 19 | 20 | 23 | 24 | 25 | 26 |
TypeIdDateRead
15 | 16 | {{row.id}} 18 | {{row.date}} 21 | 22 |
27 |
28 | -------------------------------------------------------------------------------- /temp/demo/portlets/my-documents/my-documents.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | td, th { 3 | font-size: 13px; 4 | 5 | &:last-child, &:first-child { 6 | width: 5%; 7 | padding: 7px; 8 | text-align: center; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /temp/demo/portlets/my-documents/my-documents.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'fdp-portlet-documents', 6 | templateUrl: './my-documents.component.html', 7 | styleUrls: ['./my-documents.component.scss'] 8 | }) 9 | export class MyDocumentsComponent { 10 | tableRows: Array; 11 | 12 | constructor() { 13 | } 14 | 15 | ngOnInit() { 16 | 17 | this.tableRows = [ 18 | { 19 | id: 'PR9333', 20 | date: '09/21/2019', 21 | type: 'sales-order-item', 22 | read: 'accept', 23 | router: '/demo' 24 | }, 25 | { 26 | id: 'PR3333', 27 | date: '09/21/2019', 28 | type: 'sales-order-item', 29 | router: '/demo' 30 | }, 31 | { 32 | id: 'INV-01', 33 | date: '09/21/2019', 34 | type: 'money-bills', 35 | read: 'accept', 36 | router: '/demo/invoice/view/1' 37 | }, 38 | { 39 | id: 'INV-02', 40 | date: '09/21/2019', 41 | type: 'money-bills', 42 | router: '/demo/invoice/view/2' 43 | } 44 | ]; 45 | } 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /temp/demo/portlets/my-documents/my-documents.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {IconModule, TableModule} from '@fundamental-ngx/core'; 4 | import {MyDocumentsComponent} from './my-documents.component'; 5 | import {RouterModule} from '@angular/router'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | MyDocumentsComponent 10 | ], 11 | imports: [ 12 | CommonModule, 13 | TableModule, 14 | IconModule, 15 | RouterModule 16 | ], 17 | exports: [ 18 | MyDocumentsComponent 19 | ], 20 | providers: [] 21 | }) 22 | export class MyDocumentsModule { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /temp/demo/portlets/my-spend/my-spend.component.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /temp/demo/portlets/my-spend/my-spend.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | td, th { 3 | font-size: 13px; 4 | 5 | &:last-child, &:first-child { 6 | width: 5%; 7 | padding: 7px; 8 | text-align: center; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /temp/demo/portlets/my-spend/my-spend.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'fdp-portlet-spend', 5 | templateUrl: './my-spend.component.html', 6 | styleUrls: ['./my-spend.component.scss'] 7 | }) 8 | export class MySpendComponent { 9 | constructor() { 10 | 11 | } 12 | 13 | ngOnInit() { 14 | 15 | 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /temp/demo/portlets/my-spend/my-spend.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {FormsModule} from '@angular/forms'; 3 | 4 | import {BrowserModule} from '@angular/platform-browser'; 5 | import {MySpendComponent} from './my-spend.component'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | BrowserModule, 10 | FormsModule 11 | ], 12 | declarations: [ 13 | MySpendComponent 14 | ], 15 | exports: [ 16 | MySpendComponent 17 | ] 18 | }) 19 | export class MySpendModule { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /temp/demo/portlets/news/news.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | 4 | {{news[0].text}} 5 | To read more 6 |

7 |
8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /temp/demo/portlets/news/news.component.scss: -------------------------------------------------------------------------------- 1 | .news { 2 | color: #7e7e7e; 3 | padding: 0px 9px; 4 | margin-bottom: 15px; 5 | text-align: left; 6 | overflow: hidden; 7 | position: relative; 8 | height: 150px; 9 | 10 | } 11 | 12 | -------------------------------------------------------------------------------- /temp/demo/portlets/news/news.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {NewsComponent} from './news.component'; 4 | import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; 5 | import {FormsModule} from '@angular/forms'; 6 | import {BrowserModule} from '@angular/platform-browser'; 7 | import {IconModule} from '@fundamental-ngx/core'; 8 | 9 | @NgModule({ 10 | declarations: [ 11 | NewsComponent 12 | ], 13 | imports: [ 14 | CommonModule, 15 | BrowserModule, 16 | IconModule, 17 | BrowserAnimationsModule, 18 | FormsModule 19 | ], 20 | exports: [ 21 | NewsComponent 22 | ], 23 | providers: [] 24 | }) 25 | export class NewsModule { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /temp/mdemo/domain/invoice/address/address.component.html: -------------------------------------------------------------------------------- 1 | 63 72 79 70 74 69 69 2 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | , 19 | 20 | , 21 | 22 | 23 | 24 |
25 | -------------------------------------------------------------------------------- /temp/mdemo/domain/invoice/address/address.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | ::ng-deep .fd-section { 3 | border: 1px solid transparent !important; 4 | margin: 0 !important; 5 | padding: 0; 6 | 7 | .fd-form-item { 8 | 9 | } 10 | 11 | .fd-form-label { 12 | margin-bottom: 0; 13 | } 14 | } 15 | 16 | .cipher { 17 | padding-right: 5px; 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /temp/mdemo/domain/invoice/address/address.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, Input} from '@angular/core'; 2 | import {Address} from '../../model/address'; 3 | import {ActivatedRoute, Router} from '@angular/router'; 4 | 5 | 6 | @Component({ 7 | selector: 'fdp-address', 8 | templateUrl: './address.component.html', 9 | styleUrls: ['./address.component.scss'] 10 | }) 11 | export class AddressComponent { 12 | @Input() 13 | address: Address; 14 | 15 | @Input() 16 | editable: boolean = false; 17 | 18 | toggle = true; 19 | 20 | constructor(private router: Router, private route: ActivatedRoute) { 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /temp/mdemo/domain/invoice/invoice.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | .fd-page__content { 3 | background: #FFFFFF; 4 | margin-top: 3px; 5 | } 6 | 7 | 8 | ::ng-deep .fd-section { 9 | border: 1px solid #dddddd !important; 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /temp/mdemo/domain/invoice/invoice.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {InvoiceComponent} from './invoice.component'; 4 | import {FormsModule, ReactiveFormsModule} from '@angular/forms'; 5 | import {FioriRulesModule} from '@ngx-metaui/fiori-rules'; 6 | import {ActionBarModule as ABCore, ActionBarModule, ButtonModule} from '@fundamental-ngx/core'; 7 | import {AddressComponent} from './address/address.component'; 8 | import {MetaUIRulesModule} from '@ngx-metaui/rules'; 9 | import {FdpFormGroupModule} from '@fundamental-ngx/platform'; 10 | 11 | 12 | @NgModule({ 13 | declarations: [ 14 | InvoiceComponent, 15 | AddressComponent 16 | ], 17 | imports: [ 18 | CommonModule, 19 | FormsModule, 20 | FioriRulesModule, 21 | ReactiveFormsModule, 22 | ActionBarModule, 23 | ABCore, 24 | ButtonModule, 25 | FdpFormGroupModule, 26 | MetaUIRulesModule 27 | 28 | ], 29 | entryComponents: [ 30 | AddressComponent 31 | ], 32 | exports: [ 33 | InvoiceComponent, 34 | AddressComponent 35 | ], 36 | providers: [] 37 | }) 38 | export class InvoiceModule { 39 | } 40 | -------------------------------------------------------------------------------- /temp/mdemo/domain/model/address.ts: -------------------------------------------------------------------------------- 1 | import {Entity} from '@ngx-metaui/rules'; 2 | 3 | export class Address implements Entity { 4 | 5 | 6 | constructor(public readonly uniqueName: string, 7 | public readonly name: string, 8 | public readonly lines: string, 9 | public readonly city: string, 10 | public readonly state: string, 11 | public readonly postalCode: string, 12 | public readonly phone: string, 13 | public readonly fax: string, 14 | public readonly email: string, 15 | public readonly url: string, 16 | public readonly country: string) { 17 | } 18 | 19 | 20 | getTypes(): any { 21 | return { 22 | uniqueName: String, 23 | name: String, 24 | lines: String, 25 | city: String, 26 | state: String, 27 | postalCode: String, 28 | phone: String, 29 | fax: String, 30 | email: String, 31 | country: String 32 | }; 33 | } 34 | 35 | identity(): string { 36 | return this.uniqueName; 37 | } 38 | 39 | className(): string { 40 | return 'Address'; 41 | } 42 | 43 | toString() { 44 | return `${this.uniqueName} - ${this.name}`; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /temp/mdemo/domain/model/payment-terms.ts: -------------------------------------------------------------------------------- 1 | import {Entity} from '@ngx-metaui/rules'; 2 | 3 | export class PaymentTerms implements Entity { 4 | 5 | 6 | constructor( 7 | public uniqueName?: string, 8 | public name?: string, 9 | public description?: string) { 10 | } 11 | 12 | identity(): string { 13 | return this.uniqueName; 14 | } 15 | 16 | 17 | getTypes(): any { 18 | return { 19 | uniqueName: String, 20 | name: String, 21 | description: String 22 | }; 23 | } 24 | 25 | 26 | /** 27 | * Used by MetaUI to identify the name of the class once everything is minified 28 | */ 29 | className(): string { 30 | return 'PaymentTermss'; 31 | } 32 | 33 | toString(): string { 34 | return this.name; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /temp/mdemo/domain/rest/entity-resolver.service.ts: -------------------------------------------------------------------------------- 1 | import {Inject, Injectable} from '@angular/core'; 2 | import {ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot} from '@angular/router'; 3 | import {Observable} from 'rxjs'; 4 | import {DATA_PROVIDERS, DataProvider} from '@fundamental-ngx/platform'; 5 | 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class EntityResolver implements Resolve { 11 | constructor(@Inject(DATA_PROVIDERS) private providers: Map>, 12 | private router: Router) { 13 | } 14 | 15 | resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | 16 | Observable { 17 | const id = route.paramMap.get('id'); 18 | const type = route.paramMap.get('type'); 19 | const dataProvider = this.providers.get(type); 20 | dataProvider.setLookupKey('uniqueName'); 21 | 22 | return dataProvider.fetch(new Map().set('query', id).set('fullText', false)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /temp/mdemo/home.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /temp/mdemo/home.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/temp/mdemo/home.component.scss -------------------------------------------------------------------------------- /temp/mdemo/home.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'fdp-home', 5 | templateUrl: './home.component.html' 6 | }) 7 | export class HomeComponent { 8 | 9 | constructor() { 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /temp/mdemo/landing2/landing2.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | 3 | 4 | table { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /temp/mdemo/landing2/landing2.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import { 4 | IconModule, 5 | InputGroupModule, 6 | PanelModule, 7 | TableModule 8 | } from '@fundamental-ngx/core'; 9 | import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; 10 | import {FormsModule} from '@angular/forms'; 11 | import {Landing2Component} from './landing2.component'; 12 | import {BrowserModule} from '@angular/platform-browser'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | Landing2Component 17 | ], 18 | imports: [ 19 | CommonModule, 20 | BrowserModule, 21 | BrowserAnimationsModule, 22 | FormsModule, 23 | PanelModule, 24 | TableModule, 25 | IconModule, 26 | InputGroupModule 27 | 28 | ], 29 | exports: [ 30 | Landing2Component 31 | ], 32 | providers: [] 33 | }) 34 | export class Landing2Module { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /temp/mdemo/landing3/landing3.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | 3 | 4 | table { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /temp/mdemo/landing3/landing3.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import { 4 | IconModule, 5 | InputGroupModule, 6 | PanelModule, 7 | TableModule 8 | } from '@fundamental-ngx/core'; 9 | import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; 10 | import {FormsModule} from '@angular/forms'; 11 | import {Landing3Component} from './landing3.component'; 12 | import {BrowserModule} from '@angular/platform-browser'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | Landing3Component 17 | ], 18 | imports: [ 19 | CommonModule, 20 | BrowserModule, 21 | BrowserAnimationsModule, 22 | FormsModule, 23 | PanelModule, 24 | TableModule, 25 | IconModule, 26 | InputGroupModule 27 | 28 | ], 29 | exports: [ 30 | Landing3Component 31 | ], 32 | providers: [] 33 | }) 34 | export class Landing3Module { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/commodity/commodity.component.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/commodity/commodity.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | td, th { 3 | font-size: 13px; 4 | 5 | &:last-child, &:first-child { 6 | width: 5%; 7 | padding: 7px; 8 | text-align: center; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/commodity/commodity.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {CommodityComponent} from './commodity.component'; 4 | 5 | 6 | @NgModule({ 7 | declarations: [ 8 | CommodityComponent 9 | ], 10 | imports: [ 11 | CommonModule 12 | ], 13 | entryComponents: [ 14 | CommodityComponent 15 | ], 16 | exports: [ 17 | CommodityComponent 18 | ], 19 | providers: [] 20 | }) 21 | export class CommodityModule { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/my-documents/my-documents.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 19 | 20 | 23 | 24 | 25 | 26 |
TypeIdDateRead
15 | 16 | {{row.id}} 18 | {{row.date}} 21 | 22 |
27 |
28 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/my-documents/my-documents.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | td, th { 3 | font-size: 13px; 4 | 5 | &:last-child, &:first-child { 6 | width: 5%; 7 | padding: 7px; 8 | text-align: center; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/my-documents/my-documents.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'fdp-portlet-documents', 6 | templateUrl: './my-documents.component.html', 7 | styleUrls: ['./my-documents.component.scss'] 8 | }) 9 | export class MyDocumentsComponent { 10 | tableRows: Array; 11 | 12 | constructor() { 13 | } 14 | 15 | ngOnInit() { 16 | 17 | this.tableRows = [ 18 | { 19 | id: 'PR9333', 20 | date: '09/21/2019', 21 | type: 'sales-order-item', 22 | read: 'accept', 23 | router: '/mdemo' 24 | }, 25 | { 26 | id: 'PR3333', 27 | date: '09/21/2019', 28 | type: 'sales-order-item', 29 | router: '/mdemo' 30 | }, 31 | { 32 | id: 'INV-01', 33 | date: '09/21/2019', 34 | type: 'money-bills', 35 | read: 'accept', 36 | router: '/mdemo/invoice/view/1' 37 | }, 38 | { 39 | id: 'INV-02', 40 | date: '09/21/2019', 41 | type: 'money-bills', 42 | router: '/mdemo/invoice/view/2' 43 | } 44 | ]; 45 | } 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/my-documents/my-documents.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {IconModule, TableModule} from '@fundamental-ngx/core'; 4 | import {MyDocumentsComponent} from './my-documents.component'; 5 | import {RouterModule} from '@angular/router'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | MyDocumentsComponent 10 | ], 11 | imports: [ 12 | CommonModule, 13 | TableModule, 14 | IconModule, 15 | RouterModule 16 | ], 17 | exports: [ 18 | MyDocumentsComponent 19 | ], 20 | entryComponents: [ 21 | MyDocumentsComponent 22 | ], 23 | 24 | providers: [] 25 | }) 26 | export class MyDocumentsModule { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/my-spend/my-spend.component.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/my-spend/my-spend.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | td, th { 3 | font-size: 13px; 4 | 5 | &:last-child, &:first-child { 6 | width: 5%; 7 | padding: 7px; 8 | text-align: center; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/my-spend/my-spend.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'fdp-portlet-spend', 5 | templateUrl: './my-spend.component.html', 6 | styleUrls: ['./my-spend.component.scss'] 7 | }) 8 | export class MySpendComponent { 9 | constructor() { 10 | 11 | } 12 | 13 | ngOnInit() { 14 | 15 | 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/my-spend/my-spend.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {FormsModule} from '@angular/forms'; 3 | 4 | import {BrowserModule} from '@angular/platform-browser'; 5 | import {MySpendComponent} from './my-spend.component'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | BrowserModule, 10 | FormsModule 11 | ], 12 | declarations: [ 13 | MySpendComponent 14 | ], 15 | exports: [ 16 | MySpendComponent 17 | ], 18 | entryComponents: [ 19 | MySpendComponent 20 | ] 21 | }) 22 | export class MySpendModule { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/news/news.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | 4 | {{news[0].text}} 5 | To read more 6 |

7 |
8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/news/news.component.scss: -------------------------------------------------------------------------------- 1 | .news { 2 | color: #7e7e7e; 3 | padding: 0px 9px; 4 | margin-bottom: 15px; 5 | text-align: left; 6 | overflow: hidden; 7 | position: relative; 8 | height: 150px; 9 | 10 | } 11 | 12 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/news/news.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'fdp-portlet-news', 6 | templateUrl: './news.component.html', 7 | styleUrls: ['./news.component.scss'] 8 | }) 9 | export class NewsComponent { 10 | news: Array; 11 | 12 | constructor() { 13 | } 14 | 15 | ngOnInit() { 16 | this.news = [ 17 | { 18 | text: 'SAP Ariba Integrates with Givewith Platform, Enabling Buyers and ' + 19 | 'Suppliers to Drive Social Impact Through B2B Transactions.', 20 | link: 'http://www.ariba.com' 21 | }, 22 | { 23 | text: 'SAP, Hyundai AutoEver join hands to develop cloud software', 24 | link: 'http://www.ariba.com' 25 | }, 26 | { 27 | text: 'SAP Ariba Integrates with Givewith Platform, Enabling Buyers and ' + 28 | 'Suppliers to Drive Social Impact Through B2B Transactions', 29 | link: 'http://www.ariba.com' 30 | } 31 | 32 | ]; 33 | } 34 | 35 | } 36 | 37 | 38 | export interface NewsItem { 39 | text: string; 40 | link: string; 41 | } 42 | -------------------------------------------------------------------------------- /temp/mdemo/portlets/news/news.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {NewsComponent} from './news.component'; 4 | import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; 5 | import {FormsModule} from '@angular/forms'; 6 | import {BrowserModule} from '@angular/platform-browser'; 7 | import {IconModule} from '@fundamental-ngx/core'; 8 | 9 | @NgModule({ 10 | declarations: [ 11 | NewsComponent 12 | ], 13 | imports: [ 14 | CommonModule, 15 | BrowserModule, 16 | IconModule, 17 | BrowserAnimationsModule, 18 | FormsModule 19 | ], 20 | entryComponents: [ 21 | NewsComponent 22 | ], 23 | exports: [ 24 | NewsComponent 25 | ], 26 | providers: [] 27 | }) 28 | export class NewsModule { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /tools/generators/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngx-metaui/rules/e2a5ff8d66b8fa5be04edcc66c3b0732e5f6a266/tools/generators/.gitkeep -------------------------------------------------------------------------------- /tools/tsconfig.tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc", 5 | "rootDir": ".", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": ["jasmine", "node"] 9 | }, 10 | "include": ["**/*.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es2015", 11 | "module": "es2020", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2018", 17 | "dom" 18 | ], 19 | "esModuleInterop": true, 20 | "paths": { 21 | "@ngx-metaui/rules": [ 22 | "libs/rules/src/public_api.ts" 23 | ], 24 | "@ngx-metaui/material-rules": [ 25 | "libs/material-rules/src/public_api.ts" 26 | ], 27 | "@ngx-metaui/fiori-rules": [ 28 | "libs/fiori-rules/src/index.ts" 29 | ] 30 | }, 31 | "rootDir": "." 32 | }, 33 | "exclude": [ 34 | "node_modules", 35 | "tmp" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /tsconfig.ci.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "tsconfig", 4 | "lib": [ 5 | "es2017", 6 | "dom" 7 | ], 8 | "declaration": true, 9 | "module": "commonjs", 10 | "moduleResolution": "node", 11 | "noEmitOnError": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "noImplicitAny": true, 14 | "noImplicitThis": true, 15 | "noUnusedParameters": true, 16 | "noUnusedLocals": true, 17 | "rootDir": "src/", 18 | "skipDefaultLibCheck": true, 19 | "skipLibCheck": true, 20 | "sourceMap": true, 21 | "strictNullChecks": true, 22 | "target": "es6", 23 | "types": [ 24 | "jasmine", 25 | "node" 26 | ] 27 | }, 28 | "include": [ 29 | "scripts/ci/utils/**/*" 30 | ], 31 | "exclude": [ 32 | "scripts/ci/**/*.sh" 33 | ] 34 | } 35 | --------------------------------------------------------------------------------