@social-mail/social-mail-client 1.2.306 → 1.2.308
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/AdminAppIndex.pack.js +52 -7
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +3 -3
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.js +2 -2
- package/dist/public/channel/ChannelView.pack.js.map +1 -1
- package/dist/public/store/Store.pack.js +2 -2
- package/dist/public/store/Store.pack.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +52 -7
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +3 -3
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/files/preview/document/PreviewPDF.d.ts +1 -0
- package/dist/web/page/files/preview/document/PreviewPDF.d.ts.map +1 -1
- package/dist/web/page/files/preview/document/PreviewPDF.js +46 -3
- package/dist/web/page/files/preview/document/PreviewPDF.js.map +1 -1
- package/node_modules/@web-atoms/web-controls/dist/basic/AtomRepeater.js +2 -2
- package/node_modules/@web-atoms/web-controls/dist/basic/AtomRepeater.js.map +1 -1
- package/node_modules/@web-atoms/web-controls/dist/basic/PasswordBox.d.ts +1 -1
- package/node_modules/@web-atoms/web-controls/dist/basic/PasswordBox.d.ts.map +1 -1
- package/node_modules/@web-atoms/web-controls/dist/basic/PasswordBox.js +4 -2
- package/node_modules/@web-atoms/web-controls/dist/basic/PasswordBox.js.map +1 -1
- package/node_modules/@web-atoms/web-controls/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@web-atoms/web-controls/package.json +1 -1
- package/node_modules/@web-atoms/web-controls/src/basic/PasswordBox.tsx +2 -0
- package/package.json +2 -2
- package/src/web/page/files/preview/document/PreviewPDF.tsx +54 -2
|
@@ -18868,8 +18868,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/AtomBinder", "@web-atoms/co
|
|
|
18868
18868
|
return Suggestions.showModal(options);
|
|
18869
18869
|
}
|
|
18870
18870
|
function askSuggestionPopup(opener, items, itemRenderer, match, selectedItem) {
|
|
18871
|
-
const updateSearch =
|
|
18872
|
-
const itemsInOpener =
|
|
18871
|
+
const updateSearch = "search" in opener;
|
|
18872
|
+
const itemsInOpener = "items" in opener;
|
|
18873
18873
|
class Suggestions extends InlinePopup {
|
|
18874
18874
|
get items() {
|
|
18875
18875
|
return itemsInOpener ? this.opener.items : items;
|
|
@@ -20950,13 +20950,15 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "./styles/password-
|
|
|
20950
20950
|
function PasswordBox(_a) {
|
|
20951
20951
|
var {
|
|
20952
20952
|
placeholder,
|
|
20953
|
-
value
|
|
20953
|
+
value,
|
|
20954
|
+
autofocus
|
|
20954
20955
|
} = _a,
|
|
20955
|
-
a = __rest(_a, ["placeholder", "value"]);
|
|
20956
|
+
a = __rest(_a, ["placeholder", "value", "autofocus"]);
|
|
20956
20957
|
return XNode.create("div", Object.assign({
|
|
20957
20958
|
"data-password-box": "password-box"
|
|
20958
20959
|
}, a), XNode.create("input", {
|
|
20959
20960
|
placeholder: placeholder,
|
|
20961
|
+
autofocus: autofocus,
|
|
20960
20962
|
type: "password",
|
|
20961
20963
|
value: value
|
|
20962
20964
|
}), XNode.create("i", {
|
|
@@ -35325,10 +35327,10 @@ System.register(["tslib"], function (_export, _context) {
|
|
|
35325
35327
|
|
|
35326
35328
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/Modules");
|
|
35327
35329
|
|
|
35328
|
-
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "../../../../../common/apiPath", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/core/Bind", "../../../../../common/Modules", "@web-atoms/core/dist/App"], function (_export, _context) {
|
|
35330
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "../../../../../common/controls/buttons/IconButton", "../../../../../common/apiPath", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/core/Bind", "../../../../../common/Modules", "@web-atoms/core/dist/App", "@web-atoms/web-controls/dist/basic/Form", "@web-atoms/web-controls/dist/basic/FormField", "@web-atoms/web-controls/dist/basic/PasswordBox"], function (_export, _context) {
|
|
35329
35331
|
"use strict";
|
|
35330
35332
|
|
|
35331
|
-
var __awaiter, ContentPage, XNode, apiPath, styled, Bind, Modules, App, PreviewDocument, installStyleSheet;
|
|
35333
|
+
var __awaiter, ContentPage, XNode, IconButton, apiPath, styled, Bind, Modules, App, Form, FormField, PasswordBox, PreviewDocument, installStyleSheet;
|
|
35332
35334
|
_export("default", void 0);
|
|
35333
35335
|
return {
|
|
35334
35336
|
setters: [function (_tslib) {
|
|
@@ -35337,6 +35339,8 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35337
35339
|
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
35338
35340
|
}, function (_webAtomsCoreDistCoreXNode) {
|
|
35339
35341
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
35342
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
35343
|
+
IconButton = _commonControlsButtonsIconButton.IconButton;
|
|
35340
35344
|
}, function (_commonApiPath) {
|
|
35341
35345
|
apiPath = _commonApiPath.apiPath;
|
|
35342
35346
|
}, function (_webAtomsCoreDistStyleStyled) {
|
|
@@ -35347,6 +35351,12 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35347
35351
|
Modules = _commonModules.default;
|
|
35348
35352
|
}, function (_webAtomsCoreDistApp) {
|
|
35349
35353
|
App = _webAtomsCoreDistApp.App;
|
|
35354
|
+
}, function (_webAtomsWebControlsDistBasicForm) {
|
|
35355
|
+
Form = _webAtomsWebControlsDistBasicForm.default;
|
|
35356
|
+
}, function (_webAtomsWebControlsDistBasicFormField) {
|
|
35357
|
+
FormField = _webAtomsWebControlsDistBasicFormField.default;
|
|
35358
|
+
}, function (_webAtomsWebControlsDistBasicPasswordBox) {
|
|
35359
|
+
PasswordBox = _webAtomsWebControlsDistBasicPasswordBox.default;
|
|
35350
35360
|
}],
|
|
35351
35361
|
execute: function () {
|
|
35352
35362
|
styled.css`
|
|
@@ -35494,6 +35504,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35494
35504
|
constructor() {
|
|
35495
35505
|
super(...arguments);
|
|
35496
35506
|
this.scale = 1;
|
|
35507
|
+
this.password = "";
|
|
35497
35508
|
}
|
|
35498
35509
|
init() {
|
|
35499
35510
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -35503,6 +35514,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35503
35514
|
fileContentID,
|
|
35504
35515
|
name
|
|
35505
35516
|
} = this.parameters;
|
|
35517
|
+
this.title = name;
|
|
35506
35518
|
const pdf = apiPath(`/api/files/pdf/${appFileID}/${fileContentID}/${name}/${name}.pdf`);
|
|
35507
35519
|
const downloadUrl = apiPath(`/api/files/download/${appFileID}/${fileContentID}/${name}`);
|
|
35508
35520
|
this.observer = new IntersectionObserver(entries => this.updateEntries(entries), {
|
|
@@ -35516,7 +35528,40 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
35516
35528
|
pdfjsLib
|
|
35517
35529
|
} = globalThis;
|
|
35518
35530
|
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://mozilla.github.io/pdf.js/build/pdf.worker.mjs';
|
|
35519
|
-
const
|
|
35531
|
+
const loaderTask = pdfjsLib.getDocument(pdf);
|
|
35532
|
+
let tries = 0;
|
|
35533
|
+
loaderTask.onPassword = (callback, reason) => {
|
|
35534
|
+
console.log(reason);
|
|
35535
|
+
tries++;
|
|
35536
|
+
if (tries > 3) {
|
|
35537
|
+
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
35538
|
+
"data-layout": "center-page-900px"
|
|
35539
|
+
}, "Failed..."));
|
|
35540
|
+
return;
|
|
35541
|
+
}
|
|
35542
|
+
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
35543
|
+
"data-layout": "center-page-900px"
|
|
35544
|
+
}, XNode.create(Form, {
|
|
35545
|
+
"event-submit-form": () => {
|
|
35546
|
+
const password = this.password;
|
|
35547
|
+
this.password = "";
|
|
35548
|
+
callback(password);
|
|
35549
|
+
}
|
|
35550
|
+
}, XNode.create("div", null, XNode.create("h4", {
|
|
35551
|
+
text: reason ? "Invalid Password, try again." : "Password is required to view this document."
|
|
35552
|
+
})), XNode.create(FormField, {
|
|
35553
|
+
label: "Password"
|
|
35554
|
+
}, XNode.create(PasswordBox, {
|
|
35555
|
+
type: "password",
|
|
35556
|
+
autofocus: true,
|
|
35557
|
+
value: Bind.twoWaysImmediate(() => this.password)
|
|
35558
|
+
})), XNode.create("div", null, XNode.create(IconButton, {
|
|
35559
|
+
type: "submit",
|
|
35560
|
+
disabled: Bind.oneWay(() => !this.password),
|
|
35561
|
+
text: "Open"
|
|
35562
|
+
})))));
|
|
35563
|
+
};
|
|
35564
|
+
const pdfDoc = yield loaderTask.promise;
|
|
35520
35565
|
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
35521
35566
|
class: "pdf-frame"
|
|
35522
35567
|
}, XNode.create("div", {
|