mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-4539] Make ms-office as secondary point of aca-content (#3180)
* [ACS-4539] Make ms-office as secondary point of aca-content * [ACA-4539] Fix tsconfig path * [ACS-4539] Run ms-office unit tests as part of aca-content
This commit is contained in:
177
projects/aca-content/ms-office/LICENSE
Normal file
177
projects/aca-content/ms-office/LICENSE
Normal file
@@ -0,0 +1,177 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
74
projects/aca-content/ms-office/assets/aos.plugin.json
Normal file
74
projects/aca-content/ms-office/assets/aos.plugin.json
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"$schema": "../../../../extension.schema.json",
|
||||
"$id": "9a635542-d87a-4558-ae64-ffa199d1a364",
|
||||
"$version": "0.0.10",
|
||||
"$name": "Edit in Office",
|
||||
"$description": "Extension that provides Office Edit Online Action",
|
||||
"$vendor": "Hyland Software, Inc. and its affiliates",
|
||||
"$license": "LGPL-3.0",
|
||||
|
||||
"actions": [
|
||||
{
|
||||
"id": "aos.openWith.office",
|
||||
"type": "AOS_ACTION",
|
||||
"payload": "$(context.selection.first.entry)"
|
||||
}
|
||||
],
|
||||
|
||||
"features": {
|
||||
"toolbar": [
|
||||
{
|
||||
"id": "app.toolbar.more",
|
||||
"children": [
|
||||
{
|
||||
"id": "aos.toolbar.openWith.office",
|
||||
"order": 90,
|
||||
"icon": "edit",
|
||||
"title": "AOS.ACTION_TITLE",
|
||||
"actions": {
|
||||
"click": "aos.openWith.office"
|
||||
},
|
||||
"rules": {
|
||||
"visible": "aos.canOpenWithOffice"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"contextMenu": [
|
||||
{
|
||||
"id": "aos.context.openWith.office",
|
||||
"order": 450,
|
||||
"icon": "edit",
|
||||
"title": "AOS.ACTION_TITLE",
|
||||
"actions": {
|
||||
"click": "aos.openWith.office"
|
||||
},
|
||||
"rules": {
|
||||
"visible": "aos.canOpenWithOffice"
|
||||
}
|
||||
}
|
||||
],
|
||||
"viewer": {
|
||||
"toolbarActions": [
|
||||
{
|
||||
"id": "app.viewer.toolbar.more",
|
||||
"children": [
|
||||
{
|
||||
"id": "aos.viewer.openWith.office",
|
||||
"order": 1,
|
||||
"icon": "edit",
|
||||
"title": "AOS.ACTION_TITLE",
|
||||
"actions": {
|
||||
"click": "aos.openWith.office"
|
||||
},
|
||||
"rules": {
|
||||
"visible": "aos.canOpenWithOffice"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/ar.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/ar.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "تحرير في ™Microsoft Office",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "مدعوم فقط لأنظمة Windows و MacOS",
|
||||
"ALREADY_LOCKED": "المستند '{{nodeId}}' مؤمن بواسطة '{{lockOwner}}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "لم يتم العثور على معالج بروتوكول لـ '{{nodeName}}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/cs.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/cs.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Upraveno v: Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Podporováno pouze pro platformy Windows a MacOS",
|
||||
"ALREADY_LOCKED": "Dokument ,{{ nodeId }}‘ uzamkl uživatel ,{{ lockOwner }}‘",
|
||||
"MISSING_PROTOCOL_HANDLER": "Pro ,{{ nodeName }}‘ nebyla nalezena žádná obslužná rutina protokolu"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/da.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/da.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Rediger i Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Kun understøttet til Windows- og MacOS-platforme",
|
||||
"ALREADY_LOCKED": "Dokumentet \"{{ nodeId }}\" er låst af \"{{ lockOwner }}",
|
||||
"MISSING_PROTOCOL_HANDLER": "Ingen protokolhåndtering fundet for '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/de.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/de.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "In Microsoft Office™ bearbeiten",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Nur für die Plattformen Windows und MacOS unterstützt",
|
||||
"ALREADY_LOCKED": "Dokument '{{ nodeId }}' ist gesperrt durch '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "Kein Protokoll-Handler für '{{ nodeName }}' gefunden"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/en.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/en.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Edit in Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Only supported for Windows and MacOS platforms",
|
||||
"ALREADY_LOCKED": "Document '{{ nodeId }}' is locked by '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "No protocol handler found for '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/es.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/es.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Editar en Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Solo compatible con plataformas Windows y MacOS",
|
||||
"ALREADY_LOCKED": "El documento '{{ nodeId }}' esta bloqueado por '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "No se encontró ningún controlador de protocolo para '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/fi.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/fi.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Muokkaa Microsoft Office™ -sovelluksessa",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Tuetaan vain Windows- ja MacOS-alustoilla",
|
||||
"ALREADY_LOCKED": "Asiakirja '{{ nodeId }}' on lukittu, lukinnut '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "Protokollan käsittelijää ei löydy kohteelle '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/fr.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/fr.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Modifier dans Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Seulement prise en charge sur les plateformes Windows et MacOS",
|
||||
"ALREADY_LOCKED": "Le document '{{ nodeId }}' est verrouillé par '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "Aucun gestionnaire de protocole trouvé pour '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/it.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/it.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Modifica in Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Supportato solo nelle piattaforme Windows e MacOS",
|
||||
"ALREADY_LOCKED": "Il documento '{{ nodeId }}' è bloccato da '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "Impossibile trovare un gestore di protocollo per '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/ja.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/ja.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Microsoft Office™ で編集",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "WindowsおよびMacOSプラットフォームのみ対応",
|
||||
"ALREADY_LOCKED": "ドキュメント'{{ nodeId }}'は、'{{ lockOwner }}'によってロックされています",
|
||||
"MISSING_PROTOCOL_HANDLER": "'{{ nodeName }}'のプロトコルハンドラーが見つかりませんでした"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/nb.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/nb.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Rediger i Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Støttes kun for Windows og MacOS",
|
||||
"ALREADY_LOCKED": "Dokument «{{ nodeId }}» er låst av «{{ lockOwner }}»",
|
||||
"MISSING_PROTOCOL_HANDLER": "Fant ingen protokollhåndtering for «{{ nodeName }}»"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/nl.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/nl.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Bewerken in Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Alleen ondersteund voor Windows- en MacOS-platforms",
|
||||
"ALREADY_LOCKED": "Document '{{ nodeId }}' is vergrendeld door '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "Geen protocolhandler gevonden voor '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/pl.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/pl.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Edytuj w programie Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Obsługiwane tylko dla platform Windows i MacOS",
|
||||
"ALREADY_LOCKED": "Dokument \"{{ nodeId }}\" jest zablokowany przez \"{{ lockOwner }}",
|
||||
"MISSING_PROTOCOL_HANDLER": "Nie znaleziono procedury obsługi protokołu dla „{{ nodeName }}”"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/pt-BR.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/pt-BR.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Editar no Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Somente suportado para plataformas Windows e MacOS",
|
||||
"ALREADY_LOCKED": "O documento '{{ nodeId }}' está bloqueado por '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "Nenhum manipulador de protocolo encontrado para '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/ru.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/ru.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Редактировать в Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Поддерживается только для платформ Windows и MacOS",
|
||||
"ALREADY_LOCKED": "Документ '{{ nodeId }}' блокирован пользователем '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "Не найден обработчик протокола для '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/sv.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/sv.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "Redigera i Microsoft Office™",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "Stöds endast för Windows- och MacOS-plattformar",
|
||||
"ALREADY_LOCKED": "Dokumentet '{{ nodeId }}' är låst av '{{ lockOwner }}'",
|
||||
"MISSING_PROTOCOL_HANDLER": "Ingen protokollhanterare hittades för '{{ nodeName }}'"
|
||||
}
|
||||
}
|
||||
}
|
10
projects/aca-content/ms-office/assets/i18n/zh-CN.json
Normal file
10
projects/aca-content/ms-office/assets/i18n/zh-CN.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"AOS": {
|
||||
"ACTION_TITLE": "在 Microsoft Office™ 中编辑",
|
||||
"ERRORS": {
|
||||
"UNSUPPORTED_PLATFORM": "仅支持 Windows 和 MacOS 平台",
|
||||
"ALREADY_LOCKED": "文档 '{{ nodeId }}' 被 '{{ lockOwner }}' 锁定",
|
||||
"MISSING_PROTOCOL_HANDLER": "找不到 '{{ nodeName }}' 的协议处理程序"
|
||||
}
|
||||
}
|
||||
}
|
5
projects/aca-content/ms-office/ng-package.json
Normal file
5
projects/aca-content/ms-office/ng-package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
33
projects/aca-content/ms-office/src/actions/aos.actions.ts
Executable file
33
projects/aca-content/ms-office/src/actions/aos.actions.ts
Executable file
@@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Action } from '@ngrx/store';
|
||||
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||
|
||||
export const AOS_ACTION = 'AOS_ACTION';
|
||||
|
||||
export class AosAction implements Action {
|
||||
readonly type = AOS_ACTION;
|
||||
constructor(public payload: MinimalNodeEntryEntity) {}
|
||||
}
|
44
projects/aca-content/ms-office/src/aos-extension.module.ts
Normal file
44
projects/aca-content/ms-office/src/aos-extension.module.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ExtensionService, provideExtensionConfig } from '@alfresco/adf-extensions';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import { AosEffects } from './effects/aos.effects';
|
||||
import { TranslationService } from '@alfresco/adf-core';
|
||||
import { AlfrescoOfficeExtensionService } from '@alfresco/aca-shared';
|
||||
import { canOpenWithOffice } from '@alfresco/aca-shared/rules';
|
||||
|
||||
@NgModule({
|
||||
imports: [EffectsModule.forFeature([AosEffects])],
|
||||
providers: [provideExtensionConfig(['aos.plugin.json'])]
|
||||
})
|
||||
export class AosExtensionModule {
|
||||
constructor(extensions: ExtensionService, translation: TranslationService, aosService: AlfrescoOfficeExtensionService) {
|
||||
translation.addTranslationFolder('ms-office', 'assets/ms-office');
|
||||
extensions.setEvaluators({
|
||||
'aos.canOpenWithOffice': (context) => aosService.isAosPluginEnabled() && canOpenWithOffice(context)
|
||||
});
|
||||
}
|
||||
}
|
155
projects/aca-content/ms-office/src/aos-extension.service.spec.ts
Normal file
155
projects/aca-content/ms-office/src/aos-extension.service.spec.ts
Normal file
@@ -0,0 +1,155 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { AosEditOnlineService } from './aos-extension.service';
|
||||
import { AppConfigService, AuthenticationService, CoreModule, LogService, NotificationService } from '@alfresco/adf-core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
|
||||
describe('AosEditOnlineService', () => {
|
||||
let aosEditOnlineService: AosEditOnlineService;
|
||||
let notificationService: NotificationService;
|
||||
let authenticationService: AuthenticationService;
|
||||
let appConfigService: AppConfigService;
|
||||
let userAgent: jasmine.Spy;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [NoopAnimationsModule, TranslateModule.forRoot(), CoreModule.forRoot()],
|
||||
providers: [{ provide: LogService, useValue: { error() {} } }]
|
||||
});
|
||||
|
||||
aosEditOnlineService = TestBed.inject(AosEditOnlineService);
|
||||
notificationService = TestBed.inject(NotificationService);
|
||||
authenticationService = TestBed.inject(AuthenticationService);
|
||||
appConfigService = TestBed.inject(AppConfigService);
|
||||
|
||||
spyOn(authenticationService, 'getEcmUsername').and.returnValue('user1');
|
||||
spyOn(appConfigService, 'get').and.returnValue('http://localhost:3000');
|
||||
userAgent = spyOnProperty(navigator, 'userAgent').and.returnValue('mac');
|
||||
});
|
||||
|
||||
it('should raise error if file is already locked by another user', () => {
|
||||
const showError = spyOn(notificationService, 'showError').and.stub();
|
||||
const node: any = {
|
||||
id: 'node1',
|
||||
isFile: true,
|
||||
isLocked: true,
|
||||
properties: {
|
||||
'cm:lockType': 'WRITE_LOCK',
|
||||
'cm:lockOwner': { id: 'user2' }
|
||||
}
|
||||
};
|
||||
|
||||
aosEditOnlineService.onActionEditOnlineAos(node);
|
||||
expect(showError).toHaveBeenCalledWith(`AOS.ERRORS.ALREADY_LOCKED`, null, { nodeId: 'node1', lockOwner: 'user2' });
|
||||
});
|
||||
|
||||
it('should open document if locked by the owner', () => {
|
||||
const openByUrl = spyOn(aosEditOnlineService, 'openByUrl').and.stub();
|
||||
|
||||
const node: any = {
|
||||
id: 'node1',
|
||||
name: 'file.docx',
|
||||
isFile: true,
|
||||
isLocked: true,
|
||||
properties: {
|
||||
'cm:lockType': 'READ_ONLY_LOCK',
|
||||
'cm:lockOwner': { id: 'user1' }
|
||||
}
|
||||
};
|
||||
|
||||
aosEditOnlineService.onActionEditOnlineAos(node);
|
||||
// eslint-disable-next-line @cspell/spellchecker
|
||||
expect(openByUrl).toHaveBeenCalledWith('ms-word', 'http://localhost:3000/Company Home/_aos_nodeid/node1/file.docx');
|
||||
});
|
||||
|
||||
it('should open document for node with 1 path segment', () => {
|
||||
const openByUrl = spyOn(aosEditOnlineService, 'openByUrl').and.stub();
|
||||
|
||||
const node: any = {
|
||||
id: 'node1',
|
||||
name: 'file.docx',
|
||||
isFile: true,
|
||||
isLocked: false,
|
||||
path: {
|
||||
elements: [{ name: 'folder1' }]
|
||||
},
|
||||
properties: {}
|
||||
};
|
||||
|
||||
aosEditOnlineService.onActionEditOnlineAos(node);
|
||||
expect(openByUrl).toHaveBeenCalledWith('ms-word', 'http://localhost:3000/file.docx');
|
||||
});
|
||||
|
||||
it('should open document for node with multiple path segments', () => {
|
||||
const openByUrl = spyOn(aosEditOnlineService, 'openByUrl').and.stub();
|
||||
|
||||
const node: any = {
|
||||
id: 'node1',
|
||||
name: 'file.docx',
|
||||
isFile: true,
|
||||
isLocked: false,
|
||||
path: {
|
||||
elements: [{ name: 'parent' }, { name: 'child' }]
|
||||
},
|
||||
properties: {}
|
||||
};
|
||||
|
||||
aosEditOnlineService.onActionEditOnlineAos(node);
|
||||
expect(openByUrl).toHaveBeenCalledWith('ms-word', 'http://localhost:3000/child/_aos_nodeid/node1/file.docx');
|
||||
});
|
||||
|
||||
it('should raise error when protocol handler is not supported', () => {
|
||||
const showError = spyOn(notificationService, 'showError').and.stub();
|
||||
|
||||
const node: any = {
|
||||
id: 'node1',
|
||||
name: 'file.txt',
|
||||
isFile: true,
|
||||
isLocked: false,
|
||||
properties: {}
|
||||
};
|
||||
|
||||
aosEditOnlineService.onActionEditOnlineAos(node);
|
||||
expect(showError).toHaveBeenCalledWith('AOS.ERRORS.MISSING_PROTOCOL_HANDLER', null, { nodeName: 'file.txt' });
|
||||
});
|
||||
|
||||
it('should raise error for unsupported platform', () => {
|
||||
const showError = spyOn(notificationService, 'showError').and.stub();
|
||||
userAgent.and.returnValue('unknown');
|
||||
|
||||
const node: any = {
|
||||
id: 'node1',
|
||||
name: 'file.docx',
|
||||
isFile: true,
|
||||
isLocked: false,
|
||||
properties: {}
|
||||
};
|
||||
|
||||
aosEditOnlineService.onActionEditOnlineAos(node);
|
||||
expect(showError).toHaveBeenCalledWith('AOS.ERRORS.UNSUPPORTED_PLATFORM');
|
||||
});
|
||||
});
|
151
projects/aca-content/ms-office/src/aos-extension.service.ts
Normal file
151
projects/aca-content/ms-office/src/aos-extension.service.ts
Normal file
@@ -0,0 +1,151 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* cspell:disable */
|
||||
import { AppConfigService, AuthenticationService, LogService, NotificationService } from '@alfresco/adf-core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||
import { getFileExtension, supportedExtensions } from '@alfresco/aca-shared/rules';
|
||||
|
||||
export interface IAosEditOnlineService {
|
||||
onActionEditOnlineAos(node: MinimalNodeEntryEntity): void;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AosEditOnlineService implements IAosEditOnlineService {
|
||||
constructor(
|
||||
private authenticationService: AuthenticationService,
|
||||
private appConfigService: AppConfigService,
|
||||
private notificationService: NotificationService,
|
||||
private logService: LogService
|
||||
) {}
|
||||
|
||||
onActionEditOnlineAos(node: MinimalNodeEntryEntity): void {
|
||||
if (node && this.isFile(node) && node.properties) {
|
||||
if (node.isLocked) {
|
||||
// const checkedOut = node.aspectNames.find(
|
||||
// (aspect: string) => aspect === 'cm:checkedOut'
|
||||
// );
|
||||
const checkedOut = node.properties['cm:lockType'] === 'WRITE_LOCK' || node.properties['cm:lockType'] === 'READ_ONLY_LOCK';
|
||||
const lockOwner = node.properties['cm:lockOwner'];
|
||||
const differentLockOwner = lockOwner.id !== this.authenticationService.getEcmUsername();
|
||||
|
||||
if (checkedOut && differentLockOwner) {
|
||||
this.onAlreadyLockedNotification(node.id, lockOwner.id);
|
||||
} else {
|
||||
this.triggerEditOnlineAos(node);
|
||||
}
|
||||
} else {
|
||||
this.triggerEditOnlineAos(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private getUserAgent(): string {
|
||||
return navigator.userAgent.toLowerCase();
|
||||
}
|
||||
|
||||
private isWindows(): boolean {
|
||||
return this.getUserAgent().indexOf('win') !== -1;
|
||||
}
|
||||
|
||||
private isMacOs(): boolean {
|
||||
return this.getUserAgent().indexOf('mac') !== -1;
|
||||
}
|
||||
|
||||
private onAlreadyLockedNotification(nodeId: string, lockOwner: string) {
|
||||
this.logService.error('Document already locked by another user');
|
||||
this.notificationService.showError(`AOS.ERRORS.ALREADY_LOCKED`, null, {
|
||||
nodeId,
|
||||
lockOwner
|
||||
});
|
||||
}
|
||||
|
||||
private getProtocolForFileExtension(fileExtension: string) {
|
||||
return fileExtension && supportedExtensions[fileExtension];
|
||||
}
|
||||
|
||||
private triggerEditOnlineAos(node: MinimalNodeEntryEntity): void {
|
||||
const aosHost = this.appConfigService.get('aosHost');
|
||||
let url: string;
|
||||
const pathElements = (node.path?.elements || []).map((segment) => segment.name);
|
||||
|
||||
if (!pathElements.length) {
|
||||
url = `${aosHost}/Company Home/_aos_nodeid/${this.getNodeId(node)}/${encodeURIComponent(node.name)}`;
|
||||
}
|
||||
|
||||
if (pathElements.length === 1) {
|
||||
url = `${aosHost}/${encodeURIComponent(node.name)}`;
|
||||
}
|
||||
|
||||
if (pathElements.length > 1) {
|
||||
const root = pathElements[1];
|
||||
url = `${aosHost}/${root}/_aos_nodeid/${this.getNodeId(node)}/${encodeURIComponent(node.name)}`;
|
||||
}
|
||||
|
||||
const fileExtension = getFileExtension(node.name);
|
||||
const protocolHandler = this.getProtocolForFileExtension(fileExtension);
|
||||
|
||||
if (protocolHandler === undefined) {
|
||||
this.logService.error('Protocol handler missing');
|
||||
this.notificationService.showError(`AOS.ERRORS.MISSING_PROTOCOL_HANDLER`, null, { nodeName: node.name });
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.isWindows() && !this.isMacOs()) {
|
||||
this.logService.error('Unsupported platform');
|
||||
this.notificationService.showError('AOS.ERRORS.UNSUPPORTED_PLATFORM');
|
||||
} else {
|
||||
this.openByUrl(protocolHandler, url);
|
||||
}
|
||||
}
|
||||
|
||||
openByUrl(protocolHandler: string, url: string) {
|
||||
const finalUrl = protocolHandler + ':ofe%7Cu%7C' + url;
|
||||
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.style.display = 'none';
|
||||
iframe.src = finalUrl;
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
setTimeout(() => {
|
||||
if (iframe) {
|
||||
document.body.removeChild(iframe);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
private isFile(node: MinimalNodeEntryEntity): boolean {
|
||||
const implicitFile = (node as any).nodeId || (node as any).guid;
|
||||
|
||||
return !!implicitFile || node.isFile;
|
||||
}
|
||||
|
||||
private getNodeId(node: MinimalNodeEntryEntity): string {
|
||||
return (node as any).nodeId || (node as any).guid || node.id;
|
||||
}
|
||||
}
|
71
projects/aca-content/ms-office/src/effects/aos.effects.spec.ts
Executable file
71
projects/aca-content/ms-office/src/effects/aos.effects.spec.ts
Executable file
@@ -0,0 +1,71 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { provideMockActions } from '@ngrx/effects/testing';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { AosAction } from '../actions/aos.actions';
|
||||
import { AosEditOnlineService, IAosEditOnlineService } from '../aos-extension.service';
|
||||
import { AosEffects } from './aos.effects';
|
||||
|
||||
class AosEditOnlineServiceMock implements IAosEditOnlineService {
|
||||
onActionEditOnlineAos(_node: MinimalNodeEntryEntity): void {}
|
||||
}
|
||||
|
||||
describe('AosEffects', () => {
|
||||
let aosActions$: Observable<AosAction>;
|
||||
let effects: AosEffects;
|
||||
let aosEditOnlineServiceMock: AosEditOnlineServiceMock;
|
||||
|
||||
beforeEach(() => {
|
||||
aosActions$ = new Observable<AosAction>();
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
providers: [
|
||||
{
|
||||
provide: AosEditOnlineService,
|
||||
useClass: AosEditOnlineServiceMock
|
||||
},
|
||||
provideMockActions(() => aosActions$),
|
||||
AosEffects
|
||||
]
|
||||
});
|
||||
|
||||
effects = TestBed.inject(AosEffects);
|
||||
aosEditOnlineServiceMock = TestBed.inject(AosEditOnlineService);
|
||||
});
|
||||
|
||||
it('should call onActionEditOnlineAos on AOS_ACTION', () => {
|
||||
const onActionEditOnlineAosSpy = spyOn(aosEditOnlineServiceMock, 'onActionEditOnlineAos');
|
||||
|
||||
const payload = new MinimalNodeEntryEntity();
|
||||
const action = new AosAction(payload);
|
||||
aosActions$ = of(action);
|
||||
|
||||
effects.openOffice$.subscribe(() => {});
|
||||
|
||||
expect(onActionEditOnlineAosSpy).toHaveBeenCalledWith(payload);
|
||||
});
|
||||
});
|
48
projects/aca-content/ms-office/src/effects/aos.effects.ts
Executable file
48
projects/aca-content/ms-office/src/effects/aos.effects.ts
Executable file
@@ -0,0 +1,48 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { AOS_ACTION, AosAction } from '../actions/aos.actions';
|
||||
import { AosEditOnlineService } from '../aos-extension.service';
|
||||
|
||||
@Injectable()
|
||||
export class AosEffects {
|
||||
constructor(private actions$: Actions, private aosEditOnlineService: AosEditOnlineService) {}
|
||||
|
||||
openOffice$ = createEffect(
|
||||
() =>
|
||||
this.actions$.pipe(
|
||||
ofType<AosAction>(AOS_ACTION),
|
||||
map((action) => {
|
||||
if (action.payload) {
|
||||
this.aosEditOnlineService.onActionEditOnlineAos(action.payload);
|
||||
}
|
||||
})
|
||||
),
|
||||
{ dispatch: false }
|
||||
);
|
||||
}
|
29
projects/aca-content/ms-office/src/public-api.ts
Normal file
29
projects/aca-content/ms-office/src/public-api.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export * from './aos-extension.service';
|
||||
export * from './actions/aos.actions';
|
||||
export * from './effects/aos.effects';
|
||||
|
||||
export * from './aos-extension.module';
|
@@ -12,6 +12,7 @@
|
||||
"output": "ui"
|
||||
},
|
||||
"about/assets",
|
||||
"ms-office/assets",
|
||||
"assets"
|
||||
]
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "aca-content",
|
||||
"projectType": "library",
|
||||
"sourceRoot": "projects/aca-content/src",
|
||||
"sourceRoot": "projects/aca-content",
|
||||
"prefix": "lib",
|
||||
"targets": {
|
||||
"build": {
|
||||
@@ -27,7 +27,7 @@
|
||||
"executor": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"codeCoverage": true,
|
||||
"main": "projects/aca-content/src/test.ts",
|
||||
"main": "projects/aca-content/test.ts",
|
||||
"tsConfig": "projects/aca-content/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/aca-content/karma.conf.js",
|
||||
"styles": [
|
||||
|
@@ -9,7 +9,7 @@
|
||||
"types": []
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts"
|
||||
"test.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
|
@@ -8,7 +8,7 @@
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts"
|
||||
"test.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
|
Reference in New Issue
Block a user