@orangelogic/design-system 4.69.0 → 4.70.0
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/library/chunks/{abnfDiagram-N423BO3Z.H1zwr_k6.js → abnfDiagram-N423BO3Z.DF8zrlpl.js} +3 -3
- package/library/chunks/{alert.2Esbser8.js → alert.R0uU2KH7.js} +2 -2
- package/library/chunks/{architectureDiagram-T3A2C74G.AxjW1Pvo.js → architectureDiagram-T3A2C74G.ChMyS2RN.js} +5 -5
- package/library/chunks/{array-line-clamp.C0Vo0Zzg.js → array-line-clamp.sdjI6U9A.js} +2 -2
- package/library/chunks/{asset-link-format.COPyGdND.js → asset-link-format.D6L-qc3X.js} +8 -8
- package/library/chunks/{asset-link-format.Ce_3Qz6_.js → asset-link-format.dq41gJTI.js} +389 -384
- package/library/chunks/{audio.B0VfXBIx.js → audio.Bh_OVMPq.js} +2 -2
- package/library/chunks/{bicolor-picker.DS9Uut25.js → bicolor-picker.BiEM_IkN.js} +1 -1
- package/library/chunks/{block-width.CSyA0Dwe.js → block-width.DVoxwnhY.js} +44 -44
- package/library/chunks/{blockDiagram-VBNYF7ZC.BA5YJ5tg.js → blockDiagram-VBNYF7ZC.Dd9MRQVF.js} +6 -6
- package/library/chunks/{border-input-group.B6fqiG6F.js → border-input-group.zw5e2uZT.js} +3 -3
- package/library/chunks/{breadcrumb.DkINVxcJ.js → breadcrumb.BUMgMApw.js} +1 -1
- package/library/chunks/{button.DKkHqsUz.js → button.Dja-uoTw.js} +3 -3
- package/library/chunks/{c4Diagram-5PPSVZJV.B1weqOqz.js → c4Diagram-5PPSVZJV.BYo1Zq25.js} +3 -3
- package/library/chunks/{channel.Bqlqmufs.js → channel.DQU07rrH.js} +1 -1
- package/library/chunks/{checkbox.BdSpQlwf.js → checkbox.BzR50Is_.js} +2 -2
- package/library/chunks/{chunk-2GRJ4B5K.BOBf1_FX.js → chunk-2GRJ4B5K.DSIuCed9.js} +1 -1
- package/library/chunks/{chunk-4I5QYGJK.DfO_P7bO.js → chunk-4I5QYGJK.C74S0dID.js} +1 -1
- package/library/chunks/{chunk-5RXB4S5H.oisV3Q1b.js → chunk-5RXB4S5H.BSZ9vwQ_.js} +6 -6
- package/library/chunks/{chunk-6Q2QTUOP.ByglL7sM.js → chunk-6Q2QTUOP.C98k0Ypz.js} +2 -2
- package/library/chunks/{chunk-7Z6QIM7H.BXSFN_6B.js → chunk-7Z6QIM7H.CbyAI1qL.js} +6 -6
- package/library/chunks/{chunk-GF5L2VYU.BBRVN_Sz.js → chunk-GF5L2VYU.BwnEI-9p.js} +6 -6
- package/library/chunks/{chunk-I66GZJ75.lUTR0Zxp.js → chunk-I66GZJ75.hYJHAb8_.js} +1 -1
- package/library/chunks/{chunk-JQJVKLGR.dOAJ_eec.js → chunk-JQJVKLGR.Ca9c6WQC.js} +8 -8
- package/library/chunks/{chunk-KBJHAD2P.Bfz5cQAa.js → chunk-KBJHAD2P.Dpm7St5I.js} +1 -1
- package/library/chunks/{chunk-NSK5VX7P.BkWzMz1o.js → chunk-NSK5VX7P.JTL9VQLt.js} +1 -1
- package/library/chunks/{chunk-QR6OTTB3.DyBl4spZ.js → chunk-QR6OTTB3.1iZWec7S.js} +6 -6
- package/library/chunks/{chunk-UBXNYLIW.BjkOeuJd.js → chunk-UBXNYLIW.DiZRcRzh.js} +2 -2
- package/library/chunks/{chunk-W5SLKNZC.DzlXmWcA.js → chunk-W5SLKNZC.BpdNkiim.js} +1 -1
- package/library/chunks/{chunk-WRU74C26.BDl8PZFV.js → chunk-WRU74C26.BREX4nlj.js} +3 -3
- package/library/chunks/{classDiagram-JCYQIIEL.P36yteOv.js → classDiagram-JCYQIIEL.CHysnuuw.js} +12 -12
- package/library/chunks/{classDiagram-v2-OCEON4UE.C05djrx3.js → classDiagram-v2-OCEON4UE.CMVfaUrJ.js} +12 -12
- package/library/chunks/{color-picker.DZUudAAS.js → color-picker.dyBoEYVk.js} +11 -11
- package/library/chunks/{color-swatch-group.CuMJc6m8.js → color-swatch-group.D7ezyFa4.js} +24 -24
- package/library/chunks/{color-swatch.DXAr2gBg.js → color-swatch.y7Bpth0U.js} +3 -3
- package/library/chunks/{config-manager.BFqNZV0l.js → config-manager.DxNqEyoQ.js} +32 -32
- package/library/chunks/{configs-controller.TQDPq63n.js → configs-controller.Dw2p65Lp.js} +9 -9
- package/library/chunks/{confirm-popover.sZVNhFPh.js → confirm-popover.CBU6yy6Y.js} +4 -4
- package/library/chunks/{copy-button.CqqKJEh3.js → copy-button.FXPqVprU.js} +2 -2
- package/library/chunks/{corner-position-input-group.nTlFes0_.js → corner-position-input-group.itPK9LEh.js} +4 -4
- package/library/chunks/{cropper.BF32WRyP.js → cropper.D8Uu43xy.js} +1 -1
- package/library/chunks/{cynefinDiagram-MW4NZA55.CN3dX-zy.js → cynefinDiagram-MW4NZA55.CNmGi2wN.js} +3 -3
- package/library/chunks/{dagre-VZM6K2ZE.DpSsP2YW.js → dagre-VZM6K2ZE.pAZyqROg.js} +8 -8
- package/library/chunks/date-calendar.CVCAmoi6.js +188 -0
- package/library/chunks/date.kywrEgxd.js +363 -0
- package/library/chunks/{details.DSgp6VAD.js → details.DmHi0fqd.js} +1 -1
- package/library/chunks/{diagram-7IWD3JNH.C3K0gCHG.js → diagram-7IWD3JNH.BDOF6I2J.js} +4 -4
- package/library/chunks/{diagram-B4RE2ZJO.BULgC23C.js → diagram-B4RE2ZJO.DT1Xf2Kc.js} +2 -2
- package/library/chunks/{diagram-LBJQPF4R.BmYYTkym.js → diagram-LBJQPF4R.i67nojTE.js} +3 -3
- package/library/chunks/{diagram-Q27KOJAE.Bj5ayV3p.js → diagram-Q27KOJAE.C9Y5E3pX.js} +5 -5
- package/library/chunks/{diagram-UB23O5K3.Bu_lTx_A.js → diagram-UB23O5K3.Dxnn2pgu.js} +3 -3
- package/library/chunks/{dialog.D0oTJWFf.js → dialog.DpY6WRVN.js} +3 -3
- package/library/chunks/{diff.Bmdpmpvo.js → diff.BLPeoeMo.js} +1 -1
- package/library/chunks/{document-viewer.L77oYyOp.js → document-viewer.b3Nej7rG.js} +14 -14
- package/library/chunks/{dom.BLHsooDR.js → dom.8wD7rIGz.js} +1 -1
- package/library/chunks/{dot-pagination.C1C6NG8d.js → dot-pagination.ByrS9Fz0.js} +2 -2
- package/library/chunks/{drawer.BsKzYqKe.js → drawer.B9v7mKrO.js} +2 -2
- package/library/chunks/{dropdown.CKhoP9Cr.js → dropdown.BPVXbna1.js} +16 -7
- package/library/chunks/{dynamic-select.Cb3L0dIB.js → dynamic-select.D2zWyFJw.js} +5 -5
- package/library/chunks/{e-chart.DKFAToIc.js → e-chart.Dbh7iFWT.js} +2 -2
- package/library/chunks/{ebnfDiagram-BXEA7PRR.Cg96HHIs.js → ebnfDiagram-BXEA7PRR.C15CrBEH.js} +3 -3
- package/library/chunks/{element-clamp.CGq-62gg.js → element-clamp.CM3ydK4k.js} +2 -2
- package/library/chunks/{erDiagram-JOGREHBK.CrJ962th.js → erDiagram-JOGREHBK.BAFJcDwv.js} +11 -11
- package/library/chunks/{file-on-demand.BjUW2Ydt.js → file-on-demand.BqWBYhdM.js} +17 -17
- package/library/chunks/flowDiagram-UKHOOZJN.BkgRtWrB.js +16 -0
- package/library/chunks/{folder-select.DJ5EEod3.js → folder-select.oEUjUT-R.js} +9 -9
- package/library/chunks/{form.D_eBa3AQ.js → form.ChOu6BIn.js} +1 -1
- package/library/chunks/{format-time.QkJcKYrT.js → format-time.QdzoTicK.js} +1 -1
- package/library/chunks/{ganttDiagram-PKOTCBZU.D216_p5R.js → ganttDiagram-PKOTCBZU.BWKE9zb3.js} +2 -2
- package/library/chunks/{gitGraphDiagram-DS77QQ5N.BGTaYiUE.js → gitGraphDiagram-DS77QQ5N.Dh9BZvJA.js} +2 -2
- package/library/chunks/{header.CowQINf-.js → header.l6qj73ci.js} +2 -2
- package/library/chunks/{i18n.Bjg2ubA4.js → i18n.BYpiX0kX.js} +40 -1
- package/library/chunks/{icon-button.qJd_az6T.js → icon-button.4VGhMghV.js} +2 -2
- package/library/chunks/{iframe.sl2wnUcC.js → iframe.CQ4J2A_9.js} +1 -1
- package/library/chunks/{image-comparer.BCD6kzLm.js → image-comparer.DMCUgZXb.js} +1 -1
- package/library/chunks/{image.-lgb634-.js → image.DQCunWsS.js} +2 -2
- package/library/chunks/{infoDiagram-6WML65LV.BHVojFJh.js → infoDiagram-6WML65LV.BlZ2eFcf.js} +2 -2
- package/library/chunks/{input.DZRed6yo.js → input.DWh_E1GV.js} +19 -6
- package/library/chunks/{ishikawaDiagram-WSZJBQD7.nZsYnPcQ.js → ishikawaDiagram-WSZJBQD7.QMHGwtgV.js} +3 -3
- package/library/chunks/{journeyDiagram-NVQOT4AX.BXUxAk98.js → journeyDiagram-NVQOT4AX.C-ovuC8R.js} +2 -2
- package/library/chunks/{kanban-definition-27J2QSJJ.Bg8-oEtc.js → kanban-definition-27J2QSJJ.CwAo6fJw.js} +8 -8
- package/library/chunks/{line-clamp.Dl3_JdHX.js → line-clamp.DgWfU-Yi.js} +47 -28
- package/library/chunks/{markdown.BzDRvv-f.js → markdown.7JZ0SpEP.js} +4 -4
- package/library/chunks/{masonry.BxNeClR6.js → masonry.CMGXrgQ8.js} +3 -3
- package/library/chunks/{menu-item.au-gTg1F.js → menu-item.CJFkQ-YV.js} +3 -3
- package/library/chunks/{menu.BxBtGPsg.js → menu.BYeW0I0d.js} +2 -2
- package/library/chunks/{mermaid.core.m1JI7kDY.js → mermaid.core.CGY0RVtv.js} +49 -49
- package/library/chunks/{mindmap-definition-FAOFIHXS.DwjOzYq5.js → mindmap-definition-FAOFIHXS.CQvqcBzU.js} +10 -10
- package/library/chunks/{option.DWE0tark.js → option.Dk32KiRr.js} +1 -1
- package/library/chunks/{padding-input-group.D2Qx15Yj.js → padding-input-group.BlSd4VCs.js} +1 -1
- package/library/chunks/{pagination.ByLuPMyE.js → pagination.C0Zu1uP7.js} +7 -7
- package/library/chunks/{pegDiagram-VL7TDLO6.BaVddVr3.js → pegDiagram-VL7TDLO6.CCjKBwxn.js} +3 -3
- package/library/chunks/{pieDiagram-7S7Q4E2Y.lZiCqBKs.js → pieDiagram-7S7Q4E2Y.BIlwtlJL.js} +3 -3
- package/library/chunks/{popup.w4ZU3jI-.js → popup.DaV-mbsU.js} +2 -2
- package/library/chunks/{position-picker.X2hhfGx7.js → position-picker.mxReT7rl.js} +3 -3
- package/library/chunks/{progress-bar.CynVLLnY.js → progress-bar.OOVw3Ho1.js} +1 -1
- package/library/chunks/{progress-ring.Bfdj3-uB.js → progress-ring.DDNC-hmO.js} +1 -1
- package/library/chunks/purify.es.jxOE2kAK.js +867 -0
- package/library/chunks/{quadrantDiagram-CIZ2JOQS.DswnHa_z.js → quadrantDiagram-CIZ2JOQS.DorpRl0y.js} +1 -1
- package/library/chunks/{radio-card.VEsyM8ue.js → radio-card.CbaIYFEi.js} +2 -2
- package/library/chunks/{radio-group.CHlxPcrs.js → radio-group.DfR13lVB.js} +1 -1
- package/library/chunks/{radio.DhPbmKbQ.js → radio.BmN7pFIX.js} +1 -1
- package/library/chunks/{railroadDiagram-AXF67PYL.RYtWvnP4.js → railroadDiagram-AXF67PYL.c5ghpRCW.js} +3 -3
- package/library/chunks/{range.ObEMbygm.js → range.1d77B-YM.js} +3 -3
- package/library/chunks/{rating.CNeNn996.js → rating.u1DIMFu_.js} +1 -1
- package/library/chunks/{relative-time.BfE3UOhF.js → relative-time.Ca958bVn.js} +1 -1
- package/library/chunks/{requirementDiagram-LRYGKXZP.BhxZAEJL.js → requirementDiagram-LRYGKXZP.MlkqKyhd.js} +10 -10
- package/library/chunks/{sankeyDiagram-W5VNT64P.Dk8npZSg.js → sankeyDiagram-W5VNT64P.Ch23b1-S.js} +1 -1
- package/library/chunks/{select.BV0Necz7.js → select.Blx7Am5x.js} +112 -108
- package/library/chunks/{sequenceDiagram-SI44F4Z6.BNjBc769.js → sequenceDiagram-SI44F4Z6.CZxsjRpC.js} +4 -4
- package/library/chunks/{shadow-input-group.Xxuzm8Qe.js → shadow-input-group.E6JTidSM.js} +2 -2
- package/library/chunks/{share-option-list.DOaEypfQ.js → share-option-list.CVazDKnW.js} +3 -3
- package/library/chunks/{sidebar.CiZOJ49X.js → sidebar.2H_HDEhd.js} +2 -2
- package/library/chunks/{size-input-group.wXuG0-RB.js → size-input-group.CxTubAwO.js} +5 -5
- package/library/chunks/{spinner.Bv06U7NJ.js → spinner.AokDNIMB.js} +1 -1
- package/library/chunks/{split-panel.Cag0lAvv.js → split-panel.B0tLqJqx.js} +1 -1
- package/library/chunks/{src.Dia365C9.js → src.BQtwu7L_.js} +26 -26
- package/library/chunks/src.D6mhR5h1.js +103 -0
- package/library/chunks/{stateDiagram-OKZ733FA.DkiIgxjd.js → stateDiagram-OKZ733FA.JCaGHMmH.js} +12 -12
- package/library/chunks/{stateDiagram-v2-UEYNNEHI.oVj_Ex1_.js → stateDiagram-v2-UEYNNEHI.CKrKpvxj.js} +12 -12
- package/library/chunks/{step.D93ReCO1.js → step.qMEvWQSa.js} +3 -3
- package/library/chunks/{stepper-wizard.CPZ2mSze.js → stepper-wizard.DbU4i26F.js} +2 -2
- package/library/chunks/{stepper.D0JB_GVh.js → stepper.BxTR5LWg.js} +1 -1
- package/library/chunks/{string.9yahdkB8.js → string.TY0RTPc8.js} +1 -1
- package/library/chunks/{swimlanes-SLNWSIFB.DKU7qXJ7.js → swimlanes-SLNWSIFB.BnCITr-P.js} +8 -8
- package/library/chunks/{swimlanesDiagram-ULZ7WXOC.DYwYMO_K.js → swimlanesDiagram-ULZ7WXOC.DMYLowNi.js} +12 -12
- package/library/chunks/{switch.BM9msK5T.js → switch.BuleQplE.js} +1 -1
- package/library/chunks/{tab-group.dnnT9Mk6.js → tab-group.CBg0wLFC.js} +8 -8
- package/library/chunks/{tab.CYYAua8Y.js → tab.Dmb7JL1e.js} +3 -3
- package/library/chunks/{tag.DQLauctm.js → tag.BGu9ORJf.js} +3 -3
- package/library/chunks/{textarea.CHSZI8vt.js → textarea.BQV58bk8.js} +1 -1
- package/library/chunks/{timecode.DjI1OTXD.js → timecode.B6JsxLxl.js} +1 -1
- package/library/chunks/{timeline-definition-Z64GVDOM.agRZ87Zs.js → timeline-definition-Z64GVDOM.DpGlraiA.js} +3 -3
- package/library/chunks/{tooltip.Cc02vm6M.js → tooltip.CboSydrY.js} +17 -21
- package/library/chunks/{tree.BI7r-WnZ.js → tree.CJcVgjAA.js} +4 -4
- package/library/chunks/{typeface.DTLrIP0B.js → typeface.rz2bQ3m1.js} +3 -3
- package/library/chunks/{vennDiagram-T6HMQDX7.Cd9lVObe.js → vennDiagram-T6HMQDX7.DYlGT1g9.js} +3 -3
- package/library/chunks/{video.DWmHPbXO.js → video.vPLA5d28.js} +6 -6
- package/library/chunks/{wardleyDiagram-T6FBY63Y.yCklp5Oa.js → wardleyDiagram-T6FBY63Y.DFkqP4xG.js} +3 -3
- package/library/chunks/{xychartDiagram-ELKLHX3M.CLuRN0XK.js → xychartDiagram-ELKLHX3M.CmCPBha7.js} +5 -5
- package/library/components/alert.js +1 -1
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +1 -1
- package/library/components/atoms.js +55 -55
- package/library/components/audio.js +1 -1
- package/library/components/bicolor-picker.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +1 -1
- package/library/components/checkbox.js +1 -1
- package/library/components/color-picker.js +1 -1
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/color-swatch.js +1 -1
- package/library/components/confirm-popover.js +1 -1
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +1 -1
- package/library/components/cropper.js +1 -1
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +1 -1
- package/library/components/diff.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/dot-pagination.js +1 -1
- package/library/components/drawer.js +1 -1
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +1 -1
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +1 -1
- package/library/components/file-on-demand.js +1 -1
- package/library/components/folder-select.js +1 -1
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +1 -1
- package/library/components/icon-button.js +1 -1
- package/library/components/iframe.js +1 -1
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +1 -1
- package/library/components/input.js +1 -1
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +1 -1
- package/library/components/masonry.js +1 -1
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +18 -18
- package/library/components/option.js +1 -1
- package/library/components/organisms.js +3 -3
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +1 -1
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +1 -1
- package/library/components/radio.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +1 -1
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +1 -1
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/stepper.js +1 -1
- package/library/components/switch.js +1 -1
- package/library/components/tab-group.js +1 -1
- package/library/components/tab.js +1 -1
- package/library/components/tag.js +1 -1
- package/library/components/textarea.js +1 -1
- package/library/components/timecode.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +1 -1
- package/library/components/tree.js +1 -1
- package/library/components/typeface.js +1 -1
- package/library/components/types.js +21888 -19121
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +2 -2
- package/library/packages/atoms/src/components/date-calendar/date-calendar.d.ts +62 -9
- package/library/packages/atoms/src/components/dropdown/dropdown.d.ts +6 -0
- package/library/packages/atoms/src/components/input/input.d.ts +20 -1
- package/library/packages/atoms/src/components/line-clamp/line-clamp.d.ts +3 -0
- package/library/packages/atoms/src/components/radio/radio.d.ts +3 -0
- package/library/packages/atoms/src/components/select/select.d.ts +0 -4
- package/library/packages/atoms/src/components/tooltip/tooltip.d.ts +4 -1
- package/library/packages/events/src/cx-search-facet-date-change.d.ts +11 -0
- package/library/packages/events/src/cx-search-facet-focus-title.d.ts +10 -0
- package/library/packages/events/src/cx-search-facet-reset.d.ts +12 -0
- package/library/packages/events/src/cx-search-facet-select-all.d.ts +13 -0
- package/library/packages/events/src/cx-search-facet-show-more.d.ts +12 -0
- package/library/packages/events/src/cx-search-facet-toggle.d.ts +11 -0
- package/library/packages/events/src/cx-search-facets-apply.d.ts +17 -0
- package/library/packages/events/src/cx-search-facets-change-filters.d.ts +6 -0
- package/library/packages/events/src/cx-search-facets-clear-all.d.ts +10 -0
- package/library/packages/events/src/cx-search-facets-custom.d.ts +10 -0
- package/library/packages/events/src/cx-search-facets-facet-expand.d.ts +9 -0
- package/library/packages/events/src/cx-search-facets-node-expand.d.ts +11 -0
- package/library/packages/events/src/cx-search-facets-refresh.d.ts +6 -0
- package/library/packages/events/src/cx-search-facets-show-more.d.ts +8 -0
- package/library/packages/events/src/cx-search-facets-summary-expand.d.ts +9 -0
- package/library/packages/events/src/cx-search-facets-summary-remove.d.ts +12 -0
- package/library/packages/events/src/events.d.ts +16 -0
- package/library/packages/molecules/src/input-date-picker/input-date-picker.d.ts +116 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +7 -2
- package/library/packages/organisms/src/index.d.ts +1 -0
- package/library/packages/organisms/src/search-facets/components/search-facet/search-facet.d.ts +95 -0
- package/library/packages/organisms/src/search-facets/components/search-facet/search-facet.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-advanced-date/advanced-date-reading.d.ts +90 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-advanced-date/search-facet-advanced-date.d.ts +85 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-advanced-date/search-facet-advanced-date.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-color/search-facet-color.d.ts +47 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-color/search-facet-color.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-date/date-range-validation.d.ts +67 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-date/search-facet-date.d.ts +120 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-date/search-facet-date.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-similar/search-facet-similar.d.ts +44 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-similar/search-facet-similar.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-tree/search-facet-tree.d.ts +104 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-tree/search-facet-tree.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/components/search-facet-tree/visible-nodes.d.ts +36 -0
- package/library/packages/organisms/src/search-facets/components/search-facets-summary/search-facets-summary.d.ts +67 -0
- package/library/packages/organisms/src/search-facets/components/search-facets-summary/search-facets-summary.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/search-facets.d.ts +198 -0
- package/library/packages/organisms/src/search-facets/search-facets.fixtures.d.ts +141 -0
- package/library/packages/organisms/src/search-facets/search-facets.styles.d.ts +2 -0
- package/library/packages/organisms/src/search-facets/state/date-drafts.d.ts +11 -0
- package/library/packages/organisms/src/search-facets/state/long-panel.d.ts +7 -0
- package/library/packages/organisms/src/search-facets/state/preview-summary.d.ts +17 -0
- package/library/packages/organisms/src/search-facets/state/preview-waiting-changes.d.ts +12 -0
- package/library/packages/organisms/src/search-facets/state/response-correlation.d.ts +9 -0
- package/library/packages/organisms/src/search-facets/state/waiting-changes.d.ts +179 -0
- package/library/packages/organisms/src/search-facets/types.d.ts +347 -0
- package/library/packages/types/src/asset-link-format.d.ts +6 -0
- package/library/packages/types/src/search-facets.d.ts +104 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +39 -0
- package/library/packages/utils/src/date/calendar-grid.d.ts +5 -6
- package/library/packages/utils/src/date/date.d.ts +7 -1
- package/library/react-web-component.d.ts +87 -5
- package/library/utils.js +13 -13
- package/package.json +1 -1
- package/library/chunks/date-calendar.B7e6WBzh.js +0 -78
- package/library/chunks/date.BL4L64Hx.js +0 -358
- package/library/chunks/flowDiagram-UKHOOZJN.Bj_loY7-.js +0 -16
- package/library/chunks/purify.es.Bwsrv9kG.js +0 -866
- package/library/chunks/src.DKhoCHMa.js +0 -103
|
@@ -3,39 +3,39 @@ import { a as r, i, n as a, r as o, t as s } from "./cortex-element.DTrNUtdr.js"
|
|
|
3
3
|
import { t as c } from "./query.B1yi7t71.js";
|
|
4
4
|
import { t as l } from "./component.styles.0xM1ZmBs.js";
|
|
5
5
|
import { t as u } from "./custom-element.BEMYNDK1.js";
|
|
6
|
-
import { t as d } from "./i18n.
|
|
6
|
+
import { t as d } from "./i18n.BYpiX0kX.js";
|
|
7
7
|
import { t as f } from "./watch.Ub5r8btz.js";
|
|
8
|
-
import { t as p } from "./icon-button.
|
|
8
|
+
import { t as p } from "./icon-button.4VGhMghV.js";
|
|
9
9
|
import { t as m } from "./when.BUskJLtZ.js";
|
|
10
10
|
import { t as h } from "./icon.CeQpEaQz.js";
|
|
11
11
|
import { t as g } from "./style-map.DPGQIxip.js";
|
|
12
12
|
import { c as ee } from "./browser.gIznFIix.js";
|
|
13
|
-
import { t as _ } from "./button.
|
|
14
|
-
import { g as te } from "./string.
|
|
15
|
-
import { t as ne } from "./tooltip.
|
|
13
|
+
import { t as _ } from "./button.Dja-uoTw.js";
|
|
14
|
+
import { g as te } from "./string.TY0RTPc8.js";
|
|
15
|
+
import { t as ne } from "./tooltip.CboSydrY.js";
|
|
16
16
|
import { n as v } from "./position-picker.dY_vgF_H.js";
|
|
17
17
|
import { l as re, r as y } from "./number.CNp5LKkv.js";
|
|
18
18
|
import { t as ie } from "./image.C0s1gL4z.js";
|
|
19
19
|
import { n as b, t as x } from "./typography.B0mkhqTB.js";
|
|
20
20
|
import { t as ae } from "./button-group.CPfXrqyq.js";
|
|
21
|
-
import { t as oe } from "./checkbox.
|
|
21
|
+
import { t as oe } from "./checkbox.BzR50Is_.js";
|
|
22
22
|
import { t as S } from "./repeat.CKv9FPlC.js";
|
|
23
|
-
import { t as se } from "./input.
|
|
24
|
-
import { t as C } from "./option.
|
|
23
|
+
import { t as se } from "./input.DWh_E1GV.js";
|
|
24
|
+
import { t as C } from "./option.Dk32KiRr.js";
|
|
25
25
|
import { t as w } from "./space.Dd8jezXK.js";
|
|
26
|
-
import { t as T } from "./select.
|
|
26
|
+
import { t as T } from "./select.Blx7Am5x.js";
|
|
27
27
|
import { t as ce } from "./visually-hidden.Bv3SInZp.js";
|
|
28
|
-
import { D as le, E as ue, T as de, b as fe, f as pe, g as me, m as he, x as ge } from "./src.
|
|
29
|
-
import { t as E } from "./details.
|
|
28
|
+
import { D as le, E as ue, T as de, b as fe, f as pe, g as me, m as he, x as ge } from "./src.BQtwu7L_.js";
|
|
29
|
+
import { t as E } from "./details.DmHi0fqd.js";
|
|
30
30
|
import { t as _e } from "./divider.CqSNZCU8.js";
|
|
31
|
-
import { a as D, c as O, l as k, n as ve, o as A, r as j, s as M, t as N } from "./asset-link-format.
|
|
31
|
+
import { a as D, c as O, l as k, n as ve, o as A, r as j, s as M, t as N, u as P } from "./asset-link-format.D6L-qc3X.js";
|
|
32
32
|
import { t as ye } from "./menu-label.B-FOyfAX.js";
|
|
33
|
-
import { t as be } from "./switch.
|
|
33
|
+
import { t as be } from "./switch.BuleQplE.js";
|
|
34
34
|
import { t as xe } from "./v4.JyXW8GUB.js";
|
|
35
|
-
import "./cropper.
|
|
35
|
+
import "./cropper.D8Uu43xy.js";
|
|
36
36
|
import { t as Se } from "./_baseUniq.h_pGICPH.js";
|
|
37
|
-
import { d as Ce, i as we, n as Te, o as Ee, p as
|
|
38
|
-
import { t as Ae } from "./position-picker.
|
|
37
|
+
import { d as Ce, i as we, n as Te, o as Ee, p as F, r as De, s as Oe, t as ke } from "./string-array.F2GuxHp0.js";
|
|
38
|
+
import { t as Ae } from "./position-picker.mxReT7rl.js";
|
|
39
39
|
//#region ../../node_modules/lodash-es/uniq.js
|
|
40
40
|
function je(e) {
|
|
41
41
|
return e && e.length ? Se(e) : [];
|
|
@@ -127,7 +127,7 @@ function ze(e) {
|
|
|
127
127
|
}
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region ../../packages/services/src/api/asset/asset.ts
|
|
130
|
-
var Be = "CoreField.LargeSizePreview",
|
|
130
|
+
var Be = "CoreField.LargeSizePreview", I = "CoreField.DocType", Ve = "Document.Title", He = "Document.CaptionLong", L = "Document.FileExtension", Ue = "CoreField.FileSize", We = "CoreField.Identifier", Ge = "CoreField.MaxHeight", Ke = "CoreField.MaxWidth", R = "Document.RecordID", qe = "CoreField.DocSubType", Je = "CoreField.TitleWithFallback", z = "CoreField.OriginalFileName", Ye = "__width", Xe = "__height", Ze = "CoreField.OriginalPreview", Qe = "Document.DocSubType", $e = "Document.InPoint", et = "Document.OutPoint", tt = {
|
|
131
131
|
DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
|
|
132
132
|
ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
|
|
133
133
|
}, nt = {
|
|
@@ -138,7 +138,7 @@ function it(e) {
|
|
|
138
138
|
return nt[e] ?? e;
|
|
139
139
|
}
|
|
140
140
|
function at(e) {
|
|
141
|
-
return e === "CoreField.TitleWithFallback" ? [Ve,
|
|
141
|
+
return e === "CoreField.TitleWithFallback" ? [Ve, z] : [it(e)];
|
|
142
142
|
}
|
|
143
143
|
function ot(e) {
|
|
144
144
|
let t = {};
|
|
@@ -149,7 +149,7 @@ function ot(e) {
|
|
|
149
149
|
return t;
|
|
150
150
|
}
|
|
151
151
|
function st(e, t, n) {
|
|
152
|
-
e[n] =
|
|
152
|
+
e[n] = B(t, n);
|
|
153
153
|
let r = t[n];
|
|
154
154
|
return r != null && Me(r) && (typeof r.Width == "number" && r.Width > 0 && (e[`${n}${Ye}`] = String(r.Width)), typeof r.Height == "number" && r.Height > 0 && (e[`${n}${Xe}`] = String(r.Height))), e;
|
|
155
155
|
}
|
|
@@ -161,7 +161,7 @@ function ct(e) {
|
|
|
161
161
|
async function lt({ consistency: e, countPerPage: t, fields: n, getPermanentAssetsPaths: r, httpMethod: i = "GET", isSiteBuilder: a, pageNumber: o, query: s, securityByPassToken: c, siteUrl: l, sort: u, throwOnError: d, token: f, useSession: p }) {
|
|
162
162
|
let m = n?.flatMap(at), h = n?.includes("CoreField.TitleWithFallback") ?? !1, g = (e) => {
|
|
163
163
|
let t = ot(e);
|
|
164
|
-
return h && (t[Je] =
|
|
164
|
+
return h && (t[Je] = B(t, "Document.Title") || B(t, "CoreField.OriginalFileName")), t;
|
|
165
165
|
}, ee = {
|
|
166
166
|
Consistency: e || void 0,
|
|
167
167
|
CountPerPage: t,
|
|
@@ -175,7 +175,7 @@ async function lt({ consistency: e, countPerPage: t, fields: n, getPermanentAsse
|
|
|
175
175
|
UseSession: p || void 0
|
|
176
176
|
}, _ = i === "POST";
|
|
177
177
|
try {
|
|
178
|
-
return (await
|
|
178
|
+
return (await F.request({
|
|
179
179
|
baseURL: l,
|
|
180
180
|
headers: f ? { Authorization: `Bearer ${f}` } : void 0,
|
|
181
181
|
method: i,
|
|
@@ -184,7 +184,7 @@ async function lt({ consistency: e, countPerPage: t, fields: n, getPermanentAsse
|
|
|
184
184
|
paramsSerializer: { indexes: null }
|
|
185
185
|
},
|
|
186
186
|
responseType: "json",
|
|
187
|
-
transformResponse: [...Array.isArray(
|
|
187
|
+
transformResponse: [...Array.isArray(F.defaults.transformResponse) ? F.defaults.transformResponse : [], a ? (e) => ({
|
|
188
188
|
items: (e.results?.Items ?? []).map(g),
|
|
189
189
|
sort: e.results?.GlobalInfo?.Sort ?? "",
|
|
190
190
|
totalCount: e.results?.GlobalInfo?.TotalCount ?? 0
|
|
@@ -206,7 +206,7 @@ async function lt({ consistency: e, countPerPage: t, fields: n, getPermanentAsse
|
|
|
206
206
|
}
|
|
207
207
|
async function ut({ assetId: e, extension: t, format: n, siteUrl: r, token: i, transformations: a, useSession: o }) {
|
|
208
208
|
try {
|
|
209
|
-
return (await
|
|
209
|
+
return (await F.request({
|
|
210
210
|
baseURL: r,
|
|
211
211
|
method: "GET",
|
|
212
212
|
params: {
|
|
@@ -238,10 +238,10 @@ async function pt({ consistency: e, extraFields: t, getPermanentAssetsPaths: n,
|
|
|
238
238
|
};
|
|
239
239
|
let c = t?.filter((e) => e && typeof e == "string") ?? [], l = [
|
|
240
240
|
...c,
|
|
241
|
-
|
|
241
|
+
z,
|
|
242
242
|
Ve,
|
|
243
243
|
He,
|
|
244
|
-
|
|
244
|
+
R
|
|
245
245
|
], u = ft(i, dt), d = await Promise.all(u.map((t) => lt({
|
|
246
246
|
consistency: e,
|
|
247
247
|
countPerPage: t.length,
|
|
@@ -258,14 +258,14 @@ async function pt({ consistency: e, extraFields: t, getPermanentAssetsPaths: n,
|
|
|
258
258
|
return {
|
|
259
259
|
facets: [],
|
|
260
260
|
items: d.flatMap((e) => e.items).map((e) => ({
|
|
261
|
-
name:
|
|
262
|
-
recordId:
|
|
261
|
+
name: B(e, z),
|
|
262
|
+
recordId: B(e, R),
|
|
263
263
|
...c.reduce((t, n) => st(t, e, n), {})
|
|
264
264
|
})).sort((e, t) => (f.get(e.recordId) ?? Infinity) - (f.get(t.recordId) ?? Infinity)),
|
|
265
265
|
totalCount: d.reduce((e, t) => e + t.totalCount, 0)
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function B(e, t) {
|
|
269
269
|
let n = e[t];
|
|
270
270
|
return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : Me(n) ? n.URI : "";
|
|
271
271
|
}
|
|
@@ -287,12 +287,12 @@ async function mt({ consistency: e, countPerPage: t, directParentFolderIdentifie
|
|
|
287
287
|
...m,
|
|
288
288
|
Je,
|
|
289
289
|
Ue,
|
|
290
|
-
|
|
290
|
+
I,
|
|
291
291
|
qe,
|
|
292
292
|
We,
|
|
293
|
-
I,
|
|
294
293
|
L,
|
|
295
|
-
R
|
|
294
|
+
R,
|
|
295
|
+
z
|
|
296
296
|
],
|
|
297
297
|
getPermanentAssetsPaths: i,
|
|
298
298
|
httpMethod: "POST",
|
|
@@ -307,18 +307,18 @@ async function mt({ consistency: e, countPerPage: t, directParentFolderIdentifie
|
|
|
307
307
|
return {
|
|
308
308
|
facets: [],
|
|
309
309
|
items: g.items.map((e) => {
|
|
310
|
-
let t =
|
|
310
|
+
let t = B(e, L);
|
|
311
311
|
t && !t.startsWith(".") && (t = "." + t);
|
|
312
|
-
let n =
|
|
312
|
+
let n = B(e, R);
|
|
313
313
|
return {
|
|
314
|
-
docSubType:
|
|
315
|
-
docType:
|
|
314
|
+
docSubType: B(e, qe),
|
|
315
|
+
docType: B(e, "CoreField.DocType") || "",
|
|
316
316
|
extension: t,
|
|
317
317
|
id: n,
|
|
318
|
-
identifier:
|
|
319
|
-
name:
|
|
318
|
+
identifier: B(e, We),
|
|
319
|
+
name: B(e, z),
|
|
320
320
|
recordId: n,
|
|
321
|
-
size:
|
|
321
|
+
size: B(e, "CoreField.FileSize") || "0 MB",
|
|
322
322
|
...m.reduce((t, n) => st(t, e, n), {})
|
|
323
323
|
};
|
|
324
324
|
}),
|
|
@@ -327,7 +327,7 @@ async function mt({ consistency: e, countPerPage: t, directParentFolderIdentifie
|
|
|
327
327
|
}
|
|
328
328
|
async function ht({ autoCropMode: e, cropHeight: t, cropWidth: n, imageUrl: r, useSession: i }) {
|
|
329
329
|
try {
|
|
330
|
-
return (await
|
|
330
|
+
return (await F.request({
|
|
331
331
|
method: "GET",
|
|
332
332
|
params: {
|
|
333
333
|
AutoCropMode: e,
|
|
@@ -338,7 +338,7 @@ async function ht({ autoCropMode: e, cropHeight: t, cropWidth: n, imageUrl: r, u
|
|
|
338
338
|
},
|
|
339
339
|
responseType: "json",
|
|
340
340
|
timeout: 3e5,
|
|
341
|
-
transformResponse: [...Array.isArray(
|
|
341
|
+
transformResponse: [...Array.isArray(F.defaults.transformResponse) ? F.defaults.transformResponse : [], (e) => ({
|
|
342
342
|
height: e.cropHeight,
|
|
343
343
|
width: e.cropWidth,
|
|
344
344
|
x: e.cropX,
|
|
@@ -352,7 +352,7 @@ async function ht({ autoCropMode: e, cropHeight: t, cropWidth: n, imageUrl: r, u
|
|
|
352
352
|
}
|
|
353
353
|
async function gt({ assetRecordId: e, isSiteBuilder: t, siteUrl: n, token: r, useSession: i }) {
|
|
354
354
|
try {
|
|
355
|
-
return (await
|
|
355
|
+
return (await F.request({
|
|
356
356
|
baseURL: n,
|
|
357
357
|
method: "GET",
|
|
358
358
|
params: {
|
|
@@ -361,7 +361,7 @@ async function gt({ assetRecordId: e, isSiteBuilder: t, siteUrl: n, token: r, us
|
|
|
361
361
|
UseSession: i || void 0
|
|
362
362
|
},
|
|
363
363
|
responseType: "json",
|
|
364
|
-
transformResponse: [...Array.isArray(
|
|
364
|
+
transformResponse: [...Array.isArray(F.defaults.transformResponse) ? F.defaults.transformResponse : [], (e) => !e || typeof e != "object" ? [] : e.proxies?.map((e) => ({
|
|
365
365
|
cdnName: e.cdnName,
|
|
366
366
|
extension: e.extension,
|
|
367
367
|
formatHeight: e.formatHeight,
|
|
@@ -380,11 +380,11 @@ async function gt({ assetRecordId: e, isSiteBuilder: t, siteUrl: n, token: r, us
|
|
|
380
380
|
}
|
|
381
381
|
async function _t({ siteUrl: e } = {}) {
|
|
382
382
|
try {
|
|
383
|
-
return (await
|
|
383
|
+
return (await F.request({
|
|
384
384
|
baseURL: e,
|
|
385
385
|
method: "GET",
|
|
386
386
|
responseType: "json",
|
|
387
|
-
transformResponse: [...Array.isArray(
|
|
387
|
+
transformResponse: [...Array.isArray(F.defaults.transformResponse) ? F.defaults.transformResponse : [], (e) => !e || typeof e != "object" ? { formatsByDocType: {
|
|
388
388
|
Audio: {},
|
|
389
389
|
Image: {},
|
|
390
390
|
Multimedia: {},
|
|
@@ -404,7 +404,7 @@ async function vt({ recordIds: e, rightsToCheck: t }) {
|
|
|
404
404
|
invalidObjects: []
|
|
405
405
|
};
|
|
406
406
|
try {
|
|
407
|
-
let { data: n } = await
|
|
407
|
+
let { data: n } = await F.request({
|
|
408
408
|
method: "GET",
|
|
409
409
|
params: {
|
|
410
410
|
RecordIDs: e,
|
|
@@ -421,7 +421,7 @@ async function vt({ recordIds: e, rightsToCheck: t }) {
|
|
|
421
421
|
}
|
|
422
422
|
//#endregion
|
|
423
423
|
//#region ../../packages/tools/src/fetch-image/fetch-image.ts
|
|
424
|
-
var yt = 20,
|
|
424
|
+
var yt = 20, V = "TR1", H = "TRX", bt = /* @__PURE__ */ new Set([".gif"]), xt = /* @__PURE__ */ new Set([
|
|
425
425
|
".avif",
|
|
426
426
|
".bmp",
|
|
427
427
|
".gif",
|
|
@@ -437,10 +437,10 @@ function St(e) {
|
|
|
437
437
|
return xt.has(n);
|
|
438
438
|
}
|
|
439
439
|
function Ct(e, t) {
|
|
440
|
-
return e !== void 0 && e !== "" && e !==
|
|
440
|
+
return e !== void 0 && e !== "" && e !== O.Image ? !1 : !t || St(t);
|
|
441
441
|
}
|
|
442
442
|
function wt({ autoFormat: e, buildSrcset: t, docType: n, extension: r, format: i, item: a, manualFormat: o, size: s, useExpiringAssetUrls: c }) {
|
|
443
|
-
let l = r?.toLowerCase() ?? "", u = l.startsWith(".") ? l : `.${l}`, d = `path_${
|
|
443
|
+
let l = r?.toLowerCase() ?? "", u = l.startsWith(".") ? l : `.${l}`, d = `path_${V}`, f = (n, r) => {
|
|
444
444
|
let i = a[n];
|
|
445
445
|
if (!i) return;
|
|
446
446
|
let s = a[`${n}${Ye}`], u = a[`${n}${Xe}`], d = e && !c ? pe(i, [], {
|
|
@@ -465,10 +465,10 @@ function wt({ autoFormat: e, buildSrcset: t, docType: n, extension: r, format: i
|
|
|
465
465
|
}
|
|
466
466
|
if (!o) {
|
|
467
467
|
let e = fe(l, s);
|
|
468
|
-
return f(`path_${e}`, e) ?? f(d,
|
|
468
|
+
return f(`path_${e}`, e) ?? f(d, V) ?? {};
|
|
469
469
|
}
|
|
470
470
|
let p = i ? `path_${i}` : void 0;
|
|
471
|
-
return p && a[p] ? i !==
|
|
471
|
+
return p && a[p] ? i !== H || Ct(n, l) ? f(p, i) ?? {} : f(d, V) ?? {} : l && bt.has(u) ? f(`path_${H}`, H) ?? f(d, V) ?? {} : f(d, V) ?? {};
|
|
472
472
|
}
|
|
473
473
|
var Tt = class {
|
|
474
474
|
constructor(e, t) {
|
|
@@ -494,7 +494,7 @@ var Tt = class {
|
|
|
494
494
|
if (e < i || this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < i)) return this.data;
|
|
495
495
|
let s = this.requestEpoch, c = de(this.host.ownerDocument.defaultView);
|
|
496
496
|
if (!this.folderId || s !== this.requestEpoch) return this.data;
|
|
497
|
-
let l = n ? `path_${n}` : void 0, u = `path_${
|
|
497
|
+
let l = n ? `path_${n}` : void 0, u = `path_${V}`, d = `path_${H}`, f = c ? [u, d] : [...new Set([
|
|
498
498
|
l,
|
|
499
499
|
u,
|
|
500
500
|
d
|
|
@@ -509,10 +509,10 @@ var Tt = class {
|
|
|
509
509
|
getPermanentAssetsPaths: le(this.host.ownerDocument.defaultView),
|
|
510
510
|
isSiteBuilder: this.isSiteBuilder,
|
|
511
511
|
limitedDocTypes: [
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
512
|
+
O.Image,
|
|
513
|
+
O.Audio,
|
|
514
|
+
O.Video,
|
|
515
|
+
O.Multimedia
|
|
516
516
|
],
|
|
517
517
|
pageNumber: e,
|
|
518
518
|
searchTerm: "",
|
|
@@ -589,11 +589,11 @@ var Tt = class {
|
|
|
589
589
|
}
|
|
590
590
|
async fetchImagesByIDs({ extraFields: e = [], format: t, manualFormat: n = !0, recordIds: r, throwOnError: i = !1, transformations: a }) {
|
|
591
591
|
if (r.length === 0) return [];
|
|
592
|
-
let o = de(this.host.ownerDocument.defaultView), s = t ? `path_${t}` : void 0, c = `path_${
|
|
592
|
+
let o = de(this.host.ownerDocument.defaultView), s = t ? `path_${t}` : void 0, c = `path_${V}`, l = `path_${H}`, u = o ? [c, l] : [...new Set([
|
|
593
593
|
s,
|
|
594
594
|
c,
|
|
595
595
|
l
|
|
596
|
-
].filter((e) => !!e))], d = [
|
|
596
|
+
].filter((e) => !!e))], d = [L, ...o ? [] : [Ue]], f = [...e, I];
|
|
597
597
|
return (await pt({
|
|
598
598
|
consistency: this.consistency,
|
|
599
599
|
extraFields: [
|
|
@@ -611,8 +611,8 @@ var Tt = class {
|
|
|
611
611
|
let { maxHeight: r, maxWidth: i, src: s, srcset: c } = wt({
|
|
612
612
|
autoFormat: this.autoFormat,
|
|
613
613
|
buildSrcset: this.buildSrcset,
|
|
614
|
-
docType: e[
|
|
615
|
-
extension: e[
|
|
614
|
+
docType: e[I],
|
|
615
|
+
extension: e[L],
|
|
616
616
|
format: t,
|
|
617
617
|
item: e,
|
|
618
618
|
manualFormat: n,
|
|
@@ -621,7 +621,7 @@ var Tt = class {
|
|
|
621
621
|
}), l = s, u = c;
|
|
622
622
|
return !o && l && a && a.length > 0 && (l = pe(l, a), u = ""), {
|
|
623
623
|
alt: e.name,
|
|
624
|
-
docType: e[
|
|
624
|
+
docType: e[I],
|
|
625
625
|
extension: e["Document.FileExtension"] || "",
|
|
626
626
|
id: e.recordId,
|
|
627
627
|
maxHeight: r,
|
|
@@ -688,24 +688,24 @@ var Tt = class {
|
|
|
688
688
|
resetFolderState() {
|
|
689
689
|
this.resetPageCache();
|
|
690
690
|
}
|
|
691
|
-
}, Et = t`.asset-link-format__panel{position:relative}.asset-link-format--formats .asset-link-format__panel:not(:last-child){border-bottom:1px solid var(--cx-color-neutral-200)}.asset-link-format__panel--placeholder,.asset-link-format--formats .asset-link-format__panel--placeholder:not(:last-child){height:var(--cx-spacing-3x-small);background-color:var(--cx-color-primary);border:none;overflow:hidden}.asset-link-format__panel--placeholder>*{visibility:hidden}.asset-link-format__drag-handle{cursor:grab;touch-action:none;width:max-content;margin-inline:auto;position:absolute;inset-block-start:calc(var(--cx-spacing-small) + var(--cx-font-size-3x-large) / 2);inset-inline:0;transform:translateY(-50%)}.asset-link-format__drag-handle::part(base){cursor:grab}.asset-link-format__drag-handle:active,.asset-link-format__drag-handle:active::part(base){cursor:grabbing}.asset-link-format__drag-handle::part(icon){color:var(--cx-color-neutral-300);rotate:90deg}.asset-link-format__announcement{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.asset-link-format__order-hint{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border-bottom:1px solid var(--cx-color-neutral-200);color:var(--cx-input-help-text-color);font:var(--cx-font-label-x-small)}.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__formats-summary{padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__formats-summary cx-typography{--font-weight:var(--cx-font-weight-medium)}.asset-link-format__formats-summary [part=icon]{width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__formats-crop cx-asset-link-format-crop{box-sizing:border-box;width:100%;padding:0 var(--cx-spacing-medium) var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}.asset-link-format__footer,.asset-link-format__footer>slot{display:block}`, Dt = t`:host([inline]){display:block}cx-details::part(base){border-bottom-width:0}.details--inline::part(base){border-width:0}.details--inline::part(header){display:none}.details--inline::part(content){padding:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}.crop__limit{color:var(--cx-input-help-text-color);margin-block-start:calc(-1 * var(--spacing-container-gap))}.crop__limit:empty{position:absolute}`,
|
|
692
|
-
static #e =
|
|
691
|
+
}, Et = t`.asset-link-format__panel{position:relative}.asset-link-format--formats .asset-link-format__panel:not(:last-child){border-bottom:1px solid var(--cx-color-neutral-200)}.asset-link-format__panel--placeholder,.asset-link-format--formats .asset-link-format__panel--placeholder:not(:last-child){height:var(--cx-spacing-3x-small);background-color:var(--cx-color-primary);border:none;overflow:hidden}.asset-link-format__panel--placeholder>*{visibility:hidden}.asset-link-format__drag-handle{cursor:grab;touch-action:none;width:max-content;margin-inline:auto;position:absolute;inset-block-start:calc(var(--cx-spacing-small) + var(--cx-font-size-3x-large) / 2);inset-inline:0;transform:translateY(-50%)}.asset-link-format__drag-handle::part(base){cursor:grab}.asset-link-format__drag-handle:active,.asset-link-format__drag-handle:active::part(base){cursor:grabbing}.asset-link-format__drag-handle::part(icon){color:var(--cx-color-neutral-300);rotate:90deg}.asset-link-format__announcement{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.asset-link-format__order-hint{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border-bottom:1px solid var(--cx-color-neutral-200);color:var(--cx-input-help-text-color);font:var(--cx-font-label-x-small)}.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__formats-summary{padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__formats-summary cx-typography{--font-weight:var(--cx-font-weight-medium)}.asset-link-format__formats-summary [part=icon]{width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__formats-crop cx-asset-link-format-crop{box-sizing:border-box;width:100%;padding:0 var(--cx-spacing-medium) var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}.asset-link-format__footer,.asset-link-format__footer>slot{display:block}`, Dt = t`:host([inline]){display:block}cx-details::part(base){border-bottom-width:0}.details--inline::part(base){border-width:0}.details--inline::part(header){display:none}.details--inline::part(content){padding:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}.crop__limit{color:var(--cx-input-help-text-color);margin-block-start:calc(-1 * var(--spacing-container-gap))}.crop__limit:empty{position:absolute}`, U, W = class extends s {
|
|
692
|
+
static #e = U = this;
|
|
693
693
|
constructor(...e) {
|
|
694
|
-
super(...e), this.localize = new d(this), this.open = !1, this.inline = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit =
|
|
695
|
-
[
|
|
694
|
+
super(...e), this.localize = new d(this), this.open = !1, this.inline = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = P.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.hasCropper = !1, this.dimensionsLimited = !1, this.lastAppliedSetting = {
|
|
695
|
+
[P.Pixel]: {
|
|
696
696
|
height: 0,
|
|
697
697
|
percentageHeight: 100,
|
|
698
698
|
percentageWidth: 100,
|
|
699
|
-
unit:
|
|
699
|
+
unit: P.Pixel,
|
|
700
700
|
width: 0,
|
|
701
701
|
x: 0,
|
|
702
702
|
y: 0
|
|
703
703
|
},
|
|
704
|
-
[
|
|
704
|
+
[P.AspectRatio]: {
|
|
705
705
|
height: 1,
|
|
706
706
|
percentageHeight: 100,
|
|
707
707
|
percentageWidth: 100,
|
|
708
|
-
unit:
|
|
708
|
+
unit: P.AspectRatio,
|
|
709
709
|
width: 1,
|
|
710
710
|
x: 0,
|
|
711
711
|
y: 0
|
|
@@ -727,7 +727,7 @@ var Tt = class {
|
|
|
727
727
|
"cx-typography": x
|
|
728
728
|
};
|
|
729
729
|
static getRatioSize(e, t, n, r, i) {
|
|
730
|
-
return n ===
|
|
730
|
+
return n === P.Pixel && Number.isFinite(r) && Number.isFinite(i) ? ie(r, i, e, t) : {
|
|
731
731
|
height: t,
|
|
732
732
|
width: e
|
|
733
733
|
};
|
|
@@ -745,11 +745,11 @@ var Tt = class {
|
|
|
745
745
|
return;
|
|
746
746
|
}
|
|
747
747
|
if (this.keepAspectRatio) {
|
|
748
|
-
if (this.unit ===
|
|
748
|
+
if (this.unit === P.Pixel && this.width && this.height) {
|
|
749
749
|
this.aspectRatio = this.width / this.height;
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
if (this.unit ===
|
|
752
|
+
if (this.unit === P.AspectRatio && this.ratioWidth && this.ratioHeight) {
|
|
753
753
|
this.aspectRatio = this.ratioWidth / this.ratioHeight;
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
@@ -777,9 +777,11 @@ var Tt = class {
|
|
|
777
777
|
this.invalidWidth = !0;
|
|
778
778
|
return;
|
|
779
779
|
}
|
|
780
|
-
this.invalidWidth = !1, this.unit ===
|
|
781
|
-
let n = this.unit ===
|
|
782
|
-
this.keepAspectRatio ? n = Math.max(Math.round(t / this.aspectRatio), 1) : this.unit ===
|
|
780
|
+
this.invalidWidth = !1, t = Math.min(t, M), this.unit === P.Pixel && (t = Math.max(Math.min(t, this.maxWidth), 1));
|
|
781
|
+
let n = this.unit === P.Pixel ? this.height : this.ratioHeight, r = !1;
|
|
782
|
+
this.keepAspectRatio ? n = Math.max(Math.round(t / this.aspectRatio), 1) : this.unit === P.AspectRatio && ([t, n] = this.fitRatioSides(t, n, this.maxWidth, this.maxHeight));
|
|
783
|
+
let i = this.getSideMax(this.maxHeight);
|
|
784
|
+
n > i && (n = i, r = this.keepAspectRatio), r ||= this.#a(t, n), e.target.value = t.toString(), this.invalidHeight = !1, this.emit("cx-asset-link-format-crop-change", { detail: {
|
|
783
785
|
breakAspectRatio: r,
|
|
784
786
|
height: n,
|
|
785
787
|
keepAspectRatio: this.keepAspectRatio,
|
|
@@ -793,9 +795,11 @@ var Tt = class {
|
|
|
793
795
|
this.invalidHeight = !0;
|
|
794
796
|
return;
|
|
795
797
|
}
|
|
796
|
-
this.invalidHeight = !1, this.unit ===
|
|
797
|
-
let n = this.unit ===
|
|
798
|
-
this.keepAspectRatio ? n = Math.max(Math.round(t * this.aspectRatio), 1) : this.unit ===
|
|
798
|
+
this.invalidHeight = !1, t = Math.min(t, M), this.unit === P.Pixel && (t = Math.max(Math.min(t, this.maxHeight), 1));
|
|
799
|
+
let n = this.unit === P.Pixel ? this.width : this.ratioWidth, r = !1;
|
|
800
|
+
this.keepAspectRatio ? n = Math.max(Math.round(t * this.aspectRatio), 1) : this.unit === P.AspectRatio && ([t, n] = this.fitRatioSides(t, n, this.maxHeight, this.maxWidth));
|
|
801
|
+
let i = this.getSideMax(this.maxWidth);
|
|
802
|
+
n > i && (n = i, r = this.keepAspectRatio), r ||= this.#a(n, t), e.target.value = t.toString(), this.invalidWidth = !1, this.emit("cx-asset-link-format-crop-change", { detail: {
|
|
799
803
|
breakAspectRatio: r,
|
|
800
804
|
height: t,
|
|
801
805
|
keepAspectRatio: this.keepAspectRatio,
|
|
@@ -806,17 +810,17 @@ var Tt = class {
|
|
|
806
810
|
onCropModeChange(e) {
|
|
807
811
|
let t = e.target.value, n = this.cropModes.find((e) => e.value === t)?.auto;
|
|
808
812
|
if (t === "free") this.selectedMode?.auto && this.emit("cx-asset-link-format-crop-change", { detail: {
|
|
809
|
-
height: this.lastAppliedSetting[
|
|
813
|
+
height: this.lastAppliedSetting[P.Pixel].height,
|
|
810
814
|
keepAspectRatio: !1,
|
|
811
815
|
silent: !0,
|
|
812
|
-
unit:
|
|
813
|
-
width: this.lastAppliedSetting[
|
|
816
|
+
unit: P.Pixel,
|
|
817
|
+
width: this.lastAppliedSetting[P.Pixel].width
|
|
814
818
|
} });
|
|
815
819
|
else if (!n) {
|
|
816
|
-
let [e, n] = t.split(":").map(Number), r = this.unit ===
|
|
820
|
+
let [e, n] = t.split(":").map(Number), r = this.unit === P.Pixel && this.hasMaxSize ? P.Pixel : P.AspectRatio;
|
|
817
821
|
this.emit("cx-asset-link-format-crop-change", { detail: {
|
|
818
|
-
...
|
|
819
|
-
keepAspectRatio: r ===
|
|
822
|
+
...U.getRatioSize(e, n, r, this.maxWidth, this.maxHeight),
|
|
823
|
+
keepAspectRatio: r === P.Pixel || !this.inline,
|
|
820
824
|
silent: !0,
|
|
821
825
|
unit: r
|
|
822
826
|
} });
|
|
@@ -831,7 +835,7 @@ var Tt = class {
|
|
|
831
835
|
this.emit("cx-asset-link-format-crop-position-change", { detail: { position: this.positionPicker.value } });
|
|
832
836
|
}
|
|
833
837
|
onUnitChange(e) {
|
|
834
|
-
let t = e.target.value ===
|
|
838
|
+
let t = e.target.value === P.AspectRatio ? P.AspectRatio : P.Pixel;
|
|
835
839
|
if (this.hasCropper) {
|
|
836
840
|
this.emit("cx-asset-link-format-crop-change", { detail: {
|
|
837
841
|
...this.#i(t),
|
|
@@ -859,21 +863,21 @@ var Tt = class {
|
|
|
859
863
|
if (/^\d+:\d+$/.test(this.cropMode)) {
|
|
860
864
|
let [n, r] = this.cropMode.split(":").map(Number);
|
|
861
865
|
return {
|
|
862
|
-
...
|
|
866
|
+
...U.getRatioSize(n, r, e, this.maxWidth, this.maxHeight),
|
|
863
867
|
keepAspectRatio: t
|
|
864
868
|
};
|
|
865
869
|
}
|
|
866
|
-
return e ===
|
|
870
|
+
return e === P.AspectRatio ? {
|
|
867
871
|
height: this.height,
|
|
868
872
|
keepAspectRatio: t,
|
|
869
873
|
width: this.width
|
|
870
874
|
} : {
|
|
871
|
-
...
|
|
875
|
+
...U.getRatioSize(this.ratioWidth, this.ratioHeight, e, this.maxWidth, this.maxHeight),
|
|
872
876
|
keepAspectRatio: t
|
|
873
877
|
};
|
|
874
878
|
}
|
|
875
879
|
#i(e) {
|
|
876
|
-
if (e ===
|
|
880
|
+
if (e === P.AspectRatio && /^\d+:\d+$/.test(this.cropMode)) {
|
|
877
881
|
let [e, t] = this.cropMode.split(":").map(Number);
|
|
878
882
|
return {
|
|
879
883
|
height: t,
|
|
@@ -904,18 +908,20 @@ var Tt = class {
|
|
|
904
908
|
}
|
|
905
909
|
handleAspectRatioClick() {
|
|
906
910
|
this.emit("cx-asset-link-format-crop-change", { detail: {
|
|
907
|
-
height: this.unit ===
|
|
911
|
+
height: this.unit === P.Pixel ? this.height : this.ratioHeight,
|
|
908
912
|
keepAspectRatio: !this.keepAspectRatio,
|
|
909
913
|
unit: this.unit,
|
|
910
|
-
width: this.unit ===
|
|
914
|
+
width: this.unit === P.Pixel ? this.width : this.ratioWidth
|
|
911
915
|
} });
|
|
912
916
|
}
|
|
917
|
+
getSideMax(e) {
|
|
918
|
+
return this.unit === P.Pixel && e >= 1 ? Math.min(e, M) : M;
|
|
919
|
+
}
|
|
913
920
|
getSizeMaskBlocks(e) {
|
|
914
|
-
let t = this.unit === k.Pixel && e >= 1 ? e : Infinity;
|
|
915
921
|
return { num: {
|
|
916
922
|
autofix: !0,
|
|
917
923
|
mask: Number,
|
|
918
|
-
max:
|
|
924
|
+
max: this.getSideMax(e),
|
|
919
925
|
min: 1,
|
|
920
926
|
radix: ".",
|
|
921
927
|
scale: 0
|
|
@@ -928,111 +934,111 @@ var Tt = class {
|
|
|
928
934
|
}
|
|
929
935
|
#a(e, t) {
|
|
930
936
|
let n = /^(\d+):(\d+)$/.exec(this.cropMode);
|
|
931
|
-
return this.unit ===
|
|
937
|
+
return this.unit === P.Pixel && !this.keepAspectRatio && n !== null && Number(n[1]) * t !== Number(n[2]) * e;
|
|
932
938
|
}
|
|
933
939
|
render() {
|
|
934
940
|
let t = this.cropModes.filter((e) => !e.auto), n = this.cropModes.filter((e) => e.auto);
|
|
935
941
|
return e`<cx-details class="details ${this.inline ? "details--inline" : ""}" ?open=${this.inline || this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${m(!this.noRatioModes, () => e`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${g({ width: "100%" })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${S(t, (e) => e.value, ({ label: t, value: n }) => e`<cx-option value=${n}>${t}</cx-option>`)}
|
|
936
942
|
${m(n.length > 0, () => e`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`)}
|
|
937
|
-
${S(n, (e) => e.value, ({ label: t, value: n }) => e`<cx-option value=${n}>${t}</cx-option>`)}</cx-select>`)}<cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${this.getSizeMaskBlocks(this.maxWidth)} value=${this.unit ===
|
|
943
|
+
${S(n, (e) => e.value, ({ label: t, value: n }) => e`<cx-option value=${n}>${t}</cx-option>`)}</cx-select>`)}<cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${this.getSizeMaskBlocks(this.maxWidth)} value=${this.unit === P.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-change=${this.handleInputChange} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
938
944
|
W
|
|
939
|
-
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} label=${this.localize.term("keepAspectRatio")} .pressed=${this.keepAspectRatio} @click=${this.handleAspectRatioClick} style=${g({ color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0 })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${this.getSizeMaskBlocks(this.maxHeight)} value=${this.unit ===
|
|
945
|
+
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} label=${this.localize.term("keepAspectRatio")} .pressed=${this.keepAspectRatio} @click=${this.handleAspectRatioClick} style=${g({ color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0 })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${this.getSizeMaskBlocks(this.maxHeight)} value=${this.unit === P.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
940
946
|
H
|
|
941
|
-
</cx-typography></cx-input></div>${m(!this.noRatioModes, () => e`<cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${
|
|
947
|
+
</cx-typography></cx-input></div>${m(!this.noRatioModes, () => e`<cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${P.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${P.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`)}</cx-space><div class="crop__limit" data-testid="cx-asset-link-format-crop-dimensions-limit" role="status">${m(this.dimensionsLimited, () => e`<cx-typography variant="small">${this.localize.term("cropLimitedByDimensions", this.maxWidth, this.maxHeight)}</cx-typography>`)}</div>${m(this.focusModes.length > 0, () => e`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${g({ width: "100%" })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${S(this.focusModes, (e) => e.value, ({ label: t, value: n }) => e`<cx-option value=${n}>${t}</cx-option>`)}</cx-select>`)}
|
|
942
948
|
${m(this.showPositionPicker && this.focusMode === "manual", () => e`<cx-position-picker data-testid="cx-asset-link-format-crop-position" value=${this.position} @cx-change=${this.onPositionChange}></cx-position-picker>`)}
|
|
943
949
|
${m(!this.inline, () => e`<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${g({ marginLeft: "auto" })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button>`)}</cx-space></cx-details>`;
|
|
944
950
|
}
|
|
945
951
|
};
|
|
946
|
-
a([c(".details"), o("design:type", E === void 0 ? Object : E)],
|
|
952
|
+
a([c(".details"), o("design:type", E === void 0 ? Object : E)], W.prototype, "base", void 0), a([c("cx-position-picker"), o("design:type", Ae === void 0 ? Object : Ae)], W.prototype, "positionPicker", void 0), a([r({
|
|
947
953
|
reflect: !0,
|
|
948
954
|
type: Boolean
|
|
949
|
-
}), o("design:type", Boolean)],
|
|
955
|
+
}), o("design:type", Boolean)], W.prototype, "open", void 0), a([r({
|
|
950
956
|
reflect: !0,
|
|
951
957
|
type: Boolean
|
|
952
|
-
}), o("design:type", Boolean)],
|
|
958
|
+
}), o("design:type", Boolean)], W.prototype, "inline", void 0), a([r({
|
|
953
959
|
reflect: !0,
|
|
954
960
|
type: Number
|
|
955
|
-
}), o("design:type", Number)],
|
|
961
|
+
}), o("design:type", Number)], W.prototype, "width", void 0), a([r({
|
|
956
962
|
reflect: !0,
|
|
957
963
|
type: Number
|
|
958
|
-
}), o("design:type", Number)],
|
|
964
|
+
}), o("design:type", Number)], W.prototype, "height", void 0), a([r({
|
|
959
965
|
attribute: "max-width",
|
|
960
966
|
reflect: !0,
|
|
961
967
|
type: Number
|
|
962
|
-
}), o("design:type", Number)],
|
|
968
|
+
}), o("design:type", Number)], W.prototype, "maxWidth", void 0), a([r({
|
|
963
969
|
attribute: "max-height",
|
|
964
970
|
reflect: !0,
|
|
965
971
|
type: Number
|
|
966
|
-
}), o("design:type", Number)],
|
|
972
|
+
}), o("design:type", Number)], W.prototype, "maxHeight", void 0), a([r({
|
|
967
973
|
attribute: "ratio-width",
|
|
968
974
|
reflect: !0,
|
|
969
975
|
type: Number
|
|
970
|
-
}), o("design:type", Number)],
|
|
976
|
+
}), o("design:type", Number)], W.prototype, "ratioWidth", void 0), a([r({
|
|
971
977
|
attribute: "ratio-height",
|
|
972
978
|
reflect: !0,
|
|
973
979
|
type: Number
|
|
974
|
-
}), o("design:type", Number)],
|
|
980
|
+
}), o("design:type", Number)], W.prototype, "ratioHeight", void 0), a([r({
|
|
975
981
|
attribute: "percentage-width",
|
|
976
982
|
reflect: !0,
|
|
977
983
|
type: Number
|
|
978
|
-
}), o("design:type", Number)],
|
|
984
|
+
}), o("design:type", Number)], W.prototype, "percentageWidth", void 0), a([r({
|
|
979
985
|
attribute: "percentage-height",
|
|
980
986
|
reflect: !0,
|
|
981
987
|
type: Number
|
|
982
|
-
}), o("design:type", Number)],
|
|
988
|
+
}), o("design:type", Number)], W.prototype, "percentageHeight", void 0), a([r({
|
|
983
989
|
reflect: !0,
|
|
984
990
|
type: String
|
|
985
|
-
}), o("design:type",
|
|
991
|
+
}), o("design:type", P === void 0 ? Object : P)], W.prototype, "unit", void 0), a([r({
|
|
986
992
|
attribute: "disabled-apply",
|
|
987
993
|
reflect: !0,
|
|
988
994
|
type: Boolean
|
|
989
|
-
}), o("design:type", Boolean)],
|
|
995
|
+
}), o("design:type", Boolean)], W.prototype, "disabledApply", void 0), a([r({
|
|
990
996
|
attribute: "no-ratio-modes",
|
|
991
997
|
reflect: !0,
|
|
992
998
|
type: Boolean
|
|
993
|
-
}), o("design:type", Boolean)],
|
|
999
|
+
}), o("design:type", Boolean)], W.prototype, "noRatioModes", void 0), a([r({
|
|
994
1000
|
attribute: "show-position-picker",
|
|
995
1001
|
reflect: !0,
|
|
996
1002
|
type: Boolean
|
|
997
|
-
}), o("design:type", Boolean)],
|
|
1003
|
+
}), o("design:type", Boolean)], W.prototype, "showPositionPicker", void 0), a([r({
|
|
998
1004
|
attribute: "has-cropper",
|
|
999
1005
|
reflect: !0,
|
|
1000
1006
|
type: Boolean
|
|
1001
|
-
}), o("design:type", Boolean)],
|
|
1007
|
+
}), o("design:type", Boolean)], W.prototype, "hasCropper", void 0), a([r({
|
|
1002
1008
|
attribute: "dimensions-limited",
|
|
1003
1009
|
reflect: !0,
|
|
1004
1010
|
type: Boolean
|
|
1005
|
-
}), o("design:type", Boolean)],
|
|
1011
|
+
}), o("design:type", Boolean)], W.prototype, "dimensionsLimited", void 0), a([r({
|
|
1006
1012
|
attribute: "last-applied-setting",
|
|
1007
1013
|
reflect: !1,
|
|
1008
1014
|
type: Object
|
|
1009
|
-
}), o("design:type", typeof Record > "u" ? Object : Record)],
|
|
1015
|
+
}), o("design:type", typeof Record > "u" ? Object : Record)], W.prototype, "lastAppliedSetting", void 0), a([r({
|
|
1010
1016
|
reflect: !0,
|
|
1011
1017
|
type: Boolean
|
|
1012
|
-
}), o("design:type", Boolean)],
|
|
1018
|
+
}), o("design:type", Boolean)], W.prototype, "loading", void 0), a([r({
|
|
1013
1019
|
attribute: "crop-modes",
|
|
1014
1020
|
reflect: !1,
|
|
1015
1021
|
type: Array
|
|
1016
|
-
}), o("design:type", Array)],
|
|
1022
|
+
}), o("design:type", Array)], W.prototype, "cropModes", void 0), a([r({
|
|
1017
1023
|
attribute: "focus-modes",
|
|
1018
1024
|
reflect: !1,
|
|
1019
1025
|
type: Object
|
|
1020
|
-
}), o("design:type", Array)],
|
|
1026
|
+
}), o("design:type", Array)], W.prototype, "focusModes", void 0), a([r({
|
|
1021
1027
|
attribute: "focus-mode",
|
|
1022
1028
|
reflect: !0,
|
|
1023
1029
|
type: String
|
|
1024
|
-
}), o("design:type", String)],
|
|
1030
|
+
}), o("design:type", String)], W.prototype, "focusMode", void 0), a([r({
|
|
1025
1031
|
attribute: "crop-mode",
|
|
1026
1032
|
reflect: !0,
|
|
1027
1033
|
type: String
|
|
1028
|
-
}), o("design:type", String)],
|
|
1034
|
+
}), o("design:type", String)], W.prototype, "cropMode", void 0), a([r({
|
|
1029
1035
|
reflect: !0,
|
|
1030
1036
|
type: String
|
|
1031
|
-
}), o("design:type", v === void 0 ? Object : v)],
|
|
1037
|
+
}), o("design:type", v === void 0 ? Object : v)], W.prototype, "position", void 0), a([r({
|
|
1032
1038
|
attribute: "keep-aspect-ratio",
|
|
1033
1039
|
reflect: !0,
|
|
1034
1040
|
type: Boolean
|
|
1035
|
-
}), o("design:type", Boolean)],
|
|
1041
|
+
}), o("design:type", Boolean)], W.prototype, "keepAspectRatio", void 0), a([i(), o("design:type", Boolean)], W.prototype, "invalidWidth", void 0), a([i(), o("design:type", Boolean)], W.prototype, "invalidHeight", void 0), a([i(), o("design:type", Number)], W.prototype, "aspectRatio", void 0), a([
|
|
1036
1042
|
f("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1037
1043
|
f("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1038
1044
|
f("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
@@ -1040,13 +1046,13 @@ a([c(".details"), o("design:type", E === void 0 ? Object : E)], U.prototype, "ba
|
|
|
1040
1046
|
o("design:type", Function),
|
|
1041
1047
|
o("design:paramtypes", []),
|
|
1042
1048
|
o("design:returntype", Promise)
|
|
1043
|
-
],
|
|
1049
|
+
], W.prototype, "handleCropModeChange", null), a([
|
|
1044
1050
|
f("open", { waitUntilFirstUpdate: !0 }),
|
|
1045
1051
|
o("design:type", Function),
|
|
1046
1052
|
o("design:paramtypes", []),
|
|
1047
1053
|
o("design:returntype", Promise)
|
|
1048
|
-
],
|
|
1049
|
-
var Ot =
|
|
1054
|
+
], W.prototype, "handleOpenChange", null), W = U = a([u("cx-asset-link-format-crop")], W);
|
|
1055
|
+
var Ot = W, kt = t`:host{display:block}.asset-link-format__dimensions-select{width:100%}.details::part(base){border-bottom-width:0}.asset-link-format__dimensions-inline{padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__dimensions-inline .asset-link-format__dimensions-summary{margin-block-end:var(--cx-spacing-small)}.asset-link-format__dimensions-inline .asset-link-format__dimensions-summary cx-typography{--font-weight:var(--cx-font-weight-medium)}.asset-link-format__dimensions-custom{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,7rem);align-items:center;display:grid}.asset-link-format__dimensions-custom cx-input,.asset-link-format__dimensions-custom cx-select{min-width:0}.asset-link-format__dimensions-apply{margin-inline-start:auto}`, At = {
|
|
1050
1056
|
[A.Percent]: { num: {
|
|
1051
1057
|
mask: Number,
|
|
1052
1058
|
min: 1,
|
|
@@ -1054,12 +1060,14 @@ var Ot = U, kt = t`:host{display:block}.asset-link-format__dimensions-select{wid
|
|
|
1054
1060
|
scale: 2
|
|
1055
1061
|
} },
|
|
1056
1062
|
[A.Pixel]: { num: {
|
|
1063
|
+
autofix: !0,
|
|
1057
1064
|
mask: Number,
|
|
1065
|
+
max: M,
|
|
1058
1066
|
min: 1,
|
|
1059
1067
|
radix: ".",
|
|
1060
1068
|
scale: 0
|
|
1061
1069
|
} }
|
|
1062
|
-
},
|
|
1070
|
+
}, G = class extends s {
|
|
1063
1071
|
constructor(...e) {
|
|
1064
1072
|
super(...e), this.localize = new d(this), this.open = !1, this.inline = !1, this.applyBehavior = N.Legacy, this.loading = !1, this.items = [], this.canCustom = !1, this.customDimensionsUnit = A.Pixel, this.dimensionsSelection = "", this.customDimensionsDrafts = {
|
|
1065
1073
|
[A.Percent]: {
|
|
@@ -1191,32 +1199,32 @@ var Ot = U, kt = t`:host{display:block}.asset-link-format__dimensions-select{wid
|
|
|
1191
1199
|
a([r({
|
|
1192
1200
|
reflect: !0,
|
|
1193
1201
|
type: Boolean
|
|
1194
|
-
}), o("design:type", Object)],
|
|
1202
|
+
}), o("design:type", Object)], G.prototype, "open", void 0), a([r({
|
|
1195
1203
|
reflect: !0,
|
|
1196
1204
|
type: Boolean
|
|
1197
|
-
}), o("design:type", Object)],
|
|
1205
|
+
}), o("design:type", Object)], G.prototype, "inline", void 0), a([r({
|
|
1198
1206
|
attribute: "apply-behavior",
|
|
1199
1207
|
reflect: !0,
|
|
1200
1208
|
type: String
|
|
1201
|
-
}), o("design:type", Object)],
|
|
1209
|
+
}), o("design:type", Object)], G.prototype, "applyBehavior", void 0), a([r({
|
|
1202
1210
|
reflect: !0,
|
|
1203
1211
|
type: Boolean
|
|
1204
|
-
}), o("design:type", Object)],
|
|
1212
|
+
}), o("design:type", Object)], G.prototype, "loading", void 0), a([r({
|
|
1205
1213
|
attribute: !1,
|
|
1206
1214
|
type: Array
|
|
1207
|
-
}), o("design:type", Array)],
|
|
1215
|
+
}), o("design:type", Array)], G.prototype, "items", void 0), a([r({
|
|
1208
1216
|
attribute: "can-custom",
|
|
1209
1217
|
type: Boolean
|
|
1210
|
-
}), o("design:type", Object)],
|
|
1218
|
+
}), o("design:type", Object)], G.prototype, "canCustom", void 0), a([r({
|
|
1211
1219
|
attribute: !1,
|
|
1212
1220
|
type: Object
|
|
1213
|
-
}), o("design:type", Object)],
|
|
1221
|
+
}), o("design:type", Object)], G.prototype, "value", void 0), a([i(), o("design:type", Object)], G.prototype, "customDimensionsUnit", void 0), a([i(), o("design:type", Object)], G.prototype, "dimensionsSelection", void 0), a([i(), o("design:type", Object)], G.prototype, "customDimensionsDrafts", void 0), a([
|
|
1214
1222
|
f("value"),
|
|
1215
1223
|
o("design:type", Function),
|
|
1216
1224
|
o("design:paramtypes", []),
|
|
1217
1225
|
o("design:returntype", void 0)
|
|
1218
|
-
],
|
|
1219
|
-
var jt =
|
|
1226
|
+
], G.prototype, "handleDimensionsValueChange", null), G = a([u("cx-asset-link-format-dimensions")], G);
|
|
1227
|
+
var jt = G, Mt = t`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`, K = class extends s {
|
|
1220
1228
|
constructor(...e) {
|
|
1221
1229
|
super(...e), this.localize = new d(this), this.value = "", this.items = [];
|
|
1222
1230
|
}
|
|
@@ -1238,11 +1246,11 @@ var jt = W, Mt = t`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-m
|
|
|
1238
1246
|
a([r({
|
|
1239
1247
|
reflect: !0,
|
|
1240
1248
|
type: String
|
|
1241
|
-
}), o("design:type", String)],
|
|
1249
|
+
}), o("design:type", String)], K.prototype, "value", void 0), a([r({
|
|
1242
1250
|
reflect: !1,
|
|
1243
1251
|
type: Array
|
|
1244
|
-
}), o("design:type", typeof Array > "u" ? Object : Array)],
|
|
1245
|
-
var Nt =
|
|
1252
|
+
}), o("design:type", typeof Array > "u" ? Object : Array)], K.prototype, "items", void 0), K = a([u("cx-asset-link-format-extension")], K);
|
|
1253
|
+
var Nt = K, Pt = t`cx-details::part(base){border-bottom-width:0}`, Ft = "auto", q = class extends s {
|
|
1246
1254
|
constructor(...e) {
|
|
1247
1255
|
super(...e), this.localize = new d(this), this.open = !1, this.value = "", this.items = [], this.canAutoFormat = !1, this.autoFormat = !1, this.loading = !1, this.scopedValue = "";
|
|
1248
1256
|
}
|
|
@@ -1293,39 +1301,39 @@ var Nt = G, Pt = t`cx-details::part(base){border-bottom-width:0}`, Ft = "auto",
|
|
|
1293
1301
|
${m(this.canAutoFormat, () => e`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${Ft}>${this.localize.term("auto")}</cx-option>`, () => n)}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${g({ "margin-left": "auto" })} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1294
1302
|
}
|
|
1295
1303
|
};
|
|
1296
|
-
a([c(".details"), o("design:type", E === void 0 ? Object : E)],
|
|
1304
|
+
a([c(".details"), o("design:type", E === void 0 ? Object : E)], q.prototype, "base", void 0), a([r({
|
|
1297
1305
|
reflect: !0,
|
|
1298
1306
|
type: Boolean
|
|
1299
|
-
}), o("design:type", Object)],
|
|
1307
|
+
}), o("design:type", Object)], q.prototype, "open", void 0), a([r({
|
|
1300
1308
|
reflect: !0,
|
|
1301
1309
|
type: String
|
|
1302
|
-
}), o("design:type", Object)],
|
|
1310
|
+
}), o("design:type", Object)], q.prototype, "value", void 0), a([r({
|
|
1303
1311
|
reflect: !1,
|
|
1304
1312
|
type: Array
|
|
1305
|
-
}), o("design:type", Array)],
|
|
1313
|
+
}), o("design:type", Array)], q.prototype, "items", void 0), a([r({
|
|
1306
1314
|
attribute: "can-auto-format",
|
|
1307
1315
|
reflect: !0,
|
|
1308
1316
|
type: Boolean
|
|
1309
|
-
}), o("design:type", Object)],
|
|
1317
|
+
}), o("design:type", Object)], q.prototype, "canAutoFormat", void 0), a([r({
|
|
1310
1318
|
attribute: "auto-format",
|
|
1311
1319
|
reflect: !0,
|
|
1312
1320
|
type: Boolean
|
|
1313
|
-
}), o("design:type", Object)],
|
|
1321
|
+
}), o("design:type", Object)], q.prototype, "autoFormat", void 0), a([r({
|
|
1314
1322
|
reflect: !0,
|
|
1315
1323
|
type: Boolean
|
|
1316
|
-
}), o("design:type", Object)],
|
|
1324
|
+
}), o("design:type", Object)], q.prototype, "loading", void 0), a([i(), o("design:type", Object)], q.prototype, "scopedValue", void 0), a([
|
|
1317
1325
|
f("autoFormat"),
|
|
1318
1326
|
f("value"),
|
|
1319
1327
|
o("design:type", Function),
|
|
1320
1328
|
o("design:paramtypes", []),
|
|
1321
1329
|
o("design:returntype", void 0)
|
|
1322
|
-
],
|
|
1330
|
+
], q.prototype, "handleValueChange", null), a([
|
|
1323
1331
|
f("open", { waitUntilFirstUpdate: !0 }),
|
|
1324
1332
|
o("design:type", Function),
|
|
1325
1333
|
o("design:paramtypes", []),
|
|
1326
1334
|
o("design:returntype", void 0)
|
|
1327
|
-
],
|
|
1328
|
-
var It =
|
|
1335
|
+
], q.prototype, "handleOpenChange", null), q = a([u("cx-asset-link-format-proxy")], q);
|
|
1336
|
+
var It = q, Lt = t`cx-details::part(base){border-bottom-width:0}.asset-link-format__quality-inline{padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__quality-inline .asset-link-format__quality-summary{margin-block-end:var(--cx-spacing-small)}.asset-link-format__quality-inline .asset-link-format__quality-summary cx-typography{--font-weight:var(--cx-font-weight-medium)}.asset-link-format__quality-apply{margin-inline-start:auto}`, J = class extends s {
|
|
1329
1337
|
constructor(...e) {
|
|
1330
1338
|
super(...e), this.localize = new d(this), this.open = !1, this.inline = !1, this.applyBehavior = N.Legacy, this.value = 100, this.items = [], this.customSelected = !1, this.loading = !1, this.scopedValue = 100;
|
|
1331
1339
|
}
|
|
@@ -1399,39 +1407,46 @@ var It = K, Lt = t`cx-details::part(base){border-bottom-width:0}.asset-link-form
|
|
|
1399
1407
|
${this.renderContent()}</div>` : e`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><div slot="summary">${this.renderSummary()}</div>${this.renderContent()}</cx-details>`;
|
|
1400
1408
|
}
|
|
1401
1409
|
};
|
|
1402
|
-
a([c(".details"), o("design:type", E === void 0 ? Object : E)],
|
|
1410
|
+
a([c(".details"), o("design:type", E === void 0 ? Object : E)], J.prototype, "base", void 0), a([r({
|
|
1403
1411
|
reflect: !0,
|
|
1404
1412
|
type: Boolean
|
|
1405
|
-
}), o("design:type", Object)],
|
|
1413
|
+
}), o("design:type", Object)], J.prototype, "open", void 0), a([r({
|
|
1406
1414
|
reflect: !0,
|
|
1407
1415
|
type: Boolean
|
|
1408
|
-
}), o("design:type", Object)],
|
|
1416
|
+
}), o("design:type", Object)], J.prototype, "inline", void 0), a([r({
|
|
1409
1417
|
attribute: "apply-behavior",
|
|
1410
1418
|
reflect: !0,
|
|
1411
1419
|
type: String
|
|
1412
|
-
}), o("design:type", Object)],
|
|
1420
|
+
}), o("design:type", Object)], J.prototype, "applyBehavior", void 0), a([r({
|
|
1413
1421
|
reflect: !0,
|
|
1414
1422
|
type: Number
|
|
1415
|
-
}), o("design:type", Object)],
|
|
1423
|
+
}), o("design:type", Object)], J.prototype, "value", void 0), a([r({
|
|
1416
1424
|
attribute: !1,
|
|
1417
1425
|
type: Array
|
|
1418
|
-
}), o("design:type", Array)],
|
|
1426
|
+
}), o("design:type", Array)], J.prototype, "items", void 0), a([i(), o("design:type", Object)], J.prototype, "customSelected", void 0), a([r({
|
|
1419
1427
|
reflect: !0,
|
|
1420
1428
|
type: Boolean
|
|
1421
|
-
}), o("design:type", Object)],
|
|
1429
|
+
}), o("design:type", Object)], J.prototype, "loading", void 0), a([i(), o("design:type", Object)], J.prototype, "scopedValue", void 0), a([
|
|
1422
1430
|
f("value"),
|
|
1423
1431
|
o("design:type", Function),
|
|
1424
1432
|
o("design:paramtypes", []),
|
|
1425
1433
|
o("design:returntype", void 0)
|
|
1426
|
-
],
|
|
1427
|
-
var Rt =
|
|
1434
|
+
], J.prototype, "handleValueChange", null), J = a([u("cx-asset-link-format-quality")], J);
|
|
1435
|
+
var Rt = J, zt = t`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`, Bt = { num: {
|
|
1436
|
+
autofix: !0,
|
|
1437
|
+
mask: Number,
|
|
1438
|
+
max: M,
|
|
1439
|
+
min: 1,
|
|
1440
|
+
radix: ".",
|
|
1441
|
+
scale: 0
|
|
1442
|
+
} }, Y = class extends s {
|
|
1428
1443
|
constructor(...e) {
|
|
1429
|
-
super(...e), this.localize = new d(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit =
|
|
1430
|
-
[
|
|
1444
|
+
super(...e), this.localize = new d(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = P.Pixel, this.lastAppliedSetting = {
|
|
1445
|
+
[P.Pixel]: {
|
|
1431
1446
|
height: 0,
|
|
1432
1447
|
width: 0
|
|
1433
1448
|
},
|
|
1434
|
-
[
|
|
1449
|
+
[P.AspectRatio]: {
|
|
1435
1450
|
height: 1,
|
|
1436
1451
|
width: 1
|
|
1437
1452
|
}
|
|
@@ -1455,11 +1470,11 @@ var Rt = q, zt = t`cx-details::part(base){border-bottom-width:0}cx-space{width:1
|
|
|
1455
1470
|
async handleCropModeChange() {
|
|
1456
1471
|
let e = Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && this.maxWidth > 0 && this.maxHeight > 0;
|
|
1457
1472
|
if (this.keepAspectRatio) {
|
|
1458
|
-
if (this.unit ===
|
|
1473
|
+
if (this.unit === P.AspectRatio && this.ratioWidth && this.ratioHeight) {
|
|
1459
1474
|
this.aspectRatio = this.ratioWidth / this.ratioHeight;
|
|
1460
1475
|
return;
|
|
1461
1476
|
}
|
|
1462
|
-
if (this.unit ===
|
|
1477
|
+
if (this.unit === P.Pixel && !e && this.width && this.height) {
|
|
1463
1478
|
this.aspectRatio = this.width / this.height;
|
|
1464
1479
|
return;
|
|
1465
1480
|
}
|
|
@@ -1487,9 +1502,9 @@ var Rt = q, zt = t`cx-details::part(base){border-bottom-width:0}cx-space{width:1
|
|
|
1487
1502
|
this.invalidWidth = !0;
|
|
1488
1503
|
return;
|
|
1489
1504
|
}
|
|
1490
|
-
this.invalidWidth = !1, this.unit ===
|
|
1491
|
-
let n = this.unit ===
|
|
1492
|
-
!this.keepAspectRatio && this.unit ===
|
|
1505
|
+
this.invalidWidth = !1, t = Math.min(t, M), this.unit === P.Pixel && (t = Math.max(Math.min(t, this.maxWidth), 1));
|
|
1506
|
+
let n = this.unit === P.Pixel ? this.height : this.ratioHeight;
|
|
1507
|
+
!this.keepAspectRatio && this.unit === P.AspectRatio && ([t, n] = this.fitRatioSides(t, n, this.maxWidth, this.maxHeight)), e.target.value = t.toString(), this.keepAspectRatio && (n = Math.max(Math.min(Math.round(t / this.aspectRatio), this.maxHeight, M), 1), this.invalidHeight = !1), this.emit("cx-asset-link-format-resize-change", { detail: {
|
|
1493
1508
|
height: n,
|
|
1494
1509
|
keepAspectRatio: this.keepAspectRatio,
|
|
1495
1510
|
unit: this.unit,
|
|
@@ -1502,9 +1517,9 @@ var Rt = q, zt = t`cx-details::part(base){border-bottom-width:0}cx-space{width:1
|
|
|
1502
1517
|
this.invalidHeight = !0;
|
|
1503
1518
|
return;
|
|
1504
1519
|
}
|
|
1505
|
-
this.invalidHeight = !1, this.unit ===
|
|
1506
|
-
let n = this.unit ===
|
|
1507
|
-
!this.keepAspectRatio && this.unit ===
|
|
1520
|
+
this.invalidHeight = !1, t = Math.min(t, M), this.unit === P.Pixel && (t = Math.max(Math.min(t, this.maxHeight), 1));
|
|
1521
|
+
let n = this.unit === P.Pixel ? this.width : this.ratioWidth;
|
|
1522
|
+
!this.keepAspectRatio && this.unit === P.AspectRatio && ([t, n] = this.fitRatioSides(t, n, this.maxHeight, this.maxWidth)), e.target.value = t.toString(), this.keepAspectRatio && (n = Math.max(Math.min(Math.round(t * this.aspectRatio), this.maxWidth, M), 1), this.invalidWidth = !1), this.emit("cx-asset-link-format-resize-change", { detail: {
|
|
1508
1523
|
height: t,
|
|
1509
1524
|
keepAspectRatio: this.keepAspectRatio,
|
|
1510
1525
|
unit: this.unit,
|
|
@@ -1512,16 +1527,16 @@ var Rt = q, zt = t`cx-details::part(base){border-bottom-width:0}cx-space{width:1
|
|
|
1512
1527
|
} });
|
|
1513
1528
|
}
|
|
1514
1529
|
onUnitChange(e) {
|
|
1515
|
-
e.target.value ===
|
|
1516
|
-
height: this.lastAppliedSetting[
|
|
1530
|
+
e.target.value === P.AspectRatio ? this.emit("cx-asset-link-format-resize-change", { detail: {
|
|
1531
|
+
height: this.lastAppliedSetting[P.AspectRatio].height,
|
|
1517
1532
|
keepAspectRatio: this.keepAspectRatio,
|
|
1518
|
-
unit:
|
|
1519
|
-
width: this.lastAppliedSetting[
|
|
1533
|
+
unit: P.AspectRatio,
|
|
1534
|
+
width: this.lastAppliedSetting[P.AspectRatio].width
|
|
1520
1535
|
} }) : this.emit("cx-asset-link-format-resize-change", { detail: {
|
|
1521
|
-
height: this.lastAppliedSetting[
|
|
1536
|
+
height: this.lastAppliedSetting[P.Pixel].height,
|
|
1522
1537
|
keepAspectRatio: this.keepAspectRatio,
|
|
1523
|
-
unit:
|
|
1524
|
-
width: this.lastAppliedSetting[
|
|
1538
|
+
unit: P.Pixel,
|
|
1539
|
+
width: this.lastAppliedSetting[P.Pixel].width
|
|
1525
1540
|
} });
|
|
1526
1541
|
}
|
|
1527
1542
|
handleApply() {
|
|
@@ -1539,10 +1554,10 @@ var Rt = q, zt = t`cx-details::part(base){border-bottom-width:0}cx-space{width:1
|
|
|
1539
1554
|
}
|
|
1540
1555
|
handleAspectRatioClick() {
|
|
1541
1556
|
this.emit("cx-asset-link-format-resize-change", { detail: {
|
|
1542
|
-
height: this.unit ===
|
|
1557
|
+
height: this.unit === P.Pixel ? this.height : this.ratioHeight,
|
|
1543
1558
|
keepAspectRatio: !this.keepAspectRatio,
|
|
1544
1559
|
unit: this.unit,
|
|
1545
|
-
width: this.unit ===
|
|
1560
|
+
width: this.unit === P.Pixel ? this.width : this.ratioWidth
|
|
1546
1561
|
} });
|
|
1547
1562
|
}
|
|
1548
1563
|
fitRatioSides(e, t, n, r) {
|
|
@@ -1551,67 +1566,57 @@ var Rt = q, zt = t`cx-details::part(base){border-bottom-width:0}cx-space{width:1
|
|
|
1551
1566
|
return [i, Math.min(t, r * i)];
|
|
1552
1567
|
}
|
|
1553
1568
|
render() {
|
|
1554
|
-
return e`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{
|
|
1555
|
-
mask: Number,
|
|
1556
|
-
min: 1,
|
|
1557
|
-
radix: ".",
|
|
1558
|
-
scale: 0
|
|
1559
|
-
} }} value=${this.unit === k.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1569
|
+
return e`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${Bt} value=${this.unit === P.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1560
1570
|
W
|
|
1561
|
-
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} label=${this.localize.term("keepAspectRatio")} .pressed=${this.keepAspectRatio} @click=${this.handleAspectRatioClick} style=${g({ color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0 })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{
|
|
1562
|
-
mask: Number,
|
|
1563
|
-
min: 1,
|
|
1564
|
-
radix: ".",
|
|
1565
|
-
scale: 0
|
|
1566
|
-
} }} value=${this.unit === k.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1571
|
+
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} label=${this.localize.term("keepAspectRatio")} .pressed=${this.keepAspectRatio} @click=${this.handleAspectRatioClick} style=${g({ color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0 })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${Bt} value=${this.unit === P.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1567
1572
|
H
|
|
1568
|
-
</cx-typography></cx-input></div>${m(!this.noRatioModes, () => e`<cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${
|
|
1573
|
+
</cx-typography></cx-input></div>${m(!this.noRatioModes, () => e`<cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${P.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${P.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`)}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${g({ marginLeft: "auto" })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1569
1574
|
}
|
|
1570
1575
|
};
|
|
1571
|
-
a([c(".details"), o("design:type", E === void 0 ? Object : E)],
|
|
1576
|
+
a([c(".details"), o("design:type", E === void 0 ? Object : E)], Y.prototype, "base", void 0), a([r({
|
|
1572
1577
|
reflect: !0,
|
|
1573
1578
|
type: Boolean
|
|
1574
|
-
}), o("design:type", Boolean)],
|
|
1579
|
+
}), o("design:type", Boolean)], Y.prototype, "open", void 0), a([r({
|
|
1575
1580
|
reflect: !0,
|
|
1576
1581
|
type: Number
|
|
1577
|
-
}), o("design:type", Number)],
|
|
1582
|
+
}), o("design:type", Number)], Y.prototype, "width", void 0), a([r({
|
|
1578
1583
|
reflect: !0,
|
|
1579
1584
|
type: Number
|
|
1580
|
-
}), o("design:type", Number)],
|
|
1585
|
+
}), o("design:type", Number)], Y.prototype, "height", void 0), a([r({
|
|
1581
1586
|
attribute: "max-width",
|
|
1582
1587
|
reflect: !0,
|
|
1583
1588
|
type: Number
|
|
1584
|
-
}), o("design:type", Number)],
|
|
1589
|
+
}), o("design:type", Number)], Y.prototype, "maxWidth", void 0), a([r({
|
|
1585
1590
|
attribute: "max-height",
|
|
1586
1591
|
reflect: !0,
|
|
1587
1592
|
type: Number
|
|
1588
|
-
}), o("design:type", Number)],
|
|
1593
|
+
}), o("design:type", Number)], Y.prototype, "maxHeight", void 0), a([r({
|
|
1589
1594
|
attribute: "ratio-width",
|
|
1590
1595
|
reflect: !0,
|
|
1591
1596
|
type: Number
|
|
1592
|
-
}), o("design:type", Number)],
|
|
1597
|
+
}), o("design:type", Number)], Y.prototype, "ratioWidth", void 0), a([r({
|
|
1593
1598
|
attribute: "ratio-height",
|
|
1594
1599
|
reflect: !0,
|
|
1595
1600
|
type: Number
|
|
1596
|
-
}), o("design:type", Number)],
|
|
1601
|
+
}), o("design:type", Number)], Y.prototype, "ratioHeight", void 0), a([r({
|
|
1597
1602
|
reflect: !0,
|
|
1598
1603
|
type: String
|
|
1599
|
-
}), o("design:type",
|
|
1604
|
+
}), o("design:type", P === void 0 ? Object : P)], Y.prototype, "unit", void 0), a([r({
|
|
1600
1605
|
attribute: "last-applied-setting",
|
|
1601
1606
|
reflect: !1,
|
|
1602
1607
|
type: Object
|
|
1603
|
-
}), o("design:type", typeof Record > "u" ? Object : Record)],
|
|
1608
|
+
}), o("design:type", typeof Record > "u" ? Object : Record)], Y.prototype, "lastAppliedSetting", void 0), a([r({
|
|
1604
1609
|
reflect: !0,
|
|
1605
1610
|
type: Boolean
|
|
1606
|
-
}), o("design:type", Boolean)],
|
|
1611
|
+
}), o("design:type", Boolean)], Y.prototype, "loading", void 0), a([r({
|
|
1607
1612
|
attribute: "no-ratio-modes",
|
|
1608
1613
|
reflect: !0,
|
|
1609
1614
|
type: Boolean
|
|
1610
|
-
}), o("design:type", Boolean)],
|
|
1615
|
+
}), o("design:type", Boolean)], Y.prototype, "noRatioModes", void 0), a([r({
|
|
1611
1616
|
attribute: "keep-aspect-ratio",
|
|
1612
1617
|
reflect: !0,
|
|
1613
1618
|
type: Boolean
|
|
1614
|
-
}), o("design:type", Boolean)],
|
|
1619
|
+
}), o("design:type", Boolean)], Y.prototype, "keepAspectRatio", void 0), a([i(), o("design:type", Boolean)], Y.prototype, "invalidWidth", void 0), a([i(), o("design:type", Boolean)], Y.prototype, "invalidHeight", void 0), a([i(), o("design:type", Number)], Y.prototype, "aspectRatio", void 0), a([
|
|
1615
1620
|
f("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1616
1621
|
f("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1617
1622
|
f("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
@@ -1619,17 +1624,17 @@ a([c(".details"), o("design:type", E === void 0 ? Object : E)], J.prototype, "ba
|
|
|
1619
1624
|
o("design:type", Function),
|
|
1620
1625
|
o("design:paramtypes", []),
|
|
1621
1626
|
o("design:returntype", Promise)
|
|
1622
|
-
],
|
|
1627
|
+
], Y.prototype, "handleCropModeChange", null), a([
|
|
1623
1628
|
f("open", { waitUntilFirstUpdate: !0 }),
|
|
1624
1629
|
o("design:type", Function),
|
|
1625
1630
|
o("design:paramtypes", []),
|
|
1626
1631
|
o("design:returntype", Promise)
|
|
1627
|
-
],
|
|
1628
|
-
var
|
|
1632
|
+
], Y.prototype, "handleOpenChange", null), Y = a([u("cx-asset-link-format-resize")], Y);
|
|
1633
|
+
var Vt = Y, Ht = t`cx-details::part(base){border-bottom-width:0}.asset-link-format__rotation-inline{padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__rotation-inline .asset-link-format__rotation-summary{margin-block-end:var(--cx-spacing-small)}.asset-link-format__rotation-inline .asset-link-format__rotation-summary cx-typography{--font-weight:var(--cx-font-weight-medium)}`, X = class extends s {
|
|
1629
1634
|
constructor(...e) {
|
|
1630
1635
|
super(...e), this.localize = new d(this), this.open = !1, this.inline = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
|
|
1631
1636
|
}
|
|
1632
|
-
static #e = this.styles = [l,
|
|
1637
|
+
static #e = this.styles = [l, Ht];
|
|
1633
1638
|
static #t = this.dependencies = {
|
|
1634
1639
|
"cx-button": _,
|
|
1635
1640
|
"cx-button-group": ae,
|
|
@@ -1681,37 +1686,37 @@ var Bt = J, Vt = t`cx-details::part(base){border-bottom-width:0}.asset-link-form
|
|
|
1681
1686
|
${this.renderControls()}</div>` : e`<cx-details class="details" ?open=${this.open}><div slot="summary">${this.renderSummary()}</div>${this.renderControls()}</cx-details>`;
|
|
1682
1687
|
}
|
|
1683
1688
|
};
|
|
1684
|
-
a([c(".details"), o("design:type", E === void 0 ? Object : E)],
|
|
1689
|
+
a([c(".details"), o("design:type", E === void 0 ? Object : E)], X.prototype, "base", void 0), a([r({
|
|
1685
1690
|
reflect: !0,
|
|
1686
1691
|
type: Boolean
|
|
1687
|
-
}), o("design:type", Object)],
|
|
1692
|
+
}), o("design:type", Object)], X.prototype, "open", void 0), a([r({
|
|
1688
1693
|
reflect: !0,
|
|
1689
1694
|
type: Boolean
|
|
1690
|
-
}), o("design:type", Object)],
|
|
1695
|
+
}), o("design:type", Object)], X.prototype, "inline", void 0), a([r({
|
|
1691
1696
|
reflect: !0,
|
|
1692
1697
|
type: Number
|
|
1693
|
-
}), o("design:type", Object)],
|
|
1698
|
+
}), o("design:type", Object)], X.prototype, "value", void 0), a([r({
|
|
1694
1699
|
attribute: "default-value",
|
|
1695
1700
|
reflect: !0,
|
|
1696
1701
|
type: Number
|
|
1697
|
-
}), o("design:type", Object)],
|
|
1702
|
+
}), o("design:type", Object)], X.prototype, "defaultValue", void 0), a([r({
|
|
1698
1703
|
reflect: !0,
|
|
1699
1704
|
type: Boolean
|
|
1700
|
-
}), o("design:type", Object)],
|
|
1705
|
+
}), o("design:type", Object)], X.prototype, "loading", void 0), a([r({
|
|
1701
1706
|
attribute: "last-applied-value",
|
|
1702
1707
|
reflect: !0,
|
|
1703
1708
|
type: Number
|
|
1704
|
-
}), o("design:type", Object)],
|
|
1709
|
+
}), o("design:type", Object)], X.prototype, "lastAppliedValue", void 0), a([
|
|
1705
1710
|
f("open", { waitUntilFirstUpdate: !0 }),
|
|
1706
1711
|
o("design:type", Function),
|
|
1707
1712
|
o("design:paramtypes", []),
|
|
1708
1713
|
o("design:returntype", void 0)
|
|
1709
|
-
],
|
|
1710
|
-
var
|
|
1714
|
+
], X.prototype, "handleOpenChange", null), X = a([u("cx-asset-link-format-rotation")], X);
|
|
1715
|
+
var Ut = X, Wt = t`cx-details::part(base){border-bottom-width:0}`, Z = class extends s {
|
|
1711
1716
|
constructor(...e) {
|
|
1712
1717
|
super(...e), this.localize = new d(this), this.open = !1, this.value = !1;
|
|
1713
1718
|
}
|
|
1714
|
-
static #e = this.styles = [l,
|
|
1719
|
+
static #e = this.styles = [l, Wt];
|
|
1715
1720
|
static #t = this.dependencies = {
|
|
1716
1721
|
"cx-button": _,
|
|
1717
1722
|
"cx-checkbox": oe,
|
|
@@ -1734,48 +1739,48 @@ var Ht = Y, Ut = t`cx-details::part(base){border-bottom-width:0}`, X = class ext
|
|
|
1734
1739
|
return e`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="short_text"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("metadata")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-metadata-tooltip" content=${this.localize.term("metadataHelpText")} hoist><cx-checkbox data-testid="cx-asset-link-format-metadata" class="details__checkbox" ?checked=${this.value} @cx-change=${this.handleApply}>${this.localize.term("preserveMetadata")}</cx-checkbox></cx-tooltip></cx-space></cx-details>`;
|
|
1735
1740
|
}
|
|
1736
1741
|
};
|
|
1737
|
-
a([c(".details"), o("design:type", E === void 0 ? Object : E)],
|
|
1742
|
+
a([c(".details"), o("design:type", E === void 0 ? Object : E)], Z.prototype, "base", void 0), a([r({
|
|
1738
1743
|
reflect: !0,
|
|
1739
1744
|
type: Boolean
|
|
1740
|
-
}), o("design:type", Object)],
|
|
1745
|
+
}), o("design:type", Object)], Z.prototype, "open", void 0), a([r({
|
|
1741
1746
|
reflect: !0,
|
|
1742
1747
|
type: Boolean
|
|
1743
|
-
}), o("design:type", Object)],
|
|
1744
|
-
var
|
|
1745
|
-
[j.Crop]:
|
|
1746
|
-
[j.Dimensions]:
|
|
1747
|
-
[j.Quality]:
|
|
1748
|
-
[j.Resize]:
|
|
1749
|
-
[j.Rotate]:
|
|
1750
|
-
},
|
|
1748
|
+
}), o("design:type", Object)], Z.prototype, "value", void 0), Z = a([u("cx-asset-link-format-metadata")], Z);
|
|
1749
|
+
var Gt = Z, Q, Kt = {
|
|
1750
|
+
[j.Crop]: k.Crop,
|
|
1751
|
+
[j.Dimensions]: k.Dimensions,
|
|
1752
|
+
[j.Quality]: k.Quality,
|
|
1753
|
+
[j.Resize]: k.Resize,
|
|
1754
|
+
[j.Rotate]: k.Rotate
|
|
1755
|
+
}, qt = [
|
|
1751
1756
|
j.Proxy,
|
|
1752
1757
|
j.Crop,
|
|
1753
1758
|
j.Resize,
|
|
1754
1759
|
j.Rotate,
|
|
1755
1760
|
j.Quality,
|
|
1756
1761
|
j.Metadata
|
|
1757
|
-
],
|
|
1762
|
+
], Jt = [
|
|
1758
1763
|
j.Proxy,
|
|
1759
1764
|
j.Dimensions,
|
|
1760
|
-
...
|
|
1761
|
-
],
|
|
1765
|
+
...qt.slice(1)
|
|
1766
|
+
], Yt = [
|
|
1762
1767
|
j.Dimensions,
|
|
1763
1768
|
j.Crop,
|
|
1764
1769
|
j.Resize,
|
|
1765
1770
|
j.Rotate,
|
|
1766
1771
|
j.Quality
|
|
1767
1772
|
], $ = class extends s {
|
|
1768
|
-
static #e =
|
|
1773
|
+
static #e = Q = this;
|
|
1769
1774
|
static #t = this.styles = [l, Et];
|
|
1770
1775
|
static #n = this.dependencies = {
|
|
1771
1776
|
"cx-asset-link-format-crop": Ot,
|
|
1772
1777
|
"cx-asset-link-format-dimensions": jt,
|
|
1773
1778
|
"cx-asset-link-format-extension": Nt,
|
|
1774
|
-
"cx-asset-link-format-metadata":
|
|
1779
|
+
"cx-asset-link-format-metadata": Gt,
|
|
1775
1780
|
"cx-asset-link-format-proxy": It,
|
|
1776
1781
|
"cx-asset-link-format-quality": Rt,
|
|
1777
|
-
"cx-asset-link-format-resize":
|
|
1778
|
-
"cx-asset-link-format-rotation":
|
|
1782
|
+
"cx-asset-link-format-resize": Vt,
|
|
1783
|
+
"cx-asset-link-format-rotation": Ut,
|
|
1779
1784
|
"cx-button": _,
|
|
1780
1785
|
"cx-icon": h,
|
|
1781
1786
|
"cx-icon-button": p,
|
|
@@ -1798,7 +1803,7 @@ var Wt = X, Z, Gt = {
|
|
|
1798
1803
|
return [...new Map(e.map((e) => [e.key, e])).values()];
|
|
1799
1804
|
}
|
|
1800
1805
|
static orderTransformations(e, t) {
|
|
1801
|
-
let n = t.map((e) =>
|
|
1806
|
+
let n = t.map((e) => Kt[e]).filter((e) => e !== void 0), r = e.filter((e) => n.includes(e.key)).sort((e, t) => n.indexOf(e.key) - n.indexOf(t.key)), i = 0;
|
|
1802
1807
|
return e.map((e) => n.includes(e.key) ? r[i++] : e);
|
|
1803
1808
|
}
|
|
1804
1809
|
static getDimensionsPresetSize(e) {
|
|
@@ -1809,7 +1814,7 @@ var Wt = X, Z, Gt = {
|
|
|
1809
1814
|
} : void 0;
|
|
1810
1815
|
}
|
|
1811
1816
|
static getDimensionsSize(e) {
|
|
1812
|
-
if (e?.mode === D.Preset) return
|
|
1817
|
+
if (e?.mode === D.Preset) return Q.getDimensionsPresetSize(e.value);
|
|
1813
1818
|
if (e?.mode === D.Custom && e.unit === A.Pixel && Number.isInteger(e.width) && Number.isInteger(e.height) && e.width >= 1 && e.height >= 1) return {
|
|
1814
1819
|
height: e.height,
|
|
1815
1820
|
width: e.width
|
|
@@ -1818,15 +1823,15 @@ var Wt = X, Z, Gt = {
|
|
|
1818
1823
|
static getSizeBoundAfterStep(e, t) {
|
|
1819
1824
|
let { height: n = 0, rotation: r = 0, unit: i, width: a = 0 } = t.value, o = Math.round(a) >= 1 && Math.round(n) >= 1;
|
|
1820
1825
|
switch (t.key) {
|
|
1821
|
-
case
|
|
1826
|
+
case k.Resize: return i !== P.AspectRatio && o ? {
|
|
1822
1827
|
height: Math.round(n),
|
|
1823
1828
|
width: Math.round(a)
|
|
1824
1829
|
} : void 0;
|
|
1825
|
-
case
|
|
1830
|
+
case k.Dimensions: return o ? {
|
|
1826
1831
|
height: Math.min(e?.height ?? Infinity, Math.round(n)),
|
|
1827
1832
|
width: Math.min(e?.width ?? Infinity, Math.round(a))
|
|
1828
1833
|
} : e;
|
|
1829
|
-
case
|
|
1834
|
+
case k.Rotate: {
|
|
1830
1835
|
if (!e) return;
|
|
1831
1836
|
let t = r * Math.PI / 180, n = Math.abs(Math.cos(t)), i = Math.abs(Math.sin(t));
|
|
1832
1837
|
return {
|
|
@@ -1847,18 +1852,18 @@ var Wt = X, Z, Gt = {
|
|
|
1847
1852
|
return !(this.transformations.length === 0 || this.frozenIndex !== void 0 && this.frozenIndex >= this.transformations.length - 1);
|
|
1848
1853
|
}
|
|
1849
1854
|
get lastAppliedCropUnit() {
|
|
1850
|
-
return this.transformations.findLast((e) => e.key ===
|
|
1855
|
+
return this.transformations.findLast((e) => e.key === k.Crop)?.value.unit ?? P.Pixel;
|
|
1851
1856
|
}
|
|
1852
1857
|
get lastAppliedCropFocusMode() {
|
|
1853
|
-
return this.transformations.findLast((e) => e.key ===
|
|
1858
|
+
return this.transformations.findLast((e) => e.key === k.Crop)?.value.focusMode ?? "manual";
|
|
1854
1859
|
}
|
|
1855
1860
|
get lastAppliedCropPosition() {
|
|
1856
|
-
return this.transformations.findLast((e) => e.key ===
|
|
1861
|
+
return this.transformations.findLast((e) => e.key === k.Crop)?.value.position ?? v.CenterCenter;
|
|
1857
1862
|
}
|
|
1858
1863
|
get disabledCropApply() {
|
|
1859
1864
|
if (!this.asset && this.cropSize.unit !== this.lastAppliedCropUnit) return !1;
|
|
1860
|
-
if (this.cropSize.unit ===
|
|
1861
|
-
let e = this.lastCropSize[
|
|
1865
|
+
if (this.cropSize.unit === P.AspectRatio && !this.asset) {
|
|
1866
|
+
let e = this.lastCropSize[P.AspectRatio];
|
|
1862
1867
|
return this.cropSize.ratioWidth === e.width && this.cropSize.ratioHeight === e.height && this.cropSize.focusMode === this.lastAppliedCropFocusMode && this.cropSize.position === this.lastAppliedCropPosition;
|
|
1863
1868
|
}
|
|
1864
1869
|
if (!this.asset && this.cropSize.focusMode !== this.lastAppliedCropFocusMode || !this.asset && this.cropSize.position !== this.lastAppliedCropPosition) return !1;
|
|
@@ -1869,7 +1874,7 @@ var Wt = X, Z, Gt = {
|
|
|
1869
1874
|
"width",
|
|
1870
1875
|
"x",
|
|
1871
1876
|
"y"
|
|
1872
|
-
]) if (this.cropSize[e] !== this.lastCropSize[
|
|
1877
|
+
]) if (this.cropSize[e] !== this.lastCropSize[P.Pixel][e]) return !1;
|
|
1873
1878
|
return !0;
|
|
1874
1879
|
}
|
|
1875
1880
|
get formats() {
|
|
@@ -1887,48 +1892,48 @@ var Wt = X, Z, Gt = {
|
|
|
1887
1892
|
};
|
|
1888
1893
|
}
|
|
1889
1894
|
get stepsBeforeCrop() {
|
|
1890
|
-
let e = this.transformations.findIndex((e) => e.key ===
|
|
1895
|
+
let e = this.transformations.findIndex((e) => e.key === k.Crop);
|
|
1891
1896
|
if (e >= 0) return this.transformations.slice(0, e);
|
|
1892
1897
|
if (!this.canReorder) return this.transformations;
|
|
1893
1898
|
let t = {
|
|
1894
|
-
key:
|
|
1899
|
+
key: k.Crop,
|
|
1895
1900
|
value: {}
|
|
1896
|
-
}, n =
|
|
1901
|
+
}, n = Q.orderTransformations([...this.transformations, t], this.activeParts);
|
|
1897
1902
|
return n.slice(0, n.indexOf(t));
|
|
1898
1903
|
}
|
|
1899
1904
|
get cropMaxSize() {
|
|
1900
|
-
return this.stepsBeforeCrop.reduce(
|
|
1905
|
+
return this.stepsBeforeCrop.reduce(Q.getSizeBoundAfterStep, void 0) ?? {
|
|
1901
1906
|
height: Infinity,
|
|
1902
1907
|
width: Infinity
|
|
1903
1908
|
};
|
|
1904
1909
|
}
|
|
1905
1910
|
get isCropAtDimensionsLimit() {
|
|
1906
1911
|
let e = this.stepsBeforeCrop;
|
|
1907
|
-
if (this.asset || this.cropSize.unit !==
|
|
1912
|
+
if (this.asset || this.cropSize.unit !== P.Pixel || !e.some((e) => e.key === k.Dimensions)) return !1;
|
|
1908
1913
|
let t = {
|
|
1909
1914
|
height: Infinity,
|
|
1910
1915
|
width: Infinity
|
|
1911
|
-
}, n = e.reduce(
|
|
1916
|
+
}, n = e.reduce(Q.getSizeBoundAfterStep, void 0) ?? t, r = e.filter((e) => e.key !== k.Dimensions).reduce(Q.getSizeBoundAfterStep, void 0) ?? t;
|
|
1912
1917
|
return n.width < r.width && this.cropSize.width >= n.width || n.height < r.height && this.cropSize.height >= n.height;
|
|
1913
1918
|
}
|
|
1914
1919
|
get lastCropSize() {
|
|
1915
1920
|
if (!this.asset) {
|
|
1916
|
-
let e = this.transformations.findLast((e) => e.key ===
|
|
1917
|
-
if (e?.value.unit ===
|
|
1918
|
-
[
|
|
1921
|
+
let e = this.transformations.findLast((e) => e.key === k.Crop);
|
|
1922
|
+
if (e?.value.unit === P.AspectRatio && e.value.ratioWidth && e.value.ratioHeight) return {
|
|
1923
|
+
[P.AspectRatio]: {
|
|
1919
1924
|
height: e.value.ratioHeight,
|
|
1920
1925
|
percentageHeight: 100,
|
|
1921
1926
|
percentageWidth: 100,
|
|
1922
|
-
unit:
|
|
1927
|
+
unit: P.AspectRatio,
|
|
1923
1928
|
width: e.value.ratioWidth,
|
|
1924
1929
|
x: 0,
|
|
1925
1930
|
y: 0
|
|
1926
1931
|
},
|
|
1927
|
-
[
|
|
1932
|
+
[P.Pixel]: {
|
|
1928
1933
|
height: 1,
|
|
1929
1934
|
percentageHeight: 100,
|
|
1930
1935
|
percentageWidth: 100,
|
|
1931
|
-
unit:
|
|
1936
|
+
unit: P.Pixel,
|
|
1932
1937
|
width: 1,
|
|
1933
1938
|
x: 0,
|
|
1934
1939
|
y: 0
|
|
@@ -1937,20 +1942,20 @@ var Wt = X, Z, Gt = {
|
|
|
1937
1942
|
if (e?.value.width && e?.value.height) {
|
|
1938
1943
|
let { height: t, width: n, x: r = 0, y: i = 0 } = e.value, a = y(n, t);
|
|
1939
1944
|
return {
|
|
1940
|
-
[
|
|
1945
|
+
[P.AspectRatio]: {
|
|
1941
1946
|
height: a.height,
|
|
1942
1947
|
percentageHeight: 100,
|
|
1943
1948
|
percentageWidth: 100,
|
|
1944
|
-
unit:
|
|
1949
|
+
unit: P.AspectRatio,
|
|
1945
1950
|
width: a.width,
|
|
1946
1951
|
x: 0,
|
|
1947
1952
|
y: 0
|
|
1948
1953
|
},
|
|
1949
|
-
[
|
|
1954
|
+
[P.Pixel]: {
|
|
1950
1955
|
height: t,
|
|
1951
1956
|
percentageHeight: 100,
|
|
1952
1957
|
percentageWidth: 100,
|
|
1953
|
-
unit:
|
|
1958
|
+
unit: P.Pixel,
|
|
1954
1959
|
width: n,
|
|
1955
1960
|
x: r,
|
|
1956
1961
|
y: i
|
|
@@ -1963,20 +1968,20 @@ var Wt = X, Z, Gt = {
|
|
|
1963
1968
|
width: 1
|
|
1964
1969
|
};
|
|
1965
1970
|
return {
|
|
1966
|
-
[
|
|
1971
|
+
[P.AspectRatio]: {
|
|
1967
1972
|
height: e.height,
|
|
1968
1973
|
percentageHeight: 100,
|
|
1969
1974
|
percentageWidth: 100,
|
|
1970
|
-
unit:
|
|
1975
|
+
unit: P.AspectRatio,
|
|
1971
1976
|
width: e.width,
|
|
1972
1977
|
x: 0,
|
|
1973
1978
|
y: 0
|
|
1974
1979
|
},
|
|
1975
|
-
[
|
|
1980
|
+
[P.Pixel]: {
|
|
1976
1981
|
height: this.lastImageSize.height,
|
|
1977
1982
|
percentageHeight: 100,
|
|
1978
1983
|
percentageWidth: 100,
|
|
1979
|
-
unit:
|
|
1984
|
+
unit: P.Pixel,
|
|
1980
1985
|
width: this.lastImageSize.width,
|
|
1981
1986
|
x: 0,
|
|
1982
1987
|
y: 0
|
|
@@ -1985,30 +1990,30 @@ var Wt = X, Z, Gt = {
|
|
|
1985
1990
|
}
|
|
1986
1991
|
get lastResizeSize() {
|
|
1987
1992
|
if (!this.asset) {
|
|
1988
|
-
let e = this.transformations.findLast((e) => e.key ===
|
|
1989
|
-
if (e?.value.unit ===
|
|
1990
|
-
[
|
|
1993
|
+
let e = this.transformations.findLast((e) => e.key === k.Resize);
|
|
1994
|
+
if (e?.value.unit === P.AspectRatio && e.value.ratioWidth && e.value.ratioHeight) return {
|
|
1995
|
+
[P.AspectRatio]: {
|
|
1991
1996
|
height: e.value.ratioHeight,
|
|
1992
|
-
unit:
|
|
1997
|
+
unit: P.AspectRatio,
|
|
1993
1998
|
width: e.value.ratioWidth
|
|
1994
1999
|
},
|
|
1995
|
-
[
|
|
2000
|
+
[P.Pixel]: {
|
|
1996
2001
|
height: 1,
|
|
1997
|
-
unit:
|
|
2002
|
+
unit: P.Pixel,
|
|
1998
2003
|
width: 1
|
|
1999
2004
|
}
|
|
2000
2005
|
};
|
|
2001
2006
|
if (e?.value.width && e?.value.height) {
|
|
2002
2007
|
let { height: t, width: n } = e.value, r = y(n, t);
|
|
2003
2008
|
return {
|
|
2004
|
-
[
|
|
2009
|
+
[P.AspectRatio]: {
|
|
2005
2010
|
height: r.height,
|
|
2006
|
-
unit:
|
|
2011
|
+
unit: P.AspectRatio,
|
|
2007
2012
|
width: r.width
|
|
2008
2013
|
},
|
|
2009
|
-
[
|
|
2014
|
+
[P.Pixel]: {
|
|
2010
2015
|
height: t,
|
|
2011
|
-
unit:
|
|
2016
|
+
unit: P.Pixel,
|
|
2012
2017
|
width: n
|
|
2013
2018
|
}
|
|
2014
2019
|
};
|
|
@@ -2019,20 +2024,20 @@ var Wt = X, Z, Gt = {
|
|
|
2019
2024
|
width: 1
|
|
2020
2025
|
};
|
|
2021
2026
|
return {
|
|
2022
|
-
[
|
|
2027
|
+
[P.AspectRatio]: {
|
|
2023
2028
|
height: e.height,
|
|
2024
|
-
unit:
|
|
2029
|
+
unit: P.AspectRatio,
|
|
2025
2030
|
width: e.width
|
|
2026
2031
|
},
|
|
2027
|
-
[
|
|
2032
|
+
[P.Pixel]: {
|
|
2028
2033
|
height: this.lastImageSize.height,
|
|
2029
|
-
unit:
|
|
2034
|
+
unit: P.Pixel,
|
|
2030
2035
|
width: this.lastImageSize.width
|
|
2031
2036
|
}
|
|
2032
2037
|
};
|
|
2033
2038
|
}
|
|
2034
2039
|
get lastRotation() {
|
|
2035
|
-
return this.asset ? 0 : this.transformations.findLast((e) => e.key ===
|
|
2040
|
+
return this.asset ? 0 : this.transformations.findLast((e) => e.key === k.Rotate)?.value.rotation ?? 0;
|
|
2036
2041
|
}
|
|
2037
2042
|
get transformationString() {
|
|
2038
2043
|
return me({
|
|
@@ -2044,7 +2049,7 @@ var Wt = X, Z, Gt = {
|
|
|
2044
2049
|
}).replace(/\/t\//g, "");
|
|
2045
2050
|
}
|
|
2046
2051
|
constructor() {
|
|
2047
|
-
super(), this.localize = new d(this), this.initialParts = [...
|
|
2052
|
+
super(), this.localize = new d(this), this.initialParts = [...qt], this.sortableRevision = 0, this.dragPreviousSibling = null, this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
|
|
2048
2053
|
{
|
|
2049
2054
|
label: "Free",
|
|
2050
2055
|
value: "free"
|
|
@@ -2111,7 +2116,7 @@ var Wt = X, Z, Gt = {
|
|
|
2111
2116
|
keepAspectRatio: !0,
|
|
2112
2117
|
ratioHeight: 1,
|
|
2113
2118
|
ratioWidth: 1,
|
|
2114
|
-
unit:
|
|
2119
|
+
unit: P.Pixel,
|
|
2115
2120
|
width: 1
|
|
2116
2121
|
}, this.cropSize = {
|
|
2117
2122
|
cropMode: "free",
|
|
@@ -2123,7 +2128,7 @@ var Wt = X, Z, Gt = {
|
|
|
2123
2128
|
position: v.CenterCenter,
|
|
2124
2129
|
ratioHeight: 1,
|
|
2125
2130
|
ratioWidth: 1,
|
|
2126
|
-
unit:
|
|
2131
|
+
unit: P.Pixel,
|
|
2127
2132
|
width: 1,
|
|
2128
2133
|
x: 0,
|
|
2129
2134
|
y: 0
|
|
@@ -2149,7 +2154,7 @@ var Wt = X, Z, Gt = {
|
|
|
2149
2154
|
if (e.has("activeSetting") && this.handleActiveSettingChange(), e.has("selectedFormat") && this.handleSelectedFormatChange(), e.has("resizeSize") && this.handleResizeSizeChange(), e.has("cropSize") && this.handleCropSizeChange(), e.has("rotation") && this.handleRotationChange(), e.has("cropperElement") && this.handleCropperElementChange(), e.has("selectedFormat")) {
|
|
2150
2155
|
if (!this.asset || !this.selectedFormat || this.selectedFormat.extension === e.get("selectedFormat")?.extension) return;
|
|
2151
2156
|
this.loading = !0, this.requestTransformAsset().then((e) => {
|
|
2152
|
-
this.loading = !1, e?.relativePath && this.selectedFormat && (this.lastAction ===
|
|
2157
|
+
this.loading = !1, e?.relativePath && this.selectedFormat && (this.lastAction === k.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
|
|
2153
2158
|
height: e.height,
|
|
2154
2159
|
width: e.width
|
|
2155
2160
|
}, this.selectedFormat = {
|
|
@@ -2183,7 +2188,7 @@ var Wt = X, Z, Gt = {
|
|
|
2183
2188
|
get transformRequestOptions() {
|
|
2184
2189
|
return {
|
|
2185
2190
|
assetId: this.asset?.id ?? "",
|
|
2186
|
-
extension:
|
|
2191
|
+
extension: Q.getTransformExtension(this.selectedFormat?.extension ?? ""),
|
|
2187
2192
|
format: this.proxies?.find((e) => e.id === this.selectedProxy)?.proxyName ?? "",
|
|
2188
2193
|
siteUrl: this.baseUrl,
|
|
2189
2194
|
token: this.token,
|
|
@@ -2213,20 +2218,20 @@ var Wt = X, Z, Gt = {
|
|
|
2213
2218
|
this.frozenIndex = this.transformations.length - 1;
|
|
2214
2219
|
}
|
|
2215
2220
|
upsertTransformation(e) {
|
|
2216
|
-
e.key ===
|
|
2221
|
+
e.key === k.Crop && (this.editedCrop = e), this.asset || (this.transformations = Q.uniqueTransformations(this.transformations));
|
|
2217
2222
|
let t = this.transformations.findIndex((t) => t.key === e.key);
|
|
2218
2223
|
if (t >= 0) {
|
|
2219
2224
|
let n = [...this.transformations];
|
|
2220
2225
|
n[t] = e, this.transformations = n;
|
|
2221
2226
|
} else this.transformations = [...this.transformations, e];
|
|
2222
|
-
this.canReorder && (this.transformations =
|
|
2227
|
+
this.canReorder && (this.transformations = Q.orderTransformations(this.transformations, this.activeParts));
|
|
2223
2228
|
}
|
|
2224
2229
|
isCropPanelSize(e) {
|
|
2225
|
-
let { height: t, ratioHeight: n, ratioWidth: r, unit: i =
|
|
2226
|
-
return i === this.cropSize.unit ? i ===
|
|
2230
|
+
let { height: t, ratioHeight: n, ratioWidth: r, unit: i = P.Pixel, width: a } = e.value;
|
|
2231
|
+
return i === this.cropSize.unit ? i === P.AspectRatio ? r === this.cropSize.ratioWidth && n === this.cropSize.ratioHeight : a === this.cropSize.width && t === this.cropSize.height : !1;
|
|
2227
2232
|
}
|
|
2228
2233
|
#r(e) {
|
|
2229
|
-
let { height: t = 0, ratioHeight: n = 0, ratioWidth: r = 0, unit: i =
|
|
2234
|
+
let { height: t = 0, ratioHeight: n = 0, ratioWidth: r = 0, unit: i = P.Pixel, width: a = 0 } = e.value, o = i === P.AspectRatio, s = o ? r : a, c = o ? n : t;
|
|
2230
2235
|
if (!s || !c) return;
|
|
2231
2236
|
let l = this.cropModes.filter((e) => !e.auto && /^\d+:\d+$/.test(e.value)).map(({ value: e }) => {
|
|
2232
2237
|
let [t, n] = e.split(":").map(Number);
|
|
@@ -2239,8 +2244,8 @@ var Wt = X, Z, Gt = {
|
|
|
2239
2244
|
return u || o ? u?.value : l.find(({ modeHeight: e, modeWidth: t }) => Math.abs(t * c - e * s) <= Math.max(t, e) / 2)?.value;
|
|
2240
2245
|
}
|
|
2241
2246
|
capCropToMaxSize() {
|
|
2242
|
-
let e = this.transformations.find((e) => e.key ===
|
|
2243
|
-
if (this.asset || !e || (e.value.unit ??
|
|
2247
|
+
let e = this.transformations.find((e) => e.key === k.Crop);
|
|
2248
|
+
if (this.asset || !e || (e.value.unit ?? P.Pixel) !== P.Pixel) return;
|
|
2244
2249
|
let { height: t = 0, width: n = 0 } = e.value, r = this.cropMaxSize;
|
|
2245
2250
|
if (n <= r.width && t <= r.height) return;
|
|
2246
2251
|
let i = Math.min(t, r.height), a = Math.min(n, r.width), o = this.isCropPanelSize(e) && n * i === t * a;
|
|
@@ -2261,7 +2266,7 @@ var Wt = X, Z, Gt = {
|
|
|
2261
2266
|
async handleTransformationsChange(e) {
|
|
2262
2267
|
let t = e, n = this.canReorder && t !== void 0 && t.length === this.transformations.length && t.every((e) => this.transformations.includes(e));
|
|
2263
2268
|
if (!this.asset) {
|
|
2264
|
-
let e =
|
|
2269
|
+
let e = Q.uniqueTransformations(this.transformations), t = this.canReorder ? Q.orderTransformations(e, this.activeParts) : e;
|
|
2265
2270
|
(t.length !== this.transformations.length || t.some((e, t) => e !== this.transformations[t])) && (this.transformations = t), n || this.capCropToMaxSize();
|
|
2266
2271
|
}
|
|
2267
2272
|
if (this.syncSelectedDimensions(), await this.updateComplete, !this.asset) {
|
|
@@ -2273,8 +2278,8 @@ var Wt = X, Z, Gt = {
|
|
|
2273
2278
|
transformations: this.transformations,
|
|
2274
2279
|
useSession: this.useSession
|
|
2275
2280
|
}).replace(/\/t\//g, "") }), n) return;
|
|
2276
|
-
let e = this.transformations.findLast((e) => e.key ===
|
|
2277
|
-
if (e?.value.unit ===
|
|
2281
|
+
let e = this.transformations.findLast((e) => e.key === k.Crop && (e.value.unit === P.AspectRatio && e.value.ratioWidth && e.value.ratioHeight || e.value.width && e.value.height)), t = e !== void 0 && e === this.editedCrop && this.isCropPanelSize(e), r = e && !t ? this.#r(e) : void 0, i = t ? this.cropSize.cropMode : r ?? "free";
|
|
2282
|
+
if (e?.value.unit === P.AspectRatio && e.value.ratioWidth && e.value.ratioHeight) {
|
|
2278
2283
|
let { focusMode: n, position: r, ratioHeight: a, ratioWidth: o } = e.value;
|
|
2279
2284
|
this.cropSize = {
|
|
2280
2285
|
...this.cropSize,
|
|
@@ -2286,7 +2291,7 @@ var Wt = X, Z, Gt = {
|
|
|
2286
2291
|
position: r ?? v.CenterCenter,
|
|
2287
2292
|
ratioHeight: a,
|
|
2288
2293
|
ratioWidth: o,
|
|
2289
|
-
unit:
|
|
2294
|
+
unit: P.AspectRatio
|
|
2290
2295
|
};
|
|
2291
2296
|
} else if (e) {
|
|
2292
2297
|
let { focusMode: t, height: n, position: a, unit: o, width: s, x: c = 0, y: l = 0 } = e.value;
|
|
@@ -2299,7 +2304,7 @@ var Wt = X, Z, Gt = {
|
|
|
2299
2304
|
percentageHeight: 100,
|
|
2300
2305
|
percentageWidth: 100,
|
|
2301
2306
|
position: a ?? v.CenterCenter,
|
|
2302
|
-
unit: o ??
|
|
2307
|
+
unit: o ?? P.Pixel,
|
|
2303
2308
|
width: s,
|
|
2304
2309
|
x: c,
|
|
2305
2310
|
y: l
|
|
@@ -2312,37 +2317,37 @@ var Wt = X, Z, Gt = {
|
|
|
2312
2317
|
percentageHeight: 0,
|
|
2313
2318
|
percentageWidth: 0,
|
|
2314
2319
|
position: v.CenterCenter,
|
|
2315
|
-
unit:
|
|
2320
|
+
unit: P.Pixel,
|
|
2316
2321
|
width: 1,
|
|
2317
2322
|
x: 0,
|
|
2318
2323
|
y: 0
|
|
2319
2324
|
};
|
|
2320
|
-
let a = this.transformations.findLast((e) => e.key ===
|
|
2321
|
-
if (a?.value.unit ===
|
|
2325
|
+
let a = this.transformations.findLast((e) => e.key === k.Resize && (e.value.unit === P.AspectRatio && e.value.ratioWidth && e.value.ratioHeight || e.value.width || e.value.height));
|
|
2326
|
+
if (a?.value.unit === P.AspectRatio && a.value.ratioWidth && a.value.ratioHeight) {
|
|
2322
2327
|
let { ratioHeight: e, ratioWidth: t } = a.value;
|
|
2323
2328
|
this.resizeSize = {
|
|
2324
2329
|
...this.resizeSize,
|
|
2325
2330
|
ratioHeight: e,
|
|
2326
2331
|
ratioWidth: t,
|
|
2327
|
-
unit:
|
|
2332
|
+
unit: P.AspectRatio
|
|
2328
2333
|
};
|
|
2329
2334
|
} else if (a) {
|
|
2330
2335
|
let { height: e = 0, unit: t, width: n = 0 } = a.value;
|
|
2331
2336
|
this.resizeSize = {
|
|
2332
2337
|
...this.resizeSize,
|
|
2333
2338
|
height: e,
|
|
2334
|
-
unit: t ??
|
|
2339
|
+
unit: t ?? P.Pixel,
|
|
2335
2340
|
width: n
|
|
2336
2341
|
};
|
|
2337
2342
|
} else this.resizeSize = {
|
|
2338
2343
|
...this.resizeSize,
|
|
2339
2344
|
height: 1,
|
|
2340
|
-
unit:
|
|
2345
|
+
unit: P.Pixel,
|
|
2341
2346
|
width: 1
|
|
2342
2347
|
};
|
|
2343
|
-
let o = this.transformations.findLast((e) => e.key ===
|
|
2348
|
+
let o = this.transformations.findLast((e) => e.key === k.Rotate);
|
|
2344
2349
|
this.rotation = o?.value.rotation ?? 0;
|
|
2345
|
-
let s = this.transformations.findLast((e) => e.key ===
|
|
2350
|
+
let s = this.transformations.findLast((e) => e.key === k.Quality)?.value.quality ?? 100, c = this.transformations.some((e) => e.key === k.Metadata);
|
|
2346
2351
|
this.selectedFormat = this.selectedFormat ? {
|
|
2347
2352
|
...this.selectedFormat,
|
|
2348
2353
|
keepMetadata: c,
|
|
@@ -2372,7 +2377,7 @@ var Wt = X, Z, Gt = {
|
|
|
2372
2377
|
keepAspectRatio: !0,
|
|
2373
2378
|
ratioHeight: 1,
|
|
2374
2379
|
ratioWidth: 1,
|
|
2375
|
-
unit:
|
|
2380
|
+
unit: P.Pixel,
|
|
2376
2381
|
width: r.width
|
|
2377
2382
|
}, this.cropSize = {
|
|
2378
2383
|
cropMode: "free",
|
|
@@ -2384,12 +2389,12 @@ var Wt = X, Z, Gt = {
|
|
|
2384
2389
|
position: v.CenterCenter,
|
|
2385
2390
|
ratioHeight: 1,
|
|
2386
2391
|
ratioWidth: 1,
|
|
2387
|
-
unit:
|
|
2392
|
+
unit: P.Pixel,
|
|
2388
2393
|
width: r.width,
|
|
2389
2394
|
x: 0,
|
|
2390
2395
|
y: 0
|
|
2391
|
-
}, this.lastAction ===
|
|
2392
|
-
let i = this.transformations.some((e) => e.key ===
|
|
2396
|
+
}, this.lastAction === k.Rotate && (this.rotation = 0), this.lastAction = void 0;
|
|
2397
|
+
let i = this.transformations.some((e) => e.key === k.Metadata), a = this.transformations.findLast((e) => e.key === k.Quality);
|
|
2393
2398
|
this.selectedFormat = {
|
|
2394
2399
|
...this.selectedFormat,
|
|
2395
2400
|
height: r.height,
|
|
@@ -2420,7 +2425,7 @@ var Wt = X, Z, Gt = {
|
|
|
2420
2425
|
height: Number.parseInt(this.asset.height, 10),
|
|
2421
2426
|
width: Number.parseInt(this.asset.width, 10)
|
|
2422
2427
|
});
|
|
2423
|
-
let e = this.transformations.findLast((e) => e.key ===
|
|
2428
|
+
let e = this.transformations.findLast((e) => e.key === k.Quality);
|
|
2424
2429
|
this.selectedFormat = {
|
|
2425
2430
|
extension: this.asset.extension,
|
|
2426
2431
|
height: this.defaultSize.height,
|
|
@@ -2445,7 +2450,7 @@ var Wt = X, Z, Gt = {
|
|
|
2445
2450
|
position: v.CenterCenter,
|
|
2446
2451
|
ratioHeight: 1,
|
|
2447
2452
|
ratioWidth: 1,
|
|
2448
|
-
unit:
|
|
2453
|
+
unit: P.Pixel,
|
|
2449
2454
|
width: this.defaultSize.width,
|
|
2450
2455
|
x: 0,
|
|
2451
2456
|
y: 0
|
|
@@ -2464,7 +2469,7 @@ var Wt = X, Z, Gt = {
|
|
|
2464
2469
|
t.proxyName === "TRX" && (t.formatHeight = Number(this.asset.height), t.formatWidth = Number(this.asset.width));
|
|
2465
2470
|
let n = this.proxies?.find((t) => t.id === e);
|
|
2466
2471
|
n && (this.asset && n.proxyName === "TRX" && (n.formatHeight = Number(this.asset.height), n.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((e) => {
|
|
2467
|
-
if (e.key ===
|
|
2472
|
+
if (e.key === k.Crop) {
|
|
2468
2473
|
let r = e.value, i = r.width / n.formatWidth * t.formatWidth, a = r.height / n.formatHeight * t.formatHeight, o = r.x / n.formatWidth * t.formatWidth, s = r.y / n.formatHeight * t.formatHeight;
|
|
2469
2474
|
return {
|
|
2470
2475
|
...e,
|
|
@@ -2477,7 +2482,7 @@ var Wt = X, Z, Gt = {
|
|
|
2477
2482
|
}
|
|
2478
2483
|
};
|
|
2479
2484
|
}
|
|
2480
|
-
if (e.key ===
|
|
2485
|
+
if (e.key === k.Resize) {
|
|
2481
2486
|
let r = e.value, i = r.width / n.formatWidth * t.formatWidth, a = r.height / n.formatHeight * t.formatHeight;
|
|
2482
2487
|
return {
|
|
2483
2488
|
...e,
|
|
@@ -2498,24 +2503,24 @@ var Wt = X, Z, Gt = {
|
|
|
2498
2503
|
}, await this.updateComplete, this.cropSize = {
|
|
2499
2504
|
cropMode: "free",
|
|
2500
2505
|
focusMode: "manual",
|
|
2501
|
-
height: this.lastCropSize[
|
|
2506
|
+
height: this.lastCropSize[P.Pixel].height,
|
|
2502
2507
|
keepAspectRatio: !0,
|
|
2503
2508
|
percentageHeight: 100,
|
|
2504
2509
|
percentageWidth: 100,
|
|
2505
2510
|
position: v.CenterCenter,
|
|
2506
2511
|
ratioHeight: 1,
|
|
2507
2512
|
ratioWidth: 1,
|
|
2508
|
-
unit:
|
|
2509
|
-
width: this.lastCropSize[
|
|
2513
|
+
unit: P.Pixel,
|
|
2514
|
+
width: this.lastCropSize[P.Pixel].width,
|
|
2510
2515
|
x: 0,
|
|
2511
2516
|
y: 0
|
|
2512
2517
|
}, this.resizeSize = {
|
|
2513
|
-
height: this.lastResizeSize[
|
|
2518
|
+
height: this.lastResizeSize[P.Pixel].height,
|
|
2514
2519
|
keepAspectRatio: !0,
|
|
2515
2520
|
ratioHeight: 1,
|
|
2516
2521
|
ratioWidth: 1,
|
|
2517
|
-
unit:
|
|
2518
|
-
width: this.lastResizeSize[
|
|
2522
|
+
unit: P.Pixel,
|
|
2523
|
+
width: this.lastResizeSize[P.Pixel].width
|
|
2519
2524
|
};
|
|
2520
2525
|
}
|
|
2521
2526
|
handleLoadingChange() {
|
|
@@ -2538,14 +2543,14 @@ var Wt = X, Z, Gt = {
|
|
|
2538
2543
|
let t = e === j.Rotate ? "rotation" : e;
|
|
2539
2544
|
return this.activeSetting === `cx-asset-link-format-${t}`;
|
|
2540
2545
|
}) || (this.activeSetting = ""), this.canReorder) {
|
|
2541
|
-
let e =
|
|
2546
|
+
let e = Q.orderTransformations(Q.uniqueTransformations(this.transformations), this.activeParts);
|
|
2542
2547
|
(e.length !== this.transformations.length || e.some((e, t) => e !== this.transformations[t])) && (this.transformations = e);
|
|
2543
2548
|
}
|
|
2544
2549
|
}
|
|
2545
2550
|
handleReorderableChange() {
|
|
2546
2551
|
if (this.orderUndo = [], this.canReorder && this.parts === this.initialParts && this.transformations.length > 0) {
|
|
2547
|
-
let e =
|
|
2548
|
-
this.parts =
|
|
2552
|
+
let e = Q.uniqueTransformations(this.transformations).flatMap((e) => qt.filter((t) => Kt[t] === e.key)), t = [...e, ...qt.filter((t) => Kt[t] && !e.includes(t))], n = 0;
|
|
2553
|
+
this.parts = qt.map((e) => Kt[e] ? t[n++] : e);
|
|
2549
2554
|
}
|
|
2550
2555
|
this.handlePartsChange(), this.syncSortable();
|
|
2551
2556
|
}
|
|
@@ -2601,12 +2606,12 @@ var Wt = X, Z, Gt = {
|
|
|
2601
2606
|
}
|
|
2602
2607
|
movePart(e, t) {
|
|
2603
2608
|
if (!this.canReorder || this.loading) return;
|
|
2604
|
-
let n = this.activeParts.filter((e) =>
|
|
2609
|
+
let n = this.activeParts.filter((e) => Yt.includes(e)), r = n.indexOf(e);
|
|
2605
2610
|
if (r < 0 || t < 0 || t >= n.length || r === t) return;
|
|
2606
2611
|
this.rememberOrder(), n.splice(r, 1), n.splice(t, 0, e);
|
|
2607
2612
|
let i = 0;
|
|
2608
|
-
this.parts = this.activeParts.map((e) =>
|
|
2609
|
-
let a =
|
|
2613
|
+
this.parts = this.activeParts.map((e) => Yt.includes(e) ? n[i++] : e);
|
|
2614
|
+
let a = Q.orderTransformations(this.transformations, this.parts);
|
|
2610
2615
|
a.some((e, t) => e !== this.transformations[t]) && (this.transformations = a), this.capCropToMaxSize(), this.reorderAnnouncement = `${this.localize.term(e)}: ${t + 1} / ${n.length}`, this.emitReorder(), this.updateComplete.then(() => {
|
|
2611
2616
|
this.shadowRoot?.querySelector(`[data-part="${e}"] .asset-link-format__drag-handle`)?.focus();
|
|
2612
2617
|
});
|
|
@@ -2614,22 +2619,22 @@ var Wt = X, Z, Gt = {
|
|
|
2614
2619
|
handleReorderKeyDown(e) {
|
|
2615
2620
|
if (e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
|
|
2616
2621
|
e.preventDefault(), e.stopPropagation();
|
|
2617
|
-
let t = e.currentTarget.closest("[data-part]")?.dataset.part, n = this.activeParts.filter((e) =>
|
|
2622
|
+
let t = e.currentTarget.closest("[data-part]")?.dataset.part, n = this.activeParts.filter((e) => Yt.includes(e));
|
|
2618
2623
|
this.movePart(t, n.indexOf(t) + (e.key === "ArrowUp" ? -1 : 1));
|
|
2619
2624
|
}
|
|
2620
2625
|
handleActiveSettingChange() {
|
|
2621
2626
|
this.cropperElement && (this.resizeSize = {
|
|
2622
|
-
height: this.lastResizeSize[
|
|
2627
|
+
height: this.lastResizeSize[P.Pixel].height,
|
|
2623
2628
|
keepAspectRatio: !0,
|
|
2624
2629
|
ratioHeight: 1,
|
|
2625
2630
|
ratioWidth: 1,
|
|
2626
|
-
unit:
|
|
2627
|
-
width: this.lastResizeSize[
|
|
2631
|
+
unit: P.Pixel,
|
|
2632
|
+
width: this.lastResizeSize[P.Pixel].width
|
|
2628
2633
|
}, this.cropperElement.disabled = this.activeSetting !== "cx-asset-link-format-crop");
|
|
2629
2634
|
}
|
|
2630
2635
|
async handleRequestAutoCropSuggestion({ cropMode: e, focusMode: t, height: n, keepAspectRatio: r, percentageHeight: i, percentageWidth: a, ratioHeight: o, ratioWidth: s, unit: c, useCropMode: l, width: u }) {
|
|
2631
2636
|
if (!this.selectedFormat?.url || t === "manual") return;
|
|
2632
|
-
this.loading = !0, this.lastAction =
|
|
2637
|
+
this.loading = !0, this.lastAction = k.Crop;
|
|
2633
2638
|
let d = await this.apiGetCropFocusMode({
|
|
2634
2639
|
autoCropMode: t,
|
|
2635
2640
|
cropHeight: n,
|
|
@@ -2688,7 +2693,7 @@ var Wt = X, Z, Gt = {
|
|
|
2688
2693
|
}
|
|
2689
2694
|
#i(e, t) {
|
|
2690
2695
|
let { keepAspectRatio: n, unit: r } = this.cropSize, i = {};
|
|
2691
|
-
return n ? i : (this.#a(e, t) && (i.cropMode = "free"), r ===
|
|
2696
|
+
return n ? i : (this.#a(e, t) && (i.cropMode = "free"), r === P.AspectRatio && (i.ratioHeight = t, i.ratioWidth = e), i);
|
|
2692
2697
|
}
|
|
2693
2698
|
#a(e, t) {
|
|
2694
2699
|
let n = /^(\d+):(\d+)$/.exec(this.cropSize.cropMode);
|
|
@@ -2715,7 +2720,7 @@ var Wt = X, Z, Gt = {
|
|
|
2715
2720
|
}
|
|
2716
2721
|
onProxyChange(e) {
|
|
2717
2722
|
let t = e.detail;
|
|
2718
|
-
if (this.lastAction =
|
|
2723
|
+
if (this.lastAction = k.Proxy, t.autoFormat) {
|
|
2719
2724
|
this.autoFormat = !0;
|
|
2720
2725
|
let e = this.autoResolvedProxyId;
|
|
2721
2726
|
e && (this.selectedProxy = e);
|
|
@@ -2731,7 +2736,7 @@ var Wt = X, Z, Gt = {
|
|
|
2731
2736
|
});
|
|
2732
2737
|
else {
|
|
2733
2738
|
let e = this.focusModes.find((e) => e.value === this.cropSize.focusMode)?.auto, n = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, i = this.cropSize.x, a = this.cropSize.y;
|
|
2734
|
-
t === "free" ? (n = !1, this.cropperElement && (r = "manual")) : this.cropSize.unit ===
|
|
2739
|
+
t === "free" ? (n = !1, this.cropperElement && (r = "manual")) : this.cropSize.unit === P.Pixel && !e && (i = 0, a = 0), this.focusModes.find((e) => e.value === r)?.auto && this.selectedFormat?.url ? await this.handleRequestAutoCropSuggestion({
|
|
2735
2740
|
cropMode: t,
|
|
2736
2741
|
focusMode: r,
|
|
2737
2742
|
height: this.cropSize.height,
|
|
@@ -2767,11 +2772,11 @@ var Wt = X, Z, Gt = {
|
|
|
2767
2772
|
}
|
|
2768
2773
|
async onCropChange(e) {
|
|
2769
2774
|
let t = this.cropSize.unit;
|
|
2770
|
-
if (e.detail.unit ===
|
|
2775
|
+
if (e.detail.unit === P.AspectRatio) {
|
|
2771
2776
|
let t = e.detail.width / e.detail.height, n = this.asset ? Math.min(Math.max(Math.round(this.cropSize.height * t), 1), this.resizeSize.width) : 0, r = this.asset ? Math.min(Math.max(Math.round(n / t), 1), this.resizeSize.height) : 0, i = this.asset ? r * 100 / this.selectedFormat.height : 100, a = this.asset ? n * 100 / this.selectedFormat.width : 100, o = this.cropSize.x, s = this.cropSize.y;
|
|
2772
2777
|
o + a > 100 && (o = 100 - a), s + i > 100 && (s = 100 - i);
|
|
2773
2778
|
let c = this.cropSize.cropMode, l = this.cropModes.find((e) => e.value === c)?.auto, u = !e.detail.keepAspectRatio && this.#a(e.detail.width, e.detail.height);
|
|
2774
|
-
(l || u) && (c = "free"), e.detail.silent ? (this.cropSize.height = r, this.cropSize.keepAspectRatio = e.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = a, this.cropSize.ratioHeight = e.detail.height, this.cropSize.ratioWidth = e.detail.width, this.cropSize.unit =
|
|
2779
|
+
(l || u) && (c = "free"), e.detail.silent ? (this.cropSize.height = r, this.cropSize.keepAspectRatio = e.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = a, this.cropSize.ratioHeight = e.detail.height, this.cropSize.ratioWidth = e.detail.width, this.cropSize.unit = P.AspectRatio, this.cropSize.width = n) : this.cropSize = {
|
|
2775
2780
|
...this.cropSize,
|
|
2776
2781
|
cropMode: c,
|
|
2777
2782
|
height: r,
|
|
@@ -2780,7 +2785,7 @@ var Wt = X, Z, Gt = {
|
|
|
2780
2785
|
percentageWidth: a,
|
|
2781
2786
|
ratioHeight: e.detail.height,
|
|
2782
2787
|
ratioWidth: e.detail.width,
|
|
2783
|
-
unit:
|
|
2788
|
+
unit: P.AspectRatio,
|
|
2784
2789
|
width: n,
|
|
2785
2790
|
x: o,
|
|
2786
2791
|
y: s
|
|
@@ -2789,14 +2794,14 @@ var Wt = X, Z, Gt = {
|
|
|
2789
2794
|
let t = this.asset ? e.detail.height * 100 / this.selectedFormat.height : 100, n = this.asset ? e.detail.width * 100 / this.selectedFormat.width : 100, r = this.cropSize.x, i = this.cropSize.y;
|
|
2790
2795
|
r + n > 100 && (r = 100 - n), i + t > 100 && (i = 100 - t);
|
|
2791
2796
|
let a = this.cropSize.cropMode, o = this.cropModes.find((e) => e.value === a)?.auto;
|
|
2792
|
-
(e.detail.breakAspectRatio || o) && (a = "free"), e.detail.silent ? (this.cropSize.cropMode = a, this.cropSize.height = e.detail.height, this.cropSize.keepAspectRatio = e.detail.keepAspectRatio, this.cropSize.percentageHeight = t, this.cropSize.percentageWidth = n, this.cropSize.unit =
|
|
2797
|
+
(e.detail.breakAspectRatio || o) && (a = "free"), e.detail.silent ? (this.cropSize.cropMode = a, this.cropSize.height = e.detail.height, this.cropSize.keepAspectRatio = e.detail.keepAspectRatio, this.cropSize.percentageHeight = t, this.cropSize.percentageWidth = n, this.cropSize.unit = P.Pixel, this.cropSize.width = e.detail.width, this.cropSize.x = r, this.cropSize.y = i) : this.cropSize = {
|
|
2793
2798
|
...this.cropSize,
|
|
2794
2799
|
cropMode: a,
|
|
2795
2800
|
height: e.detail.height,
|
|
2796
2801
|
keepAspectRatio: e.detail.keepAspectRatio,
|
|
2797
2802
|
percentageHeight: t,
|
|
2798
2803
|
percentageWidth: n,
|
|
2799
|
-
unit:
|
|
2804
|
+
unit: P.Pixel,
|
|
2800
2805
|
width: e.detail.width,
|
|
2801
2806
|
x: r,
|
|
2802
2807
|
y: i
|
|
@@ -2809,7 +2814,7 @@ var Wt = X, Z, Gt = {
|
|
|
2809
2814
|
}
|
|
2810
2815
|
#o() {
|
|
2811
2816
|
let { ratioHeight: e, ratioWidth: t, unit: n } = this.cropSize;
|
|
2812
|
-
if (n !==
|
|
2817
|
+
if (n !== P.AspectRatio) return;
|
|
2813
2818
|
let r = y(t, e);
|
|
2814
2819
|
(r.width !== t || r.height !== e) && (this.cropSize = {
|
|
2815
2820
|
...this.cropSize,
|
|
@@ -2832,11 +2837,11 @@ var Wt = X, Z, Gt = {
|
|
|
2832
2837
|
unit: this.cropSize.unit,
|
|
2833
2838
|
width: this.cropSize.width
|
|
2834
2839
|
}) {
|
|
2835
|
-
if (this.clearResetSnapshot(), this.lastAction =
|
|
2840
|
+
if (this.clearResetSnapshot(), this.lastAction = k.Crop, !this.asset) {
|
|
2836
2841
|
let { focusMode: e, height: t, position: n, ratioHeight: r, ratioWidth: i, unit: a, width: o, x: s, y: c } = this.cropSize, l = this.focusModes.find((t) => t.value === e)?.auto ?? !1;
|
|
2837
|
-
if (a ===
|
|
2842
|
+
if (a === P.AspectRatio) {
|
|
2838
2843
|
i && r && this.upsertTransformation({
|
|
2839
|
-
key:
|
|
2844
|
+
key: k.Crop,
|
|
2840
2845
|
value: {
|
|
2841
2846
|
focusMode: e,
|
|
2842
2847
|
isFocusModeAuto: l,
|
|
@@ -2849,7 +2854,7 @@ var Wt = X, Z, Gt = {
|
|
|
2849
2854
|
return;
|
|
2850
2855
|
}
|
|
2851
2856
|
(t || o) && Number.isFinite(t) && Number.isFinite(o) && this.upsertTransformation({
|
|
2852
|
-
key:
|
|
2857
|
+
key: k.Crop,
|
|
2853
2858
|
value: {
|
|
2854
2859
|
focusMode: e,
|
|
2855
2860
|
height: t,
|
|
@@ -2868,8 +2873,8 @@ var Wt = X, Z, Gt = {
|
|
|
2868
2873
|
let a = this.cropSize.focusMode, o = this.focusModes.find((e) => e.value === a)?.auto ?? !1;
|
|
2869
2874
|
if (t && i && r) {
|
|
2870
2875
|
let e = i, s = t;
|
|
2871
|
-
if (r ===
|
|
2872
|
-
key:
|
|
2876
|
+
if (r === P.AspectRatio && (e = this.cropSize.percentageWidth * this.selectedFormat.width / 100, s = this.cropSize.percentageHeight * this.selectedFormat.height / 100), n) this.transformations = [...this.transformations, {
|
|
2877
|
+
key: k.Crop,
|
|
2873
2878
|
value: {
|
|
2874
2879
|
focusMode: a,
|
|
2875
2880
|
height: s,
|
|
@@ -2881,7 +2886,7 @@ var Wt = X, Z, Gt = {
|
|
|
2881
2886
|
else {
|
|
2882
2887
|
let t = this.cropSize.x / 100 * this.selectedFormat.width, n = this.cropSize.y / 100 * this.selectedFormat.height;
|
|
2883
2888
|
this.transformations = [...this.transformations, {
|
|
2884
|
-
key:
|
|
2889
|
+
key: k.Crop,
|
|
2885
2890
|
value: {
|
|
2886
2891
|
focusMode: a,
|
|
2887
2892
|
height: s,
|
|
@@ -2894,7 +2899,7 @@ var Wt = X, Z, Gt = {
|
|
|
2894
2899
|
}];
|
|
2895
2900
|
}
|
|
2896
2901
|
} else n && (this.transformations = [...this.transformations, {
|
|
2897
|
-
key:
|
|
2902
|
+
key: k.Crop,
|
|
2898
2903
|
value: {
|
|
2899
2904
|
focusMode: a,
|
|
2900
2905
|
isFocusModeAuto: o,
|
|
@@ -2904,15 +2909,15 @@ var Wt = X, Z, Gt = {
|
|
|
2904
2909
|
}
|
|
2905
2910
|
getRatioResizePreviewSize(e, t) {
|
|
2906
2911
|
let { height: n, width: r } = this.imageSize;
|
|
2907
|
-
if (this.asset && r && n) return
|
|
2908
|
-
let i = e / t, a = Math.max(Math.round(this.lastResizeSize[
|
|
2912
|
+
if (this.asset && r && n) return Q.fitRatioResizeSize(e, t, r, n);
|
|
2913
|
+
let i = e / t, a = Math.max(Math.round(this.lastResizeSize[P.Pixel].height * i), 0);
|
|
2909
2914
|
return {
|
|
2910
2915
|
height: Math.max(Math.round(a / i), 0),
|
|
2911
2916
|
width: a
|
|
2912
2917
|
};
|
|
2913
2918
|
}
|
|
2914
2919
|
onResizeChange(e) {
|
|
2915
|
-
if (e.detail.unit ===
|
|
2920
|
+
if (e.detail.unit === P.AspectRatio) {
|
|
2916
2921
|
let { height: t, width: n } = this.getRatioResizePreviewSize(e.detail.width, e.detail.height);
|
|
2917
2922
|
this.resizeSize = {
|
|
2918
2923
|
...this.resizeSize,
|
|
@@ -2934,11 +2939,11 @@ var Wt = X, Z, Gt = {
|
|
|
2934
2939
|
onResizeApply(e) {
|
|
2935
2940
|
let { height: t, unit: n, width: r } = e.detail;
|
|
2936
2941
|
if (!Number.isFinite(r) || !Number.isFinite(t)) return;
|
|
2937
|
-
if (this.clearResetSnapshot(), this.lastAction =
|
|
2938
|
-
if (n ===
|
|
2942
|
+
if (this.clearResetSnapshot(), this.lastAction = k.Resize, !this.asset) {
|
|
2943
|
+
if (n === P.AspectRatio) {
|
|
2939
2944
|
let { ratioHeight: e, ratioWidth: t } = this.resizeSize;
|
|
2940
2945
|
t && e && this.upsertTransformation({
|
|
2941
|
-
key:
|
|
2946
|
+
key: k.Resize,
|
|
2942
2947
|
value: {
|
|
2943
2948
|
ratioHeight: e,
|
|
2944
2949
|
ratioWidth: t,
|
|
@@ -2948,7 +2953,7 @@ var Wt = X, Z, Gt = {
|
|
|
2948
2953
|
return;
|
|
2949
2954
|
}
|
|
2950
2955
|
(t || r) && (this.upsertTransformation({
|
|
2951
|
-
key:
|
|
2956
|
+
key: k.Resize,
|
|
2952
2957
|
value: {
|
|
2953
2958
|
height: t,
|
|
2954
2959
|
unit: n,
|
|
@@ -2959,8 +2964,8 @@ var Wt = X, Z, Gt = {
|
|
|
2959
2964
|
}
|
|
2960
2965
|
if (!this.selectedFormat) return;
|
|
2961
2966
|
let i = this.selectedFormat.width || this.defaultSize.width, a = this.selectedFormat.height || this.defaultSize.height, o = r, s = t;
|
|
2962
|
-
this.resizeSize.unit === n ? n ===
|
|
2963
|
-
key:
|
|
2967
|
+
this.resizeSize.unit === n ? n === P.AspectRatio && ({height: s, width: o} = Q.fitRatioResizeSize(r, t, i, a)) : (o = i, s = a), this.transformations = [...this.transformations, {
|
|
2968
|
+
key: k.Resize,
|
|
2964
2969
|
value: {
|
|
2965
2970
|
height: s,
|
|
2966
2971
|
unit: n,
|
|
@@ -2975,23 +2980,23 @@ var Wt = X, Z, Gt = {
|
|
|
2975
2980
|
this.applyRotationTransformation(e.detail);
|
|
2976
2981
|
}
|
|
2977
2982
|
applyRotationTransformation(e) {
|
|
2978
|
-
if (this.clearResetSnapshot(), this.lastAction =
|
|
2983
|
+
if (this.clearResetSnapshot(), this.lastAction = k.Rotate, !this.asset) {
|
|
2979
2984
|
e ? this.upsertTransformation({
|
|
2980
|
-
key:
|
|
2985
|
+
key: k.Rotate,
|
|
2981
2986
|
value: { rotation: e }
|
|
2982
|
-
}) : this.transformations = this.transformations.filter((e) => e.key !==
|
|
2987
|
+
}) : this.transformations = this.transformations.filter((e) => e.key !== k.Rotate);
|
|
2983
2988
|
return;
|
|
2984
2989
|
}
|
|
2985
2990
|
this.selectedFormat && (this.transformations = [...this.transformations, {
|
|
2986
|
-
key:
|
|
2991
|
+
key: k.Rotate,
|
|
2987
2992
|
value: { rotation: e }
|
|
2988
2993
|
}]);
|
|
2989
2994
|
}
|
|
2990
2995
|
onQualityChange(e) {
|
|
2991
2996
|
let t = e.detail;
|
|
2992
|
-
this.selectedFormat && (this.selectedFormat.quality = t), this.clearResetSnapshot(), this.lastAction =
|
|
2997
|
+
this.selectedFormat && (this.selectedFormat.quality = t), this.clearResetSnapshot(), this.lastAction = k.Quality;
|
|
2993
2998
|
let n = {
|
|
2994
|
-
key:
|
|
2999
|
+
key: k.Quality,
|
|
2995
3000
|
value: { quality: t }
|
|
2996
3001
|
};
|
|
2997
3002
|
this.asset ? this.transformations = [...this.transformations, n] : this.upsertTransformation(n);
|
|
@@ -3003,15 +3008,15 @@ var Wt = X, Z, Gt = {
|
|
|
3003
3008
|
keepMetadata: t
|
|
3004
3009
|
}, !this.asset) {
|
|
3005
3010
|
t ? this.upsertTransformation({
|
|
3006
|
-
key:
|
|
3011
|
+
key: k.Metadata,
|
|
3007
3012
|
value: { keepMetadata: t }
|
|
3008
|
-
}) : this.transformations = this.transformations.filter((e) => e.key !==
|
|
3013
|
+
}) : this.transformations = this.transformations.filter((e) => e.key !== k.Metadata);
|
|
3009
3014
|
return;
|
|
3010
3015
|
}
|
|
3011
3016
|
t ? this.upsertTransformation({
|
|
3012
|
-
key:
|
|
3017
|
+
key: k.Metadata,
|
|
3013
3018
|
value: { keepMetadata: t }
|
|
3014
|
-
}) : this.transformations = this.transformations.filter((e) => e.key !==
|
|
3019
|
+
}) : this.transformations = this.transformations.filter((e) => e.key !== k.Metadata);
|
|
3015
3020
|
}
|
|
3016
3021
|
onExtensionChange(e) {
|
|
3017
3022
|
let t = e.detail;
|
|
@@ -3021,14 +3026,14 @@ var Wt = X, Z, Gt = {
|
|
|
3021
3026
|
};
|
|
3022
3027
|
}
|
|
3023
3028
|
syncQuality() {
|
|
3024
|
-
let e = this.transformations.findLast((e) => e.key ===
|
|
3029
|
+
let e = this.transformations.findLast((e) => e.key === k.Quality)?.value?.quality;
|
|
3025
3030
|
this.selectedFormat &&= {
|
|
3026
3031
|
...this.selectedFormat,
|
|
3027
3032
|
quality: e ?? 100
|
|
3028
3033
|
};
|
|
3029
3034
|
}
|
|
3030
3035
|
syncSelectedDimensions(e = !0) {
|
|
3031
|
-
let t = this.transformations.findLast((e) => e.key ===
|
|
3036
|
+
let t = this.transformations.findLast((e) => e.key === k.Dimensions), n = Q.getDimensionsSize(this.selectedDimensions);
|
|
3032
3037
|
if (!t) {
|
|
3033
3038
|
n && (this.selectedDimensions = void 0);
|
|
3034
3039
|
return;
|
|
@@ -3036,7 +3041,7 @@ var Wt = X, Z, Gt = {
|
|
|
3036
3041
|
let r = Math.round(t.value.width ?? 0), i = Math.round(t.value.height ?? 0);
|
|
3037
3042
|
if (e && n?.width === r && n.height === i) return;
|
|
3038
3043
|
let a = this.dimensionsItems.find((e) => {
|
|
3039
|
-
let t =
|
|
3044
|
+
let t = Q.getDimensionsPresetSize(e.value);
|
|
3040
3045
|
return !e.disabled && t?.width === r && t.height === i;
|
|
3041
3046
|
});
|
|
3042
3047
|
this.selectedDimensions = a ? {
|
|
@@ -3050,7 +3055,7 @@ var Wt = X, Z, Gt = {
|
|
|
3050
3055
|
};
|
|
3051
3056
|
}
|
|
3052
3057
|
get hasResettableState() {
|
|
3053
|
-
let e =
|
|
3058
|
+
let e = Jt.filter((e) => this.activeParts.includes(e));
|
|
3054
3059
|
return this.canReorder && this.activeParts.some((t, n) => t !== e[n]) || this.transformations.length > 0 ? !0 : this.canAutoFormat && !this.autoFormat;
|
|
3055
3060
|
}
|
|
3056
3061
|
clearResetSnapshot() {
|
|
@@ -3070,18 +3075,18 @@ var Wt = X, Z, Gt = {
|
|
|
3070
3075
|
let e = !!this.defaultProxy && !!this.proxies?.some((e) => e.id === this.defaultProxy);
|
|
3071
3076
|
this.selectedProxy = e ? this.defaultProxy : this.selectedProxy || this.proxies?.[0]?.id || "";
|
|
3072
3077
|
}
|
|
3073
|
-
this.transformations = [], this.canReorder && (this.parts =
|
|
3078
|
+
this.transformations = [], this.canReorder && (this.parts = Jt.filter((e) => this.activeParts.includes(e)), this.emitReorder()), this.frozenIndex = -1, this.syncQuality();
|
|
3074
3079
|
}
|
|
3075
3080
|
onDimensionsChange(e) {
|
|
3076
3081
|
e.stopPropagation();
|
|
3077
|
-
let t =
|
|
3078
|
-
this.clearResetSnapshot(), this.lastAction =
|
|
3079
|
-
key:
|
|
3082
|
+
let t = Q.getDimensionsSize(e.detail);
|
|
3083
|
+
this.clearResetSnapshot(), this.lastAction = k.Dimensions, this.selectedDimensions = { ...e.detail }, t ? this.upsertTransformation({
|
|
3084
|
+
key: k.Dimensions,
|
|
3080
3085
|
value: t
|
|
3081
|
-
}) : this.transformations = this.transformations.filter((e) => e.key !==
|
|
3086
|
+
}) : this.transformations = this.transformations.filter((e) => e.key !== k.Dimensions), this.capCropToMaxSize();
|
|
3082
3087
|
}
|
|
3083
3088
|
onCropToggle(e) {
|
|
3084
|
-
e.stopPropagation(), this.clearResetSnapshot(), this.cropEnabled = e.currentTarget.checked, this.cropEnabled || (this.transformations = this.transformations.filter((e) => e.key !==
|
|
3089
|
+
e.stopPropagation(), this.clearResetSnapshot(), this.cropEnabled = e.currentTarget.checked, this.cropEnabled || (this.transformations = this.transformations.filter((e) => e.key !== k.Crop)), this.emit("cx-asset-link-format-crop-toggle", { detail: this.cropEnabled });
|
|
3085
3090
|
}
|
|
3086
3091
|
renderDimensionsPart() {
|
|
3087
3092
|
return e`<cx-asset-link-format-dimensions class="asset-link-format__details" .applyBehavior=${this.isFormatsLayout ? N.Automatic : N.Manual} .inline=${this.isFormatsLayout} ?open=${this.activeSetting === "cx-asset-link-format-dimensions"} ?loading=${this.loading} .items=${this.dimensionsItems} .value=${this.selectedDimensions} ?can-custom=${this.canCustomDimensions} @cx-asset-link-format-dimensions-change=${this.onDimensionsChange}></cx-asset-link-format-dimensions>`;
|
|
@@ -3093,23 +3098,23 @@ var Wt = X, Z, Gt = {
|
|
|
3093
3098
|
return m(this.canReorder, () => e`<div class="asset-link-format__order-hint" data-testid="cx-asset-link-format-order-hint">${this.localize.term("transformationOrderHint")}</div>`);
|
|
3094
3099
|
}
|
|
3095
3100
|
renderProxyPart() {
|
|
3096
|
-
return e`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction ===
|
|
3101
|
+
return e`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === k.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`;
|
|
3097
3102
|
}
|
|
3098
3103
|
renderCropEditor(t) {
|
|
3099
|
-
let n = this.asset ? this.lastResizeSize[
|
|
3100
|
-
return e`<cx-asset-link-format-crop class="asset-link-format__details" .inline=${t} ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction ===
|
|
3104
|
+
let n = this.asset ? this.lastResizeSize[P.Pixel] : this.cropMaxSize;
|
|
3105
|
+
return e`<cx-asset-link-format-crop class="asset-link-format__details" .inline=${t} ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === k.Crop} ?show-position-picker=${!this.asset} ?has-cropper=${!!this.cropperElement} ?dimensions-limited=${this.isCropAtDimensionsLimit} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${n.width} max-height=${n.height} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} position=${this.cropSize.position} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-position-change=${this.onCropPositionChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`;
|
|
3101
3106
|
}
|
|
3102
3107
|
renderCropPart() {
|
|
3103
3108
|
return this.isFormatsLayout ? e`<div class="asset-link-format__formats-crop"><cx-space class="asset-link-format__formats-summary" align-items="center" justify-content="space-between"><cx-space align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body3">${this.localize.term("crop")}</cx-typography></cx-space><cx-switch data-testid="cx-asset-link-format-crop-toggle" .checked=${this.cropEnabled} ?disabled=${this.loading} @cx-change=${this.onCropToggle}><cx-visually-hidden>${this.localize.term("crop")}</cx-visually-hidden></cx-switch></cx-space>${m(this.cropEnabled, () => this.renderCropEditor(!0))}</div>` : this.renderCropEditor(!1);
|
|
3104
3109
|
}
|
|
3105
3110
|
renderResizePart() {
|
|
3106
|
-
return e`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction ===
|
|
3111
|
+
return e`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === k.Resize} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : Infinity} max-height=${this.asset ? this.imageSize.height : Infinity} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`;
|
|
3107
3112
|
}
|
|
3108
3113
|
renderRotatePart() {
|
|
3109
|
-
return e`<cx-asset-link-format-rotation class="asset-link-format__details" .inline=${this.isFormatsLayout} ?loading=${this.loading && this.lastAction ===
|
|
3114
|
+
return e`<cx-asset-link-format-rotation class="asset-link-format__details" .inline=${this.isFormatsLayout} ?loading=${this.loading && this.lastAction === k.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`;
|
|
3110
3115
|
}
|
|
3111
3116
|
renderQualityPart() {
|
|
3112
|
-
return e`<cx-asset-link-format-quality class="asset-link-format__details" .applyBehavior=${this.isFormatsLayout ? N.Automatic : N.Manual} .inline=${this.isFormatsLayout} ?loading=${this.loading && this.lastAction ===
|
|
3117
|
+
return e`<cx-asset-link-format-quality class="asset-link-format__details" .applyBehavior=${this.isFormatsLayout ? N.Automatic : N.Manual} .inline=${this.isFormatsLayout} ?loading=${this.loading && this.lastAction === k.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} .items=${this.qualityItems} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>`;
|
|
3113
3118
|
}
|
|
3114
3119
|
renderMetadataPart() {
|
|
3115
3120
|
return e`<cx-asset-link-format-metadata class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-metadata"} .value=${this.selectedFormat?.keepMetadata ?? !1} @cx-asset-link-format-metadata-change=${this.onMetadataChange}></cx-asset-link-format-metadata>`;
|
|
@@ -3128,7 +3133,7 @@ var Wt = X, Z, Gt = {
|
|
|
3128
3133
|
}
|
|
3129
3134
|
render() {
|
|
3130
3135
|
return e`<div class="asset-link-format ${this.isFormatsLayout ? "asset-link-format--formats" : ""}" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${this.renderHeader()}
|
|
3131
|
-
${this.renderOrderHint()}<div class="asset-link-format__panels">${S(this.activeParts, (e) => e, (t) => e`<div class="asset-link-format__panel" data-part=${t} ?data-reorderable=${this.canReorder &&
|
|
3136
|
+
${this.renderOrderHint()}<div class="asset-link-format__panels">${S(this.activeParts, (e) => e, (t) => e`<div class="asset-link-format__panel" data-part=${t} ?data-reorderable=${this.canReorder && Yt.includes(t)}>${m(this.canReorder && Yt.includes(t), () => e`<cx-icon-button class="asset-link-format__drag-handle" name="drag_indicator" label=${this.localize.term("reorderTransformation", this.localize.term(t))} ?disabled=${this.loading} @keydown=${this.handleReorderKeyDown}></cx-icon-button>`)}
|
|
3132
3137
|
${this.renderPart(t)}</div>`)}</div><span class="asset-link-format__announcement" role="status" aria-live="polite">${this.reorderAnnouncement}</span>${m(this.useCustomExtension, () => e`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`)}<div class="asset-link-format__footer"><slot name="footer"></slot></div></div>`;
|
|
3133
3138
|
}
|
|
3134
3139
|
};
|
|
@@ -3246,7 +3251,7 @@ a([c(".sortable-fallback"), o("design:type", Object)], $.prototype, "dragCopy",
|
|
|
3246
3251
|
o("design:type", Function),
|
|
3247
3252
|
o("design:paramtypes", []),
|
|
3248
3253
|
o("design:returntype", void 0)
|
|
3249
|
-
], $.prototype, "handleReorderableChange", null), $ =
|
|
3250
|
-
var
|
|
3254
|
+
], $.prototype, "handleReorderableChange", null), $ = Q = a([u("cx-asset-link-format"), o("design:paramtypes", [])], $);
|
|
3255
|
+
var Xt = $;
|
|
3251
3256
|
//#endregion
|
|
3252
|
-
export { lt as C, gt as S, je as T, Je as _, Qe as a, pt as b,
|
|
3257
|
+
export { lt as C, gt as S, je as T, Je as _, Qe as a, pt as b, L as c, $e as d, Ge as f, qe as g, R as h, St as i, Ue as l, et as m, Tt as n, Ve as o, Ke as p, Ct as r, I as s, Xt as t, We as u, Ye as v, Me as w, vt as x, _t as y };
|