mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
AAE-34641 Update branch with develop
This commit is contained in:
2
.github/actions/setup/action.yml
vendored
2
.github/actions/setup/action.yml
vendored
@@ -26,7 +26,7 @@ runs:
|
|||||||
cache-dependency-path: package-lock.json
|
cache-dependency-path: package-lock.json
|
||||||
- name: get latest tag sha
|
- name: get latest tag sha
|
||||||
id: tag-sha
|
id: tag-sha
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@8cd8c3798c79d10540e2876ad7cf2a5311cbd1ae # v8.20.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@95f68dc050fba62b3331d9b47bc659526cdfb343 # v8.21.1
|
||||||
# CACHE
|
# CACHE
|
||||||
- name: Node Modules cache
|
- name: Node Modules cache
|
||||||
id: node-modules-cache
|
id: node-modules-cache
|
||||||
|
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
|
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
|
||||||
# Override language selection by uncommenting this and choosing your languages
|
# Override language selection by uncommenting this and choosing your languages
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
|
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@@ -53,4 +53,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
|
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
|
||||||
|
6
.github/workflows/pull-request.yml
vendored
6
.github/workflows/pull-request.yml
vendored
@@ -64,7 +64,7 @@ jobs:
|
|||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Ensure SHA pinned actions
|
- name: Ensure SHA pinned actions
|
||||||
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@2d6823da4039243036c86d76f503c84e2ded2517 # v3.0.24
|
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@fc87bb5b5a97953d987372e74478de634726b3e5 # v3.0.25
|
||||||
|
|
||||||
- name: Check package-lock.json version
|
- name: Check package-lock.json version
|
||||||
run: |
|
run: |
|
||||||
@@ -84,10 +84,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@8cd8c3798c79d10540e2876ad7cf2a5311cbd1ae # v8.20.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@95f68dc050fba62b3331d9b47bc659526cdfb343 # v8.21.1
|
||||||
|
|
||||||
- name: Save commit message
|
- name: Save commit message
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@8cd8c3798c79d10540e2876ad7cf2a5311cbd1ae # v8.20.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@95f68dc050fba62b3331d9b47bc659526cdfb343 # v8.21.1
|
||||||
|
|
||||||
- name: ci:force flag parser
|
- name: ci:force flag parser
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@@ -23,10 +23,10 @@ Manages tags in Content Services.
|
|||||||
- _nodeId:_ `string` - Id of node to which tags should be assigned.
|
- _nodeId:_ `string` - Id of node to which tags should be assigned.
|
||||||
- _tags:_ `TagBody[]` - List of tags to create and assign or just assign if they already exist.
|
- _tags:_ `TagBody[]` - List of tags to create and assign or just assign if they already exist.
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagPaging.md)`|`[`TagEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagEntry.md)`>` - Just linked tags to node or single tag if linked only one tag.
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagPaging.md)`|`[`TagEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagEntry.md)`>` - Just linked tags to node or single tag if linked only one tag.
|
||||||
- **createTags**(tags: `TagBody[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagEntry.md)`[]>`<br/>
|
- **createTags**(tags: `TagBody[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagEntry`](../../../lib/js-api/src/api/content-rest-api/docs/TagsApi.md#TagEntry) `|` [`TagPaging`](../../../lib/js-api/src/api/content-rest-api/docs/TagsApi.md#TagPaging)`>`<br/>
|
||||||
Creates tags.
|
Creates tags.
|
||||||
- _tags:_ `TagBody[]` - list of tags to create.
|
- _tags:_ `TagBody[]` - list of tags to create.
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagEntry.md)`[]>` - Created tags.
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagEntry`](../../../lib/js-api/src/api/content-rest-api/docs/TagsApi.md#TagEntry) `|` [`TagPaging`](../../../lib/js-api/src/api/content-rest-api/docs/TagsApi.md#TagPaging)`>` - Created tags.
|
||||||
- **deleteTag**(tagId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<void>`<br/>
|
- **deleteTag**(tagId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<void>`<br/>
|
||||||
Deletes a tag with tagId. This will cause the tag to be removed from all nodes. You must have admin rights to delete a tag.
|
Deletes a tag with tagId. This will cause the tag to be removed from all nodes. You must have admin rights to delete a tag.
|
||||||
- _tagId:_ `string` - of the tag to be deleted
|
- _tagId:_ `string` - of the tag to be deleted
|
||||||
|
Binary file not shown.
@@ -89,7 +89,7 @@ describe('TagService', () => {
|
|||||||
|
|
||||||
describe('createTags', () => {
|
describe('createTags', () => {
|
||||||
it('should call createTags on tagsApi', () => {
|
it('should call createTags on tagsApi', () => {
|
||||||
spyOn(service.tagsApi, 'createTags').and.returnValue(Promise.resolve([]));
|
spyOn(service.tagsApi, 'createTags').and.returnValue(Promise.resolve({}));
|
||||||
const tag1 = new TagBody();
|
const tag1 = new TagBody();
|
||||||
tag1.tag = 'Some tag 1';
|
tag1.tag = 'Some tag 1';
|
||||||
const tag2 = new TagBody();
|
const tag2 = new TagBody();
|
||||||
@@ -101,19 +101,17 @@ describe('TagService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should emit refresh when tags creation is success', async () => {
|
it('should emit refresh when tags creation is success', async () => {
|
||||||
const tags: TagEntry[] = [
|
const tag: TagEntry = {
|
||||||
{
|
entry: {
|
||||||
entry: {
|
id: 'Some id 1',
|
||||||
id: 'Some id 1',
|
tag: 'Some tag 1'
|
||||||
tag: 'Some tag 1'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
};
|
||||||
spyOn(service.refresh, 'emit');
|
spyOn(service.refresh, 'emit');
|
||||||
spyOn(service.tagsApi, 'createTags').and.returnValue(Promise.resolve(tags));
|
spyOn(service.tagsApi, 'createTags').and.returnValue(Promise.resolve(tag));
|
||||||
|
|
||||||
await service.createTags([]).toPromise();
|
await service.createTags([]).toPromise();
|
||||||
expect(service.refresh.emit).toHaveBeenCalledWith(tags);
|
expect(service.refresh.emit).toHaveBeenCalledWith(tag);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -99,7 +99,7 @@ export class TagService {
|
|||||||
* @param tags list of tags to create.
|
* @param tags list of tags to create.
|
||||||
* @returns Created tags.
|
* @returns Created tags.
|
||||||
*/
|
*/
|
||||||
createTags(tags: TagBody[]): Observable<TagEntry[]> {
|
createTags(tags: TagBody[]): Observable<TagEntry | TagPaging> {
|
||||||
return from(this.tagsApi.createTags(tags)).pipe(tap((tagEntries) => this.refresh.emit(tagEntries)));
|
return from(this.tagsApi.createTags(tags)).pipe(tap((tagEntries) => this.refresh.emit(tagEntries)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -78,7 +78,6 @@ describe('DateFnsUtils', () => {
|
|||||||
|
|
||||||
it('should parse alternative ISO datetime', () => {
|
it('should parse alternative ISO datetime', () => {
|
||||||
const result = DateFnsUtils.parseDate('1982-03-13T10:00:000Z', `yyyy-MM-dd'T'HH:mm:sssXXX`);
|
const result = DateFnsUtils.parseDate('1982-03-13T10:00:000Z', `yyyy-MM-dd'T'HH:mm:sssXXX`);
|
||||||
|
|
||||||
expect(result.toISOString()).toBe('1982-03-13T10:00:00.000Z');
|
expect(result.toISOString()).toBe('1982-03-13T10:00:00.000Z');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -358,7 +358,7 @@ export class FormModel implements ProcessFormModel {
|
|||||||
this.handleSectionField(field, formFieldModel);
|
this.handleSectionField(field, formFieldModel);
|
||||||
} else if (this.isContainerField(field)) {
|
} else if (this.isContainerField(field)) {
|
||||||
this.handleContainerField(field, formFieldModel);
|
this.handleContainerField(field, formFieldModel);
|
||||||
} else {
|
} else if (this.isFormField(field)) {
|
||||||
this.handleSingleField(field, formFieldModel);
|
this.handleSingleField(field, formFieldModel);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -368,6 +368,10 @@ export class FormModel implements ProcessFormModel {
|
|||||||
return field instanceof ContainerModel;
|
return field instanceof ContainerModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private isFormField(field: ContainerModel | FormFieldModel): field is FormFieldModel {
|
||||||
|
return field instanceof FormFieldModel;
|
||||||
|
}
|
||||||
|
|
||||||
private isSectionField(field: ContainerModel | FormFieldModel): field is FormFieldModel {
|
private isSectionField(field: ContainerModel | FormFieldModel): field is FormFieldModel {
|
||||||
return field.type === FormFieldTypes.SECTION;
|
return field.type === FormFieldTypes.SECTION;
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
"COMPLETE": "Abschließen",
|
"COMPLETE": "Abschließen",
|
||||||
"CANCEL": "Abbrechen",
|
"CANCEL": "Abbrechen",
|
||||||
"CLAIM": "Beanspruchen",
|
"CLAIM": "Beanspruchen",
|
||||||
"UNCLAIM": "Anspruch aufheben",
|
"UNCLAIM": "Freigeben ",
|
||||||
"START PROCESS": "Prozess starten",
|
"START PROCESS": "Prozess starten",
|
||||||
"DATA_LOADING": "Daten werden geladen",
|
"DATA_LOADING": "Daten werden geladen",
|
||||||
"CLOSE": "Schließen",
|
"CLOSE": "Schließen",
|
||||||
|
@@ -209,9 +209,9 @@ export class TagsApi extends BaseApi {
|
|||||||
/**
|
/**
|
||||||
* Create specified by **tags** list of tags.
|
* Create specified by **tags** list of tags.
|
||||||
* @param tags List of tags to create.
|
* @param tags List of tags to create.
|
||||||
* @returns Promise<TagEntry[]>
|
* @returns Promise<TagEntry | TagPaging>
|
||||||
*/
|
*/
|
||||||
createTags(tags: TagBody[]): Promise<TagEntry[]> {
|
createTags(tags: TagBody[]): Promise<TagEntry | TagPaging> {
|
||||||
throwIfNotDefined(tags, 'tags');
|
throwIfNotDefined(tags, 'tags');
|
||||||
|
|
||||||
return this.post({
|
return this.post({
|
||||||
|
@@ -240,7 +240,7 @@ Create specified by **tags** list of tags.
|
|||||||
|----------|-----------------------|-------------------------|
|
|----------|-----------------------|-------------------------|
|
||||||
| **tags** | [TagBody[]](#TagBody) | List of tags to create. |
|
| **tags** | [TagBody[]](#TagBody) | List of tags to create. |
|
||||||
|
|
||||||
**Return type**: [TagEntry[]](#TagEntry)
|
**Return type**: [TagEntry](#TagEntry) | [TagPaging](#TagPaging)
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
import { AlfrescoApi, TagBody, TagEntry, TagsApi } from '../../src';
|
import { AlfrescoApi, TagBody, TagEntry, TagPaging, TagsApi } from '../../src';
|
||||||
import { EcmAuthMock, TagMock } from '../mockObjects';
|
import { EcmAuthMock, TagMock } from '../mockObjects';
|
||||||
|
|
||||||
describe('Tags', () => {
|
describe('Tags', () => {
|
||||||
@@ -105,10 +105,10 @@ describe('Tags', () => {
|
|||||||
describe('createTags', () => {
|
describe('createTags', () => {
|
||||||
it('should return created tags', (done) => {
|
it('should return created tags', (done) => {
|
||||||
tagMock.createTags201Response();
|
tagMock.createTags201Response();
|
||||||
tagsApi.createTags([new TagBody(), new TagBody()]).then((tags) => {
|
tagsApi.createTags([new TagBody(), new TagBody()]).then((tags: TagPaging) => {
|
||||||
assert.equal(tags.length, 2);
|
assert.equal(tags.list.entries.length, 2);
|
||||||
assert.equal(tags[0].entry.tag, 'tag-test-1');
|
assert.equal(tags.list.entries[0].entry.tag, 'tag-test-1');
|
||||||
assert.equal(tags[1].entry.tag, 'tag-test-2');
|
assert.equal(tags.list.entries[1].entry.tag, 'tag-test-2');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -65,7 +65,7 @@ export class TagMock extends BaseMock {
|
|||||||
createTags201Response(): void {
|
createTags201Response(): void {
|
||||||
nock(this.host, { encodedQueryParams: true })
|
nock(this.host, { encodedQueryParams: true })
|
||||||
.post('/alfresco/api/-default-/public/alfresco/versions/1/tags')
|
.post('/alfresco/api/-default-/public/alfresco/versions/1/tags')
|
||||||
.reply(201, [this.mockTagEntry(), this.mockTagEntry('tag-test-2', 'd79bdbd0-9f55-45bb-9521-811e15bf48f6')]);
|
.reply(201, this.getPaginatedListOfTags());
|
||||||
}
|
}
|
||||||
|
|
||||||
get201ResponseForAssigningTagsToNode(body: TagBody[]): void {
|
get201ResponseForAssigningTagsToNode(body: TagBody[]): void {
|
||||||
|
@@ -96,6 +96,7 @@
|
|||||||
mat-button
|
mat-button
|
||||||
[disabled]="!isOutcomeButtonEnabled(outcome)"
|
[disabled]="!isOutcomeButtonEnabled(outcome)"
|
||||||
[class.adf-form-hide-button]="!isOutcomeButtonVisible(outcome, form.readOnly)"
|
[class.adf-form-hide-button]="!isOutcomeButtonVisible(outcome, form.readOnly)"
|
||||||
|
class="adf-cloud-form-custom-outcome-button"
|
||||||
(click)="onOutcomeClicked(outcome)"
|
(click)="onOutcomeClicked(outcome)"
|
||||||
>
|
>
|
||||||
{{ outcome.name | translate | uppercase }}
|
{{ outcome.name | translate | uppercase }}
|
||||||
|
@@ -312,7 +312,7 @@
|
|||||||
"ADF_CLOUD_TASK_HEADER": {
|
"ADF_CLOUD_TASK_HEADER": {
|
||||||
"BUTTON": {
|
"BUTTON": {
|
||||||
"CLAIM": "Beanspruchen",
|
"CLAIM": "Beanspruchen",
|
||||||
"RELEASE": "Anspruch aufheben"
|
"RELEASE": "Freigeben"
|
||||||
},
|
},
|
||||||
"PROPERTIES": {
|
"PROPERTIES": {
|
||||||
"TASK_NAME": "Aufgabe",
|
"TASK_NAME": "Aufgabe",
|
||||||
@@ -373,7 +373,7 @@
|
|||||||
"COMPLETE": "Abschließen",
|
"COMPLETE": "Abschließen",
|
||||||
"CANCEL": "Abbrechen",
|
"CANCEL": "Abbrechen",
|
||||||
"CLAIM": "Beanspruchen",
|
"CLAIM": "Beanspruchen",
|
||||||
"UNCLAIM": "Anspruch aufheben"
|
"UNCLAIM": "Freigeben "
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ERROR": {
|
"ERROR": {
|
||||||
|
@@ -73,7 +73,7 @@
|
|||||||
"BUTTON": {
|
"BUTTON": {
|
||||||
"COMPLETE": "Abschließen",
|
"COMPLETE": "Abschließen",
|
||||||
"CLAIM": "Beanspruchen",
|
"CLAIM": "Beanspruchen",
|
||||||
"UNCLAIM": "Anspruch aufheben",
|
"UNCLAIM": "Freigeben ",
|
||||||
"DRAG-ATTACHMENT": "Dateien zum Hochladen ablegen",
|
"DRAG-ATTACHMENT": "Dateien zum Hochladen ablegen",
|
||||||
"UPLOAD-ATTACHMENT": "Anhang hochladen"
|
"UPLOAD-ATTACHMENT": "Anhang hochladen"
|
||||||
},
|
},
|
||||||
@@ -343,7 +343,7 @@
|
|||||||
"COMPLETE": "Abschließen",
|
"COMPLETE": "Abschließen",
|
||||||
"CANCEL": "Abbrechen",
|
"CANCEL": "Abbrechen",
|
||||||
"CLAIM": "Beanspruchen",
|
"CLAIM": "Beanspruchen",
|
||||||
"UNCLAIM": "Anspruch aufheben"
|
"UNCLAIM": "Freigeben "
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"COMPLETED_TASK": {
|
"COMPLETED_TASK": {
|
||||||
|
Reference in New Issue
Block a user