PageSourceSearch

https://portals.noloco.io/assets/ActionButtonForm-BCGWeAnR.js

js noloco.io collected 2026-09-25 18:41:58 UTC 3,156 bytes, 1 lines download raw bytes

1import{j as i}from"./jsx-runtime-esm-DgZK9P7c.js";import{w as C,B as v,g as B}from"./tabs-CHHObJJW.js";import{g as D,aL as x,ba as F,p as N,h as y}from"./Icon-Ime4wSjK.js";import{g as S}from"./getActionButtonFormFieldConfig-CCnNz-cx.js";import{a as f}from"./index-Dhy1axWM.js";import{aS as R,aT as j,aR as P,aU as k}from"./app-vP2jhQjT.js";import{I as L}from"./IconFileAlert-DjiI2tcj.js";import"./index-CJZQOLKR.js";import"./_commonjsHelpers-CxYHiaSM.js";import"./index-AmsYr5ik.js";import"./index-B8ov4xfp.js";import"./project-wd5IloI0.js";import"./with-selector-Ce4EAgKw.js";import"./react-redux-Bz8azxLH.js";import"./isEqual-BiqEbpPg.js";import"./useAuthWrapper-CWXjgmIl.js";import"./user-avatar-Zw71S5uB.js";import"./normalizeDates-p6XmbZym.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"967abcd"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(a){for(var r=1;r<arguments.length;r++){var o=arguments[r];if(o!=null)for(var s in o)o.hasOwnProperty(s)&&(a[s]=o[s])}return a})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:noloco-ui":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="023b7639-fea3-42dd-b207-f47212e5da5b",e._sentryDebugIdIdentifier="sentry-dbid-023b7639-fea3-42dd-b207-f47212e5da5b")}catch{}})();const U=(e,t)=>{if(!t||!e)return null;const a=t.relationship||t.relatedField?`${t.name}.id`:t.name;return D(e,a)},O=(e,t,a,r,o,s)=>{const{selectedField:m,mutationField:n,actionDataType:d}=f.useMemo(()=>S(t,e,r.dataTypes),[e,t,r.dataTypes]),u=f.useMemo(()=>U(o,m),[o,m]),c=!u&&s===x?F:s||void 0,l=R(a,d,r,{mutationType:c,useUrlValues:!1}),p=f.useMemo(()=>[...l,...n&&n.name!=="id"&&o&&s===F?[{hidden:!0,field:n.name,name:n.name,value:N(n)?[o.id]:o.id}]:[]],[l,n,o,s]);return{actionDataType:d,fields:p,mutationType:c,recordId:u}},T="elements.VIEW.actionButtons",K=({action:e,dataType:t,formInstanceId:a,onLoadingChange:r,onValidationChange:o,onSuccess:s,project:m,record:n,scope:d,theme:u})=>{const{id:c,type:l=x,field:p,formFields:b=[]}=e,E=u.brandColorGroups.warning,{actionDataType:g,fields:w,mutationType:M,recordId:h}=O(t,p,b,m,n,l),A=j(b),I=f.useCallback(_=>({...d,..._}),[d]);return g?l===x&&!h?i.jsxs(v,{bg:B(E,"400"),className:"mb-6 mt-2 flex items-center rounded-lg p-4 text-white",children:[i.jsx(L,{className:"mr-3 h-6 w-6 opacity-50"}),i.jsxs("div",{className:"flex flex-col",children:[i.jsx("span",{className:"text-sm font-medium",children:y(T,"errors.UPDATE.notFound.title")}),i.jsx("div",{className:"mt-1 flex flex-col space-y-1 text-xs",children:i.jsx("span",{children:y(T,"errors.UPDATE.notFound.message")})})]})]}):g&&i.jsx(P,{className:`action-${c}-form`,dataType:g.name,errorMessage:{message:y("core.COLLECTION.form.invalid")},fields:w,formInstanceId:a,onLoadingChange:r,onSuccess:s,onValidationChange:o,project:m,sectionFormat:k,sections:A,setBackground:!1,showSuccess:!1,successMessage:{message:""},transformRecordScope:I,type:M,which:h}):null},ne=C(K);export{ne as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.