@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
|
@@ -12568,8 +12568,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/AtomBinder", "@web-atoms/co
|
|
|
12568
12568
|
return Suggestions.showModal(options);
|
|
12569
12569
|
}
|
|
12570
12570
|
function askSuggestionPopup(opener, items, itemRenderer, match, selectedItem) {
|
|
12571
|
-
const updateSearch =
|
|
12572
|
-
const itemsInOpener =
|
|
12571
|
+
const updateSearch = "search" in opener;
|
|
12572
|
+
const itemsInOpener = "items" in opener;
|
|
12573
12573
|
class Suggestions extends InlinePopup {
|
|
12574
12574
|
get items() {
|
|
12575
12575
|
return itemsInOpener ? this.opener.items : items;
|
|
@@ -20786,13 +20786,15 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "./styles/password-
|
|
|
20786
20786
|
function PasswordBox(_a) {
|
|
20787
20787
|
var {
|
|
20788
20788
|
placeholder,
|
|
20789
|
-
value
|
|
20789
|
+
value,
|
|
20790
|
+
autofocus
|
|
20790
20791
|
} = _a,
|
|
20791
|
-
a = __rest(_a, ["placeholder", "value"]);
|
|
20792
|
+
a = __rest(_a, ["placeholder", "value", "autofocus"]);
|
|
20792
20793
|
return XNode.create("div", Object.assign({
|
|
20793
20794
|
"data-password-box": "password-box"
|
|
20794
20795
|
}, a), XNode.create("input", {
|
|
20795
20796
|
placeholder: placeholder,
|
|
20797
|
+
autofocus: autofocus,
|
|
20796
20798
|
type: "password",
|
|
20797
20799
|
value: value
|
|
20798
20800
|
}), XNode.create("i", {
|
|
@@ -52679,10 +52681,10 @@ System.register(["tslib"], function (_export, _context) {
|
|
|
52679
52681
|
|
|
52680
52682
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/Modules");
|
|
52681
52683
|
|
|
52682
|
-
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) {
|
|
52684
|
+
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) {
|
|
52683
52685
|
"use strict";
|
|
52684
52686
|
|
|
52685
|
-
var __awaiter, ContentPage, XNode, apiPath, styled, Bind, Modules, App, PreviewDocument, installStyleSheet;
|
|
52687
|
+
var __awaiter, ContentPage, XNode, IconButton, apiPath, styled, Bind, Modules, App, Form, FormField, PasswordBox, PreviewDocument, installStyleSheet;
|
|
52686
52688
|
_export("default", void 0);
|
|
52687
52689
|
return {
|
|
52688
52690
|
setters: [function (_tslib) {
|
|
@@ -52691,6 +52693,8 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
52691
52693
|
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
52692
52694
|
}, function (_webAtomsCoreDistCoreXNode) {
|
|
52693
52695
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
52696
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
52697
|
+
IconButton = _commonControlsButtonsIconButton.IconButton;
|
|
52694
52698
|
}, function (_commonApiPath) {
|
|
52695
52699
|
apiPath = _commonApiPath.apiPath;
|
|
52696
52700
|
}, function (_webAtomsCoreDistStyleStyled) {
|
|
@@ -52701,6 +52705,12 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
52701
52705
|
Modules = _commonModules.default;
|
|
52702
52706
|
}, function (_webAtomsCoreDistApp) {
|
|
52703
52707
|
App = _webAtomsCoreDistApp.App;
|
|
52708
|
+
}, function (_webAtomsWebControlsDistBasicForm) {
|
|
52709
|
+
Form = _webAtomsWebControlsDistBasicForm.default;
|
|
52710
|
+
}, function (_webAtomsWebControlsDistBasicFormField) {
|
|
52711
|
+
FormField = _webAtomsWebControlsDistBasicFormField.default;
|
|
52712
|
+
}, function (_webAtomsWebControlsDistBasicPasswordBox) {
|
|
52713
|
+
PasswordBox = _webAtomsWebControlsDistBasicPasswordBox.default;
|
|
52704
52714
|
}],
|
|
52705
52715
|
execute: function () {
|
|
52706
52716
|
styled.css`
|
|
@@ -52848,6 +52858,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
52848
52858
|
constructor() {
|
|
52849
52859
|
super(...arguments);
|
|
52850
52860
|
this.scale = 1;
|
|
52861
|
+
this.password = "";
|
|
52851
52862
|
}
|
|
52852
52863
|
init() {
|
|
52853
52864
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -52857,6 +52868,7 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
52857
52868
|
fileContentID,
|
|
52858
52869
|
name
|
|
52859
52870
|
} = this.parameters;
|
|
52871
|
+
this.title = name;
|
|
52860
52872
|
const pdf = apiPath(`/api/files/pdf/${appFileID}/${fileContentID}/${name}/${name}.pdf`);
|
|
52861
52873
|
const downloadUrl = apiPath(`/api/files/download/${appFileID}/${fileContentID}/${name}`);
|
|
52862
52874
|
this.observer = new IntersectionObserver(entries => this.updateEntries(entries), {
|
|
@@ -52870,7 +52882,40 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
|
52870
52882
|
pdfjsLib
|
|
52871
52883
|
} = globalThis;
|
|
52872
52884
|
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://mozilla.github.io/pdf.js/build/pdf.worker.mjs';
|
|
52873
|
-
const
|
|
52885
|
+
const loaderTask = pdfjsLib.getDocument(pdf);
|
|
52886
|
+
let tries = 0;
|
|
52887
|
+
loaderTask.onPassword = (callback, reason) => {
|
|
52888
|
+
console.log(reason);
|
|
52889
|
+
tries++;
|
|
52890
|
+
if (tries > 3) {
|
|
52891
|
+
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
52892
|
+
"data-layout": "center-page-900px"
|
|
52893
|
+
}, "Failed..."));
|
|
52894
|
+
return;
|
|
52895
|
+
}
|
|
52896
|
+
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
52897
|
+
"data-layout": "center-page-900px"
|
|
52898
|
+
}, XNode.create(Form, {
|
|
52899
|
+
"event-submit-form": () => {
|
|
52900
|
+
const password = this.password;
|
|
52901
|
+
this.password = "";
|
|
52902
|
+
callback(password);
|
|
52903
|
+
}
|
|
52904
|
+
}, XNode.create("div", null, XNode.create("h4", {
|
|
52905
|
+
text: reason ? "Invalid Password, try again." : "Password is required to view this document."
|
|
52906
|
+
})), XNode.create(FormField, {
|
|
52907
|
+
label: "Password"
|
|
52908
|
+
}, XNode.create(PasswordBox, {
|
|
52909
|
+
type: "password",
|
|
52910
|
+
autofocus: true,
|
|
52911
|
+
value: Bind.twoWaysImmediate(() => this.password)
|
|
52912
|
+
})), XNode.create("div", null, XNode.create(IconButton, {
|
|
52913
|
+
type: "submit",
|
|
52914
|
+
disabled: Bind.oneWay(() => !this.password),
|
|
52915
|
+
text: "Open"
|
|
52916
|
+
})))));
|
|
52917
|
+
};
|
|
52918
|
+
const pdfDoc = yield loaderTask.promise;
|
|
52874
52919
|
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
52875
52920
|
class: "pdf-frame"
|
|
52876
52921
|
}, XNode.create("div", {
|