eiam-user-preference 0.0.73 → 0.0.74
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/cjs/eiam-user-preference.cjs.entry.js +4 -4
- package/dist/cjs/eiam-user-preference.entry.cjs.js.map +1 -1
- package/dist/collection/components/eiam-user-preference/eiam-user-preference.css +130 -0
- package/dist/collection/components/eiam-user-preference/eiam-user-preference.js +3 -3
- package/dist/collection/components/eiam-user-preference/eiam-user-preference.js.map +1 -1
- package/dist/components/eiam-user-preference.js +4 -4
- package/dist/components/eiam-user-preference.js.map +1 -1
- package/dist/eiam-user-preference/eiam-user-preference.entry.esm.js.map +1 -1
- package/dist/eiam-user-preference/eiam-user-preference.esm.js +1 -1
- package/dist/eiam-user-preference/p-62f9de1c.entry.js +2 -0
- package/dist/eiam-user-preference/p-62f9de1c.entry.js.map +1 -0
- package/dist/esm/eiam-user-preference.entry.js +4 -4
- package/dist/esm/eiam-user-preference.entry.js.map +1 -1
- package/package.json +1 -1
- package/dist/eiam-user-preference/p-c1c7a822.entry.js +0 -2
- package/dist/eiam-user-preference/p-c1c7a822.entry.js.map +0 -1
|
@@ -807,3 +807,133 @@ select {
|
|
|
807
807
|
color: #333;
|
|
808
808
|
}
|
|
809
809
|
|
|
810
|
+
.modal-dialog {
|
|
811
|
+
max-width: 420px !important;
|
|
812
|
+
width: 90vw !important;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.modal-inner {
|
|
816
|
+
padding: 8px 4px;
|
|
817
|
+
display: flex;
|
|
818
|
+
flex-direction: column;
|
|
819
|
+
gap: 12px;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
.form-label {
|
|
823
|
+
display: flex;
|
|
824
|
+
align-items: center;
|
|
825
|
+
gap: 6px;
|
|
826
|
+
font-weight: 500;
|
|
827
|
+
font-size: 13px;
|
|
828
|
+
color: #005b88;
|
|
829
|
+
margin-bottom: 5px;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.form-select {
|
|
833
|
+
width: 100%;
|
|
834
|
+
padding: 7px 10px;
|
|
835
|
+
border: 1.5px solid #c8dfe8;
|
|
836
|
+
border-radius: 7px;
|
|
837
|
+
font-size: 13px;
|
|
838
|
+
outline: none;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.form-select:focus {
|
|
842
|
+
border-color: #005b88;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.section-divider {
|
|
846
|
+
display: flex;
|
|
847
|
+
align-items: center;
|
|
848
|
+
gap: 7px;
|
|
849
|
+
font-weight: 500;
|
|
850
|
+
font-size: 13px;
|
|
851
|
+
color: #005b88;
|
|
852
|
+
border-bottom: 1.5px solid #e0eef4;
|
|
853
|
+
padding-bottom: 7px;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.pages-list {
|
|
857
|
+
display: flex;
|
|
858
|
+
flex-direction: column;
|
|
859
|
+
gap: 5px;
|
|
860
|
+
max-height: 220px;
|
|
861
|
+
overflow-y: auto;
|
|
862
|
+
overflow-x: hidden;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.page-item {
|
|
866
|
+
display: flex;
|
|
867
|
+
align-items: center;
|
|
868
|
+
gap: 8px;
|
|
869
|
+
padding: 8px 10px;
|
|
870
|
+
border: 1.5px solid #e0eef4;
|
|
871
|
+
border-radius: 7px;
|
|
872
|
+
cursor: pointer;
|
|
873
|
+
transition: background 0.15s, border-color 0.15s;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
.page-item:hover {
|
|
877
|
+
background: #f0f8fc;
|
|
878
|
+
border-color: #005b88;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
.page-icon { flex-shrink: 0; }
|
|
882
|
+
|
|
883
|
+
.page-info {
|
|
884
|
+
flex: 1;
|
|
885
|
+
display: flex;
|
|
886
|
+
align-items: center;
|
|
887
|
+
gap: 7px;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
.page-name {
|
|
891
|
+
font-weight: 600;
|
|
892
|
+
font-size: 13px;
|
|
893
|
+
color: #222;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.culture-badge {
|
|
897
|
+
font-size: 10px;
|
|
898
|
+
padding: 2px 6px;
|
|
899
|
+
border-radius: 10px;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
.culture-published { background: #e6f4ea; color: #2e7d32; }
|
|
903
|
+
.culture-unpublished { background: #fff3e0; color: #e65100; }
|
|
904
|
+
|
|
905
|
+
.page-arrow { flex-shrink: 0; opacity: 0.35; }
|
|
906
|
+
.page-item:hover .page-arrow { opacity: 1; }
|
|
907
|
+
|
|
908
|
+
.empty-pages {
|
|
909
|
+
display: flex;
|
|
910
|
+
flex-direction: column;
|
|
911
|
+
align-items: center;
|
|
912
|
+
gap: 8px;
|
|
913
|
+
padding: 20px;
|
|
914
|
+
color: #aaa;
|
|
915
|
+
font-size: 12px;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.pagination-controls {
|
|
919
|
+
display: flex;
|
|
920
|
+
align-items: center;
|
|
921
|
+
justify-content: center;
|
|
922
|
+
gap: 14px;
|
|
923
|
+
padding-top: 8px;
|
|
924
|
+
border-top: 1px solid #e0eef4;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
.page-counter { font-size: 12px; color: #555; }
|
|
928
|
+
|
|
929
|
+
.arrow-button {
|
|
930
|
+
background: none;
|
|
931
|
+
border: 1.5px solid #c8dfe8;
|
|
932
|
+
border-radius: 6px;
|
|
933
|
+
padding: 3px 7px;
|
|
934
|
+
cursor: pointer;
|
|
935
|
+
color: #005b88;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.arrow-button:hover:not(:disabled) { background: #e8f4fb; }
|
|
939
|
+
.arrow-button:disabled { opacity: 0.35; cursor: not-allowed; }
|
|
@@ -166,7 +166,7 @@ export class EiamUserPreference {
|
|
|
166
166
|
});
|
|
167
167
|
const data = await response.json();
|
|
168
168
|
if (data && Array.isArray(data.content)) {
|
|
169
|
-
this.userApplications = data.content;
|
|
169
|
+
this.userApplications = data.content.filter(el => el.applicationId !== 1);
|
|
170
170
|
}
|
|
171
171
|
else {
|
|
172
172
|
// console.error('Invalid response structure:', data);
|
|
@@ -301,10 +301,10 @@ export class EiamUserPreference {
|
|
|
301
301
|
return Math.ceil(this.pages.length / this.pageSize);
|
|
302
302
|
}
|
|
303
303
|
render() {
|
|
304
|
-
return (h(Host, { key: '3710bcae6706b252d25e3a19927ba6ef8104fbf1' }, h("div", { key: 'fdae88436c85d6b0d9df71b577d340eee53f932c', class: "container" }, h("svg", { key: '8cbafa10960552c89590fd31f34534404f82cdcc', onClick: () => this.toggleModal(), xmlns: "http://www.w3.org/2000/svg", width: "28px", height: "28px", viewBox: "0 0 24 24", style: { cursor: 'pointer' } }, h("g", { key: 'c6a5662bc455967a3742cce45f23afbcc6e299b9', stroke: "none", fill: "none" }, h("rect", { key: '2be75f87485b734f49a70df59cf501583eda8486', x: "0", y: "0", width: "24", height: "24" }), h("rect", { key: '48ddc085496307e20abd2a23dda1ca8e4fc035ea', fill: "#008fc7", x: "4", y: "4", width: "7", height: "7", rx: "1.5" }), h("path", { key: '74300c4e82c62fe5f48e8749eb4c17d94b2c0010', d: "M5.5,13 L9.5,13 C10.3284271,13 11,13.6715729 11,14.5 L11,18.5 C11,19.3284271 10.3284271,20 9.5,20 L5.5,20 C4.67157288,20 4,19.3284271 4,18.5 L4,14.5 C4,13.6715729 4.67157288,13 5.5,13 Z M14.5,4 L18.5,4 C19.3284271,4 20,4.67157288 20,5.5 L20,9.5 C20,10.3284271 19.3284271,11 18.5,11 L14.5,11 C13.6715729,11 13,10.3284271 13,9.5 L13,5.5 C13,4.67157288 13.6715729,4 14.5,4 Z M14.5,13 L18.5,13 C19.3284271,13 20,13.6715729 20,14.5 L20,18.5 C20,19.3284271 19.3284271,20 18.5,20 L14.5,20 C13.6715729,20 13,19.3284271 13,18.5 L13,14.5 C13,13.6715729 13.6715729,13 14.5,13 Z", fill: "#008fc7", opacity: "0.3" }))), this.isModalOpen && (h("div", { key: 'd26700819a02c29e9db1ec06f38f52f692d188c9', class: "kt-quick-panel kt-quick-panel--on" }, h("a", { key: 'bf2fd49b01d74d94b2b66e0ac221bef0c4b6505d', onClick: () => this.toggleModal(), id: "kt_quick_panel_close_btn", class: "kt-quick-panel__close" }, h("svg", { key: '0acd430f2257e1b68d45b76d239ba8905afb4a5e', xmlns: "http://www.w3.org/2000/svg", width: "25px", height: "25px", viewBox: "0 0 24 24", fill: "none" }, h("g", { key: '7c67cb469eadfbea6fcc5bec534cb997fa49f775', id: "Menu / Close_SM" }, h("path", { key: '337cf56b0760f98adaacdb498d0c4b3beb0b3794', id: "Vector", d: "M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { key: '931c2c99c2e12a342a3a2072b23aef56001013ed', class: "kt-quick-panel__nav" }, h("ul", { key: 'ae90eb4a8b911e8810a479793e18caa52343d16f', role: "tablist", class: "nav nav-tabs nav-tabs-line nav-tabs-bold nav-tabs-line-3x nav-tabs-line-brand kt-notification-item-padding-x" }, h("li", { key: '2f8a6432178b77c47f287dcf7b87be9b868cfe2c', class: "nav-item active" }, h("a", { key: 'ed1c2448664481f4bfb75092f380fc61ef01d619', "data-toggle": "tab", role: "tab", class: "nav-link active" }, "User Preference")))), h("div", { key: '929ae769ffa142aefce180143006e2775734c95c', class: "kt-quick-panel__content" }, h("div", { key: 'b3d5c8547f4ba78189cd09b66f209ba4004aceaa', class: "tab-content" }, h("div", { key: '6f62825763019ef15021a32f24c09b875cdad9d6', id: "kt_quick_panel_tab_notifications", role: "tabpanel", class: "tab-pane fade show kt-scroll active ps ps--active-y" }, h("div", { key: 'ff0e5aa492162f134320667bb854197587c073dd', class: "kt-notification" }, h("div", { key: '7b75f00bdd5438e81065ec6df4c42df6a37786f3', class: "kt-portlet__body" }, h("div", { key: 'a469600fef936dcb0ec755411f259dfc8809f087', class: "form-group" }, h("label", { key: '1f6eee1ee7f63ab8912ec6c9942500577b7d80de' }, "Date Format"), h("select", { key: 'f57a6a1ab1cf94edd65dde983d09144802413a07', onInput: e => (this.userPreferences.dateFormat = e.target.value) }, this.dateFormates.map(format => (h("option", { value: format, selected: this.userPreferences.dateFormat == format }, format))))), h("div", { key: 'ac610487fdfcb924120b02a34752852d5cb6152a', class: "form-group" }, h("label", { key: '8055fff9741506dec8eec5d62d039b21aad66ab0' }, "Time Format"), h("select", { key: 'ae461003007fb15f6d5b7582d0481b53d1ed51b0', onInput: e => (this.userPreferences.timeFormat = e.target.value) }, this.timeFormats.map(format => (h("option", { value: format, selected: this.userPreferences.timeFormat == format }, format))))), h("div", { key: '1180827da3f38d7b074df0f2a1011b49efcd0b15', class: "form-group" }, h("label", { key: 'fcb20968446ed1661c09c3d0025a3a2eab56f3c5' }, "Font Size"), h("select", { key: '67bf2379d1106e05dc5276dc224077e7739e7750', onInput: e => (this.userPreferences.fontSize = e.target.value) }, this.fontSizes.map(size => (h("option", { value: size.value, selected: this.userPreferences.fontSize == size.value }, size.label))))), h("div", { key: '637a24908756c37d6178f76b93e4b489de5bbd42', class: "form-group" }, h("label", { key: '58a75ff667f1f8baa784c7ed6958b59ea091d09b' }, "User Display Format"), h("select", { key: 'a1b8ee53bf3a0ed394e659476dde72ec76e45484', onInput: e => (this.userPreferences.displayFormat = parseInt(e.target.value)) }, this.displayFormats.map(format => (h("option", { value: format.value, selected: this.userPreferences.displayFormat == format.value }, format.label))))), h("div", { key: '73a484395b3d555f7ee07b532b7c09589c11d039', class: "form-group" }, h("label", { key: 'b5f54246b64fbf7148a2f92f92c31a2d48f04706' }, "Default Landing Page"), h("div", { key: '204411102b7465eac0fe5c7c0df8ab82f6c5cd14', class: "input-group", onClick: () => this.togglePageModal() }, h("div", { key: '7ac55f1c9caed65cc89e454493c15782550a7a28', class: "input-group-prepend" }, h("span", { key: '7d412534ffb4df77e0fc901cedf48aff5291969d', class: "input-group-text" }, h("svg", { key: '60563489d59a8c1c1601f41488abef0a909ae9ae', xmlns: "http://www.w3.org/2000/svg", fill: "#000000", height: "18px", width: "18px", version: "1.1", id: "Layer_1", viewBox: "0 0 64 64", "enable-background": "new 0 0 64 64" }, h("g", { key: '291b9f73e3210d462f866f941a27ba6ec0186839', id: "Link-chains" }, h("path", { key: '3fc9bf99a31ea86065cdd3a519418ede475c0720', d: "M56.1697006,10.5212574C55.7126999,8.8132582,54.618,7.3864579,53.0876999,6.5036578l-9.7275009-5.6162 c-1.5303001-0.8838-3.3144989-1.1180999-5.0205994-0.6611c-1.7070007,0.458-3.1347008,1.5527-4.0185013,3.0840001 L21.9655991,24.7107582c-0.8838005,1.5301991-1.1191006,3.3134003-0.6611004,5.0205002 c0.4580002,1.7069988,1.5527,3.1338005,3.0839996,4.017498l7.5703011,4.3721008 c0.157198,0.0908012,0.3290997,0.1338005,0.4989986,0.1338005c0.3456993,0,0.6817017-0.1786995,0.8671989-0.5 c0.2764015-0.4785004,0.1123009-1.0898018-0.3661995-1.3661995l-7.5702991-4.3721008 c-1.0683994-0.6161995-1.8330002-1.612299-2.1523991-2.8027c-0.3192997-1.1903992-0.155201-2.4345989,0.4618988-3.5028992 L36.0534973,4.3103576c0.6172028-1.0683999,1.6123009-1.8329999,2.8037033-2.1523998 c1.1894989-0.3183,2.4355965-0.1552,3.5029984,0.4619l9.7275009,5.6162996 c1.0673981,0.6162004,1.8311005,1.6113005,2.1503983,2.8027c0.3193016,1.1914005,0.1553001,2.4355001-0.4618988,3.5039005 l-6.3652992,11.0243998c-0.2763023,0.4785004-0.1123009,1.0897999,0.3661995,1.3661995 c0.4755974,0.2754002,1.0888977,0.1123009,1.3662987-0.3661995l6.3652-11.0243998 C56.3923988,14.0124578,56.627697,12.2292576,56.1697006,10.5212574z" }), h("path", { key: '517689f8bdffa089b4c23f34f4837fdc15ca1270', d: "M39.6082001,30.2507572l-8.8691006-5.1201c-0.4786015-0.2763996-1.089901-0.112299-1.3662014,0.3662014 c-0.2763996,0.4784985-0.1124001,1.0897999,0.3662014,1.3661995l8.8691006,5.1201 c2.2040977,1.2734985,2.9618988,4.1026001,1.6884995,6.3066978L27.9411983,59.690258 c-0.6161995,1.0682983-1.6112995,1.8320007-2.8027,2.1512985c-1.1894989,0.3184013-2.4335995,0.1562996-3.5019989-0.4608994 l-9.7275009-5.6161995c-2.2040997-1.2734985-2.9629002-4.1026001-1.6904001-6.3067017l6.365201-11.0243988 c0.2763996-0.4785004,0.112299-1.089798-0.3662014-1.3661995c-0.4775991-0.2764015-1.0898991-0.1133003-1.3661995,0.3661995 L8.4860983,48.457756c-1.8231997,3.1592026-0.7362995,7.2139015,2.4229002,9.0391006l9.7275009,5.6161995 c1.0195999,0.5879021,2.1504002,0.8886986,3.2958984,0.8886986c0.575201,0,1.1543007-0.0751953,1.7246017-0.2284966 c1.7070999-0.4570999,3.1337986-1.5527992,4.0165997-3.0830002L42.0290985,39.289856 C43.8532982,36.1316566,42.7673988,32.0769577,39.6082001,30.2507572z" }))))), h("input", { key: '0fd0010f61f178956549daefc7f5a96aec31ecb0', type: "text", class: "form-control", readonly: true, value: this.selectedPage.name || 'Select page', placeholder: "Select page" })))), h("div", { key: '6a888994a6fc7eefe73291b2bc9b3808383073d3', class: "kt-portlet__foot" }, h("div", { key: '8e462722ae585f303bd862c8b0736ec66d1d76b4', class: "kt-form__actions" }, h("button", { key: 'e9c2ca23800b5685edd7d26c3c59ae4e98ee5a2b', class: "btn btn-primary", onClick: () => this.submitPreferences() }, "Save"), h("button", { key: '8c1418c362714b574a2a5bfd94fa3db6d5948bef', class: "btn btn-secondary", onClick: () => this.resetPreferences() }, "Reset"))))))))), this.showToastFlag && h("div", { key: '55fd473f623105c257f76a35448102dd5c739cea', class: `toast ${this.toastType}` }, this.toastMessage), this.isPageModalOpen && (h("div", { key: '2fad32a0495a150363131761f9946ac82d60ab5d', class: "modal-overlay" }, h("div", { key: '67035147ec40a11e991164b655a28eca3e85dd37', class: "modal-dialog modal-md landing-modal" }, h("div", { key: '39a8b3cb9f0710cca4694ac00c66845af7eb2372', class: "modal-content landing-page" }, h("div", { key: 'dbc79b979e43af0692ae45f1e86773c37e2c855a', class: "modal-header" }, h("h4", { key: '0ec525007edeec778318591a0723ee4665f3eb4e', class: "modal-title pull-left" }, " Default Landing Page "), h("button", { key: '2080dbb7e94bda9cd3892aaf79ac840abc7e65b2', onClick: () => this.togglePageModal(), type: "button", "aria-label": "Close", class: "close pull-right" }, h("span", { key: 'cd26b3a9dc379f1f5cd243e3948b9b3540585229' }, h("svg", { key: '7a83eace271fc4a547053015e9a33366fcbde403', xmlns: "http://www.w3.org/2000/svg", width: "15px", height: "15px", viewBox: "0 0 24 24", fill: "none" }, h("g", { key: '4a404eff3fdcc12fa5f58cc90365c9e33c3e5513', id: "Menu / Close_SM" }, h("path", { key: 'b72750f226c348a71657fdd9a18330760e1160aa', id: "Vector", d: "M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), h("div", { key: 'ca5fb105192531060d9a554432d57ca6dd8c7818', class: "modal-body" }, h("div", { key: '6517c17726d1560ce99c2619531014727003d553', class: "row" }, h("div", { key: '3c12495259c5fc90791013cb6b1a040f68ab9071', class: "col-12" }, h("div", { key: '86703079407022b2a1cb24ca6134c25d8808645f', class: "row" }, h("div", { key: '56648e0c40f7e8f1b0cd88f1d3fd8539cdad7e44', class: "form-group" }, h("label", { key: '97573cdc61ce8c2bd20b6e4d44b759d72d157f74', htmlFor: "" }, " Default Landing Page "), h("select", { key: '4dd72f4df7f0656a1cff6d0b2295be123dca4877', class: "ng", onInput: e => this.changeApplication(e) }, h("option", { key: '9f849ebd4f433f55ee0d56171d309d7869d35f3b', value: "", selected: this.applicationId === null }, "-- Select Application --"), this.userApplications.map(application => (h("option", { value: application.applicationId, selected: this.applicationId === application.applicationId }, application.applicationName)))))), h("label", { key: 'd483236d7e70c3fcb3bbad30f7d07e1d6a33853c' }, "Select Page"), h("div", { key: '1d28200985a9808c7220398c8bcfe3a4e0ffc288', style: { maxHeight: '300px', overflowY: 'auto', overflowX: 'hidden' } }, this.pagedPages.map(page => (h("div", { class: "slug-item", onClick: () => this.selectPage(page) }, h("div", { class: "row" }, h("span", { class: "text-brand", style: { fontWeight: '600', lineHeight: '1' } }, page.name), h("small", { class: {
|
|
304
|
+
return (h(Host, { key: '6726dff29b5c402629f82632303a3b35b5ffaff8' }, h("div", { key: '2b9048953e5baf509a41d9e52e6c870e0f19ebf1', class: "container" }, h("svg", { key: 'dda80f48d0aa892b1922a343840545f98f462a7b', onClick: () => this.toggleModal(), xmlns: "http://www.w3.org/2000/svg", width: "28px", height: "28px", viewBox: "0 0 24 24", style: { cursor: 'pointer' } }, h("g", { key: 'a0dde7bc3b84ad4d6a18aa304c446a3be1521ed6', stroke: "none", fill: "none" }, h("rect", { key: '75631fff43887d9b3cca594f4b9ebd572d5739e1', x: "0", y: "0", width: "24", height: "24" }), h("rect", { key: 'f33fbe1c4b89e869be82f7510f82fb253a175308', fill: "#008fc7", x: "4", y: "4", width: "7", height: "7", rx: "1.5" }), h("path", { key: 'fef24cb43a8afaf1605fe19dcd3126a221ffa3d3', d: "M5.5,13 L9.5,13 C10.3284271,13 11,13.6715729 11,14.5 L11,18.5 C11,19.3284271 10.3284271,20 9.5,20 L5.5,20 C4.67157288,20 4,19.3284271 4,18.5 L4,14.5 C4,13.6715729 4.67157288,13 5.5,13 Z M14.5,4 L18.5,4 C19.3284271,4 20,4.67157288 20,5.5 L20,9.5 C20,10.3284271 19.3284271,11 18.5,11 L14.5,11 C13.6715729,11 13,10.3284271 13,9.5 L13,5.5 C13,4.67157288 13.6715729,4 14.5,4 Z M14.5,13 L18.5,13 C19.3284271,13 20,13.6715729 20,14.5 L20,18.5 C20,19.3284271 19.3284271,20 18.5,20 L14.5,20 C13.6715729,20 13,19.3284271 13,18.5 L13,14.5 C13,13.6715729 13.6715729,13 14.5,13 Z", fill: "#008fc7", opacity: "0.3" }))), this.isModalOpen && (h("div", { key: 'f9e45801fb469d69e9d15aa17d9306708c39a2ea', class: "kt-quick-panel kt-quick-panel--on" }, h("a", { key: '5dbaf1f94efab14da5e45f53e9a9b9dd2a8c5fd8', onClick: () => this.toggleModal(), id: "kt_quick_panel_close_btn", class: "kt-quick-panel__close" }, h("svg", { key: '91c9894f2101267a800589b6d11c524f5fbd69ec', xmlns: "http://www.w3.org/2000/svg", width: "25px", height: "25px", viewBox: "0 0 24 24", fill: "none" }, h("g", { key: 'd69f7a675488ae215dc2909f2e3fbcfb55e3791c', id: "Menu / Close_SM" }, h("path", { key: '3b60ba78a15ad8ef351e51d96fc2018bb8b8a207', id: "Vector", d: "M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { key: '23eac9e0c7cc42500d39d4b9bb1e751835734517', class: "kt-quick-panel__nav" }, h("ul", { key: '5d536b7ef11005bbfd56b54cbce8424270920efd', role: "tablist", class: "nav nav-tabs nav-tabs-line nav-tabs-bold nav-tabs-line-3x nav-tabs-line-brand kt-notification-item-padding-x" }, h("li", { key: '31b1d8f65cc4b85bee38034cba5a041bb7e54c46', class: "nav-item active" }, h("a", { key: '71024188f5cb43055525dc564d6183c3d6d6b455', "data-toggle": "tab", role: "tab", class: "nav-link active" }, "User Preference")))), h("div", { key: '1fcbbad40840d8284a9db3e69af4e12e7b777289', class: "kt-quick-panel__content" }, h("div", { key: '191e73fdbe1444fad40a4795bd515a815b648701', class: "tab-content" }, h("div", { key: '2574b6c3510a0a5babab614ac38a1e6b5771e94c', id: "kt_quick_panel_tab_notifications", role: "tabpanel", class: "tab-pane fade show kt-scroll active ps ps--active-y" }, h("div", { key: 'f834e223bfd8be501599d6f7ae79f40f95ed1cde', class: "kt-notification" }, h("div", { key: '273813b4abf74a76db563c94fe17501d2e99bb99', class: "kt-portlet__body" }, h("div", { key: '01e097d6e79eb48c6401f4017acb9641e5772fd8', class: "form-group" }, h("label", { key: '2da2d6bafc9a5dd4f57a5c5045cefe9114c74e57' }, "Date Format"), h("select", { key: '3fafff9e36cd16d19b01203a36c72340d43b1b84', onInput: e => (this.userPreferences.dateFormat = e.target.value) }, this.dateFormates.map(format => (h("option", { value: format, selected: this.userPreferences.dateFormat == format }, format))))), h("div", { key: 'de60b61a4deafa59debfeabda333d887f629bb8e', class: "form-group" }, h("label", { key: 'f29b35af8bd16ac259af7a3c802da5eb1bf65ccb' }, "Time Format"), h("select", { key: '8c65954959ea3bfddf4a2e1083e8ec74cad86373', onInput: e => (this.userPreferences.timeFormat = e.target.value) }, this.timeFormats.map(format => (h("option", { value: format, selected: this.userPreferences.timeFormat == format }, format))))), h("div", { key: '928a614550530453180cb8c4b6159d53136019f6', class: "form-group" }, h("label", { key: '099d38cd9bd9e2634b968660fd349db07dfa81cf' }, "Font Size"), h("select", { key: 'e386ef1b20a4e771679b80223b3780644ee95646', onInput: e => (this.userPreferences.fontSize = e.target.value) }, this.fontSizes.map(size => (h("option", { value: size.value, selected: this.userPreferences.fontSize == size.value }, size.label))))), h("div", { key: 'b0c25d6250e2fa3a62b54ec26431a3a44ed2be9e', class: "form-group" }, h("label", { key: '758aa5923331fcee3d38ebc4ab9d5fc90dcbf287' }, "User Display Format"), h("select", { key: 'af422addff3ce70b3ea37e3a0469251c99093e5d', onInput: e => (this.userPreferences.displayFormat = parseInt(e.target.value)) }, this.displayFormats.map(format => (h("option", { value: format.value, selected: this.userPreferences.displayFormat == format.value }, format.label))))), h("div", { key: 'aeb0a8a792bd9c38b64f760376f7111e90e2b431', class: "form-group" }, h("label", { key: '644ad2f2a89dac401835e5b27385364d93b7dadf' }, "Default Landing Page"), h("div", { key: '34888c4dd5c17d719471d3a52717a12d3530611f', class: "input-group", onClick: () => this.togglePageModal() }, h("div", { key: '7e066d5ceddc931d6998318e1c5c873172c937c6', class: "input-group-prepend" }, h("span", { key: '24f5fa0468b6d2531ca3fe7b219302a50349beb8', class: "input-group-text" }, h("svg", { key: '59a70ef5997bf64b903b6fd1a4599a13aaa689f7', xmlns: "http://www.w3.org/2000/svg", fill: "#000000", height: "18px", width: "18px", version: "1.1", id: "Layer_1", viewBox: "0 0 64 64", "enable-background": "new 0 0 64 64" }, h("g", { key: '2630f5eeb5b31f8b276e75007aca7d3b6fe7b0e7', id: "Link-chains" }, h("path", { key: '6bf10665ef6821e6c6ff2eb00881b0880d782017', d: "M56.1697006,10.5212574C55.7126999,8.8132582,54.618,7.3864579,53.0876999,6.5036578l-9.7275009-5.6162 c-1.5303001-0.8838-3.3144989-1.1180999-5.0205994-0.6611c-1.7070007,0.458-3.1347008,1.5527-4.0185013,3.0840001 L21.9655991,24.7107582c-0.8838005,1.5301991-1.1191006,3.3134003-0.6611004,5.0205002 c0.4580002,1.7069988,1.5527,3.1338005,3.0839996,4.017498l7.5703011,4.3721008 c0.157198,0.0908012,0.3290997,0.1338005,0.4989986,0.1338005c0.3456993,0,0.6817017-0.1786995,0.8671989-0.5 c0.2764015-0.4785004,0.1123009-1.0898018-0.3661995-1.3661995l-7.5702991-4.3721008 c-1.0683994-0.6161995-1.8330002-1.612299-2.1523991-2.8027c-0.3192997-1.1903992-0.155201-2.4345989,0.4618988-3.5028992 L36.0534973,4.3103576c0.6172028-1.0683999,1.6123009-1.8329999,2.8037033-2.1523998 c1.1894989-0.3183,2.4355965-0.1552,3.5029984,0.4619l9.7275009,5.6162996 c1.0673981,0.6162004,1.8311005,1.6113005,2.1503983,2.8027c0.3193016,1.1914005,0.1553001,2.4355001-0.4618988,3.5039005 l-6.3652992,11.0243998c-0.2763023,0.4785004-0.1123009,1.0897999,0.3661995,1.3661995 c0.4755974,0.2754002,1.0888977,0.1123009,1.3662987-0.3661995l6.3652-11.0243998 C56.3923988,14.0124578,56.627697,12.2292576,56.1697006,10.5212574z" }), h("path", { key: '5c14a8581776f8650d8c2d05008975b16d5a5bf0', d: "M39.6082001,30.2507572l-8.8691006-5.1201c-0.4786015-0.2763996-1.089901-0.112299-1.3662014,0.3662014 c-0.2763996,0.4784985-0.1124001,1.0897999,0.3662014,1.3661995l8.8691006,5.1201 c2.2040977,1.2734985,2.9618988,4.1026001,1.6884995,6.3066978L27.9411983,59.690258 c-0.6161995,1.0682983-1.6112995,1.8320007-2.8027,2.1512985c-1.1894989,0.3184013-2.4335995,0.1562996-3.5019989-0.4608994 l-9.7275009-5.6161995c-2.2040997-1.2734985-2.9629002-4.1026001-1.6904001-6.3067017l6.365201-11.0243988 c0.2763996-0.4785004,0.112299-1.089798-0.3662014-1.3661995c-0.4775991-0.2764015-1.0898991-0.1133003-1.3661995,0.3661995 L8.4860983,48.457756c-1.8231997,3.1592026-0.7362995,7.2139015,2.4229002,9.0391006l9.7275009,5.6161995 c1.0195999,0.5879021,2.1504002,0.8886986,3.2958984,0.8886986c0.575201,0,1.1543007-0.0751953,1.7246017-0.2284966 c1.7070999-0.4570999,3.1337986-1.5527992,4.0165997-3.0830002L42.0290985,39.289856 C43.8532982,36.1316566,42.7673988,32.0769577,39.6082001,30.2507572z" }))))), h("input", { key: 'ad33a9a62db6039592a14982c391d7dc11766636', type: "text", class: "form-control", readonly: true, value: this.selectedPage.name || 'Select page', placeholder: "Select page" })))), h("div", { key: 'f10e02f201b0f8a2ed240bd5176d1a3786766a66', class: "kt-portlet__foot" }, h("div", { key: 'e4c22c5819adf894d180b37bedb63a92ef56aaeb', class: "kt-form__actions" }, h("button", { key: '5ee64f9c6bb03b30bc5ba955a72e2c856ef49331', class: "btn btn-primary", onClick: () => this.submitPreferences() }, "Save"), h("button", { key: 'c3716c96fa07f4b5cefb6e96b798dfac68890bec', class: "btn btn-secondary", onClick: () => this.resetPreferences() }, "Reset"))))))))), this.showToastFlag && h("div", { key: 'd33ed5b2b62cbce72d920458949a03480c41a88d', class: `toast ${this.toastType}` }, this.toastMessage), this.isPageModalOpen && (h("div", { key: '404d5bc7287acc05fbfaa1bbc3d266788b1a08e0', class: "modal-overlay" }, h("div", { key: 'e8e0de23e3e1348509b2fcbcb9ccd7ece02c1904', class: "modal-dialog modal-md landing-modal" }, h("div", { key: 'f78414a4149b56b4a5ddb6a4947189b1a1440952', class: "modal-content landing-page" }, h("div", { key: 'be878795668c6f3d2bbbe8ac5f017b9adfaac777', class: "modal-header" }, h("h4", { key: '3561ee303d11e29c2d151c9bdac76f67ac92ce0a', class: "modal-title pull-left" }, " Default Landing Page "), h("button", { key: '0b1b097e19ae987814ecf717d9b525287d030bbe', onClick: () => this.togglePageModal(), type: "button", "aria-label": "Close", class: "close pull-right" }, h("span", { key: 'a1a53b081e95f1d4d9b0994ca24f1a31820fea0c' }, h("svg", { key: '1827f37211e7b5d41b79bf2a665779be6e9e0a6b', xmlns: "http://www.w3.org/2000/svg", width: "15px", height: "15px", viewBox: "0 0 24 24", fill: "none" }, h("g", { key: '0e614fa3b8d74326a6450e85004f749628f11b8b', id: "Menu / Close_SM" }, h("path", { key: '97a3c1308c6737e1599db3bb01e864b2d8e7c574', id: "Vector", d: "M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16", stroke: "#000000", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), h("div", { key: '78f7fbaa6b83ef9cc4fa8f027b04ff4818272a07', class: "modal-body" }, h("div", { key: 'aac8ebfdb2daf72f4d3222c48a940e39082e4fa2', class: "row" }, h("div", { key: 'eaad82eaf66f85cb361ab1743bc0fe21b0dffd1f', class: "col-12" }, h("div", { key: 'c23813ab98e85b9ab447fbb375f83216b91c5403', class: "row" }, h("div", { key: '27072c6b1c198f54821fdd36ca4a21a6b0cdb546', class: "form-group" }, h("label", { key: 'ddc26eeb660721e60400c07a59dd0ea7326a89ac', htmlFor: "" }, " Default Landing Page "), h("select", { key: '913e7d94d38dc2ecf1166e3dd19ad82092d227d3', class: "ng", onInput: e => this.changeApplication(e) }, h("option", { key: '4dcbf6b12301286a6cdfe4a4edbf455768caa17e', value: "", selected: this.applicationId === null }, "-- Select Application --"), this.userApplications.map(application => (h("option", { value: application.applicationId, selected: this.applicationId === application.applicationId }, application.applicationName)))))), h("label", { key: 'fdcc3e9583daf91761e7a0f79e69166a51a9f811' }, "Select Page"), h("div", { key: '9addb8f820d0e4dac4fb65314178e3da7b870bce', style: { maxHeight: '250px', overflowY: 'auto', overflowX: 'hidden' } }, this.pagedPages.map(page => (h("div", { class: "slug-item", onClick: () => this.selectPage(page) }, h("div", { class: "row" }, h("span", { class: "text-brand", style: { fontWeight: '600', lineHeight: '1' } }, page.name), h("small", { class: {
|
|
305
305
|
'culture-unpublished': page.pageCultureStatus == 1,
|
|
306
306
|
'culture-published': page.pageCultureStatus == 2,
|
|
307
|
-
} }, page.cultureCode)))))), this.totalPages > 1 && (h("div", { key: '
|
|
307
|
+
} }, page.cultureCode)))))), this.totalPages > 1 && (h("div", { key: 'ec681f8da45887e8705c67633abc90244d7df028', class: "pagination-controls" }, h("button", { key: '00936c1fb79e155c32e0ca7bc1ebadc30d9381c5', class: "arrow-button", disabled: this.currentPage === 1, onClick: () => this.currentPage-- }, h("svg", { key: '35a974246354b616bbefb5e6a734c60087e03ad5', width: "20", height: "20", viewBox: "0 0 24 24", fill: "none" }, h("path", { key: 'a6e17e34ebdf8933a499451954b4c2a7cc39b69a', d: "M15 18L9 12L15 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("span", { key: '56571f65758a90e0ab3e315d67195f11a01fe0ed' }, this.currentPage, " of ", this.totalPages), h("button", { key: 'ebb1992d2bb8cd6cf58b03ccad237504b5a031f9', class: "arrow-button", disabled: this.currentPage === this.totalPages, onClick: () => this.currentPage++ }, h("svg", { key: 'da83ab8e54cb7ca0e14c4cbf505d83876dbf676b', width: "20", height: "20", viewBox: "0 0 24 24", fill: "none" }, h("path", { key: '2858903e1b2ccdf1058e7d386447e3eca71fc197', d: "M9 6L15 12L9 18", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))))))))))))));
|
|
308
308
|
}
|
|
309
309
|
static get is() { return "eiam-user-preference"; }
|
|
310
310
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eiam-user-preference.js","sourceRoot":"","sources":["../../../src/components/eiam-user-preference/eiam-user-preference.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAOrG,MAAM,OAAO,kBAAkB;IAClB,IAAI,CAAc;IACpB,gBAAgB,CAAS;IACzB,OAAO,GAAG;QACjB,UAAU,EAAE;YACV,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,IAAI;SACf;QACD,MAAM,EAAE;YACN,QAAQ,EAAE,EAAE;SACb;KACF,CAAC;IACO,kBAAkB,CAAoB;IACtC,eAAe,GAAG;QACzB,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,CAAC;QAChB,oBAAoB,EAAE,EAAE;QACxB,QAAQ,EAAE,EAAE;KACb,CAAC;IAEO,YAAY,GAAa,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;IACpE,WAAW,GAAa,CAAC,QAAQ,CAAC,CAAC;IACnC,SAAS,GAAG;QACnB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;QAC/B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;QAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;KAChC,CAAC;IACO,cAAc,GAAU,EAAE,CAAC;IAC3B,gBAAgB,GAAU,EAAE,CAAC;IAC7B,KAAK,GAAU,EAAE,CAAC;IAClB,WAAW,GAAG,KAAK,CAAC;IACpB,WAAW,GAAW,CAAC,CAAC;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EAAC,MAAM,EAAC,cAAc,kBAAc,GAAG,oBAAgB,OAAO,qBAAiB,OAAO,GAAG,CAC/G,CACC;4CACT;gDACI,IAAI,CAAC,WAAW;;gDAAM,IAAI,CAAC,UAAU,CAClC;4CACP,+DAAQ,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE;gDAC5G,4DAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM;oDACzD,6DAAM,CAAC,EAAC,iBAAiB,EAAC,MAAM,EAAC,cAAc,kBAAc,GAAG,oBAAgB,OAAO,qBAAiB,OAAO,GAAG,CAC9G,CACC,CACL,CACP,CACG,CACF,CACF,CACF,CACF,CACF,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, State, Watch, h, Element, EventEmitter, Event } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'eiam-user-preference',\r\n styleUrl: 'eiam-user-preference.css',\r\n shadow: true,\r\n})\r\nexport class EiamUserPreference {\r\n @Element() host: HTMLElement;\r\n @State() currentRouteSlug: string;\r\n @State() payload = {\r\n pagination: {\r\n pageIndex: 0,\r\n pageSize: 1000,\r\n },\r\n search: {\r\n pageName: '',\r\n },\r\n };\r\n @Event() preferencesChanged: EventEmitter<any>;\r\n @State() userPreferences = {\r\n dateFormat: 'dd/MM/yyyy',\r\n timeFormat: '',\r\n fontSize: null,\r\n displayFormat: 4,\r\n defaultLandingPageId: '',\r\n pageName: '',\r\n };\r\n\r\n @State() dateFormates: string[] = ['dd/MM/yyyy', 'MM/dd/yyyy', 'yyyy-MM-dd'];\r\n @State() timeFormats: string[] = ['h:mm a'];\r\n @State() fontSizes = [\r\n { label: 'Small', value: '14' },\r\n { label: 'Medium', value: '16' },\r\n { label: 'Large', value: '18' },\r\n ];\r\n @State() displayFormats: any[] = [];\r\n @State() userApplications: any[] = [];\r\n @State() pages: any[] = [];\r\n @State() isModalOpen = false;\r\n @State() currentPage: number = 1;\r\n @State() pageSize: number = 10;\r\n @State() isPageModalOpen: boolean = false; // Controls the visibility of the secondary modal\r\n @State() selectedPage: { pageId: number; name: string } = { pageId: null, name: '' }; // To store selected page\r\n @State() showToastFlag: any;\r\n @State() toastType: any;\r\n @State() toastMessage: any;\r\n @Prop() pageId: any;\r\n @Prop() cultureCode: string;\r\n @Prop() applicationId: string;\r\n @Prop() apiUrl: string;\r\n @Watch('cultureCode')\r\n @Watch('applicationId')\r\n @Watch('pageId')\r\n @Watch('apiUrl')\r\n\r\n\r\nasync watchChanges() {\r\n await this.fetchInitiateValue();\r\n}\r\n\r\nasync componentWillLoad() {\r\n await this.fetchInitiateValue();\r\n}\r\n\r\nprivate isFetching = false;\r\nasync fetchInitiateValue() {\r\n if (!this.cultureCode || !this.applicationId || !this.apiUrl) {\r\n return; // wait until all props are ready\r\n }\r\n\r\n if (this.isFetching) return; // prevent duplicate calls\r\n this.isFetching = true;\r\n\r\n await this.getDisplayFormats();\r\n await this.getUserPreferences();\r\n await this.getUserApplications();\r\n\r\n this.isFetching = false;\r\n}\r\n\r\nprivate isFetchingDisplayFormats = false;\r\nprivate isFetchingUserPreferences = false;\r\nprivate isFetchingApplications = false;\r\n\r\n async getDisplayFormats() {\r\n if (this.isFetchingDisplayFormats) return;\r\n this.isFetchingDisplayFormats = true;\r\n try {\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n };\r\n\r\n const response = await fetch(`${this.apiUrl}/api/UserPreferences/DisplayFormats`, {\r\n method: 'GET', // Specify GET method\r\n headers: headers,\r\n credentials: 'include', // Include credentials (cookies) in the request\r\n });\r\n\r\n const data = await response.json();\r\n\r\n if (Array.isArray(data.content)) {\r\n this.displayFormats = data.content;\r\n } else {\r\n // console.error('Invalid response structure:', data);\r\n this.showToast('Something went wrong', 'error');\r\n }\r\n } catch (error) {\r\n // console.error('Error fetching display formats:', error);\r\n this.showToast('Something went wrong', 'error');\r\n }finally {\r\n this.isFetchingDisplayFormats = false;\r\n }\r\n }\r\n\r\n async getUserPreferences() {\r\n if (this.isFetchingUserPreferences) return;\r\n this.isFetchingUserPreferences = true;\r\n try {\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n };\r\n\r\n const response = await fetch(`${this.apiUrl}/api/UserPreferences/GetUserPreferences`, {\r\n method: 'GET',\r\n headers: headers,\r\n credentials: 'include',\r\n });\r\n\r\n let data = await response.json();\r\n if (data && typeof data !== 'string' && data.code == 200) {\r\n console.log(data, ' data of user preferances');\r\n \r\n const fontSizeValue = parseInt(data.content.fontSize);\r\n console.log(fontSizeValue, ' fontSizeValue of user preferances');\r\n\r\n this.userPreferences = {\r\n ...this.userPreferences,\r\n dateFormat: data.content?.dateFormat || 'dd/MM/yyyy',\r\n timeFormat: data.content?.timeFormat || this.timeFormats[0], // fallback!\r\n fontSize: !isNaN(fontSizeValue) ? fontSizeValue : parseInt(this.fontSizes[0]?.value),\r\n displayFormat: data.content?.displayFormat || 1,\r\n defaultLandingPageId: data?.content?.defaultLandingPageId,\r\n pageName: data?.content?.defaultLandingPageDetails?.name || '',\r\n };\r\n this.selectedPage.name = data.content?.defaultLandingPageDetails?.name;\r\n }\r\n this.preferencesChanged.emit(data);\r\n } catch (error) {\r\n // console.error('Error fetching user preferences:', error);\r\n this.showToast('Something went wrong', 'error');\r\n }finally {\r\n this.isFetchingUserPreferences = false;\r\n }\r\n }\r\n private showToast(message: string, type: 'success' | 'error' = 'success') {\r\n this.toastMessage = message;\r\n this.toastType = type;\r\n this.showToastFlag = true;\r\n\r\n setTimeout(() => {\r\n this.showToastFlag = false;\r\n }, 3000);\r\n }\r\n\r\n async getUserApplications() {\r\n if (this.isFetchingApplications) return;\r\n this.isFetchingApplications = true;\r\n try {\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n 'IntegrationPermission': '0f5d983d203189bbffc5f686d01f6680bc6a83718a515fe42639347efc92478e',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n };\r\n\r\n const response = await fetch(`${this.apiUrl}/api/OrganizationApplicationsApi/GetAssigndApplicationForUser`, {\r\n method: 'GET',\r\n headers: headers,\r\n credentials: 'include',\r\n });\r\n\r\n const data = await response.json();\r\n\r\n if (data && Array.isArray(data.content)) {\r\n this.userApplications = data.content;\r\n } else {\r\n // console.error('Invalid response structure:', data);\r\n this.showToast('Something went wrong', 'error');\r\n }\r\n } catch (error) {\r\n // console.error('Error fetching applications:', error);\r\n this.showToast('Something went wrong', 'error');\r\n }finally{\r\n this.isFetchingApplications = false;\r\n }\r\n }\r\n changeApplication(e: Event) {\r\n const selectedId = (e.target as HTMLSelectElement).value;\r\n\r\n if (selectedId) {\r\n this.applicationId = selectedId;\r\n // console.log(this.applicationId, 'this.applicationId on change');\r\n this.getPagesSApplications();\r\n } else {\r\n this.applicationId = null;\r\n }\r\n }\r\n\r\n async getPagesSApplications() {\r\n try {\r\n const response = await fetch(`${this.apiUrl}/api/Pages/GetPages`, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n },\r\n credentials: 'include',\r\n body: JSON.stringify(this.payload),\r\n });\r\n\r\n if (!response.ok) {\r\n // console.error('Failed to fetch pages');\r\n this.showToast('Something went wrong', 'error');\r\n return;\r\n }\r\n\r\n const data = await response.json();\r\n this.pages = data?.content?.data;\r\n // console.log(data, 'data of all pages ');\r\n } catch (error) {\r\n // console.error('Error fetching pages:', error);\r\n this.showToast('Something went wrong', 'error');\r\n }\r\n }\r\n\r\n async submitPreferences() {\r\n const fontSizeValue = parseFloat(this.userPreferences.fontSize);\r\n const fontSize = !isNaN(fontSizeValue) ? `${fontSizeValue}px` : null;\r\n let pageName = this.selectedPage.name;\r\n let defaultLandingPageId = this.selectedPage.pageId;\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n };\r\n // console.log(this.userPreferences, 'user preferancesss ');\r\n\r\n try {\r\n const response = await fetch(`${this.apiUrl}/api/UserPreferences/SaveUserPreferences`, {\r\n method: 'POST',\r\n headers,\r\n body: JSON.stringify({ ...this.userPreferences, fontSize, pageName: pageName, defaultLandingPageId: defaultLandingPageId }),\r\n credentials: 'include',\r\n });\r\n\r\n if (!response.ok) {\r\n // console.error('Failed to save preferences:', response.statusText);\r\n this.showToast('Something went wrong', 'error');\r\n\r\n return;\r\n }\r\n if (response.ok) {\r\n // Fetch updated preferences\r\n this.showToast('Preferences updated successfully!', 'success');\r\n\r\n const newPrefs: any = await this.getUserPreferences();\r\n if (!newPrefs || typeof newPrefs === 'string') return;\r\n }\r\n } catch (error) {\r\n this.showToast('Something went wrong', 'error');\r\n // console.error('Error submitting preferences:', error);\r\n }\r\n }\r\n\r\n async resetPreferences() {\r\n try {\r\n let res = await fetch(`${this.apiUrl}/api/UserPreferences/Delete`, {\r\n method: 'DELETE',\r\n credentials: 'include',\r\n });\r\n\r\n this.userPreferences = {\r\n dateFormat: 'dd/MM/yyyy',\r\n timeFormat: '',\r\n fontSize: '',\r\n displayFormat: 4,\r\n defaultLandingPageId: '',\r\n pageName: '',\r\n };\r\n if (res.ok) {\r\n // Fetch updated preferences\r\n this.showToast('Preferences updated successfully!', 'success');\r\n\r\n location.reload(); // If you want to refresh the UI\r\n }\r\n } catch (error) {\r\n // console.error('Failed to reset preferences', error);\r\n this.showToast('Something went wrong', 'error');\r\n }\r\n }\r\n toggleModal() {\r\n this.isModalOpen = !this.isModalOpen;\r\n }\r\n togglePageModal() {\r\n this.isPageModalOpen = !this.isPageModalOpen;\r\n }\r\n selectPage(page) {\r\n this.selectedPage = page;\r\n this.userPreferences.defaultLandingPageId = page.pageId; // Update default landing page\r\n this.togglePageModal(); // Close the page selection modal\r\n }\r\n\r\n get pagedPages() {\r\n const start = (this.currentPage - 1) * this.pageSize;\r\n const end = start + this.pageSize;\r\n return this.pages.slice(start, end);\r\n }\r\n\r\n get totalPages() {\r\n return Math.ceil(this.pages.length / this.pageSize);\r\n }\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <div class=\"container\">\r\n <svg onClick={() => this.toggleModal()} xmlns=\"http://www.w3.org/2000/svg\" \r\n width=\"28px\" height=\"28px\" viewBox=\"0 0 24 24\"\r\n style={{ cursor: 'pointer' }}>\r\n <g stroke=\"none\" fill=\"none\">\r\n <rect x=\"0\" y=\"0\" width=\"24\" height=\"24\" />\r\n <rect fill=\"#008fc7\" x=\"4\" y=\"4\" width=\"7\" height=\"7\" rx=\"1.5\" />\r\n <path\r\n d=\"M5.5,13 L9.5,13 C10.3284271,13 11,13.6715729 11,14.5 L11,18.5 C11,19.3284271 10.3284271,20 9.5,20 L5.5,20 C4.67157288,20 4,19.3284271 4,18.5 L4,14.5 C4,13.6715729 4.67157288,13 5.5,13 Z M14.5,4 L18.5,4 C19.3284271,4 20,4.67157288 20,5.5 L20,9.5 C20,10.3284271 19.3284271,11 18.5,11 L14.5,11 C13.6715729,11 13,10.3284271 13,9.5 L13,5.5 C13,4.67157288 13.6715729,4 14.5,4 Z M14.5,13 L18.5,13 C19.3284271,13 20,13.6715729 20,14.5 L20,18.5 C20,19.3284271 19.3284271,20 18.5,20 L14.5,20 C13.6715729,20 13,19.3284271 13,18.5 L13,14.5 C13,13.6715729 13.6715729,13 14.5,13 Z\"\r\n fill=\"#008fc7\"\r\n opacity=\"0.3\"\r\n />\r\n </g>\r\n </svg>\r\n\r\n {/* Main Modal */}\r\n {this.isModalOpen && (\r\n <div class=\"kt-quick-panel kt-quick-panel--on\">\r\n <a onClick={() => this.toggleModal()} id=\"kt_quick_panel_close_btn\" class=\"kt-quick-panel__close\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25px\" height=\"25px\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <g id=\"Menu / Close_SM\">\r\n <path id=\"Vector\" d=\"M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16\" stroke=\"#000000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n </a>\r\n <div class=\"kt-quick-panel__nav\">\r\n <ul role=\"tablist\" class=\"nav nav-tabs nav-tabs-line nav-tabs-bold nav-tabs-line-3x nav-tabs-line-brand kt-notification-item-padding-x\">\r\n <li class=\"nav-item active\">\r\n <a data-toggle=\"tab\" role=\"tab\" class=\"nav-link active\">\r\n User Preference\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n\r\n <div class=\"kt-quick-panel__content\">\r\n <div class=\"tab-content\">\r\n <div id=\"kt_quick_panel_tab_notifications\" role=\"tabpanel\" class=\"tab-pane fade show kt-scroll active ps ps--active-y\">\r\n <div class=\"kt-notification\">\r\n <div class=\"kt-portlet__body\">\r\n <div class=\"form-group\">\r\n <label>Date Format</label>\r\n <select onInput={e => (this.userPreferences.dateFormat = (e.target as HTMLSelectElement).value)}>\r\n {this.dateFormates.map(format => (\r\n <option value={format} selected={this.userPreferences.dateFormat == format}>\r\n {format}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label>Time Format</label>\r\n <select onInput={e => (this.userPreferences.timeFormat = (e.target as HTMLSelectElement).value)}>\r\n {this.timeFormats.map(format => (\r\n <option value={format} selected={this.userPreferences.timeFormat == format}>\r\n {format}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label>Font Size</label>\r\n <select onInput={e => (this.userPreferences.fontSize = (e.target as HTMLSelectElement).value)}>\r\n {this.fontSizes.map(size => (\r\n <option value={size.value} selected={this.userPreferences.fontSize == size.value}>\r\n {size.label}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label>User Display Format</label>\r\n <select onInput={e => (this.userPreferences.displayFormat = parseInt((e.target as HTMLSelectElement).value))}>\r\n {this.displayFormats.map(format => (\r\n <option value={format.value} selected={this.userPreferences.displayFormat == format.value}>\r\n {format.label}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label>Default Landing Page</label>\r\n <div class=\"input-group\" onClick={() => this.togglePageModal()}>\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"#000000\"\r\n height=\"18px\"\r\n width=\"18px\"\r\n version=\"1.1\"\r\n id=\"Layer_1\"\r\n viewBox=\"0 0 64 64\"\r\n enable-background=\"new 0 0 64 64\"\r\n >\r\n <g id=\"Link-chains\">\r\n <path d=\"M56.1697006,10.5212574C55.7126999,8.8132582,54.618,7.3864579,53.0876999,6.5036578l-9.7275009-5.6162 c-1.5303001-0.8838-3.3144989-1.1180999-5.0205994-0.6611c-1.7070007,0.458-3.1347008,1.5527-4.0185013,3.0840001 L21.9655991,24.7107582c-0.8838005,1.5301991-1.1191006,3.3134003-0.6611004,5.0205002 c0.4580002,1.7069988,1.5527,3.1338005,3.0839996,4.017498l7.5703011,4.3721008 c0.157198,0.0908012,0.3290997,0.1338005,0.4989986,0.1338005c0.3456993,0,0.6817017-0.1786995,0.8671989-0.5 c0.2764015-0.4785004,0.1123009-1.0898018-0.3661995-1.3661995l-7.5702991-4.3721008 c-1.0683994-0.6161995-1.8330002-1.612299-2.1523991-2.8027c-0.3192997-1.1903992-0.155201-2.4345989,0.4618988-3.5028992 L36.0534973,4.3103576c0.6172028-1.0683999,1.6123009-1.8329999,2.8037033-2.1523998 c1.1894989-0.3183,2.4355965-0.1552,3.5029984,0.4619l9.7275009,5.6162996 c1.0673981,0.6162004,1.8311005,1.6113005,2.1503983,2.8027c0.3193016,1.1914005,0.1553001,2.4355001-0.4618988,3.5039005 l-6.3652992,11.0243998c-0.2763023,0.4785004-0.1123009,1.0897999,0.3661995,1.3661995 c0.4755974,0.2754002,1.0888977,0.1123009,1.3662987-0.3661995l6.3652-11.0243998 C56.3923988,14.0124578,56.627697,12.2292576,56.1697006,10.5212574z\" />\r\n <path d=\"M39.6082001,30.2507572l-8.8691006-5.1201c-0.4786015-0.2763996-1.089901-0.112299-1.3662014,0.3662014 c-0.2763996,0.4784985-0.1124001,1.0897999,0.3662014,1.3661995l8.8691006,5.1201 c2.2040977,1.2734985,2.9618988,4.1026001,1.6884995,6.3066978L27.9411983,59.690258 c-0.6161995,1.0682983-1.6112995,1.8320007-2.8027,2.1512985c-1.1894989,0.3184013-2.4335995,0.1562996-3.5019989-0.4608994 l-9.7275009-5.6161995c-2.2040997-1.2734985-2.9629002-4.1026001-1.6904001-6.3067017l6.365201-11.0243988 c0.2763996-0.4785004,0.112299-1.089798-0.3662014-1.3661995c-0.4775991-0.2764015-1.0898991-0.1133003-1.3661995,0.3661995 L8.4860983,48.457756c-1.8231997,3.1592026-0.7362995,7.2139015,2.4229002,9.0391006l9.7275009,5.6161995 c1.0195999,0.5879021,2.1504002,0.8886986,3.2958984,0.8886986c0.575201,0,1.1543007-0.0751953,1.7246017-0.2284966 c1.7070999-0.4570999,3.1337986-1.5527992,4.0165997-3.0830002L42.0290985,39.289856 C43.8532982,36.1316566,42.7673988,32.0769577,39.6082001,30.2507572z\" />\r\n </g>\r\n </svg>\r\n </span>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" readonly value={this.selectedPage.name || 'Select page'} placeholder=\"Select page\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"kt-portlet__foot\">\r\n <div class=\"kt-form__actions\">\r\n <button class=\"btn btn-primary\" onClick={() => this.submitPreferences()}>\r\n Save\r\n </button>\r\n <button class=\"btn btn-secondary\" onClick={() => this.resetPreferences()}>\r\n Reset\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n\r\n {this.showToastFlag && <div class={`toast ${this.toastType}`}>{this.toastMessage}</div>}\r\n\r\n {/* Page Selection Modal */}\r\n\r\n {this.isPageModalOpen && (\r\n <div class=\"modal-overlay\">\r\n <div class=\"modal-dialog modal-md landing-modal\">\r\n <div class=\"modal-content landing-page\">\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title pull-left\"> Default Landing Page </h4>\r\n <button onClick={() => this.togglePageModal()} type=\"button\" aria-label=\"Close\" class=\"close pull-right\">\r\n <span>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15px\" height=\"15px\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <g id=\"Menu / Close_SM\">\r\n <path id=\"Vector\" d=\"M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16\" stroke=\"#000000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div class=\"modal-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"row\">\r\n <div class=\"form-group\">\r\n <label htmlFor=\"\"> Default Landing Page </label>\r\n <select class=\"ng\" onInput={e => this.changeApplication(e)}>\r\n <option value=\"\" selected={this.applicationId === null}>\r\n -- Select Application --\r\n </option>\r\n {this.userApplications.map(application => (\r\n <option value={application.applicationId} selected={this.applicationId === application.applicationId}>\r\n {application.applicationName}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <label>Select Page</label>\r\n <div style={{ maxHeight: '300px', overflowY: 'auto', overflowX: 'hidden' }}>\r\n {this.pagedPages.map(page => (\r\n <div class=\"slug-item\" onClick={() => this.selectPage(page)}>\r\n <div class=\"row\">\r\n <span class=\"text-brand\" style={{ fontWeight: '600', lineHeight: '1' }}>\r\n {page.name}\r\n </span>\r\n <small\r\n class={{\r\n 'culture-unpublished': page.pageCultureStatus == 1,\r\n 'culture-published': page.pageCultureStatus == 2,\r\n }}\r\n >\r\n {page.cultureCode}\r\n </small>\r\n </div>\r\n </div>\r\n ))}\r\n </div>\r\n\r\n {this.totalPages > 1 && (\r\n <div class=\"pagination-controls\">\r\n <button class=\"arrow-button\" disabled={this.currentPage === 1} onClick={() => this.currentPage--}>\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M15 18L9 12L15 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n <span>\r\n {this.currentPage} of {this.totalPages}\r\n </span>\r\n <button class=\"arrow-button\" disabled={this.currentPage === this.totalPages} onClick={() => this.currentPage++}>\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M9 6L15 12L9 18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"eiam-user-preference.js","sourceRoot":"","sources":["../../../src/components/eiam-user-preference/eiam-user-preference.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAOrG,MAAM,OAAO,kBAA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AW,EAAE;gDAC5G,4DAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM;oDACzD,6DAAM,CAAC,EAAC,iBAAiB,EAAC,MAAM,EAAC,cAAc,kBAAc,GAAG,oBAAgB,OAAO,qBAAiB,OAAO,GAAG,CAC9G,CACC,CACL,CACP,CACG,CACF,CACF,CAGF,CACF,CACF,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, State, Watch, h, Element, EventEmitter, Event } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'eiam-user-preference',\r\n styleUrl: 'eiam-user-preference.css',\r\n shadow: true,\r\n})\r\nexport class EiamUserPreference {\r\n @Element() host: HTMLElement;\r\n @State() currentRouteSlug: string;\r\n @State() payload = {\r\n pagination: {\r\n pageIndex: 0,\r\n pageSize: 1000,\r\n },\r\n search: {\r\n pageName: '',\r\n },\r\n };\r\n @Event() preferencesChanged: EventEmitter<any>;\r\n @State() userPreferences = {\r\n dateFormat: 'dd/MM/yyyy',\r\n timeFormat: '',\r\n fontSize: null,\r\n displayFormat: 4,\r\n defaultLandingPageId: '',\r\n pageName: '',\r\n };\r\n\r\n @State() dateFormates: string[] = ['dd/MM/yyyy', 'MM/dd/yyyy', 'yyyy-MM-dd'];\r\n @State() timeFormats: string[] = ['h:mm a'];\r\n @State() fontSizes = [\r\n { label: 'Small', value: '14' },\r\n { label: 'Medium', value: '16' },\r\n { label: 'Large', value: '18' },\r\n ];\r\n @State() displayFormats: any[] = [];\r\n @State() userApplications: any[] = [];\r\n @State() pages: any[] = [];\r\n @State() isModalOpen = false;\r\n @State() currentPage: number = 1;\r\n @State() pageSize: number = 10;\r\n @State() isPageModalOpen: boolean = false; // Controls the visibility of the secondary modal\r\n @State() selectedPage: { pageId: number; name: string } = { pageId: null, name: '' }; // To store selected page\r\n @State() showToastFlag: any;\r\n @State() toastType: any;\r\n @State() toastMessage: any;\r\n @Prop() pageId: any;\r\n @Prop() cultureCode: string;\r\n @Prop() applicationId: string;\r\n @Prop() apiUrl: string;\r\n @Watch('cultureCode')\r\n @Watch('applicationId')\r\n @Watch('pageId')\r\n @Watch('apiUrl')\r\n\r\n\r\nasync watchChanges() {\r\n await this.fetchInitiateValue();\r\n}\r\n\r\nasync componentWillLoad() {\r\n await this.fetchInitiateValue();\r\n}\r\n\r\nprivate isFetching = false;\r\nasync fetchInitiateValue() {\r\n if (!this.cultureCode || !this.applicationId || !this.apiUrl) {\r\n return; // wait until all props are ready\r\n }\r\n\r\n if (this.isFetching) return; // prevent duplicate calls\r\n this.isFetching = true;\r\n\r\n await this.getDisplayFormats();\r\n await this.getUserPreferences();\r\n await this.getUserApplications();\r\n\r\n this.isFetching = false;\r\n}\r\n\r\nprivate isFetchingDisplayFormats = false;\r\nprivate isFetchingUserPreferences = false;\r\nprivate isFetchingApplications = false;\r\n\r\n async getDisplayFormats() {\r\n if (this.isFetchingDisplayFormats) return;\r\n this.isFetchingDisplayFormats = true;\r\n try {\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n };\r\n\r\n const response = await fetch(`${this.apiUrl}/api/UserPreferences/DisplayFormats`, {\r\n method: 'GET', // Specify GET method\r\n headers: headers,\r\n credentials: 'include', // Include credentials (cookies) in the request\r\n });\r\n\r\n const data = await response.json();\r\n\r\n if (Array.isArray(data.content)) {\r\n this.displayFormats = data.content;\r\n } else {\r\n // console.error('Invalid response structure:', data);\r\n this.showToast('Something went wrong', 'error');\r\n }\r\n } catch (error) {\r\n // console.error('Error fetching display formats:', error);\r\n this.showToast('Something went wrong', 'error');\r\n }finally {\r\n this.isFetchingDisplayFormats = false;\r\n }\r\n }\r\n\r\n async getUserPreferences() {\r\n if (this.isFetchingUserPreferences) return;\r\n this.isFetchingUserPreferences = true;\r\n try {\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n };\r\n\r\n const response = await fetch(`${this.apiUrl}/api/UserPreferences/GetUserPreferences`, {\r\n method: 'GET',\r\n headers: headers,\r\n credentials: 'include',\r\n });\r\n\r\n let data = await response.json();\r\n if (data && typeof data !== 'string' && data.code == 200) {\r\n console.log(data, ' data of user preferances');\r\n \r\n const fontSizeValue = parseInt(data.content.fontSize);\r\n console.log(fontSizeValue, ' fontSizeValue of user preferances');\r\n\r\n this.userPreferences = {\r\n ...this.userPreferences,\r\n dateFormat: data.content?.dateFormat || 'dd/MM/yyyy',\r\n timeFormat: data.content?.timeFormat || this.timeFormats[0], // fallback!\r\n fontSize: !isNaN(fontSizeValue) ? fontSizeValue : parseInt(this.fontSizes[0]?.value),\r\n displayFormat: data.content?.displayFormat || 1,\r\n defaultLandingPageId: data?.content?.defaultLandingPageId,\r\n pageName: data?.content?.defaultLandingPageDetails?.name || '',\r\n };\r\n this.selectedPage.name = data.content?.defaultLandingPageDetails?.name;\r\n }\r\n this.preferencesChanged.emit(data);\r\n } catch (error) {\r\n // console.error('Error fetching user preferences:', error);\r\n this.showToast('Something went wrong', 'error');\r\n }finally {\r\n this.isFetchingUserPreferences = false;\r\n }\r\n }\r\n private showToast(message: string, type: 'success' | 'error' = 'success') {\r\n this.toastMessage = message;\r\n this.toastType = type;\r\n this.showToastFlag = true;\r\n\r\n setTimeout(() => {\r\n this.showToastFlag = false;\r\n }, 3000);\r\n }\r\n\r\n async getUserApplications() {\r\n if (this.isFetchingApplications) return;\r\n this.isFetchingApplications = true;\r\n try {\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n 'IntegrationPermission': '0f5d983d203189bbffc5f686d01f6680bc6a83718a515fe42639347efc92478e',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n };\r\n\r\n const response = await fetch(`${this.apiUrl}/api/OrganizationApplicationsApi/GetAssigndApplicationForUser`, {\r\n method: 'GET',\r\n headers: headers,\r\n credentials: 'include',\r\n });\r\n\r\n const data = await response.json();\r\n\r\n if (data && Array.isArray(data.content)) {\r\n this.userApplications = data.content.filter(el => el.applicationId !== 1);\r\n } else {\r\n // console.error('Invalid response structure:', data);\r\n this.showToast('Something went wrong', 'error');\r\n }\r\n } catch (error) {\r\n // console.error('Error fetching applications:', error);\r\n this.showToast('Something went wrong', 'error');\r\n }finally{\r\n this.isFetchingApplications = false;\r\n }\r\n }\r\n changeApplication(e: Event) {\r\n const selectedId = (e.target as HTMLSelectElement).value;\r\n\r\n if (selectedId) {\r\n this.applicationId = selectedId;\r\n // console.log(this.applicationId, 'this.applicationId on change');\r\n this.getPagesSApplications();\r\n } else {\r\n this.applicationId = null;\r\n }\r\n }\r\n\r\n async getPagesSApplications() {\r\n try {\r\n const response = await fetch(`${this.apiUrl}/api/Pages/GetPages`, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n },\r\n credentials: 'include',\r\n body: JSON.stringify(this.payload),\r\n });\r\n\r\n if (!response.ok) {\r\n // console.error('Failed to fetch pages');\r\n this.showToast('Something went wrong', 'error');\r\n return;\r\n }\r\n\r\n const data = await response.json();\r\n this.pages = data?.content?.data;\r\n // console.log(data, 'data of all pages ');\r\n } catch (error) {\r\n // console.error('Error fetching pages:', error);\r\n this.showToast('Something went wrong', 'error');\r\n }\r\n }\r\n\r\n async submitPreferences() {\r\n const fontSizeValue = parseFloat(this.userPreferences.fontSize);\r\n const fontSize = !isNaN(fontSizeValue) ? `${fontSizeValue}px` : null;\r\n let pageName = this.selectedPage.name;\r\n let defaultLandingPageId = this.selectedPage.pageId;\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n 'CultureCode': this.cultureCode,\r\n 'Source': '2',\r\n 'applicationId': this.applicationId,\r\n };\r\n // console.log(this.userPreferences, 'user preferancesss ');\r\n\r\n try {\r\n const response = await fetch(`${this.apiUrl}/api/UserPreferences/SaveUserPreferences`, {\r\n method: 'POST',\r\n headers,\r\n body: JSON.stringify({ ...this.userPreferences, fontSize, pageName: pageName, defaultLandingPageId: defaultLandingPageId }),\r\n credentials: 'include',\r\n });\r\n\r\n if (!response.ok) {\r\n // console.error('Failed to save preferences:', response.statusText);\r\n this.showToast('Something went wrong', 'error');\r\n\r\n return;\r\n }\r\n if (response.ok) {\r\n // Fetch updated preferences\r\n this.showToast('Preferences updated successfully!', 'success');\r\n\r\n const newPrefs: any = await this.getUserPreferences();\r\n if (!newPrefs || typeof newPrefs === 'string') return;\r\n }\r\n } catch (error) {\r\n this.showToast('Something went wrong', 'error');\r\n // console.error('Error submitting preferences:', error);\r\n }\r\n }\r\n\r\n async resetPreferences() {\r\n try {\r\n let res = await fetch(`${this.apiUrl}/api/UserPreferences/Delete`, {\r\n method: 'DELETE',\r\n credentials: 'include',\r\n });\r\n\r\n this.userPreferences = {\r\n dateFormat: 'dd/MM/yyyy',\r\n timeFormat: '',\r\n fontSize: '',\r\n displayFormat: 4,\r\n defaultLandingPageId: '',\r\n pageName: '',\r\n };\r\n if (res.ok) {\r\n // Fetch updated preferences\r\n this.showToast('Preferences updated successfully!', 'success');\r\n\r\n location.reload(); // If you want to refresh the UI\r\n }\r\n } catch (error) {\r\n // console.error('Failed to reset preferences', error);\r\n this.showToast('Something went wrong', 'error');\r\n }\r\n }\r\n toggleModal() {\r\n this.isModalOpen = !this.isModalOpen;\r\n }\r\n togglePageModal() {\r\n this.isPageModalOpen = !this.isPageModalOpen;\r\n }\r\n selectPage(page) {\r\n this.selectedPage = page;\r\n this.userPreferences.defaultLandingPageId = page.pageId; // Update default landing page\r\n this.togglePageModal(); // Close the page selection modal\r\n }\r\n\r\n get pagedPages() {\r\n const start = (this.currentPage - 1) * this.pageSize;\r\n const end = start + this.pageSize;\r\n return this.pages.slice(start, end);\r\n }\r\n\r\n get totalPages() {\r\n return Math.ceil(this.pages.length / this.pageSize);\r\n }\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <div class=\"container\">\r\n <svg onClick={() => this.toggleModal()} xmlns=\"http://www.w3.org/2000/svg\" \r\n width=\"28px\" height=\"28px\" viewBox=\"0 0 24 24\"\r\n style={{ cursor: 'pointer' }}>\r\n <g stroke=\"none\" fill=\"none\">\r\n <rect x=\"0\" y=\"0\" width=\"24\" height=\"24\" />\r\n <rect fill=\"#008fc7\" x=\"4\" y=\"4\" width=\"7\" height=\"7\" rx=\"1.5\" />\r\n <path\r\n d=\"M5.5,13 L9.5,13 C10.3284271,13 11,13.6715729 11,14.5 L11,18.5 C11,19.3284271 10.3284271,20 9.5,20 L5.5,20 C4.67157288,20 4,19.3284271 4,18.5 L4,14.5 C4,13.6715729 4.67157288,13 5.5,13 Z M14.5,4 L18.5,4 C19.3284271,4 20,4.67157288 20,5.5 L20,9.5 C20,10.3284271 19.3284271,11 18.5,11 L14.5,11 C13.6715729,11 13,10.3284271 13,9.5 L13,5.5 C13,4.67157288 13.6715729,4 14.5,4 Z M14.5,13 L18.5,13 C19.3284271,13 20,13.6715729 20,14.5 L20,18.5 C20,19.3284271 19.3284271,20 18.5,20 L14.5,20 C13.6715729,20 13,19.3284271 13,18.5 L13,14.5 C13,13.6715729 13.6715729,13 14.5,13 Z\"\r\n fill=\"#008fc7\"\r\n opacity=\"0.3\"\r\n />\r\n </g>\r\n </svg>\r\n\r\n {/* Main Modal */}\r\n {this.isModalOpen && (\r\n <div class=\"kt-quick-panel kt-quick-panel--on\">\r\n <a onClick={() => this.toggleModal()} id=\"kt_quick_panel_close_btn\" class=\"kt-quick-panel__close\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25px\" height=\"25px\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <g id=\"Menu / Close_SM\">\r\n <path id=\"Vector\" d=\"M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16\" stroke=\"#000000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n </a>\r\n <div class=\"kt-quick-panel__nav\">\r\n <ul role=\"tablist\" class=\"nav nav-tabs nav-tabs-line nav-tabs-bold nav-tabs-line-3x nav-tabs-line-brand kt-notification-item-padding-x\">\r\n <li class=\"nav-item active\">\r\n <a data-toggle=\"tab\" role=\"tab\" class=\"nav-link active\">\r\n User Preference\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n\r\n <div class=\"kt-quick-panel__content\">\r\n <div class=\"tab-content\">\r\n <div id=\"kt_quick_panel_tab_notifications\" role=\"tabpanel\" class=\"tab-pane fade show kt-scroll active ps ps--active-y\">\r\n <div class=\"kt-notification\">\r\n <div class=\"kt-portlet__body\">\r\n <div class=\"form-group\">\r\n <label>Date Format</label>\r\n <select onInput={e => (this.userPreferences.dateFormat = (e.target as HTMLSelectElement).value)}>\r\n {this.dateFormates.map(format => (\r\n <option value={format} selected={this.userPreferences.dateFormat == format}>\r\n {format}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label>Time Format</label>\r\n <select onInput={e => (this.userPreferences.timeFormat = (e.target as HTMLSelectElement).value)}>\r\n {this.timeFormats.map(format => (\r\n <option value={format} selected={this.userPreferences.timeFormat == format}>\r\n {format}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label>Font Size</label>\r\n <select onInput={e => (this.userPreferences.fontSize = (e.target as HTMLSelectElement).value)}>\r\n {this.fontSizes.map(size => (\r\n <option value={size.value} selected={this.userPreferences.fontSize == size.value}>\r\n {size.label}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label>User Display Format</label>\r\n <select onInput={e => (this.userPreferences.displayFormat = parseInt((e.target as HTMLSelectElement).value))}>\r\n {this.displayFormats.map(format => (\r\n <option value={format.value} selected={this.userPreferences.displayFormat == format.value}>\r\n {format.label}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label>Default Landing Page</label>\r\n <div class=\"input-group\" onClick={() => this.togglePageModal()}>\r\n <div class=\"input-group-prepend\">\r\n <span class=\"input-group-text\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"#000000\"\r\n height=\"18px\"\r\n width=\"18px\"\r\n version=\"1.1\"\r\n id=\"Layer_1\"\r\n viewBox=\"0 0 64 64\"\r\n enable-background=\"new 0 0 64 64\"\r\n >\r\n <g id=\"Link-chains\">\r\n <path d=\"M56.1697006,10.5212574C55.7126999,8.8132582,54.618,7.3864579,53.0876999,6.5036578l-9.7275009-5.6162 c-1.5303001-0.8838-3.3144989-1.1180999-5.0205994-0.6611c-1.7070007,0.458-3.1347008,1.5527-4.0185013,3.0840001 L21.9655991,24.7107582c-0.8838005,1.5301991-1.1191006,3.3134003-0.6611004,5.0205002 c0.4580002,1.7069988,1.5527,3.1338005,3.0839996,4.017498l7.5703011,4.3721008 c0.157198,0.0908012,0.3290997,0.1338005,0.4989986,0.1338005c0.3456993,0,0.6817017-0.1786995,0.8671989-0.5 c0.2764015-0.4785004,0.1123009-1.0898018-0.3661995-1.3661995l-7.5702991-4.3721008 c-1.0683994-0.6161995-1.8330002-1.612299-2.1523991-2.8027c-0.3192997-1.1903992-0.155201-2.4345989,0.4618988-3.5028992 L36.0534973,4.3103576c0.6172028-1.0683999,1.6123009-1.8329999,2.8037033-2.1523998 c1.1894989-0.3183,2.4355965-0.1552,3.5029984,0.4619l9.7275009,5.6162996 c1.0673981,0.6162004,1.8311005,1.6113005,2.1503983,2.8027c0.3193016,1.1914005,0.1553001,2.4355001-0.4618988,3.5039005 l-6.3652992,11.0243998c-0.2763023,0.4785004-0.1123009,1.0897999,0.3661995,1.3661995 c0.4755974,0.2754002,1.0888977,0.1123009,1.3662987-0.3661995l6.3652-11.0243998 C56.3923988,14.0124578,56.627697,12.2292576,56.1697006,10.5212574z\" />\r\n <path d=\"M39.6082001,30.2507572l-8.8691006-5.1201c-0.4786015-0.2763996-1.089901-0.112299-1.3662014,0.3662014 c-0.2763996,0.4784985-0.1124001,1.0897999,0.3662014,1.3661995l8.8691006,5.1201 c2.2040977,1.2734985,2.9618988,4.1026001,1.6884995,6.3066978L27.9411983,59.690258 c-0.6161995,1.0682983-1.6112995,1.8320007-2.8027,2.1512985c-1.1894989,0.3184013-2.4335995,0.1562996-3.5019989-0.4608994 l-9.7275009-5.6161995c-2.2040997-1.2734985-2.9629002-4.1026001-1.6904001-6.3067017l6.365201-11.0243988 c0.2763996-0.4785004,0.112299-1.089798-0.3662014-1.3661995c-0.4775991-0.2764015-1.0898991-0.1133003-1.3661995,0.3661995 L8.4860983,48.457756c-1.8231997,3.1592026-0.7362995,7.2139015,2.4229002,9.0391006l9.7275009,5.6161995 c1.0195999,0.5879021,2.1504002,0.8886986,3.2958984,0.8886986c0.575201,0,1.1543007-0.0751953,1.7246017-0.2284966 c1.7070999-0.4570999,3.1337986-1.5527992,4.0165997-3.0830002L42.0290985,39.289856 C43.8532982,36.1316566,42.7673988,32.0769577,39.6082001,30.2507572z\" />\r\n </g>\r\n </svg>\r\n </span>\r\n </div>\r\n <input type=\"text\" class=\"form-control\" readonly value={this.selectedPage.name || 'Select page'} placeholder=\"Select page\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"kt-portlet__foot\">\r\n <div class=\"kt-form__actions\">\r\n <button class=\"btn btn-primary\" onClick={() => this.submitPreferences()}>\r\n Save\r\n </button>\r\n <button class=\"btn btn-secondary\" onClick={() => this.resetPreferences()}>\r\n Reset\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n\r\n {this.showToastFlag && <div class={`toast ${this.toastType}`}>{this.toastMessage}</div>}\r\n\r\n {/* Page Selection Modal */}\r\n\r\n {this.isPageModalOpen && (\r\n <div class=\"modal-overlay\">\r\n <div class=\"modal-dialog modal-md landing-modal\">\r\n <div class=\"modal-content landing-page\">\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title pull-left\"> Default Landing Page </h4>\r\n <button onClick={() => this.togglePageModal()} type=\"button\" aria-label=\"Close\" class=\"close pull-right\">\r\n <span>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15px\" height=\"15px\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <g id=\"Menu / Close_SM\">\r\n <path id=\"Vector\" d=\"M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16\" stroke=\"#000000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n{/* \r\n <div class=\"modal-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"row\">\r\n <div class=\"form-group\">\r\n <label htmlFor=\"\"> Default Landing Page </label>\r\n <select class=\"ng\" onInput={e => this.changeApplication(e)}>\r\n <option value=\"\" selected={this.applicationId === null}>\r\n -- Select Application --\r\n </option>\r\n {this.userApplications.map(application => (\r\n <option value={application.applicationId} selected={this.applicationId === application.applicationId}>\r\n {application.applicationName}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <label>Select Page</label>\r\n <div style={{ maxHeight: '300px', overflowY: 'auto', overflowX: 'hidden' }}>\r\n {this.pagedPages.map(page => (\r\n <div class=\"slug-item\" onClick={() => this.selectPage(page)}>\r\n <div class=\"row\">\r\n <span class=\"text-brand\" style={{ fontWeight: '600', lineHeight: '1' }}>\r\n {page.name}\r\n </span>\r\n <small\r\n class={{\r\n 'culture-unpublished': page.pageCultureStatus == 1,\r\n 'culture-published': page.pageCultureStatus == 2,\r\n }}\r\n >\r\n {page.cultureCode}\r\n </small>\r\n </div>\r\n </div>\r\n ))}\r\n </div>\r\n\r\n {this.totalPages > 1 && (\r\n <div class=\"pagination-controls\">\r\n <button class=\"arrow-button\" disabled={this.currentPage === 1} onClick={() => this.currentPage--}>\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M15 18L9 12L15 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n <span>\r\n {this.currentPage} of {this.totalPages}\r\n </span>\r\n <button class=\"arrow-button\" disabled={this.currentPage === this.totalPages} onClick={() => this.currentPage++}>\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M9 6L15 12L9 18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div> */ }\r\n\r\n <div class=\"modal-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"row\">\r\n <div class=\"form-group\">\r\n <label htmlFor=\"\"> Default Landing Page </label>\r\n <select class=\"ng\" onInput={e => this.changeApplication(e)}>\r\n <option value=\"\" selected={this.applicationId === null}>\r\n -- Select Application --\r\n </option>\r\n {this.userApplications.map(application => (\r\n <option value={application.applicationId} selected={this.applicationId === application.applicationId}>\r\n {application.applicationName}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <label>Select Page</label>\r\n <div style={{ maxHeight: '250px', overflowY: 'auto', overflowX: 'hidden' }}>\r\n {this.pagedPages.map(page => (\r\n <div class=\"slug-item\" onClick={() => this.selectPage(page)}>\r\n <div class=\"row\">\r\n <span class=\"text-brand\" style={{ fontWeight: '600', lineHeight: '1' }}>\r\n {page.name}\r\n </span>\r\n <small\r\n class={{\r\n 'culture-unpublished': page.pageCultureStatus == 1,\r\n 'culture-published': page.pageCultureStatus == 2,\r\n }}\r\n >\r\n {page.cultureCode}\r\n </small>\r\n </div>\r\n </div>\r\n ))}\r\n </div>\r\n\r\n {this.totalPages > 1 && (\r\n <div class=\"pagination-controls\">\r\n <button class=\"arrow-button\" disabled={this.currentPage === 1} onClick={() => this.currentPage--}>\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M15 18L9 12L15 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n <span>\r\n {this.currentPage} of {this.totalPages}\r\n </span>\r\n <button class=\"arrow-button\" disabled={this.currentPage === this.totalPages} onClick={() => this.currentPage++}>\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M9 6L15 12L9 18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div> \r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|