@masterteam/client-components 0.0.89 → 0.0.91
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-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}}
|
|
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}.grow{flex-grow:1}.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}}
|
|
@@ -24,6 +24,13 @@ import { PopoverModule } from 'primeng/popover';
|
|
|
24
24
|
import { DashboardViewer } from '@masterteam/dashboard-builder';
|
|
25
25
|
|
|
26
26
|
const CLIENT_LIST_RECORD_STATE_KEY = '__clientListRecordState';
|
|
27
|
+
/**
|
|
28
|
+
* Row key carrying the owning record of a hierarchy row. Sits beside the row's
|
|
29
|
+
* cells rather than in a column so it travels with the row through
|
|
30
|
+
* `transformResult`, row actions and click handlers without ever rendering.
|
|
31
|
+
* Read it with {@link readClientListRowSource}.
|
|
32
|
+
*/
|
|
33
|
+
const CLIENT_LIST_RECORD_SOURCE_KEY = '__clientListRecordSource';
|
|
27
34
|
/** Record state every list request asks for. */
|
|
28
35
|
const CLIENT_LIST_DEFAULT_INCLUDE_STATE = ['escalation'];
|
|
29
36
|
/**
|
|
@@ -43,7 +50,7 @@ class ClientListApiService {
|
|
|
43
50
|
* the request carried, because a write that wants its record projected the
|
|
44
51
|
* same way has to repeat them and cannot recover them from the response.
|
|
45
52
|
*/
|
|
46
|
-
getRows(contextKey, query, filters = []) {
|
|
53
|
+
getRows(contextKey, query, filters = [], hierarchy) {
|
|
47
54
|
return this.resolveTablePropertyKeys(contextKey, query).pipe(switchMap((resolvedKeys) => {
|
|
48
55
|
const propertyKeys = resolvedKeys?.length ? resolvedKeys : undefined;
|
|
49
56
|
return this.queryRuntime({
|
|
@@ -55,6 +62,7 @@ class ClientListApiService {
|
|
|
55
62
|
filters,
|
|
56
63
|
page: this.toPage(query.skip, query.take),
|
|
57
64
|
pageSize: query.take,
|
|
65
|
+
...(hierarchy ? { hierarchy: this.toHierarchyScope(hierarchy) } : {}),
|
|
58
66
|
}).pipe(map((response) => ({ response, propertyKeys })));
|
|
59
67
|
}));
|
|
60
68
|
}
|
|
@@ -63,6 +71,12 @@ class ClientListApiService {
|
|
|
63
71
|
* taken when a write reports `recordProjectionStatus: 'Unavailable'`. The
|
|
64
72
|
* write itself already succeeded; this only reads, and must never be served
|
|
65
73
|
* by re-submitting.
|
|
74
|
+
*
|
|
75
|
+
* `contextKey` is the context that *owns* the record, which in a hierarchy
|
|
76
|
+
* table is the row's `source.contextKey` rather than the list's own. The
|
|
77
|
+
* read deliberately carries no `hierarchy` scope: the row is filtered by its
|
|
78
|
+
* own id in its own context, which is both cheaper and immune to the record
|
|
79
|
+
* having moved out of the root's subtree since it was written.
|
|
66
80
|
*/
|
|
67
81
|
getRecord(contextKey, request, filters) {
|
|
68
82
|
return this.queryRuntime({
|
|
@@ -123,6 +137,21 @@ class ClientListApiService {
|
|
|
123
137
|
}
|
|
124
138
|
return Math.floor(skip / take) + 1;
|
|
125
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Sends the scope with both optional fields resolved rather than omitted.
|
|
142
|
+
* The backend's defaults match these, but `depth` is range-checked against
|
|
143
|
+
* `>= -1` and anything else fails the whole request — so a host that means
|
|
144
|
+
* "everything" gets `-1` written down instead of relying on an absent field
|
|
145
|
+
* surviving serialization.
|
|
146
|
+
*/
|
|
147
|
+
toHierarchyScope(scope) {
|
|
148
|
+
const depth = Math.trunc(scope.depth ?? -1);
|
|
149
|
+
return {
|
|
150
|
+
rootId: scope.rootId,
|
|
151
|
+
depth: depth < -1 ? -1 : depth,
|
|
152
|
+
includeRoot: scope.includeRoot ?? false,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
126
155
|
toEffectiveColumnKeys(columns) {
|
|
127
156
|
const keys = (columns ?? [])
|
|
128
157
|
.filter((column) => typeof column === 'string' ? true : column.visible !== false)
|
|
@@ -251,6 +280,10 @@ class ClientListStateService {
|
|
|
251
280
|
const row = {
|
|
252
281
|
Id: record.id,
|
|
253
282
|
[CLIENT_LIST_RECORD_STATE_KEY]: record.state ?? null,
|
|
283
|
+
// Only present on a hierarchy response, where rows come from several
|
|
284
|
+
// owners at once and the list's own context no longer identifies the
|
|
285
|
+
// record a row belongs to.
|
|
286
|
+
[CLIENT_LIST_RECORD_SOURCE_KEY]: record.source ?? null,
|
|
254
287
|
};
|
|
255
288
|
columns.forEach((column) => {
|
|
256
289
|
const property = this.resolvePropertyMeta(column.key, propertyMaps);
|
|
@@ -277,6 +310,12 @@ class ClientListStateService {
|
|
|
277
310
|
columns: shaped.columns,
|
|
278
311
|
rows: shaped.rows,
|
|
279
312
|
cards: [],
|
|
313
|
+
// Pre-pagination aggregates, kept verbatim off the response. They
|
|
314
|
+
// describe every matching row, so they must never be recomputed from
|
|
315
|
+
// the page — and they are absent on an ordinary list, which is a
|
|
316
|
+
// different thing from being zero.
|
|
317
|
+
totals: response.projectionMeta?.totals,
|
|
318
|
+
sourceGroups: response.projectionMeta?.sourceGroups,
|
|
280
319
|
skip,
|
|
281
320
|
take,
|
|
282
321
|
totalCount,
|
|
@@ -370,14 +409,22 @@ class ClientListStateService {
|
|
|
370
409
|
const raw = target.rawData;
|
|
371
410
|
if (!raw)
|
|
372
411
|
return false;
|
|
412
|
+
// A hierarchy table cannot be patched in place. Its totals and per-owner
|
|
413
|
+
// subtotals are summed by the backend over every matching row across all
|
|
414
|
+
// pages, so a written row changes numbers this client cannot recompute —
|
|
415
|
+
// splicing the row would leave the table showing a total that no longer
|
|
416
|
+
// matches its own rows. Refuse, and let the caller reload.
|
|
417
|
+
if (config.hierarchy)
|
|
418
|
+
return false;
|
|
373
419
|
return target.areaType === 'cards'
|
|
374
420
|
? this.upsertCardRecord(key, target, raw, record)
|
|
375
421
|
: this.upsertRowRecord(key, target, raw, record, config);
|
|
376
422
|
}
|
|
377
423
|
/**
|
|
378
424
|
* Drops a record the backend has deleted, without re-fetching. Returns
|
|
379
|
-
* `false` when the record is not in the loaded set
|
|
380
|
-
*
|
|
425
|
+
* `false` when the record is not in the loaded set — or when the list is a
|
|
426
|
+
* hierarchy table, whose server-summed totals a local removal would
|
|
427
|
+
* invalidate — so the caller can decide whether a reload is warranted.
|
|
381
428
|
*/
|
|
382
429
|
removeRecord(key, recordId, config) {
|
|
383
430
|
const target = this.itemsByKey()[key];
|
|
@@ -386,6 +433,8 @@ class ClientListStateService {
|
|
|
386
433
|
const raw = target.rawData;
|
|
387
434
|
if (!raw)
|
|
388
435
|
return false;
|
|
436
|
+
if (config.hierarchy)
|
|
437
|
+
return false;
|
|
389
438
|
const records = (raw.records ?? []).filter((item) => item.id !== recordId);
|
|
390
439
|
if (target.areaType === 'cards') {
|
|
391
440
|
const cards = target.cards.filter((card) => card.id !== recordId);
|
|
@@ -992,21 +1041,47 @@ function defaultResolveRecordId(row) {
|
|
|
992
1041
|
*/
|
|
993
1042
|
class ClientListToolbarService {
|
|
994
1043
|
buckets = new Map();
|
|
995
|
-
|
|
1044
|
+
/**
|
|
1045
|
+
* Lists whose defaults have been applied. Tracked apart from the bucket
|
|
1046
|
+
* itself because the bucket can be created by whichever view renders first —
|
|
1047
|
+
* the cards view asks for one without defaults — and seeding on creation
|
|
1048
|
+
* alone would then lose them for good.
|
|
1049
|
+
*/
|
|
1050
|
+
seeded = new Set();
|
|
1051
|
+
/**
|
|
1052
|
+
* `defaults` are applied once per list and ignored on every later call.
|
|
1053
|
+
* Re-applying them would fight the user: a host that asks for an initial
|
|
1054
|
+
* grouping would otherwise re-impose it on each render, so regrouping or
|
|
1055
|
+
* clearing it from the table menu would never stick.
|
|
1056
|
+
*/
|
|
1057
|
+
forList(key, defaults) {
|
|
996
1058
|
let bucket = this.buckets.get(key);
|
|
997
1059
|
if (!bucket) {
|
|
998
1060
|
bucket = {
|
|
999
1061
|
filters: signal({}),
|
|
1000
1062
|
filterTerm: signal(''),
|
|
1001
1063
|
groupBy: signal(null),
|
|
1064
|
+
sortField: signal(null),
|
|
1065
|
+
sortDirection: signal(null),
|
|
1002
1066
|
activeTab: signal(null),
|
|
1003
1067
|
};
|
|
1004
1068
|
this.buckets.set(key, bucket);
|
|
1005
1069
|
}
|
|
1070
|
+
if (defaults && !this.seeded.has(key)) {
|
|
1071
|
+
this.seeded.add(key);
|
|
1072
|
+
const groupBy = defaults.groupBy || null;
|
|
1073
|
+
if (groupBy) {
|
|
1074
|
+
bucket.groupBy.set(groupBy);
|
|
1075
|
+
// A seeded group has to bring its own sort — see the field's note.
|
|
1076
|
+
bucket.sortField.set(groupBy);
|
|
1077
|
+
bucket.sortDirection.set('asc');
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1006
1080
|
return bucket;
|
|
1007
1081
|
}
|
|
1008
1082
|
clear(key) {
|
|
1009
1083
|
this.buckets.delete(key);
|
|
1084
|
+
this.seeded.delete(key);
|
|
1010
1085
|
}
|
|
1011
1086
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1012
1087
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListToolbarService, providedIn: 'root' });
|
|
@@ -1034,7 +1109,9 @@ class ClientListTableView {
|
|
|
1034
1109
|
* list identity. The cards view for the same list resolves the same bucket
|
|
1035
1110
|
* so switching area types preserves the toolbar state.
|
|
1036
1111
|
*/
|
|
1037
|
-
bucket = computed(() => this.toolbar.forList(this.state().key
|
|
1112
|
+
bucket = computed(() => this.toolbar.forList(this.state().key, {
|
|
1113
|
+
groupBy: this.state().config.table.groupBy,
|
|
1114
|
+
}), ...(ngDevMode ? [{ debugName: "bucket" }] : /* istanbul ignore next */ []));
|
|
1038
1115
|
pageSize = computed(() => {
|
|
1039
1116
|
const table = this.table();
|
|
1040
1117
|
return table.config.isPaginated ? table.take : table.config.table.pageSize;
|
|
@@ -1076,11 +1153,11 @@ class ClientListTableView {
|
|
|
1076
1153
|
};
|
|
1077
1154
|
}
|
|
1078
1155
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListTableView, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1079
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListTableView, isStandalone: true, selector: "mt-client-list-table-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, actionShape: { classPropertyName: "actionShape", publicName: "actionShape", isSignal: true, isRequired: false, transformFunction: null }, rowActionsLoadingFn: { classPropertyName: "rowActionsLoadingFn", publicName: "rowActionsLoadingFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lazyLoad: "lazyLoad", rowClick: "rowClick", rowActionsRequested: "rowActionsRequested" }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\n @if (table().config.contentStart) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentStart\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\n @if (table().loading && table().rows.length === 0) {\n <div class=\"flex flex-col gap-3 py-3\">\n <p-skeleton height=\"3rem\" />\n <p-skeleton height=\"3rem\" />\n <p-skeleton height=\"3rem\" />\n </div>\n } @else if (table().error) {\n <div\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\n >\n {{ table().error }}\n </div>\n } @else {\n <mt-table\n [noCard]=\"true\"\n [data]=\"table().rows\"\n [columns]=\"table().columns\"\n dataKey=\"Id\"\n [storageKey]=\"tableStorageKey()\"\n [persistStateExclude]=\"table().config.table.persistStateExclude\"\n [captionStartTemplate]=\"table().config.toolbarStart ?? null\"\n [captionEndTemplate]=\"table().config.toolbarEnd ?? null\"\n [rowActions]=\"rowActions()\"\n [actionShape]=\"actionShape()\"\n [rowActionsLoadingFn]=\"rowActionsLoadingFn()\"\n (rowActionsRequested)=\"rowActionsRequested.emit($event)\"\n [generalSearch]=\"table().config.table.searchable\"\n [showFilters]=\"true\"\n filterMode=\"column\"\n [printable]=\"true\"\n [groupable]=\"true\"\n [cellClickFilter]=\"true\"\n [freezeActions]=\"true\"\n [exportable]=\"table().config.table.exportable\"\n [loading]=\"table().loading\"\n [clickableRows]=\"true\"\n [lazy]=\"table().config.isPaginated\"\n [lazyTotalRecords]=\"table().totalCount\"\n [virtualScroll]=\"!table().config.isPaginated\"\n [virtualScrollItemSize]=\"56\"\n scrollHeight=\"520px\"\n [pageSize]=\"pageSize()\"\n [filters]=\"bucket().filters()\"\n (filtersChange)=\"bucket().filters.set($event)\"\n [filterTerm]=\"bucket().filterTerm()\"\n (filterTermChange)=\"bucket().filterTerm.set($event)\"\n [groupBy]=\"bucket().groupBy()\"\n (groupByChange)=\"bucket().groupBy.set($event)\"\n [activeTab]=\"bucket().activeTab()\"\n (activeTabChange)=\"bucket().activeTab.set($event)\"\n (lazyLoad)=\"lazyLoad.emit($event)\"\n (rowClick)=\"rowClick.emit($event)\"\n />\n }\n </div>\n\n @if (table().config.contentEnd) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentEnd\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
|
|
1156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListTableView, isStandalone: true, selector: "mt-client-list-table-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, actionShape: { classPropertyName: "actionShape", publicName: "actionShape", isSignal: true, isRequired: false, transformFunction: null }, rowActionsLoadingFn: { classPropertyName: "rowActionsLoadingFn", publicName: "rowActionsLoadingFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lazyLoad: "lazyLoad", rowClick: "rowClick", rowActionsRequested: "rowActionsRequested" }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\n @if (table().config.contentStart) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentStart\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\n @if (table().loading && table().rows.length === 0) {\n <div class=\"flex flex-col gap-3 py-3\">\n <p-skeleton height=\"3rem\" />\n <p-skeleton height=\"3rem\" />\n <p-skeleton height=\"3rem\" />\n </div>\n } @else if (table().error) {\n <div\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\n >\n {{ table().error }}\n </div>\n } @else {\n <mt-table\n [noCard]=\"true\"\n [data]=\"table().rows\"\n [columns]=\"table().columns\"\n dataKey=\"Id\"\n [storageKey]=\"tableStorageKey()\"\n [persistStateExclude]=\"table().config.table.persistStateExclude\"\n [captionStartTemplate]=\"table().config.toolbarStart ?? null\"\n [captionEndTemplate]=\"table().config.toolbarEnd ?? null\"\n [rowActions]=\"rowActions()\"\n [actionShape]=\"actionShape()\"\n [rowActionsLoadingFn]=\"rowActionsLoadingFn()\"\n (rowActionsRequested)=\"rowActionsRequested.emit($event)\"\n [generalSearch]=\"table().config.table.searchable\"\n [showFilters]=\"true\"\n filterMode=\"column\"\n [printable]=\"true\"\n [groupable]=\"true\"\n [cellClickFilter]=\"true\"\n [freezeActions]=\"true\"\n [exportable]=\"table().config.table.exportable\"\n [loading]=\"table().loading\"\n [clickableRows]=\"true\"\n [lazy]=\"table().config.isPaginated\"\n [lazyTotalRecords]=\"table().totalCount\"\n [virtualScroll]=\"!table().config.isPaginated\"\n [virtualScrollItemSize]=\"56\"\n scrollHeight=\"520px\"\n [pageSize]=\"pageSize()\"\n [filters]=\"bucket().filters()\"\n (filtersChange)=\"bucket().filters.set($event)\"\n [filterTerm]=\"bucket().filterTerm()\"\n (filterTermChange)=\"bucket().filterTerm.set($event)\"\n [groupBy]=\"bucket().groupBy()\"\n (groupByChange)=\"bucket().groupBy.set($event)\"\n [sortField]=\"bucket().sortField()\"\n (sortFieldChange)=\"bucket().sortField.set($event)\"\n [sortDirection]=\"bucket().sortDirection()\"\n (sortDirectionChange)=\"bucket().sortDirection.set($event)\"\n [activeTab]=\"bucket().activeTab()\"\n (activeTabChange)=\"bucket().activeTab.set($event)\"\n (lazyLoad)=\"lazyLoad.emit($event)\"\n (rowClick)=\"rowClick.emit($event)\"\n />\n }\n </div>\n\n @if (table().config.contentEnd) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentEnd\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
|
|
1080
1157
|
}
|
|
1081
1158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListTableView, decorators: [{
|
|
1082
1159
|
type: Component,
|
|
1083
|
-
args: [{ selector: 'mt-client-list-table-view', standalone: true, imports: [CommonModule, Table, SkeletonModule], template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\n @if (table().config.contentStart) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentStart\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\n @if (table().loading && table().rows.length === 0) {\n <div class=\"flex flex-col gap-3 py-3\">\n <p-skeleton height=\"3rem\" />\n <p-skeleton height=\"3rem\" />\n <p-skeleton height=\"3rem\" />\n </div>\n } @else if (table().error) {\n <div\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\n >\n {{ table().error }}\n </div>\n } @else {\n <mt-table\n [noCard]=\"true\"\n [data]=\"table().rows\"\n [columns]=\"table().columns\"\n dataKey=\"Id\"\n [storageKey]=\"tableStorageKey()\"\n [persistStateExclude]=\"table().config.table.persistStateExclude\"\n [captionStartTemplate]=\"table().config.toolbarStart ?? null\"\n [captionEndTemplate]=\"table().config.toolbarEnd ?? null\"\n [rowActions]=\"rowActions()\"\n [actionShape]=\"actionShape()\"\n [rowActionsLoadingFn]=\"rowActionsLoadingFn()\"\n (rowActionsRequested)=\"rowActionsRequested.emit($event)\"\n [generalSearch]=\"table().config.table.searchable\"\n [showFilters]=\"true\"\n filterMode=\"column\"\n [printable]=\"true\"\n [groupable]=\"true\"\n [cellClickFilter]=\"true\"\n [freezeActions]=\"true\"\n [exportable]=\"table().config.table.exportable\"\n [loading]=\"table().loading\"\n [clickableRows]=\"true\"\n [lazy]=\"table().config.isPaginated\"\n [lazyTotalRecords]=\"table().totalCount\"\n [virtualScroll]=\"!table().config.isPaginated\"\n [virtualScrollItemSize]=\"56\"\n scrollHeight=\"520px\"\n [pageSize]=\"pageSize()\"\n [filters]=\"bucket().filters()\"\n (filtersChange)=\"bucket().filters.set($event)\"\n [filterTerm]=\"bucket().filterTerm()\"\n (filterTermChange)=\"bucket().filterTerm.set($event)\"\n [groupBy]=\"bucket().groupBy()\"\n (groupByChange)=\"bucket().groupBy.set($event)\"\n [activeTab]=\"bucket().activeTab()\"\n (activeTabChange)=\"bucket().activeTab.set($event)\"\n (lazyLoad)=\"lazyLoad.emit($event)\"\n (rowClick)=\"rowClick.emit($event)\"\n />\n }\n </div>\n\n @if (table().config.contentEnd) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentEnd\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n</div>\n" }]
|
|
1160
|
+
args: [{ selector: 'mt-client-list-table-view', standalone: true, imports: [CommonModule, Table, SkeletonModule], template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\n @if (table().config.contentStart) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentStart\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\n @if (table().loading && table().rows.length === 0) {\n <div class=\"flex flex-col gap-3 py-3\">\n <p-skeleton height=\"3rem\" />\n <p-skeleton height=\"3rem\" />\n <p-skeleton height=\"3rem\" />\n </div>\n } @else if (table().error) {\n <div\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\n >\n {{ table().error }}\n </div>\n } @else {\n <mt-table\n [noCard]=\"true\"\n [data]=\"table().rows\"\n [columns]=\"table().columns\"\n dataKey=\"Id\"\n [storageKey]=\"tableStorageKey()\"\n [persistStateExclude]=\"table().config.table.persistStateExclude\"\n [captionStartTemplate]=\"table().config.toolbarStart ?? null\"\n [captionEndTemplate]=\"table().config.toolbarEnd ?? null\"\n [rowActions]=\"rowActions()\"\n [actionShape]=\"actionShape()\"\n [rowActionsLoadingFn]=\"rowActionsLoadingFn()\"\n (rowActionsRequested)=\"rowActionsRequested.emit($event)\"\n [generalSearch]=\"table().config.table.searchable\"\n [showFilters]=\"true\"\n filterMode=\"column\"\n [printable]=\"true\"\n [groupable]=\"true\"\n [cellClickFilter]=\"true\"\n [freezeActions]=\"true\"\n [exportable]=\"table().config.table.exportable\"\n [loading]=\"table().loading\"\n [clickableRows]=\"true\"\n [lazy]=\"table().config.isPaginated\"\n [lazyTotalRecords]=\"table().totalCount\"\n [virtualScroll]=\"!table().config.isPaginated\"\n [virtualScrollItemSize]=\"56\"\n scrollHeight=\"520px\"\n [pageSize]=\"pageSize()\"\n [filters]=\"bucket().filters()\"\n (filtersChange)=\"bucket().filters.set($event)\"\n [filterTerm]=\"bucket().filterTerm()\"\n (filterTermChange)=\"bucket().filterTerm.set($event)\"\n [groupBy]=\"bucket().groupBy()\"\n (groupByChange)=\"bucket().groupBy.set($event)\"\n [sortField]=\"bucket().sortField()\"\n (sortFieldChange)=\"bucket().sortField.set($event)\"\n [sortDirection]=\"bucket().sortDirection()\"\n (sortDirectionChange)=\"bucket().sortDirection.set($event)\"\n [activeTab]=\"bucket().activeTab()\"\n (activeTabChange)=\"bucket().activeTab.set($event)\"\n (lazyLoad)=\"lazyLoad.emit($event)\"\n (rowClick)=\"rowClick.emit($event)\"\n />\n }\n </div>\n\n @if (table().config.contentEnd) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentEnd\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n</div>\n" }]
|
|
1084
1161
|
}], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], actionShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionShape", required: false }] }], rowActionsLoadingFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActionsLoadingFn", required: false }] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], rowActionsRequested: [{ type: i0.Output, args: ["rowActionsRequested"] }] } });
|
|
1085
1162
|
|
|
1086
1163
|
const EMPTY_KEY_SET = new Set();
|
|
@@ -1978,6 +2055,54 @@ function serializeFilters(filters) {
|
|
|
1978
2055
|
return JSON.stringify(filters ?? []);
|
|
1979
2056
|
}
|
|
1980
2057
|
|
|
2058
|
+
/**
|
|
2059
|
+
* Reads the owning record off a hierarchy row. Returns null for a row from an
|
|
2060
|
+
* ordinary list, which has no owner other than the list's own context.
|
|
2061
|
+
*
|
|
2062
|
+
* Use this before addressing anything at a row — an edit, a navigation, a
|
|
2063
|
+
* permission check. The list's configured `contextKey` is the aggregation
|
|
2064
|
+
* scope in a hierarchy table, not the row's home.
|
|
2065
|
+
*/
|
|
2066
|
+
function readClientListRowSource(row) {
|
|
2067
|
+
const source = row?.[CLIENT_LIST_RECORD_SOURCE_KEY];
|
|
2068
|
+
return isRecordSource(source) ? source : null;
|
|
2069
|
+
}
|
|
2070
|
+
/**
|
|
2071
|
+
* Looks a total up by property key.
|
|
2072
|
+
*
|
|
2073
|
+
* Always go through this rather than indexing `totals`. The backend fills the
|
|
2074
|
+
* array from the module's configured summary keys — one `amount` entry on the
|
|
2075
|
+
* financial module, nothing at all on every other module — so the array being
|
|
2076
|
+
* present does not mean the key you want is in it, and position means nothing.
|
|
2077
|
+
*/
|
|
2078
|
+
function findClientListTotal(totals, propertyKey) {
|
|
2079
|
+
const wanted = propertyKey.trim().toLowerCase();
|
|
2080
|
+
return ((totals ?? []).find((total) => (total.propertyKey ?? '').trim().toLowerCase() === wanted) ?? null);
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* Whether a total left rows out — some row's value was missing or not a
|
|
2084
|
+
* number, so the sum is over fewer rows than the table reports.
|
|
2085
|
+
*
|
|
2086
|
+
* A total in this state must be presented as incomplete. Rendering it as a
|
|
2087
|
+
* plain figure states a portfolio total the data does not support.
|
|
2088
|
+
*/
|
|
2089
|
+
function isClientListTotalIncomplete(total) {
|
|
2090
|
+
return (total?.missingValueCount ?? 0) > 0;
|
|
2091
|
+
}
|
|
2092
|
+
/**
|
|
2093
|
+
* The subtotal group for one owning record, by its level-data id.
|
|
2094
|
+
*/
|
|
2095
|
+
function findClientListSourceGroup(groups, levelDataId) {
|
|
2096
|
+
return ((groups ?? []).find((group) => group.source?.levelDataId === levelDataId) ??
|
|
2097
|
+
null);
|
|
2098
|
+
}
|
|
2099
|
+
function isRecordSource(value) {
|
|
2100
|
+
return (!!value &&
|
|
2101
|
+
typeof value === 'object' &&
|
|
2102
|
+
typeof value.levelDataId === 'number' &&
|
|
2103
|
+
typeof value.contextKey === 'string');
|
|
2104
|
+
}
|
|
2105
|
+
|
|
1981
2106
|
const DEFAULT_AREA_TYPE = 'table';
|
|
1982
2107
|
const DEFAULT_MODE = 'auto';
|
|
1983
2108
|
const DEFAULT_TYPE = 'form';
|
|
@@ -2138,6 +2263,15 @@ class ClientList {
|
|
|
2138
2263
|
return;
|
|
2139
2264
|
if (this.isPendingApprovalWrite(result))
|
|
2140
2265
|
return;
|
|
2266
|
+
// A hierarchy table has no in-place path: its totals and per-owner
|
|
2267
|
+
// subtotals are summed server-side over every matching row, and the
|
|
2268
|
+
// written record lives in a descendant context this list's own id filter
|
|
2269
|
+
// would not even match. Reload outright rather than spend a read on a
|
|
2270
|
+
// record that cannot be spliced anyway.
|
|
2271
|
+
if (item.config.hierarchy) {
|
|
2272
|
+
this.reloadByKey(itemKey);
|
|
2273
|
+
return;
|
|
2274
|
+
}
|
|
2141
2275
|
const recordId = this.toFiniteNumber(result?.recordId);
|
|
2142
2276
|
const record = this.toWriteRecord(result, recordId);
|
|
2143
2277
|
if (record) {
|
|
@@ -2510,10 +2644,17 @@ class ClientList {
|
|
|
2510
2644
|
const recordId = this.resolveRecordId(config, row);
|
|
2511
2645
|
if (recordId == null)
|
|
2512
2646
|
return null;
|
|
2647
|
+
// A hierarchy row belongs to a descendant, not to the list's own context.
|
|
2648
|
+
// Its actions, its permissions and the instance they apply to are all the
|
|
2649
|
+
// owner's — asking the aggregation context for them would read the wrong
|
|
2650
|
+
// record's actions, or none at all.
|
|
2651
|
+
const source = readClientListRowSource(row);
|
|
2513
2652
|
return {
|
|
2514
2653
|
listKey: item.key,
|
|
2515
|
-
contextKey: item.config.contextKey ?? null,
|
|
2516
|
-
|
|
2654
|
+
contextKey: source?.contextKey ?? item.config.contextKey ?? null,
|
|
2655
|
+
listContextKey: item.config.contextKey ?? null,
|
|
2656
|
+
source,
|
|
2657
|
+
instanceId: source?.levelDataId ?? item.config.instanceId ?? null,
|
|
2517
2658
|
moduleId: item.config.moduleId ?? 0,
|
|
2518
2659
|
row,
|
|
2519
2660
|
recordId,
|
|
@@ -2689,7 +2830,9 @@ class ClientList {
|
|
|
2689
2830
|
this.inFlightRequestSignatures.set(key, requestSignature);
|
|
2690
2831
|
this.state.setLoading(key, true);
|
|
2691
2832
|
this.state.setError(key, null);
|
|
2692
|
-
const sub = this.api
|
|
2833
|
+
const sub = this.api
|
|
2834
|
+
.getRows(config.contextKey, query, filters, config.hierarchy)
|
|
2835
|
+
.subscribe({
|
|
2693
2836
|
next: ({ response, propertyKeys }) => {
|
|
2694
2837
|
let hasLoadedData = false;
|
|
2695
2838
|
if (response.data) {
|
|
@@ -2840,6 +2983,20 @@ class ClientList {
|
|
|
2840
2983
|
return DEFAULT_MODE;
|
|
2841
2984
|
return (columnKeys ?? []).length > 0 ? 'override' : DEFAULT_MODE;
|
|
2842
2985
|
}
|
|
2986
|
+
/**
|
|
2987
|
+
* Descendant scope only survives where the backend accepts it: a table, with
|
|
2988
|
+
* a usable root id. Anywhere else it is dropped rather than sent, because
|
|
2989
|
+
* the backend answers an unsupported combination with a 400 that takes the
|
|
2990
|
+
* whole list down — a cards area that happens to share a config object would
|
|
2991
|
+
* otherwise render nothing at all.
|
|
2992
|
+
*/
|
|
2993
|
+
resolveHierarchyScope(config, areaType) {
|
|
2994
|
+
const scope = config?.hierarchy;
|
|
2995
|
+
if (!scope || areaType !== 'table')
|
|
2996
|
+
return null;
|
|
2997
|
+
const rootId = this.resolvePositiveInteger(scope.rootId);
|
|
2998
|
+
return rootId == null ? null : { ...scope, rootId };
|
|
2999
|
+
}
|
|
2843
3000
|
toNormalizedConfig(config, type, areaType, mode, isPaginated, take, showHeader, collapseEnabled, layout) {
|
|
2844
3001
|
const informativeConfig = this.asInformativeConfig(config);
|
|
2845
3002
|
const formConfig = this.asFormConfig(config);
|
|
@@ -2847,6 +3004,7 @@ class ClientList {
|
|
|
2847
3004
|
contextKey: formConfig?.contextKey ?? null,
|
|
2848
3005
|
instanceId: formConfig?.instanceId ?? informativeConfig?.instanceId ?? null,
|
|
2849
3006
|
filters: formConfig?.filters ?? informativeConfig?.filters ?? [],
|
|
3007
|
+
hierarchy: this.resolveHierarchyScope(formConfig, areaType),
|
|
2850
3008
|
levelId: informativeConfig?.levelId ?? null,
|
|
2851
3009
|
moduleId: informativeConfig?.moduleId ?? 0,
|
|
2852
3010
|
type,
|
|
@@ -2919,6 +3077,10 @@ class ClientList {
|
|
|
2919
3077
|
}
|
|
2920
3078
|
resolveTableDisplayConfig(config, take, isPaginated) {
|
|
2921
3079
|
const configuredPageSize = this.resolvePositiveInteger(config?.table?.pageSize);
|
|
3080
|
+
// Grouping needs every row of a group in hand. A backend-paged list has
|
|
3081
|
+
// them split across pages, so each page would grow its own header for the
|
|
3082
|
+
// same value — drop the request rather than render that.
|
|
3083
|
+
const groupBy = (!isPaginated && config?.table?.groupBy) || null;
|
|
2922
3084
|
return {
|
|
2923
3085
|
pageSize: isPaginated
|
|
2924
3086
|
? take
|
|
@@ -2928,7 +3090,16 @@ class ClientList {
|
|
|
2928
3090
|
persistStateExclude: [
|
|
2929
3091
|
...(config?.table?.persistStateExclude ??
|
|
2930
3092
|
DEFAULT_TABLE_PERSIST_STATE_EXCLUDE),
|
|
3093
|
+
// A seeded grouping cannot share the table's persisted state. On
|
|
3094
|
+
// hydration `mt-table` writes both keys unconditionally — a stored
|
|
3095
|
+
// state that predates the grouping (or simply never had one) sets them
|
|
3096
|
+
// back to null, and the null travels out through `groupByChange` and
|
|
3097
|
+
// wipes the seed. The list then renders flat with no error, which is
|
|
3098
|
+
// exactly what a returning user would hit and a fresh browser would
|
|
3099
|
+
// not. The sort goes with it because grouping owns the sort.
|
|
3100
|
+
...(groupBy ? ['groupBy', 'sort'] : []),
|
|
2931
3101
|
],
|
|
3102
|
+
groupBy,
|
|
2932
3103
|
};
|
|
2933
3104
|
}
|
|
2934
3105
|
clampSpan(value, min = 0, max = DEFAULT_GRID_COLUMNS) {
|
|
@@ -3023,6 +3194,10 @@ class ClientList {
|
|
|
3023
3194
|
config.areaType,
|
|
3024
3195
|
config.contextKey ?? 'x',
|
|
3025
3196
|
this.serializeFilters(filters),
|
|
3197
|
+
// Two lists on the same context and filters are still different fetches
|
|
3198
|
+
// when they are rooted at different records — without this the second
|
|
3199
|
+
// one would be served the first one's rows from the in-flight cache.
|
|
3200
|
+
this.serializeHierarchy(config.hierarchy),
|
|
3026
3201
|
query.mode,
|
|
3027
3202
|
query.skip,
|
|
3028
3203
|
query.take,
|
|
@@ -3077,6 +3252,15 @@ class ClientList {
|
|
|
3077
3252
|
serializeFilters(filters) {
|
|
3078
3253
|
return JSON.stringify(filters ?? []);
|
|
3079
3254
|
}
|
|
3255
|
+
serializeHierarchy(hierarchy) {
|
|
3256
|
+
if (!hierarchy)
|
|
3257
|
+
return 'x';
|
|
3258
|
+
return [
|
|
3259
|
+
hierarchy.rootId,
|
|
3260
|
+
hierarchy.depth ?? -1,
|
|
3261
|
+
hierarchy.includeRoot ?? false,
|
|
3262
|
+
].join(',');
|
|
3263
|
+
}
|
|
3080
3264
|
resolveFetchFilters(key, config) {
|
|
3081
3265
|
return mergeRuntimeFilters(config.filters, this.runtimeFilters.get(key), this.state.itemsByKey()[key]?.columns);
|
|
3082
3266
|
}
|
|
@@ -3106,5 +3290,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
3106
3290
|
* Generated bundle index. Do not edit.
|
|
3107
3291
|
*/
|
|
3108
3292
|
|
|
3109
|
-
export { CLIENT_LIST_DEFAULT_INCLUDE_STATE, CLIENT_LIST_RECORD_ID_FILTER_KEY, CLIENT_LIST_RECORD_STATE_KEY, ClientList, ClientListApiService, ClientListRuntimeActionsService, ClientListStateService, ClientListToolbarService, defaultResolveRecordId };
|
|
3293
|
+
export { CLIENT_LIST_DEFAULT_INCLUDE_STATE, CLIENT_LIST_RECORD_ID_FILTER_KEY, CLIENT_LIST_RECORD_SOURCE_KEY, CLIENT_LIST_RECORD_STATE_KEY, ClientList, ClientListApiService, ClientListRuntimeActionsService, ClientListStateService, ClientListToolbarService, defaultResolveRecordId, findClientListSourceGroup, findClientListTotal, isClientListTotalIncomplete, readClientListRowSource };
|
|
3110
3294
|
//# sourceMappingURL=masterteam-client-components-client-list.mjs.map
|