mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1968] fix packaging issues i18n and assets (#2665)
* fix packaging issues i18n and assets * remove other not used fodler
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
},
|
||||
"apps": [
|
||||
{
|
||||
"name" : "dist",
|
||||
"root": "src",
|
||||
"outDir": "dist",
|
||||
"assets": [
|
||||
@@ -25,42 +26,22 @@
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-core/bundles/assets",
|
||||
"output": "./core/assets/"
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-insights/bundles/assets",
|
||||
"output": "./insights/assets/"
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-process-services/bundles/assets",
|
||||
"output": "./process-services/assets/"
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-content-services/bundles/assets",
|
||||
"output": "./content-services/assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-core/i18n",
|
||||
"output": "./assets/@alfresco/core/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-insights/i18n",
|
||||
"output": "./assets/@alfresco/insights/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-process-services/i18n",
|
||||
"output": "./assets/@alfresco/process-services/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-content-services/i18n",
|
||||
"output": "./assets/@alfresco/content-services/i18n"
|
||||
"output": "./assets/"
|
||||
},
|
||||
{ "glob": "pdf.worker.js", "input": "../node_modules/pdfjs-dist/build", "output": "./" }
|
||||
],
|
||||
@@ -92,8 +73,8 @@
|
||||
"prod": "environments/environment.prod.ts"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name" :"dev",
|
||||
"root": "src",
|
||||
"outDir": "dist",
|
||||
"assets": [
|
||||
@@ -125,26 +106,6 @@
|
||||
"input": "../../lib/insights/bundles/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/core/i18n",
|
||||
"output": "./@alfresco/core/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/insights/i18n",
|
||||
"output": "./@alfresco/insights/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/process-services/i18n",
|
||||
"output": "./@alfresco/process-services/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/content-services/i18n",
|
||||
"output": "./@alfresco/content-services/i18n"
|
||||
},
|
||||
{ "glob": "pdf.worker.js", "input": "../node_modules/pdfjs-dist/build", "output": "./" }
|
||||
],
|
||||
"index": "index.html",
|
||||
|
@@ -5,9 +5,9 @@
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --app=0 --open --aot=true",
|
||||
"start:dev": "npm run style:dev & npm run clean-lib-angular && npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --disable-host-check --app=1 pp-dev --proxy-config proxy.conf.js --open",
|
||||
"start:dist": "npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --disable-host-check --aot=false --app=0",
|
||||
"start": "npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --app dist --open --aot=true",
|
||||
"start:dev": "npm run style:dev & npm run clean-lib-angular && npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --disable-host-check --app dev pp-dev --proxy-config proxy.conf.js --open",
|
||||
"start:dist": "npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --disable-host-check --aot=false --app dist",
|
||||
"build": "npm run server-versions && rimraf dist && ng build -app=0",
|
||||
"build:dev": "npm run style:dev & npm run server-versions && rimraf dist && ng build -app=1",
|
||||
"style:dev": "npm run webpack -- --config config/webpack.style.js --progress --profile --bail --watch",
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { FormModel, FormService, LogService } from '@alfresco/adf-core';
|
||||
import { FormModel, FormService } from '@alfresco/adf-core';
|
||||
import { InMemoryFormService } from '../../services/in-memory-form.service';
|
||||
import { DemoForm } from './demo-form';
|
||||
|
||||
@@ -32,12 +32,8 @@ export class FormComponent implements OnInit {
|
||||
|
||||
form: FormModel;
|
||||
|
||||
constructor(@Inject(FormService) private formService: InMemoryFormService, private logSevice: LogService) {
|
||||
// Prevent default outcome actions
|
||||
formService.executeOutcome.subscribe(e => {
|
||||
e.preventDefault();
|
||||
this.logSevice.log(e.outcome);
|
||||
});
|
||||
constructor(@Inject(FormService) private formService: InMemoryFormService) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AppConfigService, AlfrescoApiService, EcmModelService, LogService, FormFieldOption, FormService } from '@alfresco/adf-core';
|
||||
import { AppConfigService, AlfrescoApiService, EcmModelService, LogService, FormFieldOption, FormService, FormValues, FormModel, FormOutcomeModel } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
interface ActivitiData {
|
||||
@@ -62,6 +62,23 @@ export class InMemoryFormService extends FormService {
|
||||
});
|
||||
}
|
||||
|
||||
parseForm(json: any, data?: FormValues, readOnly: boolean = false): FormModel {
|
||||
if (json) {
|
||||
let form = new FormModel(json, data, readOnly, this);
|
||||
if (!json.fields) {
|
||||
form.outcomes = [
|
||||
new FormOutcomeModel(form, {
|
||||
id: '$custom',
|
||||
name: FormOutcomeModel.SAVE_ACTION,
|
||||
isSystem: true
|
||||
})
|
||||
];
|
||||
}
|
||||
return form;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
getRestFieldValuesByProcessId(processDefinitionId: string, fieldId: string): Observable<any> {
|
||||
// Uncomment this to use original call
|
||||
|
Reference in New Issue
Block a user