@olenbetong/appframe-core 2.12.0 → 2.13.0
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/esm/af.common.js +9 -3
- package/dist/esm/af.common.legacy.js +9 -3
- package/dist/esm/af.common.legacy.min.js +2 -2
- package/dist/esm/af.common.legacy.min.js.map +1 -1
- package/dist/esm/af.common.min.js +2 -2
- package/dist/esm/af.common.min.js.map +1 -1
- package/dist/iife/af.common.js +9 -3
- package/dist/iife/af.common.legacy.js +9 -3
- package/dist/iife/af.common.legacy.min.js +2 -2
- package/dist/iife/af.common.legacy.min.js.map +1 -1
- package/dist/iife/af.common.min.js +2 -2
- package/dist/iife/af.common.min.js.map +1 -1
- package/es/filter/operators.js +8 -2
- package/es/filter/operators.test.js +2 -1
- package/es/filter/tree.test.js +1 -1
- package/es/index.js +1 -1
- package/package.json +1 -1
- package/src/filter/operators.test.ts +2 -1
- package/src/filter/operators.ts +8 -2
- package/src/filter/tree.test.ts +1 -1
package/dist/iife/af.common.js
CHANGED
|
@@ -732,13 +732,19 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
732
732
|
...COMPARISONS
|
|
733
733
|
]
|
|
734
734
|
};
|
|
735
|
-
/**
|
|
735
|
+
/**
|
|
736
|
+
* Default operator per field type.
|
|
737
|
+
*
|
|
738
|
+
* Text defaults to `contains` because a substring search is what people
|
|
739
|
+
* reach for when they type into a filter box without picking an operator —
|
|
740
|
+
* `beginswith` silently misses matches in the middle of the value.
|
|
741
|
+
*/
|
|
736
742
|
const DEFAULT_OPERATOR_BY_TYPE = {
|
|
737
743
|
date: "equals",
|
|
738
744
|
datetime: "equals",
|
|
739
745
|
number: "equals",
|
|
740
746
|
boolean: "istrue",
|
|
741
|
-
string: "
|
|
747
|
+
string: "contains",
|
|
742
748
|
uniqueidentifier: "beginswith"
|
|
743
749
|
};
|
|
744
750
|
/**
|
|
@@ -2046,7 +2052,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2046
2052
|
|
|
2047
2053
|
//#endregion
|
|
2048
2054
|
//#region src/index.ts
|
|
2049
|
-
const version = "2.
|
|
2055
|
+
const version = "2.12.0";
|
|
2050
2056
|
|
|
2051
2057
|
//#endregion
|
|
2052
2058
|
exports.ConfirmButtons = ConfirmButtons;
|
|
@@ -686,13 +686,19 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
686
686
|
...COMPARISONS
|
|
687
687
|
]
|
|
688
688
|
};
|
|
689
|
-
/**
|
|
689
|
+
/**
|
|
690
|
+
* Default operator per field type.
|
|
691
|
+
*
|
|
692
|
+
* Text defaults to `contains` because a substring search is what people
|
|
693
|
+
* reach for when they type into a filter box without picking an operator —
|
|
694
|
+
* `beginswith` silently misses matches in the middle of the value.
|
|
695
|
+
*/
|
|
690
696
|
const DEFAULT_OPERATOR_BY_TYPE = {
|
|
691
697
|
date: "equals",
|
|
692
698
|
datetime: "equals",
|
|
693
699
|
number: "equals",
|
|
694
700
|
boolean: "istrue",
|
|
695
|
-
string: "
|
|
701
|
+
string: "contains",
|
|
696
702
|
uniqueidentifier: "beginswith"
|
|
697
703
|
};
|
|
698
704
|
/**
|
|
@@ -2000,7 +2006,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2000
2006
|
|
|
2001
2007
|
//#endregion
|
|
2002
2008
|
//#region src/index.ts
|
|
2003
|
-
const version = "2.
|
|
2009
|
+
const version = "2.12.0";
|
|
2004
2010
|
|
|
2005
2011
|
//#endregion
|
|
2006
2012
|
exports.ConfirmButtons = ConfirmButtons;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
this.af=this.af||{},this.af.common=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}var n=class{eventHandler=t();authenticated(){this.eventHandler.emit(`onAuthenticated`)}async expired(e,t){try{let n=new Promise(t=>{let n=()=>{this.eventHandler.off(`onAuthenticated`,n),e?.(),t()};this.eventHandler.on(`onAuthenticated`,n)}),r=document.querySelector(`dialog.session-expired-dialog`);if(r)await n;else{r=document.createElement(`dialog`),r.className=`session-expired-dialog`,r.style.display=`flex`,r.style.padding=`0`,r.style.left=`50%`,r.style.transform=`translateX(-50%)`;let e=`/login?ReturnUrl=%2fapi/sessionexpired/remove`;t===`RequireTwoFactor`?e=`/login?RequireTwoFactor=1&ReturnUrl=%2fapi/sessionexpired/remove`:await fetch(`/logout`,{method:`POST`}),r.innerHTML=`<iframe sandbox="allow-same-origin allow-scripts allow-modals allow-top-navigation-by-user-activation allow-forms" src="${e}" style="border:0;width:min(500px,100vw);height:min(700px, 100vh);"></iframe>`,document.body.append(r),r.showModal(),await n,r.remove()}}catch{window.location.href=`/login?ReturnUrl=${encodeURIComponent(window.location.pathname)}${encodeURIComponent(window.location.search)}`}}attachEvent(e,t){return this.eventHandler.on(e,t)}detachEvent(e,t){return this.eventHandler.off(e,t)}},r=class extends n{amDesignator=`a.m.`;dayNames=[`sunday`,`monday`,`tuesday`,`wednesday`,`thursday`,`friday`,`saturday`];dayNamesShort=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];decimalSeparator=`.`;domain=`OB`;email;formats;groupSeparator=null;integratedSecurity=!1;isDeveloper=!1;login=``;loginType;monthNames=[`january`,`february`,`march`,`april`,`may`,`june`,`july`,`august`,`september`,`october`,`november`,`december`,``];monthNamesShort=[`jan`,`feb`,`mar`,`apr`,`may`,`jun`,`jul`,`augt`,`sep`,`oct`,`nov`,`dec`,``];name;pmDesignator=`p.m.`;shortDateFormat=`dd.MM.yyyy`;culture=`en-GB`;uiculture=`en-GB`;constructor(e){super(),this.formats={},Object.assign(this,e)}};let i=window.af?.article?.id??window.window?.location.pathname.substring(1).split(`/`)[0];async function a(e,t={},n=0){try{let r=await fetch(`/api/logging/log-activity`,{method:`POST`,body:JSON.stringify({article:i,timeElapsed:n,action:e,parameters:{...t,_session:m()}}),headers:{"Content-Type":`application/json`,Accept:`application/json`}});if(!r.ok){if(r.headers.get(`Content-Type`)?.includes(`application/json`)){let e=await r.json();console.error(e.error)}else console.error(`${r.status} ${r.statusText}`)}}catch{}}function o(e,t={}){let n=performance.now();return(r={})=>a(e,{...t,...r},performance.now()-n)}async function s(e){let t=performance.now();return[await e(),performance.now()-t]}async function c(e){try{if(!e)return;let t=typeof e==`string`?{error:e}:typeof e==`object`?`message`in e?{error:e.message,stack:e.stack??null}:{error:e.toString()}:{error:`Unspecified error`};console.error(e);let n=await fetch(`/data/Logger/LogError`,{method:`POST`,body:JSON.stringify(t),headers:{"Content-Type":`application/json; charset=utf-8`}});if(n.ok)return await n.json();console.error(Error(`Failed to log error`))}catch{}}function l(){return crypto.randomUUID?.()}let u=Date.now(),d=l(),f=``,p=``;if(`document`in window){let e=()=>a(`AfSessionInit`,{"appframe-core":window.af?.common?.version,"appframe-data":window.af?.data?.version,"app-version":window.af?.article?.version});document.addEventListener(`DOMContentLoaded`,()=>{f=localStorage.getItem(`_afDeviceId`),p=sessionStorage.getItem(`_afSessionId`),f||(f=l(),localStorage.setItem(`_afDeviceId`,f)),p||(p=d,sessionStorage.setItem(`_afSessionId`,p)),e()}),document.addEventListener(`visibilitychange`,function(){document.visibilityState===`hidden`?navigator.sendBeacon(`/api/logging/log-activity`,JSON.stringify({article:i,action:`AfSessionEnd`,parameters:{_session:m()}})):e()})}function m(){return{browserSessionId:p,sessionStart:u,sessionLength:Date.now()-u,sessionId:d,deviceId:f}}window.window?.addEventListener(`error`,e=>{typeof e==`object`&&`error`in e?c(e.error):typeof e==`object`&&`message`in e&&c(e)});function ee(e){return[af?.article?.id||``,`common`,e].join(`.`)}var te=new class{isPersisted=()=>!0;getLocalStorageKey(e,t){return t?[`common`,e].join(`.`):ee(e)}get(e,t,n){let r=this.getLocalStorageKey(e,n),i=localStorage.getItem(r);return i===null?t:JSON.parse(i)}set(e,t,n){localStorage.setItem(this.getLocalStorageKey(e,n),JSON.stringify(t))}remove(e,t){let n=this.getLocalStorageKey(e,t);return localStorage.getItem(n)!==null&&(localStorage.removeItem(n),!0)}clear(){let e=ee(``);for(let t in localStorage)t.slice(0,e.length)===e&&localStorage.removeItem(t)}};function ne(e){return e?re(e).substring(0,10):null}function h(e,t=2){return String(e).padStart(t,`0`)}function re(e){return e?`${e.getFullYear()}-${h(e.getMonth()+1)}-${h(e.getDate())}T${h(e.getHours())}:${h(e.getMinutes())}:${h(e.getSeconds())}.${h(e.getMilliseconds(),3)}`:null}function ie(e){return e?e.toISOString().substring(0,16):``}function ae(e,t){return new Promise((n,r)=>{try{let r=URL.createObjectURL(e),i=document.body,a=document.createElement(`a`);a.setAttribute(`download`,t),a.href=r,i.append(a),a.click(),i.removeChild(a),setTimeout(()=>{URL.revokeObjectURL(r),n()},250)}catch(e){r(e)}})}function g(e,t){if(e)return;let n=typeof t==`function`?t():t;throw Error(n??`Invariant failed`)}async function oe(e,{fileName:t,signal:n,onProgress:r}){let i=0;r?.({status:`requested`});try{let n=await fetch(e);if(!n.ok||!n.body){if(n.headers.get(`content-type`)?.includes(`application/json`)){let e=await n.json();g(!e.error,e.error)}throw Error(`${n.status} ${n.statusText}`)}try{let e=n.body.getReader(),t=new ReadableStream({start:t=>{function n(){return e.read().then(e=>{if(e.done){t.close();return}return i+=e.value.length,r?.({bytesReceived:i,status:`downloading`}),t.enqueue(e.value),n()})}return n()}});n=new Response(t)}catch{}let a=await n.blob();r?.({bytesReceived:i,status:`downloaded`}),await ae(a,t),r?.({bytesReceived:i,status:`completed`})}catch(e){n?.aborted?r?.({status:`cancelled`}):r?.({error:e.message,status:`error`})}}let se=/^function(?:\s+([a-zA-Z$_][a-zA-Z0-9$_]*))?\s*\(((?:(?:\s*[a-zA-Z$_][a-zA-Z0-9$_]*)(?:\s*,\s*[a-zA-Z$_][a-zA-Z0-9$_]*)*)?)\s*\)\s*\{((?:.|\n|\r)*)\}$/,ce=/^(?:\(([^)]*)\)|([a-zA-Z$_][a-zA-Z0-9$_]*))\s*=>\s*\{([\s\S]*)\}$/,le=/^(?:\(([^)]*)\)|([a-zA-Z$_][a-zA-Z0-9$_]*))\s*=>\s*([\s\S]+)$/,_=e=>e.split(`,`).map(e=>e.trim()).filter(Boolean);function v(e){let t=e.toString(),n=t.match(ce);if(n){let t=_(n[1]??n[2]??``);return{name:e.name,args:t,body:n[3]}}let r=t.match(le);if(r){let t=_(r[1]??r[2]??``);return{name:e.name,args:t,body:r[3]}}let i=t.match(se);return g(i,`Unable to parse function!`),{name:e.name??i[1],args:_(i[2]),body:i[3]}}function ue(){}ue.prototype=Object.create(null);function de(e,t){if(typeof e==`object`){if(typeof t==`string`)return de(e,t.split(`.`));if(Array.isArray(t)){let n=e;for(let e=0;e<t.length;e++)n=n[t[e]]=n[t[e]]||new ue;return n}}}function fe(e,t,n={}){if(Array.isArray(t))for(let n of t){let{name:t}=v(n);g(t,`Unable to detect name of function! Name it, or only supply one function and include name in first parameter.`),fe(e,n)}else{let r,i;if(typeof t==`function`&&(r=v(t).name),typeof e==`string`){let t=e.split(`.`);r||(r=t[t.length-1],t=t.slice(0,t.length-1)),i=de(window,t)}else r&&(typeof e==`object`||typeof e==`function`)?i=e:g(!1,`Invalid typeof parameter 'name', or unable to parse pValue!`);Object.hasOwn(i,r)&&n?.overwrite!==!0?console.warn(`${[e,r].join(`.`)} is already defined!`):i[r]=t}}async function pe(e){try{let t=await fetch(`/api/user/localize/new/${af.article.id}`,{body:JSON.stringify({text:e}),headers:{Accept:`application/json; */*`,"Content-Type":`application/json`,"X-Requested-With":`XMLHttpRequest`},method:`POST`});if(t.ok)return await t.json()}catch{}return e}function y(e,t){if(typeof e==`string`&&e.trim().length===0)return e;if(e!==void 0&&e!==``&&e!==null){if(window.af?.article?.i18n!==void 0){if(!Object.hasOwn(af.article.i18n,e)){af.article.i18n[e]=e;let n=pe(e).then(t=>(af.article.i18n[e]=t,t));if(t)return n}return af.article.i18n[e]}return e}}let me=[`isnull`,`isnotnull`,`istrue`,`isfalse`,`isblank`,`isnotblank`],he=[`between`,`notbetween`,`datebetween`,`datenotbetween`],ge=[`inlist`,`notinlist`];function b(e){return me.includes(e)?`none`:he.includes(e)?`pair`:ge.includes(e)?`list`:`single`}let _e={equals:`Equal to`,notequals:`Not equal to`,greaterthan:`Greater than`,greaterthanorequal:`Greater than or equal to`,lessthan:`Less than`,lessthanorequal:`Less than or equal to`,beginswith:`Begins with`,notbeginswith:`Does not begin with`,endswith:`Ends with`,notendswith:`Does not end with`,contains:`Contains`,notcontains:`Does not contain`,like:`Like`,notlike:`Not like`,isnull:`Is null`,isnotnull:`Is not null`,isblank:`Is empty`,isnotblank:`Is not empty`,istrue:`Is true`,isfalse:`Is false`,inlist:`In list`,notinlist:`Not in list`,between:`Between`,notbetween:`Not between`,dateequals:`Equal to`,notdatequals:`Not equal to`,dategreaterthan:`After`,dategreaterthanorequal:`On or after`,datelessthan:`Before`,datelessthanorequal:`Up to`,datebetween:`Between`,datenotbetween:`Not between`},ve={greaterthan:`After`,greaterthanorequal:`On or after`,lessthan:`Before`,lessthanorequal:`Up to`};function ye(e,t){return y((t===`date`||t===`datetime`?ve[e]:void 0)??_e[e]??e)}let x=[`equals`,`notequals`],S=[`inlist`,`notinlist`],C=[`between`,`notbetween`],w=[`greaterthan`,`greaterthanorequal`,`lessthan`,`lessthanorequal`],be=[`contains`,`notcontains`,`beginswith`,`notbeginswith`,`endswith`,`notendswith`,`isblank`,`isnotblank`],xe={date:[...x,...S,...C,...w],datetime:[...x,...S,...C,...w],number:[...x,...S,...C,...w],boolean:[`istrue`,`isfalse`],string:[...x,...be,...S,...C,...w],uniqueidentifier:[...x,...be,...S,...C,...w]},Se={date:`equals`,datetime:`equals`,number:`equals`,boolean:`istrue`,string:`beginswith`,uniqueidentifier:`beginswith`};function Ce(e){let t=[...xe[e.type]??xe.string];return e.nullable&&e.type!==`boolean`&&t.push(`isnull`,`isnotnull`),t}function we(e){return Se[e.type]??`equals`}function T(e,t){if(b(t)===`none`)return`null`;switch(e.type){case`number`:return`number`;case`boolean`:return`boolean`;case`date`:case`datetime`:return`datetime`;case`uniqueidentifier`:return`uniqueidentifier`;default:return`string`}}let Te=[`Yesterday`,`Today`,`Tomorrow`,`ThisWeek`,`ThisMonth`,`ThisYear`,`LastWeek`,`LastMonth`,`LastYear`,`NextWeek`,`NextMonth`,`NextYear`],Ee={CurrentUser:`Current user`,Yesterday:`Yesterday`,Today:`Today`,Tomorrow:`Tomorrow`,ThisWeek:`This week`,ThisMonth:`This month`,ThisYear:`This year`,LastWeek:`Last week`,LastMonth:`Last month`,LastYear:`Last year`,NextWeek:`Next week`,NextMonth:`Next month`,NextYear:`Next year`,UserYesterday:`Yesterday`,UserToday:`Today`,UserTomorrow:`Tomorrow`,UserThisWeek:`This week`,UserThisMonth:`This month`,UserThisYear:`This year`,UserLastWeek:`Last week`,UserLastMonth:`Last month`,UserLastYear:`Last year`,UserNextWeek:`Next week`,UserNextMonth:`Next month`,UserNextYear:`Next year`};function De(e){return y(Ee[e]??e)}function Oe(e){return e.type===`date`||e.type===`datetime`?[...Te]:e.type===`string`?[`CurrentUser`]:[]}let ke={not:`notequals`,tweens:`notbetween`,notdate:`notdatequals`,notdateequals:`notdatequals`};function E(e){let t=e.toLowerCase().replace(/[\s,]/g,``);return ke[t]??t}function D(){return O(`and`)}function O(e=`and`){return{type:`group`,mode:e,items:[]}}function k(e){return e.type===`group`}function A(e){return e.type===`expression`}function Ae(e){return e?A(e)?{type:`group`,mode:`and`,items:[e]}:e:D()}function je(e){return j(e)===0}function j(e){return e?A(e)?1:e.items.reduce((e,t)=>e+j(t),0):0}function Me(e){if(!e)return null;if(A(e))return M(e)?{type:`group`,mode:`and`,items:[e]}:null;let t=e.items.map(e=>k(e)?Me(e):M(e)?e:null).filter(e=>e!==null);return t.length===0?null:{...e,items:t}}function M(e){if(k(e))return e.items.some(M);if(!e.column||!e.operator)return!1;let t=b(E(e.operator));return t===`none`?!0:e.value===null||e.value===void 0||e.value===``?!1:t===`pair`?Array.isArray(e.value)&&e.value.length===2&&e.value.every(e=>e!==``&&e!=null):t!==`list`||Array.isArray(e.value)&&e.value.length>0}function Ne(e,t){let n=t??we(e);return{type:`expression`,column:e.name,operator:n,value:Pe(n),valueType:T(e,n)}}function Pe(e){switch(b(e)){case`none`:return null;case`pair`:return[``,``];case`list`:return[];default:return``}}function Fe(e,t,n){let r=b(E(e.operator)),i=b(t),a=e.value;i!==r&&(a=Pe(t));let o=e.valueType===`special`&&i===r?`special`:T(n,t);return{...e,operator:t,value:a,valueType:o}}function Ie(e,t){let n=e;for(let e of t){if(!n||!k(n))return null;n=n.items[e]}return n??null}function N(e,t,n){if(t.length===0)return n(e)??e;if(!k(e))return e;let[r,...i]=t,a=e.items[r];if(!a)return e;let o=[...e.items];if(i.length===0){let e=n(a);e===null?o.splice(r,1):o[r]=e}else o[r]=N(a,i,n);return{...e,items:o}}function Le(e,t,n){return N(e,t,e=>k(e)?{...e,items:[...e.items,n]}:e)}function Re(e,t){return t.length===0?D():N(e,t,()=>null)}function ze(e,t,n){return N(e,t,e=>k(e)?{...e,mode:n}:e)}function Be(e,t=[]){let n=Ie(e,t);return Le(e,t,O(n&&k(n)&&n.mode===`and`?`or`:`and`))}async function Ve(e,t){let n=await fetch(`/api/filter/convert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),signal:t});if(!n.ok)throw Error(`Failed to convert filter: ${n.status} ${n.statusText}`);let r=await n.json();return{...r,filterObject:r.filterObject?Ae(r.filterObject):null}}function He(e,t={}){return e?Ue(e,new Map((t.fields??[]).map(e=>[e.name.toLowerCase(),e])),0):``}function Ue(e,t,n){if(A(e))return We(e,t);let r=e.items.map(e=>Ue(e,t,n+1)).filter(e=>e!==``);if(r.length===0)return``;if(r.length===1)return r[0];let i=e.mode===`or`?` OR `:` AND `,a=r.join(i);return n===0?a:`(${a})`}function We(e,t){if(!e.column||!e.operator)return``;let n=t.get(e.column.toLowerCase()),r=n?.caption??e.column,i=E(e.operator),a=ye(i,n?.type),o=b(i);return o===`none`?`[${r}] ${a}`:`[${r}] ${a} ${Ge(e,o)}`}function Ge(e,t){let{value:n,valueType:r}=e;if(r===`special`&&typeof n==`string`)return De(n);if(Array.isArray(n)){let e=n.map(e=>P(e,r));return t===`pair`?e.join(` - `):`(${e.join(`, `)})`}return P(n,r)}function P(e,t){return e==null?``:e instanceof Date?e.toISOString().slice(0,10):typeof e==`number`||typeof e==`boolean`||t===`number`||t===`boolean`?String(e):`'${String(e)}'`}let Ke=[`string`,`number`,`boolean`,`date`,`datetime`,`uniqueidentifier`];function F(e){let t=e?.trim().toLowerCase();return Ke.find(e=>e===t)??`string`}function I(e){return e===!0||e===1}function qe(e){return{name:e.FieldName??``,type:F(e.DataType),nullable:I(e.Nullable),excludeFromFilter:I(e.ExcludeFromFilter),valueListRecordSource:e.ValueListRecordSource||void 0}}function Je(e){return e.map(qe).filter(e=>e.name!==``&&!e.excludeFromFilter).sort((e,t)=>e.name.localeCompare(t.name))}function Ye(e){return!e||A(e)||e.mode!==`or`?!1:e.items.every(e=>k(e)&&e.mode===`and`&&e.items.every(A))}function Xe(e){if(!e)return{type:`group`,mode:`or`,items:[{type:`group`,mode:`and`,items:[]}]};if(A(e))return{type:`group`,mode:`or`,items:[{type:`group`,mode:`and`,items:[e]}]};if(e.mode===`or`){let t=e.items.map(e=>{let t=[];return L(e,t),{type:`group`,mode:`and`,items:t}});return{type:`group`,mode:`or`,items:t.length>0?t:[{type:`group`,mode:`and`,items:[]}]}}let t=[];return L(e,t),{type:`group`,mode:`or`,items:[{type:`group`,mode:`and`,items:t}]}}function L(e,t){if(A(e)){t.push(e);return}for(let n of e.items)L(n,t)}function Ze(e){return{filterId:e.FilterID??-1,primKey:e.PrimKey??``,name:e.FilterName??``,criteria:e.FilterCriteria??``,dbObjectId:e.DBObjectID??``,accessLevel:Qe(e.AccessLevel),createdByUser:R(e.CreatedByUser),createdBy:e.CreatedBy??``,domain:e.Domain??null,crossDomain:R(e.CrossDomain),isPersonallyShared:R(e.IsPersonallyShared),hideCriteria:R(e.HideFilterCriteria),headerText:e.OptionalHeaderText||null,comment:e.OptionalComment||null,parameters:e.Parameters||null,reportTitle:e.ReportTitle||null,created:$e(e.Created),updated:$e(e.Updated)}}function Qe(e){return e===`Manager`||e===`Editor`?e:`Reader`}function R(e){return typeof e==`string`?e.toLowerCase()===`true`:!!e}function $e(e){if(!e)return null;if(e instanceof Date)return e;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function et(e){return e.filter(e=>(e.FilterID??-1)!==-1).map(Ze).sort((e,t)=>e.name.localeCompare(t.name))}function tt(e){let t=[],n=[];for(let r of e)r.createdByUser?t.push(r):n.push(r);return{mine:t,shared:n}}function nt(e,t){if(t!=null)return e.find(e=>e.filterId===t)}function rt(e){return e.accessLevel===`Editor`||e.accessLevel===`Manager`}function it(e){return e.accessLevel===`Manager`}function z(e){return e.createdByUser}let at=z,ot=z,st={xs:64,sm:128,md:256,lg:512,xl:void 0};function ct(e,t,n,r=`xs`){if(e&&typeof e==`object`)return ct(e.primKey,e.login,e.hash,e.size);if(!e||!n)return``;let i=st[r];return`/api/data/blob/EmployeesLookup/${e}/Image/${encodeURIComponent(t??``)}${t?`.`:``}${encodeURIComponent(n)}.jpg${i?`?width=${i}`:``}`}function lt(e,...t){g(Array.isArray(e)&&e.length===t.length+1,`Method 'localize' must be used as a tag function`);let n=y(e.map((t,n)=>n===e.length-1?t:`${t}$${n}`).join(``));return t.forEach((e,t)=>{n=n.replace(`$${t}`,e)}),n}let ut={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`};function B(e){return e.replace(/&(#x?[0-9a-f]+|[a-z]+);/gi,(e,t)=>t.startsWith(`#x`)||t.startsWith(`#X`)?String.fromCodePoint(Number.parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCodePoint(Number.parseInt(t.slice(1),10)):ut[t.toLowerCase()]??e)}function V(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function H(e,t){let n=RegExp(`<${t}(?:\\s[^>]*)?>([\\s\\S]*?)</${t}>`).exec(e);if(!n)return null;let r=B(n[1]).trim();return r===``?null:r}function dt(e,t){return[...e.matchAll(RegExp(`<${t}(?:\\s[^>]*)?>([\\s\\S]*?)</${t}>`,`g`))].map(e=>B(e[1]).trim())}let ft={Byte:`number`,Decimal:`number`,Double:`number`,Int16:`number`,Int32:`number`,Int64:`number`,Single:`number`,Boolean:`boolean`,DateTime:`date`};function pt(e){let t=/<SelectColumns>([\s\S]*?)<\/SelectColumns>/.exec(e)?.[1]??``,n=[];for(let e of t.matchAll(/<afSelectColumn>([\s\S]*?)<\/afSelectColumn>/g)){let t=H(e[1],`Name`);t&&n.push({name:t,type:ft[H(e[1],`DataType`)??``]??`string`})}return n}function U(e){if(!e||!e.includes(`<afRecordSource`))return null;let t=H(e,`ViewName`);if(!t)return null;let n=H(e,`MaxRecords`);return{viewName:t,columns:pt(e),whereClause:H(e,`WhereClause`),filterString:H(e,`FilterString`),maxRecords:n===null||n===`0`?null:Number(n)}}let mt=[`String`,`Integer`,`Double`,`Date`,`Boolean`],ht=/^[a-z]stp_/i;function W(e){return typeof e==`string`&&ht.test(e.trim())}function gt(e){return e?e.split(/\r\n|\r|\n/).map(e=>e.trim()).filter(e=>e!==``):[]}function _t(e){return mt.find(t=>t.toLowerCase()===e?.trim().toLowerCase())??`String`}function vt(e,t,n){if(t)return`lookup`;if(n)return`select`;switch(e){case`Integer`:case`Double`:return`number`;case`Date`:return`date`;case`Boolean`:return`boolean`;default:return`text`}}function yt(e){let t=e.Name??``,n=_t(e.DataType),r=gt(e.Items),i=U(e.RecordSource),a=e.ValueMember??null;i&&!a&&(a=i.columns[0]?.name??null);let o=i?.columns.find(e=>e.name!==a)?.name??null,s=!!(i&&a);return{name:t,label:e.Label?.trim()||t,description:e.Description?.trim()||null,type:n,editor:vt(n,s,r.length>0),defaultValue:e.DefaultValue??null,items:r,recordSource:s?i:null,valueMember:s?a:null,displayMember:s?o:null,sortOrder:e.SortOrder??0,lookupWidth:e.LookupWidth??null,lookupHeight:e.LookupHeight??null}}function bt(e){return e.filter(e=>e.Name).map(yt).sort((e,t)=>e.sortOrder-t.sortOrder||e.label.localeCompare(t.label))}function G(e,t){if(t==null||t===``)return e.type!==`Boolean`&&null;switch(e.type){case`Boolean`:return typeof t==`boolean`?t:/^(true|1|ja|yes)$/i.test(String(t));case`Integer`:{let e=Number.parseInt(String(t),10);return Number.isNaN(e)?null:e}case`Double`:{let e=Number(String(t).replace(`,`,`.`));return Number.isNaN(e)?null:e}default:return String(t)}}function xt(e){let t={};for(let n of e)t[n.name]=W(n.defaultValue)?G(n,null):G(n,n.defaultValue);return t}function St(e,t){return t==null?``:typeof t==`boolean`?t?`True`:`False`:String(t)}function Ct(e,t){return`<Parameters Version="1">\n${e.map(e=>{let n=St(e,t[e.name]??null);return` <Parameter Name="${V(e.name)}" Type="${e.type}">${V(n)}</Parameter>`}).join(`
|
|
1
|
+
this.af=this.af||{},this.af.common=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}var n=class{eventHandler=t();authenticated(){this.eventHandler.emit(`onAuthenticated`)}async expired(e,t){try{let n=new Promise(t=>{let n=()=>{this.eventHandler.off(`onAuthenticated`,n),e?.(),t()};this.eventHandler.on(`onAuthenticated`,n)}),r=document.querySelector(`dialog.session-expired-dialog`);if(r)await n;else{r=document.createElement(`dialog`),r.className=`session-expired-dialog`,r.style.display=`flex`,r.style.padding=`0`,r.style.left=`50%`,r.style.transform=`translateX(-50%)`;let e=`/login?ReturnUrl=%2fapi/sessionexpired/remove`;t===`RequireTwoFactor`?e=`/login?RequireTwoFactor=1&ReturnUrl=%2fapi/sessionexpired/remove`:await fetch(`/logout`,{method:`POST`}),r.innerHTML=`<iframe sandbox="allow-same-origin allow-scripts allow-modals allow-top-navigation-by-user-activation allow-forms" src="${e}" style="border:0;width:min(500px,100vw);height:min(700px, 100vh);"></iframe>`,document.body.append(r),r.showModal(),await n,r.remove()}}catch{window.location.href=`/login?ReturnUrl=${encodeURIComponent(window.location.pathname)}${encodeURIComponent(window.location.search)}`}}attachEvent(e,t){return this.eventHandler.on(e,t)}detachEvent(e,t){return this.eventHandler.off(e,t)}},r=class extends n{amDesignator=`a.m.`;dayNames=[`sunday`,`monday`,`tuesday`,`wednesday`,`thursday`,`friday`,`saturday`];dayNamesShort=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];decimalSeparator=`.`;domain=`OB`;email;formats;groupSeparator=null;integratedSecurity=!1;isDeveloper=!1;login=``;loginType;monthNames=[`january`,`february`,`march`,`april`,`may`,`june`,`july`,`august`,`september`,`october`,`november`,`december`,``];monthNamesShort=[`jan`,`feb`,`mar`,`apr`,`may`,`jun`,`jul`,`augt`,`sep`,`oct`,`nov`,`dec`,``];name;pmDesignator=`p.m.`;shortDateFormat=`dd.MM.yyyy`;culture=`en-GB`;uiculture=`en-GB`;constructor(e){super(),this.formats={},Object.assign(this,e)}};let i=window.af?.article?.id??window.window?.location.pathname.substring(1).split(`/`)[0];async function a(e,t={},n=0){try{let r=await fetch(`/api/logging/log-activity`,{method:`POST`,body:JSON.stringify({article:i,timeElapsed:n,action:e,parameters:{...t,_session:m()}}),headers:{"Content-Type":`application/json`,Accept:`application/json`}});if(!r.ok){if(r.headers.get(`Content-Type`)?.includes(`application/json`)){let e=await r.json();console.error(e.error)}else console.error(`${r.status} ${r.statusText}`)}}catch{}}function o(e,t={}){let n=performance.now();return(r={})=>a(e,{...t,...r},performance.now()-n)}async function s(e){let t=performance.now();return[await e(),performance.now()-t]}async function c(e){try{if(!e)return;let t=typeof e==`string`?{error:e}:typeof e==`object`?`message`in e?{error:e.message,stack:e.stack??null}:{error:e.toString()}:{error:`Unspecified error`};console.error(e);let n=await fetch(`/data/Logger/LogError`,{method:`POST`,body:JSON.stringify(t),headers:{"Content-Type":`application/json; charset=utf-8`}});if(n.ok)return await n.json();console.error(Error(`Failed to log error`))}catch{}}function l(){return crypto.randomUUID?.()}let u=Date.now(),d=l(),f=``,p=``;if(`document`in window){let e=()=>a(`AfSessionInit`,{"appframe-core":window.af?.common?.version,"appframe-data":window.af?.data?.version,"app-version":window.af?.article?.version});document.addEventListener(`DOMContentLoaded`,()=>{f=localStorage.getItem(`_afDeviceId`),p=sessionStorage.getItem(`_afSessionId`),f||(f=l(),localStorage.setItem(`_afDeviceId`,f)),p||(p=d,sessionStorage.setItem(`_afSessionId`,p)),e()}),document.addEventListener(`visibilitychange`,function(){document.visibilityState===`hidden`?navigator.sendBeacon(`/api/logging/log-activity`,JSON.stringify({article:i,action:`AfSessionEnd`,parameters:{_session:m()}})):e()})}function m(){return{browserSessionId:p,sessionStart:u,sessionLength:Date.now()-u,sessionId:d,deviceId:f}}window.window?.addEventListener(`error`,e=>{typeof e==`object`&&`error`in e?c(e.error):typeof e==`object`&&`message`in e&&c(e)});function ee(e){return[af?.article?.id||``,`common`,e].join(`.`)}var te=new class{isPersisted=()=>!0;getLocalStorageKey(e,t){return t?[`common`,e].join(`.`):ee(e)}get(e,t,n){let r=this.getLocalStorageKey(e,n),i=localStorage.getItem(r);return i===null?t:JSON.parse(i)}set(e,t,n){localStorage.setItem(this.getLocalStorageKey(e,n),JSON.stringify(t))}remove(e,t){let n=this.getLocalStorageKey(e,t);return localStorage.getItem(n)!==null&&(localStorage.removeItem(n),!0)}clear(){let e=ee(``);for(let t in localStorage)t.slice(0,e.length)===e&&localStorage.removeItem(t)}};function ne(e){return e?re(e).substring(0,10):null}function h(e,t=2){return String(e).padStart(t,`0`)}function re(e){return e?`${e.getFullYear()}-${h(e.getMonth()+1)}-${h(e.getDate())}T${h(e.getHours())}:${h(e.getMinutes())}:${h(e.getSeconds())}.${h(e.getMilliseconds(),3)}`:null}function ie(e){return e?e.toISOString().substring(0,16):``}function ae(e,t){return new Promise((n,r)=>{try{let r=URL.createObjectURL(e),i=document.body,a=document.createElement(`a`);a.setAttribute(`download`,t),a.href=r,i.append(a),a.click(),i.removeChild(a),setTimeout(()=>{URL.revokeObjectURL(r),n()},250)}catch(e){r(e)}})}function g(e,t){if(e)return;let n=typeof t==`function`?t():t;throw Error(n??`Invariant failed`)}async function oe(e,{fileName:t,signal:n,onProgress:r}){let i=0;r?.({status:`requested`});try{let n=await fetch(e);if(!n.ok||!n.body){if(n.headers.get(`content-type`)?.includes(`application/json`)){let e=await n.json();g(!e.error,e.error)}throw Error(`${n.status} ${n.statusText}`)}try{let e=n.body.getReader(),t=new ReadableStream({start:t=>{function n(){return e.read().then(e=>{if(e.done){t.close();return}return i+=e.value.length,r?.({bytesReceived:i,status:`downloading`}),t.enqueue(e.value),n()})}return n()}});n=new Response(t)}catch{}let a=await n.blob();r?.({bytesReceived:i,status:`downloaded`}),await ae(a,t),r?.({bytesReceived:i,status:`completed`})}catch(e){n?.aborted?r?.({status:`cancelled`}):r?.({error:e.message,status:`error`})}}let se=/^function(?:\s+([a-zA-Z$_][a-zA-Z0-9$_]*))?\s*\(((?:(?:\s*[a-zA-Z$_][a-zA-Z0-9$_]*)(?:\s*,\s*[a-zA-Z$_][a-zA-Z0-9$_]*)*)?)\s*\)\s*\{((?:.|\n|\r)*)\}$/,ce=/^(?:\(([^)]*)\)|([a-zA-Z$_][a-zA-Z0-9$_]*))\s*=>\s*\{([\s\S]*)\}$/,le=/^(?:\(([^)]*)\)|([a-zA-Z$_][a-zA-Z0-9$_]*))\s*=>\s*([\s\S]+)$/,_=e=>e.split(`,`).map(e=>e.trim()).filter(Boolean);function v(e){let t=e.toString(),n=t.match(ce);if(n){let t=_(n[1]??n[2]??``);return{name:e.name,args:t,body:n[3]}}let r=t.match(le);if(r){let t=_(r[1]??r[2]??``);return{name:e.name,args:t,body:r[3]}}let i=t.match(se);return g(i,`Unable to parse function!`),{name:e.name??i[1],args:_(i[2]),body:i[3]}}function ue(){}ue.prototype=Object.create(null);function de(e,t){if(typeof e==`object`){if(typeof t==`string`)return de(e,t.split(`.`));if(Array.isArray(t)){let n=e;for(let e=0;e<t.length;e++)n=n[t[e]]=n[t[e]]||new ue;return n}}}function fe(e,t,n={}){if(Array.isArray(t))for(let n of t){let{name:t}=v(n);g(t,`Unable to detect name of function! Name it, or only supply one function and include name in first parameter.`),fe(e,n)}else{let r,i;if(typeof t==`function`&&(r=v(t).name),typeof e==`string`){let t=e.split(`.`);r||(r=t[t.length-1],t=t.slice(0,t.length-1)),i=de(window,t)}else r&&(typeof e==`object`||typeof e==`function`)?i=e:g(!1,`Invalid typeof parameter 'name', or unable to parse pValue!`);Object.hasOwn(i,r)&&n?.overwrite!==!0?console.warn(`${[e,r].join(`.`)} is already defined!`):i[r]=t}}async function pe(e){try{let t=await fetch(`/api/user/localize/new/${af.article.id}`,{body:JSON.stringify({text:e}),headers:{Accept:`application/json; */*`,"Content-Type":`application/json`,"X-Requested-With":`XMLHttpRequest`},method:`POST`});if(t.ok)return await t.json()}catch{}return e}function y(e,t){if(typeof e==`string`&&e.trim().length===0)return e;if(e!==void 0&&e!==``&&e!==null){if(window.af?.article?.i18n!==void 0){if(!Object.hasOwn(af.article.i18n,e)){af.article.i18n[e]=e;let n=pe(e).then(t=>(af.article.i18n[e]=t,t));if(t)return n}return af.article.i18n[e]}return e}}let me=[`isnull`,`isnotnull`,`istrue`,`isfalse`,`isblank`,`isnotblank`],he=[`between`,`notbetween`,`datebetween`,`datenotbetween`],ge=[`inlist`,`notinlist`];function b(e){return me.includes(e)?`none`:he.includes(e)?`pair`:ge.includes(e)?`list`:`single`}let _e={equals:`Equal to`,notequals:`Not equal to`,greaterthan:`Greater than`,greaterthanorequal:`Greater than or equal to`,lessthan:`Less than`,lessthanorequal:`Less than or equal to`,beginswith:`Begins with`,notbeginswith:`Does not begin with`,endswith:`Ends with`,notendswith:`Does not end with`,contains:`Contains`,notcontains:`Does not contain`,like:`Like`,notlike:`Not like`,isnull:`Is null`,isnotnull:`Is not null`,isblank:`Is empty`,isnotblank:`Is not empty`,istrue:`Is true`,isfalse:`Is false`,inlist:`In list`,notinlist:`Not in list`,between:`Between`,notbetween:`Not between`,dateequals:`Equal to`,notdatequals:`Not equal to`,dategreaterthan:`After`,dategreaterthanorequal:`On or after`,datelessthan:`Before`,datelessthanorequal:`Up to`,datebetween:`Between`,datenotbetween:`Not between`},ve={greaterthan:`After`,greaterthanorequal:`On or after`,lessthan:`Before`,lessthanorequal:`Up to`};function ye(e,t){return y((t===`date`||t===`datetime`?ve[e]:void 0)??_e[e]??e)}let x=[`equals`,`notequals`],S=[`inlist`,`notinlist`],C=[`between`,`notbetween`],w=[`greaterthan`,`greaterthanorequal`,`lessthan`,`lessthanorequal`],be=[`contains`,`notcontains`,`beginswith`,`notbeginswith`,`endswith`,`notendswith`,`isblank`,`isnotblank`],xe={date:[...x,...S,...C,...w],datetime:[...x,...S,...C,...w],number:[...x,...S,...C,...w],boolean:[`istrue`,`isfalse`],string:[...x,...be,...S,...C,...w],uniqueidentifier:[...x,...be,...S,...C,...w]},Se={date:`equals`,datetime:`equals`,number:`equals`,boolean:`istrue`,string:`contains`,uniqueidentifier:`beginswith`};function Ce(e){let t=[...xe[e.type]??xe.string];return e.nullable&&e.type!==`boolean`&&t.push(`isnull`,`isnotnull`),t}function we(e){return Se[e.type]??`equals`}function T(e,t){if(b(t)===`none`)return`null`;switch(e.type){case`number`:return`number`;case`boolean`:return`boolean`;case`date`:case`datetime`:return`datetime`;case`uniqueidentifier`:return`uniqueidentifier`;default:return`string`}}let Te=[`Yesterday`,`Today`,`Tomorrow`,`ThisWeek`,`ThisMonth`,`ThisYear`,`LastWeek`,`LastMonth`,`LastYear`,`NextWeek`,`NextMonth`,`NextYear`],Ee={CurrentUser:`Current user`,Yesterday:`Yesterday`,Today:`Today`,Tomorrow:`Tomorrow`,ThisWeek:`This week`,ThisMonth:`This month`,ThisYear:`This year`,LastWeek:`Last week`,LastMonth:`Last month`,LastYear:`Last year`,NextWeek:`Next week`,NextMonth:`Next month`,NextYear:`Next year`,UserYesterday:`Yesterday`,UserToday:`Today`,UserTomorrow:`Tomorrow`,UserThisWeek:`This week`,UserThisMonth:`This month`,UserThisYear:`This year`,UserLastWeek:`Last week`,UserLastMonth:`Last month`,UserLastYear:`Last year`,UserNextWeek:`Next week`,UserNextMonth:`Next month`,UserNextYear:`Next year`};function De(e){return y(Ee[e]??e)}function Oe(e){return e.type===`date`||e.type===`datetime`?[...Te]:e.type===`string`?[`CurrentUser`]:[]}let ke={not:`notequals`,tweens:`notbetween`,notdate:`notdatequals`,notdateequals:`notdatequals`};function E(e){let t=e.toLowerCase().replace(/[\s,]/g,``);return ke[t]??t}function D(){return O(`and`)}function O(e=`and`){return{type:`group`,mode:e,items:[]}}function k(e){return e.type===`group`}function A(e){return e.type===`expression`}function Ae(e){return e?A(e)?{type:`group`,mode:`and`,items:[e]}:e:D()}function je(e){return j(e)===0}function j(e){return e?A(e)?1:e.items.reduce((e,t)=>e+j(t),0):0}function Me(e){if(!e)return null;if(A(e))return M(e)?{type:`group`,mode:`and`,items:[e]}:null;let t=e.items.map(e=>k(e)?Me(e):M(e)?e:null).filter(e=>e!==null);return t.length===0?null:{...e,items:t}}function M(e){if(k(e))return e.items.some(M);if(!e.column||!e.operator)return!1;let t=b(E(e.operator));return t===`none`?!0:e.value===null||e.value===void 0||e.value===``?!1:t===`pair`?Array.isArray(e.value)&&e.value.length===2&&e.value.every(e=>e!==``&&e!=null):t!==`list`||Array.isArray(e.value)&&e.value.length>0}function Ne(e,t){let n=t??we(e);return{type:`expression`,column:e.name,operator:n,value:Pe(n),valueType:T(e,n)}}function Pe(e){switch(b(e)){case`none`:return null;case`pair`:return[``,``];case`list`:return[];default:return``}}function Fe(e,t,n){let r=b(E(e.operator)),i=b(t),a=e.value;i!==r&&(a=Pe(t));let o=e.valueType===`special`&&i===r?`special`:T(n,t);return{...e,operator:t,value:a,valueType:o}}function Ie(e,t){let n=e;for(let e of t){if(!n||!k(n))return null;n=n.items[e]}return n??null}function N(e,t,n){if(t.length===0)return n(e)??e;if(!k(e))return e;let[r,...i]=t,a=e.items[r];if(!a)return e;let o=[...e.items];if(i.length===0){let e=n(a);e===null?o.splice(r,1):o[r]=e}else o[r]=N(a,i,n);return{...e,items:o}}function Le(e,t,n){return N(e,t,e=>k(e)?{...e,items:[...e.items,n]}:e)}function Re(e,t){return t.length===0?D():N(e,t,()=>null)}function ze(e,t,n){return N(e,t,e=>k(e)?{...e,mode:n}:e)}function Be(e,t=[]){let n=Ie(e,t);return Le(e,t,O(n&&k(n)&&n.mode===`and`?`or`:`and`))}async function Ve(e,t){let n=await fetch(`/api/filter/convert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),signal:t});if(!n.ok)throw Error(`Failed to convert filter: ${n.status} ${n.statusText}`);let r=await n.json();return{...r,filterObject:r.filterObject?Ae(r.filterObject):null}}function He(e,t={}){return e?Ue(e,new Map((t.fields??[]).map(e=>[e.name.toLowerCase(),e])),0):``}function Ue(e,t,n){if(A(e))return We(e,t);let r=e.items.map(e=>Ue(e,t,n+1)).filter(e=>e!==``);if(r.length===0)return``;if(r.length===1)return r[0];let i=e.mode===`or`?` OR `:` AND `,a=r.join(i);return n===0?a:`(${a})`}function We(e,t){if(!e.column||!e.operator)return``;let n=t.get(e.column.toLowerCase()),r=n?.caption??e.column,i=E(e.operator),a=ye(i,n?.type),o=b(i);return o===`none`?`[${r}] ${a}`:`[${r}] ${a} ${Ge(e,o)}`}function Ge(e,t){let{value:n,valueType:r}=e;if(r===`special`&&typeof n==`string`)return De(n);if(Array.isArray(n)){let e=n.map(e=>P(e,r));return t===`pair`?e.join(` - `):`(${e.join(`, `)})`}return P(n,r)}function P(e,t){return e==null?``:e instanceof Date?e.toISOString().slice(0,10):typeof e==`number`||typeof e==`boolean`||t===`number`||t===`boolean`?String(e):`'${String(e)}'`}let Ke=[`string`,`number`,`boolean`,`date`,`datetime`,`uniqueidentifier`];function F(e){let t=e?.trim().toLowerCase();return Ke.find(e=>e===t)??`string`}function I(e){return e===!0||e===1}function qe(e){return{name:e.FieldName??``,type:F(e.DataType),nullable:I(e.Nullable),excludeFromFilter:I(e.ExcludeFromFilter),valueListRecordSource:e.ValueListRecordSource||void 0}}function Je(e){return e.map(qe).filter(e=>e.name!==``&&!e.excludeFromFilter).sort((e,t)=>e.name.localeCompare(t.name))}function Ye(e){return!e||A(e)||e.mode!==`or`?!1:e.items.every(e=>k(e)&&e.mode===`and`&&e.items.every(A))}function Xe(e){if(!e)return{type:`group`,mode:`or`,items:[{type:`group`,mode:`and`,items:[]}]};if(A(e))return{type:`group`,mode:`or`,items:[{type:`group`,mode:`and`,items:[e]}]};if(e.mode===`or`){let t=e.items.map(e=>{let t=[];return L(e,t),{type:`group`,mode:`and`,items:t}});return{type:`group`,mode:`or`,items:t.length>0?t:[{type:`group`,mode:`and`,items:[]}]}}let t=[];return L(e,t),{type:`group`,mode:`or`,items:[{type:`group`,mode:`and`,items:t}]}}function L(e,t){if(A(e)){t.push(e);return}for(let n of e.items)L(n,t)}function Ze(e){return{filterId:e.FilterID??-1,primKey:e.PrimKey??``,name:e.FilterName??``,criteria:e.FilterCriteria??``,dbObjectId:e.DBObjectID??``,accessLevel:Qe(e.AccessLevel),createdByUser:R(e.CreatedByUser),createdBy:e.CreatedBy??``,domain:e.Domain??null,crossDomain:R(e.CrossDomain),isPersonallyShared:R(e.IsPersonallyShared),hideCriteria:R(e.HideFilterCriteria),headerText:e.OptionalHeaderText||null,comment:e.OptionalComment||null,parameters:e.Parameters||null,reportTitle:e.ReportTitle||null,created:$e(e.Created),updated:$e(e.Updated)}}function Qe(e){return e===`Manager`||e===`Editor`?e:`Reader`}function R(e){return typeof e==`string`?e.toLowerCase()===`true`:!!e}function $e(e){if(!e)return null;if(e instanceof Date)return e;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function et(e){return e.filter(e=>(e.FilterID??-1)!==-1).map(Ze).sort((e,t)=>e.name.localeCompare(t.name))}function tt(e){let t=[],n=[];for(let r of e)r.createdByUser?t.push(r):n.push(r);return{mine:t,shared:n}}function nt(e,t){if(t!=null)return e.find(e=>e.filterId===t)}function rt(e){return e.accessLevel===`Editor`||e.accessLevel===`Manager`}function it(e){return e.accessLevel===`Manager`}function z(e){return e.createdByUser}let at=z,ot=z,st={xs:64,sm:128,md:256,lg:512,xl:void 0};function ct(e,t,n,r=`xs`){if(e&&typeof e==`object`)return ct(e.primKey,e.login,e.hash,e.size);if(!e||!n)return``;let i=st[r];return`/api/data/blob/EmployeesLookup/${e}/Image/${encodeURIComponent(t??``)}${t?`.`:``}${encodeURIComponent(n)}.jpg${i?`?width=${i}`:``}`}function lt(e,...t){g(Array.isArray(e)&&e.length===t.length+1,`Method 'localize' must be used as a tag function`);let n=y(e.map((t,n)=>n===e.length-1?t:`${t}$${n}`).join(``));return t.forEach((e,t)=>{n=n.replace(`$${t}`,e)}),n}let ut={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`};function B(e){return e.replace(/&(#x?[0-9a-f]+|[a-z]+);/gi,(e,t)=>t.startsWith(`#x`)||t.startsWith(`#X`)?String.fromCodePoint(Number.parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCodePoint(Number.parseInt(t.slice(1),10)):ut[t.toLowerCase()]??e)}function V(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function H(e,t){let n=RegExp(`<${t}(?:\\s[^>]*)?>([\\s\\S]*?)</${t}>`).exec(e);if(!n)return null;let r=B(n[1]).trim();return r===``?null:r}function dt(e,t){return[...e.matchAll(RegExp(`<${t}(?:\\s[^>]*)?>([\\s\\S]*?)</${t}>`,`g`))].map(e=>B(e[1]).trim())}let ft={Byte:`number`,Decimal:`number`,Double:`number`,Int16:`number`,Int32:`number`,Int64:`number`,Single:`number`,Boolean:`boolean`,DateTime:`date`};function pt(e){let t=/<SelectColumns>([\s\S]*?)<\/SelectColumns>/.exec(e)?.[1]??``,n=[];for(let e of t.matchAll(/<afSelectColumn>([\s\S]*?)<\/afSelectColumn>/g)){let t=H(e[1],`Name`);t&&n.push({name:t,type:ft[H(e[1],`DataType`)??``]??`string`})}return n}function U(e){if(!e||!e.includes(`<afRecordSource`))return null;let t=H(e,`ViewName`);if(!t)return null;let n=H(e,`MaxRecords`);return{viewName:t,columns:pt(e),whereClause:H(e,`WhereClause`),filterString:H(e,`FilterString`),maxRecords:n===null||n===`0`?null:Number(n)}}let mt=[`String`,`Integer`,`Double`,`Date`,`Boolean`],ht=/^[a-z]stp_/i;function W(e){return typeof e==`string`&&ht.test(e.trim())}function gt(e){return e?e.split(/\r\n|\r|\n/).map(e=>e.trim()).filter(e=>e!==``):[]}function _t(e){return mt.find(t=>t.toLowerCase()===e?.trim().toLowerCase())??`String`}function vt(e,t,n){if(t)return`lookup`;if(n)return`select`;switch(e){case`Integer`:case`Double`:return`number`;case`Date`:return`date`;case`Boolean`:return`boolean`;default:return`text`}}function yt(e){let t=e.Name??``,n=_t(e.DataType),r=gt(e.Items),i=U(e.RecordSource),a=e.ValueMember??null;i&&!a&&(a=i.columns[0]?.name??null);let o=i?.columns.find(e=>e.name!==a)?.name??null,s=!!(i&&a);return{name:t,label:e.Label?.trim()||t,description:e.Description?.trim()||null,type:n,editor:vt(n,s,r.length>0),defaultValue:e.DefaultValue??null,items:r,recordSource:s?i:null,valueMember:s?a:null,displayMember:s?o:null,sortOrder:e.SortOrder??0,lookupWidth:e.LookupWidth??null,lookupHeight:e.LookupHeight??null}}function bt(e){return e.filter(e=>e.Name).map(yt).sort((e,t)=>e.sortOrder-t.sortOrder||e.label.localeCompare(t.label))}function G(e,t){if(t==null||t===``)return e.type!==`Boolean`&&null;switch(e.type){case`Boolean`:return typeof t==`boolean`?t:/^(true|1|ja|yes)$/i.test(String(t));case`Integer`:{let e=Number.parseInt(String(t),10);return Number.isNaN(e)?null:e}case`Double`:{let e=Number(String(t).replace(`,`,`.`));return Number.isNaN(e)?null:e}default:return String(t)}}function xt(e){let t={};for(let n of e)t[n.name]=W(n.defaultValue)?G(n,null):G(n,n.defaultValue);return t}function St(e,t){return t==null?``:typeof t==`boolean`?t?`True`:`False`:String(t)}function Ct(e,t){return`<Parameters Version="1">\n${e.map(e=>{let n=St(e,t[e.name]??null);return` <Parameter Name="${V(e.name)}" Type="${e.type}">${V(n)}</Parameter>`}).join(`
|
|
2
2
|
`)}\n</Parameters>`}function wt(e){if(!e)return{};let t={};for(let n of e.matchAll(/<Parameter\s+([^>]*?)\/?>(?:([\s\S]*?)<\/Parameter>)?/g)){let e=/Name\s*=\s*"([^"]*)"/.exec(n[1])?.[1];e&&(t[e]=H(n[0],`Parameter`)??``)}return t}function Tt(e,t){let n=wt(t),r=xt(e);for(let t of e)t.name in n&&(r[t.name]=G(t,n[t.name]));return r}async function Et(e,t,n){if(!t.defaultValue||!W(t.defaultValue))return null;let r=await fetch(`/api/reporting/filters/${encodeURIComponent(e)}/GetParameterDefaultValue`,{body:JSON.stringify({parameterName:t.name}),credentials:`same-origin`,headers:{"Content-Type":`application/json`,"X-Requested-With":`XMLHttpRequest`},method:`POST`,signal:n});if(!r.ok)throw Error(`${r.status} ${r.statusText}`);return Ot(await r.json())}async function Dt(e,t,n,r){let i=t.filter(e=>W(e.defaultValue??``));if(i.length===0)return n;let a=await Promise.all(i.map(async t=>{try{return[t.name,await Et(e,t,r)]}catch{return[t.name,null]}})),o={...n};for(let[e,t]of a)t!==null&&(o[e]=t);return o}function Ot(e){let t=(Array.isArray(e)?e:Object.values(e).find(e=>Array.isArray(e)))?.[0];return t==null?null:Array.isArray(t)?t[0]??null:typeof t==`object`?Object.values(t)[0]??null:t}let kt={CSV:`csv`,HTML:`html`,IMAGE:`xbm`,MHT:`mht`,PDF:`pdf`,RTF:`rtf`,TEXT:`txt`,XLS:`xls`,XLSX:`xlsx`},At={CSV:`text/csv`,HTML:`text/html`,IMAGE:`image/x-xbitmap`,MHT:`message/rfc822`,PDF:`application/pdf`,RTF:`text/enriched`,TEXT:`text/plain`,XLS:`application/vnd.ms-excel`,XLSX:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`};function jt(e){return kt[e]}function K(e){return At[e]}let Mt=/[\\/:*?"<>|.#&+%\u0000-\u001f]/g;function q(e){let t=(e.fileName??e.reportId).trim().replace(Mt,`-`).replace(/-{2,}/g,`-`).replace(/^-|-$/g,``).trim();return`${t===``?e.reportId:t}.${jt(e.format)}`}function Nt(e){let t=window.location?.href;return t?new URL(e,t).toString():e}function J(e){let{domain:t,filter:n,headerText:r,hideFilterString:i,parameters:a,reportId:o,signal:s,timezone:c}=e,l=q(e),u=`/api/report/${encodeURIComponent(o)}/${encodeURIComponent(l)}`,d=new URLSearchParams,f=It(a),p=f.length>0||!!r||i===!0;if(t&&d.set(`Domain`,t),d.set(`timezone`,String(c??-new Date().getTimezoneOffset()/60)),!p)return n&&d.set(`Filter`,n),new Request(Nt(`${u}?${d}`),{credentials:`same-origin`,signal:s});let m={filter:n??``,parameters:f};return r&&(m.optionalheader=r),i===!0&&(m.showfiltercriteria=`true`),new Request(Nt(`${u}?${d}`),{body:JSON.stringify(m),credentials:`same-origin`,headers:{"Content-Type":`application/json`,"X-Requested-With":`XMLHttpRequest`},method:`POST`,signal:s})}async function Y(e){let t=await fetch(J(e));if((t.headers.get(`content-type`)??``).includes(`application/json`)){let e=await t.json();throw Error(e.error??`Failed to render report`)}if(!t.ok)throw Error(`${t.status} ${t.statusText}`);return t.blob()}function Pt(e){return oe(J(e),{fileName:q(e),onProgress:e.onProgress,signal:e.signal})}async function X(e){let t=await Y(e),n=URL.createObjectURL(t.type?t:new Blob([t],{type:K(e.format)}));if(!window.open(n,`_blank`,`noopener`))throw URL.revokeObjectURL(n),Error(`The report could not be opened. Allow pop-ups for this site and try again.`);window.setTimeout(()=>URL.revokeObjectURL(n),6e4)}async function Ft(e){let t=window.document;if(!t?.body)return X(e);let n=await Y(e),r=URL.createObjectURL(n.type?n:new Blob([n],{type:K(e.format)})),i=t.createElement(`iframe`);i.setAttribute(`aria-hidden`,`true`),i.style.cssText=`position:fixed;inset-block-start:0;inset-inline-start:0;inline-size:1px;block-size:1px;border:0;visibility:hidden`;let a=()=>{i.remove(),URL.revokeObjectURL(r)};try{await new Promise((e,n)=>{i.addEventListener(`load`,()=>e(),{once:!0}),i.addEventListener(`error`,()=>n(Error(`The report could not be loaded for printing`)),{once:!0}),i.src=r,t.body.append(i)}),i.contentWindow?.focus(),i.contentWindow?.print()}catch{return a(),X(e)}window.setTimeout(a,6e4)}function It(e){return e?Object.entries(e).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>({name:e,value:typeof t==`boolean`?String(t):t})):[]}function Z(e){return e===!0||e===1}function Lt(e){let t=[];return Z(e.FormatPDF)&&t.push(`PDF`),Z(e.FormatCSV)&&t.push(`XLSX`,`XLS`,`CSV`),Z(e.FormatHTML)&&t.push(`HTML`),Z(e.FormatRTF)&&t.push(`RTF`),Z(e.FormatMHT)&&t.push(`MHT`),Z(e.FormatTEXT)&&t.push(`TEXT`),Z(e.FormatIMAGE)&&t.push(`IMAGE`),t}function Rt(e){let t=U(e.RecordSource);return{reportId:e.ReportID??``,shortId:e.ShortID??null,title:e.Title?.trim()||null,description:e.Description?.trim()||null,viewName:t?.viewName??null,initialFilter:t?.filterString??null,hasTitle:Z(e.HasTitle),hasHeader:Z(e.HasHeader),formats:Lt(e),timeout:e.Timeout??null}}function zt(){if(document.querySelector(`#AlertDialogTemplate`))return;let e=document.createElement(`template`);e.id=`AlertDialogTemplate`,e.innerHTML=`
|
|
3
3
|
<dialog class="alert-dialog">
|
|
4
4
|
<form method="dialog">
|
|
@@ -8,5 +8,5 @@ this.af=this.af||{},this.af.common=(function(e){Object.defineProperty(e,Symbol.t
|
|
|
8
8
|
</footer>
|
|
9
9
|
</form>
|
|
10
10
|
</dialog>
|
|
11
|
-
`,document.body.append(e)}window.document&&(document.body?zt():document.addEventListener(`DOMContentLoaded`,zt,{once:!0}));function Bt(e,t=`No`){return new Promise(n=>{let r=new AbortController;e.addEventListener(`close`,()=>{n(e.returnValue),r.abort()},{signal:r.signal}),e.addEventListener(`cancel`,()=>{n(t),r.abort()},{signal:r.signal})})}let Q=new Map;async function $({buttons:e,content:t,className:n,id:r,title:i}){if(r&&Q.has(r))return await Q.get(r);let a=document.querySelector(`#AlertDialogTemplate`);if(!a)throw Error(`No alert dialog template found`);let o=a.content.firstElementChild?.cloneNode(!0),s=o?.querySelector(`article`),c=o?.querySelector(`footer menu`);if(!o||!s||!c)throw Error(`Invalid alert dialog template`);if(n)for(let e of n.split(/\s+/))o?.classList.add(e);if(i){let e=document.createElement(`header`);e.append(i),s.parentNode?.insertBefore(e,s)}s.appendChild(typeof t==`string`?document.createTextNode(t):t);for(let{label:t,value:n,primary:r}of e){let e=document.createElement(`li`),i=document.createElement(`button`);i.value=n,r&&i.classList.add(`primary`),i.textContent=t,e.appendChild(i),c.appendChild(i)}document.body.appendChild(o),o.showModal();let l=Bt(o).then(e=>(r&&Q.has(r)&&Q.delete(r),o&&document.body.removeChild(o),e));return r&&Q.set(r,l),await l}let Vt=function(e){return e[e.YesNo=0]=`YesNo`,e[e.OkCancel=1]=`OkCancel`,e}({});async function Ht(e,t={}){let{buttons:n=0,title:r}=t;return await $({content:e,buttons:n===1?[{label:y(`OK`),value:`yes`,primary:!0},{label:y(`Cancel`),value:`no`}]:[{label:y(`Yes`),value:`yes`,primary:!0},{label:y(`No`),value:`no`}],className:`alert-dialog-confirm`,title:r})===`yes`}async function Ut(e,t={}){await $({content:e,className:`alert-dialog-alert`,buttons:[{label:y(`OK`),value:`ok`,primary:!0}],...t})}function Wt(e){return`${e??window.af?.article?.id??window.window?.location.pathname.substring(1).split(`/`)[0]}.${window.af?.userSession.login??`anonymous`}`}function Gt(e,t){if(!window.af?.userSession)return null;let n=Wt(t),r=JSON.parse(localStorage.getItem(n)||`{}`);return e?r[e]||null:r}function Kt(e,t,n){if(!window.af?.userSession)return;let r=Wt(n),i=JSON.parse(localStorage.getItem(r)||`{}`);t===void 0?i=e:i[e]=t,localStorage.setItem(r,JSON.stringify(i))}return e.ConfirmButtons=Vt,e.NO_FILTER_ID=-1,e.RELATIVE_DATE_VALUES=Te,e.SessionHandler=n,e.UserSession=r,e.addGroupAtPath=Be,e.alert=Ut,e.canDeleteSavedFilter=at,e.canEditSavedFilter=rt,e.canRenameSavedFilter=z,e.canSetCrossDomain=ot,e.canShareSavedFilter=it,e.changeOperator=Fe,e.coerceParameterValue=G,e.coerceToStandardLayout=Xe,e.confirm=Ht,e.convertFilter=Ve,e.countExpressions=j,e.createEmptyFilter=D,e.createEmptyGroup=O,e.createExpression=Ne,e.decodeXml=B,e.describeFilter=He,e.downloadBlob=ae,e.downloadReport=Pt,e.downloadRequest=oe,e.encodeXml=V,e.expose=fe,e.fetchParameterDefault=Et,e.findSavedFilter=nt,e.getDefaultOperator=we,e.getDefaultParameterValues=xt,e.getDynamicValueLabel=De,e.getDynamicValuesForField=Oe,e.getLocalizedString=y,e.getNodeAtPath=Ie,e.getOperatorArity=b,e.getOperatorLabel=ye,e.getOperatorsForField=Ce,e.getReportExtension=jt,e.getReportFileName=q,e.getReportFormats=Lt,e.getReportMediaType=K,e.getReportRequest=J,e.getSessionData=m,e.getSettings=Gt,e.getUserImage=ct,e.getValueType=T,e.insertNodeAtPath=Le,e.invariant=g,e.isCompleteExpression=M,e.isEmptyFilter=je,e.isExpression=A,e.isGroup=k,e.isProcedureDefault=W,e.isStandardLayout=Ye,e.localStorage=te,e.localize=lt,e.logActivity=a,e.logError=c,e.mitt=t,e.normalizeOperator=E,e.openAlertDialog=$,e.openReport=X,e.parseParameterItems=gt,e.parseParameters=wt,e.parseRecordSource=U,e.partitionSavedFilters=tt,e.printReport=Ft,e.pruneFilter=Me,e.readElement=H,e.readElements=dt,e.removeNodeAtPath=Re,e.renderReport=Y,e.resolveParameterDefaults=Dt,e.restoreParameterValues=Tt,e.saveSettings=Kt,e.serializeParameters=Ct,e.setGroupMode=ze,e.startActivity=o,e.time=s,e.toFieldMetadata=qe,e.toFieldMetadataList=Je,e.toFilterFieldType=F,e.toFilterTree=Ae,e.toLocalDateTime=ie,e.toLocalISODate=ne,e.toLocalISODateTime=re,e.toReport=Rt,e.toReportParameter=yt,e.toReportParameters=bt,e.toSavedFilter=Ze,e.toSavedFilters=et,e.updateNodeAtPath=N,e.version=`2.
|
|
11
|
+
`,document.body.append(e)}window.document&&(document.body?zt():document.addEventListener(`DOMContentLoaded`,zt,{once:!0}));function Bt(e,t=`No`){return new Promise(n=>{let r=new AbortController;e.addEventListener(`close`,()=>{n(e.returnValue),r.abort()},{signal:r.signal}),e.addEventListener(`cancel`,()=>{n(t),r.abort()},{signal:r.signal})})}let Q=new Map;async function $({buttons:e,content:t,className:n,id:r,title:i}){if(r&&Q.has(r))return await Q.get(r);let a=document.querySelector(`#AlertDialogTemplate`);if(!a)throw Error(`No alert dialog template found`);let o=a.content.firstElementChild?.cloneNode(!0),s=o?.querySelector(`article`),c=o?.querySelector(`footer menu`);if(!o||!s||!c)throw Error(`Invalid alert dialog template`);if(n)for(let e of n.split(/\s+/))o?.classList.add(e);if(i){let e=document.createElement(`header`);e.append(i),s.parentNode?.insertBefore(e,s)}s.appendChild(typeof t==`string`?document.createTextNode(t):t);for(let{label:t,value:n,primary:r}of e){let e=document.createElement(`li`),i=document.createElement(`button`);i.value=n,r&&i.classList.add(`primary`),i.textContent=t,e.appendChild(i),c.appendChild(i)}document.body.appendChild(o),o.showModal();let l=Bt(o).then(e=>(r&&Q.has(r)&&Q.delete(r),o&&document.body.removeChild(o),e));return r&&Q.set(r,l),await l}let Vt=function(e){return e[e.YesNo=0]=`YesNo`,e[e.OkCancel=1]=`OkCancel`,e}({});async function Ht(e,t={}){let{buttons:n=0,title:r}=t;return await $({content:e,buttons:n===1?[{label:y(`OK`),value:`yes`,primary:!0},{label:y(`Cancel`),value:`no`}]:[{label:y(`Yes`),value:`yes`,primary:!0},{label:y(`No`),value:`no`}],className:`alert-dialog-confirm`,title:r})===`yes`}async function Ut(e,t={}){await $({content:e,className:`alert-dialog-alert`,buttons:[{label:y(`OK`),value:`ok`,primary:!0}],...t})}function Wt(e){return`${e??window.af?.article?.id??window.window?.location.pathname.substring(1).split(`/`)[0]}.${window.af?.userSession.login??`anonymous`}`}function Gt(e,t){if(!window.af?.userSession)return null;let n=Wt(t),r=JSON.parse(localStorage.getItem(n)||`{}`);return e?r[e]||null:r}function Kt(e,t,n){if(!window.af?.userSession)return;let r=Wt(n),i=JSON.parse(localStorage.getItem(r)||`{}`);t===void 0?i=e:i[e]=t,localStorage.setItem(r,JSON.stringify(i))}return e.ConfirmButtons=Vt,e.NO_FILTER_ID=-1,e.RELATIVE_DATE_VALUES=Te,e.SessionHandler=n,e.UserSession=r,e.addGroupAtPath=Be,e.alert=Ut,e.canDeleteSavedFilter=at,e.canEditSavedFilter=rt,e.canRenameSavedFilter=z,e.canSetCrossDomain=ot,e.canShareSavedFilter=it,e.changeOperator=Fe,e.coerceParameterValue=G,e.coerceToStandardLayout=Xe,e.confirm=Ht,e.convertFilter=Ve,e.countExpressions=j,e.createEmptyFilter=D,e.createEmptyGroup=O,e.createExpression=Ne,e.decodeXml=B,e.describeFilter=He,e.downloadBlob=ae,e.downloadReport=Pt,e.downloadRequest=oe,e.encodeXml=V,e.expose=fe,e.fetchParameterDefault=Et,e.findSavedFilter=nt,e.getDefaultOperator=we,e.getDefaultParameterValues=xt,e.getDynamicValueLabel=De,e.getDynamicValuesForField=Oe,e.getLocalizedString=y,e.getNodeAtPath=Ie,e.getOperatorArity=b,e.getOperatorLabel=ye,e.getOperatorsForField=Ce,e.getReportExtension=jt,e.getReportFileName=q,e.getReportFormats=Lt,e.getReportMediaType=K,e.getReportRequest=J,e.getSessionData=m,e.getSettings=Gt,e.getUserImage=ct,e.getValueType=T,e.insertNodeAtPath=Le,e.invariant=g,e.isCompleteExpression=M,e.isEmptyFilter=je,e.isExpression=A,e.isGroup=k,e.isProcedureDefault=W,e.isStandardLayout=Ye,e.localStorage=te,e.localize=lt,e.logActivity=a,e.logError=c,e.mitt=t,e.normalizeOperator=E,e.openAlertDialog=$,e.openReport=X,e.parseParameterItems=gt,e.parseParameters=wt,e.parseRecordSource=U,e.partitionSavedFilters=tt,e.printReport=Ft,e.pruneFilter=Me,e.readElement=H,e.readElements=dt,e.removeNodeAtPath=Re,e.renderReport=Y,e.resolveParameterDefaults=Dt,e.restoreParameterValues=Tt,e.saveSettings=Kt,e.serializeParameters=Ct,e.setGroupMode=ze,e.startActivity=o,e.time=s,e.toFieldMetadata=qe,e.toFieldMetadataList=Je,e.toFilterFieldType=F,e.toFilterTree=Ae,e.toLocalDateTime=ie,e.toLocalISODate=ne,e.toLocalISODateTime=re,e.toReport=Rt,e.toReportParameter=yt,e.toReportParameters=bt,e.toSavedFilter=Ze,e.toSavedFilters=et,e.updateNodeAtPath=N,e.version=`2.12.0`,e.waitForDialog=Bt,e})({});
|
|
12
12
|
//# sourceMappingURL=af.common.legacy.min.js.map
|