diff options
author | Thomas Citharel <tcit@tcit.fr> | 2023-01-04 17:32:23 +0100 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2023-01-04 17:40:40 +0000 |
commit | ab6e7d33f82880174490b507378c7bf4bd2998e6 (patch) | |
tree | 8fa659b7e66925d326bed9da4600cf2956ef7dba /dist/dav-settings-personal-availability.js | |
parent | e235c6438c5013bf81ee34d283b8aea43305400f (diff) | |
download | nextcloud-server-ab6e7d33f82880174490b507378c7bf4bd2998e6.tar.gz nextcloud-server-ab6e7d33f82880174490b507378c7bf4bd2998e6.zip |
Remove jstz usage from server
Every proper browser has this kind of data now, with more up-to-date
data than what's inside this package, which hasn't been updated in 3
years.
https://github.com/pellepim/jstimezonedetect/issues/6
https://github.com/pellepim/jstimezonedetect/issues/9
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'dist/dav-settings-personal-availability.js')
-rw-r--r-- | dist/dav-settings-personal-availability.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/dav-settings-personal-availability.js b/dist/dav-settings-personal-availability.js index c15ea1bc03d..be035031452 100644 --- a/dist/dav-settings-personal-availability.js +++ b/dist/dav-settings-personal-availability.js @@ -1,3 +1,3 @@ /*! For license information please see dav-settings-personal-availability.js.LICENSE.txt */ -!function(){var e,n={78157:function(e,n,r){"use strict";var a=r(20144),o=r(9944),i=r(51796),l=r(79954),c=r(26932),u=r(81063),s=r(4820),d=r(56580),p=r.n(d),A=r(79753),v=r(45994),f=p()((function(t){return s.default.defaults.headers["X-Requested-With"]="XMLHttpRequest",u.getPatcher().patch("request",s.default),u.createClient((0,A.generateRemoteUrl)("dav/".concat(t,"/").concat((0,v.ts)().uid)))})),b=(0,r(17499).IY)().setApp("dav").detectUser().build(),m=r(7582);function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==y(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===y(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t){return function(t){if(Array.isArray(t))return w(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function k(t,e,n,r,a,o,i){try{var l=t[o](i),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,a)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(t){k(o,r,a,i,l,"next",t)}function l(t){k(o,r,a,i,l,"throw",t)}i(void 0)}))}}function S(){return P.apply(this,arguments)}function P(){return(P=O(regeneratorRuntime.mark((function t(){var e,n,r,a,o,l,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=f("calendars"),t.next=3,a.customRequest("inbox",{method:"PROPFIND",data:'<?xml version="1.0"?>\n\t\t\t<x0:propfind xmlns:x0="DAV:">\n\t\t\t <x0:prop>\n\t\t\t\t<x1:calendar-availability xmlns:x1="urn:ietf:params:xml:ns:caldav"/>\n\t\t\t </x0:prop>\n\t\t\t</x0:propfind>'});case 3:return o=t.sent,t.next=6,(0,m.parseXML)(o.data);case 6:if(l=t.sent){t.next=9;break}return t.abrupt("return",void 0);case 9:if(c=null==l||null===(e=l.multistatus)||void 0===e||null===(n=e.response[0])||void 0===n||null===(r=n.propstat)||void 0===r?void 0:r.prop["calendar-availability"]){t.next=12;break}return t.abrupt("return",void 0);case 12:return t.abrupt("return",(0,i.Xg)(c));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function B(t,e){return j.apply(this,arguments)}function j(){return(j=O(regeneratorRuntime.mark((function t(e,n){var r,a,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=h(Object.keys(e).flatMap((function(t){return e[t].map((function(e){return x(x({},e),{},{day:t})}))}))),a=(0,i.ST)(r,n),b.debug("New availability ical created",{vavailability:a}),o=f("calendars"),t.next=6,o.customRequest("inbox",{method:"PROPPATCH",data:'<?xml version="1.0"?>\n\t\t\t<x0:propertyupdate xmlns:x0="DAV:">\n\t\t\t <x0:set>\n\t\t\t\t<x0:prop>\n\t\t\t\t <x1:calendar-availability xmlns:x1="urn:ietf:params:xml:ns:caldav">'.concat(a,"</x1:calendar-availability>\n\t\t\t\t</x0:prop>\n\t\t\t </x0:set>\n\t\t\t</x0:propertyupdate>")});case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t,e,n,r,a,o,i){try{var l=t[o](i),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,a)}function R(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(t){D(o,r,a,i,l,"next",t)}function l(t){D(o,r,a,i,l,"throw",t)}i(void 0)}))}}function _(){return E.apply(this,arguments)}function E(){return(E=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.default.post((0,A.generateOcsUrl)("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}),{configValue:"yes"});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(){return $.apply(this,arguments)}function $(){return($=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.default.delete((0,A.generateOcsUrl)("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var z=r(55586),I=r.n(z),U=r(10861),N=r.n(U),M=r(20571),F=r.n(M),q=r(13299),Z=r.n(q),W=r(31144),Y=r.n(W);function H(t,e,n,r,a,o,i){try{var l=t[o](i),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,a)}function K(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(t){H(o,r,a,i,l,"next",t)}function l(t){H(o,r,a,i,l,"throw",t)}i(void 0)}))}}var X={name:"Availability",components:{NcButton:N(),NcCheckboxRadioSwitch:F(),CalendarAvailability:i.Dx,NcSettingsSection:Z(),NcTimezonePicker:Y()},data:function(){var t=I().determine();return{loading:!0,saving:!1,timezone:t?t.name():"UTC",slots:{MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]},automated:"yes"===(0,l.j)("dav","user_status_automation")}},mounted:function(){var e=this;return K(regeneratorRuntime.mark((function n(){var r,a,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,S();case 3:(r=n.sent)?(a=r.slots,o=r.timezoneId,e.slots=a,o&&(e.timezone=o),console.info("availability loaded",e.slots,e.timezoneId)):(console.info("no availability is set"),e.slots={MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]}),n.next=11;break;case 7:n.prev=7,n.t0=n.catch(0),console.error("could not load existing availability",n.t0),(0,c.x2)(t("dav","Failed to load availability"));case 11:return n.prev=11,e.loading=!1,n.finish(11);case 14:case"end":return n.stop()}}),n,null,[[0,7,11,14]])})))()},methods:{save:function(){var e=this;return K(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,e.saving=!0,n.next=4,B(e.slots,e.timezone);case 4:if(!e.automated){n.next=9;break}return n.next=7,_();case 7:n.next=11;break;case 9:return n.next=11,T();case 11:(0,c.s$)(t("dav","Saved availability")),n.next=18;break;case 14:n.prev=14,n.t0=n.catch(0),console.error("could not save availability",n.t0),(0,c.x2)(t("dav","Failed to save availability"));case 18:return n.prev=18,e.saving=!1,n.finish(18);case 21:case"end":return n.stop()}}),n,null,[[0,14,18,21]])})))()}}},V=r(93379),L=r.n(V),G=r(7795),Q=r.n(G),J=r(90569),tt=r.n(J),et=r(3565),nt=r.n(et),rt=r(19216),at=r.n(rt),ot=r(44589),it=r.n(ot),lt=r(69110),ct={};ct.styleTagTransform=it(),ct.setAttributes=nt(),ct.insert=tt().bind(null,"head"),ct.domAPI=Q(),ct.insertStyleElement=at(),L()(lt.Z,ct),lt.Z&<.Z.locals&<.Z.locals;var ut=(0,r(51900).Z)(X,(function(){var t=this,e=t._self._c;return e("NcSettingsSection",{attrs:{title:t.$t("dav","Availability"),description:t.$t("dav","If you configure your working hours, other users will see when you are out of office when they book a meeting.")}},[e("div",{staticClass:"time-zone"},[e("strong",[t._v("\n\t\t\t"+t._s(t.$t("dav","Time zone:"))+"\n\t\t")]),t._v(" "),e("span",{staticClass:"time-zone-text"},[e("NcTimezonePicker",{model:{value:t.timezone,callback:function(e){t.timezone=e},expression:"timezone"}})],1)]),t._v(" "),e("CalendarAvailability",{attrs:{slots:t.slots,loading:t.loading,"l10n-to":t.$t("dav","to"),"l10n-delete-slot":t.$t("dav","Delete slot"),"l10n-empty-day":t.$t("dav","No working hours set"),"l10n-add-slot":t.$t("dav","Add slot"),"l10n-monday":t.$t("dav","Monday"),"l10n-tuesday":t.$t("dav","Tuesday"),"l10n-wednesday":t.$t("dav","Wednesday"),"l10n-thursday":t.$t("dav","Thursday"),"l10n-friday":t.$t("dav","Friday"),"l10n-saturday":t.$t("dav","Saturday"),"l10n-sunday":t.$t("dav","Sunday")},on:{"update:slots":function(e){t.slots=e}}}),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.automated},on:{"update:checked":function(e){t.automated=e}}},[t._v("\n\t\t"+t._s(t.$t("dav",'Automatically set user status to "Do not disturb" outside of availability to mute all notifications.'))+"\n\t")]),t._v(" "),e("NcButton",{attrs:{disabled:t.loading||t.saving,type:"primary"},on:{click:t.save}},[t._v("\n\t\t"+t._s(t.$t("dav","Save"))+"\n\t")])],1)}),[],!1,null,"e90bacba",null).exports;a.ZP.prototype.$t=o.translate,new(a.ZP.extend(ut))({}).$mount("#settings-personal-availability")},69110:function(t,e,n){"use strict";var r=n(87537),a=n.n(r),o=n(23645),i=n.n(o)()(a());i.push([t.id,".availability-day[data-v-e90bacba]{padding:0 10px 0 10px;position:absolute}.availability-slots[data-v-e90bacba]{display:flex;white-space:nowrap}.availability-slot[data-v-e90bacba]{display:flex;flex-direction:row;align-items:center}.availability-slot-group[data-v-e90bacba]{display:flex;flex-direction:column}[data-v-e90bacba] .mx-input-wrapper{width:85px}[data-v-e90bacba] .mx-datepicker{width:97px}[data-v-e90bacba] .multiselect{border:1px solid var(--color-border-dark);width:120px}.time-zone[data-v-e90bacba]{padding:32px 12px 12px 0}.grid-table[data-v-e90bacba]{display:grid;margin-bottom:32px;grid-column-gap:24px;grid-row-gap:6px;grid-template-columns:min-content min-content min-content}.button[data-v-e90bacba]{align-self:flex-end}.label-weekday[data-v-e90bacba]{position:relative;display:inline-flex;padding-top:4px}.delete-slot[data-v-e90bacba]{background-color:rgba(0,0,0,0);border:none;padding-bottom:12px;opacity:.5}.delete-slot[data-v-e90bacba]:hover{opacity:1}.add-another[data-v-e90bacba]{background-color:rgba(0,0,0,0);border:none;opacity:.5;display:inline-flex;padding:0;margin:0;margin-bottom:3px}.add-another[data-v-e90bacba]:hover{opacity:1}.to-text[data-v-e90bacba]{padding-right:12px}.time-zone-text[data-v-e90bacba]{padding-left:22px}.empty-content[data-v-e90bacba]{color:var(--color-text-lighter);margin-top:4px}","",{version:3,sources:["webpack://./apps/dav/src/views/Availability.vue"],names:[],mappings:"AACA,mCACC,qBAAA,CACA,iBAAA,CAED,qCACC,YAAA,CACA,kBAAA,CAED,oCACC,YAAA,CACA,kBAAA,CACA,kBAAA,CAED,0CACC,YAAA,CACA,qBAAA,CAED,oCACC,UAAA,CAED,iCACC,UAAA,CAED,+BACC,yCAAA,CACA,WAAA,CAED,4BACC,wBAAA,CAED,6BACC,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,gBAAA,CACA,yDAAA,CAED,yBACC,mBAAA,CAED,gCACC,iBAAA,CACA,mBAAA,CACA,eAAA,CAED,8BACC,8BAAA,CACA,WAAA,CACA,mBAAA,CACA,UAAA,CACA,oCACC,SAAA,CAIF,8BACC,8BAAA,CACA,WAAA,CACA,UAAA,CACA,mBAAA,CACA,SAAA,CACA,QAAA,CACA,iBAAA,CAEA,oCACC,SAAA,CAGF,0BACC,kBAAA,CAED,iCACC,iBAAA,CAED,gCACC,+BAAA,CACA,cAAA",sourcesContent:["\n.availability-day {\n\tpadding: 0 10px 0 10px;\n\tposition: absolute;\n}\n.availability-slots {\n\tdisplay: flex;\n\twhite-space: nowrap;\n}\n.availability-slot {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n}\n.availability-slot-group {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n::v-deep .mx-input-wrapper {\n\twidth: 85px;\n}\n::v-deep .mx-datepicker {\n\twidth: 97px;\n}\n::v-deep .multiselect {\n\tborder: 1px solid var(--color-border-dark);\n\twidth: 120px;\n}\n.time-zone {\n\tpadding: 32px 12px 12px 0;\n}\n.grid-table {\n\tdisplay: grid;\n\tmargin-bottom: 32px;\n\tgrid-column-gap: 24px;\n\tgrid-row-gap: 6px;\n\tgrid-template-columns: min-content min-content min-content;\n}\n.button {\n\talign-self: flex-end;\n}\n.label-weekday {\n\tposition: relative;\n\tdisplay: inline-flex;\n\tpadding-top: 4px;\n}\n.delete-slot {\n\tbackground-color: transparent;\n\tborder: none;\n\tpadding-bottom: 12px;\n\topacity: .5;\n\t&:hover {\n\t\topacity: 1;\n\t}\n}\n\n.add-another {\n\tbackground-color: transparent;\n\tborder: none;\n\topacity: .5;\n\tdisplay: inline-flex;\n\tpadding: 0;\n\tmargin: 0;\n\tmargin-bottom: 3px;\n\n\t&:hover {\n\t\topacity: 1;\n\t}\n}\n.to-text {\n\tpadding-right: 12px;\n}\n.time-zone-text{\n\tpadding-left: 22px;\n}\n.empty-content {\n\tcolor: var(--color-text-lighter);\n\tmargin-top: 4px;\n}\n\n"],sourceRoot:""}]),e.Z=i},69862:function(){},40964:function(){}},r={};function a(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}a.m=n,a.amdD=function(){throw new Error("define cannot be used indirect")},a.amdO={},e=[],a.O=function(t,n,r,o){if(!n){var i=1/0;for(s=0;s<e.length;s++){n=e[s][0],r=e[s][1],o=e[s][2];for(var l=!0,c=0;c<n.length;c++)(!1&o||i>=o)&&Object.keys(a.O).every((function(t){return a.O[t](n[c])}))?n.splice(c--,1):(l=!1,o<i&&(i=o));if(l){e.splice(s--,1);var u=r();void 0!==u&&(t=u)}}return t}o=o||0;for(var s=e.length;s>0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[n,r,o]},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},a.j=3347,function(){a.b=document.baseURI||self.location.href;var t={3347:0};a.O.j=function(e){return 0===t[e]};var e=function(e,n){var r,o,i=n[0],l=n[1],c=n[2],u=0;if(i.some((function(e){return 0!==t[e]}))){for(r in l)a.o(l,r)&&(a.m[r]=l[r]);if(c)var s=c(a)}for(e&&e(n);u<i.length;u++)o=i[u],a.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return a.O(s)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),a.nc=void 0;var o=a.O(void 0,[7874],(function(){return a(78157)}));o=a.O(o)}(); -//# sourceMappingURL=dav-settings-personal-availability.js.map?v=afc4a1b6b54e59b4e478
\ No newline at end of file +!function(){var n,e={1224:function(n,e,r){"use strict";var a=r(20144),o=r(9944),i=r(51796),l=r(79954),u=r(26932),s=r(81063),c=r(4820),d=r(56580),p=r.n(d),A=r(79753),v=r(45994),f=p()((function(t){return c.default.defaults.headers["X-Requested-With"]="XMLHttpRequest",s.getPatcher().patch("request",c.default),s.createClient((0,A.generateRemoteUrl)("dav/".concat(t,"/").concat((0,v.ts)().uid)))})),m=(0,r(17499).IY)().setApp("dav").detectUser().build(),y=r(7582);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function g(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function x(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?g(Object(e),!0).forEach((function(n){C(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):g(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function C(t,n,e){return(n=function(t){var n=function(t,n){if("object"!==b(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,n);if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===b(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function h(t){return function(t){if(Array.isArray(t))return w(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return w(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?w(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function k(t,n,e,r,a,o,i){try{var l=t[o](i),u=l.value}catch(t){return void e(t)}l.done?n(u):Promise.resolve(u).then(r,a)}function O(t){return function(){var n=this,e=arguments;return new Promise((function(r,a){var o=t.apply(n,e);function i(t){k(o,r,a,i,l,"next",t)}function l(t){k(o,r,a,i,l,"throw",t)}i(void 0)}))}}function S(){return P.apply(this,arguments)}function P(){return(P=O(regeneratorRuntime.mark((function t(){var n,e,r,a,o,l,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=f("calendars"),t.next=3,a.customRequest("inbox",{method:"PROPFIND",data:'<?xml version="1.0"?>\n\t\t\t<x0:propfind xmlns:x0="DAV:">\n\t\t\t <x0:prop>\n\t\t\t\t<x1:calendar-availability xmlns:x1="urn:ietf:params:xml:ns:caldav"/>\n\t\t\t </x0:prop>\n\t\t\t</x0:propfind>'});case 3:return o=t.sent,t.next=6,(0,y.parseXML)(o.data);case 6:if(l=t.sent){t.next=9;break}return t.abrupt("return",void 0);case 9:if(u=null==l||null===(n=l.multistatus)||void 0===n||null===(e=n.response[0])||void 0===e||null===(r=e.propstat)||void 0===r?void 0:r.prop["calendar-availability"]){t.next=12;break}return t.abrupt("return",void 0);case 12:return t.abrupt("return",(0,i.Xg)(u));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function B(t,n){return j.apply(this,arguments)}function j(){return(j=O(regeneratorRuntime.mark((function t(n,e){var r,a,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=h(Object.keys(n).flatMap((function(t){return n[t].map((function(n){return x(x({},n),{},{day:t})}))}))),a=(0,i.ST)(r,e),m.debug("New availability ical created",{vavailability:a}),o=f("calendars"),t.next=6,o.customRequest("inbox",{method:"PROPPATCH",data:'<?xml version="1.0"?>\n\t\t\t<x0:propertyupdate xmlns:x0="DAV:">\n\t\t\t <x0:set>\n\t\t\t\t<x0:prop>\n\t\t\t\t <x1:calendar-availability xmlns:x1="urn:ietf:params:xml:ns:caldav">'.concat(a,"</x1:calendar-availability>\n\t\t\t\t</x0:prop>\n\t\t\t </x0:set>\n\t\t\t</x0:propertyupdate>")});case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t,n,e,r,a,o,i){try{var l=t[o](i),u=l.value}catch(t){return void e(t)}l.done?n(u):Promise.resolve(u).then(r,a)}function R(t){return function(){var n=this,e=arguments;return new Promise((function(r,a){var o=t.apply(n,e);function i(t){D(o,r,a,i,l,"next",t)}function l(t){D(o,r,a,i,l,"throw",t)}i(void 0)}))}}function _(){return E.apply(this,arguments)}function E(){return(E=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.default.post((0,A.generateOcsUrl)("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}),{configValue:"yes"});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(){return $.apply(this,arguments)}function $(){return($=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.default.delete((0,A.generateOcsUrl)("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var z=r(10861),I=r.n(z),U=r(20571),N=r.n(U),F=r(13299),M=r.n(F),Z=r(31144),q=r.n(Z);function W(t,n,e,r,a,o,i){try{var l=t[o](i),u=l.value}catch(t){return void e(t)}l.done?n(u):Promise.resolve(u).then(r,a)}function Y(t){return function(){var n=this,e=arguments;return new Promise((function(r,a){var o=t.apply(n,e);function i(t){W(o,r,a,i,l,"next",t)}function l(t){W(o,r,a,i,l,"throw",t)}i(void 0)}))}}var H={name:"Availability",components:{NcButton:I(),NcCheckboxRadioSwitch:N(),CalendarAvailability:i.Dx,NcSettingsSection:M(),NcTimezonePicker:q()},data:function(){var t,n,e;return{loading:!0,saving:!1,timezone:null!==(t=null===(n=new Intl.DateTimeFormat)||void 0===n||null===(e=n.resolvedOptions())||void 0===e?void 0:e.timeZone)&&void 0!==t?t:"UTC",slots:{MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]},automated:"yes"===(0,l.j)("dav","user_status_automation")}},mounted:function(){var n=this;return Y(regeneratorRuntime.mark((function e(){var r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,S();case 3:(r=e.sent)?(a=r.slots,o=r.timezoneId,n.slots=a,o&&(n.timezone=o),console.info("availability loaded",n.slots,n.timezoneId)):(console.info("no availability is set"),n.slots={MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]}),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("could not load existing availability",e.t0),(0,u.x2)(t("dav","Failed to load availability"));case 11:return e.prev=11,n.loading=!1,e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,7,11,14]])})))()},methods:{save:function(){var n=this;return Y(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n.saving=!0,e.next=4,B(n.slots,n.timezone);case 4:if(!n.automated){e.next=9;break}return e.next=7,_();case 7:e.next=11;break;case 9:return e.next=11,T();case 11:(0,u.s$)(t("dav","Saved availability")),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),console.error("could not save availability",e.t0),(0,u.x2)(t("dav","Failed to save availability"));case 18:return e.prev=18,n.saving=!1,e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[0,14,18,21]])})))()}}},K=r(93379),X=r.n(K),V=r(7795),L=r.n(V),G=r(90569),Q=r.n(G),J=r(3565),tt=r.n(J),nt=r(19216),et=r.n(nt),rt=r(44589),at=r.n(rt),ot=r(5550),it={};it.styleTagTransform=at(),it.setAttributes=tt(),it.insert=Q().bind(null,"head"),it.domAPI=L(),it.insertStyleElement=et(),X()(ot.Z,it),ot.Z&&ot.Z.locals&&ot.Z.locals;var lt=(0,r(51900).Z)(H,(function(){var t=this,n=t._self._c;return n("NcSettingsSection",{attrs:{title:t.$t("dav","Availability"),description:t.$t("dav","If you configure your working hours, other users will see when you are out of office when they book a meeting.")}},[n("div",{staticClass:"time-zone"},[n("strong",[t._v("\n\t\t\t"+t._s(t.$t("dav","Time zone:"))+"\n\t\t")]),t._v(" "),n("span",{staticClass:"time-zone-text"},[n("NcTimezonePicker",{model:{value:t.timezone,callback:function(n){t.timezone=n},expression:"timezone"}})],1)]),t._v(" "),n("CalendarAvailability",{attrs:{slots:t.slots,loading:t.loading,"l10n-to":t.$t("dav","to"),"l10n-delete-slot":t.$t("dav","Delete slot"),"l10n-empty-day":t.$t("dav","No working hours set"),"l10n-add-slot":t.$t("dav","Add slot"),"l10n-monday":t.$t("dav","Monday"),"l10n-tuesday":t.$t("dav","Tuesday"),"l10n-wednesday":t.$t("dav","Wednesday"),"l10n-thursday":t.$t("dav","Thursday"),"l10n-friday":t.$t("dav","Friday"),"l10n-saturday":t.$t("dav","Saturday"),"l10n-sunday":t.$t("dav","Sunday")},on:{"update:slots":function(n){t.slots=n}}}),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.automated},on:{"update:checked":function(n){t.automated=n}}},[t._v("\n\t\t"+t._s(t.$t("dav",'Automatically set user status to "Do not disturb" outside of availability to mute all notifications.'))+"\n\t")]),t._v(" "),n("NcButton",{attrs:{disabled:t.loading||t.saving,type:"primary"},on:{click:t.save}},[t._v("\n\t\t"+t._s(t.$t("dav","Save"))+"\n\t")])],1)}),[],!1,null,"24aa351b",null).exports;a.ZP.prototype.$t=o.translate,new(a.ZP.extend(lt))({}).$mount("#settings-personal-availability")},5550:function(t,n,e){"use strict";var r=e(87537),a=e.n(r),o=e(23645),i=e.n(o)()(a());i.push([t.id,".availability-day[data-v-24aa351b]{padding:0 10px 0 10px;position:absolute}.availability-slots[data-v-24aa351b]{display:flex;white-space:nowrap}.availability-slot[data-v-24aa351b]{display:flex;flex-direction:row;align-items:center}.availability-slot-group[data-v-24aa351b]{display:flex;flex-direction:column}[data-v-24aa351b] .mx-input-wrapper{width:85px}[data-v-24aa351b] .mx-datepicker{width:97px}[data-v-24aa351b] .multiselect{border:1px solid var(--color-border-dark);width:120px}.time-zone[data-v-24aa351b]{padding:32px 12px 12px 0}.grid-table[data-v-24aa351b]{display:grid;margin-bottom:32px;grid-column-gap:24px;grid-row-gap:6px;grid-template-columns:min-content min-content min-content}.button[data-v-24aa351b]{align-self:flex-end}.label-weekday[data-v-24aa351b]{position:relative;display:inline-flex;padding-top:4px}.delete-slot[data-v-24aa351b]{background-color:rgba(0,0,0,0);border:none;padding-bottom:12px;opacity:.5}.delete-slot[data-v-24aa351b]:hover{opacity:1}.add-another[data-v-24aa351b]{background-color:rgba(0,0,0,0);border:none;opacity:.5;display:inline-flex;padding:0;margin:0;margin-bottom:3px}.add-another[data-v-24aa351b]:hover{opacity:1}.to-text[data-v-24aa351b]{padding-right:12px}.time-zone-text[data-v-24aa351b]{padding-left:22px}.empty-content[data-v-24aa351b]{color:var(--color-text-lighter);margin-top:4px}","",{version:3,sources:["webpack://./apps/dav/src/views/Availability.vue"],names:[],mappings:"AACA,mCACC,qBAAA,CACA,iBAAA,CAED,qCACC,YAAA,CACA,kBAAA,CAED,oCACC,YAAA,CACA,kBAAA,CACA,kBAAA,CAED,0CACC,YAAA,CACA,qBAAA,CAED,oCACC,UAAA,CAED,iCACC,UAAA,CAED,+BACC,yCAAA,CACA,WAAA,CAED,4BACC,wBAAA,CAED,6BACC,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,gBAAA,CACA,yDAAA,CAED,yBACC,mBAAA,CAED,gCACC,iBAAA,CACA,mBAAA,CACA,eAAA,CAED,8BACC,8BAAA,CACA,WAAA,CACA,mBAAA,CACA,UAAA,CACA,oCACC,SAAA,CAIF,8BACC,8BAAA,CACA,WAAA,CACA,UAAA,CACA,mBAAA,CACA,SAAA,CACA,QAAA,CACA,iBAAA,CAEA,oCACC,SAAA,CAGF,0BACC,kBAAA,CAED,iCACC,iBAAA,CAED,gCACC,+BAAA,CACA,cAAA",sourcesContent:["\n.availability-day {\n\tpadding: 0 10px 0 10px;\n\tposition: absolute;\n}\n.availability-slots {\n\tdisplay: flex;\n\twhite-space: nowrap;\n}\n.availability-slot {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n}\n.availability-slot-group {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n::v-deep .mx-input-wrapper {\n\twidth: 85px;\n}\n::v-deep .mx-datepicker {\n\twidth: 97px;\n}\n::v-deep .multiselect {\n\tborder: 1px solid var(--color-border-dark);\n\twidth: 120px;\n}\n.time-zone {\n\tpadding: 32px 12px 12px 0;\n}\n.grid-table {\n\tdisplay: grid;\n\tmargin-bottom: 32px;\n\tgrid-column-gap: 24px;\n\tgrid-row-gap: 6px;\n\tgrid-template-columns: min-content min-content min-content;\n}\n.button {\n\talign-self: flex-end;\n}\n.label-weekday {\n\tposition: relative;\n\tdisplay: inline-flex;\n\tpadding-top: 4px;\n}\n.delete-slot {\n\tbackground-color: transparent;\n\tborder: none;\n\tpadding-bottom: 12px;\n\topacity: .5;\n\t&:hover {\n\t\topacity: 1;\n\t}\n}\n\n.add-another {\n\tbackground-color: transparent;\n\tborder: none;\n\topacity: .5;\n\tdisplay: inline-flex;\n\tpadding: 0;\n\tmargin: 0;\n\tmargin-bottom: 3px;\n\n\t&:hover {\n\t\topacity: 1;\n\t}\n}\n.to-text {\n\tpadding-right: 12px;\n}\n.time-zone-text{\n\tpadding-left: 22px;\n}\n.empty-content {\n\tcolor: var(--color-text-lighter);\n\tmargin-top: 4px;\n}\n\n"],sourceRoot:""}]),n.Z=i},69862:function(){},40964:function(){}},r={};function a(t){var n=r[t];if(void 0!==n)return n.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}a.m=e,n=[],a.O=function(t,e,r,o){if(!e){var i=1/0;for(c=0;c<n.length;c++){e=n[c][0],r=n[c][1],o=n[c][2];for(var l=!0,u=0;u<e.length;u++)(!1&o||i>=o)&&Object.keys(a.O).every((function(t){return a.O[t](e[u])}))?e.splice(u--,1):(l=!1,o<i&&(i=o));if(l){n.splice(c--,1);var s=r();void 0!==s&&(t=s)}}return t}o=o||0;for(var c=n.length;c>0&&n[c-1][2]>o;c--)n[c]=n[c-1];n[c]=[e,r,o]},a.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(n,{a:n}),n},a.d=function(t,n){for(var e in n)a.o(n,e)&&!a.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},a.j=3347,function(){a.b=document.baseURI||self.location.href;var t={3347:0};a.O.j=function(n){return 0===t[n]};var n=function(n,e){var r,o,i=e[0],l=e[1],u=e[2],s=0;if(i.some((function(n){return 0!==t[n]}))){for(r in l)a.o(l,r)&&(a.m[r]=l[r]);if(u)var c=u(a)}for(n&&n(e);s<i.length;s++)o=i[s],a.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return a.O(c)},e=self.webpackChunknextcloud=self.webpackChunknextcloud||[];e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))}(),a.nc=void 0;var o=a.O(void 0,[7874],(function(){return a(1224)}));o=a.O(o)}(); +//# sourceMappingURL=dav-settings-personal-availability.js.map?v=dcf085f89df050f10c20
\ No newline at end of file |