@svgrid/enterprise 3.1.41 → 3.1.42

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.
@@ -913,7 +913,7 @@ ${E}
913
913
  @keyframes st-home-spin { to { transform: rotate(360deg); } }
914
914
  </style>
915
915
  `}}function Ka(e){for(const r of e)je(r);const t=new Map(e.map(r=>[r.name,r])),a=e.map(r=>{const o=Eu(r,t);return{schema:Fu(r,o),infos:o}});return{entries:a,seed:Du(a)}}function fo(e,t={}){const{entries:a,seed:r}=Ka(e),{file:o,needs:n}=em(a,r,t.sources,t.supabaseConn,t.serverMemory),i=[Lu(a),o];(n.supabase||t.supabaseAuth)&&!n.supabaseUrl&&(t.supabaseConn?.url||t.supabaseConn?.key)&&(n.supabaseUrl=t.supabaseConn.url,n.supabaseKey=t.supabaseConn.key),(n.supabase||t.supabaseAuth)&&i.push(tm(n));for(const s of n.sqlRoutes)i.push(Hu(s.schema,s.table,s.dialect,{access:t.accessEnabled,audit:t.auditEnabled,screenIds:t.screensByEntity?.get(s.schema.name)??[],triggers:t.triggers?.[s.schema.name],dbSchema:s.dbSchema,tenantField:t.tenantField&&t.tenantScoped?.(s.schema.name)!==!1?t.tenantField:void 0}));if(n.memoryRoutes.length){i.push(Gu(n.memoryRoutes));for(const s of n.memoryRoutes)i.push(Vu(s.schema,{access:t.accessEnabled,audit:t.auditEnabled,screenIds:t.screensByEntity?.get(s.schema.name)??[],triggers:t.triggers?.[s.schema.name],tenantField:t.tenantField&&t.tenantScoped?.(s.schema.name)!==!1?t.tenantField:void 0}))}return{files:i,prepared:a.map(s=>s.schema)}}function am(e){if(e.length===0)throw new Error("emitStudioApp: no schemas to emit");const{files:t,prepared:a}=fo(e),r=a.map(n=>{const i=z(n);return{href:`/${i.route}`,label:i.label}}),o={path:"src/custom.css",description:"Your custom styles (imported after app.css so it overrides).",userOwned:!0,contents:`/* Your custom styles. Imported after app.css, so these rules override the defaults. */
