@sankhyalabs/sankhyablocks 1.3.31-beta.8 → 1.3.31-beta.9
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/{index-532bcc28.js → index-c6671817.js} +0 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +67 -24
- package/dist/cjs/snk-crud.cjs.entry.js +64 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +6 -2
- package/dist/cjs/snk-form_2.cjs.entry.js +170 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
- package/dist/cjs/{taskbar-elements-9d47b416.js → taskbar-elements-7f99f0c9.js} +2 -2
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +2 -2
- package/dist/collection/components/snk-application/snk-application.js +71 -25
- package/dist/collection/components/snk-crud/snk-crud.css +5 -0
- package/dist/collection/components/snk-crud/snk-crud.js +149 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +19 -1
- package/dist/collection/components/snk-form/snk-form.js +59 -22
- package/dist/collection/components/snk-grid/snk-grid.js +33 -13
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +1 -1
- package/dist/components/snk-application2.js +66 -23
- package/dist/components/snk-crud.d.ts +11 -0
- package/dist/components/snk-crud.js +102 -0
- package/dist/components/snk-data-unit.js +5 -1
- package/dist/components/snk-form.js +1 -116
- package/dist/components/snk-form2.js +134 -0
- package/dist/components/snk-grid.js +1 -83
- package/dist/components/snk-grid2.js +91 -0
- package/dist/components/snk-taskbar2.js +1 -1
- package/dist/esm/{index-0b078db7.js → index-6a83ac96.js} +0 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sankhyablocks.js +2 -2
- package/dist/esm/snk-application.entry.js +67 -24
- package/dist/esm/snk-crud.entry.js +60 -0
- package/dist/esm/snk-data-unit.entry.js +6 -2
- package/dist/esm/snk-form_2.entry.js +165 -0
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +2 -2
- package/dist/esm/{taskbar-elements-3ba30bf4.js → taskbar-elements-e0b8a285.js} +2 -2
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-bc14f01e.entry.js → p-18fe0469.entry.js} +2 -2
- package/dist/sankhyablocks/p-4e2fcfe4.entry.js +1 -0
- package/dist/sankhyablocks/{p-1c19b89c.entry.js → p-5e2e9334.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8f7b9a85.entry.js → p-7fe9e5c2.entry.js} +1 -1
- package/dist/sankhyablocks/p-8650ae26.entry.js +1 -0
- package/dist/sankhyablocks/p-a5439706.js +1 -0
- package/dist/sankhyablocks/p-c3d20542.entry.js +1 -0
- package/dist/sankhyablocks/p-cd1dc099.js +2 -0
- package/dist/sankhyablocks/{p-a8305c35.entry.js → p-d25637c9.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +12 -3
- package/dist/types/components.d.ts +48 -5
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +0 -95
- package/dist/cjs/snk-grid.cjs.entry.js +0 -64
- package/dist/esm/snk-form.entry.js +0 -91
- package/dist/esm/snk-grid.entry.js +0 -60
- package/dist/sankhyablocks/p-560fdf54.entry.js +0 -1
- package/dist/sankhyablocks/p-574764bf.js +0 -1
- package/dist/sankhyablocks/p-9c225717.entry.js +0 -1
- package/dist/sankhyablocks/p-a45dba1a.js +0 -2
- package/dist/sankhyablocks/p-eaa0772f.entry.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e,t,l,n=!1,s=!1,o=!1,i=!1;const c="undefined"!=typeof window?window:{},r=c.document||{head:{}},f={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,l,n)=>e.addEventListener(t,l,n),rel:(e,t,l,n)=>e.removeEventListener(t,l,n),ce:(e,t)=>new CustomEvent(e,t)},a=e=>Promise.resolve(e),u=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),$=new WeakMap,d=e=>"sc-"+e.o,h={},b=e=>"object"==(e=typeof e)||"function"===e,m=(e,t,...l)=>{let n=null,s=null,o=null,i=!1,c=!1;const r=[],f=t=>{for(let l=0;l<t.length;l++)n=t[l],Array.isArray(n)?f(n):null!=n&&"boolean"!=typeof n&&((i="function"!=typeof e&&!b(n))&&(n+=""),i&&c?r[r.length-1].i+=n:r.push(i?y(null,n):n),c=i)};if(f(l),t){t.key&&(s=t.key),t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=y(e,null);return a.u=t,r.length>0&&(a.$=r),a.h=s,a.m=o,a},y=(e,t)=>({t:0,p:e,i:t,k:null,$:null,u:null,h:null,m:null}),p={},w=(e,t,l,n,s,o)=>{if(l!==n){let i=le(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,s=S(l),o=S(n);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("key"===t);else if("ref"===t)n&&n(e);else if(i||"o"!==t[0]||"n"!==t[1]){const c=b(n);if((i||c&&null!==n)&&!s)try{if(e.tagName.includes("-"))e[t]=n;else{const s=null==n?"":n;"list"===t?i=!1:null!=l&&e[t]==s||(e[t]=s)}}catch(e){}null==n||!1===n?!1===n&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&o||s)&&!c&&e.setAttribute(t,n=!0===n?"":n)}else t="-"===t[2]?t.slice(3):le(c,r)?r.slice(2):r[2]+t.slice(3),l&&f.rel(e,t,l,!1),n&&f.ael(e,t,n,!1)}},k=/\s/,S=e=>e?e.split(k):[],g=(e,t,l,n)=>{const s=11===t.k.nodeType&&t.k.host?t.k.host:t.k,o=e&&e.u||h,i=t.u||h;for(n in o)n in i||w(s,n,o[n],void 0,l,t.t);for(n in i)w(s,n,o[n],i[n],l,t.t)},j=(s,i,c,f)=>{const a=i.$[c];let u,$,d,h=0;if(n||(o=!0,"slot"===a.p&&(e&&f.classList.add(e+"-s"),a.t|=a.$?2:1)),null!==a.i)u=a.k=r.createTextNode(a.i);else if(1&a.t)u=a.k=r.createTextNode("");else if(u=a.k=r.createElement(2&a.t?"slot-fb":a.p),g(null,a,!1),null!=e&&u["s-si"]!==e&&u.classList.add(u["s-si"]=e),a.$)for(h=0;h<a.$.length;++h)$=j(s,a,h,u),$&&u.appendChild($);return u["s-hn"]=l,3&a.t&&(u["s-sr"]=!0,u["s-cr"]=t,u["s-sn"]=a.m||"",d=s&&s.$&&s.$[c],d&&d.p===a.p&&s.k&&v(s.k,!1)),u},v=(e,t)=>{f.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const s=n[e];s["s-hn"]!==l&&s["s-ol"]&&(P(s).insertBefore(s,R(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),t&&v(s,t)}f.t&=-2},C=(e,t,n,s,o,i)=>{let c,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===l&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=j(null,n,o,e),c&&(s[o].k=c,r.insertBefore(c,R(t))))},M=(e,t,l,n,o)=>{for(;t<=l;++t)(n=e[t])&&(o=n.k,E(n),s=!0,o["s-ol"]?o["s-ol"].remove():v(o,!0),o.remove())},O=(e,t)=>e.p===t.p&&("slot"===e.p?e.m===t.m:e.h===t.h),R=e=>e&&e["s-ol"]||e,P=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,T=(e,t)=>{const l=t.k=e.k,n=e.$,s=t.$,o=t.i;let i;null===o?("slot"===t.p||g(e,t,!1),null!==n&&null!==s?((e,t,l,n)=>{let s,o,i=0,c=0,r=0,f=0,a=t.length-1,u=t[0],$=t[a],d=n.length-1,h=n[0],b=n[d];for(;i<=a&&c<=d;)if(null==u)u=t[++i];else if(null==$)$=t[--a];else if(null==h)h=n[++c];else if(null==b)b=n[--d];else if(O(u,h))T(u,h),u=t[++i],h=n[++c];else if(O($,b))T($,b),$=t[--a],b=n[--d];else if(O(u,b))"slot"!==u.p&&"slot"!==b.p||v(u.k.parentNode,!1),T(u,b),e.insertBefore(u.k,$.k.nextSibling),u=t[++i],b=n[--d];else if(O($,h))"slot"!==u.p&&"slot"!==b.p||v($.k.parentNode,!1),T($,h),e.insertBefore($.k,u.k),$=t[--a],h=n[++c];else{for(r=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].h&&t[f].h===h.h){r=f;break}r>=0?(o=t[r],o.p!==h.p?s=j(t&&t[c],l,r,e):(T(o,h),t[r]=void 0,s=o.k),h=n[++c]):(s=j(t&&t[c],l,c,e),h=n[++c]),s&&P(u.k).insertBefore(s,R(u.k))}i>a?C(e,null==n[d+1]?null:n[d+1].k,l,n,c,d):c>d&&M(t,i,a)})(l,n,t,s):null!==s?(null!==e.i&&(l.textContent=""),C(l,null,t,s,0,s.length-1)):null!==n&&M(n,0,n.length-1)):(i=l["s-cr"])?i.parentNode.textContent=o:e.i!==o&&(l.data=o)},L=e=>{const t=e.childNodes;let l,n,s,o,i,c;for(n=0,s=t.length;n<s;n++)if(l=t[n],1===l.nodeType){if(l["s-sr"])for(i=l["s-sn"],l.hidden=!1,o=0;o<s;o++)if(c=t[o].nodeType,t[o]["s-hn"]!==l["s-hn"]||""!==i){if(1===c&&i===t[o].getAttribute("slot")){l.hidden=!0;break}}else if(1===c||3===c&&""!==t[o].textContent.trim()){l.hidden=!0;break}L(l)}},N=[],W=e=>{let t,l,n,o,i,c,r=0;const f=e.childNodes,a=f.length;for(;r<a;r++){if(t=f[r],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(n=l.parentNode.childNodes,o=t["s-sn"],c=n.length-1;c>=0;c--)l=n[c],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(x(l,o)?(i=N.find((e=>e.S===l)),s=!0,l["s-sn"]=l["s-sn"]||o,i?i.g=t:N.push({g:t,S:l}),l["s-sr"]&&N.map((e=>{x(e.S,l["s-sn"])&&(i=N.find((e=>e.S===l)),i&&!e.g&&(e.g=i.g))}))):N.some((e=>e.S===l))||N.push({S:l}));1===t.nodeType&&W(t)}},x=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,E=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(E)},A=e=>Z(e).j,F=(e,t,l)=>{const n=A(e);return{emit:e=>H(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},H=(e,t,l)=>{const n=f.ce(t,l);return e.dispatchEvent(n),n},U=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},q=(e,t)=>{if(e.t|=16,!(4&e.t))return U(e,e.C),de((()=>D(e,t)));e.t|=512},D=(e,t)=>{const l=e.M;let n;return t&&(n=G(l,"componentWillLoad")),n=I(n,(()=>G(l,"componentWillRender"))),I(n,(()=>V(e,l,t)))},V=async(e,t,l)=>{const n=e.j,s=n["s-rc"];l&&(e=>{const t=e.O,l=e.j,n=t.t,s=((e,t)=>{let l=d(t);const n=ie.get(l);if(e=11===e.nodeType?e:r,n)if("string"==typeof n){let t,s=$.get(e=e.head||e);s||$.set(e,s=new Set),s.has(l)||(t=r.createElement("style"),t.innerHTML=n,e.insertBefore(t,e.querySelector("link")),s&&s.add(l))}else e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return l})(l.shadowRoot?l.shadowRoot:l.getRootNode(),t);10&n&&(l["s-sc"]=s,l.classList.add(s+"-h"),2&n&&l.classList.add(s+"-s"))})(e);_(e,t),s&&(s.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>z(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},_=(i,c)=>{try{c=c.render(),i.t&=-17,i.t|=2,((i,c)=>{const a=i.j,u=i.O,$=i.R||y(null,null),d=(e=>e&&e.p===p)(c)?c:m(null,null,c);if(l=a.tagName,d.p=null,d.t|=4,i.R=d,d.k=$.k=a.shadowRoot||a,e=a["s-sc"],t=a["s-cr"],n=0!=(1&u.t),s=!1,T($,d),f.t|=1,o){let e,t,l,n,s,o;W(d.k);let i=0;for(;i<N.length;i++)e=N[i],t=e.S,t["s-ol"]||(l=r.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(i=0;i<N.length;i++)if(e=N[i],t=e.S,e.g){for(n=e.g.parentNode,s=e.g.nextSibling,l=t["s-ol"];l=l.previousSibling;)if(o=l["s-nr"],o&&o["s-sn"]===t["s-sn"]&&n===o.parentNode&&(o=o.nextSibling,!o||!o["s-nr"])){s=o;break}(!s&&n!==t.parentNode||t.nextSibling!==s)&&t!==s&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,s))}else 1===t.nodeType&&(t.hidden=!0)}s&&L(d.k),f.t&=-2,N.length=0})(i,c)}catch(e){ne(e,i.j)}return null},z=e=>{const t=e.j,l=e.M,n=e.C;64&e.t||(e.t|=64,J(t),G(l,"componentDidLoad"),e.P(t),n||B()),e.T(t),e.v&&(e.v(),e.v=void 0),512&e.t&&$e((()=>q(e,!1))),e.t&=-517},B=()=>{J(r.documentElement),$e((()=>H(c,"appload",{detail:{namespace:"sankhyablocks"}})))},G=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){ne(e)}},I=(e,t)=>e&&e.then?e.then(t):t(),J=e=>e.classList.add("hydrated"),K=(e,t,l)=>{if(t.L){e.watchers&&(t.N=e.watchers);const n=Object.entries(t.L),s=e.prototype;if(n.map((([e,[n]])=>{31&n||2&l&&32&n?Object.defineProperty(s,e,{get(){return((e,t)=>Z(this).W.get(t))(0,e)},set(l){((e,t,l,n)=>{const s=Z(e),o=s.j,i=s.W.get(t),c=s.t,r=s.M;if(l=((e,t)=>null==e||b(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,n.L[t][0]),(!(8&c)||void 0===i)&&l!==i&&(!Number.isNaN(i)||!Number.isNaN(l))&&(s.W.set(t,l),r)){if(n.N&&128&c){const e=n.N[t];e&&e.map((e=>{try{r[e](l,i,t)}catch(e){ne(e,o)}}))}2==(18&c)&&q(s,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&n&&Object.defineProperty(s,e,{value(...t){const l=Z(this);return l.A.then((()=>l.M[e](...t)))}})})),1&l){const t=new Map;s.attributeChangedCallback=function(e,l,n){f.jmp((()=>{const l=t.get(e);if(this.hasOwnProperty(l))n=this[l],delete this[l];else if(s.hasOwnProperty(l)&&"number"==typeof this[l]&&this[l]==n)return;this[l]=(null!==n||"boolean"!=typeof this[l])&&n}))},e.observedAttributes=n.filter((([e,t])=>15&t[0])).map((([e,l])=>{const n=l[1]||e;return t.set(n,e),n}))}}return e},Q=e=>{G(e,"connectedCallback")},X=(e,t={})=>{const l=[],n=t.exclude||[],s=c.customElements,o=r.head,i=o.querySelector("meta[charset]"),a=r.createElement("style"),$=[];let h,b=!0;Object.assign(f,t),f.l=new URL(t.resourcesUrl||"./",r.baseURI).href,e.map((e=>{e[1].map((t=>{const o={t:t[0],o:t[1],L:t[2],F:t[3]};o.L=t[2],o.N={};const i=o.o,c=class extends HTMLElement{constructor(e){super(e),te(e=this,o),1&o.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),b?$.push(this):f.jmp((()=>(e=>{if(0==(1&f.t)){const t=Z(e),l=t.O,n=()=>{};if(1&t.t)Q(t.M);else{t.t|=1,12&l.t&&(e=>{const t=e["s-cr"]=r.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let l=e;for(;l=l.parentNode||l.host;)if(l["s-p"]){U(t,t.C=l);break}}l.L&&Object.entries(l.L).map((([t,[l]])=>{if(31&l&&e.hasOwnProperty(t)){const l=e[t];delete e[t],e[t]=l}})),(async(e,t,l,n,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=oe(l)).then){const e=()=>{};s=await s,e()}s.isProxied||(l.N=s.watchers,K(s,l,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){ne(e)}t.t&=-9,t.t|=128,e(),Q(t.M)}if(s.style){let e=s.style;const t=d(l);if(!ie.has(t)){const n=()=>{};((e,t,l)=>{let n=ie.get(e);u&&l?(n=n||new CSSStyleSheet,n.replace(t)):n=t,ie.set(e,n)})(t,e,!!(1&l.t)),n()}}}const o=t.C,i=()=>q(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,l)}n()}})(this)))}disconnectedCallback(){f.jmp((()=>(()=>{0==(1&f.t)&&G(Z(this).M,"disconnectedCallback")})()))}componentOnReady(){return Z(this).H}};o.U=e[0],n.includes(i)||s.get(i)||(l.push(i),s.define(i,K(c,o,1)))}))})),a.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",a.setAttribute("data-styles",""),o.insertBefore(a,i?i.nextSibling:o.firstChild),b=!1,$.length?$.map((e=>e.connectedCallback())):f.jmp((()=>h=setTimeout(B,30)))},Y=new WeakMap,Z=e=>Y.get(e),ee=(e,t)=>Y.set(t.M=e,t),te=(e,t)=>{const l={t:0,j:e,O:t,W:new Map};return l.A=new Promise((e=>l.T=e)),l.H=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],Y.set(e,l)},le=(e,t)=>t in e,ne=(e,t)=>(0,console.error)(e,t),se=new Map,oe=e=>{const t=e.o.replace(/-/g,"_"),l=e.U,n=se.get(l);return n?n[t]:import(`./${l}.entry.js`).then((e=>(se.set(l,e),e[t])),ne)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ie=new Map,ce=[],re=[],fe=(e,t)=>l=>{e.push(l),i||(i=!0,t&&4&f.t?$e(ue):f.raf(ue))},ae=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ne(e)}e.length=0},ue=()=>{ae(ce),ae(re),(i=ce.length>0)&&f.raf(ue)},$e=e=>a().then(e),de=fe(re,!0);export{p as H,X as b,F as c,A as g,m as h,a as p,ee as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,h as e}from"./p-
|
|
1
|
+
import{r as a,h as e}from"./p-cd1dc099.js";import{DataUnit as r,DataType as o,UserInterface as i}from"@sankhyalabs/core";const s=class{constructor(e){a(this,e)}componentWillLoad(){this.dataUnit=new r("testes_com_formulario"),this.dataUnit.metadata={name:"dd://br.com.sankhya.fin.cad.movimentacaoFinanceira/Financeiro",label:"Parceiro",fields:[{name:"CODPARC",label:"Parceiro",dataType:o.NUMBER,userInterface:i.SEARCH,required:!0,properties:{ENTITYNAME:"Parceiro"}}]}}render(){return e("snk-application",null,e("ez-form",{dataUnit:this.dataUnit}))}};s.style=":host{display:block}";export{s as teste_pesquisa}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,b as t}from"./p-
|
|
1
|
+
import{p as a,b as t}from"./p-cd1dc099.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),a(e)})().then((a=>t([["p-c3d20542",[[6,"snk-crud",{configName:[1,"config-name"],formTitle:[1,"form-title"],actionsList:[16],recordsValidator:[8,"records-validator"],_dataUnit:[32],_dataState:[32]}]]],["p-d25637c9",[[1,"teste-pesquisa"]]],["p-8650ae26",[[2,"snk-data-unit",{dataState:[1040],dataUnitName:[1,"data-unit-name"],entityName:[1,"entity-name"],pageSize:[2,"page-size"],dataUnit:[1040],messageBuilder:[16],beforeSave:[16],afterSave:[16],autoLoad:[4,"auto-load"],getDataUnit:[64]}]]],["p-18fe0469",[[2,"snk-application",{isUserSup:[64],hasAccess:[64],getAllAccess:[64],getStringParam:[64],getIntParam:[64],getFloatParam:[64],getBooleanParam:[64],getDateParam:[64],showPopUp:[64],closePopUp:[64],temOpcional:[64],getConfig:[64],saveConfig:[64],getAttributeFromHTMLWrapper:[64],openApp:[64],createDataunit:[64],getDataUnit:[64],getResourceID:[64],alert:[64],error:[64],confirm:[64],info:[64],loadFormConfig:[64],loadGridConfig:[64],saveGridConfig:[64],executeSearch:[64],isDebugMode:[64]}]]],["p-4e2fcfe4",[[2,"snk-form",{formTitle:[1,"form-title"],configName:[1,"config-name"],recordsValidator:[8,"records-validator"],actionsList:[16],_dataUnit:[32],_configLoaded:[32],_dataState:[32],_editionFormConfig:[32],_insertionFormConfig:[32]}],[6,"snk-grid",{configName:[1,"config-name"],actionsList:[16],_dataUnit:[32],_configLoaded:[32],_dataState:[32],_gridConfig:[32]}]]],["p-5e2e9334",[[2,"snk-pesquisa",{searchLoader:[16],selectItem:[16],argument:[1025],_itemList:[32],_startLoading:[32]}]]],["p-7fe9e5c2",[[6,"snk-taskbar",{buttons:[1],actionsList:[16],primaryButton:[1,"primary-button"],disabledButtons:[16],dataUnit:[16],_permissions:[32]}]]]],a)));
|
|
@@ -23,7 +23,9 @@ export declare class SnkApplication {
|
|
|
23
23
|
_resourceID: string;
|
|
24
24
|
_popUp: HTMLEzPopupElement;
|
|
25
25
|
_errorHandler: SnkErrorHandler;
|
|
26
|
+
_authPromises: Array<PendingPromise>;
|
|
26
27
|
_duCache: Map<string, DataUnit>;
|
|
28
|
+
_duPromises: Map<string, Array<PendingPromise>>;
|
|
27
29
|
_requestListener: RequestListenerLoadingBar;
|
|
28
30
|
private _auth;
|
|
29
31
|
private get parameters();
|
|
@@ -90,12 +92,14 @@ export declare class SnkApplication {
|
|
|
90
92
|
* Abre determinada tela, repassando pkObject
|
|
91
93
|
*/
|
|
92
94
|
openApp(resourceId: string, pkObject: Object): Promise<void>;
|
|
95
|
+
private getDuPromissesStack;
|
|
93
96
|
/**
|
|
94
|
-
* Cria o DataUnit a partir do nome da entidade.
|
|
97
|
+
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
|
98
|
+
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado
|
|
95
99
|
*/
|
|
96
|
-
createDataunit(entityName: string): Promise<DataUnit>;
|
|
100
|
+
createDataunit(entityName: string, dataUnitName?: string): Promise<DataUnit>;
|
|
97
101
|
/**
|
|
98
|
-
*
|
|
102
|
+
* Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
|
99
103
|
*/
|
|
100
104
|
getDataUnit(entityName: string, dataUnitName: string): Promise<DataUnit>;
|
|
101
105
|
/**
|
|
@@ -164,4 +168,9 @@ declare class RequestListenerLoadingBar implements RequestListener {
|
|
|
164
168
|
onRequestStart(): void;
|
|
165
169
|
onRequestEnd(): void;
|
|
166
170
|
}
|
|
171
|
+
declare class PendingPromise {
|
|
172
|
+
resolve: any;
|
|
173
|
+
reject: any;
|
|
174
|
+
constructor(resolve: Function, reject: Function);
|
|
175
|
+
}
|
|
167
176
|
export {};
|
|
@@ -8,12 +8,12 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
|
8
8
|
import { AutorizationType } from "./lib/http/data-fetcher/fetchers/auth-fetcher";
|
|
9
9
|
import { DataUnit } from "@sankhyalabs/core";
|
|
10
10
|
import { MessageOptions } from "@sankhyalabs/ezui/dist/collection/utils";
|
|
11
|
-
import { FieldConfig } from "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form";
|
|
11
|
+
import { FieldConfig, RecordValidator } from "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form";
|
|
12
12
|
import { EzGridConfig } from "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController";
|
|
13
13
|
import { Option } from "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box";
|
|
14
14
|
import { SearchCriteria } from "./lib/http/data-fetcher/fetchers/pesquisa-fetcher";
|
|
15
|
-
import { DataState } from "./components/snk-data-unit/snk-data-unit";
|
|
16
15
|
import { Action } from "./components/snk-taskbar/snk-taskbar";
|
|
16
|
+
import { DataState } from "./components/snk-data-unit/snk-data-unit";
|
|
17
17
|
import { Action as Action1 } from "./components/snk-taskbar/snk-taskbar";
|
|
18
18
|
export namespace Components {
|
|
19
19
|
interface SnkApplication {
|
|
@@ -30,9 +30,9 @@ export namespace Components {
|
|
|
30
30
|
*/
|
|
31
31
|
"confirm": (title: string, message: string, icon?: string, critical?: boolean, options?: MessageOptions) => Promise<boolean>;
|
|
32
32
|
/**
|
|
33
|
-
* Cria o DataUnit a partir do nome da entidade.
|
|
33
|
+
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado
|
|
34
34
|
*/
|
|
35
|
-
"createDataunit": (entityName: string) => Promise<DataUnit>;
|
|
35
|
+
"createDataunit": (entityName: string, dataUnitName?: string) => Promise<DataUnit>;
|
|
36
36
|
/**
|
|
37
37
|
* Mostra o diálogo de erro de acordo com os parâmetros passados.
|
|
38
38
|
*/
|
|
@@ -55,7 +55,7 @@ export namespace Components {
|
|
|
55
55
|
*/
|
|
56
56
|
"getConfig": (key: string) => Promise<any>;
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
|
59
59
|
*/
|
|
60
60
|
"getDataUnit": (entityName: string, dataUnitName: string) => Promise<DataUnit>;
|
|
61
61
|
/**
|
|
@@ -120,6 +120,15 @@ export namespace Components {
|
|
|
120
120
|
*/
|
|
121
121
|
"temOpcional": (opcional: string) => Promise<boolean>;
|
|
122
122
|
}
|
|
123
|
+
interface SnkCrud {
|
|
124
|
+
"actionsList": Array<Action>;
|
|
125
|
+
"configName": string;
|
|
126
|
+
"formTitle": string;
|
|
127
|
+
/**
|
|
128
|
+
* Validador responsável por checar a integridade das informações do registro
|
|
129
|
+
*/
|
|
130
|
+
"recordsValidator": RecordValidator;
|
|
131
|
+
}
|
|
123
132
|
interface SnkDataUnit {
|
|
124
133
|
/**
|
|
125
134
|
* Executado após a ação de salvar
|
|
@@ -176,6 +185,10 @@ export namespace Components {
|
|
|
176
185
|
* Texto que aparece de forma descritiva no cabeçalho do form
|
|
177
186
|
*/
|
|
178
187
|
"formTitle": string;
|
|
188
|
+
/**
|
|
189
|
+
* Validador responsável por checar a integridade das informações do registro
|
|
190
|
+
*/
|
|
191
|
+
"recordsValidator": RecordValidator;
|
|
179
192
|
}
|
|
180
193
|
interface SnkGrid {
|
|
181
194
|
/**
|
|
@@ -244,6 +257,12 @@ declare global {
|
|
|
244
257
|
prototype: HTMLSnkApplicationElement;
|
|
245
258
|
new (): HTMLSnkApplicationElement;
|
|
246
259
|
};
|
|
260
|
+
interface HTMLSnkCrudElement extends Components.SnkCrud, HTMLStencilElement {
|
|
261
|
+
}
|
|
262
|
+
var HTMLSnkCrudElement: {
|
|
263
|
+
prototype: HTMLSnkCrudElement;
|
|
264
|
+
new (): HTMLSnkCrudElement;
|
|
265
|
+
};
|
|
247
266
|
interface HTMLSnkDataUnitElement extends Components.SnkDataUnit, HTMLStencilElement {
|
|
248
267
|
}
|
|
249
268
|
var HTMLSnkDataUnitElement: {
|
|
@@ -282,6 +301,7 @@ declare global {
|
|
|
282
301
|
};
|
|
283
302
|
interface HTMLElementTagNameMap {
|
|
284
303
|
"snk-application": HTMLSnkApplicationElement;
|
|
304
|
+
"snk-crud": HTMLSnkCrudElement;
|
|
285
305
|
"snk-data-unit": HTMLSnkDataUnitElement;
|
|
286
306
|
"snk-form": HTMLSnkFormElement;
|
|
287
307
|
"snk-grid": HTMLSnkGridElement;
|
|
@@ -301,6 +321,15 @@ declare namespace LocalJSX {
|
|
|
301
321
|
*/
|
|
302
322
|
"onApplicationLoading"?: (event: SnkApplicationCustomEvent<boolean>) => void;
|
|
303
323
|
}
|
|
324
|
+
interface SnkCrud {
|
|
325
|
+
"actionsList"?: Array<Action>;
|
|
326
|
+
"configName"?: string;
|
|
327
|
+
"formTitle"?: string;
|
|
328
|
+
/**
|
|
329
|
+
* Validador responsável por checar a integridade das informações do registro
|
|
330
|
+
*/
|
|
331
|
+
"recordsValidator"?: RecordValidator;
|
|
332
|
+
}
|
|
304
333
|
interface SnkDataUnit {
|
|
305
334
|
/**
|
|
306
335
|
* Executado após a ação de salvar
|
|
@@ -334,6 +363,10 @@ declare namespace LocalJSX {
|
|
|
334
363
|
* Abstração para obter-se mensagens de acordo com o estado dos dados.
|
|
335
364
|
*/
|
|
336
365
|
"messageBuilder"?: (messageKey: string, dataState: DataState, dataUnit: DataUnit) => string;
|
|
366
|
+
/**
|
|
367
|
+
* Disparado quando se cancela uma insersão/cópia
|
|
368
|
+
*/
|
|
369
|
+
"onCancelEdition"?: (event: SnkDataUnitCustomEvent<void>) => void;
|
|
337
370
|
/**
|
|
338
371
|
* Disparado quando o há qualquer mudança de estado no DataUnit
|
|
339
372
|
*/
|
|
@@ -372,6 +405,10 @@ declare namespace LocalJSX {
|
|
|
372
405
|
* Emitido quando o botão de voltar é acionado
|
|
373
406
|
*/
|
|
374
407
|
"onExit"?: (event: SnkFormCustomEvent<void>) => void;
|
|
408
|
+
/**
|
|
409
|
+
* Validador responsável por checar a integridade das informações do registro
|
|
410
|
+
*/
|
|
411
|
+
"recordsValidator"?: RecordValidator;
|
|
375
412
|
}
|
|
376
413
|
interface SnkGrid {
|
|
377
414
|
/**
|
|
@@ -386,6 +423,10 @@ declare namespace LocalJSX {
|
|
|
386
423
|
* Emitido sempre que houver click de botão ou ação
|
|
387
424
|
*/
|
|
388
425
|
"onActionClick"?: (event: SnkGridCustomEvent<string>) => void;
|
|
426
|
+
/**
|
|
427
|
+
* Emitido sempre que houver duplo click na grade
|
|
428
|
+
*/
|
|
429
|
+
"onGridDoubleClick"?: (event: SnkGridCustomEvent<void>) => void;
|
|
389
430
|
}
|
|
390
431
|
interface SnkPesquisa {
|
|
391
432
|
"argument"?: string;
|
|
@@ -422,6 +463,7 @@ declare namespace LocalJSX {
|
|
|
422
463
|
}
|
|
423
464
|
interface IntrinsicElements {
|
|
424
465
|
"snk-application": SnkApplication;
|
|
466
|
+
"snk-crud": SnkCrud;
|
|
425
467
|
"snk-data-unit": SnkDataUnit;
|
|
426
468
|
"snk-form": SnkForm;
|
|
427
469
|
"snk-grid": SnkGrid;
|
|
@@ -435,6 +477,7 @@ declare module "@stencil/core" {
|
|
|
435
477
|
export namespace JSX {
|
|
436
478
|
interface IntrinsicElements {
|
|
437
479
|
"snk-application": LocalJSX.SnkApplication & JSXBase.HTMLAttributes<HTMLSnkApplicationElement>;
|
|
480
|
+
"snk-crud": LocalJSX.SnkCrud & JSXBase.HTMLAttributes<HTMLSnkCrudElement>;
|
|
438
481
|
"snk-data-unit": LocalJSX.SnkDataUnit & JSXBase.HTMLAttributes<HTMLSnkDataUnitElement>;
|
|
439
482
|
"snk-form": LocalJSX.SnkForm & JSXBase.HTMLAttributes<HTMLSnkFormElement>;
|
|
440
483
|
"snk-grid": LocalJSX.SnkGrid & JSXBase.HTMLAttributes<HTMLSnkGridElement>;
|
package/package.json
CHANGED
package/react/components.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { JSX } from '@sankhyalabs/sankhyablocks';
|
|
3
3
|
export declare const SnkApplication: import("react").ForwardRefExoticComponent<JSX.SnkApplication & Pick<import("react").HTMLAttributes<HTMLSnkApplicationElement>, "dir" | "slot" | "title" | "children" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkApplicationElement>>;
|
|
4
|
+
export declare const SnkCrud: import("react").ForwardRefExoticComponent<JSX.SnkCrud & Pick<import("react").HTMLAttributes<HTMLSnkCrudElement>, "dir" | "slot" | "title" | "children" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkCrudElement>>;
|
|
4
5
|
export declare const SnkDataUnit: import("react").ForwardRefExoticComponent<JSX.SnkDataUnit & Pick<import("react").HTMLAttributes<HTMLSnkDataUnitElement>, "dir" | "slot" | "title" | "children" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkDataUnitElement>>;
|
|
5
6
|
export declare const SnkForm: import("react").ForwardRefExoticComponent<JSX.SnkForm & Pick<import("react").HTMLAttributes<HTMLSnkFormElement>, "dir" | "slot" | "title" | "children" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkFormElement>>;
|
|
6
7
|
export declare const SnkGrid: import("react").ForwardRefExoticComponent<JSX.SnkGrid & Pick<import("react").HTMLAttributes<HTMLSnkGridElement>, "dir" | "slot" | "title" | "children" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkGridElement>>;
|
package/react/components.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/* auto-generated react proxies */
|
|
4
4
|
import { createReactComponent } from './react-component-lib';
|
|
5
5
|
export const SnkApplication = /*@__PURE__*/ createReactComponent('snk-application');
|
|
6
|
+
export const SnkCrud = /*@__PURE__*/ createReactComponent('snk-crud');
|
|
6
7
|
export const SnkDataUnit = /*@__PURE__*/ createReactComponent('snk-data-unit');
|
|
7
8
|
export const SnkForm = /*@__PURE__*/ createReactComponent('snk-form');
|
|
8
9
|
export const SnkGrid = /*@__PURE__*/ createReactComponent('snk-grid');
|
package/react/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAM7D,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAA,oBAAoB,CAAgD,iBAAiB,CAAC,CAAC;AAClI,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAA,oBAAoB,CAA0C,eAAe,CAAC,CAAC;AACvH,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAA,oBAAoB,CAAkC,UAAU,CAAC,CAAC;AACtG,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAA,oBAAoB,CAAkC,UAAU,CAAC,CAAC;AACtG,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAA,oBAAoB,CAA0C,cAAc,CAAC,CAAC;AACtH,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA,oBAAoB,CAAwC,aAAa,CAAC,CAAC;AAClH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAA,oBAAoB,CAA8C,gBAAgB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAM7D,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAA,oBAAoB,CAAgD,iBAAiB,CAAC,CAAC;AAClI,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAA,oBAAoB,CAAkC,UAAU,CAAC,CAAC;AACtG,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAA,oBAAoB,CAA0C,eAAe,CAAC,CAAC;AACvH,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAA,oBAAoB,CAAkC,UAAU,CAAC,CAAC;AACtG,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAA,oBAAoB,CAAkC,UAAU,CAAC,CAAC;AACtG,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAA,oBAAoB,CAA0C,cAAc,CAAC,CAAC;AACtH,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA,oBAAoB,CAAwC,aAAa,CAAC,CAAC;AAClH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAA,oBAAoB,CAA8C,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-532bcc28.js');
|
|
6
|
-
const core = require('@sankhyalabs/core');
|
|
7
|
-
|
|
8
|
-
const snkFormCss = ".sc-snk-form-h{display:block}";
|
|
9
|
-
|
|
10
|
-
const SnkForm = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.exit = index.createEvent(this, "exit", 7);
|
|
14
|
-
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
15
|
-
}
|
|
16
|
-
getFormConfig() {
|
|
17
|
-
return (this._dataState && this._dataState.insertionMode ? this._insertionFormConfig : this._editionFormConfig);
|
|
18
|
-
}
|
|
19
|
-
getInsertionHiddenFields(formConfig) {
|
|
20
|
-
const hiddenFields = [];
|
|
21
|
-
formConfig === null || formConfig === void 0 ? void 0 : formConfig.forEach(cfg => {
|
|
22
|
-
const def = this._dataUnit.getField(cfg.name);
|
|
23
|
-
if (def === null || def === void 0 ? void 0 : def.readOnly) {
|
|
24
|
-
hiddenFields.push(cfg.name);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
return hiddenFields;
|
|
28
|
-
}
|
|
29
|
-
exitForm() {
|
|
30
|
-
if (this._dataUnit.isDirty()) {
|
|
31
|
-
this._dataUnit.cancelEdition({ after: () => this.exit.emit() });
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
this.exit.emit();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
getDisabledButtons() {
|
|
38
|
-
const disabled = [];
|
|
39
|
-
if (!this._dataState.hasPrevious) {
|
|
40
|
-
disabled.push("PREVIOUS");
|
|
41
|
-
}
|
|
42
|
-
if (!this._dataState.hasNext) {
|
|
43
|
-
disabled.push("NEXT");
|
|
44
|
-
}
|
|
45
|
-
return disabled;
|
|
46
|
-
}
|
|
47
|
-
componentWillLoad() {
|
|
48
|
-
let parent = this._element.parentElement;
|
|
49
|
-
while (parent) {
|
|
50
|
-
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
|
51
|
-
this._snkDataUnit = parent;
|
|
52
|
-
this._dataUnit = this._snkDataUnit.dataUnit;
|
|
53
|
-
this._dataState = this._snkDataUnit.dataState;
|
|
54
|
-
if (!this._dataUnit) {
|
|
55
|
-
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
|
56
|
-
this._dataUnit = evt.detail;
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
60
|
-
this._dataState = evt.detail;
|
|
61
|
-
});
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
parent = parent.parentElement;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
componentWillRender() {
|
|
68
|
-
if (this._dataUnit && !this._configLoaded) {
|
|
69
|
-
const snkApplication = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
70
|
-
if (snkApplication) {
|
|
71
|
-
snkApplication.loadFormConfig(this.configName).then(cfg => {
|
|
72
|
-
this._configLoaded = true;
|
|
73
|
-
this._editionFormConfig = cfg;
|
|
74
|
-
this._insertionFormConfig = cfg.filter(fieldCfg => {
|
|
75
|
-
const def = this._dataUnit.getField(fieldCfg.name);
|
|
76
|
-
if (def === null || def === void 0 ? void 0 : def.readOnly) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
return true;
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
render() {
|
|
86
|
-
if (!this._configLoaded || !this._dataUnit || !this._dataState) {
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
return (index.h("section", { class: "ez-padding--large" }, index.h("div", { class: "ez-row ez-padding-bottom--medium" }, index.h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6", key: "formHeader" }, index.h("ez-button", { mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small", onClick: () => this.exitForm() }), index.h("h1", { class: "ez-title ez-title--primary ez-title--xlarge ez-align--middle" }, this.formTitle)), index.h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6 ez-align--right" }, index.h("snk-taskbar", { key: "formTaskbar", buttons: this._dataState.isDirty ? "CANCEL,SAVE" : "PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,INSERT", primaryButton: this._dataState.isDirty ? "SAVE" : "INSERT", disabledButtons: this.getDisabledButtons(), actionsList: this.actionsList, dataUnit: this._dataUnit }))), index.h("div", { class: "ez-padding--small" }), index.h("section", null, index.h("div", { class: "ez-row" }, index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, dataUnit: this._dataUnit, config: this.getFormConfig() }))))));
|
|
90
|
-
}
|
|
91
|
-
get _element() { return index.getElement(this); }
|
|
92
|
-
};
|
|
93
|
-
SnkForm.style = snkFormCss;
|
|
94
|
-
|
|
95
|
-
exports.snk_form = SnkForm;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-532bcc28.js');
|
|
6
|
-
const core = require('@sankhyalabs/core');
|
|
7
|
-
const taskbarElements = require('./taskbar-elements-9d47b416.js');
|
|
8
|
-
|
|
9
|
-
const snkGridCss = ".sc-snk-grid-h{display:flex;height:100%;width:100%}";
|
|
10
|
-
|
|
11
|
-
const SnkGrid = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
15
|
-
}
|
|
16
|
-
getHeaderButtons() {
|
|
17
|
-
return this._dataState && this._dataState.selectedRecords.length > 0 ? "UPDATE,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,REFRESH" : "REFRESH";
|
|
18
|
-
}
|
|
19
|
-
actionClickHandler(evt) {
|
|
20
|
-
if (evt.detail === taskbarElements.TaskbarElement.CONFIG_GRID && this._grid) {
|
|
21
|
-
this._grid.openGridConfig();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
componentWillLoad() {
|
|
25
|
-
let parent = this._element.parentElement;
|
|
26
|
-
while (parent) {
|
|
27
|
-
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
|
28
|
-
this._snkDataUnit = parent;
|
|
29
|
-
this._dataUnit = this._snkDataUnit.dataUnit;
|
|
30
|
-
if (!this._dataUnit) {
|
|
31
|
-
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
|
32
|
-
this._dataUnit = evt.detail;
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
36
|
-
this._dataState = evt.detail;
|
|
37
|
-
});
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
parent = parent.parentElement;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
componentWillRender() {
|
|
44
|
-
if (this._dataUnit && !this._configLoaded) {
|
|
45
|
-
const snkApplication = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
46
|
-
if (snkApplication) {
|
|
47
|
-
snkApplication.loadGridConfig(this.configName).then(cfg => {
|
|
48
|
-
this._gridConfig = cfg;
|
|
49
|
-
this._configLoaded = true;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
if (!this._configLoaded || !this._dataUnit) {
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
58
|
-
return (index.h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "ez-row ez-padding-bottom--medium ez-margin-bottom--medium" }, index.h("div", { class: "ez-col ez-col--sd-9 ez-col--tb-9 ez-align--bottom" }, index.h("slot", null)), index.h("div", { class: "ez-col ez-col--sd-3 ez-col--tb-3 ez-align--right" }, index.h("snk-taskbar", { onActionClick: evt => this.actionClickHandler(evt), key: "topTaskbar", dataUnit: this._dataUnit, buttons: "FORM_MODE,CONFIG_GRID,INSERT", primaryButton: "INSERT" }))), index.h("ez-grid", { ref: ref => this._grid = ref, dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig }, index.h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this.getHeaderButtons(), slot: "leftButtons", actionsList: this.actionsList }))));
|
|
59
|
-
}
|
|
60
|
-
get _element() { return index.getElement(this); }
|
|
61
|
-
};
|
|
62
|
-
SnkGrid.style = snkGridCss;
|
|
63
|
-
|
|
64
|
-
exports.snk_grid = SnkGrid;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-0b078db7.js';
|
|
2
|
-
import { ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
|
|
4
|
-
const snkFormCss = ".sc-snk-form-h{display:block}";
|
|
5
|
-
|
|
6
|
-
const SnkForm = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.exit = createEvent(this, "exit", 7);
|
|
10
|
-
this.actionClick = createEvent(this, "actionClick", 7);
|
|
11
|
-
}
|
|
12
|
-
getFormConfig() {
|
|
13
|
-
return (this._dataState && this._dataState.insertionMode ? this._insertionFormConfig : this._editionFormConfig);
|
|
14
|
-
}
|
|
15
|
-
getInsertionHiddenFields(formConfig) {
|
|
16
|
-
const hiddenFields = [];
|
|
17
|
-
formConfig === null || formConfig === void 0 ? void 0 : formConfig.forEach(cfg => {
|
|
18
|
-
const def = this._dataUnit.getField(cfg.name);
|
|
19
|
-
if (def === null || def === void 0 ? void 0 : def.readOnly) {
|
|
20
|
-
hiddenFields.push(cfg.name);
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
return hiddenFields;
|
|
24
|
-
}
|
|
25
|
-
exitForm() {
|
|
26
|
-
if (this._dataUnit.isDirty()) {
|
|
27
|
-
this._dataUnit.cancelEdition({ after: () => this.exit.emit() });
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
this.exit.emit();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
getDisabledButtons() {
|
|
34
|
-
const disabled = [];
|
|
35
|
-
if (!this._dataState.hasPrevious) {
|
|
36
|
-
disabled.push("PREVIOUS");
|
|
37
|
-
}
|
|
38
|
-
if (!this._dataState.hasNext) {
|
|
39
|
-
disabled.push("NEXT");
|
|
40
|
-
}
|
|
41
|
-
return disabled;
|
|
42
|
-
}
|
|
43
|
-
componentWillLoad() {
|
|
44
|
-
let parent = this._element.parentElement;
|
|
45
|
-
while (parent) {
|
|
46
|
-
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
|
47
|
-
this._snkDataUnit = parent;
|
|
48
|
-
this._dataUnit = this._snkDataUnit.dataUnit;
|
|
49
|
-
this._dataState = this._snkDataUnit.dataState;
|
|
50
|
-
if (!this._dataUnit) {
|
|
51
|
-
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
|
52
|
-
this._dataUnit = evt.detail;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
56
|
-
this._dataState = evt.detail;
|
|
57
|
-
});
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
parent = parent.parentElement;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
componentWillRender() {
|
|
64
|
-
if (this._dataUnit && !this._configLoaded) {
|
|
65
|
-
const snkApplication = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
66
|
-
if (snkApplication) {
|
|
67
|
-
snkApplication.loadFormConfig(this.configName).then(cfg => {
|
|
68
|
-
this._configLoaded = true;
|
|
69
|
-
this._editionFormConfig = cfg;
|
|
70
|
-
this._insertionFormConfig = cfg.filter(fieldCfg => {
|
|
71
|
-
const def = this._dataUnit.getField(fieldCfg.name);
|
|
72
|
-
if (def === null || def === void 0 ? void 0 : def.readOnly) {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
return true;
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
render() {
|
|
82
|
-
if (!this._configLoaded || !this._dataUnit || !this._dataState) {
|
|
83
|
-
return undefined;
|
|
84
|
-
}
|
|
85
|
-
return (h("section", { class: "ez-padding--large" }, h("div", { class: "ez-row ez-padding-bottom--medium" }, h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6", key: "formHeader" }, h("ez-button", { mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small", onClick: () => this.exitForm() }), h("h1", { class: "ez-title ez-title--primary ez-title--xlarge ez-align--middle" }, this.formTitle)), h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6 ez-align--right" }, h("snk-taskbar", { key: "formTaskbar", buttons: this._dataState.isDirty ? "CANCEL,SAVE" : "PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,INSERT", primaryButton: this._dataState.isDirty ? "SAVE" : "INSERT", disabledButtons: this.getDisabledButtons(), actionsList: this.actionsList, dataUnit: this._dataUnit }))), h("div", { class: "ez-padding--small" }), h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, dataUnit: this._dataUnit, config: this.getFormConfig() }))))));
|
|
86
|
-
}
|
|
87
|
-
get _element() { return getElement(this); }
|
|
88
|
-
};
|
|
89
|
-
SnkForm.style = snkFormCss;
|
|
90
|
-
|
|
91
|
-
export { SnkForm as snk_form };
|