@sme.up/ketchup 11.0.0-SNAPSHOT-20250617101849 → 11.0.0-SNAPSHOT-20250619092148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-cell-764eba4b.js → f-cell-eb60aa5f.js} +5 -5
- package/dist/cjs/{f-chip-8509759a.js → f-chip-f35c1b42.js} +1 -1
- package/dist/cjs/{f-object-field-87a0fe10.js → f-object-field-04065abd.js} +2 -2
- package/dist/cjs/{f-paginator-utils-5da86e1a.js → f-paginator-utils-3ada5c71.js} +1 -1
- package/dist/cjs/{f-text-field-0213f237.js → f-text-field-0eda27cd.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +3 -3
- package/dist/cjs/kup-autocomplete_30.cjs.entry.js +132 -127
- package/dist/cjs/kup-box.cjs.entry.js +8 -8
- package/dist/cjs/kup-calendar.cjs.entry.js +3 -3
- package/dist/cjs/kup-card-list.cjs.entry.js +2 -2
- package/dist/cjs/kup-cell.cjs.entry.js +6 -6
- package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +3 -3
- package/dist/cjs/{kup-data-table-helper-46ae95a2.js → kup-data-table-helper-0b79fb90.js} +2 -2
- package/dist/cjs/{kup-dates-bc4cf9d0.js → kup-dates-8619368a.js} +3 -7
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +2 -2
- package/dist/cjs/kup-editor.cjs.entry.js +2 -2
- package/dist/cjs/kup-family-tree.cjs.entry.js +2 -2
- package/dist/cjs/kup-gantt_10.cjs.entry.js +2 -2
- package/dist/cjs/kup-grid.cjs.entry.js +2 -2
- package/dist/cjs/kup-htm.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-input-panel.cjs.entry.js +6 -6
- package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-303caa7e.js → kup-manager-5cdad0f5.js} +26 -11
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-object-field.cjs.entry.js +4 -4
- package/dist/cjs/kup-pdf.cjs.entry.js +2 -2
- package/dist/cjs/{kup-planner-renderer-helper-63478d1c.js → kup-planner-renderer-helper-eaca3f99.js} +1 -1
- package/dist/cjs/kup-planner-renderer.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +3 -3
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +2 -2
- package/dist/cjs/kup-txt.cjs.entry.js +2 -2
- package/dist/cjs/kup-typography-list.cjs.entry.js +2 -2
- package/dist/cjs/kup-typography.cjs.entry.js +2 -2
- package/dist/collection/components/kup-data-table/kup-data-table.js +13 -11
- package/dist/collection/components/kup-tree/kup-tree.js +10 -7
- package/dist/collection/f-components/f-cell/f-cell.js +1 -1
- package/dist/collection/managers/kup-dates/kup-dates.js +3 -7
- package/dist/collection/managers/kup-objects/kup-objects.js +1 -1
- package/dist/collection/utils/cell-utils.js +18 -6
- package/dist/collection/utils/filters/filters.js +6 -3
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -2
- package/dist/components/kup-activity-timeline.js +2 -2
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +3 -3
- package/dist/components/kup-card-list.js +3 -3
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -2
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-custom-task-list-table.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +3 -3
- package/dist/components/kup-file-upload.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gantt.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +2 -2
- package/dist/components/kup-iframe.js +2 -2
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +3 -3
- package/dist/components/kup-lazy.js +2 -2
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-nav-bar.js +2 -2
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-object-field.js +2 -2
- package/dist/components/kup-pdf.js +2 -2
- package/dist/components/kup-planner-renderer.js +1 -1
- package/dist/components/kup-planner.js +6 -6
- package/dist/components/kup-probe.js +2 -2
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -2
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -2
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-task-list.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +2 -2
- package/dist/components/kup-typography-list.js +2 -2
- package/dist/components/kup-typography.js +2 -2
- package/dist/components/{p-f4c3bb2e.js → p-2b1c5b0d.js} +2 -2
- package/dist/components/{p-67ba8cd7.js → p-5579a90c.js} +1 -1
- package/dist/components/{p-f97bb2e9.js → p-5a2b1b4a.js} +192 -187
- package/dist/components/{p-2b75f42c.js → p-61165aaf.js} +2 -2
- package/dist/components/{p-4aec8478.js → p-6bb50a6c.js} +2 -2
- package/dist/components/{p-d4e63022.js → p-6d7f9cce.js} +2 -2
- package/dist/components/{p-4ca4849a.js → p-6f59cb9c.js} +2 -2
- package/dist/components/{p-fba96ad0.js → p-9615f24a.js} +4 -4
- package/dist/components/{p-1581348d.js → p-9d9181cf.js} +3 -7
- package/dist/components/{p-e5613e04.js → p-df77b97b.js} +26 -11
- package/dist/components/{p-eb660ec4.js → p-fb90a43f.js} +2 -2
- package/dist/esm/{f-cell-1e8031df.js → f-cell-21a26cc8.js} +5 -5
- package/dist/esm/{f-chip-50f0d42a.js → f-chip-663db488.js} +1 -1
- package/dist/esm/{f-object-field-9c19ce8f.js → f-object-field-afe7604f.js} +2 -2
- package/dist/esm/{f-paginator-utils-6ad84c45.js → f-paginator-utils-b6924c55.js} +1 -1
- package/dist/esm/{f-text-field-3241c025.js → f-text-field-40f1ad00.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-activity-timeline.entry.js +3 -3
- package/dist/esm/kup-autocomplete_30.entry.js +132 -127
- package/dist/esm/kup-box.entry.js +8 -8
- package/dist/esm/kup-calendar.entry.js +3 -3
- package/dist/esm/kup-card-list.entry.js +2 -2
- package/dist/esm/kup-cell.entry.js +6 -6
- package/dist/esm/kup-custom-task-list-header_4.entry.js +1 -1
- package/dist/esm/kup-dashboard.entry.js +3 -3
- package/dist/esm/{kup-data-table-helper-16a46c2f.js → kup-data-table-helper-8f020338.js} +2 -2
- package/dist/esm/{kup-dates-da19044e.js → kup-dates-77f1a451.js} +3 -7
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-editor.entry.js +2 -2
- package/dist/esm/kup-family-tree.entry.js +2 -2
- package/dist/esm/kup-gantt_10.entry.js +2 -2
- package/dist/esm/kup-grid.entry.js +2 -2
- package/dist/esm/kup-htm.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-input-panel.entry.js +6 -6
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-3c858178.js → kup-manager-b367be3b.js} +26 -11
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-object-field.entry.js +4 -4
- package/dist/esm/kup-pdf.entry.js +2 -2
- package/dist/esm/{kup-planner-renderer-helper-4952d0a1.js → kup-planner-renderer-helper-373880b5.js} +1 -1
- package/dist/esm/kup-planner-renderer.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +3 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +2 -2
- package/dist/esm/kup-txt.entry.js +2 -2
- package/dist/esm/kup-typography-list.entry.js +2 -2
- package/dist/esm/kup-typography.entry.js +2 -2
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-690109ca.entry.js → p-080bfe3a.entry.js} +1 -1
- package/dist/ketchup/{p-fabd3485.entry.js → p-0aa31cb0.entry.js} +1 -1
- package/dist/ketchup/{p-21add9e1.entry.js → p-0befe9d2.entry.js} +1 -1
- package/dist/ketchup/{p-63c8127b.entry.js → p-15999be8.entry.js} +1 -1
- package/dist/ketchup/{p-81f0b415.entry.js → p-1f02c1b0.entry.js} +1 -1
- package/dist/ketchup/{p-4c683120.entry.js → p-22530697.entry.js} +1 -1
- package/dist/ketchup/{p-3b818fd2.js → p-2e012afe.js} +1 -1
- package/dist/ketchup/{p-9325326d.entry.js → p-360dcb21.entry.js} +1 -1
- package/dist/ketchup/{p-d9d152d6.entry.js → p-39ec628e.entry.js} +1 -1
- package/dist/ketchup/{p-ce919d31.entry.js → p-470a942f.entry.js} +1 -1
- package/dist/ketchup/{p-c8459cf2.entry.js → p-4d163a30.entry.js} +1 -1
- package/dist/ketchup/{p-03786bb6.js → p-51cc836a.js} +1 -1
- package/dist/ketchup/{p-0f9b546a.js → p-5f645f29.js} +1 -1
- package/dist/ketchup/{p-fd42fcb6.entry.js → p-63208a5a.entry.js} +1 -1
- package/dist/ketchup/{p-47aa82ec.entry.js → p-71855dfb.entry.js} +1 -1
- package/dist/ketchup/{p-18525574.entry.js → p-75bc6e7e.entry.js} +1 -1
- package/dist/ketchup/{p-d76e2ae3.entry.js → p-93181191.entry.js} +1 -1
- package/dist/ketchup/{p-7b3d54ff.entry.js → p-941beedb.entry.js} +1 -1
- package/dist/ketchup/{p-2944f753.entry.js → p-96830f9e.entry.js} +1 -1
- package/dist/ketchup/{p-d7aaf032.entry.js → p-9940f67c.entry.js} +1 -1
- package/dist/ketchup/{p-5a28e60b.entry.js → p-9a980aef.entry.js} +1 -1
- package/dist/ketchup/{p-f2c81186.entry.js → p-a6c7a579.entry.js} +1 -1
- package/dist/ketchup/p-b1a34635.js +1 -0
- package/dist/ketchup/p-b39c7a22.js +1 -0
- package/dist/ketchup/{p-2031c804.entry.js → p-b7ba14cb.entry.js} +1 -1
- package/dist/ketchup/{p-f2bccdba.entry.js → p-b9350213.entry.js} +1 -1
- package/dist/ketchup/{p-81eb143d.entry.js → p-b99d2f17.entry.js} +1 -1
- package/dist/ketchup/{p-8d506556.js → p-c109ce22.js} +1 -1
- package/dist/ketchup/{p-a7e95b7e.entry.js → p-c2f3c9dd.entry.js} +1 -1
- package/dist/ketchup/{p-fa811d2e.entry.js → p-c473cfbe.entry.js} +1 -1
- package/dist/ketchup/{p-1ee561ba.js → p-cabebabc.js} +1 -1
- package/dist/ketchup/{p-b2d2d305.entry.js → p-ce257bfa.entry.js} +1 -1
- package/dist/ketchup/{p-6e28af6d.entry.js → p-d239b4f4.entry.js} +1 -1
- package/dist/ketchup/p-d49f1a0d.js +1 -0
- package/dist/ketchup/{p-b1359441.js → p-d696e519.js} +1 -1
- package/dist/ketchup/{p-ba826996.entry.js → p-e481fd5a.entry.js} +1 -1
- package/dist/ketchup/{p-f0e47ce4.entry.js → p-ec45b174.entry.js} +1 -1
- package/dist/ketchup/{p-a6c17954.entry.js → p-f2bfb53c.entry.js} +1 -1
- package/dist/ketchup/p-f515bf36.entry.js +8 -0
- package/dist/ketchup/{p-ee6f28dc.entry.js → p-f705b5f6.entry.js} +1 -1
- package/dist/ketchup/{p-39105c98.entry.js → p-fac09a35.entry.js} +1 -1
- package/dist/types/managers/kup-dates/kup-dates.d.ts +2 -2
- package/package.json +1 -1
- package/dist/ketchup/p-035efede.js +0 -1
- package/dist/ketchup/p-5400fd64.js +0 -1
- package/dist/ketchup/p-8e1f40c4.entry.js +0 -8
- package/dist/ketchup/p-b2ef8707.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,g as l}from"./p-710d0a7d.js";import{d as t}from"./p-
|
|
1
|
+
import{h as e,g as l}from"./p-710d0a7d.js";import{d as t}from"./p-d696e519.js";import{F as i}from"./p-3cab6420.js";const n=document.documentElement,d=(l,t)=>{var i,n;const d={"f-text-field":!0,"kup-danger":l.danger,"kup-full-height":l.fullHeight,"kup-full-width":l.fullWidth,"kup-info":l.info,"kup-light-mode":l.lightMode,"kup-secondary":l.secondary,"kup-shaped":l.shaped,"kup-success":l.success,"kup-warning":l.warning,[`f-text-field--${l.sizing||"small"}`]:!0,[l.wrapperClass]:!!l.wrapperClass},a=function(l){if(!1!==l.helperEnabled&&(l.error||l.alert)&&!l.legacyLook)return e("div",{class:"mdc-text-field-helper-line"},l.helper?e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!l.helperWhenFocused}},l.helper):l.error?e("span",{class:"mdc-error-message"},l.error):l.alert?e("span",{class:"mdc-alert-message"},l.alert):void 0)}(l),s=null===(n=null===(i=l.attachHelperSection)||void 0===i?void 0:i.call(l,a))||void 0===n||n;return e("div",Object.assign({class:d},l.dataSet,{id:l.id,title:l.title}),l.leadingLabel||l.trailingLabel?e("div",{class:"mdc-form-field "+(l.leadingLabel?"mdc-form-field--align-end":"")},[o(l),s?a:null,e("label",null,l.label)]):[o(l),s?a:null],t)};function o(d){var o,s,c,r,u,m,f;const p=d.textArea||d.outlined;let v,x,g,k;if(d.maxLength>=256&&(d.textArea=!0),!d.label||d.leadingLabel||d.trailingLabel||d.legacyLook||(v=e("div",{class:"mdc-text-field__label-container"},e("label",{class:"mdc-label",htmlFor:"kup-input"},d.label),d.maxLength&&d.showCounter?e("div",{class:"mdc-text-field__label-character-counter"},d.value.length," / ",d.maxLength):void 0)),d.icon){let i,n="";if(Object.values(t).indexOf(d.icon)>-1)n=d.icon.replace("--","");else{let e=`url('${l(`./assets/svg/${d.icon}.svg`)}') no-repeat center`;i={mask:e,webkitMask:e}}x=e("span",{style:i,onClick:d.onIconClick,class:`mdc-text-field__icon kup-icon action ${n}`})}if(d.quantityButtons){const t=`url('${l("./assets/svg/minus.svg")}') no-repeat center`,i=`url('${l("./assets/svg/plus.svg")}') no-repeat center`,n={mask:i,webkitMask:i};g=e("span",{style:{mask:t,webkitMask:t},class:"mdc-text-field__icon kup-icon action"}),k=e("span",{style:n,class:"mdc-text-field__icon kup-icon action"})}const b={color:d.error?"var(--kup-danger-color-60)":"var(--kup-warning-color-50)",resource:d.error?"error":"warning",sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"kup-icon"},h={"mdc-text-field-container":!0,"mdc-text-field-container--disabled":d.disabled},w={"is-clearable":d.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":d.disabled,"mdc-text-field--read-only":d.readOnly,"mdc-text-field--read-only-is-select":d.isSelect,"mdc-text-field--filled":!d.fullWidth&&!p,"mdc-text-field--no-label":!d.label,"mdc-text-field--fullwidth":d.fullWidth,"mdc-text-field--lightmode":d.lightMode,"mdc-text-field--outlined":p,"mdc-text-field--textarea":d.textArea,"mdc-text-field--with-leading-icon":d.icon&&!d.trailingIcon,"mdc-text-field--with-trailing-icon":d.icon&&d.trailingIcon,"mdc-text-field--with-quantity-buttons":d.quantityButtons,"mdc-text-field--error":Boolean(d.error),"mdc-text-field--alert":Boolean(d.alert),"mdc-text-field--legacy-look mdc-text-field--extra-small":d.legacyLook,[`mdc-text-field--${d.sizing||"small"}`]:!d.textArea&&!d.legacyLook,[`mdc-text-field--textarea--${d.sizing||"small"}`]:d.textArea,"top-right-indicator":d.showMarker};let _=d.value,y=d.quantityButtons?"number":null!==(o=d.inputType)&&void 0!==o?o:"text",C=!1;if("number"===d.inputType&&(y="text",d.inputMode="numeric",C=!0),"number"===d.inputType){const e={allowNegative:null===(s=d.allowNegative)||void 0===s||s,decimal:d.decimals,group:null===(c=d.group)||void 0===c||c,integer:(null!==(r=d.integers)&&void 0!==r?r:0)-(null!==(u=d.decimals)&&void 0!==u?u:0)};_=a(_,e,!1)}return e("div",{class:h},d.fullWidth?void 0:v,e("div",{class:w},d.trailingIcon?void 0:x,d.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:d.disabled,maxlength:d.maxLength,value:_,autoComplete:null!==(m=d.autocomplete)&&void 0!==m?m:"off",onBlur:d.onBlur,onClick:d.onClick,onChange:d.onChange,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown})):e("input",{type:y,inputmode:d.inputMode?d.inputMode:void 0,step:d.step,min:d.min,max:d.max,name:d.name,class:"mdc-text-field__input",disabled:d.disabled,placeholder:d.placeholder,maxlength:d.maxLength,size:d.size,value:_,readOnly:d.isSelect,autoComplete:null!==(f=d.autocomplete)&&void 0!==f?f:"off",onBlur:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=a(e.target.value,o,!0)}d.onBlur&&d.onBlur(e)},onChange:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=null!=d.min&&d.min>parseFloat(e.target.value)?a(d.min.toString(),o,!0):null!=d.max&&d.max<parseFloat(e.target.value)?a(d.max.toString(),o,!0):a(e.target.value,o,!0)}else null!=d.min&&d.min>parseFloat(e.target.value)?e.target.value=d.min.toString():null!=d.max&&d.max<parseFloat(e.target.value)&&(e.target.value=d.max.toString());d.onChange&&d.onChange(e)},onClick:d.onClick,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown,onKeyPress:e=>{var l,t,i,o,a;if(!C)return;if(e.ctrlKey)return;if(e.key.length>1)return;if(("."===e.key||","===e.key)&&"NumpadDecimal"===e.code){const t=e.target,i=null!==(l=t.selectionStart)&&void 0!==l?l:0,d=n.ketchup.math.decimalSeparator();return t.value.includes(d)||(t.value=t.value.slice(0,i)+d+t.value.slice(i),t.setSelectionRange(i+1,i+1)),void e.preventDefault()}const s={allowNegative:null===(t=d.allowNegative)||void 0===t||t,decimal:d.decimals,group:null===(i=d.group)||void 0===i||i,integer:(null!==(o=d.integers)&&void 0!==o?o:0)-(null!==(a=d.decimals)&&void 0!==a?a:0)};let c=e.target,r=c.value,u=r.substring(0,c.selectionStart),m=r.substring(c.selectionEnd,c.selectionEnd+r.length-1);n.ketchup.math.matchNumericValueWithOptions(u+e.key+m,s)||e.preventDefault()}}),d.trailingIcon?x:void 0,d.helperIcon&&d.error?e("div",{class:"mdc-error-icon"},e(i,Object.assign({},b))):d.helperIcon&&d.alert?e("div",{class:"mdc-alert-icon"},e(i,Object.assign({},b))):void 0,d.quantityButtons&&e("div",{class:"mdc-quantity-buttons"},e("button",{onClick:d.onMinusClick},g),e("button",{onClick:d.onPlusClick},k)),d.isClearable&&d.value?e("span",{class:`mdc-text-field__icon kup-icon ${t.CLEAR.replace("--","")}`,onClick:d.onClearIconClick}):void 0))}const a=function(e,l,t){let i=e;return i?"-"==i?"":n.ketchup.math.format(i,n.ketchup.math.createFormatPattern(l.group,l.decimal),t):i};export{d as F}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as t,d as e}from"./p-710d0a7d.js";import{k as o}from"./p-
|
|
1
|
+
import{r as i,h as t,d as e}from"./p-710d0a7d.js";import{k as o}from"./p-d696e519.js";import"./p-cabebabc.js";const n=class{constructor(t){i(this,t),this.kupManager=o(),this.config=void 0,this.qlik=void 0,this.appid="",this.app=!1,this.grid=[],this.debug=!1,this.fluid=!1,this.bordered=!1,this.defobjsize="400px",this.divlist=[]}getObjects(i){let t;return new Promise((e=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=!1,i.noSelections&&(t=i.noSelections),this.app.getObject(i.obj,i.obj,{noInteraction:!1,noSelections:t})}))})),e(!0)}))}doSelection(i){return new Promise((t=>{i.selections&&i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,!1,!0)})),t(!0)}))}setRender(i){return new Promise((e=>{this.divlist=[],i.rows.forEach((i=>{let e=[];i.columns.forEach((i=>{let o="qvobject ";this.bordered&&(o+="bordered "),o=o+"width-"+i.colDim+" size-"+i.size,e.push(t("div",""!=i.obj?{id:i.obj,class:o}:{class:o}))})),this.divlist.push(t("div",{class:"kup-qlik-row"},e))})),e(!0)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.setRender(this.grid)}render(){let i=null,e=null;return i=this.fluid?{"kup-qlik-container-fluid":!0}:{"kup-qlik-container":!0},e={"--lyo_obj-height":this.defobjsize},t("div",{key:"7236345f4434c1756ebe81fab298f2cd5c1dc517",class:i,style:e},this.divlist)}componentDidRender(){this.debug&&console.log("Grid",this.grid),this.qlik&&(""==this.appid||this.app?this.debug&&console.log("App already open:",this.app):this.app=this.qlik.openApp(this.appid,this.config),this.app&&this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))),this.kupManager.debug.logRender(this,!0)}get rootElement(){return e(this)}};n.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height) / 2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height) / 3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height) * 2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height) * 3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-subtle, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";export{n as kup_qlik}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,f as forceUpdate,h,H as Host,d as getElement}from"./p-710d0a7d.js";import{k as kupManagerInstance,g as getProps,s as setProps}from"./p-
|
|
1
|
+
import{r as registerInstance,c as createEvent,f as forceUpdate,h,H as Host,d as getElement}from"./p-710d0a7d.js";import{k as kupManagerInstance,g as getProps,s as setProps}from"./p-d696e519.js";import{c as componentWrapperId}from"./p-635bb4b3.js";import{e as getAugmentedNamespace,f as commonjsRequire,g as getDefaultExportFromCjs}from"./p-cabebabc.js";var KupPdfProps;!function(t){t.pdfPath="This is the path to the PDF file."}(KupPdfProps||(KupPdfProps={}));var pdf={exports:{}};const _nodeResolve_empty={},_nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty}),require$$0=getAugmentedNamespace(_nodeResolve_empty$1);
|
|
2
2
|
/**
|
|
3
3
|
* @licstart The following is the entire license notice for the
|
|
4
4
|
* JavaScript code in this page
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,f as i,h as a,H as h,d as n}from"./p-710d0a7d.js";import{k as o,g as p,s}from"./p-
|
|
1
|
+
import{r as e,c as t,f as i,h as a,H as h,d as n}from"./p-710d0a7d.js";import{k as o,g as p,s}from"./p-d696e519.js";import{c as l}from"./p-635bb4b3.js";import"./p-cabebabc.js";var f,c;!function(e){e.componentName="Sets the tag name of the component to be lazy loaded.",e.customStyle="Custom style of the component.",e.data="Sets the data of the component to be lazy loaded.",e.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(f||(f={})),function(e){e.VIEWPORT="viewport",e.PROPS="props",e.BOTH="both"}(c||(c={}));const d=class{constructor(i){e(this,i),this.kupLazyLoaded=t(this,"kup-lazy-loaded",6),this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1,this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0}async getProps(e){return p(this,f,e)}async getComponent(){return this.lazyComponent}async refresh(){i(this)}async setProps(e){s(this,f,e)}setObserver(){this.intObserver=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let e,t,i=this.componentName;switch(this.componentName){case"kup-button":t=a("svg",{key:"84441d91eab6e908ce1f818a39012aa9d93727db",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"10334ec35ef0ea660aeba30e89d1d9894b146842",d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":t=a("svg",{key:"83bff26b5e411428eda627b06586956a651928c5",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"c8070db0bd5b0677acd12de3553809807a5f9480",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":t=a("svg",{key:"4cad10dbb2891ee15e2aad60059a099e8c8b5052",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"07c2b48360ac15eb5b4af9500cb58b32f1569fe8",d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":t=a("svg",{key:"7ce0fc901574a18c887bd9db40419ed88b16ffaf",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"a9c35db9e33b63c170420a2bff9aae04b5e86506",d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":t=a("svg",{key:"ed2fe97af2e01baedeb74b3cbb1c59541e3f142d",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"113686289a5b06df1b38e5d5ee2d3c268efece2e",d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":t=a("svg",{key:"4fa959e702a2fd47919f88b4fda087034d9a7307",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"34665a60cf6acb5b55d611697f0d4f0a77b137e8",d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":t=a("svg",{key:"3887ccebf6e70456f254d52223e2352cc3b8ac79",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"08eac228673fea4850d933f819875cadd3ea84e4",d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":t=a("svg",{key:"8c61b17ed9ae50dd7720f96018f7740e03f8fdc8",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"549ba0f9cf9531fedb9a9400121e6bf349c17a40",d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:t=a("svg",{key:"cf501912cc1cc75d18ee6fef424b52c244d51be5",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"368d881a5a5805e2f80dcf135379c074ac008026",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(e=a(this.componentName,Object.assign({key:"181aa39e4fb8b24cf83d5230d63733bac4e92cfe"},this.data,{ref:e=>this.lazyComponent=e})),i+=" kup-loaded"):this.showPlaceholder&&(e=t,i+=" kup-to-be-loaded"),a(h,{key:"9d13fe0e7909c693fcf53baa020fea3a629f3e4f",class:i},a("style",{key:"88f3f47b308e71e40e9df71d39d823a4e7bb0073"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"94b51fe14d65d9fb766555e3a22247f2db18011b",id:l},e))}disconnectedCallback(){var e;this.kupManager.theme.unregister(this),null===(e=this.intObserver)||void 0===e||e.unobserve(this.rootElement)}get rootElement(){return n(this)}};d.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,f as i,h as e,H as a,d as o}from"./p-710d0a7d.js";import{k as s,g as n,s as l,b as p,h,aE as c,W as r,aF as f,_ as u,f as d}from"./p-
|
|
1
|
+
import{r as t,f as i,h as e,H as a,d as o}from"./p-710d0a7d.js";import{k as s,g as n,s as l,b as p,h,aE as c,W as r,aF as f,_ as u,f as d}from"./p-d696e519.js";import{a as g}from"./p-e3062c19.js";import{F as b}from"./p-3cab6420.js";import{c as m}from"./p-635bb4b3.js";import"./p-cabebabc.js";var k,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(k||(k={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.dragHandler=null,this.kupManager=s(),this.textArea=null,this.wrapperRef=null,this.display=x.DATATABLE,this.customStyle="",this.data=null}async getProps(t){return n(this,k,t)}async refresh(){i(this)}async setProps(t){l(this,k,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(p.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],a={};if(this.display===x.JSON)a.initialValue=this.data?JSON.stringify(this.data,null,2):"",a.textArea=!0,i.push(e("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},a,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:a.data=this.data,i.push(e("kup-box",Object.assign({},a)));break;case x.BUTTON_LIST:a.data=this.data,i.push(e("kup-button-list",Object.assign({},a)));break;case x.CHIP:a.data=this.data,i.push(e("kup-chip",Object.assign({},a)));break;case x.CHART:case x.ECHART:a.data=this.data,a.series=[],a.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==a.axis?a.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):a.axis=i.name}0===a.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",h.WARNING),a.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",h.WARNING),i.push(e(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},a)));break;case x.DATATABLE:a.data=this.data,a.autoFillMissingCells=!0,i.push(e("kup-data-table",Object.assign({},a)));break;case x.TREE:a.data=this.data,i.push(e("kup-tree",Object.assign({class:"kup-full-width"},a)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",h.ERROR)}else i.push(e("div",{class:"empty"},e(b,{sizeY:"100px",resource:"move_to_inbox"}),e("div",{class:"empty-text"},this.kupManager.language.translate(p.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),e=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,a=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(e&&e.name?i.columns?this.data.columns.find((t=>t.name===e.name))||i.columns.push(e):i.columns=[e]:this.kupManager.debug.logMessage(this,"Invalid column received.",h.WARNING),a&&(i.rows?i.rows.push(a):i.rows=[a]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(c,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${r}],[${f}]`},{dispatcher:this.rootElement,type:u.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return e(a,{key:"049f73db70f0df4456d136a8383a0f24c32ecfb0"},e("style",{key:"f7470272b8a440ede1bf7b1147db8afbc4c16e19"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"514758bda9c86f6ab4ad5ad06e14071390f60c52",id:m},e("div",{key:"2973d700bf1c69bed18234382bbe083ce8fec6bd",class:"magic-box-wrapper"},e("div",{key:"74ddedc45c79c40fd9d8cd230132815a49f2e86c",class:"actions",id:"drag-handle"},e("kup-combobox",Object.assign({key:"4dba787214f406e9d98e31f8fa077aaf678f89b4"},this.comboboxProps())),e("kup-button",{key:"6543ebe8eb0fa8370bf6c8fdde25ef77e4277fd1",styling:g.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),e("kup-button",{key:"cd213e74351b84db677449f24a34a236244ede9c",id:"close-dialog",customStyle:`:host{${d.PRIMARY}: var(${d.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),e("div",{key:"6268986dab2a1147309e1dd651c455799ec53091",class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-subtle);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,H as t,D as n,ai as l,x as o,z as r,aj as i,ak as s,N as a,O as u,F as c,al as f,am as h,an as d,ao as b,ap as m,a8 as p}from"./p-b1359441.js";import{K as v}from"./p-1ee561ba.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,n){let l="";if(null==e)return l;let o=e[t];return null==o||(l=n?o.textFieldTmp:o.textField),l}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,n){if(!t)return!1;let l=this._getTextFilterValue(e,t.name,n);if(null!=l&&""!=l.trim())return!0;let o=this.getCheckBoxFilterValues(e,t.name);return!(null==o||o.length<1)}getCheckBoxFilterValues(e={},t){let n=[];if(null==e)return n;let l=e[t];return null==l||null==l.checkBoxes||(n=l.checkBoxes),n}addCheckboxFilter(t={},n,l){if(null==t)return;let o=t[n];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},t[n]=o),null==o.checkBoxes&&(o.checkBoxes=[]),null==l||null==l.value?o.checkBoxes=[]:e.valuesArrayContainsValue(o.checkBoxes,l.value)||(o.checkBoxes[o.checkBoxes.length]=l)}removeCheckboxFilter(e={},t,n){var l;if(!e||null==n||!e[t])return;const o=e[t];o.checkBoxes=null!==(l=o.checkBoxes)&&void 0!==l?l:[],o.checkBoxes=o.checkBoxes.filter((e=>e.value!==n)),0===o.checkBoxes.length&&delete e[t]}isColumnNumeric(e){return this.isObjNumeric(e.obj)}setTextFieldFilterValue(e={},t,n){this._setTextFieldFilterValue(e,t,n,!0)}_setTextFieldFilterValue(e={},t,n,l){if(null==e)return;let o=e[t];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},e[t]=o),l?o.textFieldTmp=null!=n?n.trim():n:o.textField=null!=n?n.trim():n}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0)}getFilterValueForTooltip(e={},l){let o=this.getTextFilterValue(e,l.name),r=this.getCheckBoxFilterValues(e,l.name),i="",s=t(o,l.obj,l.decimals);""!=o&&(i=" AND "),i="";let a="";return r.forEach((e=>{a+=i+n(e,l),i=" OR "})),""!=a&&(a="("+a+")",""!=s&&(a=" AND "+a)),a=s+a,a}removeFilter(e={},t){delete e[t]}}var F;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(F||(F={}));const x="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const j=document.documentElement,k=j.ketchup?j.ketchup.objects:new r,O=j.ketchup?j.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t,n){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,n)}isFilterCompliantForCellObj(e,t,n){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,n)}isRowCompliant(e,t={},n="",l=!1,o=[],r,i){return this.areCellsCompliant(e.cells,t,n,l,o,r,i)}areCellsCompliant(e,t={},n="",r=!1,i=[],s,a){if(r){let t=!0;if(i&&null!=i&&i.length>0){t=!1;let o=this.filterIsNegative(n);for(let s=0;s<i.length;s++){if(!1===i[s].visible&&!a||(null==a?void 0:a.length)>0&&!a.includes(i[s].name))continue;const u=e[i[s].name];if(null==u)continue;t=this.isFilterCompliantForValue(u.value,n,r);let c=l(i[s],u);if(c!=u.value&&(t=t||this.isFilterCompliantForValue(c,n,r)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}return null==s&&(s=new w),!this.hasFilters(t,i,s)||Object.keys(t).every((n=>{const l=e[n],r=o(i,n);if(!l)return!1;let a=s.getTextFilterValue(t,n),u=s.getCheckBoxFilterValues(t,n);const c=this.filterIsNegative(a);let f=""!==a&&this.isFilterCompliantForCell(l,a,!0)||u.some((e=>this.isFilterCompliantForCell(l,e.value)))||u.some((e=>this.isFilterCompliantForCell(l,e.displayedValue)))||!s.hasFiltersForColumn(t,r),h=c;return k.isNumber(l.obj)||k.isDate(l.obj)||k.isTime(l.obj)||k.isTimestamp(l.obj)||(h=""!==a&&this.isFilterCompliantForCellObj(l,a,!0)||u.some((e=>this.isFilterCompliantForCellObj(l,e.value)))||!s.hasFiltersForColumn(t,r)),c?f&&h:f||h}))}hasFilters(e={},t,n){if(null==e)return!1;let l=Object.keys(e);if(null==l||l.length<1)return!1;null==n&&(n=new w);for(let r=0;r<l.length;r++){let i=l[r],s=null;if(s=i===x?{name:x,title:""}:o(t,i),n.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},n="",l=[],o,r){if(!e||null==e)return[];let i=[];const s=!(!n||!l);if(this.hasFilters(t,l,o)||s)for(let a=0;a<e.length;a++){let u=e[a];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,s,l,o,r))&&(i[i.length]=u)}else i=[...e];return i}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),a=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(a,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let u=Object.assign({},n.filters);u[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),u,o,n.getVisibleColumns(),r);for(let e=0;e<a.length;e++)i.push(a[e]);return O.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r,i){return null==r&&(r=new y),r.filterRows(e,t,n,l,o,i)}function N(e=[],t=[],n=[],r={}){if(!t)return[];if(!n||0===n.length||!e||0===e.length)return t;const i={},s=n.filter((({column:t})=>{for(let{name:n,title:l}of e)if(n===t)return i[n]=l,!0;return!1}));if(0===s.length)return t;const u=[];let c={};return t.forEach((t=>{const n=s[0].column,f=t.cells[n];if(f){const h=o(e,n),d=l(h,f),b=f.value;let m=null;for(let e of u)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:n,columnLabel:i[n],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},u.push(m));for(let n=1;n<s.length;n++){const r=s[n],a=t.cells[r.column];if(a){const t=o(e,r.column),n=l(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===n){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case a.COUNT:let t=e.group.totals[o]||0;e.group.totals[o]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[o]||0;s.group.totals[o]=++e,s=s.group.parent}break;case a.DISTINCT:let u;if(u=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(u):(l[e.group.id][o]=[],l[e.group.id][o].push(u))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(u);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(u):(l[c.group.id][o]=[],l[c.group.id][o].push(u))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(u);c=c.group.parent}break;case a.SUM:case a.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case a.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;case a.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(a.MATH)&&console.warn(`invalid total mode: ${i}`)}}}))}(m,r,t,c)}})),function(e,t,n){if(!e||!t)return;const l=Object.keys(t);if(0===e.length||!e[0].group||0===l.length)return;let o=l.filter((e=>a.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,o,n)))}(u,r,c),W(u,a.AVERAGE,r),W(u,a.MATH,r),u}function W(e,t,n){if(!e||!n)return;const l=Object.keys(n);if(0===e.length||!e[0].group||0===l.length)return;let o;t==a.AVERAGE&&(o=l.filter((e=>a.AVERAGE===n[e]))),t==a.MATH&&(o=l.filter((e=>0==n[e].indexOf(a.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,o,n)))}function D(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{D(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function E(e,t,n,l){const o=e.group.children;if(0===o.length)return 0;let r=0;return o[0].group?o.forEach((e=>{r+=E(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==a.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==a.MATH){let t=l[n].substring(a.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function A(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p,k:n.value})}}))})),n}}function B(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===a.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(a.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===a.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(u(a.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=_(s.group.children,a.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=a)}else o>=n&&(t[t.length]=a,r=!0),o++;if(o>=n+l)break}return{ci:o,added:r}}function R(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:I(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function z(e){if(null==e)return null;let t=[];for(let n=0;n<e.length;n++)t[t.length]=R(e[n]);return t}function I(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:z(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function $(e,t,n=!1){const l={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const o of t.rows){const t={cells:{},id:o.id};for(const n of l.columns){const l=n.name,r=o.cells[l],i=e.rows.find((e=>e.id===o.id)),s=i?i.cells[l]:null;(!s&&r.value||s&&r.value!==s.value)&&(t.cells[l]=r)}(Object.keys(t.cells).length>0||n)&&l.rows.push(t)}return l}function q(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var n;let l=e.cells[t];const o=l.value,r=l.decode,i=l.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const s={[c.AUTOCOMPLETE]:()=>f(o,"",i),[c.COMBOBOX]:()=>f(o,"",i),[c.RADIO]:()=>h(o,i),[c.CHECKBOX]:()=>d(o,""),[c.CHIP]:()=>b(o,r),[c.SWITCH]:()=>m(o,""),[c.MULTI_AUTOCOMPLETE]:()=>b(o,r),[c.MULTI_COMBOBOX]:()=>b(o,r)}[l.shape];s&&(l.data=Object.assign(Object.assign({},s()),l.data))}))}))}export{w as F,g as K,y as a,N as b,B as c,q as d,F as e,M as f,$ as g,A as n,S as p,C as s,x as t}
|
|
1
|
+
import{E as e,H as t,D as n,ai as l,x as o,z as r,aj as i,ak as s,N as a,O as u,F as c,al as f,am as h,an as d,ao as b,ap as m,a8 as p}from"./p-d696e519.js";import{K as v}from"./p-cabebabc.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,n){let l="";if(null==e)return l;let o=e[t];return null==o||(l=n?o.textFieldTmp:o.textField),l}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,n){if(!t)return!1;let l=this._getTextFilterValue(e,t.name,n);if(null!=l&&""!=l.trim())return!0;let o=this.getCheckBoxFilterValues(e,t.name);return!(null==o||o.length<1)}getCheckBoxFilterValues(e={},t){let n=[];if(null==e)return n;let l=e[t];return null==l||null==l.checkBoxes||(n=l.checkBoxes),n}addCheckboxFilter(t={},n,l){if(null==t)return;let o=t[n];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},t[n]=o),null==o.checkBoxes&&(o.checkBoxes=[]),null==l||null==l.value?o.checkBoxes=[]:e.valuesArrayContainsValue(o.checkBoxes,l.value)||(o.checkBoxes[o.checkBoxes.length]=l)}removeCheckboxFilter(e={},t,n){var l;if(!e||null==n||!e[t])return;const o=e[t];o.checkBoxes=null!==(l=o.checkBoxes)&&void 0!==l?l:[],o.checkBoxes=o.checkBoxes.filter((e=>e.value!==n)),0===o.checkBoxes.length&&delete e[t]}isColumnNumeric(e){return this.isObjNumeric(e.obj)}setTextFieldFilterValue(e={},t,n){this._setTextFieldFilterValue(e,t,n,!0)}_setTextFieldFilterValue(e={},t,n,l){if(null==e)return;let o=e[t];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},e[t]=o),l?o.textFieldTmp=null!=n?n.trim():n:o.textField=null!=n?n.trim():n}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0)}getFilterValueForTooltip(e={},l){let o=this.getTextFilterValue(e,l.name),r=this.getCheckBoxFilterValues(e,l.name),i="",s=t(o,l.obj,l.decimals);""!=o&&(i=" AND "),i="";let a="";return r.forEach((e=>{a+=i+n(e,l),i=" OR "})),""!=a&&(a="("+a+")",""!=s&&(a=" AND "+a)),a=s+a,a}removeFilter(e={},t){delete e[t]}}var F;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(F||(F={}));const x="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const j=document.documentElement,k=j.ketchup?j.ketchup.objects:new r,O=j.ketchup?j.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t,n){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,n)}isFilterCompliantForCellObj(e,t,n){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,n)}isRowCompliant(e,t={},n="",l=!1,o=[],r,i){return this.areCellsCompliant(e.cells,t,n,l,o,r,i)}areCellsCompliant(e,t={},n="",r=!1,i=[],s,a){if(r){let t=!0;if(i&&null!=i&&i.length>0){t=!1;let o=this.filterIsNegative(n);for(let s=0;s<i.length;s++){if(!1===i[s].visible&&!a||(null==a?void 0:a.length)>0&&!a.includes(i[s].name))continue;const u=e[i[s].name];if(null==u)continue;t=this.isFilterCompliantForValue(u.value,n,r);let c=l(i[s],u);if(c!=u.value&&(t=t||this.isFilterCompliantForValue(c,n,r)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}return null==s&&(s=new w),!this.hasFilters(t,i,s)||Object.keys(t).every((n=>{const l=e[n],r=o(i,n);if(!l)return!1;let a=s.getTextFilterValue(t,n),u=s.getCheckBoxFilterValues(t,n);const c=this.filterIsNegative(a);let f=""!==a&&this.isFilterCompliantForCell(l,a,!0)||u.some((e=>this.isFilterCompliantForCell(l,e.value)))||u.some((e=>this.isFilterCompliantForCell(l,e.displayedValue)))||!s.hasFiltersForColumn(t,r),h=c;return k.isNumber(l.obj)||k.isDate(l.obj)||k.isTime(l.obj)||k.isTimestamp(l.obj)||(h=""!==a&&this.isFilterCompliantForCellObj(l,a,!0)||u.some((e=>this.isFilterCompliantForCellObj(l,e.value)))||!s.hasFiltersForColumn(t,r)),c?f&&h:f||h}))}hasFilters(e={},t,n){if(null==e)return!1;let l=Object.keys(e);if(null==l||l.length<1)return!1;null==n&&(n=new w);for(let r=0;r<l.length;r++){let i=l[r],s=null;if(s=i===x?{name:x,title:""}:o(t,i),n.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},n="",l=[],o,r){if(!e||null==e)return[];let i=[];const s=!(!n||!l);if(this.hasFilters(t,l,o)||s)for(let a=0;a<e.length;a++){let u=e[a];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,s,l,o,r))&&(i[i.length]=u)}else i=[...e];return i}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),a=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(a,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let u=Object.assign({},n.filters);u[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),u,o,n.getVisibleColumns(),r);for(let e=0;e<a.length;e++)i.push(a[e]);return O.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r,i){return null==r&&(r=new y),r.filterRows(e,t,n,l,o,i)}function N(e=[],t=[],n=[],r={}){if(!t)return[];if(!n||0===n.length||!e||0===e.length)return t;const i={},s=n.filter((({column:t})=>{for(let{name:n,title:l}of e)if(n===t)return i[n]=l,!0;return!1}));if(0===s.length)return t;const u=[];let c={};return t.forEach((t=>{const n=s[0].column,f=t.cells[n];if(f){const h=o(e,n),d=l(h,f),b=f.value;let m=null;for(let e of u)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:n,columnLabel:i[n],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},u.push(m));for(let n=1;n<s.length;n++){const r=s[n],a=t.cells[r.column];if(a){const t=o(e,r.column),n=l(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===n){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case a.COUNT:let t=e.group.totals[o]||0;e.group.totals[o]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[o]||0;s.group.totals[o]=++e,s=s.group.parent}break;case a.DISTINCT:let u;if(u=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(u):(l[e.group.id][o]=[],l[e.group.id][o].push(u))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(u);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(u):(l[c.group.id][o]=[],l[c.group.id][o].push(u))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(u);c=c.group.parent}break;case a.SUM:case a.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case a.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;case a.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(a.MATH)&&console.warn(`invalid total mode: ${i}`)}}}))}(m,r,t,c)}})),function(e,t,n){if(!e||!t)return;const l=Object.keys(t);if(0===e.length||!e[0].group||0===l.length)return;let o=l.filter((e=>a.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,o,n)))}(u,r,c),W(u,a.AVERAGE,r),W(u,a.MATH,r),u}function W(e,t,n){if(!e||!n)return;const l=Object.keys(n);if(0===e.length||!e[0].group||0===l.length)return;let o;t==a.AVERAGE&&(o=l.filter((e=>a.AVERAGE===n[e]))),t==a.MATH&&(o=l.filter((e=>0==n[e].indexOf(a.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,o,n)))}function D(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{D(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function E(e,t,n,l){const o=e.group.children;if(0===o.length)return 0;let r=0;return o[0].group?o.forEach((e=>{r+=E(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==a.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==a.MATH){let t=l[n].substring(a.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function A(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p,k:n.value})}}))})),n}}function B(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===a.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(a.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===a.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(u(a.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=_(s.group.children,a.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=a)}else o>=n&&(t[t.length]=a,r=!0),o++;if(o>=n+l)break}return{ci:o,added:r}}function R(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:I(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function z(e){if(null==e)return null;let t=[];for(let n=0;n<e.length;n++)t[t.length]=R(e[n]);return t}function I(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:z(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function $(e,t,n=!1){const l={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const o of t.rows){const t={cells:{},id:o.id};for(const n of l.columns){const l=n.name,r=o.cells[l],i=e.rows.find((e=>e.id===o.id)),s=i?i.cells[l]:null;(!s&&r.value||s&&r.value!==s.value)&&(t.cells[l]=r)}(Object.keys(t.cells).length>0||n)&&l.rows.push(t)}return l}function q(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var n;let l=e.cells[t];const o=l.value,r=l.decode,i=l.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const s={[c.AUTOCOMPLETE]:()=>f(o,"",i),[c.COMBOBOX]:()=>f(o,"",i),[c.RADIO]:()=>h(o,i),[c.CHECKBOX]:()=>d(o,""),[c.CHIP]:()=>b(o,r),[c.SWITCH]:()=>m(o,""),[c.MULTI_AUTOCOMPLETE]:()=>b(o,r),[c.MULTI_COMBOBOX]:()=>b(o,r)}[l.shape];s&&(l.data=Object.assign(Object.assign({},s()),l.data))}))}))}export{w as F,g as K,y as a,N as b,B as c,q as d,F as e,M as f,$ as g,A as n,S as p,C as s,x as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./p-
|
|
1
|
+
import{a as e}from"./p-cabebabc.js";const r=e=>"year"===e?120:60,t=(e,r)=>{for(let t=0;t<r.length;t++)if(r[t].id===e)return r[t]},n=(e,r)=>{for(let t=0;t<r.length;t++){if(o(r[t]))continue;const n=r[t];if(n.phases)for(let r=0;r<n.phases.length;r++)if(n.phases[r].id===e)return n.phases[r]}},o=e=>e&&e.schedule&&0!==e.schedule.length,a=(e,{id:r,start:t,end:n,startHour:o,endHour:a})=>e.map((e=>e.id===r?y(e,t,n,o,a):e)),s=(e,{id:r,start:t,end:n,startHour:o,endHour:a})=>{if(e)return e.map((e=>e.id===r?y(e,t,n,o,a):e))},d=(r,t,n)=>{var a;if(o(r))return[Object.assign({},u(r,t,n))];{const t=new e,n=r,{start:o,end:s}=t.validDates(n.startDate,n.endDate,n.name),{start:d,end:u}=t.validDates(n.secondaryStartDate,n.secondaryEndDate,n.name);return[{start:o,end:s,id:n.id,name:n.name,type:n.type,valuesToShow:n.valuesToShow,secondaryStart:d,secondaryEnd:u,progress:100,isDisabled:!1,hideChildren:!1,icon:n.icon,startHour:r.startHour,endHour:r.endHour,secondaryStartHour:r.secondaryStartHour,secondaryEndHour:r.secondaryEndHour},...(null!==(a=n.phases)&&void 0!==a?a:[]).map(c)]}},c=r=>(({startDate:t,endDate:n,secondaryStartDate:o,secondaryEndDate:a,name:s,id:d,color:c,selectedColor:u,dependencies:y,icon:l,startHour:i,endHour:H,secondaryStartHour:m,secondaryEndHour:h})=>{const f=new e,{start:S,end:b}=f.validDates(t,n,s),{start:w,end:k}=f.validDates(o,a,s);return{start:S,end:b,secondaryStart:w,secondaryEnd:k,name:s,valuesToShow:r.valuesToShow,id:d,type:"task",progress:100,dependencies:y,styles:c?{backgroundColor:c,progressColor:c,backgroundSelectedColor:u,progressSelectedColor:u}:{},icon:l,startHour:i,endHour:H,secondaryStartHour:m,secondaryEndHour:h}})(r),u=(r,t,n)=>{const o=new e,{id:a,name:s,schedule:d}=r,{start:c,end:u}=(e=>{let r=null!=t?t:"",a=null!=n?n:"";for(let t=0;t<e.schedule.length;t++){const n=e.schedule[t].startDate,o=e.schedule[t].endDate;(!r||n.localeCompare(r)<0)&&(r=n),(!a||o.localeCompare(a)>0)&&(a=o)}return o.validDates(r,a,"detail item")})(r),y="#595959";return{id:a,type:"timeline",timeline:d.map((e=>{const{startDate:r,endDate:t,color:n,selectedColor:a,icon:s}=e,{start:d,end:c}=o.validDates(r,t,"time frame");return{start:d,end:c,backgroundColor:null!=n?n:"0xffffff",backgroundSelectedColor:null!=a?a:n,icon:s}})),name:s,valuesToShow:r.valuesToShow,start:c,end:u,progress:100,styles:{backgroundColor:y,progressColor:y,backgroundSelectedColor:y,progressSelectedColor:y}}},y=(r,t,n,o,a)=>{const s=new e,d={startDate:s.formatToIsoDate(t),endDate:s.formatToIsoDate(n),startHour:o,endHour:a};return Object.assign(Object.assign({},r),d)},l=(e,r,t,n,o)=>{const a=i(e,r,null!=o?o:1,t);if(n){const e=m(n,r,null!=o?o:1,t);e[0]<a[0]&&(a[0]=e[0]),e[1]>a[1]&&(a[1]=e[1])}return{displayedStartDate:a[0],displayedEndDate:a[1]}},i=(r,t,n,o)=>{const a=[],s=new e;return r.forEach((e=>{var r;a.push({start:s.parseToDayStart(e.startDate),end:s.parseToDayEnd(e.endDate),secondaryStart:s.parseToDayStart(e.secondaryStartDate),secondaryEnd:s.parseToDayEnd(e.secondaryEndDate),startHour:e.startHour,endHour:e.endHour,secondaryStartHour:e.secondaryStartHour,secondaryEndHour:e.secondaryEndHour}),null===(r=e.phases)||void 0===r||r.forEach((r=>{a.push({start:s.parseToDayStart(r.startDate),end:s.parseToDayEnd(r.endDate),secondaryStart:s.parseToDayStart(r.secondaryStartDate),secondaryEnd:s.parseToDayEnd(r.secondaryEndDate),startHour:e.startHour,endHour:e.endHour,secondaryStartHour:e.secondaryStartHour,secondaryEndHour:e.secondaryEndHour})}))})),H(a,t,n,o,!0)},H=(e,r,t,n,o)=>{let a=e.length>0?e[0].start:new Date,s=e.length>0?e[0].end:new Date;for(const r of e)r.start<a&&(a=r.start),r.end>s&&(s=r.end),n&&(r.secondaryStart&&r.secondaryStart<a&&(a=r.secondaryStart),r.secondaryEnd&&r.secondaryEnd>s&&(s=r.secondaryEnd));if(o)return[a,s];switch(r){case"year":a=h(a,-1,"year"),a=f(a,"year"),s=h(s,1,"year"),s=f(s,"year");break;case"month":a=h(a,-1*t,"month"),a=f(a,"month"),s=h(s,1,"month"),s=f(s,"month");break;case"week":a=f(a,"day"),a=h(S(a),-7*t,"day"),s=f(s,"day"),s=h(s,1.5,"month");break;case"day":a=f(a,"day"),a=h(a,-1*t,"day"),s=f(s,"day"),s=h(s,19,"day");break;case"hour":a=f(a,"hour"),a=h(a,-1*t,"hour"),s=f(s,"day"),s=h(s,1,"day")}return[a,s]},m=(r,t,n,o)=>{const a=[],s=new e;return r.forEach((e=>{const r=e.schedule;r&&r.forEach((e=>{a.push({start:s.parseToDayStart(e.startDate),end:s.parseToDayEnd(e.endDate),secondaryStart:void 0,secondaryEnd:void 0})}))})),H(a,t,n,o,!0)},h=(e,r,t)=>new Date(e.getFullYear()+("year"===t?r:0),e.getMonth()+("month"===t?r:0),e.getDate()+("day"===t?r:0),e.getHours()+("hour"===t?r:0),e.getMinutes()+("minute"===t?r:0),e.getSeconds()+("second"===t?r:0),e.getMilliseconds()+("millisecond"===t?r:0)),f=(e,r)=>{const t=["millisecond","second","minute","hour","day","month","year"],n=e=>{const n=t.indexOf(r);return t.indexOf(e)<=n};return new Date(e.getFullYear(),n("year")?0:e.getMonth(),n("month")?1:e.getDate(),n("day")?0:e.getHours(),n("hour")?0:e.getMinutes(),n("minute")?0:e.getSeconds(),n("second")?0:e.getMilliseconds())},S=e=>{const r=e.getDay(),t=e.getDate()-r+(0===r?-6:1);return new Date(e.setDate(t))},b=(e,r,t,n,o,a)=>{const s=[];return e.forEach((e=>{s.push({start:e.start,end:e.end,secondaryStart:e.secondaryStart,secondaryEnd:e.secondaryEnd,startHour:e.startHour,endHour:e.endHour,secondaryStartHour:e.secondaryStartHour,secondaryEndHour:e.secondaryEndHour})})),o&&a&&s.push({start:o,end:a,secondaryStart:void 0,secondaryEnd:void 0}),H(s,r,t,n)},w=(e,r,t)=>{let n=new Date(e);const o=[n];for(;n<r;){switch(t){case"year":n=h(n,1,"year");break;case"month":n=h(n,1,"month");break;case"week":n=h(n,7,"day");break;case"day":n=h(n,1,"day");break;case"hour":n=h(n,1,"hour")}o.push(n)}return o};export{d as a,t as b,l as c,s as d,r as e,b as f,n as g,a as m,w as s}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,h as i,F as e}from"./p-710d0a7d.js";import{a as s,c as o}from"./p-1ee561ba.js";import{d as n,i as a,g as r,h}from"./p-008bdcdc.js";import{d as l,a as p,b as f,c,e as d}from"./p-53af4c87.js";import{d as u}from"./p-cd3a7d53.js";const g=class{constructor(i){t(this,i),this.label="",this.doubleView=!1,this.setDoubleView=void 0,this.fontFamily=void 0,this.fontSize=void 0}render(){return i("div",{key:"6d25c0d14ad2ed9eb118d1849daa10cc38c8766a",class:"custom-task-list-wrapper",style:{height:"25px",fontFamily:this.fontFamily,fontSize:this.fontSize}},i("div",{key:"1524d057be5560975aa0be6af3f02526f1c23d68",class:"title"},i("span",{key:"37ca617889828c895d834f531704bf52fe48ab48"},this.label)),void 0!==this.setDoubleView&&i("div",{key:"bee73c11ab6126d250284f49a956ef9b34b2b4d0",class:"toggler"},i("label",{key:"cf22afccaaf5b752043a38f381445cb1a1193c45",htmlFor:"ch2",class:"switch"},i("input",{key:"ef869bb53ea07ee7d132dae62d0803d38f85708b",class:"input",id:"ch2",type:"checkbox",checked:this.doubleView,onClick:()=>this.setDoubleView(!this.doubleView)}),i("span",{key:"eb59cfd70ba976ad77e5e2ad96d005830a1ab5b3",class:"slider"})),i("span",{key:"ed524ff7a5a64ef9163376685c301c7dbdecf460",class:"label"},"Previsioni")))}};g.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.custom-task-list-wrapper{display:flex;justify-content:space-around;max-width:330px;place-items:"center";text-align:center;align-items:center}.title{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toggler{max-width:max-content;padding:0 4px;text-align:right}.switch{position:relative;display:inline-block;width:30px;height:17px}.input{opacity:0;width:0;height:0}.input:checked+.slider{background-color:#003b77}.input:checked+.slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.input:focus+.slider{box-shadow:0 0 1px #003b77}.slider{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:"";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}.label{font-size:12px;padding:6px}.filter{font-size:12px}';const v=class{constructor(i){t(this,i),this.ganttId=void 0,this.tasks=[],this.rowHeight=0,this.rowWidth="",this.fontFamily="",this.fontSize="",this.scrollableTaskList=void 0,this.taskListScrollX=void 0,this.setSelectedTask=void 0,this.onclickTaskList=void 0,this.ondblclickTaskList=void 0,this.oncontextmenuTaskList=void 0,this.ontaskListScrollWidth=void 0}componentDidLoad(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}componentDidUpdate(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}updateTaskListScroll(){this.projectWrapperRef&&(this.projectWrapperRef.parentElement.scrollLeft=this.taskListScrollX)}render(){const t=new s,o={};this.scrollableTaskList&&(o.width=this.rowWidth);const a=this.tasks.reduce(((t,i)=>t.valuesToShow.length>i.valuesToShow.length?t:i)).valuesToShow.length+1;return i("div",{class:"container "+(this.scrollableTaskList?"scrollable":""),style:o},i("div",{class:"project-wrapper",ref:t=>this.projectWrapperRef=t},this.tasks.map((s=>{var o,r,h,l;return i(e,null,"project"===s.type?i("div",{class:"project",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(o=s.valuesToShow)||void 0===o?void 0:o.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`task_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length).map((t=>i("span",{key:t})))):"task"===s.type?i("div",{class:"subrow",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length+1}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},this.scrollableTaskList?i("div",{style:{textAlign:"end"}},i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",display:"inline-block",backgroundColor:null===(r=s.styles)||void 0===r?void 0:r.backgroundColor}})):i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",backgroundColor:null===(h=s.styles)||void 0===h?void 0:h.backgroundColor}}),null===(l=s.valuesToShow)||void 0===l?void 0:l.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`phase_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length-1).map((t=>i("span",{key:t})))):(()=>{var t;let e="";for(let t=0;t<s.valuesToShow.length;t++)e+="1fr ";return i("div",{class:"timeline",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,"--grid-fasi-columns":e},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(t=s.valuesToShow)||void 0===t?void 0:t.map(((t,e)=>i("span",{class:0===e?"main":void 0,title:t.length>10?t:void 0,key:`detail_${s.id}_valuesToShow_${e}`},t))))})())}))))}static get watchers(){return{taskListScrollX:["updateTaskListScroll"]}}};v.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.container{margin-top:var(--kup-space-04)}.scrollable{overflow-x:auto;scrollbar-width:0}.scrollable .project-wrapper{display:table}.scrollable .project{width:100% !important;display:table-row}.scrollable .project>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid var(--kup-border-subtle, #acacac);border-top:1px solid var(--kup-border-subtle, #acacac);padding-left:12px}.scrollable .project>*:first-child{border-left:1px solid var(--kup-border-subtle, #acacac);border-bottom-left-radius:4px;border-top-left-radius:4px}.scrollable .project>*:last-child{border-right:1px solid var(--kup-border-subtle, #acacac);border-bottom-right-radius:4px;border-top-right-radius:4px}.scrollable .subrow{width:100% !important;display:table-row}.scrollable .subrow>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .subrow>*:first-child{border-left:1px solid #acacac}.scrollable .subrow>*:last-child{border-right:1px solid #acacac}.scrollable .timeline{width:100% !important;display:table-row}.scrollable .timeline>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .timeline>*:first-child{border-left:1px solid #acacac}.scrollable .timeline>*:last-child{border-right:1px solid #acacac}.scrollable .project:has(+.subrow)>*{border-bottom-left-radius:0;border-bottom-right-radius:0}.scrollable::-webkit-scrollbar{width:0;height:0}.project{background:var(--kup-layer-1);border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);box-sizing:border-box;color:var(--kup-text-secondary);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center;padding:var(--kup-space-03)}.project>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.project .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.subrow{cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400}.subrow>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.subrow:last-of-type{border-bottom:1px solid var(--kup-border-subtle)}.subrow:has(+.subrow),.project:has(+.subrow){border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}.timeline{padding:var(--kup-space-03);cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400;box-sizing:border-box}.timeline>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.timeline .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}";const x=class{constructor(i){t(this,i),this.dateSetup=void 0,this.locale=void 0,this.rtl=void 0,this.headerHeight=void 0,this.columnWidth=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.dateTimeFormatters=void 0,this.singleLineHeader=!1,this.currentDateIndicator=void 0,this.svgWidth=void 0,this.simplifiedHeader=void 0}componentWillLoad(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode}formatYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.year)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.year(t,this.locale):l.year(t,this.locale)}formatMonth(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.month)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.month(t,this.locale):l.month(t,this.locale)}formatMonthAndYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.monthAndYear)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.monthAndYear(t,this.locale):l.monthAndYear(t,this.locale)}formatWeek(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.week)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.week(t,this.locale):l.week(t,this.locale)}formatDay(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.day)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.day(t,this.locale):l.day(t,this.locale)}getCalendarValuesForYear(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatYear(a);if(e.push(i("text",{key:r,y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=a.getFullYear().toString();let e;e=this.rtl?(6+n+a.getFullYear()+1)*this.columnWidth:(6+n-a.getFullYear())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:this.headerHeight,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForMonth(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatMonth(a);if(e.push(i("text",{key:r+a.getFullYear(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=this.formatYear(a);let e;e=this.rtl?(6+n+a.getMonth()+1)*this.columnWidth:(6+n-a.getMonth())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForWeek(){const t=[],e=[];let s=1;const o=.5*this.headerHeight,n=this.dateSetup.dates;for(let a=n.length-1;a>=0;a--){const r=n[a];let h="";0!==a&&r.getMonth()===n[a-1].getMonth()||(h=this.formatMonthAndYear(r));const l=this.formatWeek(r);e.push(i("text",{key:r.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(a+ +this.rtl),class:"calendarBottomText"},l)),h&&(a!==n.length-1&&t.push({key:h,value:h,x1Line:this.columnWidth*a+s*this.columnWidth,y1Line:0,y2Line:o,xText:this.columnWidth*a+this.columnWidth*s*.5,yText:.9*o}),s=0),s++}return[t,e]}getCalendarValuesForDay(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatDay(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),n+1!==o.length&&a.getMonth()!==o[n+1].getMonth()){const i=this.formatMonth(a);t.push({key:i+a.getFullYear(),value:i,x1Line:this.columnWidth*(n+1),y1Line:0,y2Line:s,xText:this.columnWidth*(n+1)-p(a.getMonth(),a.getFullYear())*this.columnWidth*.5,yText:.9*s})}}return[t,e]}getCalendarValuesForHour(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=f(this.locale,{hour:"numeric"}).format(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(n+ +this.rtl),class:"calendarBottomText"},r)),0!==n&&a.getDate()!==o[n-1].getDate()){const i=o[n-1],e=`${c(i,this.locale,"long")}, ${i.getDate()} ${d(i,this.locale)}`,r=(a.getHours()-24)/2;t.push({key:e+a.getFullYear(),value:e,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:this.columnWidth*(n+r),yText:.9*s})}}return[t,e]}getTopAndBottomValues(){switch(this.dateSetup.viewMode){case"hour":return this.getCalendarValuesForHour();case"day":return this.getCalendarValuesForDay();case"week":return this.getCalendarValuesForWeek();case"month":return this.getCalendarValuesForMonth();case"year":return this.getCalendarValuesForYear()}}render(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode;const[t,e]=this.getTopAndBottomValues();return i("svg",{key:"70126a01a566b025d71cc8f6221502845cc31ffc",xmlns:"http://www.w3.org/2000/svg",width:this.svgWidth,height:this.headerHeight},i("g",{key:"87b6dbd7f9b277051d8a059b31aa0a766562bbda",class:"calendar","font-size":this.fontSize,"font-family":this.fontFamily},i("rect",{key:"e9b9dc65d3087cd15fe33ec1a936972f1b48a62f",x:0,y:0,width:this.columnWidth*this.dateSetup.dates.length,height:this.headerHeight,class:"calendarHeader"}),this.simplifiedHeader?null:e,t.map(this.simplifiedHeader?t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:2*t.y2Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value)):t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:t.y1Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value))),this.currentDateIndicator&&i("circle",{key:"7d3673aa607da61f3263bb1d0f9505f6a3ce2cdc",fill:this.currentDateIndicator.color,cx:this.currentDateIndicator.x+2.5,cy:this.headerHeight-8,r:"8"})))}};x.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.calendarBottomText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarTopTick{stroke:var(--kup-border-subtle)}.calendarTopText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarHeader{fill:var(--kup-layer-1);stroke:var(--kup-border-subtle);stroke-width:1.4;font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}";var y,k,m,b,w,z={exports:{}};y=z.exports,k=function(){function t(t,i,e){this.r=0,this.g=0,this.b=0,this.set(t,i,e)}return t.prototype.set=function(t,i,e){this.r=this.clamp(t),this.g=this.clamp(i),this.b=this.clamp(e)},t.prototype.hueRotate=function(t){void 0===t&&(t=0),t=t/180*Math.PI;var i=Math.sin(t),e=Math.cos(t);this.multiply([.213+.787*e-.213*i,.715-.715*e-.715*i,.072-.072*e+.928*i,.213-.213*e+.143*i,.715+.285*e+.14*i,.072-.072*e-.283*i,.213-.213*e-.787*i,.715-.715*e+.715*i,.072+.928*e+.072*i])},t.prototype.grayscale=function(t){void 0===t&&(t=1),this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])},t.prototype.sepia=function(t){void 0===t&&(t=1),this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])},t.prototype.saturate=function(t){void 0===t&&(t=1),this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])},t.prototype.multiply=function(t){var i=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),e=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),s=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=i,this.g=e,this.b=s},t.prototype.brightness=function(t){void 0===t&&(t=1),this.linear(t)},t.prototype.contrast=function(t){void 0===t&&(t=1),this.linear(t,-.5*t+.5)},t.prototype.linear=function(t,i){void 0===t&&(t=1),void 0===i&&(i=0),this.r=this.clamp(this.r*t+255*i),this.g=this.clamp(this.g*t+255*i),this.b=this.clamp(this.b*t+255*i)},t.prototype.invert=function(t){void 0===t&&(t=1),this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))},t.prototype.hsl=function(){var t=this.r/255,i=this.g/255,e=this.b/255,s=Math.max(t,i,e),o=Math.min(t,i,e),n=0,a=(s+o)/2;if(s===o)return{h:0,s:0,l:100*a};var r=s-o;return s===t?n=(i-e)/r+(i<e?6:0):s===i?n=(e-t)/r+2:s===e&&(n=(t-i)/r+4),{h:100*(n/=6),s:100*(a>.5?r/(2-s-o):r/(s+o)),l:100*a}},t.prototype.clamp=function(t){return Math.min(Math.max(t,0),255)},t}(),m=function(){function t(t,i){this.target=t,this.targetHSL=t.hsl(),this.options=Object.assign({},{acceptanceLossPercentage:5,maxChecks:15},i),this.reusedColor=new k(0,0,0)}return t.prototype.solve=function(){var t=this.solveNarrow(this.solveWide());return{values:t.values,called:t.called,loss:t.loss,filter:this.css(t.values)}},t.prototype.solveWide=function(){for(var t=[60,180,18e3,600,1.2,1.2],i={loss:1/0},e=0;i.loss>this.options.acceptanceLossPercentage;){var s=this.spsa({A:5,a:t,c:15,values:[50,20,3750,50,100,100],maxTriesInLoop:1e3});if(s.loss<i.loss&&(i=s),(e+=1)>=this.options.maxChecks)break}return Object.assign({},i,{called:e})},t.prototype.solveNarrow=function(t){var i=t.loss,e=i+1;return this.spsa({A:i,a:[.25*e,.25*e,e,.25*e,.2*e,.2*e],c:2,values:t.values,maxTriesInLoop:500,called:t.called})},t.prototype.fixValueByFilterIDX=function(t,i){var e=100;return 2===i?e=7500:4!==i&&5!==i||(e=200),3===i?t>e?t%=e:t<0&&(t=e+t%e):t<0?t=0:t>e&&(t=e),t},t.prototype.spsa=function(t){for(var i=t.A,e=t.a,s=t.c,o=t.values,n=t.maxTriesInLoop,a=void 0===n?500:n,r=t.called,h=void 0===r?0:r,l=null,p=1/0,f=new Array(6),c=new Array(6),d=new Array(6),u=0;u<a;u++){for(var g=s/Math.pow(u+1,.16666666666666666),v=0;v<6;v++)f[v]=Math.random()>.5?1:-1,c[v]=o[v]+g*f[v],d[v]=o[v]-g*f[v];var x=this.loss(c)-this.loss(d);for(v=0;v<6;v++){var y=x/(2*g)*f[v],k=e[v]/Math.pow(i+u+1,1);o[v]=this.fixValueByFilterIDX(o[v]-k*y,v)}var m=this.loss(o);m<p&&(l=o.slice(0),p=m)}return{values:l,loss:p,called:h}},t.prototype.loss=function(t){var i=this.reusedColor;i.set(0,0,0),i.invert(t[0]/100),i.sepia(t[1]/100),i.saturate(t[2]/100),i.hueRotate(3.6*t[3]),i.brightness(t[4]/100),i.contrast(t[5]/100);var e=i.hsl();return Math.abs(i.r-this.target.r)+Math.abs(i.g-this.target.g)+Math.abs(i.b-this.target.b)+Math.abs(e.h-this.targetHSL.h)+Math.abs(e.s-this.targetHSL.s)+Math.abs(e.l-this.targetHSL.l)},t.prototype.css=function(t){var i=function(i,e){return void 0===e&&(e=1),Math.round(t[i]*e)};return["invert("+i(0)+"%)","sepia("+i(1)+"%)","saturate("+i(2)+"%)","hue-rotate("+i(3,3.6)+"deg)","brightness("+i(4)+"%)","contrast("+i(5)+"%);"].join(" ")},t}(),b=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},w={},y.clearCache=function(t){t?w[t]&&delete w[t]:w={}},y.hexToCSSFilter=function(t,i){var e,s,o,n,a,r;if(void 0===i&&(i={}),w[t]&&!i.forceFilterRecalculation)return Object.assign({},w[t],{cache:!0});try{if(o=(e=
|
|
1
|
+
import{r as t,h as i,F as e}from"./p-710d0a7d.js";import{a as s,c as o}from"./p-cabebabc.js";import{d as n,i as a,g as r,h}from"./p-008bdcdc.js";import{d as l,a as p,b as f,c,e as d}from"./p-53af4c87.js";import{d as u}from"./p-cd3a7d53.js";const g=class{constructor(i){t(this,i),this.label="",this.doubleView=!1,this.setDoubleView=void 0,this.fontFamily=void 0,this.fontSize=void 0}render(){return i("div",{key:"6d25c0d14ad2ed9eb118d1849daa10cc38c8766a",class:"custom-task-list-wrapper",style:{height:"25px",fontFamily:this.fontFamily,fontSize:this.fontSize}},i("div",{key:"1524d057be5560975aa0be6af3f02526f1c23d68",class:"title"},i("span",{key:"37ca617889828c895d834f531704bf52fe48ab48"},this.label)),void 0!==this.setDoubleView&&i("div",{key:"bee73c11ab6126d250284f49a956ef9b34b2b4d0",class:"toggler"},i("label",{key:"cf22afccaaf5b752043a38f381445cb1a1193c45",htmlFor:"ch2",class:"switch"},i("input",{key:"ef869bb53ea07ee7d132dae62d0803d38f85708b",class:"input",id:"ch2",type:"checkbox",checked:this.doubleView,onClick:()=>this.setDoubleView(!this.doubleView)}),i("span",{key:"eb59cfd70ba976ad77e5e2ad96d005830a1ab5b3",class:"slider"})),i("span",{key:"ed524ff7a5a64ef9163376685c301c7dbdecf460",class:"label"},"Previsioni")))}};g.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.custom-task-list-wrapper{display:flex;justify-content:space-around;max-width:330px;place-items:"center";text-align:center;align-items:center}.title{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toggler{max-width:max-content;padding:0 4px;text-align:right}.switch{position:relative;display:inline-block;width:30px;height:17px}.input{opacity:0;width:0;height:0}.input:checked+.slider{background-color:#003b77}.input:checked+.slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.input:focus+.slider{box-shadow:0 0 1px #003b77}.slider{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:"";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}.label{font-size:12px;padding:6px}.filter{font-size:12px}';const v=class{constructor(i){t(this,i),this.ganttId=void 0,this.tasks=[],this.rowHeight=0,this.rowWidth="",this.fontFamily="",this.fontSize="",this.scrollableTaskList=void 0,this.taskListScrollX=void 0,this.setSelectedTask=void 0,this.onclickTaskList=void 0,this.ondblclickTaskList=void 0,this.oncontextmenuTaskList=void 0,this.ontaskListScrollWidth=void 0}componentDidLoad(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}componentDidUpdate(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}updateTaskListScroll(){this.projectWrapperRef&&(this.projectWrapperRef.parentElement.scrollLeft=this.taskListScrollX)}render(){const t=new s,o={};this.scrollableTaskList&&(o.width=this.rowWidth);const a=this.tasks.reduce(((t,i)=>t.valuesToShow.length>i.valuesToShow.length?t:i)).valuesToShow.length+1;return i("div",{class:"container "+(this.scrollableTaskList?"scrollable":""),style:o},i("div",{class:"project-wrapper",ref:t=>this.projectWrapperRef=t},this.tasks.map((s=>{var o,r,h,l;return i(e,null,"project"===s.type?i("div",{class:"project",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(o=s.valuesToShow)||void 0===o?void 0:o.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`task_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length).map((t=>i("span",{key:t})))):"task"===s.type?i("div",{class:"subrow",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length+1}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},this.scrollableTaskList?i("div",{style:{textAlign:"end"}},i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",display:"inline-block",backgroundColor:null===(r=s.styles)||void 0===r?void 0:r.backgroundColor}})):i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",backgroundColor:null===(h=s.styles)||void 0===h?void 0:h.backgroundColor}}),null===(l=s.valuesToShow)||void 0===l?void 0:l.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`phase_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length-1).map((t=>i("span",{key:t})))):(()=>{var t;let e="";for(let t=0;t<s.valuesToShow.length;t++)e+="1fr ";return i("div",{class:"timeline",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,"--grid-fasi-columns":e},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(t=s.valuesToShow)||void 0===t?void 0:t.map(((t,e)=>i("span",{class:0===e?"main":void 0,title:t.length>10?t:void 0,key:`detail_${s.id}_valuesToShow_${e}`},t))))})())}))))}static get watchers(){return{taskListScrollX:["updateTaskListScroll"]}}};v.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.container{margin-top:var(--kup-space-04)}.scrollable{overflow-x:auto;scrollbar-width:0}.scrollable .project-wrapper{display:table}.scrollable .project{width:100% !important;display:table-row}.scrollable .project>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid var(--kup-border-subtle, #acacac);border-top:1px solid var(--kup-border-subtle, #acacac);padding-left:12px}.scrollable .project>*:first-child{border-left:1px solid var(--kup-border-subtle, #acacac);border-bottom-left-radius:4px;border-top-left-radius:4px}.scrollable .project>*:last-child{border-right:1px solid var(--kup-border-subtle, #acacac);border-bottom-right-radius:4px;border-top-right-radius:4px}.scrollable .subrow{width:100% !important;display:table-row}.scrollable .subrow>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .subrow>*:first-child{border-left:1px solid #acacac}.scrollable .subrow>*:last-child{border-right:1px solid #acacac}.scrollable .timeline{width:100% !important;display:table-row}.scrollable .timeline>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .timeline>*:first-child{border-left:1px solid #acacac}.scrollable .timeline>*:last-child{border-right:1px solid #acacac}.scrollable .project:has(+.subrow)>*{border-bottom-left-radius:0;border-bottom-right-radius:0}.scrollable::-webkit-scrollbar{width:0;height:0}.project{background:var(--kup-layer-1);border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);box-sizing:border-box;color:var(--kup-text-secondary);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center;padding:var(--kup-space-03)}.project>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.project .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.subrow{cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400}.subrow>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.subrow:last-of-type{border-bottom:1px solid var(--kup-border-subtle)}.subrow:has(+.subrow),.project:has(+.subrow){border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}.timeline{padding:var(--kup-space-03);cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400;box-sizing:border-box}.timeline>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.timeline .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}";const x=class{constructor(i){t(this,i),this.dateSetup=void 0,this.locale=void 0,this.rtl=void 0,this.headerHeight=void 0,this.columnWidth=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.dateTimeFormatters=void 0,this.singleLineHeader=!1,this.currentDateIndicator=void 0,this.svgWidth=void 0,this.simplifiedHeader=void 0}componentWillLoad(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode}formatYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.year)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.year(t,this.locale):l.year(t,this.locale)}formatMonth(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.month)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.month(t,this.locale):l.month(t,this.locale)}formatMonthAndYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.monthAndYear)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.monthAndYear(t,this.locale):l.monthAndYear(t,this.locale)}formatWeek(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.week)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.week(t,this.locale):l.week(t,this.locale)}formatDay(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.day)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.day(t,this.locale):l.day(t,this.locale)}getCalendarValuesForYear(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatYear(a);if(e.push(i("text",{key:r,y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=a.getFullYear().toString();let e;e=this.rtl?(6+n+a.getFullYear()+1)*this.columnWidth:(6+n-a.getFullYear())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:this.headerHeight,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForMonth(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatMonth(a);if(e.push(i("text",{key:r+a.getFullYear(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=this.formatYear(a);let e;e=this.rtl?(6+n+a.getMonth()+1)*this.columnWidth:(6+n-a.getMonth())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForWeek(){const t=[],e=[];let s=1;const o=.5*this.headerHeight,n=this.dateSetup.dates;for(let a=n.length-1;a>=0;a--){const r=n[a];let h="";0!==a&&r.getMonth()===n[a-1].getMonth()||(h=this.formatMonthAndYear(r));const l=this.formatWeek(r);e.push(i("text",{key:r.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(a+ +this.rtl),class:"calendarBottomText"},l)),h&&(a!==n.length-1&&t.push({key:h,value:h,x1Line:this.columnWidth*a+s*this.columnWidth,y1Line:0,y2Line:o,xText:this.columnWidth*a+this.columnWidth*s*.5,yText:.9*o}),s=0),s++}return[t,e]}getCalendarValuesForDay(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatDay(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),n+1!==o.length&&a.getMonth()!==o[n+1].getMonth()){const i=this.formatMonth(a);t.push({key:i+a.getFullYear(),value:i,x1Line:this.columnWidth*(n+1),y1Line:0,y2Line:s,xText:this.columnWidth*(n+1)-p(a.getMonth(),a.getFullYear())*this.columnWidth*.5,yText:.9*s})}}return[t,e]}getCalendarValuesForHour(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=f(this.locale,{hour:"numeric"}).format(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(n+ +this.rtl),class:"calendarBottomText"},r)),0!==n&&a.getDate()!==o[n-1].getDate()){const i=o[n-1],e=`${c(i,this.locale,"long")}, ${i.getDate()} ${d(i,this.locale)}`,r=(a.getHours()-24)/2;t.push({key:e+a.getFullYear(),value:e,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:this.columnWidth*(n+r),yText:.9*s})}}return[t,e]}getTopAndBottomValues(){switch(this.dateSetup.viewMode){case"hour":return this.getCalendarValuesForHour();case"day":return this.getCalendarValuesForDay();case"week":return this.getCalendarValuesForWeek();case"month":return this.getCalendarValuesForMonth();case"year":return this.getCalendarValuesForYear()}}render(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode;const[t,e]=this.getTopAndBottomValues();return i("svg",{key:"70126a01a566b025d71cc8f6221502845cc31ffc",xmlns:"http://www.w3.org/2000/svg",width:this.svgWidth,height:this.headerHeight},i("g",{key:"87b6dbd7f9b277051d8a059b31aa0a766562bbda",class:"calendar","font-size":this.fontSize,"font-family":this.fontFamily},i("rect",{key:"e9b9dc65d3087cd15fe33ec1a936972f1b48a62f",x:0,y:0,width:this.columnWidth*this.dateSetup.dates.length,height:this.headerHeight,class:"calendarHeader"}),this.simplifiedHeader?null:e,t.map(this.simplifiedHeader?t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:2*t.y2Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value)):t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:t.y1Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value))),this.currentDateIndicator&&i("circle",{key:"7d3673aa607da61f3263bb1d0f9505f6a3ce2cdc",fill:this.currentDateIndicator.color,cx:this.currentDateIndicator.x+2.5,cy:this.headerHeight-8,r:"8"})))}};x.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.calendarBottomText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarTopTick{stroke:var(--kup-border-subtle)}.calendarTopText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarHeader{fill:var(--kup-layer-1);stroke:var(--kup-border-subtle);stroke-width:1.4;font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}";var y,k,m,b,w,z={exports:{}};y=z.exports,k=function(){function t(t,i,e){this.r=0,this.g=0,this.b=0,this.set(t,i,e)}return t.prototype.set=function(t,i,e){this.r=this.clamp(t),this.g=this.clamp(i),this.b=this.clamp(e)},t.prototype.hueRotate=function(t){void 0===t&&(t=0),t=t/180*Math.PI;var i=Math.sin(t),e=Math.cos(t);this.multiply([.213+.787*e-.213*i,.715-.715*e-.715*i,.072-.072*e+.928*i,.213-.213*e+.143*i,.715+.285*e+.14*i,.072-.072*e-.283*i,.213-.213*e-.787*i,.715-.715*e+.715*i,.072+.928*e+.072*i])},t.prototype.grayscale=function(t){void 0===t&&(t=1),this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])},t.prototype.sepia=function(t){void 0===t&&(t=1),this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])},t.prototype.saturate=function(t){void 0===t&&(t=1),this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])},t.prototype.multiply=function(t){var i=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),e=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),s=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=i,this.g=e,this.b=s},t.prototype.brightness=function(t){void 0===t&&(t=1),this.linear(t)},t.prototype.contrast=function(t){void 0===t&&(t=1),this.linear(t,-.5*t+.5)},t.prototype.linear=function(t,i){void 0===t&&(t=1),void 0===i&&(i=0),this.r=this.clamp(this.r*t+255*i),this.g=this.clamp(this.g*t+255*i),this.b=this.clamp(this.b*t+255*i)},t.prototype.invert=function(t){void 0===t&&(t=1),this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))},t.prototype.hsl=function(){var t=this.r/255,i=this.g/255,e=this.b/255,s=Math.max(t,i,e),o=Math.min(t,i,e),n=0,a=(s+o)/2;if(s===o)return{h:0,s:0,l:100*a};var r=s-o;return s===t?n=(i-e)/r+(i<e?6:0):s===i?n=(e-t)/r+2:s===e&&(n=(t-i)/r+4),{h:100*(n/=6),s:100*(a>.5?r/(2-s-o):r/(s+o)),l:100*a}},t.prototype.clamp=function(t){return Math.min(Math.max(t,0),255)},t}(),m=function(){function t(t,i){this.target=t,this.targetHSL=t.hsl(),this.options=Object.assign({},{acceptanceLossPercentage:5,maxChecks:15},i),this.reusedColor=new k(0,0,0)}return t.prototype.solve=function(){var t=this.solveNarrow(this.solveWide());return{values:t.values,called:t.called,loss:t.loss,filter:this.css(t.values)}},t.prototype.solveWide=function(){for(var t=[60,180,18e3,600,1.2,1.2],i={loss:1/0},e=0;i.loss>this.options.acceptanceLossPercentage;){var s=this.spsa({A:5,a:t,c:15,values:[50,20,3750,50,100,100],maxTriesInLoop:1e3});if(s.loss<i.loss&&(i=s),(e+=1)>=this.options.maxChecks)break}return Object.assign({},i,{called:e})},t.prototype.solveNarrow=function(t){var i=t.loss,e=i+1;return this.spsa({A:i,a:[.25*e,.25*e,e,.25*e,.2*e,.2*e],c:2,values:t.values,maxTriesInLoop:500,called:t.called})},t.prototype.fixValueByFilterIDX=function(t,i){var e=100;return 2===i?e=7500:4!==i&&5!==i||(e=200),3===i?t>e?t%=e:t<0&&(t=e+t%e):t<0?t=0:t>e&&(t=e),t},t.prototype.spsa=function(t){for(var i=t.A,e=t.a,s=t.c,o=t.values,n=t.maxTriesInLoop,a=void 0===n?500:n,r=t.called,h=void 0===r?0:r,l=null,p=1/0,f=new Array(6),c=new Array(6),d=new Array(6),u=0;u<a;u++){for(var g=s/Math.pow(u+1,.16666666666666666),v=0;v<6;v++)f[v]=Math.random()>.5?1:-1,c[v]=o[v]+g*f[v],d[v]=o[v]-g*f[v];var x=this.loss(c)-this.loss(d);for(v=0;v<6;v++){var y=x/(2*g)*f[v],k=e[v]/Math.pow(i+u+1,1);o[v]=this.fixValueByFilterIDX(o[v]-k*y,v)}var m=this.loss(o);m<p&&(l=o.slice(0),p=m)}return{values:l,loss:p,called:h}},t.prototype.loss=function(t){var i=this.reusedColor;i.set(0,0,0),i.invert(t[0]/100),i.sepia(t[1]/100),i.saturate(t[2]/100),i.hueRotate(3.6*t[3]),i.brightness(t[4]/100),i.contrast(t[5]/100);var e=i.hsl();return Math.abs(i.r-this.target.r)+Math.abs(i.g-this.target.g)+Math.abs(i.b-this.target.b)+Math.abs(e.h-this.targetHSL.h)+Math.abs(e.s-this.targetHSL.s)+Math.abs(e.l-this.targetHSL.l)},t.prototype.css=function(t){var i=function(i,e){return void 0===e&&(e=1),Math.round(t[i]*e)};return["invert("+i(0)+"%)","sepia("+i(1)+"%)","saturate("+i(2)+"%)","hue-rotate("+i(3,3.6)+"deg)","brightness("+i(4)+"%)","contrast("+i(5)+"%);"].join(" ")},t}(),b=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},w={},y.clearCache=function(t){t?w[t]&&delete w[t]:w={}},y.hexToCSSFilter=function(t,i){var e,s,o,n,a,r;if(void 0===i&&(i={}),w[t]&&!i.forceFilterRecalculation)return Object.assign({},w[t],{cache:!0});try{if(o=(e=
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,f as s,h as i,H as e,d as h}from"./p-710d0a7d.js";import{k as o}from"./p-
|
|
1
|
+
import{r as t,f as s,h as i,H as e,d as h}from"./p-710d0a7d.js";import{k as o}from"./p-d696e519.js";import{c as l}from"./p-635bb4b3.js";import"./p-cabebabc.js";const n=class{constructor(s){t(this,s),this.kupManager=o(),this.startTime=performance.now(),this.featuresStartTime=null,this.endTime=null,this.content=null,this.customStyle="",this.features={debug:!1,language:!1,longCycleProp:!1,longCycleVar:!1,objects:!1,objectsFunction:!1,theme:!1}}async printLifecycleTime(){const t=this.endTime-this.featuresStartTime,s=this.endTime-this.startTime;return this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+s+"ms, while features took "+t+"ms.",{id:this.rootElement.id,fullTime:s,featuresTime:t}}async refresh(){s(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let t=0;t<1e6;t++)this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now(),this.features.debug&&this.kupManager.debug.logLoad(this,!1),this.features.language&&this.kupManager.language.register(this),this.features.longCycleProp&&this.longCycleProp(),this.features.longCycleVar&&this.longCycleVar(),this.features.objects&&this.longCycleObjects(),this.features.objectsFunction&&this.longCycleObjectsFunction(),this.features.theme&&this.kupManager.theme.register(this)}componentDidLoad(){this.features.debug&&this.kupManager.debug.logLoad(this,!0),this.endTime=performance.now()}componentWillRender(){this.features.debug&&this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.features.debug&&this.kupManager.debug.logRender(this,!0)}render(){let t=null;return this.features.theme&&(t=this.kupManager.theme.setKupStyle(this.rootElement)),i(e,{key:"3ff34876fb3894ed0a20559799fdf2261d2e8fac"},t?i("style",null,t):null,i("div",{key:"2f5f6ad2f3032f3b1da673ea1f6bd02c9fc2910c",id:l},this.content))}disconnectedCallback(){this.features.language&&this.kupManager.language.unregister(this),this.features.theme&&this.kupManager.theme.unregister(this)}get rootElement(){return h(this)}};export{n as kup_probe}
|