916
- `};return[...t,...a.map(n=>Ni(n)),Mi(r),ji(r),o]}function rm(e){return e.fields.some(t=>!!t.when&&(!!t.when.visible||!!t.when.disabled||!!t.when.required))}var om="3.1.41",nm="3.0.36",V=(e,t)=>e.some(a=>a.config.kind===t),qi=e=>`activeTab_${e.replace(/[^a-zA-Z0-9_$]/g,"_")}`,aa=(e,t)=>`${e}-${t}`,zi=e=>`accOpen_${e.replace(/[^a-zA-Z0-9_$]/g,"_")}`,ra=(e,t)=>`${e}-s${t}`,oa=e=>`md_${e.replace(/[^a-zA-Z0-9]/g,"_")}_rows`;function im(e){switch(e.type){case"number":{const t=e.decimals;return t!=null?`{ type: 'number', options: { minimumFractionDigits: ${t}, maximumFractionDigits: ${t} } }`:"{ type: 'number' }"}case"currency":return`{ type: 'currency', currency: ${S(e.currency||"USD")} }`;case"percent":{const t=["type: 'percent'"];return e.valueIsPercentPoints&&t.push("valueIsPercentPoints: true"),e.decimals!=null&&t.push(`options: { minimumFractionDigits: ${e.decimals}, maximumFractionDigits: ${e.decimals} }`),`{ ${t.join(", ")} }`}case"date":case"datetime":return e.pattern?`{ type: '${e.type}', pattern: ${S(e.pattern)} }`:`{ type: '${e.type}' }`}}function sm(e,t,a,r){if(t.config.kind!=="grid")return`schemaToColumns(${e})`;const o=t.config,n=t.id.replace(/-/g,"_"),i=o.columns.filter(b=>b.show),s=new Set(i.map(b=>b.field)),d=new Set,l=i.map(b=>{const y=r?.get(b.field);return{c:b,col:y&&!s.has(y)?y:b.field}}).filter(b=>!d.has(b.col)&&!!d.add(b.col)),c=o.editing==="inline"?"":", editable: false";if(l.length===0)return c?`schemaToColumns(${e}).map((c) => ({ ...c${c} }))`:`schemaToColumns(${e})`;const p=l.map(b=>`'${b.col}'`),u=l.map(({c:b,col:y})=>{const w=[];return b.header&&w.push(`header: ${JSON.stringify(b.header)}`),b.width!=null&&w.push(`width: ${b.width}`),b.align&&w.push(`align: '${b.align}'`),b.aggregate&&w.push(`aggregate: '${b.aggregate}'`),o.treeData&&b.field===o.treeData.labelField&&a?w.push(`cell: (ctx: CellContext<${a}>) => renderSnippet(treeCell_${n}, { value: ctx.getValue(), row: ctx.row.original })`):b.cellType&&a?w.push(`cell: (ctx: CellContext<${a}>) => renderSnippet(${Gi(n,b.field)}, { value: ctx.getValue() })`):b.format&&w.push(`format: ${im(b.format)}`),w.length?`'${y}': { ${w.join(", ")} }`:null}).filter(b=>!!b),m=u.length?` const ov: Record<string, Partial<(typeof all)[number]>> = { ${u.join(", ")} };`:"",g=u.length?", ...(ov[String(c.field)] ?? {})":"",h=`[${p.join(", ")}].map((f) => all.find((c) => c.field === f)).filter((c): c is (typeof all)[number] => !!c)`;return`(() => { const all = schemaToColumns(${e});${m} return ${c||g?`${h}.map((c) => ({ ...c${c}${g} }))`:h} })()`}function Ae(e,t){const a=[`grid-column: span ${ei(e)}`,"min-width: 0"];t&&a.push(t);const r=ti(e.style);return r&&a.push(r),`style="${a.join("; ")}"`}var lm=e=>e&&e.replace(/[^#a-zA-Z0-9(),.%\s_-]/g,"").slice(0,40)||"var(--sg-accent)";function Ue(e,t){const a=[t,Xn(e)].filter(Boolean).join(" ");return a?` class="${a}"`:""}function Ha(e){const t=Ta(e.className);return t?` ${t}`:""}function dm(e){const t=Fe(e);if(t==="grid"){const a=ui(e),r=a.maxWidth?` max-width: ${a.maxWidth}px; margin-inline: auto;`:"";return` .st-screen { grid-template-columns: repeat(12, 1fr); gap: ${a.rowGap}px ${a.colGap}px; align-items: ${a.align};${r} }
916
+ `};return[...t,...a.map(n=>Ni(n)),Mi(r),ji(r),o]}function rm(e){return e.fields.some(t=>!!t.when&&(!!t.when.visible||!!t.when.disabled||!!t.when.required))}var om="3.1.42",nm="3.0.36",V=(e,t)=>e.some(a=>a.config.kind===t),qi=e=>`activeTab_${e.replace(/[^a-zA-Z0-9_$]/g,"_")}`,aa=(e,t)=>`${e}-${t}`,zi=e=>`accOpen_${e.replace(/[^a-zA-Z0-9_$]/g,"_")}`,ra=(e,t)=>`${e}-s${t}`,oa=e=>`md_${e.replace(/[^a-zA-Z0-9]/g,"_")}_rows`;function im(e){switch(e.type){case"number":{const t=e.decimals;return t!=null?`{ type: 'number', options: { minimumFractionDigits: ${t}, maximumFractionDigits: ${t} } }`:"{ type: 'number' }"}case"currency":return`{ type: 'currency', currency: ${S(e.currency||"USD")} }`;case"percent":{const t=["type: 'percent'"];return e.valueIsPercentPoints&&t.push("valueIsPercentPoints: true"),e.decimals!=null&&t.push(`options: { minimumFractionDigits: ${e.decimals}, maximumFractionDigits: ${e.decimals} }`),`{ ${t.join(", ")} }`}case"date":case"datetime":return e.pattern?`{ type: '${e.type}', pattern: ${S(e.pattern)} }`:`{ type: '${e.type}' }`}}function sm(e,t,a,r){if(t.config.kind!=="grid")return`schemaToColumns(${e})`;const o=t.config,n=t.id.replace(/-/g,"_"),i=o.columns.filter(b=>b.show),s=new Set(i.map(b=>b.field)),d=new Set,l=i.map(b=>{const y=r?.get(b.field);return{c:b,col:y&&!s.has(y)?y:b.field}}).filter(b=>!d.has(b.col)&&!!d.add(b.col)),c=o.editing==="inline"?"":", editable: false";if(l.length===0)return c?`schemaToColumns(${e}).map((c) => ({ ...c${c} }))`:`schemaToColumns(${e})`;const p=l.map(b=>`'${b.col}'`),u=l.map(({c:b,col:y})=>{const w=[];return b.header&&w.push(`header: ${JSON.stringify(b.header)}`),b.width!=null&&w.push(`width: ${b.width}`),b.align&&w.push(`align: '${b.align}'`),b.aggregate&&w.push(`aggregate: '${b.aggregate}'`),o.treeData&&b.field===o.treeData.labelField&&a?w.push(`cell: (ctx: CellContext<${a}>) => renderSnippet(treeCell_${n}, { value: ctx.getValue(), row: ctx.row.original })`):b.cellType&&a?w.push(`cell: (ctx: CellContext<${a}>) => renderSnippet(${Gi(n,b.field)}, { value: ctx.getValue() })`):b.format&&w.push(`format: ${im(b.format)}`),w.length?`'${y}': { ${w.join(", ")} }`:null}).filter(b=>!!b),m=u.length?` const ov: Record<string, Partial<(typeof all)[number]>> = { ${u.join(", ")} };`:"",g=u.length?", ...(ov[String(c.field)] ?? {})":"",h=`[${p.join(", ")}].map((f) => all.find((c) => c.field === f)).filter((c): c is (typeof all)[number] => !!c)`;return`(() => { const all = schemaToColumns(${e});${m} return ${c||g?`${h}.map((c) => ({ ...c${c}${g} }))`:h} })()`}function Ae(e,t){const a=[`grid-column: span ${ei(e)}`,"min-width: 0"];t&&a.push(t);const r=ti(e.style);return r&&a.push(r),`style="${a.join("; ")}"`}var lm=e=>e&&e.replace(/[^#a-zA-Z0-9(),.%\s_-]/g,"").slice(0,40)||"var(--sg-accent)";function Ue(e,t){const a=[t,Xn(e)].filter(Boolean).join(" ");return a?` class="${a}"`:""}function Ha(e){const t=Ta(e.className);return t?` ${t}`:""}function dm(e){const t=Fe(e);if(t==="grid"){const a=ui(e),r=a.maxWidth?` max-width: ${a.maxWidth}px; margin-inline: auto;`:"";return` .st-screen { grid-template-columns: repeat(12, 1fr); gap: ${a.rowGap}px ${a.colGap}px; align-items: ${a.align};${r} }
917
917
  @media (max-width: ${a.mobileBreakpoint}px) { .st-screen { grid-template-columns: 1fr; gap: 12px; } }
