@masterteam/client-components 0.0.85 → 0.0.86

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.
@@ -1,2 +1,2 @@
1
1
  /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-400:oklch(75% .183 55.934);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-950:oklch(26.6% .079 36.259);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--spacing:.25rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.end-0{inset-inline-end:calc(var(--spacing) * 0)}.end-2{inset-inline-end:calc(var(--spacing) * 2)}.top-0{top:0}.top-2{top:calc(var(--spacing) * 2)}.z-10{z-index:10}.z-20{z-index:20}.col-span-1{grid-column:span 1/span 1}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.my-1{margin-block:var(--spacing)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.h-\[18px\]{height:18px}.min-h-\[20rem\]{min-height:20rem}.min-h-\[22rem\]{min-height:22rem}.min-h-\[420px\]{min-height:420px}.w-1{width:var(--spacing)}.w-7{width:calc(var(--spacing) * 7)}.w-28{width:calc(var(--spacing) * 28)}.w-40{width:calc(var(--spacing) * 40)}.w-\[20px\]{width:20px}.w-full{width:100%}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:0}.min-w-4{min-width:calc(var(--spacing) * 4)}.min-w-44{min-width:calc(var(--spacing) * 44)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-red-200{border-color:var(--color-red-200)}.border-surface-200{border-color:var(--p-surface-200)}@supports (color:color-mix(in lab, red, red)){.border-surface-200{border-color:color-mix(in srgb, var(--p-surface-200) calc(100% * 1), transparent)}}.border-surface-300{border-color:var(--p-surface-300)}@supports (color:color-mix(in lab, red, red)){.border-surface-300{border-color:color-mix(in srgb, var(--p-surface-300) calc(100% * 1), transparent)}}.bg-primary-50{background-color:var(--p-primary-50)}@supports (color:color-mix(in lab, red, red)){.bg-primary-50{background-color:color-mix(in srgb, var(--p-primary-50) calc(100% * 1), transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-surface-50{background-color:var(--p-surface-50)}@supports (color:color-mix(in lab, red, red)){.bg-surface-50{background-color:color-mix(in srgb, var(--p-surface-50) calc(100% * 1), transparent)}}.bg-surface-200{background-color:var(--p-surface-200)}@supports (color:color-mix(in lab, red, red)){.bg-surface-200{background-color:color-mix(in srgb, var(--p-surface-200) calc(100% * 1), transparent)}}.bg-transparent{background-color:#0000}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-start{text-align:start}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-orange-600{color:var(--color-orange-600)}.text-primary-700{color:var(--p-primary-700)}@supports (color:color-mix(in lab, red, red)){.text-primary-700{color:color-mix(in srgb, var(--p-primary-700) calc(100% * 1), transparent)}}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-surface-500{color:var(--p-surface-500)}@supports (color:color-mix(in lab, red, red)){.text-surface-500{color:color-mix(in srgb, var(--p-surface-500) calc(100% * 1), transparent)}}.uppercase{text-transform:uppercase}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-orange-50:hover{background-color:var(--color-orange-50)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-primary-500:focus-visible{--tw-ring-color:var(--p-primary-500)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-primary-500:focus-visible{--tw-ring-color:color-mix(in srgb, var(--p-primary-500) calc(100% * 1), transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}@media (min-width:48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.dark\:border-surface-700:where(.dark,.dark *){border-color:var(--p-surface-700)}@supports (color:color-mix(in lab, red, red)){.dark\:border-surface-700:where(.dark,.dark *){border-color:color-mix(in srgb, var(--p-surface-700) calc(100% * 1), transparent)}}.dark\:bg-primary-950:where(.dark,.dark *){background-color:var(--p-primary-950)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-primary-950:where(.dark,.dark *){background-color:color-mix(in srgb, var(--p-primary-950) calc(100% * 1), transparent)}}.dark\:bg-surface-900:where(.dark,.dark *){background-color:var(--p-surface-900)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-surface-900:where(.dark,.dark *){background-color:color-mix(in srgb, var(--p-surface-900) calc(100% * 1), transparent)}}.dark\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\:text-gray-200:where(.dark,.dark *){color:var(--color-gray-200)}.dark\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:where(.dark,.dark *){color:var(--color-gray-400)}.dark\:text-orange-400:where(.dark,.dark *){color:var(--color-orange-400)}.dark\:text-primary-300:where(.dark,.dark *){color:var(--p-primary-300)}@supports (color:color-mix(in lab, red, red)){.dark\:text-primary-300:where(.dark,.dark *){color:color-mix(in srgb, var(--p-primary-300) calc(100% * 1), transparent)}}@media (hover:hover){.dark\:hover\:bg-orange-950:where(.dark,.dark *):hover{background-color:var(--color-orange-950)}.dark\:hover\:bg-red-950:where(.dark,.dark *):hover{background-color:var(--color-red-950)}.dark\:hover\:bg-surface-700:where(.dark,.dark *):hover{background-color:var(--p-surface-700)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-surface-700:where(.dark,.dark *):hover{background-color:color-mix(in srgb, var(--p-surface-700) calc(100% * 1), transparent)}}.dark\:hover\:text-gray-100:where(.dark,.dark *):hover{color:var(--color-gray-100)}}}@keyframes enter{0%{opacity:var(--p-enter-opacity,1);transform:translate3d(var(--p-enter-translate-x,0), var(--p-enter-translate-y,0), 0) scale3d(var(--p-enter-scale,1), var(--p-enter-scale,1), var(--p-enter-scale,1)) rotate(var(--p-enter-rotate,0))}}@keyframes leave{to{opacity:var(--p-leave-opacity,1);transform:translate3d(var(--p-leave-translate-x,0), var(--p-leave-translate-y,0), 0) scale3d(var(--p-leave-scale,1), var(--p-leave-scale,1), var(--p-leave-scale,1)) rotate(var(--p-leave-rotate,0))}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-400:oklch(75% .183 55.934);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-950:oklch(26.6% .079 36.259);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--spacing:.25rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.end-0{inset-inline-end:calc(var(--spacing) * 0)}.end-2{inset-inline-end:calc(var(--spacing) * 2)}.top-0{top:0}.top-2{top:calc(var(--spacing) * 2)}.z-10{z-index:10}.z-20{z-index:20}.col-span-1{grid-column:span 1/span 1}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.my-1{margin-block:var(--spacing)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.h-\[18px\]{height:18px}.min-h-\[20rem\]{min-height:20rem}.min-h-\[22rem\]{min-height:22rem}.min-h-\[420px\]{min-height:420px}.w-1{width:var(--spacing)}.w-7{width:calc(var(--spacing) * 7)}.w-28{width:calc(var(--spacing) * 28)}.w-40{width:calc(var(--spacing) * 40)}.w-\[20px\]{width:20px}.w-full{width:100%}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:0}.min-w-4{min-width:calc(var(--spacing) * 4)}.min-w-44{min-width:calc(var(--spacing) * 44)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-red-200{border-color:var(--color-red-200)}.border-surface-200{border-color:var(--p-surface-200)}@supports (color:color-mix(in lab, red, red)){.border-surface-200{border-color:color-mix(in srgb, var(--p-surface-200) calc(100% * 1), transparent)}}.border-surface-300{border-color:var(--p-surface-300)}@supports (color:color-mix(in lab, red, red)){.border-surface-300{border-color:color-mix(in srgb, var(--p-surface-300) calc(100% * 1), transparent)}}.bg-primary-50{background-color:var(--p-primary-50)}@supports (color:color-mix(in lab, red, red)){.bg-primary-50{background-color:color-mix(in srgb, var(--p-primary-50) calc(100% * 1), transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-surface-50{background-color:var(--p-surface-50)}@supports (color:color-mix(in lab, red, red)){.bg-surface-50{background-color:color-mix(in srgb, var(--p-surface-50) calc(100% * 1), transparent)}}.bg-surface-200{background-color:var(--p-surface-200)}@supports (color:color-mix(in lab, red, red)){.bg-surface-200{background-color:color-mix(in srgb, var(--p-surface-200) calc(100% * 1), transparent)}}.bg-transparent{background-color:#0000}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-start{text-align:start}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-orange-600{color:var(--color-orange-600)}.text-primary-700{color:var(--p-primary-700)}@supports (color:color-mix(in lab, red, red)){.text-primary-700{color:color-mix(in srgb, var(--p-primary-700) calc(100% * 1), transparent)}}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-surface-500{color:var(--p-surface-500)}@supports (color:color-mix(in lab, red, red)){.text-surface-500{color:color-mix(in srgb, var(--p-surface-500) calc(100% * 1), transparent)}}.uppercase{text-transform:uppercase}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-orange-50:hover{background-color:var(--color-orange-50)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-primary-500:focus-visible{--tw-ring-color:var(--p-primary-500)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-primary-500:focus-visible{--tw-ring-color:color-mix(in srgb, var(--p-primary-500) calc(100% * 1), transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}@media (min-width:48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.dark\:border-surface-700:where(.dark,.dark *){border-color:var(--p-surface-700)}@supports (color:color-mix(in lab, red, red)){.dark\:border-surface-700:where(.dark,.dark *){border-color:color-mix(in srgb, var(--p-surface-700) calc(100% * 1), transparent)}}.dark\:bg-primary-950:where(.dark,.dark *){background-color:var(--p-primary-950)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-primary-950:where(.dark,.dark *){background-color:color-mix(in srgb, var(--p-primary-950) calc(100% * 1), transparent)}}.dark\:bg-surface-900:where(.dark,.dark *){background-color:var(--p-surface-900)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-surface-900:where(.dark,.dark *){background-color:color-mix(in srgb, var(--p-surface-900) calc(100% * 1), transparent)}}.dark\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\:text-gray-200:where(.dark,.dark *){color:var(--color-gray-200)}.dark\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:where(.dark,.dark *){color:var(--color-gray-400)}.dark\:text-orange-400:where(.dark,.dark *){color:var(--color-orange-400)}.dark\:text-primary-300:where(.dark,.dark *){color:var(--p-primary-300)}@supports (color:color-mix(in lab, red, red)){.dark\:text-primary-300:where(.dark,.dark *){color:color-mix(in srgb, var(--p-primary-300) calc(100% * 1), transparent)}}@media (hover:hover){.dark\:hover\:bg-orange-950:where(.dark,.dark *):hover{background-color:var(--color-orange-950)}.dark\:hover\:bg-red-950:where(.dark,.dark *):hover{background-color:var(--color-red-950)}.dark\:hover\:bg-surface-700:where(.dark,.dark *):hover{background-color:var(--p-surface-700)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-surface-700:where(.dark,.dark *):hover{background-color:color-mix(in srgb, var(--p-surface-700) calc(100% * 1), transparent)}}.dark\:hover\:text-gray-100:where(.dark,.dark *):hover{color:var(--color-gray-100)}}}@keyframes enter{0%{opacity:var(--p-enter-opacity,1);transform:translate3d(var(--p-enter-translate-x,0), var(--p-enter-translate-y,0), 0) scale3d(var(--p-enter-scale,1), var(--p-enter-scale,1), var(--p-enter-scale,1)) rotate(var(--p-enter-rotate,0))}}@keyframes leave{to{opacity:var(--p-leave-opacity,1);transform:translate3d(var(--p-leave-translate-x,0), var(--p-leave-translate-y,0), 0) scale3d(var(--p-leave-scale,1), var(--p-leave-scale,1), var(--p-leave-scale,1)) rotate(var(--p-leave-rotate,0))}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}
@@ -7,7 +7,7 @@ import { TranslocoService, TranslocoModule, TranslocoPipe } from '@jsverse/trans
7
7
  import { Button } from '@masterteam/components/button';
8
8
  import { RuntimeActionRunner, resolveActionLabel } from '@masterteam/components/runtime-action';
9
9
  import { HttpClient } from '@angular/common/http';
10
- import { switchMap, of, map, Observable, share, take } from 'rxjs';
10
+ import { switchMap, map, of, Observable, share, take } from 'rxjs';
11
11
  import { resolveLocalizedLabel, serializeEntityRawValue, isSectionKey, EntitiesPreview } from '@masterteam/components/entities';
12
12
  import { Table, TableExportService, TableGroupingController, TableValueResolver, TableCaption } from '@masterteam/components/table';
13
13
  import * as i2 from 'primeng/skeleton';
@@ -23,22 +23,65 @@ import * as i3 from 'primeng/popover';
23
23
  import { PopoverModule } from 'primeng/popover';
24
24
  import { DashboardViewer } from '@masterteam/dashboard-builder';
25
25
 
26
- const DEFAULT_INCLUDE_STATE = ['escalation'];
26
+ const CLIENT_LIST_RECORD_STATE_KEY = '__clientListRecordState';
27
+ /** Record state every list request asks for. */
28
+ const CLIENT_LIST_DEFAULT_INCLUDE_STATE = ['escalation'];
29
+ /**
30
+ * `fetch/query` filter key that selects a single record by its own id. Reading
31
+ * one record back after a write filters on this, never on the list's scope
32
+ * filters alone — those match a whole page, not the row that just changed.
33
+ */
34
+ const CLIENT_LIST_RECORD_ID_FILTER_KEY = 'id';
35
+
36
+ const DEFAULT_INCLUDE_STATE = CLIENT_LIST_DEFAULT_INCLUDE_STATE;
27
37
  class ClientListApiService {
28
38
  http = inject(HttpClient);
29
39
  runtimeFetchBaseUrl = 'fetch/query';
30
40
  informativeBaseUrl = 'LevelData';
41
+ /**
42
+ * Fetches a table page. Resolves to the response **and** the `propertyKeys`
43
+ * the request carried, because a write that wants its record projected the
44
+ * same way has to repeat them and cannot recover them from the response.
45
+ */
31
46
  getRows(contextKey, query, filters = []) {
32
- return this.resolveTablePropertyKeys(contextKey, query).pipe(switchMap((propertyKeys) => this.queryRuntime({
47
+ return this.resolveTablePropertyKeys(contextKey, query).pipe(switchMap((resolvedKeys) => {
48
+ const propertyKeys = resolvedKeys?.length ? resolvedKeys : undefined;
49
+ return this.queryRuntime({
50
+ contextKey,
51
+ projection: 'Table',
52
+ surfaceKey: 'table',
53
+ includeState: [...DEFAULT_INCLUDE_STATE],
54
+ propertyKeys,
55
+ filters,
56
+ page: this.toPage(query.skip, query.take),
57
+ pageSize: query.take,
58
+ }).pipe(map((response) => ({ response, propertyKeys })));
59
+ }));
60
+ }
61
+ /**
62
+ * Reads a single record back with the list's own query settings — the path
63
+ * taken when a write reports `recordProjectionStatus: 'Unavailable'`. The
64
+ * write itself already succeeded; this only reads, and must never be served
65
+ * by re-submitting.
66
+ */
67
+ getRecord(contextKey, request, filters) {
68
+ return this.queryRuntime({
33
69
  contextKey,
34
- projection: 'Table',
35
- surfaceKey: 'table',
36
- includeState: [...DEFAULT_INCLUDE_STATE],
37
- propertyKeys: propertyKeys?.length ? propertyKeys : undefined,
70
+ projection: request.projection,
71
+ surfaceKey: request.surfaceKey,
72
+ includeState: request.includeState
73
+ ? [...request.includeState]
74
+ : [...DEFAULT_INCLUDE_STATE],
75
+ propertyKeys: request.propertyKeys?.length
76
+ ? request.propertyKeys
77
+ : undefined,
38
78
  filters,
39
- page: this.toPage(query.skip, query.take),
40
- pageSize: query.take,
41
- })));
79
+ page: 1,
80
+ pageSize: 1,
81
+ ...(request.projection === 'Card'
82
+ ? { display: { areas: ['card'] } }
83
+ : {}),
84
+ });
42
85
  }
43
86
  getCards(contextKey, filters = [], skip, take) {
44
87
  // `page` and `pageSize` must be sent together or not at all (fetch/query
@@ -108,8 +151,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
108
151
  args: [{ providedIn: 'root' }]
109
152
  }] });
110
153
 
111
- const CLIENT_LIST_RECORD_STATE_KEY = '__clientListRecordState';
112
-
113
154
  const UNSORTABLE_ENTITY_VIEW_TYPES = new Set([
114
155
  'Attachment',
115
156
  'Checkbox',
@@ -306,6 +347,146 @@ class ClientListStateService {
306
347
  },
307
348
  });
308
349
  }
350
+ /**
351
+ * Splices a canonical record into the data the list already holds, so a
352
+ * create or update lands without re-fetching the page.
353
+ *
354
+ * Tables replay the whole page through {@link setRowsResult}: for a table
355
+ * the rendered page *is* the raw response, so replaying it keeps the catalog
356
+ * lookup, the column build and the host `transformResult` hook on exactly
357
+ * one code path — a second mapper for single rows would drift from the one
358
+ * that built the rest of the table. Cards cannot replay: with infinite
359
+ * scroll `rawData` holds only the last page while `cards` holds every page,
360
+ * so a single card is built and merged into the accumulated set instead.
361
+ *
362
+ * Returns `false` when there is nothing to splice into — an informative
363
+ * dashboard, or a list that never completed a load. The caller then falls
364
+ * back to a real fetch rather than inventing state.
365
+ */
366
+ upsertRecord(key, record, config) {
367
+ const target = this.itemsByKey()[key];
368
+ if (!target || target.type !== 'form')
369
+ return false;
370
+ const raw = target.rawData;
371
+ if (!raw)
372
+ return false;
373
+ return target.areaType === 'cards'
374
+ ? this.upsertCardRecord(key, target, raw, record)
375
+ : this.upsertRowRecord(key, target, raw, record, config);
376
+ }
377
+ /**
378
+ * Drops a record the backend has deleted, without re-fetching. Returns
379
+ * `false` when the record is not in the loaded set, so the caller can decide
380
+ * whether a reload is warranted.
381
+ */
382
+ removeRecord(key, recordId, config) {
383
+ const target = this.itemsByKey()[key];
384
+ if (!target || target.type !== 'form')
385
+ return false;
386
+ const raw = target.rawData;
387
+ if (!raw)
388
+ return false;
389
+ const records = (raw.records ?? []).filter((item) => item.id !== recordId);
390
+ if (target.areaType === 'cards') {
391
+ const cards = target.cards.filter((card) => card.id !== recordId);
392
+ if (cards.length === target.cards.length)
393
+ return false;
394
+ this.patchItem(key, {
395
+ ...target,
396
+ cards,
397
+ totalCount: Math.max(0, target.totalCount - 1),
398
+ error: null,
399
+ rawData: this.withRecords(raw, records, -1),
400
+ });
401
+ return true;
402
+ }
403
+ if (records.length === (raw.records ?? []).length)
404
+ return false;
405
+ this.setRowsResult(key, this.withRecords(raw, records, -1), config, target.skip, target.take);
406
+ return true;
407
+ }
408
+ upsertRowRecord(key, target, raw, record, config) {
409
+ // No columns means no completed table load to splice into.
410
+ if (!target.columns.length)
411
+ return false;
412
+ const records = [...(raw.records ?? [])];
413
+ const index = records.findIndex((item) => item.id === record.id);
414
+ if (index >= 0) {
415
+ records[index] = this.mergeRecord(records[index], record);
416
+ }
417
+ else {
418
+ // The backend owns the real ordering and does not say where the new
419
+ // record landed, so it goes to the top of the page in view: the user
420
+ // has to see what they just created. The next real load puts it in its
421
+ // true place.
422
+ records.unshift(record);
423
+ // Keep the page the size the paginator promises — the row pushed off
424
+ // the end now lives on the next page.
425
+ if (config.isPaginated &&
426
+ target.take > 0 &&
427
+ records.length > target.take) {
428
+ records.length = target.take;
429
+ }
430
+ }
431
+ this.setRowsResult(key, this.withRecords(raw, records, index >= 0 ? 0 : 1), config, target.skip, target.take);
432
+ return true;
433
+ }
434
+ upsertCardRecord(key, target, raw, record) {
435
+ if (!raw.projectionMeta)
436
+ return false;
437
+ const previous = (raw.records ?? []).find((item) => item.id === record.id);
438
+ const merged = previous ? this.mergeRecord(previous, record) : record;
439
+ const [card] = this.toCards({ ...raw, records: [merged] });
440
+ if (!card)
441
+ return false;
442
+ const index = target.cards.findIndex((item) => item.id === card.id);
443
+ const isInsert = index < 0;
444
+ const cards = isInsert
445
+ ? [card, ...target.cards]
446
+ : target.cards.map((item, position) => position === index ? card : item);
447
+ const records = [...(raw.records ?? [])];
448
+ const recordIndex = records.findIndex((item) => item.id === merged.id);
449
+ if (recordIndex >= 0)
450
+ records[recordIndex] = merged;
451
+ else
452
+ records.unshift(merged);
453
+ this.patchItem(key, {
454
+ ...target,
455
+ cards,
456
+ totalCount: isInsert ? target.totalCount + 1 : target.totalCount,
457
+ error: null,
458
+ rawData: this.withRecords(raw, records, isInsert ? 1 : 0),
459
+ });
460
+ return true;
461
+ }
462
+ /**
463
+ * Overlays the written record on the one being replaced, key by key. A
464
+ * cleared property comes back explicitly (`{ raw: null, value: null }`) and
465
+ * overwrites; only a key the backend left out entirely keeps its previous
466
+ * cell, which beats blanking a value that did not actually change.
467
+ */
468
+ mergeRecord(previous, next) {
469
+ return {
470
+ ...previous,
471
+ ...next,
472
+ values: { ...previous.values, ...next.values },
473
+ };
474
+ }
475
+ withRecords(raw, records, totalCountDelta) {
476
+ return {
477
+ ...raw,
478
+ records,
479
+ pagination: raw.pagination
480
+ ? {
481
+ ...raw.pagination,
482
+ totalCount: Math.max(0, raw.pagination.totalCount + totalCountDelta),
483
+ }
484
+ : raw.pagination,
485
+ };
486
+ }
487
+ patchItem(key, next) {
488
+ this.itemsByKey.set({ ...this.itemsByKey(), [key]: next });
489
+ }
309
490
  /**
310
491
  * Appends `next` to `current`, dropping any card whose id is already
311
492
  * present. Ids are the grid's `@for` track key, so duplicates are a runtime
@@ -1791,6 +1972,14 @@ class ClientList {
1791
1972
  inFlightRequestSignatures = new Map();
1792
1973
  fulfilledRequestSignatures = new Map();
1793
1974
  runtimeFilters = new Map();
1975
+ /**
1976
+ * The `propertyKeys` the last table request carried, per item. `undefined`
1977
+ * means the request left the projection to the backend, which is a distinct
1978
+ * state from "not loaded yet" — hence the map rather than a nullable field.
1979
+ */
1980
+ requestPropertyKeys = new Map();
1981
+ /** Single-record read-backs, kept apart from the page loads they must not cancel. */
1982
+ recordSubscriptions = new Map();
1794
1983
  constructor() {
1795
1984
  effect(() => {
1796
1985
  const configs = this.configurations();
@@ -1860,6 +2049,93 @@ class ClientList {
1860
2049
  return;
1861
2050
  this.loadItem(item, true);
1862
2051
  }
2052
+ /**
2053
+ * The query settings this list renders with, shaped as the `returnRecord`
2054
+ * block of a `process-submit` payload. Send it with a create/update so the
2055
+ * backend projects the written record the way this list reads records, then
2056
+ * hand the response to {@link applyWriteResult} — that pair replaces the
2057
+ * full page re-fetch a write used to cost.
2058
+ *
2059
+ * Returns `null` for an informative dashboard (no records to project) or an
2060
+ * unknown key.
2061
+ */
2062
+ getReturnRecordRequest(itemKey) {
2063
+ const item = this.state.itemsByKey()[itemKey];
2064
+ if (!item || item.type !== 'form')
2065
+ return null;
2066
+ const includeState = [...CLIENT_LIST_DEFAULT_INCLUDE_STATE];
2067
+ const culture = this.transloco.getActiveLang();
2068
+ if (item.areaType === 'cards') {
2069
+ return { projection: 'Card', includeState, culture };
2070
+ }
2071
+ const propertyKeys = this.requestPropertyKeys.get(itemKey);
2072
+ return {
2073
+ projection: 'Table',
2074
+ surfaceKey: 'table',
2075
+ includeState,
2076
+ // Omitted, not empty, when the table let the backend pick the
2077
+ // projection — an empty array would read as "no columns".
2078
+ ...(propertyKeys?.length ? { propertyKeys } : {}),
2079
+ culture,
2080
+ };
2081
+ }
2082
+ /**
2083
+ * Applies a create/update to the list in place, without re-fetching the
2084
+ * page. Pass the `process-submit` response as-is.
2085
+ *
2086
+ * Three outcomes, in the order they are tried:
2087
+ * - the write carried a usable record projection → splice it in, no request;
2088
+ * - it did not (`recordProjectionStatus: 'Unavailable'`, or the list has
2089
+ * nothing to splice into) → read that one record back by id. The write
2090
+ * already succeeded; this only reads, and never re-submits;
2091
+ * - nothing identifies the record at all → reload the page, as before.
2092
+ *
2093
+ * An approval-queued submit is a no-op: nothing has been written yet.
2094
+ *
2095
+ * Note that the list cannot know where the backend would have sorted a new
2096
+ * record, so an insert lands at the top of the page in view.
2097
+ */
2098
+ applyWriteResult(itemKey, result) {
2099
+ const item = this.state.itemsByKey()[itemKey];
2100
+ if (!item || item.type !== 'form')
2101
+ return;
2102
+ if (this.isPendingApprovalWrite(result))
2103
+ return;
2104
+ const recordId = this.toFiniteNumber(result?.recordId);
2105
+ const record = this.toWriteRecord(result, recordId);
2106
+ if (record) {
2107
+ // A failed splice means the list holds no page to splice into, so
2108
+ // reading the record back would not help either.
2109
+ if (this.state.upsertRecord(itemKey, record, item.config)) {
2110
+ this.afterRecordApplied(itemKey);
2111
+ }
2112
+ else {
2113
+ this.reloadByKey(itemKey);
2114
+ }
2115
+ return;
2116
+ }
2117
+ if (recordId != null) {
2118
+ this.readRecordBack(item, recordId);
2119
+ return;
2120
+ }
2121
+ this.reloadByKey(itemKey);
2122
+ }
2123
+ /**
2124
+ * Drops a deleted record from the list in place. Falls back to a reload when
2125
+ * the record is not part of the loaded set, so a stale list still corrects
2126
+ * itself.
2127
+ */
2128
+ removeRecord(itemKey, recordId) {
2129
+ const item = this.state.itemsByKey()[itemKey];
2130
+ if (!item || item.type !== 'form')
2131
+ return;
2132
+ if (!this.state.removeRecord(itemKey, recordId, item.config)) {
2133
+ this.reloadByKey(itemKey);
2134
+ return;
2135
+ }
2136
+ this.runtimeActions.invalidateRow(itemKey, recordId);
2137
+ this.afterRecordApplied(itemKey, { invalidateRuntimeActions: false });
2138
+ }
1863
2139
  toggleExpanded(key) {
1864
2140
  this.state.toggleExpanded(key);
1865
2141
  }
@@ -2110,6 +2386,89 @@ class ClientList {
2110
2386
  config.onActionExecuted?.(action, ctx);
2111
2387
  }
2112
2388
  }
2389
+ /**
2390
+ * A submit that only queued an approval request has written nothing — the
2391
+ * record it describes does not exist yet, so the list must not move.
2392
+ */
2393
+ isPendingApprovalWrite(result) {
2394
+ return (String(result?.status ?? '')
2395
+ .trim()
2396
+ .toLowerCase() === 'pendingapproval');
2397
+ }
2398
+ /**
2399
+ * The canonical record from a write response, or `null` when there is none
2400
+ * to trust. A backend that has not shipped the canonical projection yet
2401
+ * answers with neither `recordProjectionStatus: 'Available'` nor `values`,
2402
+ * and falls through to the read-back path — which is why this is a plain
2403
+ * shape check and not a parse of alternative record shapes.
2404
+ */
2405
+ toWriteRecord(result, recordId) {
2406
+ if (result?.recordProjectionStatus !== 'Available')
2407
+ return null;
2408
+ const record = result.record;
2409
+ if (!record?.values)
2410
+ return null;
2411
+ const id = this.toFiniteNumber(record.id) ?? recordId;
2412
+ if (id == null)
2413
+ return null;
2414
+ return { ...record, id };
2415
+ }
2416
+ /**
2417
+ * Reads one record back through `fetch/query` with this list's own settings.
2418
+ * Taken when the write could not project the record itself — the write has
2419
+ * already happened, so this reads and never re-submits.
2420
+ */
2421
+ readRecordBack(item, recordId) {
2422
+ const config = item.config;
2423
+ const request = this.getReturnRecordRequest(item.key);
2424
+ if (!request || !this.hasValidIdentifiers(config)) {
2425
+ this.reloadByKey(item.key);
2426
+ return;
2427
+ }
2428
+ // The host's own scope filters plus the record id. Runtime filters (the
2429
+ // search box, a column filter) are deliberately left out: a record the
2430
+ // user just wrote should come back whether or not it matches whatever
2431
+ // they happen to have typed into the list.
2432
+ const filters = [
2433
+ ...config.filters,
2434
+ {
2435
+ key: CLIENT_LIST_RECORD_ID_FILTER_KEY,
2436
+ operator: 'Equals',
2437
+ value: recordId,
2438
+ },
2439
+ ];
2440
+ this.recordSubscriptions.get(item.key)?.unsubscribe();
2441
+ const sub = this.api
2442
+ .getRecord(config.contextKey, request, filters)
2443
+ .subscribe({
2444
+ next: (response) => {
2445
+ this.recordSubscriptions.delete(item.key);
2446
+ const record = response.data?.records?.[0];
2447
+ if (!record || !this.state.upsertRecord(item.key, record, config)) {
2448
+ this.reloadByKey(item.key);
2449
+ return;
2450
+ }
2451
+ this.afterRecordApplied(item.key);
2452
+ },
2453
+ error: () => {
2454
+ this.recordSubscriptions.delete(item.key);
2455
+ this.reloadByKey(item.key);
2456
+ },
2457
+ });
2458
+ this.recordSubscriptions.set(item.key, sub);
2459
+ }
2460
+ /**
2461
+ * Runs the tail of a load for a list that changed without one: the row
2462
+ * action cache is stale (a written record's available actions follow its new
2463
+ * state), and hosts hang work off `dataLoaded` / `loaded`.
2464
+ */
2465
+ afterRecordApplied(itemKey, options) {
2466
+ if (options?.invalidateRuntimeActions !== false) {
2467
+ this.runtimeActions.invalidateList(itemKey);
2468
+ }
2469
+ this.notifyDataLoaded(itemKey);
2470
+ this.loaded.emit(itemKey);
2471
+ }
2113
2472
  toRuntimeActionsContext(item, row, config) {
2114
2473
  const recordId = this.resolveRecordId(config, row);
2115
2474
  if (recordId == null)
@@ -2147,6 +2506,9 @@ class ClientList {
2147
2506
  ngOnDestroy() {
2148
2507
  this.subscriptions.forEach((sub) => sub.unsubscribe());
2149
2508
  this.subscriptions.clear();
2509
+ this.recordSubscriptions.forEach((sub) => sub.unsubscribe());
2510
+ this.recordSubscriptions.clear();
2511
+ this.requestPropertyKeys.clear();
2150
2512
  this.rowActionsLoadingFnCache.clear();
2151
2513
  this.runtimeActions.clearAll();
2152
2514
  }
@@ -2290,9 +2652,10 @@ class ClientList {
2290
2652
  this.state.setLoading(key, true);
2291
2653
  this.state.setError(key, null);
2292
2654
  const sub = this.api.getRows(config.contextKey, query, filters).subscribe({
2293
- next: (response) => {
2655
+ next: ({ response, propertyKeys }) => {
2294
2656
  let hasLoadedData = false;
2295
2657
  if (response.data) {
2658
+ this.requestPropertyKeys.set(key, propertyKeys);
2296
2659
  this.state.setRowsResult(key, response.data, config, query.skip, query.take);
2297
2660
  this.fulfilledRequestSignatures.set(key, requestSignature);
2298
2661
  hasLoadedData = true;
@@ -2563,11 +2926,22 @@ class ClientList {
2563
2926
  this.fulfilledRequestSignatures.delete(key);
2564
2927
  }
2565
2928
  }
2929
+ for (const [key, sub] of this.recordSubscriptions.entries()) {
2930
+ if (!activeKeys.has(key)) {
2931
+ sub.unsubscribe();
2932
+ this.recordSubscriptions.delete(key);
2933
+ }
2934
+ }
2566
2935
  for (const key of this.runtimeFilters.keys()) {
2567
2936
  if (!activeKeys.has(key)) {
2568
2937
  this.runtimeFilters.delete(key);
2569
2938
  }
2570
2939
  }
2940
+ for (const key of this.requestPropertyKeys.keys()) {
2941
+ if (!activeKeys.has(key)) {
2942
+ this.requestPropertyKeys.delete(key);
2943
+ }
2944
+ }
2571
2945
  for (const key of this.rowActionsLoadingFnCache.keys()) {
2572
2946
  if (!activeKeys.has(key)) {
2573
2947
  this.rowActionsLoadingFnCache.delete(key);
@@ -2694,5 +3068,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
2694
3068
  * Generated bundle index. Do not edit.
2695
3069
  */
2696
3070
 
2697
- export { CLIENT_LIST_RECORD_STATE_KEY, ClientList, ClientListApiService, ClientListRuntimeActionsService, ClientListStateService, ClientListToolbarService, defaultResolveRecordId };
3071
+ export { CLIENT_LIST_DEFAULT_INCLUDE_STATE, CLIENT_LIST_RECORD_ID_FILTER_KEY, CLIENT_LIST_RECORD_STATE_KEY, ClientList, ClientListApiService, ClientListRuntimeActionsService, ClientListStateService, ClientListToolbarService, defaultResolveRecordId };
2698
3072
  //# sourceMappingURL=masterteam-client-components-client-list.mjs.map