arengibook 3.2.2-main → 3.2.4-main
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/README.md +124 -9
- package/dist/index.js +1004 -555
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -47686,7 +47686,7 @@ if (typeof window !== 'undefined') {
|
|
|
47686
47686
|
window.ArengibookToastPresets = ToastPresets;
|
|
47687
47687
|
}
|
|
47688
47688
|
|
|
47689
|
-
var css_248z$3 = ".p-paginator {\n font-size: 14px;\n}\n.p-paginator .p-paginator-first,\n.p-paginator .p-paginator-prev,\n.p-paginator .p-paginator-next,\n.p-paginator .p-paginator-last,\n.p-paginator .p-paginator-pages .p-paginator-page,\n.p-paginator .p-paginator-current,\n.p-paginator .p-dropdown .p-dropdown-label,\n.p-paginator .p-dropdown-item,\n.p-paginator .p-paginator-page-input .p-inputtext {\n font-size: 14px;\n}\n\n.p-datatable .p-datatable-tbody > tr.air-row--selected > td {\n background-color: #f0fdf8 !important;\n}\n\ntable.arengi-table {\n table-layout: fixed;\n}\ntable.arengi-table thead {\n border: 1px solid #d5d2d2;\n}\ntable.arengi-table thead th {\n position: sticky;\n top: 0;\n z-index: 800;\n background-color: #fff;\n border-bottom: 1px solid lightgrey;\n font-size: 14px;\n}\ntable.arengi-table thead th:hover {\n background-color: #d6d6d6;\n}\ntable.arengi-table tbody tr {\n background-color: transparent;\n}\ntable.arengi-table tbody tr:hover {\n background-color: rgba(255, 255, 255, 0.5803921569);\n}\n\n.arengi-table td {\n overflow: hidden;\n text-align: center !important;\n}\n\n.cell-text {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr > td.p-frozen-column {\n z-index: 1;\n background-color: var(--surface-0, #ffffff);\n background: linear-gradient(45deg, #ebebeb, #ebebeb) !important;\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr.p-row-odd > td.p-frozen-column {\n background-color: var(--surface-b, #f8f9fa);\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr > td.p-frozen-column.row-actions-cell,\n.p-datatable-scrollable .p-datatable-tbody > tr.p-row-odd > td.p-frozen-column.row-actions-cell {\n background: #ffffff !important;\n box-shadow: none !important;\n border-right: none !important;\n padding: 0 !important;\n}\n\n.p-datatable .p-datatable-thead > tr > th.row-actions-cell {\n background: transparent !important;\n border: none !important;\n box-shadow: none !important;\n padding: 0 !important;\n}\n\n.arengi-table .p-cell-editing input,\n.arengi-table .p-cell-editing .p-inputtext,\n.arengi-table .p-cell-editing .p-dropdown,\n.arengi-table .p-cell-editing .p-multiselect,\n.arengi-table .p-cell-editing .p-calendar {\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n}\n\n.cell-devise {\n display: flex;\n flex-direction: column;\n gap: 1.4px;\n font-size: 12.25px;\n}\n.cell-devise--editable {\n cursor: pointer;\n}\n.cell-devise--empty {\n display: block;\n width: 100%;\n height: 21px;\n cursor: pointer;\n}\n.cell-devise .span-sub {\n font-size: 10.5px;\n color: #71717a;\n}\n\n.devise-editor {\n display: flex;\n flex-direction: column;\n gap: 5.6px;\n padding: 3.5px 0;\n}\n.devise-editor-fields {\n display: flex;\n flex-direction: column;\n gap: 5.6px;\n width: 100%;\n position: relative;\n}\n.devise-editor-fields .p-dropdown-panel {\n position: absolute;\n z-index: 1000;\n top: 100%;\n left: 0;\n width: 100%;\n}\n.devise-editor-save {\n align-self: flex-end;\n}\n\n.arengi-table .p-cell-editing .devise-editor-fields input,\n.arengi-table .p-cell-editing .devise-editor-fields .p-inputtext,\n.arengi-table .p-cell-editing .devise-editor-fields .p-dropdown {\n width: 100%;\n min-width: 0;\n}\n\n.doc-cell-empty {\n color: #aaa;\n font-size: 11.9px;\n}\n\n.doc-cell {\n display: flex;\n flex-direction: column;\n gap: 3.5px;\n min-width: 0;\n overflow: hidden;\n}\n.doc-cell-summary {\n display: flex;\n align-items: center;\n gap: 4.9px;\n font-size: 12.25px;\n min-width: 0;\n}\n.doc-cell-summary .pi-paperclip {\n color: #71717a;\n font-size: 11.2px;\n flex-shrink: 0;\n}\n.doc-cell-summary span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n}\n.doc-cell-list {\n display: flex;\n flex-direction: column;\n gap: 2.1px;\n padding-left: 15.4px;\n font-size: 11.2px;\n}\n.doc-cell-list div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.doc-cell-list a {\n color: #3b82f6;\n text-decoration: none;\n}\n.doc-cell-list a:hover {\n text-decoration: underline;\n}\n\n.doc-editor {\n display: flex;\n flex-direction: column;\n gap: 5.6px;\n padding: 3.5px 0;\n}\n.doc-editor-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 11.2px;\n}\n.doc-editor-table td {\n padding: 2.8px 4.9px;\n vertical-align: middle;\n}\n.doc-editor-table td a {\n color: #3b82f6;\n text-decoration: none;\n word-break: break-all;\n}\n.doc-editor-table td a:hover {\n text-decoration: underline;\n}\n.doc-editor-table td:last-child {\n width: 28px;\n text-align: center;\n}\n.doc-editor-add {\n display: inline-flex;\n align-items: center;\n gap: 4.2px;\n cursor: pointer;\n align-self: center;\n}\n\n.arengi-table .arengi-table-grey-title-box {\n overflow: hidden;\n min-width: 0;\n justify-content: center;\n}\n\n.arengi-table .arengi-table-grey-title:hover .table-item-title,\n.arengi-table .arengi-table-grey-title .table-item-title:hover {\n text-decoration: none !important;\n}\n\n.arengi-table .table-item-title {\n display: -webkit-box !important;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: var(--ab-title-lines, 1);\n line-height: 16px;\n min-width: 0 !important;\n white-space: normal;\n overflow-wrap: anywhere;\n overflow: hidden;\n max-height: var(--ab-content-max, none);\n}\n\n.p-datatable .p-column-header-content {\n justify-content: center;\n}\n\n.tab_label {\n display: inline-block;\n padding: 5px 10px;\n font-size: 14px;\n font-weight: 600;\n line-height: 1;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n border-radius: 5px;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n height: initial;\n}\n\n.badge {\n padding: 8px 12px;\n border-radius: 5px;\n height: auto;\n margin: 2px;\n font-weight: 400;\n box-shadow: 2px 4px 5px grey;\n white-space: inherit;\n min-width: 90px;\n}\n.badge:not(.badge-small) {\n width: 100%;\n}\n\ntable.arengi-table td.arengi-table-grey-title:not(.normal) {\n background: linear-gradient(45deg, rgba(55, 55, 55, 0.7882352941), rgba(115, 115, 115, 0.7882352941));\n color: white;\n}\ntable.arengi-table td.arengi-table-grey-title:not(.normal) a {\n opacity: 1;\n min-width: 150px;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n text-transform: uppercase;\n}\ntable.arengi-table td.arengi-table-grey-title:not(.normal) a:hover {\n color: #dedede;\n text-decoration: underline;\n}\ntable.arengi-table td.arengi-table-grey-title:not(.normal):hover {\n background-color: #646464;\n transition-duration: 0.1s;\n}\n\n.RiskNumber-table div {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.RiskNumber-table div span {\n width: 30px;\n height: 30px;\n min-width: 30px;\n min-height: 30px;\n max-width: 30px;\n max-height: 30px;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.RiskLabel-table .etiquetteMatrix-risque {\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n width: fit-content;\n max-width: 190px;\n display: flex;\n justify-content: flex-start;\n border-radius: 3px;\n background-color: #fff;\n color: black;\n margin: 5px;\n padding: 0;\n border: 0 solid transparent;\n}\n.RiskLabel-table .etiquetteMatrix-risque .matrix-RisqueLabelColor {\n min-width: 20px;\n max-width: 20px;\n margin-right: 5px;\n border-right: 1px solid rgba(0, 0, 0, 0.3607843137);\n border-radius: 3px 0 0 3px;\n}\n.RiskLabel-table .etiquetteMatrix-risque .matrix-RisqueLabel {\n font-size: 13px;\n font-weight: 300;\n padding: 3px 10px 3px 5px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.RiskOwner-table .risk_owner {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: max-content;\n}\n.RiskOwner-table .risk_owner a {\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n padding: 5px 10px;\n border-radius: 5px;\n background-color: white;\n opacity: 1;\n margin: 2px;\n position: relative;\n}\n.RiskOwner-table .risk_owner a:hover {\n z-index: 9999;\n}\n\n.arengi-table .limite_txt_table {\n min-width: 0 !important;\n max-width: 100% !important;\n min-height: 0;\n max-height: var(--ab-content-max, none);\n margin: 0;\n overflow: hidden;\n text-align: left;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: var(--ab-html-lines, none);\n}\n.arengi-table .limite_txt_table p {\n line-height: 17px;\n font-size: 14px;\n margin: 0;\n}\n\n.action-picto .picto {\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n padding: 5px 10px;\n border-radius: 5px;\n margin: 5px;\n}\n\n.RiskClusters-table .RiskClusters {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1215686275), 0 1px 2px rgba(0, 0, 0, 0.2392156863);\n padding: 5px 19px;\n background-color: rgba(255, 255, 255, 0.5098039216);\n border-radius: 5px;\n opacity: 1;\n position: relative;\n margin: 5px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.RiskClusters-table .RiskClusters .material-icons {\n text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3137254902);\n}\n\n.progress_bar_menu {\n position: relative;\n height: 20px;\n margin-top: 5px;\n margin-bottom: 10px;\n}\n\n.progress_bar_menu_black {\n width: 100%;\n position: absolute;\n bottom: -6px;\n left: 0;\n height: 6px;\n background-color: #b0bec5;\n border-radius: 3px;\n text-align: left;\n}\n\n.progress_bar_menu_load {\n border-radius: 3px;\n height: 6px;\n background-color: #136b89;\n}\n\n.progress_bar_menu_info {\n color: #3f535f;\n font-weight: bold;\n font-size: 12px;\n}\n\n.arengi-table .ab-cell-scroll {\n max-height: var(--ab-cell-max, none);\n overflow-y: auto;\n}\n\n.arengi-table .tab_label {\n max-width: 100%;\n}";
|
|
47689
|
+
var css_248z$3 = ".p-paginator {\n font-size: 14px;\n}\n.p-paginator .p-paginator-first,\n.p-paginator .p-paginator-prev,\n.p-paginator .p-paginator-next,\n.p-paginator .p-paginator-last,\n.p-paginator .p-paginator-pages .p-paginator-page,\n.p-paginator .p-paginator-current,\n.p-paginator .p-dropdown .p-dropdown-label,\n.p-paginator .p-dropdown-item,\n.p-paginator .p-paginator-page-input .p-inputtext {\n font-size: 14px;\n}\n\n.p-datatable .p-datatable-tbody > tr.air-row--selected > td {\n background-color: #f0fdf8 !important;\n}\n\ntable.arengi-table {\n table-layout: fixed;\n}\ntable.arengi-table thead {\n border: 1px solid #d5d2d2;\n}\ntable.arengi-table thead th {\n position: sticky;\n top: 0;\n z-index: 800;\n background-color: #fff;\n border-bottom: 1px solid lightgrey;\n font-size: 14px;\n}\ntable.arengi-table thead th:hover {\n background-color: #d6d6d6;\n}\ntable.arengi-table tbody tr {\n background-color: transparent;\n}\ntable.arengi-table tbody tr:hover {\n background-color: rgba(255, 255, 255, 0.5803921569);\n}\n\n.arengi-table td {\n overflow: hidden;\n text-align: center !important;\n}\n\n.cell-text {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr > td.p-frozen-column {\n z-index: 1;\n background-color: var(--surface-0, #ffffff);\n background: linear-gradient(45deg, #ebebeb, #ebebeb) !important;\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr.p-row-odd > td.p-frozen-column {\n background-color: var(--surface-b, #f8f9fa);\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr > td.p-frozen-column.row-actions-cell,\n.p-datatable-scrollable .p-datatable-tbody > tr.p-row-odd > td.p-frozen-column.row-actions-cell {\n background: #ffffff !important;\n box-shadow: none !important;\n border-right: none !important;\n padding: 0 !important;\n}\n\n.p-datatable .p-datatable-thead > tr > th.row-actions-cell {\n background: transparent !important;\n border: none !important;\n box-shadow: none !important;\n padding: 0 !important;\n}\n\n.arengi-table .p-cell-editing input,\n.arengi-table .p-cell-editing .p-inputtext,\n.arengi-table .p-cell-editing .p-dropdown,\n.arengi-table .p-cell-editing .p-multiselect,\n.arengi-table .p-cell-editing .p-calendar {\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n}\n\n.cell-devise {\n display: flex;\n flex-direction: column;\n gap: 1.4px;\n font-size: 12.25px;\n}\n.cell-devise--editable {\n cursor: pointer;\n}\n.cell-devise--empty {\n display: block;\n width: 100%;\n height: 21px;\n cursor: pointer;\n}\n.cell-devise .span-sub {\n font-size: 10.5px;\n color: #71717a;\n}\n\n.devise-editor {\n display: flex;\n flex-direction: column;\n gap: 5.6px;\n padding: 3.5px 0;\n}\n.devise-editor-fields {\n display: flex;\n flex-direction: column;\n gap: 5.6px;\n width: 100%;\n position: relative;\n}\n.devise-editor-fields .p-dropdown-panel {\n position: absolute;\n z-index: 1000;\n top: 100%;\n left: 0;\n width: 100%;\n}\n.devise-editor-save {\n align-self: flex-end;\n}\n\n.arengi-table .p-cell-editing .devise-editor-fields input,\n.arengi-table .p-cell-editing .devise-editor-fields .p-inputtext,\n.arengi-table .p-cell-editing .devise-editor-fields .p-dropdown {\n width: 100%;\n min-width: 0;\n}\n\n.doc-cell-empty {\n color: #aaa;\n font-size: 11.9px;\n}\n\n.doc-cell {\n display: flex;\n flex-direction: column;\n gap: 3.5px;\n min-width: 0;\n overflow: hidden;\n}\n.doc-cell-summary {\n display: flex;\n align-items: center;\n gap: 4.9px;\n font-size: 12.25px;\n min-width: 0;\n}\n.doc-cell-summary .pi-paperclip {\n color: #71717a;\n font-size: 11.2px;\n flex-shrink: 0;\n}\n.doc-cell-summary span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n}\n.doc-cell-list {\n display: flex;\n flex-direction: column;\n gap: 2.1px;\n padding-left: 15.4px;\n font-size: 11.2px;\n}\n.doc-cell-list div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.doc-cell-list a {\n color: #3b82f6;\n text-decoration: none;\n}\n.doc-cell-list a:hover {\n text-decoration: underline;\n}\n\n.doc-editor {\n display: flex;\n flex-direction: column;\n gap: 5.6px;\n padding: 3.5px 0;\n}\n.doc-editor-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 11.2px;\n}\n.doc-editor-table td {\n padding: 2.8px 4.9px;\n vertical-align: middle;\n}\n.doc-editor-table td a {\n color: #3b82f6;\n text-decoration: none;\n word-break: break-all;\n}\n.doc-editor-table td a:hover {\n text-decoration: underline;\n}\n.doc-editor-table td:last-child {\n width: 28px;\n text-align: center;\n}\n.doc-editor-add {\n display: inline-flex;\n align-items: center;\n gap: 4.2px;\n cursor: pointer;\n align-self: center;\n}\n\n.arengi-table .arengi-table-grey-title-box {\n overflow: hidden;\n min-width: 0;\n justify-content: center;\n}\n\n.arengi-table .arengi-table-grey-title:hover .table-item-title,\n.arengi-table .arengi-table-grey-title .table-item-title:hover {\n text-decoration: none !important;\n}\n\n.arengi-table .table-item-title {\n display: -webkit-box !important;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: var(--ab-title-lines, 1);\n line-height: 16px;\n min-width: 0 !important;\n white-space: normal;\n overflow-wrap: anywhere;\n overflow: hidden;\n max-height: var(--ab-content-max, none);\n}\n\n.p-datatable .p-column-header-content {\n justify-content: center;\n}\n\n.tab_label {\n display: inline-block;\n padding: 5px 10px;\n font-size: 14px;\n font-weight: 600;\n line-height: 1;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n border-radius: 5px;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n height: initial;\n}\n.tab_label .tab_label-clear {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n min-height: 0;\n margin-left: 3px;\n margin-right: -3px;\n padding: 0;\n border: none;\n border-radius: 3px;\n background: none;\n color: inherit;\n opacity: 0.55;\n cursor: pointer;\n transition: opacity 0.12s, background-color 0.12s;\n}\n.tab_label .tab_label-clear:hover, .tab_label .tab_label-clear:focus-visible {\n outline: none;\n opacity: 1;\n background: rgba(0, 0, 0, 0.14);\n}\n\n.badge {\n padding: 8px 12px;\n border-radius: 5px;\n height: auto;\n margin: 2px;\n font-weight: 400;\n box-shadow: 2px 4px 5px grey;\n white-space: inherit;\n min-width: 90px;\n}\n.badge:not(.badge-small) {\n width: 100%;\n}\n\ntable.arengi-table td.arengi-table-grey-title:not(.normal) {\n background: linear-gradient(45deg, rgba(55, 55, 55, 0.7882352941), rgba(115, 115, 115, 0.7882352941));\n color: white;\n}\ntable.arengi-table td.arengi-table-grey-title:not(.normal) a {\n opacity: 1;\n min-width: 150px;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n text-transform: uppercase;\n}\ntable.arengi-table td.arengi-table-grey-title:not(.normal) a:hover {\n color: #dedede;\n text-decoration: underline;\n}\ntable.arengi-table td.arengi-table-grey-title:not(.normal):hover {\n background-color: #646464;\n transition-duration: 0.1s;\n}\n\n.RiskNumber-table div {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.RiskNumber-table div span {\n width: 30px;\n height: 30px;\n min-width: 30px;\n min-height: 30px;\n max-width: 30px;\n max-height: 30px;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.RiskLabel-table .etiquetteMatrix-risque {\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n width: fit-content;\n max-width: 190px;\n display: flex;\n justify-content: flex-start;\n border-radius: 3px;\n background-color: #fff;\n color: black;\n margin: 5px;\n padding: 0;\n border: 0 solid transparent;\n}\n.RiskLabel-table .etiquetteMatrix-risque .matrix-RisqueLabelColor {\n min-width: 20px;\n max-width: 20px;\n margin-right: 5px;\n border-right: 1px solid rgba(0, 0, 0, 0.3607843137);\n border-radius: 3px 0 0 3px;\n}\n.RiskLabel-table .etiquetteMatrix-risque .matrix-RisqueLabel {\n font-size: 13px;\n font-weight: 300;\n padding: 3px 10px 3px 5px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.RiskOwner-table .risk_owner {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: max-content;\n}\n.RiskOwner-table .risk_owner a {\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n padding: 5px 10px;\n border-radius: 5px;\n background-color: white;\n opacity: 1;\n margin: 2px;\n position: relative;\n}\n.RiskOwner-table .risk_owner a:hover {\n z-index: 9999;\n}\n\n.arengi-table .limite_txt_table {\n min-width: 0 !important;\n max-width: 100% !important;\n min-height: 0;\n max-height: var(--ab-content-max, none);\n margin: 0;\n overflow: hidden;\n text-align: left;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: var(--ab-html-lines, none);\n}\n.arengi-table .limite_txt_table p {\n line-height: 17px;\n font-size: 14px;\n margin: 0;\n}\n\n.action-picto .picto {\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n padding: 5px 10px;\n border-radius: 5px;\n margin: 5px;\n}\n\n.RiskClusters-table .RiskClusters {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1215686275), 0 1px 2px rgba(0, 0, 0, 0.2392156863);\n padding: 5px 19px;\n background-color: rgba(255, 255, 255, 0.5098039216);\n border-radius: 5px;\n opacity: 1;\n position: relative;\n margin: 5px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.RiskClusters-table .RiskClusters .material-icons {\n text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3137254902);\n}\n\n.progress_bar_menu {\n position: relative;\n height: 20px;\n margin-top: 5px;\n margin-bottom: 10px;\n}\n\n.progress_bar_menu_black {\n width: 100%;\n position: absolute;\n bottom: -6px;\n left: 0;\n height: 6px;\n background-color: #b0bec5;\n border-radius: 3px;\n text-align: left;\n}\n\n.progress_bar_menu_load {\n border-radius: 3px;\n height: 6px;\n background-color: #136b89;\n}\n\n.progress_bar_menu_info {\n color: #3f535f;\n font-weight: bold;\n font-size: 12px;\n}\n\n.arengi-table .ab-cell-scroll {\n max-height: var(--ab-cell-max, none);\n overflow-y: auto;\n}\n\n.arengi-table .tab_label {\n max-width: 100%;\n}";
|
|
47690
47690
|
styleInject(css_248z$3);
|
|
47691
47691
|
|
|
47692
47692
|
// src/components/react/Table/Table.tokens.js
|
|
@@ -53134,7 +53134,7 @@ function cleanEscapedString(input) {
|
|
|
53134
53134
|
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
53135
53135
|
}
|
|
53136
53136
|
|
|
53137
|
-
var css_248z$2 = ".ts-field-label {\n display: block;\n font-size: 13px;\n color: #8b909a;\n margin-bottom: 6px;\n}\n\n.ts-trigger {\n width: 100%;\n min-height: 38px;\n position: relative;\n display: flex;\n align-items: center;\n gap: 6px;\n flex-wrap: wrap;\n padding: 5px 58px 5px 10px;\n background: #ffffff;\n border: 1px solid #c2c7cf;\n border-radius: 8px;\n cursor: pointer;\n transition: border-color 0.12s, box-shadow 0.12s;\n}\n.ts-trigger:hover {\n border-color: #1d1f24;\n}\n.ts-trigger:focus-visible, .ts-trigger[aria-expanded=true] {\n outline: none;\n border-color: #1d1f24;\n box-shadow: 0 0 0 3px #eeedea;\n}\n.ts-trigger .ts-placeholder {\n color: #8b909a;\n font-size: 14px;\n}\n.ts-trigger .ts-chip {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 12px;\n font-weight: 500;\n padding: 2px 4px 2px 8px;\n border-radius: 6px;\n}\n.ts-trigger .ts-chip > span:first-child {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ts-trigger .ts-chip button {\n border: none;\n background: none;\n color: inherit;\n cursor: pointer;\n opacity: 0.8;\n}\n.ts-trigger .ts-chip button:hover {\n opacity: 1;\n}\n.ts-trigger .ts-more {\n font-size: 12px;\n color: #8b909a;\n}\n.ts-trigger .ts-expand {\n position: absolute;\n right: 34px;\n top: 50%;\n transform: translateY(-50%);\n color: #8b909a;\n cursor: pointer;\n padding: 2px;\n border-radius: 4px;\n}\n.ts-trigger .ts-expand:hover {\n color: #1d1f24;\n background: #f4f5f7;\n}\n.ts-trigger .ts-caret {\n position: absolute;\n right: 10px;\n top: 50%;\n transform: translateY(-50%);\n color: #8b909a;\n transition: transform 0.15s;\n}\n.ts-trigger[aria-expanded=true] .ts-caret {\n transform: translateY(-50%) rotate(180deg);\n}\n\n.ts-backdrop {\n position: fixed;\n inset: 0;\n background: rgba(20, 25, 35, 0.42);\n z-index: 1000;\n}\n\n.ts-panel {\n margin-top: 4px;\n background: #ffffff;\n border: 1px solid #c2c7cf;\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(20, 25, 35, 0.12), 0 2px 6px rgba(20, 25, 35, 0.08);\n overflow: hidden;\n}\n.ts-panel .ts-modal-head {\n display: none;\n align-items: center;\n justify-content: space-between;\n padding: 12px 14px;\n border-bottom: 1px solid #d9dce1;\n font-weight: 500;\n}\n.ts-panel .ts-modal-head .ts-modal-close {\n border: none;\n background: none;\n color: #8b909a;\n cursor: pointer;\n padding: 4px;\n border-radius: 6px;\n}\n.ts-panel .ts-modal-head .ts-modal-close:hover {\n background: #f4f5f7;\n color: #1a1d21;\n}\n.ts-panel--modal {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: min(440px, 92vw);\n margin: 0;\n z-index: 1001;\n}\n.ts-panel--modal .ts-modal-head {\n display: flex;\n}\n.ts-panel--modal .ts-tree {\n max-height: min(58vh, 520px);\n}\n.ts-panel .ts-search {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n border-bottom: 1px solid #d9dce1;\n}\n.ts-panel .ts-search input {\n flex: 1;\n border: none;\n outline: none;\n font: inherit;\n font-size: 14px;\n background: transparent;\n min-width: 0;\n}\n.ts-panel .ts-search input::placeholder {\n color: #8b909a;\n}\n.ts-panel .ts-search .ts-clr {\n border: none;\n background: none;\n color: #8b909a;\n cursor: pointer;\n}\n.ts-panel .ts-search .ts-clr:hover {\n color: #1a1d21;\n}\n.ts-panel .ts-tree {\n max-height: 288px;\n overflow-y: auto;\n padding: 4px;\n}\n.ts-panel .ts-tree .ts-empty {\n padding: 28px 12px;\n text-align: center;\n color: #8b909a;\n font-size: 13px;\n}\n.ts-panel .ts-tree .ts-row {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 6px;\n margin-bottom: 1px;\n border-left: 3px solid transparent;\n font-size: 14px;\n user-select: none;\n}\n.ts-panel .ts-tree .ts-row:hover {\n background: #f4f5f7;\n}\n.ts-panel .ts-tree .ts-row.focused {\n box-shadow: inset 0 0 0 1px #d9dce1;\n}\n.ts-panel .ts-tree .ts-row.selected {\n background: rgba(29, 31, 36, 0.06);\n border-left-color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-caret-cell {\n width: 18px;\n color: #8b909a;\n cursor: pointer;\n}\n.ts-panel .ts-tree .ts-row .ts-caret-cell.leaf {\n visibility: hidden;\n}\n.ts-panel .ts-tree .ts-row .ts-caret-cell svg {\n transition: transform 0.12s;\n}\n.ts-panel .ts-tree .ts-row .ts-caret-cell.open svg {\n transform: rotate(90deg);\n}\n.ts-panel .ts-tree .ts-row .ts-check {\n width: 16px;\n height: 16px;\n border-radius: 4px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 1.5px solid #c2c7cf;\n color: #fff;\n cursor: pointer;\n}\n.ts-panel .ts-tree .ts-row .ts-check.on {\n border-color: #1d1f24;\n background: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-check.ind {\n border-color: #1d1f24;\n background: #eeedea;\n color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-check.previewing {\n border-color: #1d1f24;\n background: #eeedea;\n color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-badge {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 9px;\n border-radius: 6px;\n font-size: 13px;\n min-width: 0;\n transition: opacity 0.12s, box-shadow 0.16s;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-cb {\n width: 14px;\n height: 14px;\n border-radius: 3px;\n border: 1.5px solid currentColor;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-cb.ghost svg {\n opacity: 0.55;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-ico {\n font-size: 15px;\n line-height: 1;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-code {\n font-size: 10px;\n opacity: 0.6;\n padding: 0 4px;\n border-radius: 3px;\n border: 1px solid currentColor;\n line-height: 1.4;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-lbl {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-info {\n opacity: 0.65;\n cursor: help;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-info:hover {\n opacity: 1;\n}\n.ts-panel .ts-tree .ts-row .ts-enf {\n margin-left: auto;\n padding: 2px 8px;\n border-radius: 6px;\n border: 1px solid #d9dce1;\n color: #8b909a;\n font-size: 11px;\n cursor: pointer;\n transition: all 0.12s;\n}\n.ts-panel .ts-tree .ts-row .ts-enf:hover {\n border-color: #1d1f24;\n color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-enf.some {\n border-color: #1d1f24;\n color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-enf.on {\n border-color: #1d1f24;\n background: #1d1f24;\n color: #fff;\n}\n.ts-panel .ts-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n border-top: 1px solid #d9dce1;\n font-size: 13px;\n}\n.ts-panel .ts-footer .ts-selectall,\n.ts-panel .ts-footer .ts-cancel {\n border: none;\n background: none;\n color: #1d1f24;\n cursor: pointer;\n white-space: nowrap;\n}\n.ts-panel .ts-footer .ts-apply {\n border: none;\n background: #101216;\n color: #fff;\n border-radius: 6px;\n padding: 5px 12px;\n cursor: pointer;\n}\n.ts-panel .ts-footer .ts-apply:hover {\n background: #000;\n}\n.ts-panel .ts-footer .ts-apply.off {\n background: #c2c7cf;\n cursor: default;\n}\n.ts-panel .ts-footer .ts-apply .ts-apply-n {\n opacity: 0.8;\n}\n\n.ts-comma {\n font-size: 14px;\n color: #1a1d21;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.ts-count {\n font-size: 13px;\n font-weight: 500;\n color: #1a1d21;\n}\n\n.ts-clear-global {\n position: absolute;\n right: 58px;\n top: 50%;\n transform: translateY(-50%);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n border-radius: 4px;\n color: #8b909a;\n cursor: pointer;\n font-size: 12px;\n}\n.ts-clear-global:hover {\n color: #1d1f24;\n background: #f4f5f7;\n}\n\n.ts-loadmore {\n border: 1px dashed #c2c7cf;\n background: none;\n color: #1d1f24;\n font: inherit;\n font-size: 12px;\n padding: 3px 10px;\n border-radius: 6px;\n cursor: pointer;\n}\n.ts-loadmore:hover {\n background: #f4f5f7;\n border-style: solid;\n}\n\n.ts-error {\n display: block;\n margin-top: 4px;\n font-size: 11px;\n color: #e24c4c;\n}\n\n.ts-spin {\n animation: ts-spin 0.8s linear infinite;\n}\n\n@keyframes ts-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.ts-tooltip {\n position: fixed;\n z-index: 1002;\n max-width: 240px;\n background: #1a1d21;\n color: #fff;\n font-size: 12px;\n line-height: 1.45;\n padding: 8px 10px;\n border-radius: 6px;\n pointer-events: none;\n}\n.ts-tooltip .tt-title {\n font-weight: 500;\n display: block;\n margin-bottom: 2px;\n}\n.ts-tooltip .tt-path {\n display: block;\n color: #9aa0aa;\n font-size: 11px;\n margin-bottom: 4px;\n}\n.ts-tooltip .tt-body {\n color: #c9ccd2;\n}";
|
|
53137
|
+
var css_248z$2 = ".ts-root,\n.ts-panel,\n.ts-backdrop,\n.ts-tooltip {\n box-sizing: border-box;\n font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\n font-size: 14px;\n line-height: 1.45;\n color: #1a1d21;\n}\n.ts-root *, .ts-root *::before, .ts-root *::after,\n.ts-panel *,\n.ts-panel *::before,\n.ts-panel *::after,\n.ts-backdrop *,\n.ts-backdrop *::before,\n.ts-backdrop *::after,\n.ts-tooltip *,\n.ts-tooltip *::before,\n.ts-tooltip *::after {\n box-sizing: border-box;\n}\n.ts-root button,\n.ts-panel button,\n.ts-backdrop button,\n.ts-tooltip button {\n appearance: none;\n -webkit-appearance: none;\n margin: 0;\n height: auto;\n min-height: 0;\n max-height: none;\n font: inherit;\n line-height: 1.45;\n text-align: center;\n text-transform: none;\n letter-spacing: normal;\n overflow: visible;\n white-space: nowrap;\n}\n.ts-root code,\n.ts-panel code,\n.ts-backdrop code,\n.ts-tooltip code {\n font-family: inherit;\n background: none;\n color: inherit;\n}\n\n.ts-field-label {\n display: block;\n font-size: 13px;\n color: #8b909a;\n margin-bottom: 6px;\n}\n\n.ts-trigger {\n width: 100%;\n min-height: 38px;\n position: relative;\n display: flex;\n align-items: center;\n gap: 6px;\n flex-wrap: wrap;\n padding: 5px 58px 5px 10px;\n background: #ffffff;\n border: 1px solid #c2c7cf;\n border-radius: 8px;\n cursor: pointer;\n transition: border-color 0.12s, box-shadow 0.12s;\n}\n.ts-trigger:hover {\n border-color: #1d1f24;\n}\n.ts-trigger:focus-visible, .ts-trigger[aria-expanded=true] {\n outline: none;\n border-color: #1d1f24;\n box-shadow: 0 0 0 3px #eeedea;\n}\n.ts-trigger .ts-placeholder {\n color: #8b909a;\n font-size: 14px;\n}\n.ts-trigger .ts-chip {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 12px;\n font-weight: 500;\n padding: 2px 4px 2px 8px;\n border-radius: 6px;\n}\n.ts-trigger .ts-chip > span:first-child {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ts-trigger .ts-chip button {\n border: none;\n background: none;\n color: inherit;\n cursor: pointer;\n opacity: 0.8;\n}\n.ts-trigger .ts-chip button:hover {\n opacity: 1;\n}\n.ts-trigger .ts-more {\n font-size: 12px;\n color: #8b909a;\n}\n.ts-trigger .ts-expand {\n position: absolute;\n right: 34px;\n top: 50%;\n transform: translateY(-50%);\n color: #8b909a;\n cursor: pointer;\n padding: 2px;\n border-radius: 4px;\n}\n.ts-trigger .ts-expand:hover {\n color: #1d1f24;\n background: #f4f5f7;\n}\n.ts-trigger .ts-caret {\n position: absolute;\n right: 10px;\n top: 50%;\n transform: translateY(-50%);\n color: #8b909a;\n transition: transform 0.15s;\n}\n.ts-trigger[aria-expanded=true] .ts-caret {\n transform: translateY(-50%) rotate(180deg);\n}\n\n.ts-backdrop {\n position: fixed;\n inset: 0;\n background: rgba(20, 25, 35, 0.42);\n z-index: 1000;\n}\n\n.ts-panel {\n margin-top: 4px;\n background: #ffffff;\n border: 1px solid #c2c7cf;\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(20, 25, 35, 0.12), 0 2px 6px rgba(20, 25, 35, 0.08);\n overflow: hidden;\n}\n.ts-panel .ts-modal-head {\n display: none;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n padding: 12px 14px;\n border-bottom: 1px solid #d9dce1;\n font-weight: 500;\n}\n.ts-panel .ts-modal-head > span:first-child {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ts-panel .ts-modal-head .ts-modal-close {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n min-height: 30px;\n padding: 0;\n border: 1px solid #d9dce1;\n border-radius: 50%;\n background: #ffffff;\n color: #1a1d21;\n cursor: pointer;\n transition: background-color 0.12s, border-color 0.12s;\n}\n.ts-panel .ts-modal-head .ts-modal-close:hover, .ts-panel .ts-modal-head .ts-modal-close:focus-visible {\n outline: none;\n background: #f4f5f7;\n border-color: #c2c7cf;\n}\n.ts-panel .ts-modal-head .ts-modal-close:active {\n background: #eeedea;\n}\n.ts-panel--modal {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: min(440px, 92vw);\n margin: 0;\n z-index: 1001;\n}\n.ts-panel--modal .ts-modal-head {\n display: flex;\n}\n.ts-panel--modal .ts-tree {\n max-height: min(58vh, 520px);\n}\n.ts-panel .ts-search {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n border-bottom: 1px solid #d9dce1;\n}\n.ts-panel .ts-search input {\n flex: 1;\n border: none;\n outline: none;\n font: inherit;\n font-size: 14px;\n background: transparent;\n min-width: 0;\n}\n.ts-panel .ts-search input::placeholder {\n color: #8b909a;\n}\n.ts-panel .ts-search .ts-clr {\n border: none;\n background: none;\n color: #8b909a;\n cursor: pointer;\n}\n.ts-panel .ts-search .ts-clr:hover {\n color: #1a1d21;\n}\n.ts-panel .ts-tree {\n max-height: 288px;\n overflow-y: auto;\n padding: 4px;\n}\n.ts-panel .ts-tree .ts-empty {\n padding: 28px 12px;\n text-align: center;\n color: #8b909a;\n font-size: 13px;\n}\n.ts-panel .ts-tree .ts-row {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 6px;\n margin-bottom: 1px;\n border-left: 3px solid transparent;\n font-size: 14px;\n user-select: none;\n}\n.ts-panel .ts-tree .ts-row:hover {\n background: #f4f5f7;\n}\n.ts-panel .ts-tree .ts-row.focused {\n box-shadow: inset 0 0 0 1px #d9dce1;\n}\n.ts-panel .ts-tree .ts-row.selected {\n background: rgba(29, 31, 36, 0.06);\n border-left-color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-caret-cell {\n width: 18px;\n color: #8b909a;\n cursor: pointer;\n}\n.ts-panel .ts-tree .ts-row .ts-caret-cell.leaf {\n visibility: hidden;\n}\n.ts-panel .ts-tree .ts-row .ts-caret-cell svg {\n transition: transform 0.12s;\n}\n.ts-panel .ts-tree .ts-row .ts-caret-cell.open svg {\n transform: rotate(90deg);\n}\n.ts-panel .ts-tree .ts-row .ts-check {\n width: 16px;\n height: 16px;\n border-radius: 4px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 1.5px solid #c2c7cf;\n color: #fff;\n cursor: pointer;\n}\n.ts-panel .ts-tree .ts-row .ts-check.on {\n border-color: #1d1f24;\n background: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-check.ind {\n border-color: #1d1f24;\n background: #eeedea;\n color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-check.previewing {\n border-color: #1d1f24;\n background: #eeedea;\n color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-badge {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 9px;\n border-radius: 6px;\n font-size: 13px;\n min-width: 0;\n transition: opacity 0.12s, box-shadow 0.16s;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-cb {\n width: 14px;\n height: 14px;\n border-radius: 3px;\n border: 1.5px solid currentColor;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-cb.ghost svg {\n opacity: 0.55;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-ico {\n font-size: 15px;\n line-height: 1;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-code {\n font-size: 10px;\n opacity: 0.6;\n padding: 0 4px;\n border-radius: 3px;\n border: 1px solid currentColor;\n line-height: 1.4;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-lbl {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-info {\n opacity: 0.65;\n cursor: help;\n}\n.ts-panel .ts-tree .ts-row .ts-badge .ts-badge-info:hover {\n opacity: 1;\n}\n.ts-panel .ts-tree .ts-row .ts-enf {\n margin-left: auto;\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 22px;\n padding: 2px 8px;\n border-radius: 6px;\n border: 1px solid #d9dce1;\n color: #8b909a;\n font-size: 11px;\n line-height: 1.45;\n cursor: pointer;\n transition: all 0.12s;\n}\n.ts-panel .ts-tree .ts-row .ts-enf:hover {\n border-color: #1d1f24;\n color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-enf.some {\n border-color: #1d1f24;\n color: #1d1f24;\n}\n.ts-panel .ts-tree .ts-row .ts-enf.on {\n border-color: #1d1f24;\n background: #1d1f24;\n color: #fff;\n}\n.ts-panel .ts-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n border-top: 1px solid #d9dce1;\n font-size: 13px;\n}\n.ts-panel .ts-footer .ts-selectall,\n.ts-panel .ts-footer .ts-cancel {\n border: none;\n background: none;\n color: #1d1f24;\n cursor: pointer;\n white-space: nowrap;\n}\n.ts-panel .ts-footer .ts-apply, .ts-panel .ts-footer .ts-apply.ts-apply--off, .ts-panel .ts-footer .ts-apply:disabled {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n border: none;\n color: #fff;\n border-radius: 6px;\n padding: 5px 12px;\n white-space: nowrap;\n}\n.ts-panel .ts-footer .ts-apply {\n background: #101216;\n cursor: pointer;\n}\n.ts-panel .ts-footer .ts-apply:hover {\n background: #000;\n}\n.ts-panel .ts-footer .ts-apply.ts-apply--off, .ts-panel .ts-footer .ts-apply:disabled {\n background: rgba(139, 144, 154, 0.14);\n cursor: default;\n}\n.ts-panel .ts-footer .ts-apply .ts-apply-n {\n opacity: 0.8;\n}\n\n.ts-comma {\n font-size: 14px;\n color: #1a1d21;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.ts-count {\n font-size: 13px;\n font-weight: 500;\n color: #1a1d21;\n}\n\n.ts-clear-global {\n position: absolute;\n right: 58px;\n top: 50%;\n transform: translateY(-50%);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: 1px solid #d9dce1;\n border-radius: 50%;\n background: #eeedea;\n color: #1a1d21;\n cursor: pointer;\n transition: background-color 0.12s, border-color 0.12s, color 0.12s;\n}\n.ts-clear-global:hover, .ts-clear-global:focus-visible {\n outline: none;\n background: #e24c4c;\n border-color: #e24c4c;\n color: #fff;\n}\n.ts-clear-global:active {\n background: #c33c3c;\n border-color: #c33c3c;\n}\n\n.ts-loadmore {\n border: 1px dashed #c2c7cf;\n background: none;\n color: #1d1f24;\n font: inherit;\n font-size: 12px;\n padding: 3px 10px;\n border-radius: 6px;\n cursor: pointer;\n}\n.ts-loadmore:hover {\n background: #f4f5f7;\n border-style: solid;\n}\n\n.ts-error {\n display: block;\n margin-top: 4px;\n font-size: 11px;\n color: #e24c4c;\n}\n\n.ts-spin {\n animation: ts-spin 0.8s linear infinite;\n}\n\n@keyframes ts-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.ts-tooltip {\n position: fixed;\n z-index: 1002;\n max-width: 240px;\n background: #1a1d21;\n color: #fff;\n font-size: 12px;\n line-height: 1.45;\n padding: 8px 10px;\n border-radius: 6px;\n pointer-events: none;\n}\n.ts-tooltip .tt-title {\n font-weight: 500;\n display: block;\n margin-bottom: 2px;\n}\n.ts-tooltip .tt-path {\n display: block;\n color: #9aa0aa;\n font-size: 11px;\n margin-bottom: 4px;\n}\n.ts-tooltip .tt-body {\n color: #c9ccd2;\n}";
|
|
53138
53138
|
styleInject(css_248z$2);
|
|
53139
53139
|
|
|
53140
53140
|
/**
|
|
@@ -53406,6 +53406,24 @@ var IconExpand = function IconExpand() {
|
|
|
53406
53406
|
d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"
|
|
53407
53407
|
}));
|
|
53408
53408
|
};
|
|
53409
|
+
// Croix (effacement global, fermeture de la pop-in). En SVG comme le reste du jeu
|
|
53410
|
+
// d'icônes : le glyphe « ✕ » rendait un trait variable selon la police de l'hôte.
|
|
53411
|
+
var IconClear = function IconClear(_ref) {
|
|
53412
|
+
var _ref$size = _ref.size,
|
|
53413
|
+
size = _ref$size === void 0 ? 11 : _ref$size;
|
|
53414
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
53415
|
+
width: size,
|
|
53416
|
+
height: size,
|
|
53417
|
+
viewBox: "0 0 12 12",
|
|
53418
|
+
"aria-hidden": "true"
|
|
53419
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
53420
|
+
d: "M3 3l6 6M9 3l-6 6",
|
|
53421
|
+
stroke: "currentColor",
|
|
53422
|
+
strokeWidth: "2",
|
|
53423
|
+
fill: "none",
|
|
53424
|
+
strokeLinecap: "round"
|
|
53425
|
+
}));
|
|
53426
|
+
};
|
|
53409
53427
|
var IconSearch = function IconSearch() {
|
|
53410
53428
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
53411
53429
|
width: "15",
|
|
@@ -53499,74 +53517,79 @@ var IconSpinner = function IconSpinner() {
|
|
|
53499
53517
|
|
|
53500
53518
|
// --- Composant ---
|
|
53501
53519
|
|
|
53502
|
-
var TreeSelectMaquette = function TreeSelectMaquette(
|
|
53503
|
-
var
|
|
53504
|
-
optionsProp =
|
|
53505
|
-
|
|
53506
|
-
label =
|
|
53507
|
-
|
|
53508
|
-
placeholder =
|
|
53509
|
-
|
|
53510
|
-
defaultValue =
|
|
53511
|
-
value =
|
|
53512
|
-
onChange =
|
|
53513
|
-
onLoadChildren =
|
|
53514
|
-
|
|
53515
|
-
maxChips =
|
|
53516
|
-
|
|
53517
|
-
defaultOpen =
|
|
53518
|
-
|
|
53519
|
-
disabled =
|
|
53520
|
-
|
|
53521
|
-
loading =
|
|
53522
|
-
|
|
53523
|
-
invalid =
|
|
53524
|
-
|
|
53525
|
-
errorMessage =
|
|
53526
|
-
|
|
53527
|
-
selectionMode =
|
|
53528
|
-
|
|
53529
|
-
showClear =
|
|
53530
|
-
|
|
53531
|
-
showChipPath =
|
|
53532
|
-
|
|
53533
|
-
popin =
|
|
53534
|
-
|
|
53535
|
-
|
|
53536
|
-
|
|
53537
|
-
|
|
53538
|
-
|
|
53539
|
-
|
|
53540
|
-
|
|
53541
|
-
|
|
53542
|
-
|
|
53543
|
-
|
|
53544
|
-
|
|
53545
|
-
|
|
53546
|
-
|
|
53547
|
-
|
|
53548
|
-
|
|
53549
|
-
|
|
53550
|
-
|
|
53551
|
-
|
|
53552
|
-
|
|
53553
|
-
|
|
53554
|
-
|
|
53555
|
-
|
|
53556
|
-
|
|
53557
|
-
|
|
53558
|
-
|
|
53559
|
-
|
|
53560
|
-
|
|
53561
|
-
|
|
53562
|
-
|
|
53563
|
-
|
|
53564
|
-
|
|
53565
|
-
|
|
53566
|
-
|
|
53567
|
-
|
|
53568
|
-
|
|
53569
|
-
|
|
53520
|
+
var TreeSelectMaquette = function TreeSelectMaquette(_ref2) {
|
|
53521
|
+
var _ref2$options = _ref2.options,
|
|
53522
|
+
optionsProp = _ref2$options === void 0 ? [] : _ref2$options,
|
|
53523
|
+
_ref2$label = _ref2.label,
|
|
53524
|
+
label = _ref2$label === void 0 ? 'Périmètre concerné' : _ref2$label,
|
|
53525
|
+
_ref2$placeholder = _ref2.placeholder,
|
|
53526
|
+
placeholder = _ref2$placeholder === void 0 ? 'Sélectionnez un périmètre' : _ref2$placeholder,
|
|
53527
|
+
_ref2$defaultValue = _ref2.defaultValue,
|
|
53528
|
+
defaultValue = _ref2$defaultValue === void 0 ? [] : _ref2$defaultValue,
|
|
53529
|
+
value = _ref2.value,
|
|
53530
|
+
onChange = _ref2.onChange,
|
|
53531
|
+
onLoadChildren = _ref2.onLoadChildren,
|
|
53532
|
+
_ref2$maxChips = _ref2.maxChips,
|
|
53533
|
+
maxChips = _ref2$maxChips === void 0 ? 2 : _ref2$maxChips,
|
|
53534
|
+
_ref2$defaultOpen = _ref2.defaultOpen,
|
|
53535
|
+
defaultOpen = _ref2$defaultOpen === void 0 ? false : _ref2$defaultOpen,
|
|
53536
|
+
_ref2$disabled = _ref2.disabled,
|
|
53537
|
+
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
53538
|
+
_ref2$loading = _ref2.loading,
|
|
53539
|
+
loading = _ref2$loading === void 0 ? false : _ref2$loading,
|
|
53540
|
+
_ref2$invalid = _ref2.invalid,
|
|
53541
|
+
invalid = _ref2$invalid === void 0 ? false : _ref2$invalid,
|
|
53542
|
+
_ref2$errorMessage = _ref2.errorMessage,
|
|
53543
|
+
errorMessage = _ref2$errorMessage === void 0 ? '' : _ref2$errorMessage,
|
|
53544
|
+
_ref2$selectionMode = _ref2.selectionMode,
|
|
53545
|
+
selectionMode = _ref2$selectionMode === void 0 ? 'checkbox' : _ref2$selectionMode,
|
|
53546
|
+
_ref2$showClear = _ref2.showClear,
|
|
53547
|
+
showClear = _ref2$showClear === void 0 ? false : _ref2$showClear,
|
|
53548
|
+
_ref2$showChipPath = _ref2.showChipPath,
|
|
53549
|
+
showChipPath = _ref2$showChipPath === void 0 ? false : _ref2$showChipPath,
|
|
53550
|
+
_ref2$popin = _ref2.popin,
|
|
53551
|
+
popin = _ref2$popin === void 0 ? false : _ref2$popin,
|
|
53552
|
+
_ref2$autoOpen = _ref2.autoOpen,
|
|
53553
|
+
autoOpen = _ref2$autoOpen === void 0 ? false : _ref2$autoOpen,
|
|
53554
|
+
_ref2$dismissOnBackdr = _ref2.dismissOnBackdrop,
|
|
53555
|
+
dismissOnBackdrop = _ref2$dismissOnBackdr === void 0 ? false : _ref2$dismissOnBackdr,
|
|
53556
|
+
onPanelHide = _ref2.onPanelHide,
|
|
53557
|
+
_ref2$branchPageSize = _ref2.branchPageSize,
|
|
53558
|
+
branchPageSize = _ref2$branchPageSize === void 0 ? 0 : _ref2$branchPageSize,
|
|
53559
|
+
_ref2$showSelectAll = _ref2.showSelectAll,
|
|
53560
|
+
showSelectAll = _ref2$showSelectAll === void 0 ? true : _ref2$showSelectAll,
|
|
53561
|
+
_ref2$validate = _ref2.validate,
|
|
53562
|
+
validate = _ref2$validate === void 0 ? true : _ref2$validate,
|
|
53563
|
+
_ref2$showChildrenCou = _ref2.showChildrenCount,
|
|
53564
|
+
showChildrenCount = _ref2$showChildrenCou === void 0 ? true : _ref2$showChildrenCou,
|
|
53565
|
+
_ref2$showExpand = _ref2.showExpand,
|
|
53566
|
+
showExpand = _ref2$showExpand === void 0 ? true : _ref2$showExpand,
|
|
53567
|
+
_ref2$filter = _ref2.filter,
|
|
53568
|
+
filter = _ref2$filter === void 0 ? true : _ref2$filter,
|
|
53569
|
+
_ref2$filterPlacehold = _ref2.filterPlaceholder,
|
|
53570
|
+
filterPlaceholder = _ref2$filterPlacehold === void 0 ? 'Rechercher un périmètre…' : _ref2$filterPlacehold,
|
|
53571
|
+
_ref2$filterMode = _ref2.filterMode,
|
|
53572
|
+
filterMode = _ref2$filterMode === void 0 ? 'lenient' : _ref2$filterMode,
|
|
53573
|
+
_ref2$filterBy = _ref2.filterBy,
|
|
53574
|
+
filterBy = _ref2$filterBy === void 0 ? 'label' : _ref2$filterBy,
|
|
53575
|
+
_ref2$filterDelay = _ref2.filterDelay,
|
|
53576
|
+
filterDelay = _ref2$filterDelay === void 0 ? 300 : _ref2$filterDelay,
|
|
53577
|
+
_ref2$resetFilterOnHi = _ref2.resetFilterOnHide,
|
|
53578
|
+
resetFilterOnHide = _ref2$resetFilterOnHi === void 0 ? false : _ref2$resetFilterOnHi,
|
|
53579
|
+
_ref2$showChips = _ref2.showChips,
|
|
53580
|
+
showChips = _ref2$showChips === void 0 ? true : _ref2$showChips,
|
|
53581
|
+
_ref2$display = _ref2.display,
|
|
53582
|
+
display = _ref2$display === void 0 ? 'chip' : _ref2$display,
|
|
53583
|
+
_ref2$summaryThreshol = _ref2.summaryThreshold,
|
|
53584
|
+
summaryThreshold = _ref2$summaryThreshol === void 0 ? 0 : _ref2$summaryThreshol,
|
|
53585
|
+
scrollHeight = _ref2.scrollHeight,
|
|
53586
|
+
_ref2$emptyMessage = _ref2.emptyMessage,
|
|
53587
|
+
emptyMessage = _ref2$emptyMessage === void 0 ? 'Aucun résultat' : _ref2$emptyMessage,
|
|
53588
|
+
_ref2$nodeColorField = _ref2.nodeColorField,
|
|
53589
|
+
nodeColorField = _ref2$nodeColorField === void 0 ? 'color' : _ref2$nodeColorField,
|
|
53590
|
+
_ref2$metaKeySelectio = _ref2.metaKeySelection,
|
|
53591
|
+
metaKeySelection = _ref2$metaKeySelectio === void 0 ? false : _ref2$metaKeySelectio;
|
|
53592
|
+
_ref2.appendTo;
|
|
53570
53593
|
var checkboxMode = selectionMode === 'checkbox';
|
|
53571
53594
|
var inert = disabled || loading; // champ non interactif
|
|
53572
53595
|
|
|
@@ -53822,6 +53845,7 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
53822
53845
|
setPreview(null);
|
|
53823
53846
|
setTooltip(null);
|
|
53824
53847
|
if (resetFilterOnHide) setQuery('');
|
|
53848
|
+
onPanelHide === null || onPanelHide === void 0 || onPanelHide();
|
|
53825
53849
|
};
|
|
53826
53850
|
var apply = function apply() {
|
|
53827
53851
|
setCommitted(new Set(draft));
|
|
@@ -53847,7 +53871,15 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
53847
53871
|
else openPanel(true);
|
|
53848
53872
|
};
|
|
53849
53873
|
|
|
53850
|
-
//
|
|
53874
|
+
// openPanel() depuis un effet, donc APRÈS le premier rendu : la bascule dropdown/pop-in
|
|
53875
|
+
// se décide sur la largeur réelle du trigger. `defaultOpen` ouvre avant toute mesure.
|
|
53876
|
+
useEffect(function () {
|
|
53877
|
+
if (autoOpen) openPanel();
|
|
53878
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53879
|
+
}, []);
|
|
53880
|
+
|
|
53881
|
+
// Clic extérieur (dropdown seul) → abandon, convention des overlays non modaux.
|
|
53882
|
+
// Le pop-in, lui, ne se ferme que sur action explicite — cf. `dismissOnBackdrop`.
|
|
53851
53883
|
useEffect(function () {
|
|
53852
53884
|
if (!open || mode !== 'dropdown') return undefined;
|
|
53853
53885
|
var onDown = function onDown(e) {
|
|
@@ -53859,6 +53891,22 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
53859
53891
|
};
|
|
53860
53892
|
}, [open, mode]);
|
|
53861
53893
|
|
|
53894
|
+
// Échap où que soit le focus : les handlers de l'arbre et de la recherche ne couvrent
|
|
53895
|
+
// que ces deux éléments. Sortie clavier garantie du modal (rôle `dialog`).
|
|
53896
|
+
useEffect(function () {
|
|
53897
|
+
if (!open || mode !== 'popin') return undefined;
|
|
53898
|
+
var onKey = function onKey(e) {
|
|
53899
|
+
if (e.key === 'Escape') {
|
|
53900
|
+
e.stopPropagation();
|
|
53901
|
+
close();
|
|
53902
|
+
}
|
|
53903
|
+
};
|
|
53904
|
+
document.addEventListener('keydown', onKey);
|
|
53905
|
+
return function () {
|
|
53906
|
+
return document.removeEventListener('keydown', onKey);
|
|
53907
|
+
};
|
|
53908
|
+
}, [open, mode]);
|
|
53909
|
+
|
|
53862
53910
|
// Focus le champ de recherche à l'ouverture.
|
|
53863
53911
|
// preventScroll : sur la page Docs, plusieurs stories `defaultOpen` montées inline
|
|
53864
53912
|
// focaliseraient leur champ de recherche et feraient défiler la page vers le bas.
|
|
@@ -54049,10 +54097,10 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
54049
54097
|
|
|
54050
54098
|
// --- Rendu d'une ligne ---
|
|
54051
54099
|
|
|
54052
|
-
var renderRow = function renderRow(
|
|
54100
|
+
var renderRow = function renderRow(_ref3) {
|
|
54053
54101
|
var _node$children6;
|
|
54054
|
-
var node =
|
|
54055
|
-
depth =
|
|
54102
|
+
var node = _ref3.node,
|
|
54103
|
+
depth = _ref3.depth;
|
|
54056
54104
|
var hasChildren = ((_node$children6 = node.children) === null || _node$children6 === void 0 ? void 0 : _node$children6.length) > 0 || node.lazy; // lazy : dépliable même sans enfants chargés
|
|
54057
54105
|
var isValue = node.kind === 'value';
|
|
54058
54106
|
var color = node[nodeColorField] || TS_MUTED;
|
|
@@ -54248,9 +54296,9 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
54248
54296
|
};
|
|
54249
54297
|
|
|
54250
54298
|
// Ligne « Chargement… » (lazy-loading en cours).
|
|
54251
|
-
var renderLoadingRow = function renderLoadingRow(
|
|
54252
|
-
var id =
|
|
54253
|
-
depth =
|
|
54299
|
+
var renderLoadingRow = function renderLoadingRow(_ref4) {
|
|
54300
|
+
var id = _ref4.id,
|
|
54301
|
+
depth = _ref4.depth;
|
|
54254
54302
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
54255
54303
|
key: "loading-".concat(id),
|
|
54256
54304
|
className: "ts-row",
|
|
@@ -54278,10 +54326,10 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
54278
54326
|
};
|
|
54279
54327
|
|
|
54280
54328
|
// Ligne « Afficher plus » (pagination par branche).
|
|
54281
|
-
var renderLoadMore = function renderLoadMore(
|
|
54282
|
-
var id =
|
|
54283
|
-
remaining =
|
|
54284
|
-
depth =
|
|
54329
|
+
var renderLoadMore = function renderLoadMore(_ref5) {
|
|
54330
|
+
var id = _ref5.id,
|
|
54331
|
+
remaining = _ref5.remaining,
|
|
54332
|
+
depth = _ref5.depth;
|
|
54285
54333
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
54286
54334
|
key: "more-".concat(id),
|
|
54287
54335
|
className: "ts-row",
|
|
@@ -54320,7 +54368,9 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
54320
54368
|
className: "ts-modal-close",
|
|
54321
54369
|
"aria-label": "Fermer",
|
|
54322
54370
|
onClick: close
|
|
54323
|
-
},
|
|
54371
|
+
}, /*#__PURE__*/React__default.createElement(IconClear, {
|
|
54372
|
+
size: 14
|
|
54373
|
+
}))), filter && /*#__PURE__*/React__default.createElement("div", {
|
|
54324
54374
|
className: "ts-search"
|
|
54325
54375
|
}, /*#__PURE__*/React__default.createElement(IconSearch, null), /*#__PURE__*/React__default.createElement("input", {
|
|
54326
54376
|
ref: searchRef,
|
|
@@ -54371,7 +54421,7 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
54371
54421
|
onClick: close
|
|
54372
54422
|
}, "Annuler"), /*#__PURE__*/React__default.createElement("button", {
|
|
54373
54423
|
type: "button",
|
|
54374
|
-
className: "ts-apply ".concat(draftClean ? 'off' : ''),
|
|
54424
|
+
className: "ts-apply ".concat(draftClean ? 'ts-apply--off' : ''),
|
|
54375
54425
|
onClick: apply,
|
|
54376
54426
|
disabled: draftClean
|
|
54377
54427
|
}, "Appliquer ", /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -54416,7 +54466,7 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
54416
54466
|
style: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, invalid ? {
|
|
54417
54467
|
borderColor: '#e24c4c'
|
|
54418
54468
|
} : null), showClear && committedNodes.length > 0 ? {
|
|
54419
|
-
paddingRight:
|
|
54469
|
+
paddingRight: 88
|
|
54420
54470
|
} : null), disabled ? {
|
|
54421
54471
|
opacity: 0.55,
|
|
54422
54472
|
pointerEvents: 'none',
|
|
@@ -54477,7 +54527,7 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
54477
54527
|
e.stopPropagation();
|
|
54478
54528
|
setCommitted(new Set());
|
|
54479
54529
|
}
|
|
54480
|
-
},
|
|
54530
|
+
}, /*#__PURE__*/React__default.createElement(IconClear, null)), showExpand && !inert && /*#__PURE__*/React__default.createElement("span", {
|
|
54481
54531
|
className: "ts-expand",
|
|
54482
54532
|
role: "button",
|
|
54483
54533
|
tabIndex: -1,
|
|
@@ -54497,7 +54547,7 @@ var TreeSelectMaquette = function TreeSelectMaquette(_ref) {
|
|
|
54497
54547
|
}
|
|
54498
54548
|
}, panel(false))), open && mode === 'popin' && /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
54499
54549
|
className: "ts-backdrop",
|
|
54500
|
-
onClick: close
|
|
54550
|
+
onClick: dismissOnBackdrop ? close : undefined
|
|
54501
54551
|
}), panel(true)), document.body), tooltip && /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement("div", {
|
|
54502
54552
|
className: "ts-tooltip",
|
|
54503
54553
|
style: {
|
|
@@ -54988,30 +55038,95 @@ function changeCurrency(value, source, target) {
|
|
|
54988
55038
|
return parseFloat((value / srcRate * tgtRate).toFixed(decimal));
|
|
54989
55039
|
}
|
|
54990
55040
|
|
|
54991
|
-
|
|
54992
|
-
|
|
55041
|
+
// Colonne (`{ key, label }`) → modèle de la maquette (`{ id, label, kind }`). Sans `id`
|
|
55042
|
+
// l'arbre s'effondre (dédoublonnage par id) ; sans `kind: 'value'`, aucun badge cliquable.
|
|
55043
|
+
function toTreeSelectNodes(nodes) {
|
|
54993
55044
|
var keyField = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key';
|
|
54994
55045
|
var labelField = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'label';
|
|
54995
55046
|
if (!nodes) return [];
|
|
54996
55047
|
return nodes.map(function (node) {
|
|
55048
|
+
var _ref, _node$keyField, _node$children, _node$labelField, _node$kind;
|
|
55049
|
+
var key = String((_ref = (_node$keyField = node[keyField]) !== null && _node$keyField !== void 0 ? _node$keyField : node.key) !== null && _ref !== void 0 ? _ref : node.id);
|
|
55050
|
+
var children = (_node$children = node.children) !== null && _node$children !== void 0 && _node$children.length ? toTreeSelectNodes(node.children, keyField, labelField) : undefined;
|
|
54997
55051
|
return _objectSpread2(_objectSpread2({}, node), {}, {
|
|
54998
|
-
key:
|
|
54999
|
-
|
|
55000
|
-
|
|
55001
|
-
|
|
55052
|
+
key: key,
|
|
55053
|
+
id: key,
|
|
55054
|
+
label: (_node$labelField = node[labelField]) !== null && _node$labelField !== void 0 ? _node$labelField : node.label,
|
|
55055
|
+
kind: (_node$kind = node.kind) !== null && _node$kind !== void 0 ? _node$kind : node.selectable === false ? 'group' : 'value'
|
|
55056
|
+
}, children ? {
|
|
55057
|
+
children: children
|
|
55058
|
+
} : {});
|
|
55002
55059
|
});
|
|
55003
55060
|
}
|
|
55004
|
-
|
|
55005
|
-
|
|
55006
|
-
|
|
55007
|
-
|
|
55008
|
-
|
|
55009
|
-
|
|
55010
|
-
|
|
55011
|
-
|
|
55012
|
-
|
|
55061
|
+
|
|
55062
|
+
// Props de configuration de TreeSelectMaquette pilotables depuis la colonne. LISTE
|
|
55063
|
+
// UNIQUE : une nouvelle prop de la maquette s'expose en l'ajoutant ICI, et nulle part
|
|
55064
|
+
// ailleurs. Absentes volontairement — elles portent le câblage de la cellule, les
|
|
55065
|
+
// exposer permettrait de casser l'édition depuis une définition de colonne :
|
|
55066
|
+
// options / value / onChange / selectionMode (valeur et adaptation de l'arbre),
|
|
55067
|
+
// label (l'en-tête de colonne fait office de libellé), autoOpen / dismissOnBackdrop /
|
|
55068
|
+
// onPanelHide (cycle de vie panneau ↔ cellule), defaultOpen (ouvre avant la mesure de
|
|
55069
|
+
// largeur, donc toujours en dropdown), disabled / loading (l'état éditable vient de la
|
|
55070
|
+
// colonne et du mode), appendTo, defaultValue.
|
|
55071
|
+
var TREESELECT_COL_PROPS = [
|
|
55072
|
+
// Champ
|
|
55073
|
+
'placeholder', 'maxChips', 'showChips', 'display', 'summaryThreshold', 'showClear', 'showChipPath', 'showExpand', 'invalid', 'errorMessage',
|
|
55074
|
+
// Sélection
|
|
55075
|
+
'validate', 'showSelectAll', 'metaKeySelection', 'nodeColorField',
|
|
55076
|
+
// Recherche
|
|
55077
|
+
'filter', 'filterPlaceholder', 'filterMode', 'filterBy', 'filterDelay', 'resetFilterOnHide',
|
|
55078
|
+
// Arbre
|
|
55079
|
+
'scrollHeight', 'emptyMessage', 'showChildrenCount', 'branchPageSize', 'popin', 'onLoadChildren'];
|
|
55080
|
+
|
|
55081
|
+
/** Props déclarées par la colonne (une clé absente laisse le défaut en place). */
|
|
55082
|
+
var pickTreeSelectProps = function pickTreeSelectProps(col) {
|
|
55083
|
+
var out = {};
|
|
55084
|
+
TREESELECT_COL_PROPS.forEach(function (k) {
|
|
55085
|
+
if (col[k] !== undefined) out[k] = col[k];
|
|
55086
|
+
});
|
|
55087
|
+
return out;
|
|
55088
|
+
};
|
|
55089
|
+
|
|
55090
|
+
/** Clés sélectionnées d'une valeur de cellule (chaîne, tableau, ou map PrimeReact). */
|
|
55091
|
+
function selectedKeysFromCellValue(raw) {
|
|
55092
|
+
if (raw === null || raw === undefined || raw === '') return [];
|
|
55093
|
+
if (Array.isArray(raw)) return raw.map(String);
|
|
55094
|
+
if (_typeof$e(raw) === 'object') {
|
|
55095
|
+
return Object.keys(raw).filter(function (k) {
|
|
55096
|
+
var _raw$k;
|
|
55097
|
+
return raw[k] === true || _typeof$e(raw[k]) === 'object' && ((_raw$k = raw[k]) === null || _raw$k === void 0 ? void 0 : _raw$k.checked);
|
|
55013
55098
|
});
|
|
55014
55099
|
}
|
|
55100
|
+
return [String(raw)];
|
|
55101
|
+
}
|
|
55102
|
+
|
|
55103
|
+
/** Valeur de cellule → valeur TreeSelectMaquette (nœud en `single`, tableau d'ids sinon). */
|
|
55104
|
+
function toTreeSelectValue(raw, selectionMode) {
|
|
55105
|
+
var keys = selectedKeysFromCellValue(raw);
|
|
55106
|
+
if (selectionMode === 'single') return keys.length ? {
|
|
55107
|
+
id: keys[0]
|
|
55108
|
+
} : null;
|
|
55109
|
+
return keys;
|
|
55110
|
+
}
|
|
55111
|
+
|
|
55112
|
+
/** Valeur maquette → format documenté de la colonne : chaîne en `single`, map `{ key: { checked } }` sinon. */
|
|
55113
|
+
function fromTreeSelectValue(val, selectionMode) {
|
|
55114
|
+
var _val$id;
|
|
55115
|
+
if (selectionMode === 'single') return (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : null;
|
|
55116
|
+
var ids = Array.isArray(val) ? val : [];
|
|
55117
|
+
if (!ids.length) return null;
|
|
55118
|
+
return ids.reduce(function (acc, id) {
|
|
55119
|
+
acc[id] = {
|
|
55120
|
+
checked: true,
|
|
55121
|
+
partialChecked: false
|
|
55122
|
+
};
|
|
55123
|
+
return acc;
|
|
55124
|
+
}, {});
|
|
55125
|
+
}
|
|
55126
|
+
function findTreeNodes(value, nodes) {
|
|
55127
|
+
if (!value || !nodes) return [];
|
|
55128
|
+
// Une seule règle de lecture de la valeur pour l'affichage et pour l'éditeur.
|
|
55129
|
+
var selectedKeys = selectedKeysFromCellValue(value);
|
|
55015
55130
|
var result = [];
|
|
55016
55131
|
function traverse(list) {
|
|
55017
55132
|
var _iterator = _createForOfIteratorHelper$4(list),
|
|
@@ -55048,10 +55163,72 @@ function textColorForBg(hex) {
|
|
|
55048
55163
|
// Compteur global de séquence des éditeurs de cellule : sert à garantir qu'un
|
|
55049
55164
|
// seul éditeur inline est ouvert à la fois (hors mode édition de ligne).
|
|
55050
55165
|
var cellEditorSeq = 0;
|
|
55051
|
-
|
|
55052
|
-
|
|
55053
|
-
|
|
55054
|
-
|
|
55166
|
+
|
|
55167
|
+
// ─── Éditeurs de cellule : surfaces portées hors du <td> ──────────────────────
|
|
55168
|
+
// Un overlay porté (portail React, `appendTo={body}`) vit hors du <td> : un mousedown
|
|
55169
|
+
// dedans n'est PAS un clic extérieur. LISTE UNIQUE — tout nouvel overlay s'ajoute ici.
|
|
55170
|
+
var PORTALED_OVERLAY_SELECTOR = ['.p-dropdown-panel',
|
|
55171
|
+
// Dropdown / SelectSimple (appendTo body)
|
|
55172
|
+
'.p-datepicker',
|
|
55173
|
+
// DatePicker PrimeReact
|
|
55174
|
+
'.datepickerbook',
|
|
55175
|
+
// DatePicker arengibook
|
|
55176
|
+
'.p-multiselect-panel',
|
|
55177
|
+
// MultiSelect
|
|
55178
|
+
'.p-dialog',
|
|
55179
|
+
// éditeur html (Dialog appendTo body)
|
|
55180
|
+
'.ts-panel',
|
|
55181
|
+
// TreeSelect : panneau (dropdown ET pop-in portée body)
|
|
55182
|
+
'.ts-backdrop',
|
|
55183
|
+
// TreeSelect : voile du pop-in
|
|
55184
|
+
'.ts-tooltip' // TreeSelect : infobulle (portée body)
|
|
55185
|
+
].join(', ');
|
|
55186
|
+
|
|
55187
|
+
/** Le mousedown vise-t-il un overlay porté (donc PAS un clic « extérieur ») ? */
|
|
55188
|
+
var isInPortaledOverlay = function isInPortaledOverlay(target) {
|
|
55189
|
+
var _target$closest;
|
|
55190
|
+
return !!(target !== null && target !== void 0 && (_target$closest = target.closest) !== null && _target$closest !== void 0 && _target$closest.call(target, PORTALED_OVERLAY_SELECTOR));
|
|
55191
|
+
};
|
|
55192
|
+
|
|
55193
|
+
// Un seul éditeur ouvert à la fois — désactivé en rowEdit, où toute la ligne édite.
|
|
55194
|
+
// Partagé par SelfEditableCell / TreeSelectBodyCell / DeviseBodyCell.
|
|
55195
|
+
var useSingleOpenCellEditor = function useSingleOpenCellEditor(active, onOtherOpen) {
|
|
55196
|
+
var cbRef = useRef(onOtherOpen);
|
|
55197
|
+
cbRef.current = onOtherOpen;
|
|
55198
|
+
useEffect(function () {
|
|
55199
|
+
if (!active) return undefined;
|
|
55200
|
+
var myId = ++cellEditorSeq;
|
|
55201
|
+
var handler = function handler(e) {
|
|
55202
|
+
var _cbRef$current;
|
|
55203
|
+
if (e.detail !== myId) (_cbRef$current = cbRef.current) === null || _cbRef$current === void 0 || _cbRef$current.call(cbRef);
|
|
55204
|
+
};
|
|
55205
|
+
document.addEventListener('ab-cell-editor-open', handler);
|
|
55206
|
+
document.dispatchEvent(new CustomEvent('ab-cell-editor-open', {
|
|
55207
|
+
detail: myId
|
|
55208
|
+
}));
|
|
55209
|
+
return function () {
|
|
55210
|
+
return document.removeEventListener('ab-cell-editor-open', handler);
|
|
55211
|
+
};
|
|
55212
|
+
}, [active]);
|
|
55213
|
+
};
|
|
55214
|
+
var IconCellClear = function IconCellClear() {
|
|
55215
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
55216
|
+
width: "9",
|
|
55217
|
+
height: "9",
|
|
55218
|
+
viewBox: "0 0 12 12",
|
|
55219
|
+
"aria-hidden": "true"
|
|
55220
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
55221
|
+
d: "M3 3l6 6M9 3l-6 6",
|
|
55222
|
+
stroke: "currentColor",
|
|
55223
|
+
strokeWidth: "2",
|
|
55224
|
+
fill: "none",
|
|
55225
|
+
strokeLinecap: "round"
|
|
55226
|
+
}));
|
|
55227
|
+
};
|
|
55228
|
+
var HoverTooltip = function HoverTooltip(_ref2) {
|
|
55229
|
+
var lines = _ref2.lines,
|
|
55230
|
+
children = _ref2.children,
|
|
55231
|
+
style = _ref2.style;
|
|
55055
55232
|
var _useState = useState(null),
|
|
55056
55233
|
_useState2 = _slicedToArray$b(_useState, 2),
|
|
55057
55234
|
pos = _useState2[0],
|
|
@@ -55106,10 +55283,10 @@ var HoverTooltip = function HoverTooltip(_ref) {
|
|
|
55106
55283
|
* key)` (= la prop `onButtonClick` du Table, même contrat que les colonnes `type: button`),
|
|
55107
55284
|
* ou `action.onClick(rowData)` si fourni.
|
|
55108
55285
|
*/
|
|
55109
|
-
var RowActionsInlineCell = function RowActionsInlineCell(
|
|
55110
|
-
var actions =
|
|
55111
|
-
rowData =
|
|
55112
|
-
onAction =
|
|
55286
|
+
var RowActionsInlineCell = function RowActionsInlineCell(_ref3) {
|
|
55287
|
+
var actions = _ref3.actions,
|
|
55288
|
+
rowData = _ref3.rowData,
|
|
55289
|
+
onAction = _ref3.onAction;
|
|
55113
55290
|
return (
|
|
55114
55291
|
/*#__PURE__*/
|
|
55115
55292
|
// width 100% : la cellule .row-actions-cell est en padding 0 → sans elle le flex
|
|
@@ -55166,10 +55343,10 @@ var RowActionsInlineCell = function RowActionsInlineCell(_ref2) {
|
|
|
55166
55343
|
}))
|
|
55167
55344
|
);
|
|
55168
55345
|
};
|
|
55169
|
-
var RowActionsCell = function RowActionsCell(
|
|
55170
|
-
var actions =
|
|
55171
|
-
rowData =
|
|
55172
|
-
href =
|
|
55346
|
+
var RowActionsCell = function RowActionsCell(_ref4) {
|
|
55347
|
+
var actions = _ref4.actions,
|
|
55348
|
+
rowData = _ref4.rowData,
|
|
55349
|
+
href = _ref4.href;
|
|
55173
55350
|
var _useState3 = useState(false),
|
|
55174
55351
|
_useState4 = _slicedToArray$b(_useState3, 2),
|
|
55175
55352
|
open = _useState4[0],
|
|
@@ -55320,10 +55497,10 @@ var RowActionsCell = function RowActionsCell(_ref3) {
|
|
|
55320
55497
|
} else {
|
|
55321
55498
|
extraAttrs.href = actionHref;
|
|
55322
55499
|
}
|
|
55323
|
-
if (action.data) Object.entries(action.data).forEach(function (
|
|
55324
|
-
var
|
|
55325
|
-
k =
|
|
55326
|
-
v =
|
|
55500
|
+
if (action.data) Object.entries(action.data).forEach(function (_ref5) {
|
|
55501
|
+
var _ref6 = _slicedToArray$b(_ref5, 2),
|
|
55502
|
+
k = _ref6[0],
|
|
55503
|
+
v = _ref6[1];
|
|
55327
55504
|
extraAttrs[k] = v;
|
|
55328
55505
|
});
|
|
55329
55506
|
return /*#__PURE__*/React__default.createElement("a", _extends$G({
|
|
@@ -55378,14 +55555,14 @@ var RowActionsCell = function RowActionsCell(_ref3) {
|
|
|
55378
55555
|
}
|
|
55379
55556
|
}, "settings")), dropdown);
|
|
55380
55557
|
};
|
|
55381
|
-
var DeviseBodyCell = function DeviseBodyCell(
|
|
55558
|
+
var DeviseBodyCell = function DeviseBodyCell(_ref7) {
|
|
55382
55559
|
var _col$devises, _col$decimal, _cellDevise$code;
|
|
55383
|
-
var rowData =
|
|
55384
|
-
col =
|
|
55385
|
-
editable =
|
|
55386
|
-
|
|
55387
|
-
isRowEditing =
|
|
55388
|
-
onSave =
|
|
55560
|
+
var rowData = _ref7.rowData,
|
|
55561
|
+
col = _ref7.col,
|
|
55562
|
+
editable = _ref7.editable,
|
|
55563
|
+
_ref7$isRowEditing = _ref7.isRowEditing,
|
|
55564
|
+
isRowEditing = _ref7$isRowEditing === void 0 ? false : _ref7$isRowEditing,
|
|
55565
|
+
onSave = _ref7.onSave;
|
|
55389
55566
|
var _useState9 = useState(false),
|
|
55390
55567
|
_useState0 = _slicedToArray$b(_useState9, 2),
|
|
55391
55568
|
editing = _useState0[0],
|
|
@@ -55412,10 +55589,10 @@ var DeviseBodyCell = function DeviseBodyCell(_ref6) {
|
|
|
55412
55589
|
setDevise(val);
|
|
55413
55590
|
};
|
|
55414
55591
|
var openEdit = function openEdit() {
|
|
55415
|
-
var _displayCell$value,
|
|
55592
|
+
var _displayCell$value, _ref8, _ref9, _displayCell$devise;
|
|
55416
55593
|
if (!editable) return;
|
|
55417
55594
|
setAmount((_displayCell$value = displayCell === null || displayCell === void 0 ? void 0 : displayCell.value) !== null && _displayCell$value !== void 0 ? _displayCell$value : '');
|
|
55418
|
-
var initialDevise = (
|
|
55595
|
+
var initialDevise = (_ref8 = (_ref9 = (_displayCell$devise = displayCell === null || displayCell === void 0 ? void 0 : displayCell.devise) !== null && _displayCell$devise !== void 0 ? _displayCell$devise : col.currency) !== null && _ref9 !== void 0 ? _ref9 : devises[0]) !== null && _ref8 !== void 0 ? _ref8 : null;
|
|
55419
55596
|
deviseRef.current = initialDevise;
|
|
55420
55597
|
setDevise(initialDevise);
|
|
55421
55598
|
setEditing(true);
|
|
@@ -55424,9 +55601,9 @@ var DeviseBodyCell = function DeviseBodyCell(_ref6) {
|
|
|
55424
55601
|
// Sync avec le mode row edit : auto-ouvrir / fermer
|
|
55425
55602
|
useEffect(function () {
|
|
55426
55603
|
if (isRowEditing && !editing) {
|
|
55427
|
-
var _displayCell$value2,
|
|
55604
|
+
var _displayCell$value2, _ref0, _ref1, _displayCell$devise2;
|
|
55428
55605
|
setAmount((_displayCell$value2 = displayCell === null || displayCell === void 0 ? void 0 : displayCell.value) !== null && _displayCell$value2 !== void 0 ? _displayCell$value2 : '');
|
|
55429
|
-
var initialDevise = (
|
|
55606
|
+
var initialDevise = (_ref0 = (_ref1 = (_displayCell$devise2 = displayCell === null || displayCell === void 0 ? void 0 : displayCell.devise) !== null && _displayCell$devise2 !== void 0 ? _displayCell$devise2 : col.currency) !== null && _ref1 !== void 0 ? _ref1 : devises[0]) !== null && _ref0 !== void 0 ? _ref0 : null;
|
|
55430
55607
|
deviseRef.current = initialDevise;
|
|
55431
55608
|
setDevise(initialDevise);
|
|
55432
55609
|
setEditing(true);
|
|
@@ -55449,10 +55626,14 @@ var DeviseBodyCell = function DeviseBodyCell(_ref6) {
|
|
|
55449
55626
|
onSave(newCell);
|
|
55450
55627
|
setEditing(false);
|
|
55451
55628
|
};
|
|
55629
|
+
|
|
55630
|
+
// Clic extérieur → abandon (rien n'est enregistré sans « Enregistrer »). Le panneau
|
|
55631
|
+
// devise reste dans le <td> (`appendTo="self"`) : le garde-fou est préventif.
|
|
55452
55632
|
useEffect(function () {
|
|
55453
55633
|
if (!editing || isRowEditing) return;
|
|
55454
55634
|
var handler = function handler(e) {
|
|
55455
55635
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
55636
|
+
if (isInPortaledOverlay(e.target)) return;
|
|
55456
55637
|
setEditing(false);
|
|
55457
55638
|
}
|
|
55458
55639
|
};
|
|
@@ -55461,6 +55642,11 @@ var DeviseBodyCell = function DeviseBodyCell(_ref6) {
|
|
|
55461
55642
|
return document.removeEventListener('mousedown', handler);
|
|
55462
55643
|
};
|
|
55463
55644
|
}, [editing, isRowEditing]);
|
|
55645
|
+
|
|
55646
|
+
// Un autre éditeur s'ouvre → on ferme (sans enregistrer, comme le clic extérieur).
|
|
55647
|
+
useSingleOpenCellEditor(editing && !isRowEditing, function () {
|
|
55648
|
+
return setEditing(false);
|
|
55649
|
+
});
|
|
55464
55650
|
if (editing) {
|
|
55465
55651
|
var devisesOptions = devises.map(function (d) {
|
|
55466
55652
|
return {
|
|
@@ -55524,63 +55710,77 @@ var DeviseBodyCell = function DeviseBodyCell(_ref6) {
|
|
|
55524
55710
|
className: "span-sub"
|
|
55525
55711
|
}, "".concat(numberWithSpaces(value), " ").concat(cellDevise.code)));
|
|
55526
55712
|
};
|
|
55527
|
-
var TreeSelectBodyCell = function TreeSelectBodyCell(
|
|
55528
|
-
var
|
|
55529
|
-
|
|
55530
|
-
|
|
55531
|
-
|
|
55532
|
-
isRowEditing =
|
|
55533
|
-
|
|
55713
|
+
var TreeSelectBodyCell = function TreeSelectBodyCell(_ref10) {
|
|
55714
|
+
var _col$selectionMode, _col$clearable;
|
|
55715
|
+
var rowData = _ref10.rowData,
|
|
55716
|
+
col = _ref10.col,
|
|
55717
|
+
editable = _ref10.editable,
|
|
55718
|
+
_ref10$isRowEditing = _ref10.isRowEditing,
|
|
55719
|
+
isRowEditing = _ref10$isRowEditing === void 0 ? false : _ref10$isRowEditing,
|
|
55720
|
+
onSave = _ref10.onSave;
|
|
55534
55721
|
var _useState15 = useState(false),
|
|
55535
55722
|
_useState16 = _slicedToArray$b(_useState15, 2),
|
|
55536
55723
|
editing = _useState16[0],
|
|
55537
55724
|
setEditing = _useState16[1];
|
|
55538
55725
|
var containerRef = useRef(null);
|
|
55726
|
+
var selectionMode = (_col$selectionMode = col.selectionMode) !== null && _col$selectionMode !== void 0 ? _col$selectionMode : 'single';
|
|
55727
|
+
// Arborescence au modèle de la maquette ({ id, label, kind }) : sans cette
|
|
55728
|
+
// adaptation aucun nœud n'est sélectionnable (cf. toTreeSelectNodes).
|
|
55539
55729
|
var mappedOptions = useMemo(function () {
|
|
55540
55730
|
var _col$keyField, _col$labelField;
|
|
55541
|
-
return
|
|
55731
|
+
return toTreeSelectNodes(col.options, (_col$keyField = col.keyField) !== null && _col$keyField !== void 0 ? _col$keyField : 'key', (_col$labelField = col.labelField) !== null && _col$labelField !== void 0 ? _col$labelField : 'label');
|
|
55542
55732
|
}, [col.options, col.keyField, col.labelField]);
|
|
55543
55733
|
|
|
55544
|
-
// savedValue : valeur confirmée,
|
|
55734
|
+
// savedValue : valeur confirmée, au format de données de la colonne.
|
|
55735
|
+
// La maquette gère elle-même son brouillon interne — pas de copie locale ici.
|
|
55545
55736
|
var _useState17 = useState(rowData[col.field]),
|
|
55546
55737
|
_useState18 = _slicedToArray$b(_useState17, 2),
|
|
55547
55738
|
savedValue = _useState18[0],
|
|
55548
55739
|
setSavedValue = _useState18[1];
|
|
55549
|
-
// editValue : valeur courante dans l'éditeur, peut être transitoire
|
|
55550
|
-
var _useState19 = useState(null),
|
|
55551
|
-
_useState20 = _slicedToArray$b(_useState19, 2),
|
|
55552
|
-
editValue = _useState20[0],
|
|
55553
|
-
setEditValue = _useState20[1];
|
|
55554
55740
|
var openEdit = function openEdit() {
|
|
55555
55741
|
if (!editable) return;
|
|
55556
|
-
setEditValue(savedValue);
|
|
55557
55742
|
setEditing(true);
|
|
55558
55743
|
};
|
|
55559
55744
|
|
|
55560
55745
|
// Sync avec le mode row edit : auto-ouvrir / fermer
|
|
55561
55746
|
useEffect(function () {
|
|
55562
55747
|
if (isRowEditing && !editing) {
|
|
55563
|
-
setEditValue(savedValue);
|
|
55564
55748
|
setEditing(true);
|
|
55565
55749
|
} else if (!isRowEditing && editing) {
|
|
55566
55750
|
setEditing(false);
|
|
55567
55751
|
}
|
|
55568
55752
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55569
55753
|
}, [isRowEditing]);
|
|
55570
|
-
|
|
55571
|
-
|
|
55572
|
-
|
|
55573
|
-
|
|
55574
|
-
|
|
55575
|
-
|
|
55576
|
-
|
|
55577
|
-
onSave(val !== null && val !== void 0 ? val : null);
|
|
55754
|
+
|
|
55755
|
+
// onChange de la maquette reçoit la VALEUR (nœud en `single`, ids sinon), pas un
|
|
55756
|
+
// événement `{ value }` : on la retraduit au format de la colonne avant d'enregistrer.
|
|
55757
|
+
var handleChange = function handleChange(val) {
|
|
55758
|
+
var next = fromTreeSelectValue(val, selectionMode);
|
|
55759
|
+
setSavedValue(next);
|
|
55760
|
+
onSave(next);
|
|
55578
55761
|
};
|
|
55762
|
+
|
|
55763
|
+
// Retrait d'une valeur depuis la cellule fermée (col.clearable), sans ouvrir
|
|
55764
|
+
// l'éditeur : en `single` la cellule se vide, sinon seule la clé retirée disparaît.
|
|
55765
|
+
var removeValue = function removeValue(key) {
|
|
55766
|
+
var rest = selectedKeysFromCellValue(savedValue).filter(function (k) {
|
|
55767
|
+
return k !== String(key);
|
|
55768
|
+
});
|
|
55769
|
+
var asMaquette = selectionMode === 'single' ? rest[0] ? {
|
|
55770
|
+
id: rest[0]
|
|
55771
|
+
} : null : rest;
|
|
55772
|
+
var next = fromTreeSelectValue(asMaquette, selectionMode);
|
|
55773
|
+
setSavedValue(next);
|
|
55774
|
+
onSave(next);
|
|
55775
|
+
};
|
|
55776
|
+
|
|
55777
|
+
// Clic extérieur → sortie d'édition. Le panneau est porté dans `body` sous
|
|
55778
|
+
// POPIN_THRESHOLD : sans isInPortaledOverlay, chaque clic dedans refermait l'éditeur.
|
|
55579
55779
|
useEffect(function () {
|
|
55580
55780
|
if (!editing || isRowEditing) return;
|
|
55581
55781
|
var handler = function handler(e) {
|
|
55582
55782
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
55583
|
-
if (e.target
|
|
55783
|
+
if (isInPortaledOverlay(e.target)) return;
|
|
55584
55784
|
setEditing(false);
|
|
55585
55785
|
}
|
|
55586
55786
|
};
|
|
@@ -55589,31 +55789,62 @@ var TreeSelectBodyCell = function TreeSelectBodyCell(_ref1) {
|
|
|
55589
55789
|
return document.removeEventListener('mousedown', handler);
|
|
55590
55790
|
};
|
|
55591
55791
|
}, [editing, isRowEditing]);
|
|
55792
|
+
|
|
55793
|
+
// Un autre éditeur s'ouvre → fermeture SANS enregistrer, le brouillon n'ayant pas
|
|
55794
|
+
// été validé. Même sémantique que le type `date` dans SelfEditableCell.
|
|
55795
|
+
useSingleOpenCellEditor(editing && !isRowEditing, function () {
|
|
55796
|
+
return setEditing(false);
|
|
55797
|
+
});
|
|
55592
55798
|
if (editing) {
|
|
55593
|
-
var _col$selectionMode, _col$filter, _col$display, _col$nodeColorField;
|
|
55594
55799
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
55595
55800
|
ref: containerRef,
|
|
55596
55801
|
style: {
|
|
55597
55802
|
position: 'relative'
|
|
55598
55803
|
}
|
|
55599
|
-
}, /*#__PURE__*/React__default.createElement(TreeSelectMaquette
|
|
55804
|
+
}, /*#__PURE__*/React__default.createElement(TreeSelectMaquette
|
|
55805
|
+
// 1. Défauts propres à la cellule, là où ils diffèrent de la maquette :
|
|
55806
|
+
// chrome inutile dans un <td>, et coloration en opt-in par colonne.
|
|
55807
|
+
, _extends$G({
|
|
55600
55808
|
label: null,
|
|
55601
55809
|
showExpand: false,
|
|
55810
|
+
filter: false,
|
|
55811
|
+
display: "comma",
|
|
55812
|
+
nodeColorField: null,
|
|
55813
|
+
showClear: true
|
|
55814
|
+
// Sorties explicites Annuler / Appliquer, donc une seule écriture par
|
|
55815
|
+
// édition (et non une par case cochée). `col.validate: false` = immédiat.
|
|
55816
|
+
,
|
|
55817
|
+
validate: true,
|
|
55818
|
+
showSelectAll: selectionMode !== 'single'
|
|
55819
|
+
|
|
55820
|
+
// 2. Tout ce que la colonne déclare (cf. TREESELECT_COL_PROPS) écrase
|
|
55821
|
+
// les défauts ci-dessus. Une nouvelle prop s'expose dans cette liste.
|
|
55822
|
+
}, pickTreeSelectProps(col), {
|
|
55823
|
+
// 3. Câblage de la cellule — placé APRÈS le spread : non surchargeable
|
|
55824
|
+
// depuis une colonne, sous peine de casser l'édition.
|
|
55602
55825
|
options: mappedOptions,
|
|
55603
|
-
value:
|
|
55826
|
+
value: toTreeSelectValue(savedValue, selectionMode),
|
|
55604
55827
|
onChange: handleChange,
|
|
55605
|
-
selectionMode:
|
|
55606
|
-
|
|
55607
|
-
|
|
55608
|
-
|
|
55609
|
-
|
|
55610
|
-
|
|
55611
|
-
|
|
55612
|
-
|
|
55613
|
-
|
|
55614
|
-
|
|
55828
|
+
selectionMode: selectionMode
|
|
55829
|
+
// Un seul clic pour éditer, comme les autres types. autoOpen mesure
|
|
55830
|
+
// le trigger avant de choisir dropdown ou pop-in.
|
|
55831
|
+
,
|
|
55832
|
+
autoOpen: !isRowEditing
|
|
55833
|
+
// Modal strict — redondant avec le défaut de la maquette, gardé explicite :
|
|
55834
|
+
// en cellule, un clic à côté de la pop-in centrée jetterait l'édition.
|
|
55835
|
+
,
|
|
55836
|
+
dismissOnBackdrop: false
|
|
55837
|
+
// Fermeture du panneau = fin d'édition de la cellule. Même contrat que
|
|
55838
|
+
// l'`onPanelHide` du DatePicker dans SelfEditableCell.
|
|
55839
|
+
,
|
|
55840
|
+
onPanelHide: function onPanelHide() {
|
|
55841
|
+
if (!isRowEditing) setEditing(false);
|
|
55842
|
+
}
|
|
55843
|
+
})));
|
|
55615
55844
|
}
|
|
55616
55845
|
var selectedNodes = findTreeNodes(savedValue, mappedOptions);
|
|
55846
|
+
// Croix de retrait : opt-in par colonne, et jamais sur une cellule non éditable.
|
|
55847
|
+
var clearable = ((_col$clearable = col.clearable) !== null && _col$clearable !== void 0 ? _col$clearable : false) && editable;
|
|
55617
55848
|
if (!selectedNodes.length) return /*#__PURE__*/React__default.createElement("div", {
|
|
55618
55849
|
style: {
|
|
55619
55850
|
cursor: editable ? 'pointer' : 'default',
|
|
@@ -55625,11 +55856,25 @@ var TreeSelectBodyCell = function TreeSelectBodyCell(_ref1) {
|
|
|
55625
55856
|
openEdit();
|
|
55626
55857
|
}
|
|
55627
55858
|
});
|
|
55628
|
-
|
|
55859
|
+
// Badges bornés à la largeur de la cellule, ellipsis sur l'intitulé + intitulé
|
|
55860
|
+
// complet au survol — même traitement que selectTemplate. Sans lui, le <td>
|
|
55861
|
+
// (overflow: hidden) coupait le libellé en plein milieu d'une lettre.
|
|
55862
|
+
return /*#__PURE__*/React__default.createElement(HoverTooltip, {
|
|
55863
|
+
lines: selectedNodes.map(function (n) {
|
|
55864
|
+
return n.label;
|
|
55865
|
+
}),
|
|
55866
|
+
style: {
|
|
55867
|
+
display: 'block',
|
|
55868
|
+
maxWidth: '100%',
|
|
55869
|
+
minWidth: 0
|
|
55870
|
+
}
|
|
55871
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
55629
55872
|
style: {
|
|
55630
55873
|
display: 'flex',
|
|
55631
55874
|
flexWrap: 'wrap',
|
|
55632
55875
|
gap: '2px',
|
|
55876
|
+
maxWidth: '100%',
|
|
55877
|
+
minWidth: 0,
|
|
55633
55878
|
cursor: editable ? 'pointer' : 'default'
|
|
55634
55879
|
},
|
|
55635
55880
|
onClick: openEdit
|
|
@@ -55642,25 +55887,45 @@ var TreeSelectBodyCell = function TreeSelectBodyCell(_ref1) {
|
|
|
55642
55887
|
className: "tab_label",
|
|
55643
55888
|
style: {
|
|
55644
55889
|
backgroundColor: bg,
|
|
55645
|
-
color: fg
|
|
55890
|
+
color: fg,
|
|
55891
|
+
display: 'inline-flex',
|
|
55892
|
+
alignItems: 'center',
|
|
55893
|
+
maxWidth: '100%',
|
|
55894
|
+
minWidth: 0
|
|
55646
55895
|
}
|
|
55647
|
-
},
|
|
55648
|
-
|
|
55896
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
55897
|
+
style: {
|
|
55898
|
+
overflow: 'hidden',
|
|
55899
|
+
textOverflow: 'ellipsis',
|
|
55900
|
+
whiteSpace: 'nowrap'
|
|
55901
|
+
}
|
|
55902
|
+
}, node.label), clearable && /*#__PURE__*/React__default.createElement("button", {
|
|
55903
|
+
type: "button",
|
|
55904
|
+
className: "tab_label-clear",
|
|
55905
|
+
"aria-label": translate('arengibook.table.action.delete'),
|
|
55906
|
+
title: translate('arengibook.table.action.delete'),
|
|
55907
|
+
onClick: function onClick(e) {
|
|
55908
|
+
var _node$key;
|
|
55909
|
+
e.stopPropagation();
|
|
55910
|
+
removeValue((_node$key = node.key) !== null && _node$key !== void 0 ? _node$key : node.id);
|
|
55911
|
+
}
|
|
55912
|
+
}, /*#__PURE__*/React__default.createElement(IconCellClear, null)));
|
|
55913
|
+
})));
|
|
55649
55914
|
};
|
|
55650
|
-
var DocumentEditorCell = function DocumentEditorCell(
|
|
55915
|
+
var DocumentEditorCell = function DocumentEditorCell(_ref11) {
|
|
55651
55916
|
var _options$value;
|
|
55652
|
-
var options =
|
|
55653
|
-
col =
|
|
55654
|
-
onFilePickerOpen =
|
|
55655
|
-
onFilePickerClose =
|
|
55656
|
-
var
|
|
55657
|
-
|
|
55658
|
-
uploading =
|
|
55659
|
-
setUploading =
|
|
55917
|
+
var options = _ref11.options,
|
|
55918
|
+
col = _ref11.col,
|
|
55919
|
+
onFilePickerOpen = _ref11.onFilePickerOpen,
|
|
55920
|
+
onFilePickerClose = _ref11.onFilePickerClose;
|
|
55921
|
+
var _useState19 = useState(false),
|
|
55922
|
+
_useState20 = _slicedToArray$b(_useState19, 2),
|
|
55923
|
+
uploading = _useState20[0],
|
|
55924
|
+
setUploading = _useState20[1];
|
|
55660
55925
|
var fileInputRef = useRef(null);
|
|
55661
55926
|
var docs = (_options$value = options.value) !== null && _options$value !== void 0 ? _options$value : [];
|
|
55662
55927
|
var handleFileChange = /*#__PURE__*/function () {
|
|
55663
|
-
var
|
|
55928
|
+
var _ref12 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(e) {
|
|
55664
55929
|
var file, formData, res, data, _t, _t2;
|
|
55665
55930
|
return _regenerator().w(function (_context) {
|
|
55666
55931
|
while (1) switch (_context.n) {
|
|
@@ -55715,7 +55980,7 @@ var DocumentEditorCell = function DocumentEditorCell(_ref10) {
|
|
|
55715
55980
|
}, _callee, null, [[2,, 7, 8]]);
|
|
55716
55981
|
}));
|
|
55717
55982
|
return function handleFileChange(_x) {
|
|
55718
|
-
return
|
|
55983
|
+
return _ref12.apply(this, arguments);
|
|
55719
55984
|
};
|
|
55720
55985
|
}();
|
|
55721
55986
|
var handlePickerClick = function handlePickerClick() {
|
|
@@ -55798,25 +56063,25 @@ var DocumentEditorCell = function DocumentEditorCell(_ref10) {
|
|
|
55798
56063
|
onChange: handleFileChange
|
|
55799
56064
|
}));
|
|
55800
56065
|
};
|
|
55801
|
-
var SelfEditableCell = function SelfEditableCell(
|
|
56066
|
+
var SelfEditableCell = function SelfEditableCell(_ref13) {
|
|
55802
56067
|
var _col$header;
|
|
55803
|
-
var rowData =
|
|
55804
|
-
col =
|
|
55805
|
-
editable =
|
|
55806
|
-
isRowEditing =
|
|
55807
|
-
onSave =
|
|
55808
|
-
renderDisplay =
|
|
55809
|
-
onCreateTag =
|
|
55810
|
-
onTagCreated =
|
|
55811
|
-
labels =
|
|
55812
|
-
var
|
|
56068
|
+
var rowData = _ref13.rowData,
|
|
56069
|
+
col = _ref13.col,
|
|
56070
|
+
editable = _ref13.editable,
|
|
56071
|
+
isRowEditing = _ref13.isRowEditing,
|
|
56072
|
+
onSave = _ref13.onSave,
|
|
56073
|
+
renderDisplay = _ref13.renderDisplay,
|
|
56074
|
+
onCreateTag = _ref13.onCreateTag,
|
|
56075
|
+
onTagCreated = _ref13.onTagCreated,
|
|
56076
|
+
labels = _ref13.labels;
|
|
56077
|
+
var _useState21 = useState(false),
|
|
56078
|
+
_useState22 = _slicedToArray$b(_useState21, 2),
|
|
56079
|
+
editing = _useState22[0],
|
|
56080
|
+
setEditing = _useState22[1];
|
|
56081
|
+
var _useState23 = useState(rowData[col.field]),
|
|
55813
56082
|
_useState24 = _slicedToArray$b(_useState23, 2),
|
|
55814
|
-
|
|
55815
|
-
|
|
55816
|
-
var _useState25 = useState(rowData[col.field]),
|
|
55817
|
-
_useState26 = _slicedToArray$b(_useState25, 2),
|
|
55818
|
-
localValue = _useState26[0],
|
|
55819
|
-
setLocalValue = _useState26[1];
|
|
56083
|
+
localValue = _useState24[0],
|
|
56084
|
+
setLocalValue = _useState24[1];
|
|
55820
56085
|
var containerRef = useRef(null);
|
|
55821
56086
|
var localValueRef = useRef(localValue);
|
|
55822
56087
|
var committedRef = useRef(false);
|
|
@@ -55876,7 +56141,7 @@ var SelfEditableCell = function SelfEditableCell(_ref12) {
|
|
|
55876
56141
|
if (!editing || isRowEditing || col.type === 'date' || col.type === 'html') return;
|
|
55877
56142
|
var handler = function handler(e) {
|
|
55878
56143
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
55879
|
-
if (e.target
|
|
56144
|
+
if (isInPortaledOverlay(e.target)) return;
|
|
55880
56145
|
commit(localValueRef.current);
|
|
55881
56146
|
}
|
|
55882
56147
|
};
|
|
@@ -55892,21 +56157,9 @@ var SelfEditableCell = function SelfEditableCell(_ref12) {
|
|
|
55892
56157
|
// clic extérieur) ; la date se FERME sans commit (sinon on enregistrerait une
|
|
55893
56158
|
// valeur jamais choisie). C'est le correctif du champ date qui restait en
|
|
55894
56159
|
// édition à l'ouverture d'un autre champ (R57-38.8).
|
|
55895
|
-
|
|
55896
|
-
if (
|
|
55897
|
-
|
|
55898
|
-
var onOtherEditorOpen = function onOtherEditorOpen(e) {
|
|
55899
|
-
if (e.detail === myId) return;
|
|
55900
|
-
if (col.type === 'date' || col.type === 'html') setEditing(false);else commit(localValueRef.current);
|
|
55901
|
-
};
|
|
55902
|
-
document.addEventListener('ab-cell-editor-open', onOtherEditorOpen);
|
|
55903
|
-
document.dispatchEvent(new CustomEvent('ab-cell-editor-open', {
|
|
55904
|
-
detail: myId
|
|
55905
|
-
}));
|
|
55906
|
-
return function () {
|
|
55907
|
-
return document.removeEventListener('ab-cell-editor-open', onOtherEditorOpen);
|
|
55908
|
-
};
|
|
55909
|
-
}, [editing, isRowEditing, col.type, commit]);
|
|
56160
|
+
useSingleOpenCellEditor(editing && !isRowEditing, function () {
|
|
56161
|
+
if (col.type === 'date' || col.type === 'html') setEditing(false);else commit(localValueRef.current);
|
|
56162
|
+
});
|
|
55910
56163
|
if (!editing) {
|
|
55911
56164
|
var _rowData$col$field;
|
|
55912
56165
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -56149,21 +56402,21 @@ var SelfEditableCell = function SelfEditableCell(_ref12) {
|
|
|
56149
56402
|
}));
|
|
56150
56403
|
}
|
|
56151
56404
|
};
|
|
56152
|
-
var DocumentBodyCell = function DocumentBodyCell(
|
|
56405
|
+
var DocumentBodyCell = function DocumentBodyCell(_ref14) {
|
|
56153
56406
|
var _rowData$col$field2;
|
|
56154
|
-
var rowData =
|
|
56155
|
-
col =
|
|
56156
|
-
editable =
|
|
56157
|
-
isRowEditing =
|
|
56158
|
-
onSave =
|
|
56159
|
-
var
|
|
56407
|
+
var rowData = _ref14.rowData,
|
|
56408
|
+
col = _ref14.col,
|
|
56409
|
+
editable = _ref14.editable,
|
|
56410
|
+
isRowEditing = _ref14.isRowEditing,
|
|
56411
|
+
onSave = _ref14.onSave;
|
|
56412
|
+
var _useState25 = useState(false),
|
|
56413
|
+
_useState26 = _slicedToArray$b(_useState25, 2),
|
|
56414
|
+
editing = _useState26[0],
|
|
56415
|
+
setEditing = _useState26[1];
|
|
56416
|
+
var _useState27 = useState((_rowData$col$field2 = rowData[col.field]) !== null && _rowData$col$field2 !== void 0 ? _rowData$col$field2 : []),
|
|
56160
56417
|
_useState28 = _slicedToArray$b(_useState27, 2),
|
|
56161
|
-
|
|
56162
|
-
|
|
56163
|
-
var _useState29 = useState((_rowData$col$field2 = rowData[col.field]) !== null && _rowData$col$field2 !== void 0 ? _rowData$col$field2 : []),
|
|
56164
|
-
_useState30 = _slicedToArray$b(_useState29, 2),
|
|
56165
|
-
docs = _useState30[0],
|
|
56166
|
-
setDocs = _useState30[1];
|
|
56418
|
+
docs = _useState28[0],
|
|
56419
|
+
setDocs = _useState28[1];
|
|
56167
56420
|
var containerRef = useRef(null);
|
|
56168
56421
|
var filePickerOpenRef = useRef(false);
|
|
56169
56422
|
useEffect(function () {
|
|
@@ -56181,6 +56434,7 @@ var DocumentBodyCell = function DocumentBodyCell(_ref13) {
|
|
|
56181
56434
|
var handler = function handler(e) {
|
|
56182
56435
|
if (filePickerOpenRef.current) return;
|
|
56183
56436
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
56437
|
+
if (isInPortaledOverlay(e.target)) return;
|
|
56184
56438
|
setEditing(false);
|
|
56185
56439
|
}
|
|
56186
56440
|
};
|
|
@@ -56248,70 +56502,70 @@ var DocumentBodyCell = function DocumentBodyCell(_ref13) {
|
|
|
56248
56502
|
}, doc.name));
|
|
56249
56503
|
})));
|
|
56250
56504
|
};
|
|
56251
|
-
var Table$1 = function Table(
|
|
56252
|
-
var
|
|
56253
|
-
value =
|
|
56254
|
-
|
|
56255
|
-
columns =
|
|
56256
|
-
|
|
56257
|
-
paginator =
|
|
56258
|
-
|
|
56259
|
-
rows =
|
|
56260
|
-
|
|
56261
|
-
loading =
|
|
56262
|
-
|
|
56263
|
-
stripedRows =
|
|
56264
|
-
|
|
56265
|
-
selectionMode =
|
|
56266
|
-
selection =
|
|
56267
|
-
onSelectionChange =
|
|
56268
|
-
|
|
56269
|
-
editable =
|
|
56270
|
-
|
|
56271
|
-
lockable =
|
|
56272
|
-
|
|
56273
|
-
rowEdit =
|
|
56274
|
-
|
|
56275
|
-
columnFilter =
|
|
56276
|
-
onChange =
|
|
56277
|
-
onCellChange =
|
|
56278
|
-
onLoad =
|
|
56279
|
-
tableId =
|
|
56280
|
-
onAdd =
|
|
56281
|
-
|
|
56282
|
-
showAdd =
|
|
56283
|
-
|
|
56284
|
-
addLabel =
|
|
56285
|
-
addTooltip =
|
|
56286
|
-
|
|
56287
|
-
addRowPosition =
|
|
56288
|
-
|
|
56289
|
-
defaultRowHeight =
|
|
56290
|
-
onReorderClick =
|
|
56291
|
-
labels =
|
|
56292
|
-
|
|
56293
|
-
lazy =
|
|
56294
|
-
totalRecords =
|
|
56295
|
-
onLazyLoad =
|
|
56296
|
-
|
|
56297
|
-
deletableRows =
|
|
56298
|
-
onDeleteRow =
|
|
56299
|
-
|
|
56300
|
-
confirmDelete =
|
|
56301
|
-
|
|
56302
|
-
editableRows =
|
|
56303
|
-
onEditRow =
|
|
56304
|
-
onCreateTag =
|
|
56305
|
-
|
|
56306
|
-
rowSelection =
|
|
56307
|
-
|
|
56308
|
-
selectionFilter =
|
|
56309
|
-
onButtonClick =
|
|
56310
|
-
onCellClick =
|
|
56311
|
-
var
|
|
56312
|
-
|
|
56313
|
-
locked =
|
|
56314
|
-
setLocked =
|
|
56505
|
+
var Table$1 = function Table(_ref15) {
|
|
56506
|
+
var _ref15$value = _ref15.value,
|
|
56507
|
+
value = _ref15$value === void 0 ? [] : _ref15$value,
|
|
56508
|
+
_ref15$columns = _ref15.columns,
|
|
56509
|
+
columns = _ref15$columns === void 0 ? [] : _ref15$columns,
|
|
56510
|
+
_ref15$paginator = _ref15.paginator,
|
|
56511
|
+
paginator = _ref15$paginator === void 0 ? true : _ref15$paginator,
|
|
56512
|
+
_ref15$rows = _ref15.rows,
|
|
56513
|
+
rows = _ref15$rows === void 0 ? 25 : _ref15$rows,
|
|
56514
|
+
_ref15$loading = _ref15.loading,
|
|
56515
|
+
loading = _ref15$loading === void 0 ? false : _ref15$loading,
|
|
56516
|
+
_ref15$stripedRows = _ref15.stripedRows,
|
|
56517
|
+
stripedRows = _ref15$stripedRows === void 0 ? false : _ref15$stripedRows,
|
|
56518
|
+
_ref15$selectionMode = _ref15.selectionMode,
|
|
56519
|
+
selectionMode = _ref15$selectionMode === void 0 ? null : _ref15$selectionMode,
|
|
56520
|
+
selection = _ref15.selection,
|
|
56521
|
+
onSelectionChange = _ref15.onSelectionChange,
|
|
56522
|
+
_ref15$editable = _ref15.editable,
|
|
56523
|
+
editable = _ref15$editable === void 0 ? false : _ref15$editable,
|
|
56524
|
+
_ref15$lockable = _ref15.lockable,
|
|
56525
|
+
lockable = _ref15$lockable === void 0 ? false : _ref15$lockable,
|
|
56526
|
+
_ref15$rowEdit = _ref15.rowEdit,
|
|
56527
|
+
rowEdit = _ref15$rowEdit === void 0 ? false : _ref15$rowEdit,
|
|
56528
|
+
_ref15$columnFilter = _ref15.columnFilter,
|
|
56529
|
+
columnFilter = _ref15$columnFilter === void 0 ? true : _ref15$columnFilter,
|
|
56530
|
+
onChange = _ref15.onChange,
|
|
56531
|
+
onCellChange = _ref15.onCellChange,
|
|
56532
|
+
onLoad = _ref15.onLoad,
|
|
56533
|
+
tableId = _ref15.tableId,
|
|
56534
|
+
onAdd = _ref15.onAdd,
|
|
56535
|
+
_ref15$showAdd = _ref15.showAdd,
|
|
56536
|
+
showAdd = _ref15$showAdd === void 0 ? true : _ref15$showAdd,
|
|
56537
|
+
_ref15$addLabel = _ref15.addLabel,
|
|
56538
|
+
addLabel = _ref15$addLabel === void 0 ? '+' : _ref15$addLabel,
|
|
56539
|
+
addTooltip = _ref15.addTooltip,
|
|
56540
|
+
_ref15$addRowPosition = _ref15.addRowPosition,
|
|
56541
|
+
addRowPosition = _ref15$addRowPosition === void 0 ? 'end' : _ref15$addRowPosition,
|
|
56542
|
+
_ref15$defaultRowHeig = _ref15.defaultRowHeight,
|
|
56543
|
+
defaultRowHeight = _ref15$defaultRowHeig === void 0 ? 'small' : _ref15$defaultRowHeig,
|
|
56544
|
+
onReorderClick = _ref15.onReorderClick,
|
|
56545
|
+
labels = _ref15.labels,
|
|
56546
|
+
_ref15$lazy = _ref15.lazy,
|
|
56547
|
+
lazy = _ref15$lazy === void 0 ? false : _ref15$lazy,
|
|
56548
|
+
totalRecords = _ref15.totalRecords,
|
|
56549
|
+
onLazyLoad = _ref15.onLazyLoad,
|
|
56550
|
+
_ref15$deletableRows = _ref15.deletableRows,
|
|
56551
|
+
deletableRows = _ref15$deletableRows === void 0 ? false : _ref15$deletableRows,
|
|
56552
|
+
onDeleteRow = _ref15.onDeleteRow,
|
|
56553
|
+
_ref15$confirmDelete = _ref15.confirmDelete,
|
|
56554
|
+
confirmDelete = _ref15$confirmDelete === void 0 ? true : _ref15$confirmDelete,
|
|
56555
|
+
_ref15$editableRows = _ref15.editableRows,
|
|
56556
|
+
editableRows = _ref15$editableRows === void 0 ? false : _ref15$editableRows,
|
|
56557
|
+
onEditRow = _ref15.onEditRow,
|
|
56558
|
+
onCreateTag = _ref15.onCreateTag,
|
|
56559
|
+
_ref15$rowSelection = _ref15.rowSelection,
|
|
56560
|
+
rowSelection = _ref15$rowSelection === void 0 ? false : _ref15$rowSelection,
|
|
56561
|
+
_ref15$selectionFilte = _ref15.selectionFilter,
|
|
56562
|
+
selectionFilter = _ref15$selectionFilte === void 0 ? false : _ref15$selectionFilte,
|
|
56563
|
+
onButtonClick = _ref15.onButtonClick,
|
|
56564
|
+
onCellClick = _ref15.onCellClick;
|
|
56565
|
+
var _useState29 = useState(true),
|
|
56566
|
+
_useState30 = _slicedToArray$b(_useState29, 2),
|
|
56567
|
+
locked = _useState30[0],
|
|
56568
|
+
setLocked = _useState30[1];
|
|
56315
56569
|
var effectiveEditable = lockable ? editable && !locked : editable;
|
|
56316
56570
|
var buildAttributeData = useCallback(function () {
|
|
56317
56571
|
var result = {};
|
|
@@ -56342,12 +56596,12 @@ var Table$1 = function Table(_ref14) {
|
|
|
56342
56596
|
return out;
|
|
56343
56597
|
});
|
|
56344
56598
|
}, [buildAttributeData, columns]);
|
|
56345
|
-
var
|
|
56599
|
+
var _useState31 = useState(function () {
|
|
56346
56600
|
return enrichRows(value);
|
|
56347
56601
|
}),
|
|
56348
|
-
|
|
56349
|
-
data =
|
|
56350
|
-
setData =
|
|
56602
|
+
_useState32 = _slicedToArray$b(_useState31, 2),
|
|
56603
|
+
data = _useState32[0],
|
|
56604
|
+
setData = _useState32[1];
|
|
56351
56605
|
useEffect(function () {
|
|
56352
56606
|
var enriched = enrichRows(value);
|
|
56353
56607
|
setData(enriched);
|
|
@@ -56357,14 +56611,14 @@ var Table$1 = function Table(_ref14) {
|
|
|
56357
56611
|
// Picking v0 (R57-38.5) : filtre sur l'état de sélection. 'all' | 'checked' | 'unchecked'.
|
|
56358
56612
|
// On pré-filtre le jeu de lignes AVANT de le passer au DataTable → les filtres colonnes
|
|
56359
56613
|
// de PrimeReact s'appliquent par-dessus (combinaison ET, « combinatoire »).
|
|
56360
|
-
var
|
|
56614
|
+
var _useState33 = useState('all'),
|
|
56615
|
+
_useState34 = _slicedToArray$b(_useState33, 2),
|
|
56616
|
+
selectionFilterMode = _useState34[0],
|
|
56617
|
+
setSelectionFilterMode = _useState34[1];
|
|
56618
|
+
var _useState35 = useState(false),
|
|
56361
56619
|
_useState36 = _slicedToArray$b(_useState35, 2),
|
|
56362
|
-
|
|
56363
|
-
|
|
56364
|
-
var _useState37 = useState(false),
|
|
56365
|
-
_useState38 = _slicedToArray$b(_useState37, 2),
|
|
56366
|
-
selectionFilterOpen = _useState38[0],
|
|
56367
|
-
setSelectionFilterOpen = _useState38[1];
|
|
56620
|
+
selectionFilterOpen = _useState36[0],
|
|
56621
|
+
setSelectionFilterOpen = _useState36[1];
|
|
56368
56622
|
var selectionFilterRef = useRef(null);
|
|
56369
56623
|
var selectionMenuRef = useRef(null);
|
|
56370
56624
|
var displayData = useMemo(function () {
|
|
@@ -56378,10 +56632,10 @@ var Table$1 = function Table(_ref14) {
|
|
|
56378
56632
|
// Options créées à la volée (colonne `tag`, cf. `onCreateTag`) : conservées en state par
|
|
56379
56633
|
// champ pour être immédiatement visibles de TOUS les consommateurs (cellule, éditeur ET
|
|
56380
56634
|
// filtre colonne) sans recharger la page — les `options` passées en props ne les portent pas.
|
|
56381
|
-
var
|
|
56382
|
-
|
|
56383
|
-
createdOptions =
|
|
56384
|
-
setCreatedOptions =
|
|
56635
|
+
var _useState37 = useState({}),
|
|
56636
|
+
_useState38 = _slicedToArray$b(_useState37, 2),
|
|
56637
|
+
createdOptions = _useState38[0],
|
|
56638
|
+
setCreatedOptions = _useState38[1];
|
|
56385
56639
|
var registerCreatedOption = useCallback(function (field, option) {
|
|
56386
56640
|
if (!field || !option || option.value == null) return;
|
|
56387
56641
|
setCreatedOptions(function (prev) {
|
|
@@ -56422,17 +56676,17 @@ var Table$1 = function Table(_ref14) {
|
|
|
56422
56676
|
// que customRestoreState (page 1 par défaut, first restauré seulement s'il reste dans
|
|
56423
56677
|
// la plage de données) — la clé dt-state est recalculée ici car DT_STATE_KEY est
|
|
56424
56678
|
// déclaré plus bas.
|
|
56425
|
-
var
|
|
56679
|
+
var _useState39 = useState(function () {
|
|
56426
56680
|
try {
|
|
56427
56681
|
var s = JSON.parse(localStorage.getItem(tableId ? "dt-state:".concat(tableId) : 'dt-state') || '{}');
|
|
56428
56682
|
if (typeof s.rows === 'number' && s.rows > 0) return s.rows;
|
|
56429
56683
|
} catch (_unused2) {/* noop */}
|
|
56430
56684
|
return rows;
|
|
56431
56685
|
}),
|
|
56432
|
-
|
|
56433
|
-
pageRows =
|
|
56434
|
-
setPageRows =
|
|
56435
|
-
var
|
|
56686
|
+
_useState40 = _slicedToArray$b(_useState39, 2),
|
|
56687
|
+
pageRows = _useState40[0],
|
|
56688
|
+
setPageRows = _useState40[1];
|
|
56689
|
+
var _useState41 = useState(function () {
|
|
56436
56690
|
try {
|
|
56437
56691
|
var s = JSON.parse(localStorage.getItem(tableId ? "dt-state:".concat(tableId) : 'dt-state') || '{}');
|
|
56438
56692
|
var len = Array.isArray(data) ? data.length : 0;
|
|
@@ -56440,19 +56694,19 @@ var Table$1 = function Table(_ref14) {
|
|
|
56440
56694
|
} catch (_unused3) {/* noop */}
|
|
56441
56695
|
return 0;
|
|
56442
56696
|
}),
|
|
56443
|
-
|
|
56444
|
-
first =
|
|
56445
|
-
setFirst =
|
|
56697
|
+
_useState42 = _slicedToArray$b(_useState41, 2),
|
|
56698
|
+
first = _useState42[0],
|
|
56699
|
+
setFirst = _useState42[1];
|
|
56446
56700
|
// Scroll différé du viewport vers le point d'insertion après un ajout de ligne.
|
|
56701
|
+
var _useState43 = useState(null),
|
|
56702
|
+
_useState44 = _slicedToArray$b(_useState43, 2),
|
|
56703
|
+
pendingScroll = _useState44[0],
|
|
56704
|
+
setPendingScroll = _useState44[1];
|
|
56705
|
+
// Ligne en attente de confirmation de suppression (prop confirmDelete).
|
|
56447
56706
|
var _useState45 = useState(null),
|
|
56448
56707
|
_useState46 = _slicedToArray$b(_useState45, 2),
|
|
56449
|
-
|
|
56450
|
-
|
|
56451
|
-
// Ligne en attente de confirmation de suppression (prop confirmDelete).
|
|
56452
|
-
var _useState47 = useState(null),
|
|
56453
|
-
_useState48 = _slicedToArray$b(_useState47, 2),
|
|
56454
|
-
deleteCandidate = _useState48[0],
|
|
56455
|
-
setDeleteCandidate = _useState48[1];
|
|
56708
|
+
deleteCandidate = _useState46[0],
|
|
56709
|
+
setDeleteCandidate = _useState46[1];
|
|
56456
56710
|
var dtRef = useRef(null);
|
|
56457
56711
|
useEffect(function () {
|
|
56458
56712
|
var _dtRef$current, _dtRef$current$getEle;
|
|
@@ -56470,10 +56724,10 @@ var Table$1 = function Table(_ref14) {
|
|
|
56470
56724
|
onButtonClickRef.current = onButtonClick;
|
|
56471
56725
|
}, [onButtonClick]);
|
|
56472
56726
|
var onCellClickRef = useRef(onCellClick);
|
|
56473
|
-
var
|
|
56474
|
-
|
|
56475
|
-
cellClickEnabled =
|
|
56476
|
-
setCellClickEnabled =
|
|
56727
|
+
var _useState47 = useState(!!onCellClick),
|
|
56728
|
+
_useState48 = _slicedToArray$b(_useState47, 2),
|
|
56729
|
+
cellClickEnabled = _useState48[0],
|
|
56730
|
+
setCellClickEnabled = _useState48[1];
|
|
56477
56731
|
useEffect(function () {
|
|
56478
56732
|
onCellClickRef.current = onCellClick;
|
|
56479
56733
|
setCellClickEnabled(!!onCellClick);
|
|
@@ -56538,10 +56792,10 @@ var Table$1 = function Table(_ref14) {
|
|
|
56538
56792
|
}
|
|
56539
56793
|
setPendingScroll(addRowPosition === 'start' ? 'top' : 'bottom');
|
|
56540
56794
|
}, [columns, data, onChange, onAdd, buildAttributeData, addRowPosition, paginator, pageRows, lazy]);
|
|
56541
|
-
var
|
|
56542
|
-
|
|
56543
|
-
editingRows =
|
|
56544
|
-
setEditingRows =
|
|
56795
|
+
var _useState49 = useState({}),
|
|
56796
|
+
_useState50 = _slicedToArray$b(_useState49, 2),
|
|
56797
|
+
editingRows = _useState50[0],
|
|
56798
|
+
setEditingRows = _useState50[1];
|
|
56545
56799
|
var onRowEditChange = useCallback(function (e) {
|
|
56546
56800
|
setEditingRows(e.data);
|
|
56547
56801
|
}, []);
|
|
@@ -56654,9 +56908,9 @@ var Table$1 = function Table(_ref14) {
|
|
|
56654
56908
|
return [c, lastKnownRank + 0.5, natIdx];
|
|
56655
56909
|
}).sort(function (a, b) {
|
|
56656
56910
|
return a[1] - b[1] || a[2] - b[2];
|
|
56657
|
-
}).map(function (
|
|
56658
|
-
var
|
|
56659
|
-
c =
|
|
56911
|
+
}).map(function (_ref16) {
|
|
56912
|
+
var _ref17 = _slicedToArray$b(_ref16, 1),
|
|
56913
|
+
c = _ref17[0];
|
|
56660
56914
|
return c;
|
|
56661
56915
|
});
|
|
56662
56916
|
return [].concat(_toConsumableArray$8(pinned), _toConsumableArray$8(sortedRest));
|
|
@@ -56680,12 +56934,12 @@ var Table$1 = function Table(_ref14) {
|
|
|
56680
56934
|
// Init synchrone (préférences + fusion des nouveautés + ordre sauvegardé) :
|
|
56681
56935
|
// le premier montage du DataTable se fait directement avec les bonnes colonnes,
|
|
56682
56936
|
// donc customRestoreState reconstruit les largeurs sur la bonne structure.
|
|
56683
|
-
var
|
|
56937
|
+
var _useState51 = useState(function () {
|
|
56684
56938
|
return applySavedColumnOrder(computeVisibleColumns());
|
|
56685
56939
|
}),
|
|
56686
|
-
|
|
56687
|
-
visibleColumns =
|
|
56688
|
-
setVisibleColumns =
|
|
56940
|
+
_useState52 = _slicedToArray$b(_useState51, 2),
|
|
56941
|
+
visibleColumns = _useState52[0],
|
|
56942
|
+
setVisibleColumns = _useState52[1];
|
|
56689
56943
|
// Colonnes de tête (frozen) rendues AVANT les colonnes de données : sélection,
|
|
56690
56944
|
// suppression, actions. PrimeReact applique les largeurs sauvegardées par
|
|
56691
56945
|
// nth-child(index) sur l'ensemble des <th> — il faut donc que le tableau de
|
|
@@ -56693,22 +56947,22 @@ var Table$1 = function Table(_ref14) {
|
|
|
56693
56947
|
var leadingColCount = (rowSelection ? 1 : 0) + (deletableRows || onDeleteRow ? 1 : 0) + (editableRows || onEditRow ? 1 : 0) + (columns.some(function (c) {
|
|
56694
56948
|
return c.actionsField;
|
|
56695
56949
|
}) ? 1 : 0);
|
|
56696
|
-
var
|
|
56950
|
+
var _useState53 = useState(''),
|
|
56951
|
+
_useState54 = _slicedToArray$b(_useState53, 2),
|
|
56952
|
+
globalFilter = _useState54[0],
|
|
56953
|
+
setGlobalFilter = _useState54[1];
|
|
56954
|
+
var _useState55 = useState(false),
|
|
56697
56955
|
_useState56 = _slicedToArray$b(_useState55, 2),
|
|
56698
|
-
|
|
56699
|
-
|
|
56700
|
-
var _useState57 = useState(
|
|
56956
|
+
settingsOpen = _useState56[0],
|
|
56957
|
+
setSettingsOpen = _useState56[1];
|
|
56958
|
+
var _useState57 = useState(0),
|
|
56701
56959
|
_useState58 = _slicedToArray$b(_useState57, 2),
|
|
56702
|
-
|
|
56703
|
-
|
|
56704
|
-
var _useState59 = useState(
|
|
56960
|
+
tableKey = _useState58[0],
|
|
56961
|
+
setTableKey = _useState58[1];
|
|
56962
|
+
var _useState59 = useState(false),
|
|
56705
56963
|
_useState60 = _slicedToArray$b(_useState59, 2),
|
|
56706
|
-
|
|
56707
|
-
|
|
56708
|
-
var _useState61 = useState(false),
|
|
56709
|
-
_useState62 = _slicedToArray$b(_useState61, 2),
|
|
56710
|
-
fullscreen = _useState62[0],
|
|
56711
|
-
setFullscreen = _useState62[1];
|
|
56964
|
+
fullscreen = _useState60[0],
|
|
56965
|
+
setFullscreen = _useState60[1];
|
|
56712
56966
|
useEffect(function () {
|
|
56713
56967
|
if (!fullscreen) return;
|
|
56714
56968
|
var onKeyDown = function onKeyDown(e) {
|
|
@@ -56725,7 +56979,7 @@ var Table$1 = function Table(_ref14) {
|
|
|
56725
56979
|
var FILTERS_VALUES_KEY = useMemo(function () {
|
|
56726
56980
|
return tableId ? "Table:filters:".concat(tableId) : 'Table:filters';
|
|
56727
56981
|
}, [tableId]);
|
|
56728
|
-
var
|
|
56982
|
+
var _useState61 = useState(function () {
|
|
56729
56983
|
try {
|
|
56730
56984
|
var _JSON$parse;
|
|
56731
56985
|
return (_JSON$parse = JSON.parse(localStorage.getItem(FILTER_KEY))) !== null && _JSON$parse !== void 0 ? _JSON$parse : false;
|
|
@@ -56733,9 +56987,9 @@ var Table$1 = function Table(_ref14) {
|
|
|
56733
56987
|
return false;
|
|
56734
56988
|
}
|
|
56735
56989
|
}),
|
|
56736
|
-
|
|
56737
|
-
filterVisible =
|
|
56738
|
-
setFilterVisible =
|
|
56990
|
+
_useState62 = _slicedToArray$b(_useState61, 2),
|
|
56991
|
+
filterVisible = _useState62[0],
|
|
56992
|
+
setFilterVisible = _useState62[1];
|
|
56739
56993
|
var toggleFilter = function toggleFilter() {
|
|
56740
56994
|
setFilterVisible(function (v) {
|
|
56741
56995
|
var next = !v;
|
|
@@ -56778,16 +57032,16 @@ var Table$1 = function Table(_ref14) {
|
|
|
56778
57032
|
rowHeightsRef.current = {};
|
|
56779
57033
|
}
|
|
56780
57034
|
}
|
|
56781
|
-
var
|
|
57035
|
+
var _useState63 = useState(function () {
|
|
56782
57036
|
try {
|
|
56783
57037
|
var saved = localStorage.getItem(ROW_PRESET_KEY);
|
|
56784
57038
|
if (saved === 'fit' || ROW_PRESETS[saved]) return saved;
|
|
56785
57039
|
} catch (_unused9) {/* noop */}
|
|
56786
57040
|
return defaultRowHeight === 'fit' || ROW_PRESETS[defaultRowHeight] ? defaultRowHeight : 'small';
|
|
56787
57041
|
}),
|
|
56788
|
-
|
|
56789
|
-
rowPreset =
|
|
56790
|
-
setRowPreset =
|
|
57042
|
+
_useState64 = _slicedToArray$b(_useState63, 2),
|
|
57043
|
+
rowPreset = _useState64[0],
|
|
57044
|
+
setRowPreset = _useState64[1];
|
|
56791
57045
|
var tableWrapperRef = useRef(null);
|
|
56792
57046
|
var applyRowHeights = useCallback(function () {
|
|
56793
57047
|
if (!tableWrapperRef.current) return;
|
|
@@ -56954,10 +57208,10 @@ var Table$1 = function Table(_ref14) {
|
|
|
56954
57208
|
var persistFilters = useCallback(function (f) {
|
|
56955
57209
|
try {
|
|
56956
57210
|
var values = {};
|
|
56957
|
-
Object.entries(f || {}).forEach(function (
|
|
56958
|
-
var
|
|
56959
|
-
field =
|
|
56960
|
-
meta =
|
|
57211
|
+
Object.entries(f || {}).forEach(function (_ref18) {
|
|
57212
|
+
var _ref19 = _slicedToArray$b(_ref18, 2),
|
|
57213
|
+
field = _ref19[0],
|
|
57214
|
+
meta = _ref19[1];
|
|
56961
57215
|
if (meta && meta.value != null && meta.value !== '') {
|
|
56962
57216
|
// Filtre date : persiste en 'yyyy-MM-dd' local (JSON.stringify(Date) donnerait
|
|
56963
57217
|
// un ISO horodaté UTC que parseDateAuto ne relit pas — et J±1 selon le fuseau).
|
|
@@ -56967,12 +57221,12 @@ var Table$1 = function Table(_ref14) {
|
|
|
56967
57221
|
if (Object.keys(values).length) localStorage.setItem(FILTERS_VALUES_KEY, JSON.stringify(values));else localStorage.removeItem(FILTERS_VALUES_KEY);
|
|
56968
57222
|
} catch (_unused10) {}
|
|
56969
57223
|
}, [FILTERS_VALUES_KEY]);
|
|
56970
|
-
var
|
|
57224
|
+
var _useState65 = useState(function () {
|
|
56971
57225
|
return hydrateFilters(initialFilters);
|
|
56972
57226
|
}),
|
|
56973
|
-
|
|
56974
|
-
filters =
|
|
56975
|
-
setFilters =
|
|
57227
|
+
_useState66 = _slicedToArray$b(_useState65, 2),
|
|
57228
|
+
filters = _useState66[0],
|
|
57229
|
+
setFilters = _useState66[1];
|
|
56976
57230
|
useEffect(function () {
|
|
56977
57231
|
setFilters(hydrateFilters(initialFilters));
|
|
56978
57232
|
}, [initialFilters, columnFilter, hydrateFilters]);
|
|
@@ -56980,16 +57234,16 @@ var Table$1 = function Table(_ref14) {
|
|
|
56980
57234
|
// Tri actif (pour griser le bouton « Réordonner » : réordonner sous un tri
|
|
56981
57235
|
// corromprait les positions). Initialisé depuis l'état persisté (le tri restauré
|
|
56982
57236
|
// au montage ne déclenche pas onSort), mis à jour ensuite via onSort.
|
|
56983
|
-
var
|
|
57237
|
+
var _useState67 = useState(function () {
|
|
56984
57238
|
var s = readDTState();
|
|
56985
57239
|
return s.sortField ? {
|
|
56986
57240
|
field: s.sortField,
|
|
56987
57241
|
order: s.sortOrder
|
|
56988
57242
|
} : null;
|
|
56989
57243
|
}),
|
|
56990
|
-
|
|
56991
|
-
activeSort =
|
|
56992
|
-
setActiveSort =
|
|
57244
|
+
_useState68 = _slicedToArray$b(_useState67, 2),
|
|
57245
|
+
activeSort = _useState68[0],
|
|
57246
|
+
setActiveSort = _useState68[1];
|
|
56993
57247
|
// Un filtre est actif si un filtre de colonne porte une valeur, ou la recherche globale.
|
|
56994
57248
|
var hasActiveFilter = useMemo(function () {
|
|
56995
57249
|
if (globalFilter && String(globalFilter).trim() !== '') return true;
|
|
@@ -57012,13 +57266,13 @@ var Table$1 = function Table(_ref14) {
|
|
|
57012
57266
|
// onLazyLoad({first, rows, sortField, sortOrder, filters, globalFilter}) :
|
|
57013
57267
|
// l'app requête son endpoint puis re-render avec la nouvelle page.
|
|
57014
57268
|
// Le tri devient contrôlé en lazy (sinon PrimeReact trierait la page seule).
|
|
57015
|
-
var
|
|
57269
|
+
var _useState69 = useState({
|
|
57016
57270
|
sortField: null,
|
|
57017
57271
|
sortOrder: null
|
|
57018
57272
|
}),
|
|
57019
|
-
|
|
57020
|
-
lazySort =
|
|
57021
|
-
setLazySort =
|
|
57273
|
+
_useState70 = _slicedToArray$b(_useState69, 2),
|
|
57274
|
+
lazySort = _useState70[0],
|
|
57275
|
+
setLazySort = _useState70[1];
|
|
57022
57276
|
var onLazyLoadRef = useRef(onLazyLoad);
|
|
57023
57277
|
onLazyLoadRef.current = onLazyLoad;
|
|
57024
57278
|
var fireLazy = useCallback(function () {
|
|
@@ -57292,7 +57546,7 @@ var Table$1 = function Table(_ref14) {
|
|
|
57292
57546
|
|
|
57293
57547
|
var linkTemplate = useCallback(function (col) {
|
|
57294
57548
|
return function (rowData) {
|
|
57295
|
-
var
|
|
57549
|
+
var _ref20, _col$href;
|
|
57296
57550
|
var label = rowData[col.field];
|
|
57297
57551
|
if (col.type === 'titleLink') {
|
|
57298
57552
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -57306,7 +57560,7 @@ var Table$1 = function Table(_ref14) {
|
|
|
57306
57560
|
className: "table-item-title cell-text"
|
|
57307
57561
|
}, label));
|
|
57308
57562
|
}
|
|
57309
|
-
var href = typeof col.href === 'function' ? col.href(rowData) : (
|
|
57563
|
+
var href = typeof col.href === 'function' ? col.href(rowData) : (_ref20 = (_col$href = col.href) !== null && _col$href !== void 0 ? _col$href : rowData[col.field + 'Url']) !== null && _ref20 !== void 0 ? _ref20 : '#';
|
|
57310
57564
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
57311
57565
|
className: "arengi-table-grey-title-box",
|
|
57312
57566
|
style: {
|
|
@@ -57385,13 +57639,13 @@ var Table$1 = function Table(_ref14) {
|
|
|
57385
57639
|
}, []);
|
|
57386
57640
|
var lienFormulaireTemplate = useCallback(function (col) {
|
|
57387
57641
|
return function (rowData) {
|
|
57388
|
-
var _col$options5,
|
|
57642
|
+
var _col$options5, _ref21, _opt$label, _ref22, _col$href2;
|
|
57389
57643
|
var val = rowData[col.field];
|
|
57390
57644
|
var opt = (_col$options5 = col.options) === null || _col$options5 === void 0 ? void 0 : _col$options5.find(function (o) {
|
|
57391
57645
|
return o.value === val;
|
|
57392
57646
|
});
|
|
57393
|
-
var label = (
|
|
57394
|
-
var href = typeof col.href === 'function' ? col.href(rowData) : (
|
|
57647
|
+
var label = (_ref21 = (_opt$label = opt === null || opt === void 0 ? void 0 : opt.label) !== null && _opt$label !== void 0 ? _opt$label : val) !== null && _ref21 !== void 0 ? _ref21 : '';
|
|
57648
|
+
var href = typeof col.href === 'function' ? col.href(rowData) : (_ref22 = (_col$href2 = col.href) !== null && _col$href2 !== void 0 ? _col$href2 : opt === null || opt === void 0 ? void 0 : opt.href) !== null && _ref22 !== void 0 ? _ref22 : null;
|
|
57395
57649
|
if (!label) return '';
|
|
57396
57650
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
57397
57651
|
style: {
|
|
@@ -57761,16 +58015,22 @@ var Table$1 = function Table(_ref14) {
|
|
|
57761
58015
|
rowData: rowData,
|
|
57762
58016
|
col: col,
|
|
57763
58017
|
editable: effectiveEditable || rowEdit && col.editable !== false,
|
|
57764
|
-
isRowEditing: rowEdit && !!editingRows[rowData.id]
|
|
58018
|
+
isRowEditing: rowEdit && !!editingRows[rowData.id]
|
|
58019
|
+
// Une seule écriture : updateRow (état + onChange) puis onCellChange
|
|
58020
|
+
// (persistance côté app). onCellEditComplete ignore ce type.
|
|
58021
|
+
,
|
|
57765
58022
|
onSave: function onSave(newVal) {
|
|
57766
|
-
|
|
58023
|
+
var _onCellChangeRef$curr;
|
|
58024
|
+
updateRow(rowData.id, col.field, newVal);
|
|
58025
|
+
(_onCellChangeRef$curr = onCellChangeRef.current) === null || _onCellChangeRef$curr === void 0 || _onCellChangeRef$curr.call(onCellChangeRef, {
|
|
58026
|
+
rowData: rowData,
|
|
58027
|
+
field: col.field,
|
|
58028
|
+
newValue: newVal
|
|
58029
|
+
});
|
|
57767
58030
|
}
|
|
57768
58031
|
});
|
|
57769
58032
|
};
|
|
57770
58033
|
}, [effectiveEditable, rowEdit, editingRows, updateRow]);
|
|
57771
|
-
var deviseEditor = useCallback(function () {
|
|
57772
|
-
return undefined;
|
|
57773
|
-
}, []);
|
|
57774
58034
|
var selectMultipleTemplate = useCallback(function (col) {
|
|
57775
58035
|
return function (rowData) {
|
|
57776
58036
|
var vals = rowData[col.field];
|
|
@@ -57840,9 +58100,8 @@ var Table$1 = function Table(_ref14) {
|
|
|
57840
58100
|
}, []);
|
|
57841
58101
|
|
|
57842
58102
|
// --- Cell editors by type ---
|
|
57843
|
-
// NB :
|
|
57844
|
-
//
|
|
57845
|
-
// selectMultiple, date, numeric, html) sont gérés par SelfEditableCell.
|
|
58103
|
+
// NB : `documents` en cellule est le SEUL type sur l'éditeur PrimeReact. Les autres
|
|
58104
|
+
// s'auto-gèrent : SelfEditableCell, TreeSelectBodyCell, DeviseBodyCell, DocumentBodyCell.
|
|
57846
58105
|
|
|
57847
58106
|
var treeSelectTemplate = useCallback(function (col) {
|
|
57848
58107
|
return function (rowData) {
|
|
@@ -57851,37 +58110,41 @@ var Table$1 = function Table(_ref14) {
|
|
|
57851
58110
|
rowData: rowData,
|
|
57852
58111
|
col: col,
|
|
57853
58112
|
editable: colEditable || rowEdit && col.editable !== false,
|
|
57854
|
-
isRowEditing: rowEdit && !!editingRows[rowData.id]
|
|
58113
|
+
isRowEditing: rowEdit && !!editingRows[rowData.id]
|
|
58114
|
+
// Une seule écriture : updateRow (état + onChange) puis onCellChange
|
|
58115
|
+
// (persistance côté app). onCellEditComplete ignore ce type.
|
|
58116
|
+
,
|
|
57855
58117
|
onSave: function onSave(newVal) {
|
|
57856
|
-
|
|
58118
|
+
var _onCellChangeRef$curr2;
|
|
58119
|
+
updateRow(rowData.id, col.field, newVal);
|
|
58120
|
+
(_onCellChangeRef$curr2 = onCellChangeRef.current) === null || _onCellChangeRef$curr2 === void 0 || _onCellChangeRef$curr2.call(onCellChangeRef, {
|
|
58121
|
+
rowData: rowData,
|
|
58122
|
+
field: col.field,
|
|
58123
|
+
newValue: newVal
|
|
58124
|
+
});
|
|
57857
58125
|
}
|
|
57858
58126
|
});
|
|
57859
58127
|
};
|
|
57860
58128
|
}, [lockable, effectiveEditable, rowEdit, editingRows, updateRow]);
|
|
57861
|
-
var treeSelectEditor = useCallback(function () {
|
|
57862
|
-
return undefined;
|
|
57863
|
-
}, []);
|
|
57864
58129
|
var getEditorTemplate = useCallback(function (col) {
|
|
57865
58130
|
var colEditable = lockable ? effectiveEditable && col.editable === true : effectiveEditable ? col.editable !== false : col.editable === true;
|
|
57866
58131
|
if (!colEditable) return undefined;
|
|
57867
|
-
// devise and treeSelect always use their PrimeReact editor (not handled by SelfEditableCell)
|
|
57868
|
-
if (col.type === 'devise') return deviseEditor(col);
|
|
57869
|
-
if (col.type === 'treeSelect') return treeSelectEditor(col);
|
|
57870
58132
|
// documents in cell mode keeps its native editor; in rowEdit it's wrapped by DocumentBodyCell
|
|
57871
58133
|
if (!rowEdit && col.type === 'documents') return documentEditor(col);
|
|
57872
|
-
//
|
|
57873
|
-
//
|
|
58134
|
+
// Aucun autre type : le cycle de vie PrimeReact ferme la cellule sur tout mousedown
|
|
58135
|
+
// hors du <td>, incompatible avec un panneau porté dans `body`.
|
|
57874
58136
|
return undefined;
|
|
57875
|
-
}, [effectiveEditable, rowEdit,
|
|
58137
|
+
}, [lockable, effectiveEditable, rowEdit, documentEditor]);
|
|
57876
58138
|
var onCellEditComplete = useCallback(function (e) {
|
|
57877
|
-
var _onCellChangeRef$
|
|
58139
|
+
var _onCellChangeRef$curr3;
|
|
57878
58140
|
var rowData = e.rowData,
|
|
57879
58141
|
newRowData = e.newRowData,
|
|
57880
58142
|
field = e.field;
|
|
57881
58143
|
var col = columns.find(function (c) {
|
|
57882
58144
|
return c.field === field;
|
|
57883
58145
|
});
|
|
57884
|
-
// treeSelect
|
|
58146
|
+
// treeSelect et devise enregistrent eux-mêmes (updateRow). Ce chemin n'est plus câblé
|
|
58147
|
+
// que pour `documents` ; garde-fou conservé : une seule écriture par changement.
|
|
57885
58148
|
if ((col === null || col === void 0 ? void 0 : col.type) === 'treeSelect' || (col === null || col === void 0 ? void 0 : col.type) === 'devise') return;
|
|
57886
58149
|
var enrichedRow = newRowData;
|
|
57887
58150
|
if (col !== null && col !== void 0 && col.updates) {
|
|
@@ -57891,10 +58154,10 @@ var Table$1 = function Table(_ref14) {
|
|
|
57891
58154
|
});
|
|
57892
58155
|
if (option) {
|
|
57893
58156
|
var extra = {};
|
|
57894
|
-
Object.entries(col.updates).forEach(function (
|
|
57895
|
-
var
|
|
57896
|
-
targetField =
|
|
57897
|
-
optionProp =
|
|
58157
|
+
Object.entries(col.updates).forEach(function (_ref23) {
|
|
58158
|
+
var _ref24 = _slicedToArray$b(_ref23, 2),
|
|
58159
|
+
targetField = _ref24[0],
|
|
58160
|
+
optionProp = _ref24[1];
|
|
57898
58161
|
if (option[optionProp] !== undefined) extra[targetField] = option[optionProp];
|
|
57899
58162
|
});
|
|
57900
58163
|
enrichedRow = _objectSpread2(_objectSpread2({}, newRowData), extra);
|
|
@@ -57905,7 +58168,7 @@ var Table$1 = function Table(_ref14) {
|
|
|
57905
58168
|
});
|
|
57906
58169
|
setData(updated);
|
|
57907
58170
|
onChange === null || onChange === void 0 || onChange(updated);
|
|
57908
|
-
(_onCellChangeRef$
|
|
58171
|
+
(_onCellChangeRef$curr3 = onCellChangeRef.current) === null || _onCellChangeRef$curr3 === void 0 || _onCellChangeRef$curr3.call(onCellChangeRef, {
|
|
57909
58172
|
rowData: rowData,
|
|
57910
58173
|
field: field,
|
|
57911
58174
|
newValue: newRowData[field]
|
|
@@ -58046,7 +58309,7 @@ var Table$1 = function Table(_ref14) {
|
|
|
58046
58309
|
col: col,
|
|
58047
58310
|
editable: colEditable,
|
|
58048
58311
|
onSave: function onSave(v) {
|
|
58049
|
-
var _onCellChangeRef$
|
|
58312
|
+
var _onCellChangeRef$curr4;
|
|
58050
58313
|
var enrichedFields = _defineProperty$e({}, col.field, v);
|
|
58051
58314
|
if (col.updates) {
|
|
58052
58315
|
var _col$options8;
|
|
@@ -58054,10 +58317,10 @@ var Table$1 = function Table(_ref14) {
|
|
|
58054
58317
|
return opt.value === v;
|
|
58055
58318
|
});
|
|
58056
58319
|
if (option) {
|
|
58057
|
-
Object.entries(col.updates).forEach(function (
|
|
58058
|
-
var
|
|
58059
|
-
tf =
|
|
58060
|
-
op =
|
|
58320
|
+
Object.entries(col.updates).forEach(function (_ref25) {
|
|
58321
|
+
var _ref26 = _slicedToArray$b(_ref25, 2),
|
|
58322
|
+
tf = _ref26[0],
|
|
58323
|
+
op = _ref26[1];
|
|
58061
58324
|
if (option[op] !== undefined) enrichedFields[tf] = option[op];
|
|
58062
58325
|
});
|
|
58063
58326
|
}
|
|
@@ -58069,7 +58332,7 @@ var Table$1 = function Table(_ref14) {
|
|
|
58069
58332
|
onChange === null || onChange === void 0 || onChange(updated);
|
|
58070
58333
|
return updated;
|
|
58071
58334
|
});
|
|
58072
|
-
(_onCellChangeRef$
|
|
58335
|
+
(_onCellChangeRef$curr4 = onCellChangeRef.current) === null || _onCellChangeRef$curr4 === void 0 || _onCellChangeRef$curr4.call(onCellChangeRef, {
|
|
58073
58336
|
rowData: rowData,
|
|
58074
58337
|
field: col.field,
|
|
58075
58338
|
newValue: v
|
|
@@ -58362,10 +58625,10 @@ var Table$1 = function Table(_ref14) {
|
|
|
58362
58625
|
setRowPreset(defaultRowHeight === 'fit' || ROW_PRESETS[defaultRowHeight] ? defaultRowHeight : 'small');
|
|
58363
58626
|
setSettingsOpen(false);
|
|
58364
58627
|
}
|
|
58365
|
-
}].map(function (
|
|
58366
|
-
var icon =
|
|
58367
|
-
label =
|
|
58368
|
-
action =
|
|
58628
|
+
}].map(function (_ref27) {
|
|
58629
|
+
var icon = _ref27.icon,
|
|
58630
|
+
label = _ref27.label,
|
|
58631
|
+
action = _ref27.action;
|
|
58369
58632
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
58370
58633
|
key: label,
|
|
58371
58634
|
type: "button",
|
|
@@ -58430,9 +58693,9 @@ var Table$1 = function Table(_ref14) {
|
|
|
58430
58693
|
}, {
|
|
58431
58694
|
key: 'fit',
|
|
58432
58695
|
label: translate('arengibook.table.settings.rowHeightFit', labels)
|
|
58433
|
-
}].map(function (
|
|
58434
|
-
var key =
|
|
58435
|
-
label =
|
|
58696
|
+
}].map(function (_ref28) {
|
|
58697
|
+
var key = _ref28.key,
|
|
58698
|
+
label = _ref28.label;
|
|
58436
58699
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
58437
58700
|
key: key,
|
|
58438
58701
|
type: "button",
|
|
@@ -58944,7 +59207,7 @@ var Table$1 = function Table(_ref14) {
|
|
|
58944
59207
|
columnKey: "__row_actions__",
|
|
58945
59208
|
header: inline ? actionsCol.actionsHeader || '' : '',
|
|
58946
59209
|
body: function body(rowData) {
|
|
58947
|
-
var
|
|
59210
|
+
var _ref29, _linkCol$href;
|
|
58948
59211
|
var rowActions = rowData[actionsCol.actionsField] || [];
|
|
58949
59212
|
if (inline) {
|
|
58950
59213
|
return /*#__PURE__*/React__default.createElement(RowActionsInlineCell, {
|
|
@@ -58958,7 +59221,7 @@ var Table$1 = function Table(_ref14) {
|
|
|
58958
59221
|
var linkCol = columns.find(function (c) {
|
|
58959
59222
|
return c.type === 'titleLink' || c.type === 'link';
|
|
58960
59223
|
});
|
|
58961
|
-
var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (
|
|
59224
|
+
var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (_ref29 = (_linkCol$href = linkCol.href) !== null && _linkCol$href !== void 0 ? _linkCol$href : rowData[linkCol.field + 'Url']) !== null && _ref29 !== void 0 ? _ref29 : null : null;
|
|
58962
59225
|
return /*#__PURE__*/React__default.createElement(RowActionsCell, {
|
|
58963
59226
|
actions: rowActions,
|
|
58964
59227
|
rowData: rowData,
|
|
@@ -60243,7 +60506,7 @@ var TreeSelectMaquettePresets = {
|
|
|
60243
60506
|
}
|
|
60244
60507
|
};
|
|
60245
60508
|
|
|
60246
|
-
var css_248z$1 = ".expression-editor {\n width: 100%;\n}\n.expression-
|
|
60509
|
+
var css_248z$1 = ".expression-editor {\n width: 100%;\n font-family: \"Roboto\", Arial, sans-serif !important;\n}\n.expression-editor .tagify {\n width: 100%;\n min-height: 42px;\n margin-bottom: 10px;\n background-color: #ffffff !important;\n font-family: \"Roboto\", Arial, sans-serif !important;\n}\n.expression-editor .tagify .tagify__input {\n background-color: #ffffff !important;\n font-family: \"Roboto\", Arial, sans-serif !important;\n font-size: 14px !important;\n font-weight: 500 !important;\n}\n.expression-editor .tagify .tagify__tag {\n margin: 3px 6px 3px 0 !important;\n font-family: \"Roboto\", Arial, sans-serif !important;\n}\n.expression-editor__error {\n font-size: 12px;\n color: #9a3b3b;\n background: #fbeaea;\n border: 1px solid #e3b8b8;\n border-radius: 6px;\n padding: 6px 10px;\n margin-bottom: 8px;\n}\n.expression-editor__field-row {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n.expression-editor__field-row .tagify {\n flex: 1 1 auto;\n}\n.expression-editor__add-btn {\n flex: 0 0 auto;\n width: 30px;\n height: 30px;\n margin-top: 1px;\n border: none;\n border-radius: 50%;\n background: #d8e6fb;\n color: #1c4f9e;\n font-size: 18px;\n font-weight: 700;\n line-height: 1;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n transition: background-color 0.13s ease-out, color 0.13s ease-out;\n}\n.expression-editor__add-btn:hover {\n background: #1c4f9e;\n color: #fff;\n}\n.expression-editor__hint {\n font-size: 12px;\n color: #5a6b85;\n font-style: italic;\n margin-bottom: 6px;\n}\n.expression-editor__palette {\n display: flex;\n justify-content: flex-start;\n gap: 12px;\n}\n\n.ee-palette-col {\n display: flex;\n flex-direction: column;\n}\n.ee-palette-col--refs {\n flex: 0 1 320px;\n}\n.ee-palette-col--ops {\n flex: 0 0 200px;\n}\n.ee-palette-col__title {\n font-family: \"Roboto\", Arial, sans-serif !important;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n color: #5a6b85;\n margin-bottom: 4px;\n}\n\n.ee-list {\n width: 100%;\n max-height: 220px;\n overflow-y: auto;\n border: 1px solid #c6d4e8;\n border-radius: 6px;\n padding: 4px;\n background: #fff;\n box-sizing: border-box;\n}\n\n.ee-list-group__label {\n font-family: \"Roboto\", Arial, sans-serif !important;\n font-weight: 600;\n color: #344054;\n font-size: 12px;\n padding: 4px 8px 2px;\n}\n.ee-list-group__label--sub {\n padding-left: 16px;\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n}\n\n.ee-list-item {\n display: flex;\n align-items: center;\n padding: 4px 6px 4px 8px;\n margin: 1px 0;\n border-radius: 4px;\n cursor: pointer;\n font-family: \"Roboto\", Arial, sans-serif !important;\n font-size: 13px;\n color: #344054 !important;\n user-select: none;\n}\n.ee-list-item:hover {\n background: #eef3fc !important;\n color: #344054 !important;\n}\n.ee-list-item__label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: inherit !important;\n}\n.ee-list-item__label--op {\n font-family: \"Roboto\", Arial, sans-serif !important;\n font-size: 14px !important;\n font-weight: 700 !important;\n}\n\n.ee-opt--field, .ee-opt--field:hover {\n color: #187a41 !important;\n}\n\n.ee-opt--echelle, .ee-opt--echelle:hover {\n color: #1c4f9e !important;\n}\n\n.ee-opt--evalglobal, .ee-opt--evalglobal:hover {\n color: #6b21a8 !important;\n}\n\n.tagify__tag.tag-field {\n --tag-bg: #d9f2e1;\n --tag-text-color: #187a41;\n --tag-hover: #c2eacf;\n}\n.tagify__tag.tag-echelle {\n --tag-bg: #d8e6fb;\n --tag-text-color: #1c4f9e;\n --tag-hover: #c3d9f7;\n}\n.tagify__tag.tag-echelle.tag-editing {\n --tag-bg: #9fc2f4;\n box-shadow: 0 0 0 2px #1c4f9e inset;\n}\n.tagify__tag.tag-evalglobal {\n --tag-bg: #ecdcfb;\n --tag-text-color: #6b21a8;\n --tag-hover: #e1c9f7;\n}\n\n.tagify__dropdown__item.ee-list-item {\n margin: 1px;\n}\n\n.expression-editor__menu {\n position: fixed;\n z-index: 99999;\n background: #fff;\n border: 1px solid #c6d4e8;\n border-radius: 8px;\n box-shadow: 0 6px 20px rgba(13, 59, 138, 0.18);\n padding: 8px;\n width: 300px;\n max-height: 360px;\n overflow-y: auto;\n font-family: \"Roboto\", Arial, sans-serif !important;\n}\n.expression-editor__menu .ee-list-group:not(:first-child) {\n margin-top: 6px;\n border-top: 1px solid #eef1f6;\n padding-top: 4px;\n}\n\n.ee-scores-popover {\n position: absolute;\n z-index: 99999;\n background: #fff;\n border: 1px solid #c6d4e8;\n border-radius: 8px;\n box-shadow: 0 6px 20px rgba(13, 59, 138, 0.18);\n padding: 12px 14px;\n min-width: 230px;\n font-family: \"Roboto\", Arial, sans-serif !important;\n}\n.ee-scores-popover__title {\n font-size: 13px;\n font-weight: 600;\n color: #1c4f9e;\n margin-bottom: 8px;\n}\n.ee-scores-popover__inputs {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 10px;\n}\n.ee-scores-popover__inputs label {\n display: flex;\n flex-direction: column;\n font-size: 11px;\n color: #5a6b85;\n}\n.ee-scores-popover__inputs input {\n width: 64px;\n padding: 3px 6px;\n border: 1px solid #c6d4e8;\n border-radius: 4px;\n}\n.ee-scores-popover__actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n}\n.ee-scores-popover__actions button {\n padding: 4px 12px;\n border-radius: 4px;\n border: 1px solid #c6d4e8;\n background: #fff;\n cursor: pointer;\n}\n.ee-scores-popover__actions button.ee-ok {\n background: #1c4f9e;\n border-color: #1c4f9e;\n color: #fff;\n}";
|
|
60247
60510
|
styleInject(css_248z$1);
|
|
60248
60511
|
|
|
60249
60512
|
var css_248z = "@charset \"UTF-8\";:root{--tagify-dd-color-primary:rgb(53,149,246);--tagify-dd-text-color:black;--tagify-dd-bg-color:white;--tagify-dd-item-pad:.3em .5em;--tagify-dd-max-height:300px}.tagify{--tags-disabled-bg:#F1F1F1;--tags-border-color:#DDD;--tags-hover-border-color:#CCC;--tags-focus-border-color:#3595f6;--tag-border-radius:3px;--tag-bg:#E5E5E5;--tag-hover:#D3E2E2;--tag-text-color:black;--tag-text-color--edit:black;--tag-pad:0.3em 0.5em;--tag-inset-shadow-size:1.2em;--tag-invalid-color:#D39494;--tag-invalid-bg:rgba(211, 148, 148, 0.5);--tag--min-width:1ch;--tag--max-width:100%;--tag-hide-transition:0.3s;--tag-remove-bg:rgba(211, 148, 148, 0.3);--tag-remove-btn-color:black;--tag-remove-btn-bg:none;--tag-remove-btn-bg--hover:#c77777;--input-color:inherit;--placeholder-color:rgba(0, 0, 0, 0.4);--placeholder-color-focus:rgba(0, 0, 0, 0.25);--loader-size:.8em;--readonly-striped:1;display:inline-flex;align-items:flex-start;align-content:baseline;flex-wrap:wrap;border:1px solid var(--tags-border-color);padding:0;line-height:0;outline:0;position:relative;box-sizing:border-box;transition:.1s}@keyframes tags--bump{30%{transform:scale(1.2)}}@keyframes rotateLoader{to{transform:rotate(1turn)}}.tagify:has([contenteditable=true]){cursor:text}.tagify:hover:not(.tagify--focus):not(.tagify--invalid){--tags-border-color:var(--tags-hover-border-color)}.tagify[disabled]{background:var(--tags-disabled-bg);filter:saturate(0);opacity:.5;pointer-events:none}.tagify[disabled].tagify--empty>.tagify__input::before{position:relative}.tagify[disabled].tagify--select,.tagify[readonly].tagify--select{pointer-events:none}.tagify[disabled]:not(.tagify--mix):not(.tagify--select):not(.tagify--empty),.tagify[readonly]:not(.tagify--mix):not(.tagify--select):not(.tagify--empty){cursor:default}.tagify[disabled]:not(.tagify--mix):not(.tagify--select):not(.tagify--empty)>.tagify__input,.tagify[readonly]:not(.tagify--mix):not(.tagify--select):not(.tagify--empty)>.tagify__input{visibility:hidden;width:0;margin:5px 0}.tagify[disabled]:not(.tagify--mix):not(.tagify--select):not(.tagify--empty) .tagify__tag>div,.tagify[readonly]:not(.tagify--mix):not(.tagify--select):not(.tagify--empty) .tagify__tag>div{padding:var(--tag-pad)}.tagify[disabled]:not(.tagify--mix):not(.tagify--select):not(.tagify--empty) .tagify__tag>div::before,.tagify[readonly]:not(.tagify--mix):not(.tagify--select):not(.tagify--empty) .tagify__tag>div::before{animation:readonlyStyles 1s calc(-1s * (var(--readonly-striped) - 1)) paused}@keyframes readonlyStyles{0%{background:linear-gradient(45deg,var(--tag-bg) 25%,transparent 25%,transparent 50%,var(--tag-bg) 50%,var(--tag-bg) 75%,transparent 75%,transparent) 0/5px 5px;box-shadow:none;filter:brightness(.95)}}.tagify[disabled] .tagify__tag__removeBtn,.tagify[readonly] .tagify__tag__removeBtn{display:none}.tagify--loading .tagify__input>br:last-child{display:none}.tagify--loading .tagify__input::before{content:none}.tagify--loading .tagify__input::after{content:\"\";vertical-align:middle;opacity:1;width:.7em;height:.7em;width:var(--loader-size);height:var(--loader-size);min-width:0;border:3px solid;border-color:#eee #bbb #888 transparent;border-radius:50%;animation:rotateLoader .4s infinite linear;content:\"\"!important;margin:-2px 0 -2px .5em}.tagify--loading .tagify__input:empty::after{margin-left:0}.tagify+input,.tagify+textarea{position:absolute!important;left:-9999em!important;transform:scale(0)!important}.tagify__tag{display:inline-flex;align-items:center;max-width:var(--tag--max-width);margin-inline:5px 0;margin-block:5px;position:relative;z-index:1;outline:0;line-height:normal;cursor:default;transition:.13s ease-out}.tagify__tag:last-child{margin-right:5px}.tagify__tag>div{display:flex;flex:1;vertical-align:top;box-sizing:border-box;max-width:100%;padding:var(--tag-pad);color:var(--tag-text-color);line-height:inherit;border-radius:var(--tag-border-radius);white-space:nowrap;transition:.13s ease-out}.tagify__tag>div>*{white-space:pre-wrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;vertical-align:top;min-width:var(--tag--min-width);max-width:var(--tag--max-width);transition:.8s ease,.1s color}.tagify__tag>div>[contenteditable]{display:block;outline:0;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:text;margin:-2px;padding:2px;max-width:350px}.tagify__tag>div>:only-child{width:100%}.tagify__tag>div::before{content:\"\";position:absolute;border-radius:inherit;inset:var(--tag-bg-inset,0);z-index:-1;pointer-events:none;transition:120ms ease;animation:tags--bump .3s ease-out 1;box-shadow:0 0 0 var(--tag-inset-shadow-size) var(--tag-bg) inset}.tagify__tag:focus div::before,.tagify__tag:hover:not([readonly]) div::before{--tag-bg-inset:-2.5px;--tag-bg:var(--tag-hover)}.tagify__tag--loading{pointer-events:none}.tagify__tag--loading .tagify__tag__removeBtn{display:none}.tagify__tag--loading::after{--loader-size:.4em;content:\"\";vertical-align:middle;opacity:1;width:.7em;height:.7em;width:var(--loader-size);height:var(--loader-size);min-width:0;border:3px solid;border-color:#eee #bbb #888 transparent;border-radius:50%;animation:rotateLoader .4s infinite linear;margin:0 .5em 0 -.1em}.tagify__tag--flash div::before{animation:none}.tagify__tag--hide{width:0!important;padding-left:0;padding-right:0;margin-left:0;margin-right:0;opacity:0;transform:scale(0);transition:var(--tag-hide-transition);pointer-events:none}.tagify__tag--hide>div>*{white-space:nowrap}.tagify__tag.tagify--noAnim>div::before{animation:none}.tagify__tag.tagify--notAllowed:not(.tagify__tag--editable) div>span{opacity:.5}.tagify__tag.tagify--notAllowed:not(.tagify__tag--editable) div::before{--tag-bg:var(--tag-invalid-bg);transition:.2s}.tagify__tag[readonly] .tagify__tag__removeBtn{display:none}.tagify__tag[readonly]>div::before{animation:readonlyStyles 1s calc(-1s * (var(--readonly-striped) - 1)) paused}@keyframes readonlyStyles{0%{background:linear-gradient(45deg,var(--tag-bg) 25%,transparent 25%,transparent 50%,var(--tag-bg) 50%,var(--tag-bg) 75%,transparent 75%,transparent) 0/5px 5px;box-shadow:none;filter:brightness(.95)}}.tagify__tag--editable>div{color:var(--tag-text-color--edit)}.tagify__tag--editable>div::before{box-shadow:0 0 0 2px var(--tag-hover) inset!important}.tagify__tag--editable>.tagify__tag__removeBtn{pointer-events:none;opacity:0;transform:translateX(100%) translateX(5px)}.tagify__tag--editable.tagify--invalid>div::before{box-shadow:0 0 0 2px var(--tag-invalid-color) inset!important}.tagify__tag__removeBtn{order:5;display:inline-flex;align-items:center;justify-content:center;border-radius:50px;cursor:pointer;font:14px/1 Arial;background:var(--tag-remove-btn-bg);color:var(--tag-remove-btn-color);width:14px;height:14px;margin-inline:auto 4.6666666667px;overflow:hidden;transition:.2s ease-out}.tagify__tag__removeBtn::after{content:\"×\";transition:.3s,color 0s}.tagify__tag__removeBtn:hover{color:#fff;background:var(--tag-remove-btn-bg--hover)}.tagify__tag__removeBtn:hover+div>span{opacity:.5}.tagify__tag__removeBtn:hover+div::before{box-shadow:0 0 0 var(--tag-inset-shadow-size) var(--tag-remove-bg,rgba(211,148,148,.3)) inset!important;transition:box-shadow .2s}.tagify:not(.tagify--mix) .tagify__input br{display:none}.tagify:not(.tagify--mix) .tagify__input *{display:inline;white-space:nowrap}.tagify__input{display:inline-block;margin:5px;padding:var(--tag-pad);line-height:normal;min-width:-moz-fit-content;min-width:fit-content;min-height:1.5lh;position:relative;white-space:pre-wrap;color:var(--input-color);box-sizing:inherit;overflow:hidden}.tagify__input:focus{outline:0}.tagify__input:last-child{flex-grow:1;min-width:110px}.tagify__input:last-child:focus::before{transition:.2s ease-out;opacity:0;transform:translateX(6px)}@supports (-ms-ime-align:auto){.tagify__input:last-child:focus::before{display:none}}.tagify__input:last-child:focus:empty::before{transition:.2s ease-out;opacity:1;transform:none;color:rgba(0,0,0,.25);color:var(--placeholder-color-focus)}@-moz-document url-prefix(){.tagify__input:last-child:focus:empty::after{display:none}}.tagify__input:last-child::before{content:attr(data-placeholder)}.tagify__input::before{width:100%;height:100%;margin:auto 0;z-index:1;color:var(--placeholder-color);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;pointer-events:none;opacity:0;position:absolute}.tagify__input::after{content:attr(data-suggest);display:inline-block;vertical-align:middle;position:absolute;min-width:calc(100% - 1.5em);text-overflow:ellipsis;overflow:hidden;white-space:pre;color:var(--tag-text-color);opacity:.3;pointer-events:none;max-width:100px}.tagify__input .tagify__tag{margin:0 1px}.tagify--mix{display:block}.tagify--mix .tagify__input{padding:5px;margin:0;width:100%;height:100%;line-height:1.5;display:block}.tagify--mix .tagify__input::before{height:auto;display:none;line-height:inherit}.tagify--mix .tagify__input::after{content:none}.tagify--select{cursor:default}.tagify--select::after{content:\">\";opacity:.5;position:absolute;top:50%;right:0;bottom:0;font:16px monospace;line-height:8px;height:8px;pointer-events:none;transform:translate(-150%,-50%) scaleX(1.2) rotate(90deg);transition:.2s ease-in-out}.tagify--select[aria-expanded=true]::after{transform:translate(-150%,-50%) rotate(270deg) scaleY(1.2)}.tagify--select[aria-expanded=true] .tagify__tag__removeBtn{pointer-events:none;opacity:0;transform:translateX(100%) translateX(5px)}.tagify--select .tagify__tag{flex:1;max-width:none;margin-inline-end:2em;margin-block:0;padding-block:5px;cursor:text}.tagify--select .tagify__tag div::before{display:none}.tagify--select .tagify__tag+.tagify__input{display:none}.tagify--empty .tagify__input::before{transition:.2s ease-out;opacity:1;transform:none;display:inline-block;width:auto}.tagify--mix .tagify--empty .tagify__input::before{display:inline-block}.tagify--focus{--tags-border-color:var(--tags-focus-border-color);transition:0s}.tagify--invalid{--tags-border-color:#D39494}.tagify__dropdown{position:absolute;z-index:9999;transform:translateY(-1px);border-top:1px solid var(--tagify-dd-color-primary);overflow:hidden}.tagify__dropdown[dir=rtl]{transform:translate(-100%,-1px)}.tagify__dropdown[placement=top]{margin-top:0;transform:translateY(-100%)}.tagify__dropdown[placement=top] .tagify__dropdown__wrapper{border-top-width:1.1px;border-bottom-width:0}.tagify__dropdown[position=text]{box-shadow:0 0 0 3px rgba(var(--tagify-dd-color-primary),.1);font-size:.9em}.tagify__dropdown[position=text] .tagify__dropdown__wrapper{border-width:1px}.tagify__dropdown__wrapper{scroll-behavior:auto;max-height:var(--tagify-dd-max-height);overflow:hidden;overflow-x:hidden;color:var(--tagify-dd-text-color);background:var(--tagify-dd-bg-color);border:1px solid;border-color:var(--tagify-dd-color-primary);border-bottom-width:1.5px;border-top-width:0;box-shadow:0 2px 4px -2px rgba(0,0,0,.2);transition:.3s cubic-bezier(.5,0,.3,1),transform .15s;animation:dd-wrapper-show 0s .3s forwards}@keyframes dd-wrapper-show{to{overflow-y:auto}}.tagify__dropdown__header:empty{display:none}.tagify__dropdown__footer{display:inline-block;margin-top:.5em;padding:var(--tagify-dd-item-pad);font-size:.7em;font-style:italic;opacity:.5}.tagify__dropdown__footer:empty{display:none}.tagify__dropdown--initial .tagify__dropdown__wrapper{max-height:20px;transform:translateY(-1em)}.tagify__dropdown--initial[placement=top] .tagify__dropdown__wrapper{transform:translateY(2em)}.tagify__dropdown__item{box-sizing:border-box;padding:var(--tagify-dd-item-pad);margin:1px;white-space:pre-wrap;cursor:pointer;border-radius:2px;position:relative;outline:0;max-height:60px;max-width:100%;line-height:normal;position:relative}.tagify__dropdown__item--active{background:var(--tagify-dd-color-primary);color:#fff}.tagify__dropdown__item:active{filter:brightness(105%)}.tagify__dropdown__item--hidden{padding-top:0;padding-bottom:0;margin:0 1px;pointer-events:none;overflow:hidden;max-height:0;transition:var(--tagify-dd-item--hidden-duration,.3s)!important}.tagify__dropdown__item--hidden>*{transform:translateY(-100%);opacity:0;transition:inherit}.tagify__dropdown__item--selected::before{content:\"✓\";font-family:monospace;position:absolute;inset-inline-start:6px;text-indent:0;line-height:1.1}.tagify__dropdown:has(.tagify__dropdown__item--selected) .tagify__dropdown__item{text-indent:1em}";
|
|
@@ -62536,19 +62799,6 @@ N.prototype = {
|
|
|
62536
62799
|
}
|
|
62537
62800
|
}, N.prototype.removeTag = N.prototype.removeTags;
|
|
62538
62801
|
|
|
62539
|
-
/**
|
|
62540
|
-
* Éditeur d'expression de calcul en mode mixte texte + tags (Tagify).
|
|
62541
|
-
*
|
|
62542
|
-
* Les références au modèle (échelles complémentaires « field » et grilles « echelle ») sont
|
|
62543
|
-
* des TAGS insécables ; le reste (opérateurs, fonctions, nombres) est du texte libre.
|
|
62544
|
-
*
|
|
62545
|
-
* Le composant ne connaît QUE le format moteur en entrée/sortie :
|
|
62546
|
-
* - value : "field(42) + echelle(main, 'abs', [1, 2, 3, 4])"
|
|
62547
|
-
* - onChange : rappelé avec l'expression au même format à chaque modification.
|
|
62548
|
-
* La conversion vers/depuis les tags Tagify ([[{json}]]) est interne.
|
|
62549
|
-
*/
|
|
62550
|
-
|
|
62551
|
-
// --- Sérialisation d'un tag -> fragment d'expression au format moteur ---
|
|
62552
62802
|
var serializeTagData = function serializeTagData(d) {
|
|
62553
62803
|
if (d.refType === 'field') {
|
|
62554
62804
|
return "field(".concat(d.refId, ")");
|
|
@@ -62561,9 +62811,6 @@ var serializeTagData = function serializeTagData(d) {
|
|
|
62561
62811
|
}
|
|
62562
62812
|
return d.value || '';
|
|
62563
62813
|
};
|
|
62564
|
-
|
|
62565
|
-
// --- Valeur mixte Tagify ([[{json}]] + texte) -> expression moteur ---
|
|
62566
|
-
// Parse incrémental : un JSON de tag peut contenir "]]", qui casserait un regex non-greedy.
|
|
62567
62814
|
var tagifyMixToExpression = function tagifyMixToExpression(mix) {
|
|
62568
62815
|
var out = '';
|
|
62569
62816
|
var i = 0;
|
|
@@ -62593,12 +62840,23 @@ var tagifyMixToExpression = function tagifyMixToExpression(mix) {
|
|
|
62593
62840
|
out += serializeTagData(parsed);
|
|
62594
62841
|
i = end + 2;
|
|
62595
62842
|
}
|
|
62596
|
-
|
|
62597
|
-
|
|
62598
|
-
|
|
62843
|
+
return out.replace(/ /g, ' ').replace(//g, '').trim();
|
|
62844
|
+
};
|
|
62845
|
+
var getCaretRangeAtVisualEnd = function getCaretRangeAtVisualEnd(tagify) {
|
|
62846
|
+
var input = tagify.DOM.input;
|
|
62847
|
+
var range = document.createRange();
|
|
62848
|
+
var last = input.lastChild;
|
|
62849
|
+
if (last && last.nodeName === 'BR') {
|
|
62850
|
+
last = last.previousSibling;
|
|
62851
|
+
}
|
|
62852
|
+
if (last) {
|
|
62853
|
+
range.setStartAfter(last);
|
|
62854
|
+
} else {
|
|
62855
|
+
range.setStart(input, 0);
|
|
62856
|
+
}
|
|
62857
|
+
range.collapse(true);
|
|
62858
|
+
return range;
|
|
62599
62859
|
};
|
|
62600
|
-
|
|
62601
|
-
// --- Expression moteur -> valeur mixte Tagify (les références deviennent des [[{json}]]) ---
|
|
62602
62860
|
var expressionToTagifyMix = function expressionToTagifyMix(expr, whitelist) {
|
|
62603
62861
|
expr = expr || '';
|
|
62604
62862
|
expr = expr.replace(/field\(\s*(\d+)\s*\)/g, function (m, id) {
|
|
@@ -62635,30 +62893,51 @@ var ExpressionEditor = function ExpressionEditor(_ref) {
|
|
|
62635
62893
|
var _ref$references = _ref.references,
|
|
62636
62894
|
references = _ref$references === void 0 ? [] : _ref$references,
|
|
62637
62895
|
_ref$operators = _ref.operators,
|
|
62638
|
-
operators = _ref$operators === void 0 ? ['+', '-', '*', '/', '%', 'min(
|
|
62896
|
+
operators = _ref$operators === void 0 ? ['+', '-', '*', '/', '%', 'min(a, b)', 'max(a, b)', 'avg(a, b)', 'sum(a, b)', 'round(x)', 'ceil(x)', 'floor(x)'] : _ref$operators,
|
|
62639
62897
|
_ref$value = _ref.value,
|
|
62640
62898
|
value = _ref$value === void 0 ? '' : _ref$value,
|
|
62641
62899
|
onChange = _ref.onChange,
|
|
62642
62900
|
_ref$targetInputId = _ref.targetInputId,
|
|
62643
62901
|
targetInputId = _ref$targetInputId === void 0 ? null : _ref$targetInputId,
|
|
62644
62902
|
_ref$placeholder = _ref.placeholder,
|
|
62645
|
-
placeholder = _ref$placeholder === void 0 ? "
|
|
62903
|
+
placeholder = _ref$placeholder === void 0 ? "Cliquez sur « + » ou tapez « @ » pour insérer une référence…" : _ref$placeholder;
|
|
62646
62904
|
var textareaRef = useRef(null);
|
|
62647
62905
|
var tagifyRef = useRef(null);
|
|
62906
|
+
var addBtnRef = useRef(null);
|
|
62907
|
+
var menuRef = useRef(null);
|
|
62648
62908
|
var onChangeRef = useRef(onChange);
|
|
62649
62909
|
onChangeRef.current = onChange;
|
|
62650
62910
|
var _useState = useState(null),
|
|
62651
62911
|
_useState2 = _slicedToArray$b(_useState, 2),
|
|
62652
62912
|
popover = _useState2[0],
|
|
62653
|
-
setPopover = _useState2[1];
|
|
62654
|
-
|
|
62655
|
-
|
|
62913
|
+
setPopover = _useState2[1];
|
|
62914
|
+
var _useState3 = useState(null),
|
|
62915
|
+
_useState4 = _slicedToArray$b(_useState3, 2),
|
|
62916
|
+
initError = _useState4[0],
|
|
62917
|
+
setInitError = _useState4[1];
|
|
62918
|
+
var _useState5 = useState(null),
|
|
62919
|
+
_useState6 = _slicedToArray$b(_useState5, 2),
|
|
62920
|
+
menuPos = _useState6[0],
|
|
62921
|
+
setMenuPos = _useState6[1];
|
|
62656
62922
|
var whitelist = useMemo(function () {
|
|
62657
62923
|
return references;
|
|
62658
62924
|
}, [references]);
|
|
62925
|
+
var tagifyWhitelist = useMemo(function () {
|
|
62926
|
+
return [].concat(_toConsumableArray$8(whitelist.map(function (ref) {
|
|
62927
|
+
return _objectSpread2(_objectSpread2({}, ref), {}, {
|
|
62928
|
+
section: 'refs'
|
|
62929
|
+
});
|
|
62930
|
+
})), _toConsumableArray$8(operators.map(function (op) {
|
|
62931
|
+
return {
|
|
62932
|
+
value: op,
|
|
62933
|
+
refType: 'operator',
|
|
62934
|
+
"class": 'tag-operator',
|
|
62935
|
+
section: 'ops'
|
|
62936
|
+
};
|
|
62937
|
+
})));
|
|
62938
|
+
}, [whitelist, operators]);
|
|
62659
62939
|
var emitChange = useCallback(function (mixValue) {
|
|
62660
62940
|
var expression = tagifyMixToExpression(mixValue);
|
|
62661
|
-
// Intégration Symfony : on alimente l'input caché du formulaire (champ réellement soumis)
|
|
62662
62941
|
if (targetInputId) {
|
|
62663
62942
|
var target = document.getElementById(targetInputId);
|
|
62664
62943
|
if (target) {
|
|
@@ -62669,85 +62948,163 @@ var ExpressionEditor = function ExpressionEditor(_ref) {
|
|
|
62669
62948
|
onChangeRef.current(expression);
|
|
62670
62949
|
}
|
|
62671
62950
|
}, [targetInputId]);
|
|
62672
|
-
|
|
62673
|
-
// Instanciation de Tagify core sur le textarea (le wrapper React officiel est cassé en v4.33)
|
|
62674
62951
|
useEffect(function () {
|
|
62675
62952
|
var el = textareaRef.current;
|
|
62676
62953
|
if (!el) {
|
|
62677
62954
|
return undefined;
|
|
62678
62955
|
}
|
|
62679
|
-
|
|
62680
|
-
|
|
62681
|
-
|
|
62682
|
-
|
|
62683
|
-
|
|
62684
|
-
|
|
62685
|
-
|
|
62686
|
-
|
|
62687
|
-
|
|
62688
|
-
|
|
62689
|
-
|
|
62690
|
-
|
|
62691
|
-
|
|
62692
|
-
|
|
62693
|
-
|
|
62694
|
-
|
|
62695
|
-
|
|
62696
|
-
|
|
62697
|
-
|
|
62698
|
-
|
|
62699
|
-
|
|
62700
|
-
|
|
62701
|
-
|
|
62956
|
+
var tagify;
|
|
62957
|
+
var operatorTagObserver;
|
|
62958
|
+
try {
|
|
62959
|
+
el.value = expressionToTagifyMix(value, whitelist);
|
|
62960
|
+
tagify = new N(el, {
|
|
62961
|
+
mode: 'mix',
|
|
62962
|
+
pattern: '@',
|
|
62963
|
+
duplicates: true,
|
|
62964
|
+
editTags: false,
|
|
62965
|
+
mixMode: {
|
|
62966
|
+
insertAfterTag: ' '
|
|
62967
|
+
},
|
|
62968
|
+
whitelist: tagifyWhitelist,
|
|
62969
|
+
dropdown: {
|
|
62970
|
+
enabled: 0,
|
|
62971
|
+
maxItems: 200,
|
|
62972
|
+
fuzzySearch: true,
|
|
62973
|
+
highlightFirst: true,
|
|
62974
|
+
searchKeys: ['value', 'groupe'],
|
|
62975
|
+
includeSelectedTags: true
|
|
62976
|
+
},
|
|
62977
|
+
templates: {
|
|
62978
|
+
dropdownItem: function dropdownItem(item) {
|
|
62979
|
+
var list = this.suggestedListItems || [];
|
|
62980
|
+
var itemKey = function itemKey(it) {
|
|
62981
|
+
return "".concat(it.section || '', "|").concat(it.groupe || '', "|").concat(it.value);
|
|
62982
|
+
};
|
|
62983
|
+
var idx = list.findIndex(function (it) {
|
|
62984
|
+
return itemKey(it) === itemKey(item);
|
|
62985
|
+
});
|
|
62986
|
+
var prev = idx > 0 ? list[idx - 1] : null;
|
|
62987
|
+
var headers = '';
|
|
62988
|
+
if (!prev || prev.section !== item.section) {
|
|
62989
|
+
headers += "<div class=\"ee-list-group__label\">".concat(item.section === 'ops' ? 'Opérateurs & fonctions' : 'Échelles & grilles', "</div>");
|
|
62990
|
+
}
|
|
62991
|
+
if (item.section === 'refs') {
|
|
62992
|
+
var groupe = item.groupe || '';
|
|
62993
|
+
var prevGroupe = prev && prev.section === 'refs' ? prev.groupe || '' : null;
|
|
62994
|
+
if (groupe && prevGroupe !== groupe) {
|
|
62995
|
+
headers += "<div class=\"ee-list-group__label ee-list-group__label--sub\">".concat(groupe, "</div>");
|
|
62996
|
+
}
|
|
62997
|
+
}
|
|
62998
|
+
var labelClass = item.refType === 'operator' ? 'ee-list-item__label ee-list-item__label--op' : 'ee-list-item__label';
|
|
62999
|
+
return "".concat(headers, "<div ").concat(this.getAttributes(item), " class=\"").concat(this.settings.classNames.dropdownItem, " ee-list-item ee-opt--").concat(item.refType, "\" tabindex=\"0\" role=\"option\">\n <span class=\"").concat(labelClass, "\">").concat(item.value, "</span>\n </div>");
|
|
63000
|
+
}
|
|
62702
63001
|
}
|
|
62703
|
-
}
|
|
62704
|
-
|
|
62705
|
-
|
|
62706
|
-
|
|
62707
|
-
|
|
62708
|
-
|
|
62709
|
-
|
|
62710
|
-
|
|
62711
|
-
|
|
62712
|
-
|
|
62713
|
-
|
|
62714
|
-
|
|
62715
|
-
|
|
62716
|
-
|
|
62717
|
-
|
|
62718
|
-
|
|
62719
|
-
|
|
62720
|
-
|
|
62721
|
-
|
|
62722
|
-
|
|
62723
|
-
|
|
62724
|
-
|
|
62725
|
-
|
|
62726
|
-
|
|
63002
|
+
});
|
|
63003
|
+
tagify.on('change', function (e) {
|
|
63004
|
+
return emitChange(e.detail.value);
|
|
63005
|
+
});
|
|
63006
|
+
operatorTagObserver = new MutationObserver(function (mutations) {
|
|
63007
|
+
var converted = false;
|
|
63008
|
+
mutations.forEach(function (m) {
|
|
63009
|
+
m.addedNodes.forEach(function (node) {
|
|
63010
|
+
if (node.nodeType !== 1) {
|
|
63011
|
+
return;
|
|
63012
|
+
}
|
|
63013
|
+
var tagElms = node.classList && node.classList.contains('tagify__tag') ? [node] : Array.from(node.querySelectorAll ? node.querySelectorAll('.tagify__tag') : []);
|
|
63014
|
+
tagElms.forEach(function (tagElm) {
|
|
63015
|
+
var data = tagElm.__tagifyTagData;
|
|
63016
|
+
if (!data || data.refType !== 'operator') {
|
|
63017
|
+
return;
|
|
63018
|
+
}
|
|
63019
|
+
var textNode = document.createTextNode("".concat(data.value, " "));
|
|
63020
|
+
tagElm.replaceWith(textNode);
|
|
63021
|
+
var range = document.createRange();
|
|
63022
|
+
range.setStartAfter(textNode);
|
|
63023
|
+
range.collapse(true);
|
|
63024
|
+
var sel = window.getSelection();
|
|
63025
|
+
sel.removeAllRanges();
|
|
63026
|
+
sel.addRange(range);
|
|
63027
|
+
converted = true;
|
|
63028
|
+
});
|
|
63029
|
+
});
|
|
63030
|
+
});
|
|
63031
|
+
if (converted) {
|
|
63032
|
+
tagify.updateValueByDOMTags();
|
|
63033
|
+
tagify.update();
|
|
62727
63034
|
}
|
|
62728
63035
|
});
|
|
62729
|
-
|
|
62730
|
-
|
|
63036
|
+
operatorTagObserver.observe(tagify.DOM.input, {
|
|
63037
|
+
childList: true,
|
|
63038
|
+
subtree: true
|
|
63039
|
+
});
|
|
63040
|
+
tagify.on('click', function (e) {
|
|
63041
|
+
var data = e.detail.data;
|
|
63042
|
+
if (!data || data.refType !== 'echelle') {
|
|
63043
|
+
return;
|
|
63044
|
+
}
|
|
63045
|
+
var rect = e.detail.tag.getBoundingClientRect();
|
|
63046
|
+
setPopover({
|
|
63047
|
+
tag: e.detail.tag,
|
|
63048
|
+
data: data,
|
|
63049
|
+
scores: (data.scores && data.scores.length ? data.scores : Array.from({
|
|
63050
|
+
length: data.niveaux
|
|
63051
|
+
}, function (_, k) {
|
|
63052
|
+
return k + 1;
|
|
63053
|
+
})).slice(),
|
|
63054
|
+
pos: {
|
|
63055
|
+
top: rect.bottom + 6,
|
|
63056
|
+
left: rect.left
|
|
63057
|
+
}
|
|
63058
|
+
});
|
|
63059
|
+
});
|
|
63060
|
+
tagifyRef.current = tagify;
|
|
63061
|
+
} catch (err) {
|
|
63062
|
+
// eslint-disable-next-line no-console
|
|
63063
|
+
console.error('[ExpressionEditor] échec d\'initialisation Tagify :', err);
|
|
63064
|
+
setInitError(err && err.message ? err.message : String(err));
|
|
63065
|
+
}
|
|
62731
63066
|
return function () {
|
|
62732
|
-
|
|
63067
|
+
if (operatorTagObserver) {
|
|
63068
|
+
operatorTagObserver.disconnect();
|
|
63069
|
+
}
|
|
63070
|
+
if (tagify) {
|
|
63071
|
+
tagify.destroy();
|
|
63072
|
+
}
|
|
62733
63073
|
tagifyRef.current = null;
|
|
62734
63074
|
};
|
|
62735
|
-
// Monté une seule fois : whitelist/valeur figées au montage (comme un champ de formulaire)
|
|
62736
63075
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62737
63076
|
}, []);
|
|
62738
|
-
|
|
62739
|
-
// Insertion depuis la palette (références = tags ; opérateurs = texte libre)
|
|
62740
63077
|
var insertReference = useCallback(function (ref) {
|
|
62741
63078
|
var tagify = tagifyRef.current;
|
|
62742
|
-
if (tagify) {
|
|
62743
|
-
|
|
63079
|
+
if (!tagify) {
|
|
63080
|
+
return;
|
|
62744
63081
|
}
|
|
63082
|
+
tagify.state.tag = null;
|
|
63083
|
+
var range = getCaretRangeAtVisualEnd(tagify);
|
|
63084
|
+
tagify.state.selection = {
|
|
63085
|
+
anchorOffset: range.startOffset,
|
|
63086
|
+
anchorNode: range.startContainer,
|
|
63087
|
+
range: range
|
|
63088
|
+
};
|
|
63089
|
+
tagify.addMixTags([_objectSpread2({}, ref)]);
|
|
63090
|
+
tagify.state.selection = null;
|
|
63091
|
+
tagify.state.tag = null;
|
|
62745
63092
|
}, []);
|
|
62746
63093
|
var insertOperator = useCallback(function (op) {
|
|
62747
63094
|
var tagify = tagifyRef.current;
|
|
62748
|
-
if (tagify) {
|
|
62749
|
-
|
|
63095
|
+
if (!tagify) {
|
|
63096
|
+
return;
|
|
62750
63097
|
}
|
|
63098
|
+
tagify.state.tag = null;
|
|
63099
|
+
var range = getCaretRangeAtVisualEnd(tagify);
|
|
63100
|
+
tagify.state.selection = {
|
|
63101
|
+
anchorOffset: range.startOffset,
|
|
63102
|
+
anchorNode: range.startContainer,
|
|
63103
|
+
range: range
|
|
63104
|
+
};
|
|
63105
|
+
tagify.injectAtCaret("".concat(op, " "));
|
|
63106
|
+
tagify.state.selection = null;
|
|
63107
|
+
tagify.state.tag = null;
|
|
62751
63108
|
}, []);
|
|
62752
63109
|
var validatePopoverScores = useCallback(function () {
|
|
62753
63110
|
var tagify = tagifyRef.current;
|
|
@@ -62763,13 +63120,35 @@ var ExpressionEditor = function ExpressionEditor(_ref) {
|
|
|
62763
63120
|
scores: popover.scores
|
|
62764
63121
|
}));
|
|
62765
63122
|
setPopover(null);
|
|
62766
|
-
// Tagify ne déclenche pas toujours change sur replaceTag : on force la synchro
|
|
62767
63123
|
setTimeout(function () {
|
|
62768
63124
|
return emitChange(tagify.DOM.originalInput.value);
|
|
62769
63125
|
}, 0);
|
|
62770
63126
|
}, [popover, emitChange]);
|
|
62771
|
-
|
|
62772
|
-
|
|
63127
|
+
useEffect(function () {
|
|
63128
|
+
if (!menuPos) {
|
|
63129
|
+
return undefined;
|
|
63130
|
+
}
|
|
63131
|
+
var onDocMouseDown = function onDocMouseDown(e) {
|
|
63132
|
+
if (menuRef.current && menuRef.current.contains(e.target)) {
|
|
63133
|
+
return;
|
|
63134
|
+
}
|
|
63135
|
+
if (addBtnRef.current && addBtnRef.current.contains(e.target)) {
|
|
63136
|
+
return;
|
|
63137
|
+
}
|
|
63138
|
+
setMenuPos(null);
|
|
63139
|
+
};
|
|
63140
|
+
var onKeyDown = function onKeyDown(e) {
|
|
63141
|
+
if (e.key === 'Escape') {
|
|
63142
|
+
setMenuPos(null);
|
|
63143
|
+
}
|
|
63144
|
+
};
|
|
63145
|
+
document.addEventListener('mousedown', onDocMouseDown);
|
|
63146
|
+
document.addEventListener('keydown', onKeyDown);
|
|
63147
|
+
return function () {
|
|
63148
|
+
document.removeEventListener('mousedown', onDocMouseDown);
|
|
63149
|
+
document.removeEventListener('keydown', onKeyDown);
|
|
63150
|
+
};
|
|
63151
|
+
}, [menuPos]);
|
|
62773
63152
|
var groupedReferences = useMemo(function () {
|
|
62774
63153
|
var groups = {};
|
|
62775
63154
|
whitelist.forEach(function (ref) {
|
|
@@ -62778,68 +63157,131 @@ var ExpressionEditor = function ExpressionEditor(_ref) {
|
|
|
62778
63157
|
});
|
|
62779
63158
|
return groups;
|
|
62780
63159
|
}, [whitelist]);
|
|
62781
|
-
|
|
62782
|
-
// Double-clic sur une option d'un <select> : on retrouve la référence via son index
|
|
62783
|
-
var handleReferenceDblClick = useCallback(function (e) {
|
|
62784
|
-
if (e.target.tagName !== 'OPTION') {
|
|
62785
|
-
return;
|
|
62786
|
-
}
|
|
62787
|
-
var ref = whitelist[Number(e.target.value)];
|
|
62788
|
-
if (ref) {
|
|
62789
|
-
insertReference(ref);
|
|
62790
|
-
}
|
|
62791
|
-
}, [whitelist, insertReference]);
|
|
62792
|
-
var handleOperatorDblClick = useCallback(function (e) {
|
|
62793
|
-
if (e.target.tagName !== 'OPTION') {
|
|
62794
|
-
return;
|
|
62795
|
-
}
|
|
62796
|
-
insertOperator(e.target.value);
|
|
62797
|
-
}, [insertOperator]);
|
|
62798
63160
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
62799
63161
|
className: "expression-editor"
|
|
63162
|
+
}, initError && /*#__PURE__*/React__default.createElement("div", {
|
|
63163
|
+
className: "expression-editor__error"
|
|
63164
|
+
}, "L'\xE9diteur d'expression n'a pas pu s'initialiser (", initError, "). Le champ texte brut reste utilisable."), /*#__PURE__*/React__default.createElement("div", {
|
|
63165
|
+
className: "expression-editor__field-row"
|
|
62800
63166
|
}, /*#__PURE__*/React__default.createElement("textarea", {
|
|
62801
63167
|
ref: textareaRef,
|
|
62802
63168
|
className: "expression-editor__field",
|
|
62803
63169
|
placeholder: placeholder
|
|
62804
|
-
}), /*#__PURE__*/React__default.createElement("
|
|
63170
|
+
}), /*#__PURE__*/React__default.createElement("button", {
|
|
63171
|
+
ref: addBtnRef,
|
|
63172
|
+
type: "button",
|
|
63173
|
+
className: "expression-editor__add-btn",
|
|
63174
|
+
title: "Ins\xE9rer une r\xE9f\xE9rence, un op\xE9rateur ou une fonction",
|
|
63175
|
+
onClick: function onClick() {
|
|
63176
|
+
if (!tagifyRef.current) {
|
|
63177
|
+
return;
|
|
63178
|
+
}
|
|
63179
|
+
if (menuPos) {
|
|
63180
|
+
setMenuPos(null);
|
|
63181
|
+
return;
|
|
63182
|
+
}
|
|
63183
|
+
var rect = addBtnRef.current.getBoundingClientRect();
|
|
63184
|
+
setMenuPos({
|
|
63185
|
+
top: rect.bottom + 6,
|
|
63186
|
+
left: Math.max(8, rect.right - 300)
|
|
63187
|
+
});
|
|
63188
|
+
}
|
|
63189
|
+
}, "+")), /*#__PURE__*/React__default.createElement("div", {
|
|
62805
63190
|
className: "expression-editor__hint"
|
|
62806
|
-
}, "
|
|
63191
|
+
}, "Cliquez sur \xAB + \xBB, double-cliquez un \xE9l\xE9ment des listes, ou tapez \xAB @ \xBB dans l'expression."), /*#__PURE__*/React__default.createElement("div", {
|
|
62807
63192
|
className: "expression-editor__palette"
|
|
62808
63193
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
62809
63194
|
className: "ee-palette-col ee-palette-col--refs"
|
|
62810
63195
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
62811
63196
|
className: "ee-palette-col__title"
|
|
62812
|
-
}, "\xC9chelles & grilles"), /*#__PURE__*/React__default.createElement("
|
|
62813
|
-
className: "ee-
|
|
62814
|
-
|
|
62815
|
-
size: 8,
|
|
62816
|
-
onDoubleClick: handleReferenceDblClick
|
|
63197
|
+
}, "\xC9chelles & grilles"), /*#__PURE__*/React__default.createElement("div", {
|
|
63198
|
+
className: "ee-list",
|
|
63199
|
+
role: "listbox"
|
|
62817
63200
|
}, Object.keys(groupedReferences).map(function (groupe) {
|
|
62818
|
-
return /*#__PURE__*/React__default.createElement("
|
|
62819
|
-
|
|
63201
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
63202
|
+
className: "ee-list-group",
|
|
62820
63203
|
key: groupe
|
|
62821
|
-
},
|
|
62822
|
-
|
|
62823
|
-
|
|
62824
|
-
|
|
62825
|
-
|
|
62826
|
-
|
|
63204
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
63205
|
+
className: "ee-list-group__label"
|
|
63206
|
+
}, groupe), groupedReferences[groupe].map(function (ref) {
|
|
63207
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
63208
|
+
key: "".concat(ref.refType, "-").concat(ref.value, "-").concat(ref.refId || '', "-").concat(ref.axe || ''),
|
|
63209
|
+
className: "ee-list-item ee-opt--".concat(ref.refType),
|
|
63210
|
+
onMouseDown: function onMouseDown(e) {
|
|
63211
|
+
return e.preventDefault();
|
|
63212
|
+
},
|
|
63213
|
+
onClick: function onClick() {
|
|
63214
|
+
return insertReference(ref);
|
|
63215
|
+
}
|
|
63216
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
63217
|
+
className: "ee-list-item__label"
|
|
63218
|
+
}, ref.value));
|
|
62827
63219
|
}));
|
|
62828
63220
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
62829
63221
|
className: "ee-palette-col ee-palette-col--ops"
|
|
62830
63222
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
62831
63223
|
className: "ee-palette-col__title"
|
|
62832
|
-
}, "Op\xE9rateurs & fonctions"), /*#__PURE__*/React__default.createElement("
|
|
62833
|
-
className: "ee-
|
|
62834
|
-
|
|
62835
|
-
size: 8,
|
|
62836
|
-
onDoubleClick: handleOperatorDblClick
|
|
63224
|
+
}, "Op\xE9rateurs & fonctions"), /*#__PURE__*/React__default.createElement("div", {
|
|
63225
|
+
className: "ee-list",
|
|
63226
|
+
role: "listbox"
|
|
62837
63227
|
}, operators.map(function (op) {
|
|
62838
|
-
return /*#__PURE__*/React__default.createElement("
|
|
63228
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
62839
63229
|
key: op,
|
|
62840
|
-
|
|
62841
|
-
|
|
62842
|
-
|
|
63230
|
+
className: "ee-list-item",
|
|
63231
|
+
onMouseDown: function onMouseDown(e) {
|
|
63232
|
+
return e.preventDefault();
|
|
63233
|
+
},
|
|
63234
|
+
onClick: function onClick() {
|
|
63235
|
+
return insertOperator(op);
|
|
63236
|
+
}
|
|
63237
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
63238
|
+
className: "ee-list-item__label ee-list-item__label--op"
|
|
63239
|
+
}, op));
|
|
63240
|
+
})))), menuPos && /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement("div", {
|
|
63241
|
+
ref: menuRef,
|
|
63242
|
+
className: "expression-editor__menu",
|
|
63243
|
+
style: {
|
|
63244
|
+
top: menuPos.top,
|
|
63245
|
+
left: menuPos.left
|
|
63246
|
+
}
|
|
63247
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
63248
|
+
className: "ee-list-group"
|
|
63249
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
63250
|
+
className: "ee-list-group__label"
|
|
63251
|
+
}, "\xC9chelles & grilles"), Object.keys(groupedReferences).map(function (groupe) {
|
|
63252
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
63253
|
+
className: "ee-list-group",
|
|
63254
|
+
key: groupe
|
|
63255
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
63256
|
+
className: "ee-list-group__label ee-list-group__label--sub"
|
|
63257
|
+
}, groupe), groupedReferences[groupe].map(function (ref) {
|
|
63258
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
63259
|
+
key: "menu-".concat(ref.refType, "-").concat(ref.value, "-").concat(ref.refId || '', "-").concat(ref.axe || ''),
|
|
63260
|
+
className: "ee-list-item ee-opt--".concat(ref.refType),
|
|
63261
|
+
onClick: function onClick() {
|
|
63262
|
+
insertReference(ref);
|
|
63263
|
+
setMenuPos(null);
|
|
63264
|
+
}
|
|
63265
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
63266
|
+
className: "ee-list-item__label"
|
|
63267
|
+
}, ref.value));
|
|
63268
|
+
}));
|
|
63269
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
63270
|
+
className: "ee-list-group"
|
|
63271
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
63272
|
+
className: "ee-list-group__label"
|
|
63273
|
+
}, "Op\xE9rateurs & fonctions"), operators.map(function (op) {
|
|
63274
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
63275
|
+
key: "menu-".concat(op),
|
|
63276
|
+
className: "ee-list-item",
|
|
63277
|
+
onClick: function onClick() {
|
|
63278
|
+
insertOperator(op);
|
|
63279
|
+
setMenuPos(null);
|
|
63280
|
+
}
|
|
63281
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
63282
|
+
className: "ee-list-item__label ee-list-item__label--op"
|
|
63283
|
+
}, op));
|
|
63284
|
+
}))), document.body), popover && /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement("div", {
|
|
62843
63285
|
className: "ee-scores-popover",
|
|
62844
63286
|
style: {
|
|
62845
63287
|
top: popover.pos.top,
|
|
@@ -62875,23 +63317,21 @@ var ExpressionEditor = function ExpressionEditor(_ref) {
|
|
|
62875
63317
|
type: "button",
|
|
62876
63318
|
className: "ee-ok",
|
|
62877
63319
|
onClick: validatePopoverScores
|
|
62878
|
-
}, "OK"))));
|
|
63320
|
+
}, "OK"))), document.body));
|
|
62879
63321
|
};
|
|
62880
63322
|
|
|
62881
|
-
// Références d'exemple (mockées) : reproduisent ce que le back Symfony injecte
|
|
62882
|
-
// (échelles complémentaires « field » + grilles « echelle » avec leurs métadonnées).
|
|
62883
63323
|
var REFERENCES_DEMO = [{
|
|
62884
63324
|
value: 'Chiffre d\'affaires',
|
|
62885
63325
|
refType: 'field',
|
|
62886
63326
|
refId: 42,
|
|
62887
63327
|
"class": 'tag-field',
|
|
62888
|
-
groupe: '
|
|
63328
|
+
groupe: 'Evaluation Complémentaire'
|
|
62889
63329
|
}, {
|
|
62890
63330
|
value: 'Exposition',
|
|
62891
63331
|
refType: 'field',
|
|
62892
63332
|
refId: 43,
|
|
62893
63333
|
"class": 'tag-field',
|
|
62894
|
-
groupe: '
|
|
63334
|
+
groupe: 'Evaluation Complémentaire'
|
|
62895
63335
|
}, {
|
|
62896
63336
|
value: 'Impact',
|
|
62897
63337
|
refType: 'echelle',
|
|
@@ -62919,6 +63359,15 @@ var REFERENCES_DEMO = [{
|
|
|
62919
63359
|
scores: [1, 2, 3, 4],
|
|
62920
63360
|
"class": 'tag-echelle',
|
|
62921
63361
|
groupe: 'Évaluation nette (main)'
|
|
63362
|
+
}, {
|
|
63363
|
+
value: 'Évaluation brute',
|
|
63364
|
+
refType: 'echelle',
|
|
63365
|
+
matrice: '24',
|
|
63366
|
+
axe: 'abs',
|
|
63367
|
+
niveaux: 4,
|
|
63368
|
+
scores: [1, 2, 3, 4],
|
|
63369
|
+
"class": 'tag-echelle',
|
|
63370
|
+
groupe: 'Évaluation brute'
|
|
62922
63371
|
}, {
|
|
62923
63372
|
value: 'Niveau de maîtrise calculé',
|
|
62924
63373
|
refType: 'evalglobal',
|