918
918
  `}if(t==="stack"){const a=mi(e),r=a.maxWidth?` max-width: ${a.maxWidth}px;${a.align==="center"?" margin-inline: auto;":""}`:"",o=a.minHeight?`
919
919
  .st-stack > * { min-height: ${a.minHeight}px; }`:"",n=a.dividers?`
package/dist/version.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * `version.test.ts` asserts this matches `package.json`, so the two cannot drift.
12
12
  */
13
- export declare const SVGRID_VERSION = "3.1.41";
13
+ export declare const SVGRID_VERSION = "3.1.42";
14
14
  /**
15
15
  * The version of `@svgrid/grid`, which releases on its own line: enterprise is
16
16
  * on 3.1.x while the grid is on 3.0.x.
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const SVGRID_VERSION="3.1.41",GRID_VERSION="3.0.36";
1
+ export const SVGRID_VERSION="3.1.42",GRID_VERSION="3.0.36";
@@ -121,7 +121,8 @@ import"./disclose-version-P6hHkDOU.js";import{$ as ra,C as Ke,E as Yu,Et as x,H
121
121
  /* ---- timeline views (horizontal: time left→right, resources = rows) ---- */.sv-sched-tl.svelte-7u9xeh {flex:1 1 auto;min-height:0;display:flex;flex-direction:column;
122
122
  /* Single scroll container: horizontal (header + body share one width) AND
123
123
  vertical - so the vertical scrollbar sits at the VIEWPORT's right edge, not
124
- at the far-right of the wide content. The sticky head handles the vertical. */overflow:auto;}.sv-sched-tl-head.svelte-7u9xeh {display:flex;position:sticky;top:0;z-index:3;background:var(--sg-bg, #fff);border-bottom:1px solid var(--sg-border, #e5e7eb);width:calc(var(--tl-res-w) + var(--tl-axis-w));}.sv-sched-tl-corner.svelte-7u9xeh {flex:0 0 var(--tl-res-w);position:sticky;left:0;z-index:1;background:var(--sg-bg, #fff);border-right:1px solid var(--sg-border, #e5e7eb);}.sv-sched-tl-axis.svelte-7u9xeh {flex:0 0 var(--tl-axis-w);position:relative;}.sv-sched-tl-majors.svelte-7u9xeh {position:relative;height:22px;border-bottom:1px solid var(--sg-border, #e5e7eb);}.sv-sched-tl-major.svelte-7u9xeh {position:absolute;top:0;height:22px;display:flex;align-items:center;justify-content:center;font-size:0.72rem;font-weight:600;box-sizing:border-box;border-left:1px solid var(--sg-border, #e5e7eb);overflow:hidden;white-space:nowrap;}.sv-sched-tl-ticks.svelte-7u9xeh {position:relative;height:26px;}.sv-sched-tl-tick.svelte-7u9xeh {position:absolute;top:0;height:26px;display:flex;align-items:center;justify-content:center;font-size:0.68rem;color:var(--sg-muted, #6b7280);box-sizing:border-box;border-left:1px solid var(--sg-border, #e5e7eb);overflow:hidden;white-space:nowrap;}.sv-sched-tl-tick.sv-sched-today.svelte-7u9xeh {color:var(--sv-sched-accent);font-weight:700;}.sv-sched-tl-tick.svelte-7u9xeh span:where(.svelte-7u9xeh) {padding:0 4px;}
124
+ at the far-right of the wide content. The sticky head handles the vertical. */overflow:auto;}.sv-sched-tl-head.svelte-7u9xeh {display:flex;position:sticky;top:0;z-index:3;background:var(--sg-bg, #fff);border-bottom:1px solid var(--sg-border, #e5e7eb);width:calc(var(--tl-res-w) + var(--tl-axis-w));}.sv-sched-tl-corner.svelte-7u9xeh {flex:0 0 var(--tl-res-w);
125
+ /* exactly the gutter's width, so the axis and every row start at one x */min-width:0;box-sizing:border-box;position:sticky;left:0;z-index:1;background:var(--sg-bg, #fff);border-right:1px solid var(--sg-border, #e5e7eb);}.sv-sched-tl-axis.svelte-7u9xeh {flex:0 0 var(--tl-axis-w);position:relative;}.sv-sched-tl-majors.svelte-7u9xeh {position:relative;height:22px;border-bottom:1px solid var(--sg-border, #e5e7eb);}.sv-sched-tl-major.svelte-7u9xeh {position:absolute;top:0;height:22px;display:flex;align-items:center;justify-content:center;font-size:0.72rem;font-weight:600;box-sizing:border-box;border-left:1px solid var(--sg-border, #e5e7eb);overflow:hidden;white-space:nowrap;}.sv-sched-tl-ticks.svelte-7u9xeh {position:relative;height:26px;}.sv-sched-tl-tick.svelte-7u9xeh {position:absolute;top:0;height:26px;display:flex;align-items:center;justify-content:center;font-size:0.68rem;color:var(--sg-muted, #6b7280);box-sizing:border-box;border-left:1px solid var(--sg-border, #e5e7eb);overflow:hidden;white-space:nowrap;}.sv-sched-tl-tick.sv-sched-today.svelte-7u9xeh {color:var(--sv-sched-accent);font-weight:700;}.sv-sched-tl-tick.svelte-7u9xeh span:where(.svelte-7u9xeh) {padding:0 4px;}
125
126
 
126
127
  /* Body fills the remaining height; a trailing filler row extends the axis
127
128
  gridlines to the bottom so the timeline uses the full component space. */.sv-sched-tl-body.svelte-7u9xeh {width:calc(var(--tl-res-w) + var(--tl-axis-w));flex:1 1 auto;min-height:0;display:flex;flex-direction:column;
@@ -145,7 +146,9 @@ import"./disclose-version-P6hHkDOU.js";import{$ as ra,C as Ke,E as Yu,Et as x,H
145
146
  /* Neutral "empty slot" look so it never blends with coloured events; it only
146
147
  lights up in the accent colour on hover to invite a booking. */border:1px dashed color-mix(in srgb, var(--sg-fg, #1f2937) 26%, transparent);border-radius:4px;background:color-mix(in srgb, var(--sg-fg, #1f2937) 3%, transparent);color:var(--sg-muted, #6b7280);font:inherit;font-size:0.66rem;font-weight:500;cursor:pointer;overflow:hidden;min-width:6px;}.sv-sched-bookslot.svelte-7u9xeh::before {content:"+";font-weight:700;opacity:0.7;}.sv-sched-bookslot.svelte-7u9xeh:hover {z-index:2;border-style:solid;border-color:var(--sv-sched-accent, #4f46e5);background:color-mix(in srgb, var(--sv-sched-accent, #4f46e5) 15%, var(--sg-bg, #fff));color:var(--sv-sched-accent, #4f46e5);}.sv-sched-bookslot.svelte-7u9xeh:hover::before {opacity:1;}.sv-sched-bookslot-label.svelte-7u9xeh {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
147
148
  /* Utilization heatmap: a background tint per tick, behind events + gridlines. */.sv-sched-heat-cell.svelte-7u9xeh {position:absolute;top:0;bottom:0;pointer-events:none;background:color-mix(in srgb, var(--sv-sched-heat, var(--sv-sched-accent, #4f46e5)) calc(var(--sv-heat-i, 0) * 55%), transparent);}.sv-sched-heat-cell.sv-sched-heat-over.svelte-7u9xeh {background:color-mix(in srgb, var(--sv-sched-heat-over, #dc2626) 42%, transparent);}
148
- /* Ineligible target row while dragging (skill / eligibility mismatch). */.sv-sched-tl-row-blocked.svelte-7u9xeh .sv-sched-tl-lanes:where(.svelte-7u9xeh) {background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, color-mix(in srgb, #dc2626 12%, transparent) 5px, color-mix(in srgb, #dc2626 12%, transparent) 10px);cursor:not-allowed;}.sv-sched-tl-filler.svelte-7u9xeh .sv-sched-tl-resgutter:where(.svelte-7u9xeh) {border-right:1px solid var(--sg-border, #e5e7eb);}.sv-sched-tl-resgutter.svelte-7u9xeh {flex:0 0 var(--tl-res-w);position:sticky;left:0;z-index:2;display:flex;align-items:center;gap:6px;padding:0 10px;background:var(--sg-bg, #fff);border-right:1px solid var(--sg-border, #e5e7eb);font-size:0.82rem;font-weight:500;}.sv-sched-tl-resname.svelte-7u9xeh {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sv-sched-tl-lanes.svelte-7u9xeh {flex:0 0 var(--tl-axis-w);position:relative;}.sv-sched-tl-gridline.svelte-7u9xeh {position:absolute;top:0;bottom:0;border-left:1px solid color-mix(in srgb, var(--sg-fg, #1f2937) 6%, transparent);}.sv-sched-tl-gridline.sv-sched-today.svelte-7u9xeh {background:color-mix(in srgb, var(--sv-sched-accent) 7%, transparent);}
149
+ /* Ineligible target row while dragging (skill / eligibility mismatch). */.sv-sched-tl-row-blocked.svelte-7u9xeh .sv-sched-tl-lanes:where(.svelte-7u9xeh) {background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, color-mix(in srgb, #dc2626 12%, transparent) 5px, color-mix(in srgb, #dc2626 12%, transparent) 10px);cursor:not-allowed;}.sv-sched-tl-filler.svelte-7u9xeh .sv-sched-tl-resgutter:where(.svelte-7u9xeh) {border-right:1px solid var(--sg-border, #e5e7eb);}.sv-sched-tl-resgutter.svelte-7u9xeh {flex:0 0 var(--tl-res-w);
150
+ /* a long name is cut with an ellipsis and never widens its row: min-width
151
+ auto would let it, shifting that row's ticks, bars and now-line */min-width:0;box-sizing:border-box;position:sticky;left:0;z-index:2;display:flex;align-items:center;gap:6px;padding:0 10px;background:var(--sg-bg, #fff);border-right:1px solid var(--sg-border, #e5e7eb);font-size:0.82rem;font-weight:500;}.sv-sched-tl-resname.svelte-7u9xeh {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sv-sched-tl-lanes.svelte-7u9xeh {flex:0 0 var(--tl-axis-w);position:relative;}.sv-sched-tl-gridline.svelte-7u9xeh {position:absolute;top:0;bottom:0;border-left:1px solid color-mix(in srgb, var(--sg-fg, #1f2937) 6%, transparent);}.sv-sched-tl-gridline.sv-sched-today.svelte-7u9xeh {background:color-mix(in srgb, var(--sv-sched-accent) 7%, transparent);}
149
152
  /* Destination row while dragging a bar to another resource. */.sv-sched-tl-row-drop.svelte-7u9xeh .sv-sched-tl-lanes:where(.svelte-7u9xeh) {background:color-mix(in srgb, var(--sv-sched-accent, #4f46e5) 9%, transparent);}.sv-sched-tl-row-drop.svelte-7u9xeh .sv-sched-tl-resgutter:where(.svelte-7u9xeh) {background:color-mix(in srgb, var(--sv-sched-accent, #4f46e5) 12%, var(--sg-bg, #fff));}.sv-sched-tl-bar.svelte-7u9xeh {
150
153
  /* a horizontal event bar; inherits the shared .sv-sched-bar look */min-width:6px; /* keep very short events visible + clickable */overflow:hidden;}.sv-sched-tl-bar.svelte-7u9xeh .sv-sched-bar-time:where(.svelte-7u9xeh) {flex:none;}
151
154
  /* Too narrow to read: a clean colored tick (no clipped text, no grips). */.sv-sched-tl-bar-tiny.svelte-7u9xeh {padding:0;}.sv-sched-tl-bar-tiny.svelte-7u9xeh .sv-sched-chip-resize:where(.svelte-7u9xeh) {display:none;}