@yuuvis/client-framework 2.0.4 → 2.0.6
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 +1 -48
- package/actions/lib/actions.module.d.ts +3 -0
- package/actions/lib/actions.service.d.ts +10 -0
- package/fesm2022/yuuvis-client-framework-actions.mjs +14 -1
- package/fesm2022/yuuvis-client-framework-actions.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-forms.mjs +146 -5
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-icons.mjs +4 -0
- package/fesm2022/yuuvis-client-framework-icons.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-list.mjs +42 -2
- package/fesm2022/yuuvis-client-framework-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +4 -3
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs +31 -2
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-summary.mjs +6 -6
- package/fesm2022/yuuvis-client-framework-object-summary.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-simple-search.mjs +18 -13
- package/fesm2022/yuuvis-client-framework-simple-search.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +2 -2
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/forms/lib/elements/index.d.ts +1 -0
- package/forms/lib/elements/organization-set/organization-set.component.d.ts +62 -0
- package/forms/lib/forms.module.d.ts +3 -0
- package/icons/lib/icon.component.d.ts +4 -0
- package/lib/assets/i18n/de.json +3 -0
- package/lib/assets/i18n/en.json +3 -0
- package/list/lib/list-item.directive.d.ts +18 -0
- package/list/lib/list.component.d.ts +24 -2
- package/metadata-form/lib/metadata-form-element-registry.service.d.ts +13 -1
- package/metadata-form/lib/metadata-form-field/metadata-form-field.component.d.ts +5 -0
- package/metadata-form/lib/object-metadata-element-error.directive.d.ts +5 -1
- package/metadata-form/lib/object-metadata-element-label.directive.d.ts +8 -0
- package/package.json +5 -5
- package/simple-search/lib/simple-search/simple-search.component.d.ts +3 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-client-framework-icons.mjs","sources":["../../../../../libs/yuuvis/client-framework/icons/src/lib/icons.ts","../../../../../libs/yuuvis/client-framework/icons/src/lib/icon.service.ts","../../../../../libs/yuuvis/client-framework/icons/src/lib/icon.component.ts","../../../../../libs/yuuvis/client-framework/icons/src/lib/object-type-icon/object-type-icon.component.ts","../../../../../libs/yuuvis/client-framework/icons/src/lib/object-type-icon/object-type-icon.component.html","../../../../../libs/yuuvis/client-framework/icons/src/yuuvis-client-framework-icons.ts"],"sourcesContent":["// Several 'general purpose' icons\nexport const YUV_ICONS: any = {\n add: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\t<path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\t<path d=\"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7z\" /></svg>',\n arrowLast:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z\"/><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/></svg>',\n arrowNext:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>',\n arrowDown:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z\"/></svg>',\n attention:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M480-79q-16 0-30.5-6T423-102L102-423q-11-12-17-26.5T79-480q0-16 6-31t17-26l321-321q12-12 26.5-17.5T480-881q16 0 31 5.5t26 17.5l321 321q12 11 17.5 26t5.5 31q0 16-5.5 30.5T858-423L537-102q-11 11-26 17t-31 6Zm0-80 321-321-321-321-321 321 321 321Zm-40-281h80v-240h-80v240Zm40 120q17 0 28.5-11.5T520-360q0-17-11.5-28.5T480-400q-17 0-28.5 11.5T440-360q0 17 11.5 28.5T480-320Zm0-160Z\"/></svg>',\n back: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z\"/></svg>',\n check:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z\"/></svg>',\n edit: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z\"/></svg>',\n dragHandle:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M360-160q-33 0-56.5-23.5T280-240q0-33 23.5-56.5T360-320q33 0 56.5 23.5T440-240q0 33-23.5 56.5T360-160Zm240 0q-33 0-56.5-23.5T520-240q0-33 23.5-56.5T600-320q33 0 56.5 23.5T680-240q0 33-23.5 56.5T600-160ZM360-400q-33 0-56.5-23.5T280-480q0-33 23.5-56.5T360-560q33 0 56.5 23.5T440-480q0 33-23.5 56.5T360-400Zm240 0q-33 0-56.5-23.5T520-480q0-33 23.5-56.5T600-560q33 0 56.5 23.5T680-480q0 33-23.5 56.5T600-400ZM360-640q-33 0-56.5-23.5T280-720q0-33 23.5-56.5T360-800q33 0 56.5 23.5T440-720q0 33-23.5 56.5T360-640Zm240 0q-33 0-56.5-23.5T520-720q0-33 23.5-56.5T600-800q33 0 56.5 23.5T680-720q0 33-23.5 56.5T600-640Z\"/></svg>',\n envelope:\n '<svg width=\"24\" height=\"24\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0z\"/><path d=\"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z\"/></svg>',\n favorite:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\"><path d=\"m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z\"/></svg>',\n filter:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0zm0 0h24v24H0V0z\"/><path d=\"M17.01 14h-.8l-.27-.27c.98-1.14 1.57-2.61 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5 3-6.5 6.5H2l3.84 4 4.16-4H6.51C6.51 7 8.53 5 11.01 5s4.5 2.01 4.5 4.5c0 2.48-2.02 4.5-4.5 4.5-.65 0-1.26-.14-1.82-.38L7.71 15.1c.97.57 2.09.9 3.3.9 1.61 0 3.08-.59 4.22-1.57l.27.27v.79l5.01 4.99L22 19l-4.99-5z\"/></svg>',\n folder:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"><path d=\"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H447l-80-80H160v480Zm0 0v-480 480Z\"/></svg>',\n globe:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"/></svg>',\n group:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" viewBox=\"0 -960 960 960\" width=\"20\"><path d=\"M96-192v-92q0-26 12.5-47.5T143-366q54-32 114.5-49T384-432q66 0 126.5 17T625-366q22 13 34.5 34.5T672-284v92H96Zm648 0v-92q0-42-19.5-78T672-421q39 8 75.5 21.5T817-366q22 13 34.5 34.5T864-284v92H744ZM384-480q-60 0-102-42t-42-102q0-60 42-102t102-42q60 0 102 42t42 102q0 60-42 102t-102 42Zm336-144q0 60-42 102t-102 42q-8 0-15-.5t-15-2.5q25-29 39.5-64.5T600-624q0-41-14.5-76.5T546-765q8-2 15-2.5t15-.5q60 0 102 42t42 102Z\"/></svg>',\n notification:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\"><path d=\"M160-200v-80h80v-280q0-83 50-147.5T420-792v-28q0-25 17.5-42.5T480-880q25 0 42.5 17.5T540-820v28q80 20 130 84.5T720-560v280h80v80H160Zm320-300Zm0 420q-33 0-56.5-23.5T400-160h160q0 33-23.5 56.5T480-80ZM320-280h320v-280q0-66-47-113t-113-47q-66 0-113 47t-47 113v280Z\"/></svg>',\n phone:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"48\" height=\"48\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M20.01 15.38c-1.23 0-2.42-.2-3.53-.56a.977.977 0 0 0-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z\"/></svg>',\n pin: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"m640-480 80 80v80H520v240l-40 40-40-40v-240H240v-80l80-80v-280h-40v-80h400v80h-40v280Zm-286 80h252l-46-46v-314H400v314l-46 46Zm126 0Z\"/></svg>',\n refresh:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z\"/></svg>',\n search:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"/></svg>',\n settings:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" enable-background=\"new 0 0 24 24\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><g><path d=\"M0,0h24v24H0V0z\" fill=\"none\"/><path d=\"M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z\"/></g></svg>',\n star: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"><path d=\"m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z\"/></svg>',\n starFilled:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" style=\"enable-background:new 0 0 24 24\" viewBox=\"0 0 24 24\"><path d=\"m5.8 21 1.6-7L2 9.2l7.2-.6L12 2l2.8 6.6 7.2.6-5.4 4.8 1.6 7-6.2-3.7L5.8 21z\"/></svg>',\n trash:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z\"/></svg>',\n user: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" viewBox=\"0 -960 960 960\" width=\"20\"><path d=\"M480-480q-60 0-102-42t-42-102q0-60 42-102t102-42q60 0 102 42t42 102q0 60-42 102t-102 42ZM192-192v-96q0-23 12.5-43.5T239-366q55-32 116.5-49T480-432q63 0 124.5 17T721-366q22 13 34.5 34t12.5 44v96H192Z\"/></svg>',\n warning:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z\"/></svg>',\n info: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"#5f6368\" viewBox=\"0 -960 960 960\"><path d=\"M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z\"/></svg>',\n more: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"#5f6368\" viewBox=\"0 -960 960 960\"><path d=\"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z\"/></svg>'\n};\n","import { Injectable } from '@angular/core';\nimport { YUV_ICONS } from './icons';\n\n/**\n * Service managing icons. Use `getIcon(id)` to retrieve the SVG string for that key.\n * By default these SVGs will be served from the resources provided by this module.\n * It contains several general [purpose icons](icons.ts). If you want to extend the\n * list of icons or overwrite an existing icon use `registerIcon(s)` functions. If the\n * id of an icon to be registered already exists it will be overwritten otherwise added\n * to the list of available icons. Once registered icons are available across the whole\n * application.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class IconService {\n private _iconRegistry: { [id: string]: string } = {};\n // icon returnned if nothing has been found\n private _brokenIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\"><path fill=\"red\" d=\"M212.309-140.001q-30.308 0-51.308-21t-21-51.308v-535.382q0-30.308 21-51.308t51.308-21h535.382q30.308 0 51.308 21t21 51.308v535.382q0 30.308-21 51.308t-51.308 21H212.309ZM240-442.768l160-160 160 160 160-160 40 40v-184.923q0-5.385-3.462-8.847-3.462-3.462-8.847-3.462H212.309q-5.385 0-8.847 3.462-3.462 3.462-3.462 8.847v264.923l40 40ZM212.309-200h535.382q5.385 0 8.847-3.462 3.462-3.462 3.462-8.847v-265.538l-40-40-160 160-160-160-160 160-40-40v185.538q0 5.385 3.462 8.847 3.462 3.462 8.847 3.462ZM200-200V-477.847v59.998V-760v560Z\"/></svg>';\n\n /**\n * Get an icon. Based on its ID the service will try to retrieve the svg string\n * from its internal icon registry or the default icons provided by the module\n * @param id ID of the icon\n * @returns SVG string or undefined if the icon could not be found\n */\n getIcon(id: string): string | undefined {\n return this._iconRegistry[id] || YUV_ICONS[id] || this._brokenIcon;\n }\n\n /**\n * Register a new icon or overwrite an existing icon.\n * @param id ID of the icon\n * @param svg SVG string bound to that ID\n */\n registerIcon(id: string, svg: string) {\n if (this._isValidSVG(svg)) this._iconRegistry[id] = svg;\n else console.error(`Invalid SVG string for id ${id}`);\n }\n\n /**\n * Register multiple icons at once\n * @param icons Array of icons\n */\n registerIcons(icons: { id: string; svg: string }[]) {\n icons.forEach((i) => this.registerIcon(i.id, i.svg));\n }\n\n private _isValidSVG(svg: string): boolean {\n // TODO: find a more sofisticated way to validate\n return svg.indexOf('<svg') !== -1;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { HttpClient } from '@angular/common/http';\nimport { ChangeDetectionStrategy, Component, effect, ElementRef, Inject, input, OnInit, Optional, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'yuv-icon',\n standalone: true,\n template: '',\n styles: `\n .yuv-icon {\n --_icon-size: var(--icon-size, 24px);\n\n width: var(--_icon-size);\n height: var(--_icon-size);\n display: inline-flex;\n font-size: 1px;\n color: currentColor;\n\n svg {\n pointer-events: none;\n fill: currentColor;\n width: 100%;\n height: 100%;\n }\n }\n `,\n host: { class: 'yuv-icon' },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class YuvIconComponent implements OnInit {\n private _svgIcon: SVGElement | undefined;\n #initialized = false;\n\n label = input<string | undefined>();\n\n #svg?: string | SVGElement;\n #svgSrc?: string;\n\n svg = input<string | SVGElement>();\n #svgEffect = effect(() => {\n this.#svg = this.svg();\n if (this.#svg) this.#render();\n });\n svgSrc = input<string>();\n #svgSrcEffect = effect(() => {\n this.#svgSrc = this.svgSrc();\n if (this.#svgSrc) this.#render();\n });\n \n constructor(\n private element: ElementRef,\n private http: HttpClient,\n @Optional() @Inject(DOCUMENT) private document: any\n ) {}\n\n #render() {\n if (!this.#initialized) return;\n this._removeSVG();\n\n if (this.#svgSrc)\n this.http.get(this.#svgSrc as string, { responseType: 'text' }).subscribe({\n next: (svg) => this._createSvg(svg)\n });\n else if (this.#svg) this._createSvg(this.#svg);\n }\n\n private _createSvg(svgData: any) {\n this._svgIcon = this._svgElementFromString(svgData);\n this.element.nativeElement.appendChild(this._svgIcon);\n }\n\n private _removeSVG() {\n if (this._svgIcon) {\n this.element.nativeElement.removeChild(this._svgIcon);\n }\n }\n\n private _svgElementFromString(svgData: string): SVGElement {\n const div = this.document.createElement('DIV');\n div.innerHTML = svgData;\n const svg: SVGElement = div.querySelector('svg');\n\n const label = this.label();\n if (svg) {\n label ? svg.setAttribute('aria-label', label) : svg.setAttribute('aria-hidden', 'true');\n }\n\n return svg || this.document.createElementNS('http://www.w3.org/2000/svg', 'path');\n }\n\n ngOnInit(): void {\n if (!this.#initialized) {\n this.#initialized = true;\n this.#render();\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input, inject } from '@angular/core';\nimport { BackendService, SystemService } from '@yuuvis/client-core';\nimport { YuvIconComponent } from '../icon.component';\n\n@Component({\n selector: 'yuv-object-type-icon',\n standalone: true,\n imports: [CommonModule, YuvIconComponent],\n templateUrl: './object-type-icon.component.html',\n styleUrls: ['./object-type-icon.component.scss']\n})\nexport class ObjectTypeIconComponent {\n private system = inject(SystemService);\n private backend = inject(BackendService);\n\n @Input() set objectTypeId(id: string) {\n this.refresh({ value: id });\n }\n\n svg?: string;\n title?: string;\n\n refresh(params: any): boolean {\n this.backend.getViaCache(params?.value ? this.system.getObjectTypeIconUri(params.value) : '').subscribe((res) => (this.svg = res));\n this.title = params?.value ? this.system.getLocalizedLabel(params.value) : '';\n return true;\n }\n}\n","@if(svg){\n<yuv-icon title=\"{{title}}\" [svg]=\"svg\"></yuv-icon>}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AACa,MAAA,SAAS,GAAQ;AAC5B,IAAA,GAAG,EAAE,6JAA6J;AAClK,IAAA,SAAS,EACP,wMAAwM;AAC1M,IAAA,SAAS,EACP,0LAA0L;AAC5L,IAAA,SAAS,EACP,sJAAsJ;AACxJ,IAAA,SAAS,EACP,ufAAuf;AACzf,IAAA,IAAI,EAAE,+LAA+L;AACrM,IAAA,KAAK,EACH,oLAAoL;AACtL,IAAA,IAAI,EAAE,2UAA2U;AACjV,IAAA,UAAU,EACR,6tBAA6tB;AAC/tB,IAAA,Q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A,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,qEACoD,EDOxC,MAAA,EAAA,CAAA,0CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,+BAAE,gBAAgB,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,KAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAI7B,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,cACpB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,qEAAA,EAAA,MAAA,EAAA,CAAA,0CAAA,CAAA,EAAA;8BAQ5B,YAAY,EAAA,CAAA;sBAAxB;;;AEhBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"yuuvis-client-framework-icons.mjs","sources":["../../../../../libs/yuuvis/client-framework/icons/src/lib/icons.ts","../../../../../libs/yuuvis/client-framework/icons/src/lib/icon.service.ts","../../../../../libs/yuuvis/client-framework/icons/src/lib/icon.component.ts","../../../../../libs/yuuvis/client-framework/icons/src/lib/object-type-icon/object-type-icon.component.ts","../../../../../libs/yuuvis/client-framework/icons/src/lib/object-type-icon/object-type-icon.component.html","../../../../../libs/yuuvis/client-framework/icons/src/yuuvis-client-framework-icons.ts"],"sourcesContent":["// Several 'general purpose' icons\nexport const YUV_ICONS: any = {\n add: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\t<path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\t<path d=\"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7z\" /></svg>',\n arrowLast:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z\"/><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/></svg>',\n arrowNext:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>',\n arrowDown:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z\"/></svg>',\n attention:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M480-79q-16 0-30.5-6T423-102L102-423q-11-12-17-26.5T79-480q0-16 6-31t17-26l321-321q12-12 26.5-17.5T480-881q16 0 31 5.5t26 17.5l321 321q12 11 17.5 26t5.5 31q0 16-5.5 30.5T858-423L537-102q-11 11-26 17t-31 6Zm0-80 321-321-321-321-321 321 321 321Zm-40-281h80v-240h-80v240Zm40 120q17 0 28.5-11.5T520-360q0-17-11.5-28.5T480-400q-17 0-28.5 11.5T440-360q0 17 11.5 28.5T480-320Zm0-160Z\"/></svg>',\n back: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z\"/></svg>',\n check:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z\"/></svg>',\n edit: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z\"/></svg>',\n dragHandle:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M360-160q-33 0-56.5-23.5T280-240q0-33 23.5-56.5T360-320q33 0 56.5 23.5T440-240q0 33-23.5 56.5T360-160Zm240 0q-33 0-56.5-23.5T520-240q0-33 23.5-56.5T600-320q33 0 56.5 23.5T680-240q0 33-23.5 56.5T600-160ZM360-400q-33 0-56.5-23.5T280-480q0-33 23.5-56.5T360-560q33 0 56.5 23.5T440-480q0 33-23.5 56.5T360-400Zm240 0q-33 0-56.5-23.5T520-480q0-33 23.5-56.5T600-560q33 0 56.5 23.5T680-480q0 33-23.5 56.5T600-400ZM360-640q-33 0-56.5-23.5T280-720q0-33 23.5-56.5T360-800q33 0 56.5 23.5T440-720q0 33-23.5 56.5T360-640Zm240 0q-33 0-56.5-23.5T520-720q0-33 23.5-56.5T600-800q33 0 56.5 23.5T680-720q0 33-23.5 56.5T600-640Z\"/></svg>',\n envelope:\n '<svg width=\"24\" height=\"24\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0z\"/><path d=\"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z\"/></svg>',\n favorite:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\"><path d=\"m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z\"/></svg>',\n filter:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0zm0 0h24v24H0V0z\"/><path d=\"M17.01 14h-.8l-.27-.27c.98-1.14 1.57-2.61 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5 3-6.5 6.5H2l3.84 4 4.16-4H6.51C6.51 7 8.53 5 11.01 5s4.5 2.01 4.5 4.5c0 2.48-2.02 4.5-4.5 4.5-.65 0-1.26-.14-1.82-.38L7.71 15.1c.97.57 2.09.9 3.3.9 1.61 0 3.08-.59 4.22-1.57l.27.27v.79l5.01 4.99L22 19l-4.99-5z\"/></svg>',\n folder:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"><path d=\"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H447l-80-80H160v480Zm0 0v-480 480Z\"/></svg>',\n globe:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"/></svg>',\n group:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" viewBox=\"0 -960 960 960\" width=\"20\"><path d=\"M96-192v-92q0-26 12.5-47.5T143-366q54-32 114.5-49T384-432q66 0 126.5 17T625-366q22 13 34.5 34.5T672-284v92H96Zm648 0v-92q0-42-19.5-78T672-421q39 8 75.5 21.5T817-366q22 13 34.5 34.5T864-284v92H744ZM384-480q-60 0-102-42t-42-102q0-60 42-102t102-42q60 0 102 42t42 102q0 60-42 102t-102 42Zm336-144q0 60-42 102t-102 42q-8 0-15-.5t-15-2.5q25-29 39.5-64.5T600-624q0-41-14.5-76.5T546-765q8-2 15-2.5t15-.5q60 0 102 42t42 102Z\"/></svg>',\n notification:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\"><path d=\"M160-200v-80h80v-280q0-83 50-147.5T420-792v-28q0-25 17.5-42.5T480-880q25 0 42.5 17.5T540-820v28q80 20 130 84.5T720-560v280h80v80H160Zm320-300Zm0 420q-33 0-56.5-23.5T400-160h160q0 33-23.5 56.5T480-80ZM320-280h320v-280q0-66-47-113t-113-47q-66 0-113 47t-47 113v280Z\"/></svg>',\n phone:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"48\" height=\"48\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M20.01 15.38c-1.23 0-2.42-.2-3.53-.56a.977.977 0 0 0-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z\"/></svg>',\n pin: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"m640-480 80 80v80H520v240l-40 40-40-40v-240H240v-80l80-80v-280h-40v-80h400v80h-40v280Zm-286 80h252l-46-46v-314H400v314l-46 46Zm126 0Z\"/></svg>',\n refresh:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z\"/></svg>',\n search:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"/></svg>',\n settings:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" enable-background=\"new 0 0 24 24\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><g><path d=\"M0,0h24v24H0V0z\" fill=\"none\"/><path d=\"M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z\"/></g></svg>',\n star: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"><path d=\"m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z\"/></svg>',\n starFilled:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" style=\"enable-background:new 0 0 24 24\" viewBox=\"0 0 24 24\"><path d=\"m5.8 21 1.6-7L2 9.2l7.2-.6L12 2l2.8 6.6 7.2.6-5.4 4.8 1.6 7-6.2-3.7L5.8 21z\"/></svg>',\n trash:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z\"/></svg>',\n user: '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" viewBox=\"0 -960 960 960\" width=\"20\"><path d=\"M480-480q-60 0-102-42t-42-102q0-60 42-102t102-42q60 0 102 42t42 102q0 60-42 102t-102 42ZM192-192v-96q0-23 12.5-43.5T239-366q55-32 116.5-49T480-432q63 0 124.5 17T721-366q22 13 34.5 34t12.5 44v96H192Z\"/></svg>',\n warning:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z\"/></svg>',\n info: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"#5f6368\" viewBox=\"0 -960 960 960\"><path d=\"M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z\"/></svg>',\n more: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"#5f6368\" viewBox=\"0 -960 960 960\"><path d=\"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z\"/></svg>'\n};\n","import { Injectable } from '@angular/core';\nimport { YUV_ICONS } from './icons';\n\n/**\n * Service managing icons. Use `getIcon(id)` to retrieve the SVG string for that key.\n * By default these SVGs will be served from the resources provided by this module.\n * It contains several general [purpose icons](icons.ts). If you want to extend the\n * list of icons or overwrite an existing icon use `registerIcon(s)` functions. If the\n * id of an icon to be registered already exists it will be overwritten otherwise added\n * to the list of available icons. Once registered icons are available across the whole\n * application.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class IconService {\n private _iconRegistry: { [id: string]: string } = {};\n // icon returnned if nothing has been found\n private _brokenIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\"><path fill=\"red\" d=\"M212.309-140.001q-30.308 0-51.308-21t-21-51.308v-535.382q0-30.308 21-51.308t51.308-21h535.382q30.308 0 51.308 21t21 51.308v535.382q0 30.308-21 51.308t-51.308 21H212.309ZM240-442.768l160-160 160 160 160-160 40 40v-184.923q0-5.385-3.462-8.847-3.462-3.462-8.847-3.462H212.309q-5.385 0-8.847 3.462-3.462 3.462-3.462 8.847v264.923l40 40ZM212.309-200h535.382q5.385 0 8.847-3.462 3.462-3.462 3.462-8.847v-265.538l-40-40-160 160-160-160-160 160-40-40v185.538q0 5.385 3.462 8.847 3.462 3.462 8.847 3.462ZM200-200V-477.847v59.998V-760v560Z\"/></svg>';\n\n /**\n * Get an icon. Based on its ID the service will try to retrieve the svg string\n * from its internal icon registry or the default icons provided by the module\n * @param id ID of the icon\n * @returns SVG string or undefined if the icon could not be found\n */\n getIcon(id: string): string | undefined {\n return this._iconRegistry[id] || YUV_ICONS[id] || this._brokenIcon;\n }\n\n /**\n * Register a new icon or overwrite an existing icon.\n * @param id ID of the icon\n * @param svg SVG string bound to that ID\n */\n registerIcon(id: string, svg: string) {\n if (this._isValidSVG(svg)) this._iconRegistry[id] = svg;\n else console.error(`Invalid SVG string for id ${id}`);\n }\n\n /**\n * Register multiple icons at once\n * @param icons Array of icons\n */\n registerIcons(icons: { id: string; svg: string }[]) {\n icons.forEach((i) => this.registerIcon(i.id, i.svg));\n }\n\n private _isValidSVG(svg: string): boolean {\n // TODO: find a more sofisticated way to validate\n return svg.indexOf('<svg') !== -1;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { HttpClient } from '@angular/common/http';\nimport { ChangeDetectionStrategy, Component, effect, ElementRef, Inject, input, OnInit, Optional, ViewEncapsulation } from '@angular/core';\n\n/**\n * Component to display an SVG icon.\n * @deprecated Deprecated description\n */\n@Component({\n selector: 'yuv-icon',\n standalone: true,\n template: '',\n styles: `\n .yuv-icon {\n --_icon-size: var(--icon-size, 24px);\n\n width: var(--_icon-size);\n height: var(--_icon-size);\n display: inline-flex;\n font-size: 1px;\n color: currentColor;\n\n svg {\n pointer-events: none;\n fill: currentColor;\n width: 100%;\n height: 100%;\n }\n }\n `,\n host: { class: 'yuv-icon' },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class YuvIconComponent implements OnInit {\n private _svgIcon: SVGElement | undefined;\n #initialized = false;\n\n label = input<string | undefined>();\n\n #svg?: string | SVGElement;\n #svgSrc?: string;\n\n svg = input<string | SVGElement>();\n #svgEffect = effect(() => {\n this.#svg = this.svg();\n if (this.#svg) this.#render();\n });\n svgSrc = input<string>();\n #svgSrcEffect = effect(() => {\n this.#svgSrc = this.svgSrc();\n if (this.#svgSrc) this.#render();\n });\n \n constructor(\n private element: ElementRef,\n private http: HttpClient,\n @Optional() @Inject(DOCUMENT) private document: any\n ) {}\n\n #render() {\n if (!this.#initialized) return;\n this._removeSVG();\n\n if (this.#svgSrc)\n this.http.get(this.#svgSrc as string, { responseType: 'text' }).subscribe({\n next: (svg) => this._createSvg(svg)\n });\n else if (this.#svg) this._createSvg(this.#svg);\n }\n\n private _createSvg(svgData: any) {\n this._svgIcon = this._svgElementFromString(svgData);\n this.element.nativeElement.appendChild(this._svgIcon);\n }\n\n private _removeSVG() {\n if (this._svgIcon) {\n this.element.nativeElement.removeChild(this._svgIcon);\n }\n }\n\n private _svgElementFromString(svgData: string): SVGElement {\n const div = this.document.createElement('DIV');\n div.innerHTML = svgData;\n const svg: SVGElement = div.querySelector('svg');\n\n const label = this.label();\n if (svg) {\n label ? svg.setAttribute('aria-label', label) : svg.setAttribute('aria-hidden', 'true');\n }\n\n return svg || this.document.createElementNS('http://www.w3.org/2000/svg', 'path');\n }\n\n ngOnInit(): void {\n if (!this.#initialized) {\n this.#initialized = true;\n this.#render();\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input, inject } from '@angular/core';\nimport { BackendService, SystemService } from '@yuuvis/client-core';\nimport { YuvIconComponent } from '../icon.component';\n\n@Component({\n selector: 'yuv-object-type-icon',\n standalone: true,\n imports: [CommonModule, YuvIconComponent],\n templateUrl: './object-type-icon.component.html',\n styleUrls: ['./object-type-icon.component.scss']\n})\nexport class ObjectTypeIconComponent {\n private system = inject(SystemService);\n private backend = inject(BackendService);\n\n @Input() set objectTypeId(id: string) {\n this.refresh({ value: id });\n }\n\n svg?: string;\n title?: string;\n\n refresh(params: any): boolean {\n this.backend.getViaCache(params?.value ? this.system.getObjectTypeIconUri(params.value) : '').subscribe((res) => (this.svg = res));\n this.title = params?.value ? this.system.getLocalizedLabel(params.value) : '';\n return true;\n }\n}\n","@if(svg){\n<yuv-icon title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G,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;AAC7E,QAAA,OAAO,IAAI;;+GAdF,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,uBAAuB,ECZpC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,qEACoD,EDOxC,MAAA,EAAA,CAAA,0CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,+BAAE,gBAAgB,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,KAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAI7B,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,cACpB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,qEAAA,EAAA,MAAA,EAAA,CAAA,0CAAA,CAAA,EAAA;8BAQ5B,YAAY,EAAA,CAAA;sBAAxB;;;AEhBH;;AAEG;;;;"}
|
|
@@ -4,10 +4,28 @@ import { ActiveDescendantKeyManager, A11yModule } from '@angular/cdk/a11y';
|
|
|
4
4
|
import { Directionality } from '@angular/cdk/bidi';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Directive for list items. It is used in the `yuvList` component
|
|
9
|
+
* to keep track of active and selected items. Every element with this
|
|
10
|
+
* directive will be treated as a list item and can be selected and focused.
|
|
11
|
+
*
|
|
12
|
+
*```html
|
|
13
|
+
* <yuv-list (itemSelect)="itemSelected($event)">
|
|
14
|
+
* <div yuvListItem>Entry #1</div>
|
|
15
|
+
* <div yuvListItem>Entry #2</div>
|
|
16
|
+
* </yuv-list>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
7
19
|
class ListItemDirective {
|
|
8
20
|
constructor() {
|
|
9
21
|
this.#elRef = inject(ElementRef);
|
|
22
|
+
/**
|
|
23
|
+
* Whether the item is active or not.
|
|
24
|
+
*/
|
|
10
25
|
this.active = input(false);
|
|
26
|
+
/**
|
|
27
|
+
* Whether the item is selected or not.
|
|
28
|
+
*/
|
|
11
29
|
this.selected = input(false);
|
|
12
30
|
this.selectedInput = linkedSignal({
|
|
13
31
|
source: this.selected,
|
|
@@ -75,10 +93,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
75
93
|
|
|
76
94
|
/**
|
|
77
95
|
* Component rendering a simple list of items. It supports keyboard
|
|
78
|
-
* navigation as well as
|
|
96
|
+
* navigation as well as accessibility. To create a list just wrap
|
|
79
97
|
* `yuvListItem` elements into this component:
|
|
80
98
|
*
|
|
81
|
-
* ```
|
|
99
|
+
* ```html
|
|
82
100
|
* <yuv-list (itemSelect)="itemSelected($event)">
|
|
83
101
|
* <div yuvListItem>Entry #1</div>
|
|
84
102
|
* <div yuvListItem>Entry #2</div>
|
|
@@ -113,13 +131,35 @@ class ListComponent {
|
|
|
113
131
|
});
|
|
114
132
|
});
|
|
115
133
|
this._selection = [];
|
|
134
|
+
/**
|
|
135
|
+
* If `true`, multiple items can be selected at once.
|
|
136
|
+
*/
|
|
116
137
|
this.multiselect = input(false);
|
|
138
|
+
/**
|
|
139
|
+
* If `true`, the component will handle selection itself. This means that
|
|
140
|
+
* the parent component will be responsible for styling the selected and
|
|
141
|
+
* focused items. If `false`, the component will take care of visualizing
|
|
142
|
+
* the selection and focus states.
|
|
143
|
+
* @default false
|
|
144
|
+
*/
|
|
117
145
|
this.selfHandleSelection = input(false);
|
|
146
|
+
/**
|
|
147
|
+
* Emits the selected items indices.
|
|
148
|
+
* @type {output<number[]>}
|
|
149
|
+
*/
|
|
118
150
|
this.itemSelect = output();
|
|
151
|
+
/**
|
|
152
|
+
* Emits the index of the item that has focus.
|
|
153
|
+
* @type {output<number>}
|
|
154
|
+
*/
|
|
119
155
|
this.itemFocus = output();
|
|
120
156
|
// autoselectFirst: boolean = (inject(new HostAttributeToken('autoselectFirst'), { optional: true }) || 'false') === 'true';
|
|
121
157
|
this.selectOnEnter = (inject(new HostAttributeToken('selectOnEnter'), { optional: true }) || 'false') === 'true';
|
|
122
158
|
this.horizontal = (inject(new HostAttributeToken('horizontal'), { optional: true }) || 'false') === 'true';
|
|
159
|
+
/**
|
|
160
|
+
* If `true`, the list will not allow selection of items.
|
|
161
|
+
* This is useful for lists that are used for display purposes only.
|
|
162
|
+
*/
|
|
123
163
|
this.disableSelection = input(false);
|
|
124
164
|
}
|
|
125
165
|
#dir;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-client-framework-list.mjs","sources":["../../../../../libs/yuuvis/client-framework/list/src/lib/list-item.directive.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list.component.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list.module.ts","../../../../../libs/yuuvis/client-framework/list/src/yuuvis-client-framework-list.ts"],"sourcesContent":["import { Highlightable } from '@angular/cdk/a11y';\nimport { Directive, ElementRef, HostListener, inject, input, Input, linkedSignal } from '@angular/core';\n\n@Directive({\n selector: '[yuvListItem]',\n standalone: true,\n host: {\n '[attr.aria-current]': 'activeInput()',\n '[attr.aria-selected]': 'selectedInput()'\n }\n})\nexport class ListItemDirective implements Highlightable {\n #elRef = inject(ElementRef);\n\n onClick?: (evt: MouseEvent) => void;\n\n // TO SATISFY THE HIGHLIGHTABLE INTERFACE\n @Input()\n disabled?: boolean | undefined;\n\n active = input<boolean>(false);\n\n selected = input<boolean>(false);\n\n selectedInput = linkedSignal({\n source: this.selected,\n computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous)\n });\n\n activeInput = linkedSignal({\n source: this.active,\n computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous)\n });\n\n @HostListener('click', ['$event']) onHostClick(evt: MouseEvent) {\n if (!this.disabled && this.onClick) {\n this.#elRef.nativeElement.parentElement.focus();\n this.onClick(evt);\n }\n }\n\n setActiveStyles(): void {\n this.activeInput.set(true);\n this.#scrollIntoView();\n }\n\n setInactiveStyles(): void {\n this.activeInput.set(false);\n }\n\n #scrollIntoView() {\n const el = this.#elRef.nativeElement as HTMLElement;\n const { bottom, top, left, right } = el.getBoundingClientRect();\n const containerRect = this.#elRef.nativeElement.parentElement.getBoundingClientRect();\n\n const offsetY =\n top <= containerRect.top\n ? containerRect.top - top > 0\n ? (containerRect.top - top) * -1\n : 0\n : bottom - containerRect.bottom > 0\n ? bottom - containerRect.bottom\n : 0;\n const offsetX =\n left <= containerRect.left\n ? containerRect.left - left > 0\n ? (containerRect.left - left) * -1\n : 0\n : right - containerRect.right > 0\n ? right - containerRect.right\n : 0;\n\n if (offsetX || offsetY) (this.#elRef.nativeElement.parentElement as HTMLElement).scrollBy(offsetX, offsetY);\n }\n}\n","import { A11yModule, ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n HostAttributeToken,\n HostListener,\n OnDestroy,\n ViewEncapsulation,\n contentChildren,\n effect,\n inject,\n input,\n output,\n untracked\n} from '@angular/core';\nimport { ListItemDirective } from './list-item.directive';\n\n/**\n * Component rendering a simple list of items. It supports keyboard\n * navigation as well as accessability. To create a list just wrapp\n * `yuvListItem` elements into this component:\n *\n * ```ts\n * <yuv-list (itemSelect)=\"itemSelected($event)\">\n * <div yuvListItem>Entry #1</div>\n * <div yuvListItem>Entry #2</div>\n * </yuv-list>\n * ```\n */\n@Component({\n selector: 'yuv-list',\n standalone: true,\n imports: [CommonModule, A11yModule],\n template: '<ng-content></ng-content>',\n styleUrl: './list.component.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'listbox',\n tabindex: '0',\n '[class.self-handle-selection]': 'selfHandleSelection()'\n }\n})\nexport class ListComponent implements OnDestroy {\n #dir = inject(Directionality);\n\n @HostListener('keydown', ['$event']) onKeydown(event: KeyboardEvent) {\n if (this.disableSelection()) return;\n if (event.code === 'Escape') {\n this.clear();\n }\n\n if (event.code === 'Space' || (this.selectOnEnter && event.code === 'Enter')) {\n const aii: number = this._keyManager.activeItemIndex !== null ? this._keyManager.activeItemIndex : -1;\n if (aii >= 0) {\n this.#select(aii);\n this.#emitSelection();\n }\n } else this._keyManager?.onKeydown(event);\n }\n\n @HostListener('focus') onFocus() {\n if (this.items().length > 0) {\n const indexToFocus = this._selection.length > 0 ? this._selection[0] : 0;\n this._keyManager.setActiveItem(indexToFocus);\n this.itemFocus.emit(indexToFocus);\n this.#updateActiveItemState();\n }\n }\n\n items = contentChildren(ListItemDirective);\n\n #itemsEffect = effect(() => {\n const items = this.items();\n\n if (this._keyManager) this._keyManager.destroy();\n\n untracked(() => {\n this._keyManager = this.horizontal\n ? new ActiveDescendantKeyManager(items).withWrap().withHorizontalOrientation(this.#dir.value)\n : new ActiveDescendantKeyManager(items).withWrap();\n\n this._keyManager.change.subscribe((activeIndex) => {\n if (activeIndex !== null) {\n this.#updateActiveItemState();\n this.itemFocus.emit(activeIndex);\n }\n });\n\n items.forEach((item, index) => {\n item.onClick = (evt: MouseEvent) => this.select(index, evt.shiftKey, evt.ctrlKey);\n item.activeInput.set(false);\n });\n if (this._lastSelection !== undefined && this._lastSelection <= items.length) {\n this.select(this._lastSelection);\n }\n });\n });\n\n private _keyManager!: ActiveDescendantKeyManager<ListItemDirective>;\n private _selection: number[] = [];\n private _lastSelection?: number;\n\n multiselect = input<boolean>(false);\n selfHandleSelection = input<boolean>(false);\n\n itemSelect = output<number[]>();\n itemFocus = output<number>();\n\n // autoselectFirst: boolean = (inject(new HostAttributeToken('autoselectFirst'), { optional: true }) || 'false') === 'true';\n selectOnEnter: boolean = (inject(new HostAttributeToken('selectOnEnter'), { optional: true }) || 'false') === 'true';\n horizontal: boolean = (inject(new HostAttributeToken('horizontal'), { optional: true }) || 'false') === 'true';\n disableSelection = input<boolean>(false);\n\n select(index: number, shiftKey = false, ctrlKey = false) {\n if (this.disableSelection()) return;\n if (index >= this.items().length) index = this.items().length - 1;\n if (this._keyManager) this._keyManager.setActiveItem(index);\n \n this.#select(index, shiftKey, ctrlKey);\n this.#emitSelection(); \n }\n\n /**\n * Clear the current selection.\n * @param silent If `true`, the `itemSelect` event will not be emitted.\n */\n clear(silent = false) {\n if (this._selection.length !== 0) {\n this.#select(-1);\n this._keyManager.setActiveItem(-1);\n if (!silent) this.#emitSelection();\n }\n }\n\n #select(index: number, shiftKey = false, ctrlKey = false) {\n if (index === -1) this._selection = [];\n else {\n if (this.multiselect()) {\n this._selection = this._selection.filter((i) => i !== index);\n if (ctrlKey) {\n this._selection.push(index);\n } else if (shiftKey) {\n if (this._lastSelection) {\n for (let i = this._lastSelection < index ? this._lastSelection : index; i < (this._lastSelection > index ? this._lastSelection : index); i++) {\n this._selection.push(i);\n }\n } else {\n this._selection = [index];\n }\n } else {\n this._selection = [index];\n }\n } else this._selection = [index];\n }\n this._lastSelection = this._selection.length === 0 ? undefined : index;\n this._selection.sort();\n\n this.items().forEach((item: ListItemDirective, i: number) => item.selectedInput.set(this._selection.includes(i)));\n }\n\n #updateActiveItemState() {\n const activeIndex = this._keyManager.activeItemIndex;\n this.items().forEach((item: ListItemDirective, i: number) => {\n item.activeInput.set(i === activeIndex);\n });\n }\n\n #emitSelection() {\n this.itemSelect.emit(this._selection);\n }\n\n ngOnDestroy(): void {\n this._keyManager?.destroy();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ListItemDirective } from './list-item.directive';\nimport { ListComponent } from './list.component';\n\n@NgModule({\n imports: [ListComponent, ListItemDirective],\n exports: [ListComponent, ListItemDirective]\n})\nexport class YuvListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAWa,iBAAiB,CAAA;AAR9B,IAAA,WAAA,GAAA;AASE,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;AAQ3B,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAU,KAAK,CAAC;AAE9B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;QAEhC,IAAa,CAAA,aAAA,GAAG,YAAY,CAAC;YAC3B,MAAM,EAAE,IAAI,CAAC,QAAQ;YACrB,WAAW,EAAE,CAAC,UAAe,EAAE,QAAa,MAAM,UAAU,KAAK,QAAQ,GAAG,UAAU,GAAG,QAAQ;AAClG,SAAA,CAAC;QAEF,IAAW,CAAA,WAAA,GAAG,YAAY,CAAC;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,WAAW,EAAE,CAAC,UAAe,EAAE,QAAa,MAAM,UAAU,KAAK,QAAQ,GAAG,UAAU,GAAG,QAAQ;AAClG,SAAA,CAAC;AA0CH;AA9DC,IAAA,MAAM;AAsB6B,IAAA,WAAW,CAAC,GAAe,EAAA;QAC5D,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;YAClC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,EAAE;AAC/C,YAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;;;IAIrB,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,eAAe,EAAE;;IAGxB,iBAAiB,GAAA;AAC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AA;sBAA7C,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;gBAeZ,OAAO,EAAA,CAAA;sBAA7B,YAAY;uBAAC,OAAO;;;MCrDV,aAAa,CAAA;+GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHd,aAAa,EAAE,iBAAiB,CAChC,EAAA,OAAA,EAAA,CAAA,aAAa,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAE/B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHd,aAAa,CAAA,EAAA,CAAA,CAAA;;4FAGZ,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,iBAAiB,CAAC;AAC3C,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,iBAAiB;AAC3C,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"yuuvis-client-framework-list.mjs","sources":["../../../../../libs/yuuvis/client-framework/list/src/lib/list-item.directive.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list.component.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list.module.ts","../../../../../libs/yuuvis/client-framework/list/src/yuuvis-client-framework-list.ts"],"sourcesContent":["import { Highlightable } from '@angular/cdk/a11y';\nimport { Directive, ElementRef, HostListener, inject, input, Input, linkedSignal } from '@angular/core';\n\n/**\n * Directive for list items. It is used in the `yuvList` component\n * to keep track of active and selected items. Every element with this\n * directive will be treated as a list item and can be selected and focused.\n * \n *```html\n * <yuv-list (itemSelect)=\"itemSelected($event)\">\n * <div yuvListItem>Entry #1</div>\n * <div yuvListItem>Entry #2</div>\n * </yuv-list>\n * ```\n */\n@Directive({\n selector: '[yuvListItem]',\n standalone: true,\n host: {\n '[attr.aria-current]': 'activeInput()',\n '[attr.aria-selected]': 'selectedInput()'\n }\n})\nexport class ListItemDirective implements Highlightable {\n #elRef = inject(ElementRef);\n\n onClick?: (evt: MouseEvent) => void;\n\n // TO SATISFY THE HIGHLIGHTABLE INTERFACE\n @Input() disabled?: boolean | undefined;\n\n /**\n * Whether the item is active or not. \n */\n active = input<boolean>(false);\n /**\n * Whether the item is selected or not. \n */\n selected = input<boolean>(false);\n\n selectedInput = linkedSignal({\n source: this.selected,\n computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous)\n });\n\n activeInput = linkedSignal({\n source: this.active,\n computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous)\n });\n\n @HostListener('click', ['$event']) onHostClick(evt: MouseEvent) {\n if (!this.disabled && this.onClick) {\n this.#elRef.nativeElement.parentElement.focus();\n this.onClick(evt);\n }\n }\n\n setActiveStyles(): void {\n this.activeInput.set(true);\n this.#scrollIntoView();\n }\n\n setInactiveStyles(): void {\n this.activeInput.set(false);\n }\n\n #scrollIntoView() {\n const el = this.#elRef.nativeElement as HTMLElement;\n const { bottom, top, left, right } = el.getBoundingClientRect();\n const containerRect = this.#elRef.nativeElement.parentElement.getBoundingClientRect();\n\n const offsetY =\n top <= containerRect.top\n ? containerRect.top - top > 0\n ? (containerRect.top - top) * -1\n : 0\n : bottom - containerRect.bottom > 0\n ? bottom - containerRect.bottom\n : 0;\n const offsetX =\n left <= containerRect.left\n ? containerRect.left - left > 0\n ? (containerRect.left - left) * -1\n : 0\n : right - containerRect.right > 0\n ? right - containerRect.right\n : 0;\n\n if (offsetX || offsetY) (this.#elRef.nativeElement.parentElement as HTMLElement).scrollBy(offsetX, offsetY);\n }\n}\n","import { A11yModule, ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n HostAttributeToken,\n HostListener,\n OnDestroy,\n ViewEncapsulation,\n contentChildren,\n effect,\n inject,\n input,\n output,\n untracked\n} from '@angular/core';\nimport { ListItemDirective } from './list-item.directive';\n\n/**\n * Component rendering a simple list of items. It supports keyboard\n * navigation as well as accessibility. To create a list just wrap\n * `yuvListItem` elements into this component:\n *\n * ```html\n * <yuv-list (itemSelect)=\"itemSelected($event)\">\n * <div yuvListItem>Entry #1</div>\n * <div yuvListItem>Entry #2</div>\n * </yuv-list>\n * ```\n */\n@Component({\n selector: 'yuv-list',\n standalone: true,\n imports: [CommonModule, A11yModule],\n template: '<ng-content></ng-content>',\n styleUrl: './list.component.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'listbox',\n tabindex: '0',\n '[class.self-handle-selection]': 'selfHandleSelection()'\n }\n})\nexport class ListComponent implements OnDestroy {\n #dir = inject(Directionality);\n\n @HostListener('keydown', ['$event']) onKeydown(event: KeyboardEvent) {\n if (this.disableSelection()) return;\n if (event.code === 'Escape') {\n this.clear();\n }\n\n if (event.code === 'Space' || (this.selectOnEnter && event.code === 'Enter')) {\n const aii: number = this._keyManager.activeItemIndex !== null ? this._keyManager.activeItemIndex : -1;\n if (aii >= 0) {\n this.#select(aii);\n this.#emitSelection();\n }\n } else this._keyManager?.onKeydown(event);\n }\n\n @HostListener('focus') onFocus() {\n if (this.items().length > 0) {\n const indexToFocus = this._selection.length > 0 ? this._selection[0] : 0;\n this._keyManager.setActiveItem(indexToFocus);\n this.itemFocus.emit(indexToFocus);\n this.#updateActiveItemState();\n }\n }\n\n items = contentChildren(ListItemDirective);\n\n #itemsEffect = effect(() => {\n const items = this.items();\n\n if (this._keyManager) this._keyManager.destroy();\n\n untracked(() => {\n this._keyManager = this.horizontal\n ? new ActiveDescendantKeyManager(items).withWrap().withHorizontalOrientation(this.#dir.value)\n : new ActiveDescendantKeyManager(items).withWrap();\n\n this._keyManager.change.subscribe((activeIndex) => {\n if (activeIndex !== null) {\n this.#updateActiveItemState();\n this.itemFocus.emit(activeIndex);\n }\n });\n\n items.forEach((item, index) => {\n item.onClick = (evt: MouseEvent) => this.select(index, evt.shiftKey, evt.ctrlKey);\n item.activeInput.set(false);\n });\n if (this._lastSelection !== undefined && this._lastSelection <= items.length) {\n this.select(this._lastSelection);\n }\n });\n });\n\n private _keyManager!: ActiveDescendantKeyManager<ListItemDirective>;\n private _selection: number[] = [];\n private _lastSelection?: number;\n\n /**\n * If `true`, multiple items can be selected at once.\n */\n multiselect = input<boolean>(false);\n /**\n * If `true`, the component will handle selection itself. This means that\n * the parent component will be responsible for styling the selected and \n * focused items. If `false`, the component will take care of visualizing \n * the selection and focus states.\n * @default false\n */\n selfHandleSelection = input<boolean>(false);\n\n /**\n * Emits the selected items indices.\n * @type {output<number[]>}\n */\n itemSelect = output<number[]>();\n /**\n * Emits the index of the item that has focus.\n * @type {output<number>}\n */\n itemFocus = output<number>();\n\n // autoselectFirst: boolean = (inject(new HostAttributeToken('autoselectFirst'), { optional: true }) || 'false') === 'true';\n selectOnEnter: boolean = (inject(new HostAttributeToken('selectOnEnter'), { optional: true }) || 'false') === 'true';\n horizontal: boolean = (inject(new HostAttributeToken('horizontal'), { optional: true }) || 'false') === 'true';\n \n /**\n * If `true`, the list will not allow selection of items.\n * This is useful for lists that are used for display purposes only.\n */\n disableSelection = input<boolean>(false);\n\n select(index: number, shiftKey = false, ctrlKey = false) {\n if (this.disableSelection()) return;\n if (index >= this.items().length) index = this.items().length - 1;\n if (this._keyManager) this._keyManager.setActiveItem(index);\n \n this.#select(index, shiftKey, ctrlKey);\n this.#emitSelection(); \n }\n\n /**\n * Clear the current selection.\n * @param silent If `true`, the `itemSelect` event will not be emitted.\n */\n clear(silent = false) {\n if (this._selection.length !== 0) {\n this.#select(-1);\n this._keyManager.setActiveItem(-1);\n if (!silent) this.#emitSelection();\n }\n }\n\n #select(index: number, shiftKey = false, ctrlKey = false) {\n if (index === -1) this._selection = [];\n else {\n if (this.multiselect()) {\n this._selection = this._selection.filter((i) => i !== index);\n if (ctrlKey) {\n this._selection.push(index);\n } else if (shiftKey) {\n if (this._lastSelection) {\n for (let i = this._lastSelection < index ? this._lastSelection : index; i < (this._lastSelection > index ? this._lastSelection : index); i++) {\n this._selection.push(i);\n }\n } else {\n this._selection = [index];\n }\n } else {\n this._selection = [index];\n }\n } else this._selection = [index];\n }\n this._lastSelection = this._selection.length === 0 ? undefined : index;\n this._selection.sort();\n\n this.items().forEach((item: ListItemDirective, i: number) => item.selectedInput.set(this._selection.includes(i)));\n }\n\n #updateActiveItemState() {\n const activeIndex = this._keyManager.activeItemIndex;\n this.items().forEach((item: ListItemDirective, i: number) => {\n item.activeInput.set(i === activeIndex);\n });\n }\n\n #emitSelection() {\n this.itemSelect.emit(this._selection);\n }\n\n ngOnDestroy(): void {\n this._keyManager?.destroy();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ListItemDirective } from './list-item.directive';\nimport { ListComponent } from './list.component';\n\n@NgModule({\n imports: [ListComponent, ListItemDirective],\n exports: [ListComponent, ListItemDirective]\n})\nexport class YuvListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;;;;;;;;;AAWG;MASU,iBAAiB,CAAA;AAR9B,IAAA,WAAA,GAAA;AASE,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;AAO3B;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAU,KAAK,CAAC;AAC9B;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;QAEhC,IAAa,CAAA,aAAA,GAAG,YA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ChC,EAAA,OAAA,EAAA,CAAA,aAAa,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAE/B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHd,aAAa,CAAA,EAAA,CAAA,CAAA;;4FAGZ,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,iBAAiB,CAAC;AAC3C,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,iBAAiB;AAC3C,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -9,12 +9,12 @@ import * as i3 from '@angular/material/form-field';
|
|
|
9
9
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
10
10
|
import * as i4 from '@angular/material/slide-toggle';
|
|
11
11
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
12
|
-
import { StringComponent, DataGridComponent, OrganizationComponent, CatalogComponent, NumberComponent, NumberRangeComponent, DatetimeComponent, DatetimeRangeComponent } from '@yuuvis/client-framework/forms';
|
|
12
|
+
import { StringComponent, DataGridComponent, OrganizationComponent, OrganizationSetComponent, CatalogComponent, NumberComponent, NumberRangeComponent, DatetimeComponent, DatetimeRangeComponent } from '@yuuvis/client-framework/forms';
|
|
13
13
|
import { ObjectMetadataElementTemplateDirective, ObjectMetadataElementLabelDirective, ObjectMetadataElementErrorDirective } from '@yuuvis/client-framework/metadata-form';
|
|
14
14
|
|
|
15
15
|
class MetadataDefaultTemplatesComponent {
|
|
16
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: MetadataDefaultTemplatesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: MetadataDefaultTemplatesComponent, isStandalone: true, selector: "yuv-metadata-default-templates", ngImport: i0, template: "<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : true\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: StringComponent, selector: "yuv-string", inputs: ["multiselect", "rows", "readonly", "autofocus", "classifications", "situation", "regex", "minLength", "maxLength"] }, { kind: "component", type: DataGridComponent, selector: "yuv-data-grid", inputs: ["situation", "formElement", "formControl", "classifications", "readonly", "size"] }, { kind: "component", type: OrganizationComponent, selector: "yuv-organization", inputs: ["situation", "multiselect", "classifications", "readonly", "excludeMe", "withMetadata"] }, { kind: "component", type: CatalogComponent, selector: "yuv-catalog", inputs: ["readonly", "multiple", "options", "classifications", "situation"] }, { kind: "component", type: NumberComponent, selector: "yuv-number", inputs: ["scale", "precision", "grouping", "groupPattern", "readonly", "minValue", "maxValue", "classifications"] }, { kind: "component", type: NumberRangeComponent, selector: "yuv-number-range", inputs: ["scale", "precision", "grouping", "pattern", "readonly", "classifications", "minValue", "maxValue"] }, { kind: "component", type: DatetimeComponent, selector: "yuv-datetime", inputs: ["locale", "onlyFutureDates", "readonly", "calendar", "withTime"] }, { kind: "component", type: DatetimeRangeComponent, selector: "yuv-datetime-range", inputs: ["withTime", "readonly", "operator", "situation"] }, { kind: "directive", type: ObjectMetadataElementTemplateDirective, selector: "[yuvMetadataElementTemplate]", inputs: ["yuvMetadataElementTemplate", "propertyType", "situation"] }, { kind: "directive", type: ObjectMetadataElementLabelDirective, selector: "[yuvObjectMetadataElementLabel]", inputs: ["yuvObjectMetadataElementLabel"] }, { kind: "directive", type: ObjectMetadataElementErrorDirective, selector: "[yuvObjectMetadataElementError]", inputs: ["yuvObjectMetadataElementError"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i4.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: MetadataDefaultTemplatesComponent, isStandalone: true, selector: "yuv-metadata-default-templates", ngImport: i0, template: "<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION SET -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization:set\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-organization-set\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization-set>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : true\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: StringComponent, selector: "yuv-string", inputs: ["multiselect", "rows", "readonly", "autofocus", "classifications", "situation", "regex", "minLength", "maxLength"] }, { kind: "component", type: DataGridComponent, selector: "yuv-data-grid", inputs: ["situation", "formElement", "formControl", "classifications", "readonly", "size"] }, { kind: "component", type: OrganizationComponent, selector: "yuv-organization", inputs: ["situation", "multiselect", "classifications", "readonly", "excludeMe", "withMetadata"] }, { kind: "component", type: OrganizationSetComponent, selector: "yuv-organization-set", inputs: ["types", "situation", "multiselect", "readonly", "withMetadata", "autocompleteMinLength", "classifications"] }, { kind: "component", type: CatalogComponent, selector: "yuv-catalog", inputs: ["readonly", "multiple", "options", "classifications", "situation"] }, { kind: "component", type: NumberComponent, selector: "yuv-number", inputs: ["scale", "precision", "grouping", "groupPattern", "readonly", "minValue", "maxValue", "classifications"] }, { kind: "component", type: NumberRangeComponent, selector: "yuv-number-range", inputs: ["scale", "precision", "grouping", "pattern", "readonly", "classifications", "minValue", "maxValue"] }, { kind: "component", type: DatetimeComponent, selector: "yuv-datetime", inputs: ["locale", "onlyFutureDates", "readonly", "calendar", "withTime"] }, { kind: "component", type: DatetimeRangeComponent, selector: "yuv-datetime-range", inputs: ["withTime", "readonly", "operator", "situation"] }, { kind: "directive", type: ObjectMetadataElementTemplateDirective, selector: "[yuvMetadataElementTemplate]", inputs: ["yuvMetadataElementTemplate", "propertyType", "situation"] }, { kind: "directive", type: ObjectMetadataElementLabelDirective, selector: "[yuvObjectMetadataElementLabel]", inputs: ["yuvObjectMetadataElementLabel"] }, { kind: "directive", type: ObjectMetadataElementErrorDirective, selector: "[yuvObjectMetadataElementError]", inputs: ["yuvObjectMetadataElementError"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i4.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
|
|
18
18
|
}
|
|
19
19
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: MetadataDefaultTemplatesComponent, decorators: [{
|
|
20
20
|
type: Component,
|
|
@@ -24,6 +24,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
24
24
|
StringComponent,
|
|
25
25
|
DataGridComponent,
|
|
26
26
|
OrganizationComponent,
|
|
27
|
+
OrganizationSetComponent,
|
|
27
28
|
CatalogComponent,
|
|
28
29
|
NumberComponent,
|
|
29
30
|
NumberRangeComponent,
|
|
@@ -36,7 +37,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
36
37
|
MatFormFieldModule,
|
|
37
38
|
MatSlideToggleModule,
|
|
38
39
|
MatFormFieldModule
|
|
39
|
-
], template: "<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : true\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n" }]
|
|
40
|
+
], template: "<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION SET -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization:set\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-organization-set\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization-set>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : true\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n" }]
|
|
40
41
|
}] });
|
|
41
42
|
|
|
42
43
|
class YuvMetadataFormDefaultsModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-client-framework-metadata-form-defaults.mjs","sources":["../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-default-templates/metadata-default-templates.component.ts","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-default-templates/metadata-default-templates.component.html","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-form-defaults.module.ts","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/yuuvis-client-framework-metadata-form-defaults.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport {\n CatalogComponent,\n DataGridComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n NumberComponent,\n NumberRangeComponent,\n OrganizationComponent,\n StringComponent\n} from '@yuuvis/client-framework/forms';\nimport { ObjectMetadataElementErrorDirective, ObjectMetadataElementLabelDirective, ObjectMetadataElementTemplateDirective } from '@yuuvis/client-framework/metadata-form';\n@Component({\n selector: 'yuv-metadata-default-templates',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n StringComponent,\n DataGridComponent,\n OrganizationComponent,\n CatalogComponent,\n NumberComponent,\n NumberRangeComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n ObjectMetadataElementTemplateDirective,\n ObjectMetadataElementLabelDirective,\n ObjectMetadataElementErrorDirective,\n MatCheckboxModule,\n MatFormFieldModule,\n MatSlideToggleModule,\n MatFormFieldModule\n ],\n templateUrl: './metadata-default-templates.component.html',\n styleUrl: './metadata-default-templates.component.scss'\n})\nexport class MetadataDefaultTemplatesComponent {}\n","<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : true\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { MetadataDefaultTemplatesComponent } from './metadata-default-templates/metadata-default-templates.component';\n\n@NgModule({\n imports: [MetadataDefaultTemplatesComponent],\n exports: [MetadataDefaultTemplatesComponent],\n})\nexport class YuvMetadataFormDefaultsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA0Ca,iCAAiC,CAAA;+GAA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s/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-default-templates/metadata-default-templates.component.ts","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-default-templates/metadata-default-templates.component.html","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-form-defaults.module.ts","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/yuuvis-client-framework-metadata-form-defaults.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport {\n CatalogComponent,\n DataGridComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n NumberComponent,\n NumberRangeComponent,\n OrganizationComponent,\n OrganizationSetComponent,\n StringComponent\n} from '@yuuvis/client-framework/forms';\nimport { ObjectMetadataElementErrorDirective, ObjectMetadataElementLabelDirective, ObjectMetadataElementTemplateDirective } from '@yuuvis/client-framework/metadata-form';\n@Component({\n selector: 'yuv-metadata-default-templates',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n StringComponent,\n DataGridComponent,\n OrganizationComponent,\n OrganizationSetComponent,\n CatalogComponent,\n NumberComponent,\n NumberRangeComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n ObjectMetadataElementTemplateDirective,\n ObjectMetadataElementLabelDirective,\n ObjectMetadataElementErrorDirective,\n MatCheckboxModule,\n MatFormFieldModule,\n MatSlideToggleModule,\n MatFormFieldModule\n ],\n templateUrl: './metadata-default-templates.component.html',\n styleUrl: './metadata-default-templates.component.scss'\n})\nexport class MetadataDefaultTemplatesComponent {}\n","<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION SET -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization:set\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n <yuv-organization-set\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization-set>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : true\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx.ctrl\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { MetadataDefaultTemplatesComponent } from './metadata-default-templates/metadata-default-templates.component';\n\n@NgModule({\n imports: [MetadataDefaultTemplatesComponent],\n exports: [MetadataDefaultTemplatesComponent],\n})\nexport class YuvMetadataFormDefaultsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA4Ca,iCAAiC,CAAA;+GAAjC,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iCAAiC,EC5C9C,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,+rQAwNA,EDlMI,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,8BACZ,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,wIAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,sEAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA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