@clickview/exchange 0.60.0-rc.1 → 0.60.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/en.json +1 -1
- package/dist/scripts/{BKi3hrx8.chunk.js → 04pgOdRO.chunk.js} +2 -2
- package/dist/scripts/{BKi3hrx8.chunk.js.map → 04pgOdRO.chunk.js.map} +1 -1
- package/dist/scripts/{Cun6Bm0P.chunk.js → 3TcDzXoX.chunk.js} +2 -2
- package/dist/scripts/{Cun6Bm0P.chunk.js.map → 3TcDzXoX.chunk.js.map} +1 -1
- package/dist/scripts/{BtawqZ6G.chunk.js → 4J0Xi0Li.chunk.js} +2 -2
- package/dist/scripts/{BtawqZ6G.chunk.js.map → 4J0Xi0Li.chunk.js.map} +1 -1
- package/dist/scripts/{CVs6MQ2N.chunk.js → 6IXg6l1D.chunk.js} +2 -2
- package/dist/scripts/{CVs6MQ2N.chunk.js.map → 6IXg6l1D.chunk.js.map} +1 -1
- package/dist/scripts/{DL2-cCw6.chunk.js → B-owbLzH.chunk.js} +2 -2
- package/dist/scripts/{DL2-cCw6.chunk.js.map → B-owbLzH.chunk.js.map} +1 -1
- package/dist/scripts/{DRrC3MD7.chunk.js → B0F-zuCm.chunk.js} +2 -2
- package/dist/scripts/{DRrC3MD7.chunk.js.map → B0F-zuCm.chunk.js.map} +1 -1
- package/dist/scripts/{CA_kgZyj.chunk.js → B70FMVao.chunk.js} +2 -2
- package/dist/scripts/{CA_kgZyj.chunk.js.map → B70FMVao.chunk.js.map} +1 -1
- package/dist/scripts/{4fxPWB-y.chunk.js → BBHWPp1j.chunk.js} +2 -2
- package/dist/scripts/{4fxPWB-y.chunk.js.map → BBHWPp1j.chunk.js.map} +1 -1
- package/dist/scripts/{BtdA62QV.chunk.js → BDyAv0Lu.chunk.js} +2 -2
- package/dist/scripts/{BtdA62QV.chunk.js.map → BDyAv0Lu.chunk.js.map} +1 -1
- package/dist/scripts/{BifrjGRd.chunk.js → BE4-eyTT.chunk.js} +2 -2
- package/dist/scripts/{BifrjGRd.chunk.js.map → BE4-eyTT.chunk.js.map} +1 -1
- package/dist/scripts/BLzBP6Wz.chunk.js +2 -0
- package/dist/scripts/{S3AKKGaX.chunk.js.map → BLzBP6Wz.chunk.js.map} +1 -1
- package/dist/scripts/{B-uJ9QxS.chunk.js → BVLYrDIr.chunk.js} +2 -2
- package/dist/scripts/{B-uJ9QxS.chunk.js.map → BVLYrDIr.chunk.js.map} +1 -1
- package/dist/scripts/{BF-Dxna8.chunk.js → BYcoChXb.chunk.js} +2 -2
- package/dist/scripts/{BF-Dxna8.chunk.js.map → BYcoChXb.chunk.js.map} +1 -1
- package/dist/scripts/{Z9Jn5Q8R.chunk.js → Ba34yA9D.chunk.js} +2 -2
- package/dist/scripts/{Z9Jn5Q8R.chunk.js.map → Ba34yA9D.chunk.js.map} +1 -1
- package/dist/scripts/{BR315om5.chunk.js → BcMlwk5Q.chunk.js} +2 -2
- package/dist/scripts/{BR315om5.chunk.js.map → BcMlwk5Q.chunk.js.map} +1 -1
- package/dist/scripts/{CSOZNOFJ.chunk.js → Bf6VCMqm.chunk.js} +2 -2
- package/dist/scripts/{CSOZNOFJ.chunk.js.map → Bf6VCMqm.chunk.js.map} +1 -1
- package/dist/scripts/{BP4XTpZ5.chunk.js → BgJkDMpd.chunk.js} +2 -2
- package/dist/scripts/{BP4XTpZ5.chunk.js.map → BgJkDMpd.chunk.js.map} +1 -1
- package/dist/scripts/{DL6RqYme.chunk.js → Bh24QUEJ.chunk.js} +2 -2
- package/dist/scripts/{DL6RqYme.chunk.js.map → Bh24QUEJ.chunk.js.map} +1 -1
- package/dist/scripts/{CwSSqnpd.chunk.js → BlIARVZO.chunk.js} +2 -2
- package/dist/scripts/{CwSSqnpd.chunk.js.map → BlIARVZO.chunk.js.map} +1 -1
- package/dist/scripts/{ChMcPIOp.chunk.js → BljWHlhm.chunk.js} +2 -2
- package/dist/scripts/{ChMcPIOp.chunk.js.map → BljWHlhm.chunk.js.map} +1 -1
- package/dist/scripts/{cQwhiWVd.chunk.js → BmyPQ5jE.chunk.js} +2 -2
- package/dist/scripts/{cQwhiWVd.chunk.js.map → BmyPQ5jE.chunk.js.map} +1 -1
- package/dist/scripts/{D4iJdObW.chunk.js → Bnz0fDvK.chunk.js} +2 -2
- package/dist/scripts/{D4iJdObW.chunk.js.map → Bnz0fDvK.chunk.js.map} +1 -1
- package/dist/scripts/BsADH-lw.chunk.js +2 -0
- package/dist/scripts/{8FKVdaoV.chunk.js.map → BsADH-lw.chunk.js.map} +1 -1
- package/dist/scripts/{DGXKrtD9.chunk.js → BsOHikPe.chunk.js} +2 -2
- package/dist/scripts/{DGXKrtD9.chunk.js.map → BsOHikPe.chunk.js.map} +1 -1
- package/dist/scripts/{wf3__oqz.chunk.js → BtjfZQnL.chunk.js} +2 -2
- package/dist/scripts/{wf3__oqz.chunk.js.map → BtjfZQnL.chunk.js.map} +1 -1
- package/dist/scripts/{BwOCU8N2.chunk.js → BuAs5ec9.chunk.js} +2 -2
- package/dist/scripts/{BwOCU8N2.chunk.js.map → BuAs5ec9.chunk.js.map} +1 -1
- package/dist/scripts/BukJ7aUR.chunk.js +2 -0
- package/dist/scripts/{n2Lzk-vZ.chunk.js.map → BukJ7aUR.chunk.js.map} +1 -1
- package/dist/scripts/ByhKhOKU.chunk.js +2 -0
- package/dist/scripts/{C7hbvwax.chunk.js.map → ByhKhOKU.chunk.js.map} +1 -1
- package/dist/scripts/{BF5o8dSk.chunk.js → C1ZMk5wM.chunk.js} +2 -2
- package/dist/scripts/{BF5o8dSk.chunk.js.map → C1ZMk5wM.chunk.js.map} +1 -1
- package/dist/scripts/{CkssErVA.chunk.js → C3y5p8CZ.chunk.js} +2 -2
- package/dist/scripts/{CkssErVA.chunk.js.map → C3y5p8CZ.chunk.js.map} +1 -1
- package/dist/scripts/C7EM5k6B.chunk.js +2 -0
- package/dist/scripts/{BzroV7uY.chunk.js.map → C7EM5k6B.chunk.js.map} +1 -1
- package/dist/scripts/{q9Uu2NWp.chunk.js → CFk0WB2c.chunk.js} +2 -2
- package/dist/scripts/{q9Uu2NWp.chunk.js.map → CFk0WB2c.chunk.js.map} +1 -1
- package/dist/scripts/{B8OodjhB.chunk.js → CJIFCVgE.chunk.js} +2 -2
- package/dist/scripts/{B8OodjhB.chunk.js.map → CJIFCVgE.chunk.js.map} +1 -1
- package/dist/scripts/{BlSWUMP3.chunk.js → CKvSiIEq.chunk.js} +2 -2
- package/dist/scripts/{BlSWUMP3.chunk.js.map → CKvSiIEq.chunk.js.map} +1 -1
- package/dist/scripts/CMCojMYr.chunk.js +2 -0
- package/dist/scripts/{_IXItgx2.chunk.js.map → CMCojMYr.chunk.js.map} +1 -1
- package/dist/scripts/{TstEXSQN.chunk.js → CPlxz4qV.chunk.js} +2 -2
- package/dist/scripts/{TstEXSQN.chunk.js.map → CPlxz4qV.chunk.js.map} +1 -1
- package/dist/scripts/{I59Hs9Lx.chunk.js → CTVtP7l8.chunk.js} +2 -2
- package/dist/scripts/{I59Hs9Lx.chunk.js.map → CTVtP7l8.chunk.js.map} +1 -1
- package/dist/scripts/{DVWWhAdQ.chunk.js → C_4wt9AF.chunk.js} +2 -2
- package/dist/scripts/{DVWWhAdQ.chunk.js.map → C_4wt9AF.chunk.js.map} +1 -1
- package/dist/scripts/{CCRn1ABX.chunk.js → CbaYOIsv.chunk.js} +2 -2
- package/dist/scripts/{CCRn1ABX.chunk.js.map → CbaYOIsv.chunk.js.map} +1 -1
- package/dist/scripts/{Ctt5fJ1m.chunk.js → CcpXNvK8.chunk.js} +2 -2
- package/dist/scripts/{Ctt5fJ1m.chunk.js.map → CcpXNvK8.chunk.js.map} +1 -1
- package/dist/scripts/{Bn0x3bVV.chunk.js → Cd9rSWFI.chunk.js} +2 -2
- package/dist/scripts/{Bn0x3bVV.chunk.js.map → Cd9rSWFI.chunk.js.map} +1 -1
- package/dist/scripts/{D8DlnPuu.chunk.js → Cfz-NLA8.chunk.js} +2 -2
- package/dist/scripts/{D8DlnPuu.chunk.js.map → Cfz-NLA8.chunk.js.map} +1 -1
- package/dist/scripts/{DcycuoCp.chunk.js → CoH7ITiF.chunk.js} +2 -2
- package/dist/scripts/{DcycuoCp.chunk.js.map → CoH7ITiF.chunk.js.map} +1 -1
- package/dist/scripts/{6azg5FPO.chunk.js → Cp5iJov7.chunk.js} +2 -2
- package/dist/scripts/{6azg5FPO.chunk.js.map → Cp5iJov7.chunk.js.map} +1 -1
- package/dist/scripts/{CwIkFpAK.chunk.js → CqC__fxH.chunk.js} +2 -2
- package/dist/scripts/{CwIkFpAK.chunk.js.map → CqC__fxH.chunk.js.map} +1 -1
- package/dist/scripts/{BxTf0tGn.chunk.js → CtxDEXnF.chunk.js} +2 -2
- package/dist/scripts/{BxTf0tGn.chunk.js.map → CtxDEXnF.chunk.js.map} +1 -1
- package/dist/scripts/{BOA4xw3e.chunk.js → CvWjVTu3.chunk.js} +2 -2
- package/dist/scripts/{BOA4xw3e.chunk.js.map → CvWjVTu3.chunk.js.map} +1 -1
- package/dist/scripts/{rTx16rRP.chunk.js → D434QRYT.chunk.js} +2 -2
- package/dist/scripts/{rTx16rRP.chunk.js.map → D434QRYT.chunk.js.map} +1 -1
- package/dist/scripts/{CLc8za1x.chunk.js → D4Zjf8Y5.chunk.js} +2 -2
- package/dist/scripts/{CLc8za1x.chunk.js.map → D4Zjf8Y5.chunk.js.map} +1 -1
- package/dist/scripts/{BRNWJUo1.chunk.js → D6ZrWp-l.chunk.js} +2 -2
- package/dist/scripts/{BRNWJUo1.chunk.js.map → D6ZrWp-l.chunk.js.map} +1 -1
- package/dist/scripts/{CMMBNKu7.chunk.js → D8Heuhhv.chunk.js} +2 -2
- package/dist/scripts/{CMMBNKu7.chunk.js.map → D8Heuhhv.chunk.js.map} +1 -1
- package/dist/scripts/{DewN2Vb_.chunk.js → DB2D8K7H.chunk.js} +2 -2
- package/dist/scripts/{DewN2Vb_.chunk.js.map → DB2D8K7H.chunk.js.map} +1 -1
- package/dist/scripts/{D8_lXBys.chunk.js → DBVjri4c.chunk.js} +2 -2
- package/dist/scripts/{D8_lXBys.chunk.js.map → DBVjri4c.chunk.js.map} +1 -1
- package/dist/scripts/{BNuBfH8m.chunk.js → DE1BrYZL.chunk.js} +2 -2
- package/dist/scripts/{BNuBfH8m.chunk.js.map → DE1BrYZL.chunk.js.map} +1 -1
- package/dist/scripts/{wSwn3D46.chunk.js → DFEzVltS.chunk.js} +2 -2
- package/dist/scripts/{wSwn3D46.chunk.js.map → DFEzVltS.chunk.js.map} +1 -1
- package/dist/scripts/{BR_T92IH.chunk.js → DJIcjqQb.chunk.js} +2 -2
- package/dist/scripts/{BR_T92IH.chunk.js.map → DJIcjqQb.chunk.js.map} +1 -1
- package/dist/scripts/{DovRcfVM.chunk.js → DO5O1Cbr.chunk.js} +2 -2
- package/dist/scripts/{DovRcfVM.chunk.js.map → DO5O1Cbr.chunk.js.map} +1 -1
- package/dist/scripts/{DsjV9PPn.chunk.js → DRm_bkxA.chunk.js} +2 -2
- package/dist/scripts/{DsjV9PPn.chunk.js.map → DRm_bkxA.chunk.js.map} +1 -1
- package/dist/scripts/{9Rt0MZjT.chunk.js → DT4IRGxK.chunk.js} +2 -2
- package/dist/scripts/{9Rt0MZjT.chunk.js.map → DT4IRGxK.chunk.js.map} +1 -1
- package/dist/scripts/{DR4ix3Le.chunk.js → DUhtYhkt.chunk.js} +2 -2
- package/dist/scripts/{DR4ix3Le.chunk.js.map → DUhtYhkt.chunk.js.map} +1 -1
- package/dist/scripts/{C1OCfDUr.chunk.js → DWEY8djx.chunk.js} +2 -2
- package/dist/scripts/{C1OCfDUr.chunk.js.map → DWEY8djx.chunk.js.map} +1 -1
- package/dist/scripts/{DSvyU13L.chunk.js → DWvjreQC.chunk.js} +2 -2
- package/dist/scripts/{DSvyU13L.chunk.js.map → DWvjreQC.chunk.js.map} +1 -1
- package/dist/scripts/{fECuBMLR.chunk.js → D_1yBiR4.chunk.js} +2 -2
- package/dist/scripts/{fECuBMLR.chunk.js.map → D_1yBiR4.chunk.js.map} +1 -1
- package/dist/scripts/{3OkTFdK2.chunk.js → Da25i9yA.chunk.js} +2 -2
- package/dist/scripts/{3OkTFdK2.chunk.js.map → Da25i9yA.chunk.js.map} +1 -1
- package/dist/scripts/DajpMvCp.chunk.js +2 -0
- package/dist/scripts/{DkDHWI8R.chunk.js.map → DajpMvCp.chunk.js.map} +1 -1
- package/dist/scripts/{D24CCnbD.chunk.js → DazbnkYw.chunk.js} +2 -2
- package/dist/scripts/{D24CCnbD.chunk.js.map → DazbnkYw.chunk.js.map} +1 -1
- package/dist/scripts/{CT6hE7w6.chunk.js → DcxTi_y6.chunk.js} +2 -2
- package/dist/scripts/{CT6hE7w6.chunk.js.map → DcxTi_y6.chunk.js.map} +1 -1
- package/dist/scripts/{DRRhiZBL.chunk.js → Dfj7IDd2.chunk.js} +2 -2
- package/dist/scripts/{DRRhiZBL.chunk.js.map → Dfj7IDd2.chunk.js.map} +1 -1
- package/dist/scripts/{PrSoxgla.chunk.js → Dfz11JwF.chunk.js} +2 -2
- package/dist/scripts/{PrSoxgla.chunk.js.map → Dfz11JwF.chunk.js.map} +1 -1
- package/dist/scripts/{WI7FPt1a.chunk.js → DhQH7eoo.chunk.js} +2 -2
- package/dist/scripts/{WI7FPt1a.chunk.js.map → DhQH7eoo.chunk.js.map} +1 -1
- package/dist/scripts/{CNP8DTSw.chunk.js → Dk7j_X12.chunk.js} +2 -2
- package/dist/scripts/{CNP8DTSw.chunk.js.map → Dk7j_X12.chunk.js.map} +1 -1
- package/dist/scripts/{BAdNjc7A.chunk.js → Dn33djw5.chunk.js} +2 -2
- package/dist/scripts/{BAdNjc7A.chunk.js.map → Dn33djw5.chunk.js.map} +1 -1
- package/dist/scripts/{BberNguh.chunk.js → DoDHNhqQ.chunk.js} +2 -2
- package/dist/scripts/{BberNguh.chunk.js.map → DoDHNhqQ.chunk.js.map} +1 -1
- package/dist/scripts/{BUDMpJX2.chunk.js → DoKxE03f.chunk.js} +2 -2
- package/dist/scripts/{BUDMpJX2.chunk.js.map → DoKxE03f.chunk.js.map} +1 -1
- package/dist/scripts/{S5nHSRfa.chunk.js → DtHc20G9.chunk.js} +2 -2
- package/dist/scripts/{S5nHSRfa.chunk.js.map → DtHc20G9.chunk.js.map} +1 -1
- package/dist/scripts/{BLByhXZW.chunk.js → ERJS4wRT.chunk.js} +2 -2
- package/dist/scripts/{BLByhXZW.chunk.js.map → ERJS4wRT.chunk.js.map} +1 -1
- package/dist/scripts/{BQ-BKyM1.chunk.js → EvPAqFMl.chunk.js} +2 -2
- package/dist/scripts/{BQ-BKyM1.chunk.js.map → EvPAqFMl.chunk.js.map} +1 -1
- package/dist/scripts/{B1uz-Qnj.chunk.js → LW0dQJSk.chunk.js} +2 -2
- package/dist/scripts/{B1uz-Qnj.chunk.js.map → LW0dQJSk.chunk.js.map} +1 -1
- package/dist/scripts/{LDI1zHGl.chunk.js → LZIgIAoQ.chunk.js} +2 -2
- package/dist/scripts/{LDI1zHGl.chunk.js.map → LZIgIAoQ.chunk.js.map} +1 -1
- package/dist/scripts/{CUdFCpCV.chunk.js → M6sIzXk3.chunk.js} +2 -2
- package/dist/scripts/{CUdFCpCV.chunk.js.map → M6sIzXk3.chunk.js.map} +1 -1
- package/dist/scripts/{DSzyGUtv.chunk.js → NgXKdsdO.chunk.js} +2 -2
- package/dist/scripts/{DSzyGUtv.chunk.js.map → NgXKdsdO.chunk.js.map} +1 -1
- package/dist/scripts/{CnvPx00U.chunk.js → NuQ4YL4o.chunk.js} +2 -2
- package/dist/scripts/{CnvPx00U.chunk.js.map → NuQ4YL4o.chunk.js.map} +1 -1
- package/dist/scripts/{app-F40DpJf0.js → app-DIXL6Xww.js} +3 -3
- package/dist/scripts/{app-F40DpJf0.js.map → app-DIXL6Xww.js.map} +1 -1
- package/dist/scripts/{BjXCJlUR.chunk.js → h2FRNRf6.chunk.js} +2 -2
- package/dist/scripts/{BjXCJlUR.chunk.js.map → h2FRNRf6.chunk.js.map} +1 -1
- package/dist/scripts/{3wFLNakR.chunk.js → nX8j1O82.chunk.js} +2 -2
- package/dist/scripts/{3wFLNakR.chunk.js.map → nX8j1O82.chunk.js.map} +1 -1
- package/dist/scripts/{D4tR-WZQ.chunk.js → o4QgtA_X.chunk.js} +2 -2
- package/dist/scripts/{D4tR-WZQ.chunk.js.map → o4QgtA_X.chunk.js.map} +1 -1
- package/dist/scripts/{XcHkZOyF.chunk.js → qxfO3cEF.chunk.js} +2 -2
- package/dist/scripts/{XcHkZOyF.chunk.js.map → qxfO3cEF.chunk.js.map} +1 -1
- package/dist/scripts/{qlF3nlLO.chunk.js → r1PHK19X.chunk.js} +2 -2
- package/dist/scripts/{qlF3nlLO.chunk.js.map → r1PHK19X.chunk.js.map} +1 -1
- package/dist/scripts/{Bf7PNHQi.chunk.js → rOIj7KLN.chunk.js} +2 -2
- package/dist/scripts/{Bf7PNHQi.chunk.js.map → rOIj7KLN.chunk.js.map} +1 -1
- package/dist/scripts/{SIOFUPM8.chunk.js → roCgVX3B.chunk.js} +3 -3
- package/dist/scripts/{SIOFUPM8.chunk.js.map → roCgVX3B.chunk.js.map} +1 -1
- package/dist/scripts/{CMsNmlo3.chunk.js → yublbxR_.chunk.js} +2 -2
- package/dist/scripts/{CMsNmlo3.chunk.js.map → yublbxR_.chunk.js.map} +1 -1
- package/package.json +1 -1
- package/dist/scripts/8FKVdaoV.chunk.js +0 -2
- package/dist/scripts/BzroV7uY.chunk.js +0 -2
- package/dist/scripts/C7hbvwax.chunk.js +0 -2
- package/dist/scripts/DkDHWI8R.chunk.js +0 -2
- package/dist/scripts/S3AKKGaX.chunk.js +0 -2
- package/dist/scripts/_IXItgx2.chunk.js +0 -2
- package/dist/scripts/n2Lzk-vZ.chunk.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CwSSqnpd.chunk.js","sources":["../../../../libs/shared/src/interfaces/models/curated-widget/CuratedWidget.ts","../../../../libs/shared/src/apps/search/interfaces/SearchFilter.ts","../../../../libs/shared/src/enums/WidgetTemplate.ts","../../../../libs/shared/src/enums/WidgetTypeId.ts","../../../../libs/shared/src/utils/DashboardHelper.ts","../../../../libs/shared/src/constants/WidgetTypeIdConfig.ts","../../../../libs/shared/src/images/svg/status/WarningOutlineSvg.tsx","../../../../libs/shared/src/enums/WidgetStatus.ts","../../../../libs/shared/src/utils/WidgetHelper.ts","../../../../libs/shared/src/components/widgets/curated-widgets/components/header/WidgetHeader.tsx","../../../../libs/shared/src/enums/TagType.ts","../../../../libs/shared/src/components/tags/TagItem.tsx"],"sourcesContent":["import { HashObject } from 'libs/common/react/interfaces';\n\nimport { AllWidgetTemplateProps } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { ButtonIcon } from 'libs/shared/constants/WidgetThemingConstants';\nimport { WidgetStatus } from 'libs/shared/enums/WidgetStatus';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { CuratedObjectsWidgetData, CuratedWidgetContent, CuratedWidgetData } from 'libs/shared/interfaces';\n\nexport enum CuratedDashboardAppLink {\n LatestReleases = 'latest-releases',\n ExploreAllTopics = 'explore-all-topics',\n ClassificationLatestReleases = 'classification-latest-releases',\n ClassificationDirectory = 'classification-directory',\n}\n\nexport enum CuratedWidgetCtaAppLink {\n TopicDirectory = 'topic-directory',\n TopicNewReleases = 'topic-new-releases',\n CuratedTopic = 'curated-topic'\n}\n\nexport interface BaseWidget<TContent extends HashObject = HashObject> {\n index: number;\n templateId: WidgetTemplate;\n widgetId: WidgetTypeId;\n name: string;\n description?: string;\n content?: TContent\n}\n\nexport interface WidgetCta {\n text?: string;\n href?: string;\n icon?: ButtonIcon;\n appLink?: CuratedWidgetCtaAppLink;\n}\n\nexport type WidgetMetadata = AllWidgetTemplateProps['metadata'] & {\n showInTableOfContents: boolean;\n tocIndentation: number;\n headingOptional: boolean;\n aiAddedVideo: boolean;\n};\n\nexport interface WidgetPreference {\n id: string;\n index?: number;\n hidden?: boolean;\n}\n\nexport interface CuratedWidget<\n TData extends CuratedWidgetData = CuratedWidgetData,\n TContent extends CuratedWidgetContent = CuratedWidgetContent\n> extends BaseWidget<TContent> {\n id: string;\n dashboardId: string;\n data: TData;\n status: WidgetStatus;\n metadata?: Partial<WidgetMetadata>;\n preferences?: WidgetPreference[];\n cursor?: string;\n\n // If a widget has curriculum IDs set, then it won't be accessible to anyone who doesn't have one of those curriculums\n curriculumIds?: string[];\n}\n\nexport type CuratedMediaWidget<\n TContent extends CuratedWidgetContent = CuratedWidgetContent\n> = CuratedWidget<CuratedObjectsWidgetData, TContent>;","import { SvgIcon } from 'libs/shared/utils/SvgHelper';\n\nimport { FilterStateHash } from '../reducers';\n\nimport { FilterProps } from './FilterProps';\nimport { SearchIndices } from './SearchResults';\n\nconst FilterIdNames =\n[\n 'sort', // \"sort\" isn't even a filter but it tends to go with our filters in our designs\n 'classification',\n 'presentation',\n 'audience',\n 'yearGroup',\n 'moviesAndTv',\n 'type',\n 'rating',\n 'interactives',\n 'clips',\n 'classroom',\n 'hasResources',\n 'hasSubtitles',\n 'productionYear',\n 'isHd',\n 'producedByClickView',\n 'duration',\n 'tagOrClassification',\n 'status',\n 'isAdmin',\n 'bulkActionType',\n 'userType',\n 'filter',\n 'channel',\n 'dateBroadcast',\n 'categoryId',\n 'hasInteractives',\n 'jobStatus',\n 'source',\n 'customerStatus',\n 'specialEventType',\n 'customerType',\n 'seriesId',\n 'scopeId'\n] as const;\n\n/**\n * Any filters that shouldn't be sent to the backend as a filter\n * and are instead handled differently by the frontend\n */\nconst FilterBlacklist: Partial<Record<FilterIds, boolean>> = {\n type: true\n};\n\nexport type FilterIds = typeof FilterIdNames[number];\n\nexport const FilterWhitelist = FilterIdNames.reduce((acc, prev) => {\n return {\n ...acc,\n [prev]: !FilterBlacklist[prev]\n };\n}, {} as Record<FilterIds, boolean>);\n\nexport type FilterType = 'radio' | 'checkbox' | 'nested-checkbox' | 'grouped-checkbox' | 'switch' | 'more-filters' | 'rating' | 'dropdown' | 'tag' | 'button';\n\nexport interface SearchFilter<TFilterOptionId = string> {\n id: FilterIds;\n type: FilterType;\n compatibleIndices: SearchIndices[];\n\n name?: string;\n icon?: SvgIcon;\n description?: string;\n options?: FilterOption<TFilterOptionId>[];\n labelPrefix?: string;\n\n // For second layer options, for example 'presentation' checkbox filter has 'audience' as second layer option\n secondaryId?: FilterIds;\n\n customComponent?: (props: FilterProps) => JSX.Element;\n disabled?: boolean;\n disableOptions?: (options: FilterOption[], filters: SearchFilter[], state: FilterStateHash) => FilterOption[];\n}\n\nexport interface MoreFilters extends Omit<SearchFilter, 'id' | 'compatibleIndices'> {\n filters: SearchFilter[];\n id: string;\n}\n\nexport interface FilterOption<TId = string> {\n id: TId;\n name: string;\n default?: boolean;\n disabled?: boolean;\n secondLayerSelection?: FilterOption[];\n secondLayerOptions?: FilterOption[];\n group?: string;\n}\n\nexport type ProductionYearFilterOptions =\n 'any-year'\n | 'this-year'\n | 'last-3-years'\n | 'last-5-years';\n\nexport type DurationFilterOptions =\n 'bite-sized'\n | 'short'\n | 'medium'\n | 'long';\n\n\nexport enum SourceFilterOptions {\n MyVideos = 'my-videos',\n School = 'school',\n ExchangeArchive = 'exchange-archive',\n ClickView = 'clickview',\n LiveStreams = 'livestreams'\n}\n\nexport enum TypeFilterOptions {\n Video = 'video',\n Series = 'series',\n Playlist = 'playlist',\n Classification = 'classification',\n Clip = 'clip',\n Interactive = 'interactive',\n Company = 'company',\n Category = 'category',\n PartnerProfile = 'partner_profile'\n}","export enum WidgetTemplate {\n // Videos\n ThumbnailHeroMedia = 'thumbnail_hero_media',\n ThumbnailFeaturedMedia = 'thumbnail_featured_media',\n ThumbnailSlidingListSmall = 'thumbnail_sliding_list_small',\n ThumbnailSlidingListSmallV2 = 'thumbnail_sliding_list_small_v2',\n ThumbnailSlidingListLarge = 'thumbnail_sliding_list_large',\n ThumbnailFixedListMediaSmall = 'thumbnail_fixed_list_media_small',\n ThumbnailFixedListMediaLarge = 'thumbnail_fixed_list_media_large',\n ThumbnailFixedListFolderSmall = 'thumbnail_fixed_list_folder_small',\n ThumbnailVerticalList = 'thumbnail_vertical_list',\n PopoutThumbnailSlidingListLarge = 'popout_thumbnail_sliding_list_large',\n PopoutThumbnailSlidingListSmall = 'popout_thumbnail_sliding_list_small',\n FeaturedThumbnailSlidingList = 'featured_thumbnail_sliding_list',\n ThumbnailFixedListXLarge = 'thumbnail_fixed_list_xlarge',\n\n // Topics\n CoverSlidingPillListSmall = 'cover_sliding_pill_list_small',\n CoverFixedPillListLarge = 'cover_fixed_pill_list_large',\n StatsCoverFixedPillListLarge = 'stats_cover_fixed_pill_list_large',\n CoverFixedPillListXSmall = 'cover_fixed_pill_list_xsmall',\n ThumbnailFixedListLarge = 'thumbnail_fixed_list_large',\n ThumbnailFixedListSmall = 'thumbnail_fixed_list_small',\n EditableCoverFixedPillListSmall = 'editable_cover_fixed_pill_list_small',\n HeroBanner = 'hero_banner',\n HeroThumbnailSmall = 'hero_thumbnail_small',\n HeroBlockColourSmall = 'hero_block_colour_small',\n\n // Curriculum\n CurriculumResourcesAccordion = 'curriculum_resources_accordion',\n CurriculumCodeSearchResults = 'curriculum_code_search_results',\n\n // Playlists\n CoverFixedTileList = 'cover_fixed_tile_list',\n\n // Topics & Series\n PosterSlidingListLarge = 'poster_sliding_list_large',\n PosterSlidingListMedium = 'poster_sliding_list_medium',\n PosterSlidingListSmall = 'poster_sliding_list_small',\n PosterFixedListLarge = 'poster_fixed_list_large',\n\n // Blurbs & Topics\n HeroBannerSmall = 'hero_banner_small',\n\n // Text-based blurbs\n Heading = 'heading',\n AuthorReviewer = 'author_reviewer',\n Question = 'question',\n QuestionAccordion = 'question_accordion',\n\n // Companies / Studios / Content Partners\n CircleLogoSlidingList = 'circle_logo_sliding_list',\n RectangularLogoSlidingList = 'rectangular_logo_sliding_list',\n RectangularLogoFixedList = 'rectangular_logo_fixed_list',\n ThumbnailFixedListSearchCta = 'thumbnail_fixed_list_search_cta',\n InfiniteThumbnailVerticalList = 'infinite_thumbnail_vertical_list',\n\n // Rating filters\n FilterSlidingPillListSmall = 'filter_sliding_pill_list_small',\n\n // Special events\n EventIconSlidingList = 'event_icon_sliding_list',\n\n // Tags filter\n TagSlidingList = 'tag_sliding_list',\n\n SearchSuggestionsBlurb = 'search_suggestions_blurb'\n}\n","export enum WidgetTypeId {\n // Video group\n CuratedMedia = 'curated_media',\n PlaylistMedia = 'playlist_media',\n SeriesMedia = 'series_media',\n ClassificationMedia = 'classification_media',\n LatestReleasedVideos = 'latest_released_videos',\n ContinueWatching = 'continue_watching_videos',\n CompanyLatestReleasedVideo = 'company_latest_released_video',\n CompanyVideos = 'company_videos',\n ClassificationLatestReleasedVideo = 'classification_latest_released_video',\n ClassificationLatestReleasedVideosV2 = 'classification_latest_released_videos_v2',\n CompanyClassificationVideos = 'company_classification_videos',\n ClassificationDashboardMedia = 'classification_dashboard_media',\n ClassificationDashboardExternalMedia = 'classification_dashboard_external_media',\n SeasonalClassificationMedia = 'seasonal_classification_media',\n TrendingClassificationsMedia = 'trending_classifications_media',\n ClassificationCurriculumMedia = 'classification_curriculum_media',\n\n // Topics group\n CuratedClassifications = 'curated_classifications',\n Classifications = 'classifications',\n ClassificationLatestReleasedVideos = 'classification_latest_released_videos',\n SpecialEventClassifications = 'special_event_classifications',\n LatestReleasedClassifications = 'latest_released_classifications',\n TrendingClassifications = 'trending_classifications',\n\n // Series group\n CuratedSeries = 'curated_series',\n\n // Playlists group\n CuratedPlaylists = 'curated_playlists',\n\n // Blurb group\n Blurb = 'blurb',\n DynamicBlurb = 'dynamic_blurb',\n AuthorReviewer = 'author_reviewer',\n Faq = 'faq',\n\n // Network group\n CuratedCompanies = 'curated_companies',\n\n // Partner Profile group\n CuratedContentPartners = 'curated_content_partners',\n ContentPartnerLatestReleasedVideos = 'content_partner_latest_released_videos',\n ContentPartnerSeries = 'content_partner_series',\n ContentPartnerVideos = 'content_partner_videos',\n SpotlightContentPartners = 'spotlight_curated_content_partners',\n ContentPartners = 'content_partners',\n ContentPartnersHub = 'content_partners_hub',\n TrendingContentPartnersVideo = 'content_partner_trending_videos',\n ContentPartnerAllVideos = 'content_partner_all_videos',\n\n // Search filter group\n Ratings = 'ratings',\n\n // Presentations group\n Presentations = 'presentations',\n\n // Livestreams group\n UpcomingLivestreams = 'upcoming_livestreams',\n\n // Multimedia group\n CuratedMultimedia = 'curated_multimedia',\n\n // Legacy widget types\n ClassificationPlaylists = 'classification_playlists',\n ClassificationSeries = 'classification_series',\n ClassificationFeaturedVideo = 'classification_featured_video',\n ClassificationPinnedVideos = 'classification_pinned_videos',\n\n // Search widget types\n SearchRelevantTopics = 'search_relevant_topics',\n SearchCompanies = 'search_companies',\n SearchTopResults = 'search_top_results',\n SearchSeries = 'search_series',\n SearchPlaylists = 'search_playlists',\n SearchMyVideosFolder = 'search_my_videos_folders',\n SearchMySchoolLibraryFolder = 'search_my_school_library_folders',\n SearchMyVideos = 'search_my_videos',\n SearchMySchoolLibraryVideos = 'search_my_school_library_videos',\n SearchExchangeArchive = 'search_exchange_archive',\n SearchRelatedResults = 'search_related_results',\n SearchTags = 'search_tags',\n SearchCurriculumCode = 'search_curriculum_code',\n SearchSuggestions = 'search_suggestions',\n SearchContentPartners = 'search_content_partners'\n}\n","import { FormikContextType } from 'formik';\n\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SearchResultObjectTypes } from 'libs/shared/apps/search/interfaces';\nimport { GetCustomParamOptions, WidgetTypeIdConfig } from 'libs/shared/constants/WidgetTypeIdConfig';\nimport { UserGroup } from 'libs/shared/enums/UserGroup';\nimport { OnlineUserRole } from 'libs/shared/enums/UserRole';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { SettingsHash } from 'libs/shared/hooks/useSettings';\nimport { BaseObject, ClassificationCurriculumInfo, ClassificationDashboardInfo, ClassificationDirectoryInfo, CuratedDashboard, CuratedMediaWidget, CuratedWidget, CuratedWidgetQueryParams, DashboardTargetInfo, DashboardTargetType, PartnerProfileDashboardInfo, UnknownDashboardTargetInfo } from 'libs/shared/interfaces';\n\ninterface LatestReleasesTimeRange {\n from: string;\n to: string;\n}\n\nexport const DashboardHelper = {\n\n /**\n * Same implementation as GetUserGroup() in Online.\n * @param userRole \n */\n getUserGroup(userRole: OnlineUserRole): UserGroup {\n if (userRole === OnlineUserRole.Student)\n return UserGroup.Learner;\n\n return UserGroup.Staff;\n }\n};\n\nexport const CuratedDashboardHelper = {\n onSelectCuratedObject(\n selectedObj: SearchResultObjectTypes | BaseObject,\n formikProps: FormikContextType<CuratedMediaWidget<BaseObject[]>>\n ) {\n const data = {\n ...formikProps.values.data,\n objectIds: ArrayHelper.addOrRemoveImmutable(formikProps.values.data.objectIds || [], selectedObj.id)\n };\n \n formikProps.setFieldValue('data', data);\n \n formikProps.setTouched({\n ...formikProps.touched,\n data: {\n objectIds: true\n }\n });\n },\n\n onRemoveCuratedObject(\n objectId: string,\n formikProps: FormikContextType<CuratedMediaWidget<BaseObject[]>>\n ) {\n const newData = {\n ...formikProps.values.data,\n objectIds: formikProps.values.data.objectIds.filter(id => id !== objectId)\n };\n\n formikProps.setFieldValue('data', newData);\n },\n\n getDashboardTarget(info: DashboardTargetInfo): string {\n if (info.targetType === DashboardTargetType.Discover)\n return `discover:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.Classification)\n return `classification:${info.classificationId}`;\n\n if (info.targetType === DashboardTargetType.ClassificationDirectory)\n return `classification:${info.classificationId}:directory`;\n\n if (info.targetType === DashboardTargetType.ClassificationCurriculum)\n return `classification:${info.classificationId}:curriculum`;\n\n if (info.targetType === DashboardTargetType.MoviesAndTv)\n return `moviesAndTv:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.Company)\n return `company:${info.companyId}:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.PartnerProfile)\n return `partnerprofile:${info.slug}`;\n\n if (info.targetType === DashboardTargetType.DiscoverPartnerProfiles)\n return `discover:partners`;\n\n if (info.targetType === DashboardTargetType.PartnerProfileHub)\n return `discover:partners:hub`;\n\n return null;\n },\n\n getUnknownDashboardTarget(options: UnknownDashboardTargetInfo): string {\n const {\n presentationId,\n companyId,\n targetType,\n classificationId,\n slug\n } = options;\n\n if (targetType === DashboardTargetType.Discover) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Discover,\n presentationId\n });\n }\n \n if (targetType === DashboardTargetType.MoviesAndTv) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.MoviesAndTv,\n presentationId\n });\n }\n \n if (targetType === DashboardTargetType.Company) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Company,\n presentationId,\n companyId\n });\n }\n \n if (targetType === DashboardTargetType.Classification) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Classification,\n classificationId\n });\n }\n \n if (targetType === DashboardTargetType.ClassificationDirectory) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.ClassificationDirectory,\n classificationId\n });\n }\n \n if (targetType === DashboardTargetType.ClassificationCurriculum) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.ClassificationCurriculum,\n classificationId\n });\n }\n\n if (targetType === DashboardTargetType.PartnerProfile) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.PartnerProfile,\n slug\n });\n }\n\n if (targetType === DashboardTargetType.DiscoverPartnerProfiles) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.DiscoverPartnerProfiles\n });\n }\n\n if (targetType === DashboardTargetType.PartnerProfileHub) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.PartnerProfileHub\n });\n }\n },\n\n getDashboardTargetInfo(dashboard: CuratedDashboard): DashboardTargetInfo {\n const type = CuratedDashboardHelper.getDashboardTargetType(dashboard);\n const split = dashboard?.target?.split(':');\n\n if (type === DashboardTargetType.Discover) {\n return {\n targetType: DashboardTargetType.Discover,\n presentationId: split[2]\n };\n }\n\n if (type === DashboardTargetType.Classification) {\n return {\n targetType: DashboardTargetType.Classification,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.ClassificationDirectory) {\n return {\n targetType: DashboardTargetType.ClassificationDirectory,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.ClassificationCurriculum) {\n return {\n targetType: DashboardTargetType.ClassificationCurriculum,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.MoviesAndTv) {\n return {\n targetType: DashboardTargetType.MoviesAndTv,\n presentationId: split[2]\n };\n }\n\n if (type === DashboardTargetType.Company) {\n return {\n targetType: DashboardTargetType.Company,\n companyId: split[1],\n presentationId: split[3]\n };\n }\n\n if (type === DashboardTargetType.PartnerProfile) {\n return {\n targetType: DashboardTargetType.PartnerProfile,\n slug: split[1]\n };\n }\n\n return null;\n },\n\n getDashboardTargetType(dashboard: CuratedDashboard): DashboardTargetType {\n if (!dashboard?.target)\n return null;\n\n if (dashboard.target.startsWith('discover')) {\n if (dashboard.target.endsWith('partners'))\n return DashboardTargetType.DiscoverPartnerProfiles;\n\n if (dashboard.target.endsWith('hub'))\n return DashboardTargetType.PartnerProfileHub;\n\n return DashboardTargetType.Discover;\n }\n\n if (dashboard.target.startsWith('classification')) {\n if (dashboard.target.endsWith('directory'))\n return DashboardTargetType.ClassificationDirectory;\n\n if (dashboard.target.endsWith('curriculum'))\n return DashboardTargetType.ClassificationCurriculum;\n\n return DashboardTargetType.Classification;\n }\n\n if (dashboard.target.startsWith('moviesAndTv'))\n return DashboardTargetType.MoviesAndTv;\n\n if (dashboard.target.startsWith('company')) {\n return DashboardTargetType.Company;\n }\n\n if (dashboard.target.startsWith('partnerprofile'))\n return DashboardTargetType.PartnerProfile;\n\n return null;\n },\n\n isType(dashboard: CuratedDashboard, target: DashboardTargetType): boolean {\n return CuratedDashboardHelper.getDashboardTargetType(dashboard) === target;\n },\n\n isCuratedDashboard(obj: BaseObject): obj is CuratedDashboard {\n const dashboard = obj as CuratedDashboard;\n\n const targetType = CuratedDashboardHelper.getDashboardTargetType(dashboard);\n\n if (targetType === DashboardTargetType.Discover)\n return true;\n\n if (targetType === DashboardTargetType.Classification)\n return true;\n\n if (targetType === DashboardTargetType.ClassificationDirectory)\n return true;\n\n if (targetType === DashboardTargetType.ClassificationCurriculum)\n return true;\n\n if (targetType === DashboardTargetType.MoviesAndTv)\n return true;\n\n if (targetType === DashboardTargetType.Company)\n return true;\n\n return false;\n },\n\n getLatestReleasedTimeRange(): LatestReleasesTimeRange {\n const now = new Date();\n const from = DateHelper.format(DateHelper.endOf(DateHelper.subtract(now, 2, 'month'), 'day'), 'YYYY-MM-DD');\n const to = DateHelper.format(DateHelper.endOf(now, 'day'), 'YYYY-MM-DD');\n return { from, to };\n },\n\n getWidgetParams(\n widgetTypeId: WidgetTypeId,\n templateId: WidgetTemplate,\n target: DashboardTargetType,\n audienceIds?: string | string[],\n preferredCurriculumId?: string,\n options?: GetCustomParamOptions\n ): CuratedWidgetQueryParams {\n const params: CuratedWidgetQueryParams = { };\n\n if (audienceIds)\n params.audienceId = audienceIds;\n\n if (widgetTypeId === WidgetTypeId.ClassificationCurriculumMedia)\n params.curriculumPresentationId = preferredCurriculumId;\n\n return {\n ...params,\n ...WidgetTypeIdConfig[widgetTypeId]?.getCustomParams?.(templateId, target, options)\n };\n },\n\n isSystemGeneratedDashboard(widgets: CuratedWidget[]): boolean {\n const systemGeneratedClassificationWidgetTypes = new Set<WidgetTypeId>([\n WidgetTypeId.ClassificationFeaturedVideo,\n WidgetTypeId.ClassificationPinnedVideos,\n WidgetTypeId.ClassificationPlaylists,\n WidgetTypeId.ClassificationSeries\n ]);\n\n return widgets?.some(widget => systemGeneratedClassificationWidgetTypes.has(widget.widgetId));\n },\n\n isClassificationDashboard(\n targetInfo: DashboardTargetInfo\n ): targetInfo is ClassificationDashboardInfo | ClassificationDirectoryInfo | ClassificationCurriculumInfo {\n return [\n DashboardTargetType.Classification,\n DashboardTargetType.ClassificationDirectory,\n DashboardTargetType.ClassificationCurriculum\n ].includes(targetInfo?.targetType);\n },\n\n isContentPartnerDashboard(targetInfo: DashboardTargetInfo): targetInfo is PartnerProfileDashboardInfo {\n return targetInfo?.targetType === DashboardTargetType.PartnerProfile;\n },\n\n isDirectoryDashboard(\n targetInfo: DashboardTargetInfo\n ): targetInfo is ClassificationDirectoryInfo {\n return targetInfo?.targetType === DashboardTargetType.ClassificationDirectory;\n },\n\n isWidgetTypeEnabled(\n widgetTypeId: WidgetTypeId,\n settingsHash: SettingsHash,\n targetType: DashboardTargetType\n ): boolean {\n const config = WidgetTypeIdConfig[widgetTypeId];\n \n return config?.predicate?.({ settingsHash, targetType }) ?? true;\n }\n};","import { Core } from 'libs/common/backbone/index';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SourceFilterOptions, TypeFilterOptions } from '../apps/search/interfaces';\nimport { WidgetAppLinks } from '../components/widgets/curated-widgets/WidgetProps';\nimport { WidgetTemplate } from '../enums/WidgetTemplate';\nimport { WidgetTypeId } from '../enums/WidgetTypeId';\nimport { SettingsHash } from '../hooks/useSettings';\nimport { CuratedWidgetContent, CuratedWidgetQueryParams, DashboardTargetType, Series } from '../interfaces';\nimport { CuratedDashboardHelper } from '../utils/DashboardHelper';\n\ninterface WidgetTypeIdPredicateOptions {\n settingsHash: SettingsHash;\n targetType: DashboardTargetType;\n}\n\nexport interface GetCustomParamOptions {\n params?: CuratedWidgetQueryParams;\n}\n\ninterface WidgetTypeIdConfigType {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => CuratedWidgetQueryParams;\n minContent?: number;\n getCollectionAppLink?: (\n appLinks: Partial<WidgetAppLinks>,\n content?: CuratedWidgetContent,\n ) => Core.AppLink;\n /**\n * Predicate used to determine if the widget\n * should be displayed based on the target\n * type and settings. Useful for feature flagging widgets.\n */\n predicate?: (options: WidgetTypeIdPredicateOptions) => boolean;\n}\n\nfunction partnerProfileWidgetTypeIdPredicate(options: WidgetTypeIdPredicateOptions): boolean {\n return options.settingsHash?.hasPartnerProfiles ?? false;\n}\n\nexport const WidgetTypeIdConfig: Record<WidgetTypeId, WidgetTypeIdConfigType> = {\n [WidgetTypeId.CuratedMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.PlaylistMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SeriesMedia]: {\n getCustomParams: (widgetTemplate: WidgetTemplate) => {\n switch (widgetTemplate) {\n case WidgetTemplate.ThumbnailFixedListMediaLarge:\n return { limit: 2 };\n case WidgetTemplate.ThumbnailHeroMedia:\n case WidgetTemplate.ThumbnailFeaturedMedia:\n return { limit: 1 };\n default:\n return { limit: 12 };\n }\n },\n getCollectionAppLink: (appLinks, content) => appLinks?.series?.(ArrayHelper.first(content) as Series)\n },\n [WidgetTypeId.ClassificationMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.LatestReleasedVideos]: {\n getCustomParams: () => {\n return CuratedDashboardHelper.getLatestReleasedTimeRange();\n }\n },\n [WidgetTypeId.ContinueWatching]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks?.watchHistory?.()\n },\n [WidgetTypeId.CompanyLatestReleasedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.CompanyVideos]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationLatestReleasedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationLatestReleasedVideosV2]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n [WidgetTypeId.SeasonalClassificationMedia]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n [WidgetTypeId.CompanyClassificationVideos]: {\n getCustomParams: () => ({}),\n minContent: 4\n },\n [WidgetTypeId.TrendingClassificationsMedia]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n\n [WidgetTypeId.CuratedClassifications]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.TrendingClassifications]: {\n getCustomParams: () => {\n return {\n limit: 6\n };\n },\n minContent: 3\n },\n [WidgetTypeId.Classifications]: {\n getCustomParams: (template: WidgetTemplate, targetType: DashboardTargetType) => {\n if (targetType === DashboardTargetType.Discover) {\n if (template === WidgetTemplate.EditableCoverFixedPillListSmall) {\n return {\n canBePreferred: true,\n isFollowing: true\n };\n }\n\n if ([ WidgetTemplate.PosterSlidingListSmall, WidgetTemplate.CoverFixedPillListXSmall ].includes(template)) {\n return {\n canBePreferred: true\n };\n }\n }\n\n return {};\n }\n },\n [WidgetTypeId.ClassificationLatestReleasedVideos]: {\n getCustomParams: () => {\n return CuratedDashboardHelper.getLatestReleasedTimeRange();\n }\n },\n [WidgetTypeId.SpecialEventClassifications]: {\n getCustomParams: () => ({\n from: DateHelper.format(new Date(), 'YYYY-MM-DD')\n })\n },\n [WidgetTypeId.LatestReleasedClassifications]: {\n getCustomParams: () => {\n return {\n limit: 6\n };\n },\n minContent: 3\n },\n\n [WidgetTypeId.CuratedSeries]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.CuratedPlaylists]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.Blurb]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.DynamicBlurb]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.AuthorReviewer]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.Faq]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.CuratedCompanies]: {\n getCustomParams: () => ({}),\n predicate: options => {\n if (options.settingsHash?.hasPartnerProfiles)\n return false;\n return true;\n }\n },\n\n [WidgetTypeId.Ratings]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.Presentations]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.UpcomingLivestreams]: {\n getCustomParams: () => ({\n from: DateHelper.format(new Date(), 'YYYY-MM-DD')\n })\n },\n\n [WidgetTypeId.CuratedMultimedia]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.ClassificationPlaylists]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationSeries]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationFeaturedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationPinnedVideos]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationDashboardExternalMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationDashboardMedia]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.SearchRelevantTopics]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchRelevantTopics],\n type: [TypeFilterOptions.Classification]\n })\n },\n [WidgetTypeId.SearchCompanies]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchCompanies],\n type: [TypeFilterOptions.Company]\n }),\n predicate: options => {\n if (options.settingsHash?.hasPartnerProfiles)\n return false;\n return true;\n }\n },\n [WidgetTypeId.SearchSeries]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchSeries],\n type: [TypeFilterOptions.Series]\n })\n },\n [WidgetTypeId.SearchPlaylists]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchPlaylists],\n type: [TypeFilterOptions.Playlist]\n })\n },\n [WidgetTypeId.SearchMyVideosFolder]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMyVideosFolder],\n source: [SourceFilterOptions.MyVideos]\n })\n },\n [WidgetTypeId.SearchMySchoolLibraryFolder]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMySchoolLibraryFolder],\n source: [SourceFilterOptions.School]\n })\n },\n [WidgetTypeId.SearchMyVideos]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMyVideos],\n source: [SourceFilterOptions.MyVideos]\n })\n },\n [WidgetTypeId.SearchMySchoolLibraryVideos]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMySchoolLibraryVideos],\n source: [SourceFilterOptions.School]\n })\n },\n [WidgetTypeId.SearchExchangeArchive]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchExchangeArchive],\n source: [SourceFilterOptions.ExchangeArchive]\n })\n },\n [WidgetTypeId.SearchRelatedResults]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchTopResults]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationCurriculumMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchTags]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchCurriculumCode]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchSuggestions]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchContentPartners]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchContentPartners],\n type: [TypeFilterOptions.PartnerProfile]\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.CuratedContentPartners]: {\n getCustomParams: () => ({\n limit: 12\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerLatestReleasedVideos]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerSeries]: {\n getCollectionAppLink: appLinks => {\n return appLinks?.scopedSearchHome?.({\n type: [TypeFilterOptions.Series]\n });\n },\n getCustomParams: () => ({\n limit: 12\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerVideos]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.SpotlightContentPartners]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartners]: {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => ({\n letterPrefix: options?.params?.letterPrefix,\n sort: options?.params?.sort\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnersHub]: {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => {\n if (targetType !== DashboardTargetType.PartnerProfileHub)\n return {};\n\n return {\n objectId: options?.params?.objectId\n };\n },\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.TrendingContentPartnersVideo]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerAllVideos]: {\n getCustomParams: (widgetTemplate: WidgetTemplate) => {\n if (widgetTemplate === WidgetTemplate.ThumbnailFixedListSearchCta)\n return { limit: 3 };\n\n return {};\n },\n predicate: partnerProfileWidgetTypeIdPredicate\n }\n};","import React from 'react';\n\nexport function WarningOutlineSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='m13.026 4.377 8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0M12 5 3.5 19h17zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2m.75-3.677a.69.69 0 0 1-.7.677.69.69 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677s.7.303.7.677z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","export enum WidgetStatus {\n Draft = 0,\n Published = 1,\n Archived = 2\n}\n\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { AnalyticsOptions, ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { WidgetStatus } from 'libs/shared/enums/WidgetStatus';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { Breakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { BaseWidget, CuratedDashboardAppLink, CuratedWidget, CuratedWidgetContent, Playlist, Presentation, Series, Video, VideoTypes, VideoWidgetTemplateContent, WidgetMetadata, WidgetPreference } from 'libs/shared/interfaces';\n\nimport { AnyWidgetTemplateProps } from '../components/widgets/curated-widgets/WidgetProps';\nimport { WidgetTypeIdConfig } from '../constants/WidgetTypeIdConfig';\nimport { MasterType } from '../enums/MasterType';\n\nimport { MasterTypeHelper } from './MasterTypeHelper';\n\nenum WidgetStatusString {\n Draft = 'Draft',\n Published = 'Published',\n Archived = 'Archived'\n}\n\nexport const WidgetHelper = {\n /**\n * Used by both the FixedWidget and DynamicWidget\n */\n getSliderAnalyticsOptions: (): AnalyticsOptions => ({\n actionType: UserAction.Click,\n location: LocationContext.SlidingList,\n entity: EntityType.Widget,\n descriptor: ClickDescriptor.Slide\n }),\n\n /**\n * Used by both the FixedWidget and DynamicWidget\n */\n getSliderItemAnalyticsOptions: (): AnalyticsOptions => ({\n location: LocationContext.SlidingListItem\n }),\n\n getSliderHeadingAnalyticsOptions: (): AnalyticsOptions => ({\n actionType: UserAction.Click,\n location: LocationContext.SlidingList,\n entity: EntityType.Widget,\n descriptor: ClickDescriptor.Title\n }),\n\n useGetContent(\n content: CuratedWidgetContent,\n widgetTypeId: WidgetTypeId,\n isPreviewing: boolean,\n preferences: WidgetPreference[],\n removedItemIds: string[]\n ): { content: CuratedWidgetContent; unfilteredContent: CuratedWidgetContent; } {\n return React.useMemo(() => {\n if (!content)\n return { content: null, unfilteredContent: null };\n\n if (!Array.isArray(content))\n return { content, unfilteredContent: content };\n\n const preferencesHash = preferences?.reduce((acc: HashObject, current) => {\n acc[current.id] = current;\n return acc;\n }, {}) ?? {};\n\n const removedItemIdsHash = removedItemIds.reduce((acc: HashObject, current) => {\n acc[current] = true;\n return acc;\n }, {});\n\n const contentCopy = [...content];\n \n const sortedContent = contentCopy.sort((a, b) => {\n if (!('id' in a) || !('id' in b))\n return 0;\n\n const aIndex = preferencesHash[a.id]?.index ?? contentCopy.findIndex(c => 'id' in c && c.id === a.id);\n const bIndex = preferencesHash[b.id]?.index ?? contentCopy.findIndex(c => 'id' in c && c.id === b.id);\n\n if (aIndex < bIndex)\n return -1;\n\n if (aIndex > bIndex)\n return 1;\n\n return 0;\n });\n\n if (WidgetHelper.isBelowContentMinimum(sortedContent, widgetTypeId) && !isPreviewing) {\n return {\n content: [],\n unfilteredContent: sortedContent\n };\n }\n\n const filteredContent = sortedContent.filter(item => {\n if (preferencesHash['id' in item && item.id]?.hidden)\n return false;\n\n if (removedItemIdsHash['id' in item && item.id])\n return false;\n\n return true;\n });\n\n return {\n content: filteredContent,\n unfilteredContent: sortedContent\n };\n }, [ content, preferences ]);\n },\n\n isBelowContentMinimum(content: CuratedWidgetContent, widgetTypeId: WidgetTypeId): boolean {\n const minContent = WidgetTypeIdConfig[widgetTypeId]?.minContent || 0;\n return content?.length < minContent;\n },\n\n getCustomAppLink(props: AnyWidgetTemplateProps): Core.AppLink | null {\n if (\n !('metadata' in props) ||\n !('appLinks' in props) ||\n !('appLink' in props.metadata)\n ) {\n return null;\n }\n\n if (props.metadata?.appLink === CuratedDashboardAppLink.LatestReleases && 'latestReleases' in props.appLinks)\n return props.appLinks?.latestReleases?.();\n\n if (props.metadata?.appLink === CuratedDashboardAppLink.ExploreAllTopics && 'allTopics' in props.appLinks && 'presentation' in props)\n return props.appLinks?.allTopics?.(props.presentation.id);\n\n return null;\n },\n\n getWidgetStatus(widget: CuratedWidget): WidgetStatus {\n let status = widget.status;\n\n if (typeof (status) === 'string') {\n switch (status) {\n case WidgetStatusString.Archived:\n status = WidgetStatus.Archived;\n break;\n case WidgetStatusString.Published:\n status = WidgetStatus.Published;\n break;\n case WidgetStatusString.Draft:\n status = WidgetStatus.Draft;\n break;\n }\n }\n\n return status;\n },\n\n formatResponseData(widget: CuratedWidget, presentation?: Presentation): CuratedWidget {\n const content = widget.content;\n\n if (!content)\n return widget;\n\n if ('author' in content) {\n widget.content = [content] as CuratedWidgetContent;\n return widget;\n }\n\n if ('data' in content)\n widget.content = content.data as CuratedWidgetContent;\n else if (!Array.isArray(content))\n widget.content = [content]; // Handle `classification_featured_video` widgets, which don't return content as an array\n\n switch (widget.widgetId) {\n case WidgetTypeId.ClassificationSeries:\n widget.content = widget.content.filter((c): c is Series => 'tallPoster' in c && !!c.tallPoster?.id);\n break;\n case WidgetTypeId.ClassificationPlaylists:\n widget.content = widget.content.filter((c): c is Playlist => 'cover' in c && !!c.cover?.id);\n break;\n case WidgetTypeId.ContinueWatching:\n widget.content = widget.content.map(c => 'object' in c && c.object);\n default:\n break;\n case WidgetTypeId.Presentations:\n widget.content = widget.content.filter((c): c is Presentation => 'id' in c && c.id.toString() !== presentation?.id?.toString());\n break;\n }\n\n return widget;\n },\n \n isWidgetInTableOfContents(metadata: Partial<WidgetMetadata>): boolean {\n return !!metadata?.showInTableOfContents;\n },\n\n /**\n * Widget container view won't render a widget with no content typically,\n * but some widgets (such as blurbs) have no content, but should render anyway.\n */\n hasNoContent(widgetTypeId: WidgetTypeId): boolean {\n if (widgetTypeId === WidgetTypeId.Blurb)\n return true;\n\n return false;\n },\n\n /**\n * If any widgets should be hidden on smaller screen sizes, add them here.\n * If this needs to be more flexible at some point, it should be added to\n * the widget settings and metadata object.\n */\n canDisplayOnScreenSize(\n breakpoints: Breakpoints,\n widgetTypeId: WidgetTypeId,\n widgetTemplate: WidgetTemplate\n ): boolean {\n if (widgetTypeId === WidgetTypeId.Blurb && widgetTemplate === WidgetTemplate.HeroBannerSmall)\n return !breakpoints.xs && !breakpoints.sm;\n\n return true;\n },\n\n isCompanyWidget(widgetTypeId: WidgetTypeId): boolean {\n switch (widgetTypeId) {\n case WidgetTypeId.CompanyLatestReleasedVideo:\n case WidgetTypeId.CompanyVideos:\n case WidgetTypeId.UpcomingLivestreams:\n return true;\n default:\n return false;\n }\n },\n\n getVideoContent(content: VideoWidgetTemplateContent): VideoTypes[] {\n const firstItem = ArrayHelper.first<Video | Series>(content);\n\n if (MasterTypeHelper.isType<Series>(firstItem, MasterType.Series))\n return firstItem.videos.data;\n\n return content as VideoTypes[];\n },\n\n showRemoveButton(widgetTypeId: WidgetTypeId): boolean {\n return widgetTypeId === WidgetTypeId.ContinueWatching;\n },\n\n /**\n * Paginated data returns more widgets so if we dont merge the widget content by widget type id,\n * it would add another widget to the page rather than appending content to the relevant\n * search result index\n * \n * For example:\n * Say we receive these widgets for a query:\n * - topics widget\n * - related results widget\n * \n * If a user scrolls down to the end of page we fetch more items from the last widget\n * which in this case is 'related results widget'. \n * Now our overall response looks like this\n * - topics widget\n * - related results widget\n * - related results widget\n * \n * Since this is a new widget item entry it will be rendered as a new widget with seprate headings etc.\n * In this case we want to combine these two widgets data into one so its looks like this again:\n * - topics widget\n * - related results widget (data is combined)\n * \n * But what if widget we get recieve has a different widget template id. This currently happens for\n * the 'series widget' - series widget can have the tall poster template or the thumbnail like template.\n * \n * so to visualize this it can be like:\n * - topics widget\n * - top results widget\n * - series widget (template: tall poster)\n * - series widget (template: thumbnail)\n * \n * Since they technically will look different based on the template id we will not merge the data in this case.\n * It will merge the data to the same widget as long as the combination of widget Id + template Id is the same.\n * \n * Since they are separate widgets they will render duplicate headings - we handle this in css instead which\n * checks for adjacent siblings and if its the same widget - it hides the widget heading so it will look\n * like its a single widget rather than separate widgets.\n * \n * - Nish\n */\n mergeWidgets<T extends BaseWidget>(\n items: T[],\n mergeContent: (target: T, source: T) => void\n ): T[] {\n const widgets = ObjectHelper.deepClone(items);\n const groupedWidgets = ArrayHelper.groupBy(widgets, 'widgetId');\n const mergedWidgets: T[] = [];\n\n for (const widgetGroup of Object.values(groupedWidgets)) {\n let currentMergedWidget: T | null = null;\n const groupMergedWidgets: T[] = [];\n\n for (const widget of widgetGroup) {\n if (!currentMergedWidget) {\n currentMergedWidget = widget;\n continue;\n }\n\n if (widget.templateId !== currentMergedWidget.templateId) {\n groupMergedWidgets.push(currentMergedWidget);\n currentMergedWidget = widget;\n continue;\n }\n\n mergeContent(currentMergedWidget, widget);\n }\n\n if (currentMergedWidget) {\n groupMergedWidgets.push(currentMergedWidget);\n }\n mergedWidgets.push(...groupMergedWidgets);\n }\n\n return mergedWidgets;\n }\n};","import React from 'react';\nimport { Spinner } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor, LocationContext } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SvgContainer } from 'libs/shared/components/svg-container/SvgContainer';\nimport { WidgetTypeIdConfig } from 'libs/shared/constants/WidgetTypeIdConfig';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { WarningOutlineSvg } from 'libs/shared/images/svg/status/WarningOutlineSvg';\nimport { WidgetHelper } from 'libs/shared/utils/WidgetHelper';\n\nimport styles from './widget-header.module.scss';\n\nconst namespace = 'shared.widgetHeader';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface WidgetHeaderProps {\n name: string;\n description?: string | JSX.Element;\n isPreviewing?: boolean;\n content?: any[];\n widgetTypeId?: WidgetTypeId;\n badgeComponent?: JSX.Element;\n\n appLink?: Core.AppLink;\n onAppLinkClick?: () => void;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n \n showSeeMoreLink?: boolean;\n onClose?: () => void;\n onFollow?: (shouldFollow: boolean) => void;\n isFollowing?: boolean;\n showFollowSpinner?: boolean;\n}\n\nfunction SeeMore(props: WidgetHeaderProps) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton}`}>\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData }\n analyticsOptions={{\n location: LocationContext.SlidingList,\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.SeeMore\n }}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link' : ''}`}\n >\n <p className='hover-text-underline text-dark curated-widget-heading'>{getPhrase('seeAll')}</p>\n </AppLink>\n </div>\n );\n}\n\nfunction CloseWidgetButton(props: { onClose: () => void }) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton} text-decoration-none cursor-pointer`} onClick={props.onClose}>\n <p className='hover-text-underline text-dark curated-widget-heading'>{getPhrase('hide')}</p>\n </div>\n );\n}\n\nfunction FollowWidgetButton(props: {\n isFollowing: boolean,\n onFollow: (shouldFollow: boolean) => void,\n showFollowSpinner: boolean\n}) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton} text-decoration-none`}>\n {\n props.showFollowSpinner ?\n <Spinner as='span' animation='border' role='status' size='sm' /> :\n <p className='hover-text-underline text-dark curated-widget-heading cursor-pointer' onClick={() => props.onFollow(!props.isFollowing)}>\n {getPhrase(props.isFollowing ? 'unfollow' : 'follow')}\n </p>\n }\n </div>\n );\n}\n\nexport function WidgetHeader(props: WidgetHeaderProps): JSX.Element {\n const hasDescription = !!props.description;\n\n if (!props.name && !props.description)\n return <></>;\n\n const isBelowMinimum = WidgetHelper.isBelowContentMinimum(props.content, props.widgetTypeId);\n const minContent = WidgetTypeIdConfig[props.widgetTypeId]?.minContent ?? 0;\n\n return (\n <div className='curated-widget-header'>\n <div className='d-flex justify-content-between'>\n {!!props.name && (\n <div className='d-flex align-items-center'>\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link text-reset' : ''}`}\n onClick={props.onAppLinkClick}\n >\n <h2 className='h4 curated-widget-heading'>\n {props.isPreviewing && isBelowMinimum && (\n <SvgContainer\n svg={WarningOutlineSvg}\n title={`Widget is below the minimum content threshold of ${minContent} and won't be displayed.`}\n tooltipSpanHack\n tooltipSpanHackClassName='d-inline text-danger me-1'\n />\n )}\n {props.name}\n </h2>\n </AppLink>\n {!!React.isValidElement(props.badgeComponent) && props.badgeComponent}\n </div>\n )}\n <div className='d-flex justify-content-between align-items-center gap-2'>\n {!!props.appLink && !hasDescription && !!props.showSeeMoreLink && <SeeMore {...props}/>}\n {FunctionHelper.isFunction(props.onFollow) &&\n <FollowWidgetButton\n isFollowing={props.isFollowing}\n onFollow={props.onFollow}\n showFollowSpinner={props.showFollowSpinner}\n />\n }\n {FunctionHelper.isFunction(props.onClose) && <CloseWidgetButton onClose={props.onClose}/>}\n </div>\n </div>\n \n {hasDescription && (\n <div className='d-flex justify-content-between align-items-end'>\n <p className={`description curated-widget-description`}>\n <span>{props.description}</span>\n </p>\n {!!props.appLink && !!props.showSeeMoreLink && <SeeMore {...props}/> }\n </div>\n )}\n </div>\n );\n}","export enum TagType {\n Normal = 'normal',\n Pedagogy = 'pedagogy',\n Hidden = 'hidden',\n Skill = 'skill',\n Curation = 'curation'\n}\n\n/**\n * This should **only** be used to create new tags in master (as it only accepts enum values).\n * Use the string enum above for all other cases.\n */\nexport enum TagTypeNumber {\n Normal = 0,\n Pedagogy = 1,\n Hidden = 2,\n Skill = 3,\n Curation = 4\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { TagType } from 'libs/shared/enums/TagType';\nimport { Tag, ThemeColours } from 'libs/shared/interfaces';\n\nimport { DivButton } from '../div-button/DivButton';\n\nimport styles from './tags.module.scss';\n\nconst namespace = 'shared.tags';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface TagItemProps {\n tag: Tag;\n themeColours?: ThemeColours;\n appLink?: Core.AppLink;\n onClick?: () => void;\n onRemove?: () => void;\n disabled?: boolean;\n tagClass?: string;\n}\n\nfunction getTagTypeClass(tagType: TagType, hasThemeColour: boolean): string {\n switch (tagType) {\n case TagType.Pedagogy:\n case TagType.Skill:\n return 'pedagogy-tag text-white';\n\n case TagType.Hidden:\n return 'hidden-tag fw-normal';\n\n case TagType.Normal:\n if (!hasThemeColour)\n return 'bg-gray-100 fw-normal';\n return '';\n\n default:\n return '';\n }\n}\n\nexport function TagItem(props: TagItemProps): JSX.Element {\n const { tag, appLink, onClick, disabled, tagClass = 'tag' } = props;\n\n const name = tag.name.toLowerCase();\n const tagType = tag.tagType?.toLowerCase() as TagType;\n\n const hasThemeColour = (tagType === TagType.Normal && props.themeColours) && !!props.themeColours?.secondary;\n let classNames = `${styles.badgeBase} rounded-pill py-1 px-2 my-1 me-1 ${tagClass} ${getTagTypeClass(tagType, hasThemeColour)}`;\n let textContainerClass = `text-truncate text-nowrap`;\n\n if (hasThemeColour)\n classNames += ' text-white';\n\n if ((appLink || onClick) && !disabled)\n classNames += ' cursor-pointer';\n\n if (disabled)\n classNames += ' ' + styles.disabled;\n\n if (props.onRemove) {\n classNames += ' ' + styles.removeBadge;\n textContainerClass += ' ' + `${styles.removeBadgeText} d-inline-flex align-items-center lh-1`;\n }\n if (!appLink)\n classNames += ' d-inline-block';\n\n const style: React.CSSProperties = hasThemeColour\n ? { backgroundColor: props.themeColours.secondary }\n : {};\n\n if (appLink) {\n return (\n <AppLink\n onClick={onClick}\n appLink={appLink}\n className={classNames}\n title={name}\n style={style}\n >\n <span className={textContainerClass}>{name}</span>\n </AppLink>\n );\n }\n\n return (\n <button\n onClick={onClick}\n className={classNames}\n title={name}\n style={style}\n aria-label={`${getPhrase('ariaFilter')} ${name}`}\n >\n <span className={textContainerClass}>\n {name}\n {props.onRemove &&\n <DivButton\n onClick={props.onRemove}\n className={`${styles.close} btn-close font-size-normal`}\n role='button'\n aria-label='Close'\n />\n }\n </span>\n </button>\n );\n}"],"names":["CuratedDashboardAppLink","FilterIdNames","FilterBlacklist","FilterWhitelist","acc","prev","SourceFilterOptions","TypeFilterOptions","WidgetTemplate","WidgetTypeId","CuratedDashboardHelper","selectedObj","formikProps","data","ArrayHelper","objectId","newData","id","info","DashboardTargetType","options","presentationId","companyId","targetType","classificationId","slug","dashboard","type","split","_a","target","obj","now","from","DateHelper","to","widgetTypeId","templateId","audienceIds","preferredCurriculumId","params","_b","WidgetTypeIdConfig","widgets","systemGeneratedClassificationWidgetTypes","widget","targetInfo","settingsHash","config","partnerProfileWidgetTypeIdPredicate","widgetTemplate","appLinks","content","template","WarningOutlineSvg","props","jsx","WidgetStatus","WidgetHelper","UserAction","LocationContext","EntityType","ClickDescriptor","isPreviewing","preferences","removedItemIds","React","preferencesHash","current","removedItemIdsHash","contentCopy","sortedContent","a","b","aIndex","c","bIndex","item","minContent","_c","_d","_f","_e","status","presentation","metadata","breakpoints","firstItem","MasterTypeHelper","MasterType","items","mergeContent","ObjectHelper","groupedWidgets","mergedWidgets","widgetGroup","currentMergedWidget","groupMergedWidgets","namespace","getPhrase","LanguageService","SeeMore","styles","AppLink","CloseWidgetButton","FollowWidgetButton","Spinner","WidgetHeader","hasDescription","Fragment","isBelowMinimum","jsxs","SvgContainer","FunctionHelper","TagType","getTagTypeClass","tagType","hasThemeColour","TagItem","tag","appLink","onClick","disabled","tagClass","name","classNames","textContainerClass","style","DivButton"],"mappings":"qOASO,IAAKA,GAAAA,IACVA,EAAA,eAAiB,kBACjBA,EAAA,iBAAmB,qBACnBA,EAAA,6BAA+B,iCAC/BA,EAAA,wBAA0B,2BAJhBA,IAAAA,GAAA,CAAA,CAAA,ECFZ,MAAMC,EACN,CACE,OACA,iBACA,eACA,WACA,YACA,cACA,OACA,SACA,eACA,QACA,YACA,eACA,eACA,iBACA,OACA,sBACA,WACA,sBACA,SACA,UACA,iBACA,WACA,SACA,UACA,gBACA,aACA,kBACA,YACA,SACA,iBACA,mBACA,eACA,WACA,SACF,EAMMC,EAAuD,CAC3D,KAAM,EACR,EAIaC,GAAkBF,EAAc,OAAO,CAACG,EAAKC,KACjD,CACL,GAAGD,EACH,CAACC,CAAI,EAAG,CAACH,EAAgBG,CAAI,CAAA,GAE9B,CAAA,CAAgC,EAmD5B,IAAKC,GAAAA,IACVA,EAAA,SAAW,YACXA,EAAA,OAAS,SACTA,EAAA,gBAAkB,mBAClBA,EAAA,UAAY,YACZA,EAAA,YAAc,cALJA,IAAAA,GAAA,CAAA,CAAA,EAQAC,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,eAAiB,iBACjBA,EAAA,KAAO,OACPA,EAAA,YAAc,cACdA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,eAAiB,kBATPA,IAAAA,GAAA,CAAA,CAAA,mRCvHL,IAAKC,GAAAA,IAEVA,EAAA,mBAAqB,uBACrBA,EAAA,uBAAyB,2BACzBA,EAAA,0BAA4B,+BAC5BA,EAAA,4BAA8B,kCAC9BA,EAAA,0BAA4B,+BAC5BA,EAAA,6BAA+B,mCAC/BA,EAAA,6BAA+B,mCAC/BA,EAAA,8BAAgC,oCAChCA,EAAA,sBAAwB,0BACxBA,EAAA,gCAAkC,sCAClCA,EAAA,gCAAkC,sCAClCA,EAAA,6BAA+B,kCAC/BA,EAAA,yBA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AGvB,EAAO,SAAS,qCAAqCqB,CAAQ,IAAIR,GAAgBC,EAASC,CAAc,CAAC,GACzHS,EAAqB,4BAErBT,IACFQ,GAAc,gBAEXL,GAAWC,IAAY,CAACC,IAC3BG,GAAc,mBAEZH,IACFG,GAAc,IAAMvB,EAAO,UAEzB/C,EAAM,WACRsE,GAAc,IAAMvB,EAAO,YAC3BwB,GAAsB,IAASxB,EAAO,eAAe,0CAElDkB,IACHK,GAAc,mBAEhB,MAAME,EAA6BV,EAC/B,CAAE,gBAAiB9D,EAAM,aAAa,SAAA,EACtC,CAAA,EAEJ,OAAIiE,EAEAhE,EAAAA,IAAC+C,EAAA,CACC,QAAAkB,EACA,QAAAD,EACA,UAAWK,EACX,MAAOD,EACP,MAAAG,EAEA,SAAAvE,EAAAA,IAAC,OAAA,CAAK,UAAWsE,EAAqB,SAAAF,CAAA,CAAK,CAAA,CAAA,EAM/CpE,EAAAA,IAAC,SAAA,CACC,QAAAiE,EACA,UAAWI,EACX,MAAOD,EACP,MAAAG,EACA,aAAY,GAAG5B,GAAU,YAAY,CAAC,IAAIyB,CAAI,GAE9C,SAAAb,EAAAA,KAAC,OAAA,CAAK,UAAWe,EACd,SAAA,CAAAF,EACArE,EAAM,UACLC,EAAAA,IAACwE,EAAA,CACC,QAASzE,EAAM,SACf,UAAW,GAAG+C,EAAO,KAAK,8BAC1B,KAAK,SACL,aAAW,OAAA,CAAA,CACb,CAAA,CAEJ,CAAA,CAAA,CAGN"}
|
|
1
|
+
{"version":3,"file":"BlIARVZO.chunk.js","sources":["../../../../libs/shared/src/interfaces/models/curated-widget/CuratedWidget.ts","../../../../libs/shared/src/apps/search/interfaces/SearchFilter.ts","../../../../libs/shared/src/enums/WidgetTemplate.ts","../../../../libs/shared/src/enums/WidgetTypeId.ts","../../../../libs/shared/src/utils/DashboardHelper.ts","../../../../libs/shared/src/constants/WidgetTypeIdConfig.ts","../../../../libs/shared/src/images/svg/status/WarningOutlineSvg.tsx","../../../../libs/shared/src/enums/WidgetStatus.ts","../../../../libs/shared/src/utils/WidgetHelper.ts","../../../../libs/shared/src/components/widgets/curated-widgets/components/header/WidgetHeader.tsx","../../../../libs/shared/src/enums/TagType.ts","../../../../libs/shared/src/components/tags/TagItem.tsx"],"sourcesContent":["import { HashObject } from 'libs/common/react/interfaces';\n\nimport { AllWidgetTemplateProps } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { ButtonIcon } from 'libs/shared/constants/WidgetThemingConstants';\nimport { WidgetStatus } from 'libs/shared/enums/WidgetStatus';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { CuratedObjectsWidgetData, CuratedWidgetContent, CuratedWidgetData } from 'libs/shared/interfaces';\n\nexport enum CuratedDashboardAppLink {\n LatestReleases = 'latest-releases',\n ExploreAllTopics = 'explore-all-topics',\n ClassificationLatestReleases = 'classification-latest-releases',\n ClassificationDirectory = 'classification-directory',\n}\n\nexport enum CuratedWidgetCtaAppLink {\n TopicDirectory = 'topic-directory',\n TopicNewReleases = 'topic-new-releases',\n CuratedTopic = 'curated-topic'\n}\n\nexport interface BaseWidget<TContent extends HashObject = HashObject> {\n index: number;\n templateId: WidgetTemplate;\n widgetId: WidgetTypeId;\n name: string;\n description?: string;\n content?: TContent\n}\n\nexport interface WidgetCta {\n text?: string;\n href?: string;\n icon?: ButtonIcon;\n appLink?: CuratedWidgetCtaAppLink;\n}\n\nexport type WidgetMetadata = AllWidgetTemplateProps['metadata'] & {\n showInTableOfContents: boolean;\n tocIndentation: number;\n headingOptional: boolean;\n aiAddedVideo: boolean;\n};\n\nexport interface WidgetPreference {\n id: string;\n index?: number;\n hidden?: boolean;\n}\n\nexport interface CuratedWidget<\n TData extends CuratedWidgetData = CuratedWidgetData,\n TContent extends CuratedWidgetContent = CuratedWidgetContent\n> extends BaseWidget<TContent> {\n id: string;\n dashboardId: string;\n data: TData;\n status: WidgetStatus;\n metadata?: Partial<WidgetMetadata>;\n preferences?: WidgetPreference[];\n cursor?: string;\n\n // If a widget has curriculum IDs set, then it won't be accessible to anyone who doesn't have one of those curriculums\n curriculumIds?: string[];\n}\n\nexport type CuratedMediaWidget<\n TContent extends CuratedWidgetContent = CuratedWidgetContent\n> = CuratedWidget<CuratedObjectsWidgetData, TContent>;","import { SvgIcon } from 'libs/shared/utils/SvgHelper';\n\nimport { FilterStateHash } from '../reducers';\n\nimport { FilterProps } from './FilterProps';\nimport { SearchIndices } from './SearchResults';\n\nconst FilterIdNames =\n[\n 'sort', // \"sort\" isn't even a filter but it tends to go with our filters in our designs\n 'classification',\n 'presentation',\n 'audience',\n 'yearGroup',\n 'moviesAndTv',\n 'type',\n 'rating',\n 'interactives',\n 'clips',\n 'classroom',\n 'hasResources',\n 'hasSubtitles',\n 'productionYear',\n 'isHd',\n 'producedByClickView',\n 'duration',\n 'tagOrClassification',\n 'status',\n 'isAdmin',\n 'bulkActionType',\n 'userType',\n 'filter',\n 'channel',\n 'dateBroadcast',\n 'categoryId',\n 'hasInteractives',\n 'jobStatus',\n 'source',\n 'customerStatus',\n 'specialEventType',\n 'customerType',\n 'seriesId',\n 'scopeId'\n] as const;\n\n/**\n * Any filters that shouldn't be sent to the backend as a filter\n * and are instead handled differently by the frontend\n */\nconst FilterBlacklist: Partial<Record<FilterIds, boolean>> = {\n type: true\n};\n\nexport type FilterIds = typeof FilterIdNames[number];\n\nexport const FilterWhitelist = FilterIdNames.reduce((acc, prev) => {\n return {\n ...acc,\n [prev]: !FilterBlacklist[prev]\n };\n}, {} as Record<FilterIds, boolean>);\n\nexport type FilterType = 'radio' | 'checkbox' | 'nested-checkbox' | 'grouped-checkbox' | 'switch' | 'more-filters' | 'rating' | 'dropdown' | 'tag' | 'button';\n\nexport interface SearchFilter<TFilterOptionId = string> {\n id: FilterIds;\n type: FilterType;\n compatibleIndices: SearchIndices[];\n\n name?: string;\n icon?: SvgIcon;\n description?: string;\n options?: FilterOption<TFilterOptionId>[];\n labelPrefix?: string;\n\n // For second layer options, for example 'presentation' checkbox filter has 'audience' as second layer option\n secondaryId?: FilterIds;\n\n customComponent?: (props: FilterProps) => JSX.Element;\n disabled?: boolean;\n disableOptions?: (options: FilterOption[], filters: SearchFilter[], state: FilterStateHash) => FilterOption[];\n}\n\nexport interface MoreFilters extends Omit<SearchFilter, 'id' | 'compatibleIndices'> {\n filters: SearchFilter[];\n id: string;\n}\n\nexport interface FilterOption<TId = string> {\n id: TId;\n name: string;\n default?: boolean;\n disabled?: boolean;\n secondLayerSelection?: FilterOption[];\n secondLayerOptions?: FilterOption[];\n group?: string;\n}\n\nexport type ProductionYearFilterOptions =\n 'any-year'\n | 'this-year'\n | 'last-3-years'\n | 'last-5-years';\n\nexport type DurationFilterOptions =\n 'bite-sized'\n | 'short'\n | 'medium'\n | 'long';\n\n\nexport enum SourceFilterOptions {\n MyVideos = 'my-videos',\n School = 'school',\n ExchangeArchive = 'exchange-archive',\n ClickView = 'clickview',\n LiveStreams = 'livestreams'\n}\n\nexport enum TypeFilterOptions {\n Video = 'video',\n Series = 'series',\n Playlist = 'playlist',\n Classification = 'classification',\n Clip = 'clip',\n Interactive = 'interactive',\n Company = 'company',\n Category = 'category',\n PartnerProfile = 'partner_profile'\n}","export enum WidgetTemplate {\n // Videos\n ThumbnailHeroMedia = 'thumbnail_hero_media',\n ThumbnailFeaturedMedia = 'thumbnail_featured_media',\n ThumbnailSlidingListSmall = 'thumbnail_sliding_list_small',\n ThumbnailSlidingListSmallV2 = 'thumbnail_sliding_list_small_v2',\n ThumbnailSlidingListLarge = 'thumbnail_sliding_list_large',\n ThumbnailFixedListMediaSmall = 'thumbnail_fixed_list_media_small',\n ThumbnailFixedListMediaLarge = 'thumbnail_fixed_list_media_large',\n ThumbnailFixedListFolderSmall = 'thumbnail_fixed_list_folder_small',\n ThumbnailVerticalList = 'thumbnail_vertical_list',\n PopoutThumbnailSlidingListLarge = 'popout_thumbnail_sliding_list_large',\n PopoutThumbnailSlidingListSmall = 'popout_thumbnail_sliding_list_small',\n FeaturedThumbnailSlidingList = 'featured_thumbnail_sliding_list',\n ThumbnailFixedListXLarge = 'thumbnail_fixed_list_xlarge',\n\n // Topics\n CoverSlidingPillListSmall = 'cover_sliding_pill_list_small',\n CoverFixedPillListLarge = 'cover_fixed_pill_list_large',\n StatsCoverFixedPillListLarge = 'stats_cover_fixed_pill_list_large',\n CoverFixedPillListXSmall = 'cover_fixed_pill_list_xsmall',\n ThumbnailFixedListLarge = 'thumbnail_fixed_list_large',\n ThumbnailFixedListSmall = 'thumbnail_fixed_list_small',\n EditableCoverFixedPillListSmall = 'editable_cover_fixed_pill_list_small',\n HeroBanner = 'hero_banner',\n HeroThumbnailSmall = 'hero_thumbnail_small',\n HeroBlockColourSmall = 'hero_block_colour_small',\n\n // Curriculum\n CurriculumResourcesAccordion = 'curriculum_resources_accordion',\n CurriculumCodeSearchResults = 'curriculum_code_search_results',\n\n // Playlists\n CoverFixedTileList = 'cover_fixed_tile_list',\n\n // Topics & Series\n PosterSlidingListLarge = 'poster_sliding_list_large',\n PosterSlidingListMedium = 'poster_sliding_list_medium',\n PosterSlidingListSmall = 'poster_sliding_list_small',\n PosterFixedListLarge = 'poster_fixed_list_large',\n\n // Blurbs & Topics\n HeroBannerSmall = 'hero_banner_small',\n\n // Text-based blurbs\n Heading = 'heading',\n AuthorReviewer = 'author_reviewer',\n Question = 'question',\n QuestionAccordion = 'question_accordion',\n\n // Companies / Studios / Content Partners\n CircleLogoSlidingList = 'circle_logo_sliding_list',\n RectangularLogoSlidingList = 'rectangular_logo_sliding_list',\n RectangularLogoFixedList = 'rectangular_logo_fixed_list',\n ThumbnailFixedListSearchCta = 'thumbnail_fixed_list_search_cta',\n InfiniteThumbnailVerticalList = 'infinite_thumbnail_vertical_list',\n\n // Rating filters\n FilterSlidingPillListSmall = 'filter_sliding_pill_list_small',\n\n // Special events\n EventIconSlidingList = 'event_icon_sliding_list',\n\n // Tags filter\n TagSlidingList = 'tag_sliding_list',\n\n SearchSuggestionsBlurb = 'search_suggestions_blurb'\n}\n","export enum WidgetTypeId {\n // Video group\n CuratedMedia = 'curated_media',\n PlaylistMedia = 'playlist_media',\n SeriesMedia = 'series_media',\n ClassificationMedia = 'classification_media',\n LatestReleasedVideos = 'latest_released_videos',\n ContinueWatching = 'continue_watching_videos',\n CompanyLatestReleasedVideo = 'company_latest_released_video',\n CompanyVideos = 'company_videos',\n ClassificationLatestReleasedVideo = 'classification_latest_released_video',\n ClassificationLatestReleasedVideosV2 = 'classification_latest_released_videos_v2',\n CompanyClassificationVideos = 'company_classification_videos',\n ClassificationDashboardMedia = 'classification_dashboard_media',\n ClassificationDashboardExternalMedia = 'classification_dashboard_external_media',\n SeasonalClassificationMedia = 'seasonal_classification_media',\n TrendingClassificationsMedia = 'trending_classifications_media',\n ClassificationCurriculumMedia = 'classification_curriculum_media',\n\n // Topics group\n CuratedClassifications = 'curated_classifications',\n Classifications = 'classifications',\n ClassificationLatestReleasedVideos = 'classification_latest_released_videos',\n SpecialEventClassifications = 'special_event_classifications',\n LatestReleasedClassifications = 'latest_released_classifications',\n TrendingClassifications = 'trending_classifications',\n\n // Series group\n CuratedSeries = 'curated_series',\n\n // Playlists group\n CuratedPlaylists = 'curated_playlists',\n\n // Blurb group\n Blurb = 'blurb',\n DynamicBlurb = 'dynamic_blurb',\n AuthorReviewer = 'author_reviewer',\n Faq = 'faq',\n\n // Network group\n CuratedCompanies = 'curated_companies',\n\n // Partner Profile group\n CuratedContentPartners = 'curated_content_partners',\n ContentPartnerLatestReleasedVideos = 'content_partner_latest_released_videos',\n ContentPartnerSeries = 'content_partner_series',\n ContentPartnerVideos = 'content_partner_videos',\n SpotlightContentPartners = 'spotlight_curated_content_partners',\n ContentPartners = 'content_partners',\n ContentPartnersHub = 'content_partners_hub',\n TrendingContentPartnersVideo = 'content_partner_trending_videos',\n ContentPartnerAllVideos = 'content_partner_all_videos',\n\n // Search filter group\n Ratings = 'ratings',\n\n // Presentations group\n Presentations = 'presentations',\n\n // Livestreams group\n UpcomingLivestreams = 'upcoming_livestreams',\n\n // Multimedia group\n CuratedMultimedia = 'curated_multimedia',\n\n // Legacy widget types\n ClassificationPlaylists = 'classification_playlists',\n ClassificationSeries = 'classification_series',\n ClassificationFeaturedVideo = 'classification_featured_video',\n ClassificationPinnedVideos = 'classification_pinned_videos',\n\n // Search widget types\n SearchRelevantTopics = 'search_relevant_topics',\n SearchCompanies = 'search_companies',\n SearchTopResults = 'search_top_results',\n SearchSeries = 'search_series',\n SearchPlaylists = 'search_playlists',\n SearchMyVideosFolder = 'search_my_videos_folders',\n SearchMySchoolLibraryFolder = 'search_my_school_library_folders',\n SearchMyVideos = 'search_my_videos',\n SearchMySchoolLibraryVideos = 'search_my_school_library_videos',\n SearchExchangeArchive = 'search_exchange_archive',\n SearchRelatedResults = 'search_related_results',\n SearchTags = 'search_tags',\n SearchCurriculumCode = 'search_curriculum_code',\n SearchSuggestions = 'search_suggestions',\n SearchContentPartners = 'search_content_partners'\n}\n","import { FormikContextType } from 'formik';\n\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SearchResultObjectTypes } from 'libs/shared/apps/search/interfaces';\nimport { GetCustomParamOptions, WidgetTypeIdConfig } from 'libs/shared/constants/WidgetTypeIdConfig';\nimport { UserGroup } from 'libs/shared/enums/UserGroup';\nimport { OnlineUserRole } from 'libs/shared/enums/UserRole';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { SettingsHash } from 'libs/shared/hooks/useSettings';\nimport { BaseObject, ClassificationCurriculumInfo, ClassificationDashboardInfo, ClassificationDirectoryInfo, CuratedDashboard, CuratedMediaWidget, CuratedWidget, CuratedWidgetQueryParams, DashboardTargetInfo, DashboardTargetType, PartnerProfileDashboardInfo, UnknownDashboardTargetInfo } from 'libs/shared/interfaces';\n\ninterface LatestReleasesTimeRange {\n from: string;\n to: string;\n}\n\nexport const DashboardHelper = {\n\n /**\n * Same implementation as GetUserGroup() in Online.\n * @param userRole \n */\n getUserGroup(userRole: OnlineUserRole): UserGroup {\n if (userRole === OnlineUserRole.Student)\n return UserGroup.Learner;\n\n return UserGroup.Staff;\n }\n};\n\nexport const CuratedDashboardHelper = {\n onSelectCuratedObject(\n selectedObj: SearchResultObjectTypes | BaseObject,\n formikProps: FormikContextType<CuratedMediaWidget<BaseObject[]>>\n ) {\n const data = {\n ...formikProps.values.data,\n objectIds: ArrayHelper.addOrRemoveImmutable(formikProps.values.data.objectIds || [], selectedObj.id)\n };\n \n formikProps.setFieldValue('data', data);\n \n formikProps.setTouched({\n ...formikProps.touched,\n data: {\n objectIds: true\n }\n });\n },\n\n onRemoveCuratedObject(\n objectId: string,\n formikProps: FormikContextType<CuratedMediaWidget<BaseObject[]>>\n ) {\n const newData = {\n ...formikProps.values.data,\n objectIds: formikProps.values.data.objectIds.filter(id => id !== objectId)\n };\n\n formikProps.setFieldValue('data', newData);\n },\n\n getDashboardTarget(info: DashboardTargetInfo): string {\n if (info.targetType === DashboardTargetType.Discover)\n return `discover:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.Classification)\n return `classification:${info.classificationId}`;\n\n if (info.targetType === DashboardTargetType.ClassificationDirectory)\n return `classification:${info.classificationId}:directory`;\n\n if (info.targetType === DashboardTargetType.ClassificationCurriculum)\n return `classification:${info.classificationId}:curriculum`;\n\n if (info.targetType === DashboardTargetType.MoviesAndTv)\n return `moviesAndTv:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.Company)\n return `company:${info.companyId}:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.PartnerProfile)\n return `partnerprofile:${info.slug}`;\n\n if (info.targetType === DashboardTargetType.DiscoverPartnerProfiles)\n return `discover:partners`;\n\n if (info.targetType === DashboardTargetType.PartnerProfileHub)\n return `discover:partners:hub`;\n\n return null;\n },\n\n getUnknownDashboardTarget(options: UnknownDashboardTargetInfo): string {\n const {\n presentationId,\n companyId,\n targetType,\n classificationId,\n slug\n } = options;\n\n if (targetType === DashboardTargetType.Discover) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Discover,\n presentationId\n });\n }\n \n if (targetType === DashboardTargetType.MoviesAndTv) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.MoviesAndTv,\n presentationId\n });\n }\n \n if (targetType === DashboardTargetType.Company) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Company,\n presentationId,\n companyId\n });\n }\n \n if (targetType === DashboardTargetType.Classification) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Classification,\n classificationId\n });\n }\n \n if (targetType === DashboardTargetType.ClassificationDirectory) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.ClassificationDirectory,\n classificationId\n });\n }\n \n if (targetType === DashboardTargetType.ClassificationCurriculum) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.ClassificationCurriculum,\n classificationId\n });\n }\n\n if (targetType === DashboardTargetType.PartnerProfile) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.PartnerProfile,\n slug\n });\n }\n\n if (targetType === DashboardTargetType.DiscoverPartnerProfiles) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.DiscoverPartnerProfiles\n });\n }\n\n if (targetType === DashboardTargetType.PartnerProfileHub) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.PartnerProfileHub\n });\n }\n },\n\n getDashboardTargetInfo(dashboard: CuratedDashboard): DashboardTargetInfo {\n const type = CuratedDashboardHelper.getDashboardTargetType(dashboard);\n const split = dashboard?.target?.split(':');\n\n if (type === DashboardTargetType.Discover) {\n return {\n targetType: DashboardTargetType.Discover,\n presentationId: split[2]\n };\n }\n\n if (type === DashboardTargetType.Classification) {\n return {\n targetType: DashboardTargetType.Classification,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.ClassificationDirectory) {\n return {\n targetType: DashboardTargetType.ClassificationDirectory,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.ClassificationCurriculum) {\n return {\n targetType: DashboardTargetType.ClassificationCurriculum,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.MoviesAndTv) {\n return {\n targetType: DashboardTargetType.MoviesAndTv,\n presentationId: split[2]\n };\n }\n\n if (type === DashboardTargetType.Company) {\n return {\n targetType: DashboardTargetType.Company,\n companyId: split[1],\n presentationId: split[3]\n };\n }\n\n if (type === DashboardTargetType.PartnerProfile) {\n return {\n targetType: DashboardTargetType.PartnerProfile,\n slug: split[1]\n };\n }\n\n return null;\n },\n\n getDashboardTargetType(dashboard: CuratedDashboard): DashboardTargetType {\n if (!dashboard?.target)\n return null;\n\n if (dashboard.target.startsWith('discover')) {\n if (dashboard.target.endsWith('partners'))\n return DashboardTargetType.DiscoverPartnerProfiles;\n\n if (dashboard.target.endsWith('hub'))\n return DashboardTargetType.PartnerProfileHub;\n\n return DashboardTargetType.Discover;\n }\n\n if (dashboard.target.startsWith('classification')) {\n if (dashboard.target.endsWith('directory'))\n return DashboardTargetType.ClassificationDirectory;\n\n if (dashboard.target.endsWith('curriculum'))\n return DashboardTargetType.ClassificationCurriculum;\n\n return DashboardTargetType.Classification;\n }\n\n if (dashboard.target.startsWith('moviesAndTv'))\n return DashboardTargetType.MoviesAndTv;\n\n if (dashboard.target.startsWith('company')) {\n return DashboardTargetType.Company;\n }\n\n if (dashboard.target.startsWith('partnerprofile'))\n return DashboardTargetType.PartnerProfile;\n\n return null;\n },\n\n isType(dashboard: CuratedDashboard, target: DashboardTargetType): boolean {\n return CuratedDashboardHelper.getDashboardTargetType(dashboard) === target;\n },\n\n isCuratedDashboard(obj: BaseObject): obj is CuratedDashboard {\n const dashboard = obj as CuratedDashboard;\n\n const targetType = CuratedDashboardHelper.getDashboardTargetType(dashboard);\n\n if (targetType === DashboardTargetType.Discover)\n return true;\n\n if (targetType === DashboardTargetType.Classification)\n return true;\n\n if (targetType === DashboardTargetType.ClassificationDirectory)\n return true;\n\n if (targetType === DashboardTargetType.ClassificationCurriculum)\n return true;\n\n if (targetType === DashboardTargetType.MoviesAndTv)\n return true;\n\n if (targetType === DashboardTargetType.Company)\n return true;\n\n return false;\n },\n\n getLatestReleasedTimeRange(): LatestReleasesTimeRange {\n const now = new Date();\n const from = DateHelper.format(DateHelper.endOf(DateHelper.subtract(now, 2, 'month'), 'day'), 'YYYY-MM-DD');\n const to = DateHelper.format(DateHelper.endOf(now, 'day'), 'YYYY-MM-DD');\n return { from, to };\n },\n\n getWidgetParams(\n widgetTypeId: WidgetTypeId,\n templateId: WidgetTemplate,\n target: DashboardTargetType,\n audienceIds?: string | string[],\n preferredCurriculumId?: string,\n options?: GetCustomParamOptions\n ): CuratedWidgetQueryParams {\n const params: CuratedWidgetQueryParams = { };\n\n if (audienceIds)\n params.audienceId = audienceIds;\n\n if (widgetTypeId === WidgetTypeId.ClassificationCurriculumMedia)\n params.curriculumPresentationId = preferredCurriculumId;\n\n return {\n ...params,\n ...WidgetTypeIdConfig[widgetTypeId]?.getCustomParams?.(templateId, target, options)\n };\n },\n\n isSystemGeneratedDashboard(widgets: CuratedWidget[]): boolean {\n const systemGeneratedClassificationWidgetTypes = new Set<WidgetTypeId>([\n WidgetTypeId.ClassificationFeaturedVideo,\n WidgetTypeId.ClassificationPinnedVideos,\n WidgetTypeId.ClassificationPlaylists,\n WidgetTypeId.ClassificationSeries\n ]);\n\n return widgets?.some(widget => systemGeneratedClassificationWidgetTypes.has(widget.widgetId));\n },\n\n isClassificationDashboard(\n targetInfo: DashboardTargetInfo\n ): targetInfo is ClassificationDashboardInfo | ClassificationDirectoryInfo | ClassificationCurriculumInfo {\n return [\n DashboardTargetType.Classification,\n DashboardTargetType.ClassificationDirectory,\n DashboardTargetType.ClassificationCurriculum\n ].includes(targetInfo?.targetType);\n },\n\n isContentPartnerDashboard(targetInfo: DashboardTargetInfo): targetInfo is PartnerProfileDashboardInfo {\n return targetInfo?.targetType === DashboardTargetType.PartnerProfile;\n },\n\n isDirectoryDashboard(\n targetInfo: DashboardTargetInfo\n ): targetInfo is ClassificationDirectoryInfo {\n return targetInfo?.targetType === DashboardTargetType.ClassificationDirectory;\n },\n\n isWidgetTypeEnabled(\n widgetTypeId: WidgetTypeId,\n settingsHash: SettingsHash,\n targetType: DashboardTargetType\n ): boolean {\n const config = WidgetTypeIdConfig[widgetTypeId];\n \n return config?.predicate?.({ settingsHash, targetType }) ?? true;\n }\n};","import { Core } from 'libs/common/backbone/index';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SourceFilterOptions, TypeFilterOptions } from '../apps/search/interfaces';\nimport { WidgetAppLinks } from '../components/widgets/curated-widgets/WidgetProps';\nimport { WidgetTemplate } from '../enums/WidgetTemplate';\nimport { WidgetTypeId } from '../enums/WidgetTypeId';\nimport { SettingsHash } from '../hooks/useSettings';\nimport { CuratedWidgetContent, CuratedWidgetQueryParams, DashboardTargetType, Series } from '../interfaces';\nimport { CuratedDashboardHelper } from '../utils/DashboardHelper';\n\ninterface WidgetTypeIdPredicateOptions {\n settingsHash: SettingsHash;\n targetType: DashboardTargetType;\n}\n\nexport interface GetCustomParamOptions {\n params?: CuratedWidgetQueryParams;\n}\n\ninterface WidgetTypeIdConfigType {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => CuratedWidgetQueryParams;\n minContent?: number;\n getCollectionAppLink?: (\n appLinks: Partial<WidgetAppLinks>,\n content?: CuratedWidgetContent,\n ) => Core.AppLink;\n /**\n * Predicate used to determine if the widget\n * should be displayed based on the target\n * type and settings. Useful for feature flagging widgets.\n */\n predicate?: (options: WidgetTypeIdPredicateOptions) => boolean;\n}\n\nfunction partnerProfileWidgetTypeIdPredicate(options: WidgetTypeIdPredicateOptions): boolean {\n return options.settingsHash?.hasPartnerProfiles ?? false;\n}\n\nexport const WidgetTypeIdConfig: Record<WidgetTypeId, WidgetTypeIdConfigType> = {\n [WidgetTypeId.CuratedMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.PlaylistMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SeriesMedia]: {\n getCustomParams: (widgetTemplate: WidgetTemplate) => {\n switch (widgetTemplate) {\n case WidgetTemplate.ThumbnailFixedListMediaLarge:\n return { limit: 2 };\n case WidgetTemplate.ThumbnailHeroMedia:\n case WidgetTemplate.ThumbnailFeaturedMedia:\n return { limit: 1 };\n default:\n return { limit: 12 };\n }\n },\n getCollectionAppLink: (appLinks, content) => appLinks?.series?.(ArrayHelper.first(content) as Series)\n },\n [WidgetTypeId.ClassificationMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.LatestReleasedVideos]: {\n getCustomParams: () => {\n return CuratedDashboardHelper.getLatestReleasedTimeRange();\n }\n },\n [WidgetTypeId.ContinueWatching]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks?.watchHistory?.()\n },\n [WidgetTypeId.CompanyLatestReleasedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.CompanyVideos]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationLatestReleasedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationLatestReleasedVideosV2]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n [WidgetTypeId.SeasonalClassificationMedia]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n [WidgetTypeId.CompanyClassificationVideos]: {\n getCustomParams: () => ({}),\n minContent: 4\n },\n [WidgetTypeId.TrendingClassificationsMedia]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n\n [WidgetTypeId.CuratedClassifications]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.TrendingClassifications]: {\n getCustomParams: () => {\n return {\n limit: 6\n };\n },\n minContent: 3\n },\n [WidgetTypeId.Classifications]: {\n getCustomParams: (template: WidgetTemplate, targetType: DashboardTargetType) => {\n if (targetType === DashboardTargetType.Discover) {\n if (template === WidgetTemplate.EditableCoverFixedPillListSmall) {\n return {\n canBePreferred: true,\n isFollowing: true\n };\n }\n\n if ([ WidgetTemplate.PosterSlidingListSmall, WidgetTemplate.CoverFixedPillListXSmall ].includes(template)) {\n return {\n canBePreferred: true\n };\n }\n }\n\n return {};\n }\n },\n [WidgetTypeId.ClassificationLatestReleasedVideos]: {\n getCustomParams: () => {\n return CuratedDashboardHelper.getLatestReleasedTimeRange();\n }\n },\n [WidgetTypeId.SpecialEventClassifications]: {\n getCustomParams: () => ({\n from: DateHelper.format(new Date(), 'YYYY-MM-DD')\n })\n },\n [WidgetTypeId.LatestReleasedClassifications]: {\n getCustomParams: () => {\n return {\n limit: 6\n };\n },\n minContent: 3\n },\n\n [WidgetTypeId.CuratedSeries]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.CuratedPlaylists]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.Blurb]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.DynamicBlurb]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.AuthorReviewer]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.Faq]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.CuratedCompanies]: {\n getCustomParams: () => ({}),\n predicate: options => {\n if (options.settingsHash?.hasPartnerProfiles)\n return false;\n return true;\n }\n },\n\n [WidgetTypeId.Ratings]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.Presentations]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.UpcomingLivestreams]: {\n getCustomParams: () => ({\n from: DateHelper.format(new Date(), 'YYYY-MM-DD')\n })\n },\n\n [WidgetTypeId.CuratedMultimedia]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.ClassificationPlaylists]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationSeries]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationFeaturedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationPinnedVideos]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationDashboardExternalMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationDashboardMedia]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.SearchRelevantTopics]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchRelevantTopics],\n type: [TypeFilterOptions.Classification]\n })\n },\n [WidgetTypeId.SearchCompanies]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchCompanies],\n type: [TypeFilterOptions.Company]\n }),\n predicate: options => {\n if (options.settingsHash?.hasPartnerProfiles)\n return false;\n return true;\n }\n },\n [WidgetTypeId.SearchSeries]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchSeries],\n type: [TypeFilterOptions.Series]\n })\n },\n [WidgetTypeId.SearchPlaylists]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchPlaylists],\n type: [TypeFilterOptions.Playlist]\n })\n },\n [WidgetTypeId.SearchMyVideosFolder]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMyVideosFolder],\n source: [SourceFilterOptions.MyVideos]\n })\n },\n [WidgetTypeId.SearchMySchoolLibraryFolder]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMySchoolLibraryFolder],\n source: [SourceFilterOptions.School]\n })\n },\n [WidgetTypeId.SearchMyVideos]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMyVideos],\n source: [SourceFilterOptions.MyVideos]\n })\n },\n [WidgetTypeId.SearchMySchoolLibraryVideos]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMySchoolLibraryVideos],\n source: [SourceFilterOptions.School]\n })\n },\n [WidgetTypeId.SearchExchangeArchive]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchExchangeArchive],\n source: [SourceFilterOptions.ExchangeArchive]\n })\n },\n [WidgetTypeId.SearchRelatedResults]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchTopResults]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationCurriculumMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchTags]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchCurriculumCode]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchSuggestions]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchContentPartners]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchContentPartners],\n type: [TypeFilterOptions.PartnerProfile]\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.CuratedContentPartners]: {\n getCustomParams: () => ({\n limit: 12\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerLatestReleasedVideos]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerSeries]: {\n getCollectionAppLink: appLinks => {\n return appLinks?.scopedSearchHome?.({\n type: [TypeFilterOptions.Series]\n });\n },\n getCustomParams: () => ({\n limit: 12\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerVideos]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.SpotlightContentPartners]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartners]: {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => ({\n letterPrefix: options?.params?.letterPrefix,\n sort: options?.params?.sort\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnersHub]: {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => {\n if (targetType !== DashboardTargetType.PartnerProfileHub)\n return {};\n\n return {\n objectId: options?.params?.objectId\n };\n },\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.TrendingContentPartnersVideo]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerAllVideos]: {\n getCustomParams: (widgetTemplate: WidgetTemplate) => {\n if (widgetTemplate === WidgetTemplate.ThumbnailFixedListSearchCta)\n return { limit: 3 };\n\n return {};\n },\n predicate: partnerProfileWidgetTypeIdPredicate\n }\n};","import React from 'react';\n\nexport function WarningOutlineSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='m13.026 4.377 8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0M12 5 3.5 19h17zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2m.75-3.677a.69.69 0 0 1-.7.677.69.69 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677s.7.303.7.677z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","export enum WidgetStatus {\n Draft = 0,\n Published = 1,\n Archived = 2\n}\n\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { AnalyticsOptions, ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { WidgetStatus } from 'libs/shared/enums/WidgetStatus';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { Breakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { BaseWidget, CuratedDashboardAppLink, CuratedWidget, CuratedWidgetContent, Playlist, Presentation, Series, Video, VideoTypes, VideoWidgetTemplateContent, WidgetMetadata, WidgetPreference } from 'libs/shared/interfaces';\n\nimport { AnyWidgetTemplateProps } from '../components/widgets/curated-widgets/WidgetProps';\nimport { WidgetTypeIdConfig } from '../constants/WidgetTypeIdConfig';\nimport { MasterType } from '../enums/MasterType';\n\nimport { MasterTypeHelper } from './MasterTypeHelper';\n\nenum WidgetStatusString {\n Draft = 'Draft',\n Published = 'Published',\n Archived = 'Archived'\n}\n\nexport const WidgetHelper = {\n /**\n * Used by both the FixedWidget and DynamicWidget\n */\n getSliderAnalyticsOptions: (): AnalyticsOptions => ({\n actionType: UserAction.Click,\n location: LocationContext.SlidingList,\n entity: EntityType.Widget,\n descriptor: ClickDescriptor.Slide\n }),\n\n /**\n * Used by both the FixedWidget and DynamicWidget\n */\n getSliderItemAnalyticsOptions: (): AnalyticsOptions => ({\n location: LocationContext.SlidingListItem\n }),\n\n getSliderHeadingAnalyticsOptions: (): AnalyticsOptions => ({\n actionType: UserAction.Click,\n location: LocationContext.SlidingList,\n entity: EntityType.Widget,\n descriptor: ClickDescriptor.Title\n }),\n\n useGetContent(\n content: CuratedWidgetContent,\n widgetTypeId: WidgetTypeId,\n isPreviewing: boolean,\n preferences: WidgetPreference[],\n removedItemIds: string[]\n ): { content: CuratedWidgetContent; unfilteredContent: CuratedWidgetContent; } {\n return React.useMemo(() => {\n if (!content)\n return { content: null, unfilteredContent: null };\n\n if (!Array.isArray(content))\n return { content, unfilteredContent: content };\n\n const preferencesHash = preferences?.reduce((acc: HashObject, current) => {\n acc[current.id] = current;\n return acc;\n }, {}) ?? {};\n\n const removedItemIdsHash = removedItemIds.reduce((acc: HashObject, current) => {\n acc[current] = true;\n return acc;\n }, {});\n\n const contentCopy = [...content];\n \n const sortedContent = contentCopy.sort((a, b) => {\n if (!('id' in a) || !('id' in b))\n return 0;\n\n const aIndex = preferencesHash[a.id]?.index ?? contentCopy.findIndex(c => 'id' in c && c.id === a.id);\n const bIndex = preferencesHash[b.id]?.index ?? contentCopy.findIndex(c => 'id' in c && c.id === b.id);\n\n if (aIndex < bIndex)\n return -1;\n\n if (aIndex > bIndex)\n return 1;\n\n return 0;\n });\n\n if (WidgetHelper.isBelowContentMinimum(sortedContent, widgetTypeId) && !isPreviewing) {\n return {\n content: [],\n unfilteredContent: sortedContent\n };\n }\n\n const filteredContent = sortedContent.filter(item => {\n if (preferencesHash['id' in item && item.id]?.hidden)\n return false;\n\n if (removedItemIdsHash['id' in item && item.id])\n return false;\n\n return true;\n });\n\n return {\n content: filteredContent,\n unfilteredContent: sortedContent\n };\n }, [ content, preferences ]);\n },\n\n isBelowContentMinimum(content: CuratedWidgetContent, widgetTypeId: WidgetTypeId): boolean {\n const minContent = WidgetTypeIdConfig[widgetTypeId]?.minContent || 0;\n return content?.length < minContent;\n },\n\n getCustomAppLink(props: AnyWidgetTemplateProps): Core.AppLink | null {\n if (\n !('metadata' in props) ||\n !('appLinks' in props) ||\n !('appLink' in props.metadata)\n ) {\n return null;\n }\n\n if (props.metadata?.appLink === CuratedDashboardAppLink.LatestReleases && 'latestReleases' in props.appLinks)\n return props.appLinks?.latestReleases?.();\n\n if (props.metadata?.appLink === CuratedDashboardAppLink.ExploreAllTopics && 'allTopics' in props.appLinks && 'presentation' in props)\n return props.appLinks?.allTopics?.(props.presentation.id);\n\n return null;\n },\n\n getWidgetStatus(widget: CuratedWidget): WidgetStatus {\n let status = widget.status;\n\n if (typeof (status) === 'string') {\n switch (status) {\n case WidgetStatusString.Archived:\n status = WidgetStatus.Archived;\n break;\n case WidgetStatusString.Published:\n status = WidgetStatus.Published;\n break;\n case WidgetStatusString.Draft:\n status = WidgetStatus.Draft;\n break;\n }\n }\n\n return status;\n },\n\n formatResponseData(widget: CuratedWidget, presentation?: Presentation): CuratedWidget {\n const content = widget.content;\n\n if (!content)\n return widget;\n\n if ('author' in content) {\n widget.content = [content] as CuratedWidgetContent;\n return widget;\n }\n\n if ('data' in content)\n widget.content = content.data as CuratedWidgetContent;\n else if (!Array.isArray(content))\n widget.content = [content]; // Handle `classification_featured_video` widgets, which don't return content as an array\n\n switch (widget.widgetId) {\n case WidgetTypeId.ClassificationSeries:\n widget.content = widget.content.filter((c): c is Series => 'tallPoster' in c && !!c.tallPoster?.id);\n break;\n case WidgetTypeId.ClassificationPlaylists:\n widget.content = widget.content.filter((c): c is Playlist => 'cover' in c && !!c.cover?.id);\n break;\n case WidgetTypeId.ContinueWatching:\n widget.content = widget.content.map(c => 'object' in c && c.object);\n default:\n break;\n case WidgetTypeId.Presentations:\n widget.content = widget.content.filter((c): c is Presentation => 'id' in c && c.id.toString() !== presentation?.id?.toString());\n break;\n }\n\n return widget;\n },\n \n isWidgetInTableOfContents(metadata: Partial<WidgetMetadata>): boolean {\n return !!metadata?.showInTableOfContents;\n },\n\n /**\n * Widget container view won't render a widget with no content typically,\n * but some widgets (such as blurbs) have no content, but should render anyway.\n */\n hasNoContent(widgetTypeId: WidgetTypeId): boolean {\n if (widgetTypeId === WidgetTypeId.Blurb)\n return true;\n\n return false;\n },\n\n /**\n * If any widgets should be hidden on smaller screen sizes, add them here.\n * If this needs to be more flexible at some point, it should be added to\n * the widget settings and metadata object.\n */\n canDisplayOnScreenSize(\n breakpoints: Breakpoints,\n widgetTypeId: WidgetTypeId,\n widgetTemplate: WidgetTemplate\n ): boolean {\n if (widgetTypeId === WidgetTypeId.Blurb && widgetTemplate === WidgetTemplate.HeroBannerSmall)\n return !breakpoints.xs && !breakpoints.sm;\n\n return true;\n },\n\n isCompanyWidget(widgetTypeId: WidgetTypeId): boolean {\n switch (widgetTypeId) {\n case WidgetTypeId.CompanyLatestReleasedVideo:\n case WidgetTypeId.CompanyVideos:\n case WidgetTypeId.UpcomingLivestreams:\n return true;\n default:\n return false;\n }\n },\n\n getVideoContent(content: VideoWidgetTemplateContent): VideoTypes[] {\n const firstItem = ArrayHelper.first<Video | Series>(content);\n\n if (MasterTypeHelper.isType<Series>(firstItem, MasterType.Series))\n return firstItem.videos.data;\n\n return content as VideoTypes[];\n },\n\n showRemoveButton(widgetTypeId: WidgetTypeId): boolean {\n return widgetTypeId === WidgetTypeId.ContinueWatching;\n },\n\n /**\n * Paginated data returns more widgets so if we dont merge the widget content by widget type id,\n * it would add another widget to the page rather than appending content to the relevant\n * search result index\n * \n * For example:\n * Say we receive these widgets for a query:\n * - topics widget\n * - related results widget\n * \n * If a user scrolls down to the end of page we fetch more items from the last widget\n * which in this case is 'related results widget'. \n * Now our overall response looks like this\n * - topics widget\n * - related results widget\n * - related results widget\n * \n * Since this is a new widget item entry it will be rendered as a new widget with seprate headings etc.\n * In this case we want to combine these two widgets data into one so its looks like this again:\n * - topics widget\n * - related results widget (data is combined)\n * \n * But what if widget we get recieve has a different widget template id. This currently happens for\n * the 'series widget' - series widget can have the tall poster template or the thumbnail like template.\n * \n * so to visualize this it can be like:\n * - topics widget\n * - top results widget\n * - series widget (template: tall poster)\n * - series widget (template: thumbnail)\n * \n * Since they technically will look different based on the template id we will not merge the data in this case.\n * It will merge the data to the same widget as long as the combination of widget Id + template Id is the same.\n * \n * Since they are separate widgets they will render duplicate headings - we handle this in css instead which\n * checks for adjacent siblings and if its the same widget - it hides the widget heading so it will look\n * like its a single widget rather than separate widgets.\n * \n * - Nish\n */\n mergeWidgets<T extends BaseWidget>(\n items: T[],\n mergeContent: (target: T, source: T) => void\n ): T[] {\n const widgets = ObjectHelper.deepClone(items);\n const groupedWidgets = ArrayHelper.groupBy(widgets, 'widgetId');\n const mergedWidgets: T[] = [];\n\n for (const widgetGroup of Object.values(groupedWidgets)) {\n let currentMergedWidget: T | null = null;\n const groupMergedWidgets: T[] = [];\n\n for (const widget of widgetGroup) {\n if (!currentMergedWidget) {\n currentMergedWidget = widget;\n continue;\n }\n\n if (widget.templateId !== currentMergedWidget.templateId) {\n groupMergedWidgets.push(currentMergedWidget);\n currentMergedWidget = widget;\n continue;\n }\n\n mergeContent(currentMergedWidget, widget);\n }\n\n if (currentMergedWidget) {\n groupMergedWidgets.push(currentMergedWidget);\n }\n mergedWidgets.push(...groupMergedWidgets);\n }\n\n return mergedWidgets;\n }\n};","import React from 'react';\nimport { Spinner } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor, LocationContext } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SvgContainer } from 'libs/shared/components/svg-container/SvgContainer';\nimport { WidgetTypeIdConfig } from 'libs/shared/constants/WidgetTypeIdConfig';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { WarningOutlineSvg } from 'libs/shared/images/svg/status/WarningOutlineSvg';\nimport { WidgetHelper } from 'libs/shared/utils/WidgetHelper';\n\nimport styles from './widget-header.module.scss';\n\nconst namespace = 'shared.widgetHeader';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface WidgetHeaderProps {\n name: string;\n description?: string | JSX.Element;\n isPreviewing?: boolean;\n content?: any[];\n widgetTypeId?: WidgetTypeId;\n badgeComponent?: JSX.Element;\n\n appLink?: Core.AppLink;\n onAppLinkClick?: () => void;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n \n showSeeMoreLink?: boolean;\n onClose?: () => void;\n onFollow?: (shouldFollow: boolean) => void;\n isFollowing?: boolean;\n showFollowSpinner?: boolean;\n}\n\nfunction SeeMore(props: WidgetHeaderProps) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton}`}>\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData }\n analyticsOptions={{\n location: LocationContext.SlidingList,\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.SeeMore\n }}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link' : ''}`}\n >\n <p className='hover-text-underline text-dark curated-widget-heading'>{getPhrase('seeAll')}</p>\n </AppLink>\n </div>\n );\n}\n\nfunction CloseWidgetButton(props: { onClose: () => void }) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton} text-decoration-none cursor-pointer`} onClick={props.onClose}>\n <p className='hover-text-underline text-dark curated-widget-heading'>{getPhrase('hide')}</p>\n </div>\n );\n}\n\nfunction FollowWidgetButton(props: {\n isFollowing: boolean,\n onFollow: (shouldFollow: boolean) => void,\n showFollowSpinner: boolean\n}) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton} text-decoration-none`}>\n {\n props.showFollowSpinner ?\n <Spinner as='span' animation='border' role='status' size='sm' /> :\n <p className='hover-text-underline text-dark curated-widget-heading cursor-pointer' onClick={() => props.onFollow(!props.isFollowing)}>\n {getPhrase(props.isFollowing ? 'unfollow' : 'follow')}\n </p>\n }\n </div>\n );\n}\n\nexport function WidgetHeader(props: WidgetHeaderProps): JSX.Element {\n const hasDescription = !!props.description;\n\n if (!props.name && !props.description)\n return <></>;\n\n const isBelowMinimum = WidgetHelper.isBelowContentMinimum(props.content, props.widgetTypeId);\n const minContent = WidgetTypeIdConfig[props.widgetTypeId]?.minContent ?? 0;\n\n return (\n <div className='curated-widget-header'>\n <div className='d-flex justify-content-between'>\n {!!props.name && (\n <div className='d-flex align-items-center'>\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link text-reset' : ''}`}\n onClick={props.onAppLinkClick}\n >\n <h2 className='h4 curated-widget-heading'>\n {props.isPreviewing && isBelowMinimum && (\n <SvgContainer\n svg={WarningOutlineSvg}\n title={`Widget is below the minimum content threshold of ${minContent} and won't be displayed.`}\n tooltipSpanHack\n tooltipSpanHackClassName='d-inline text-danger me-1'\n />\n )}\n {props.name}\n </h2>\n </AppLink>\n {!!React.isValidElement(props.badgeComponent) && props.badgeComponent}\n </div>\n )}\n <div className='d-flex justify-content-between align-items-center gap-2'>\n {!!props.appLink && !hasDescription && !!props.showSeeMoreLink && <SeeMore {...props}/>}\n {FunctionHelper.isFunction(props.onFollow) &&\n <FollowWidgetButton\n isFollowing={props.isFollowing}\n onFollow={props.onFollow}\n showFollowSpinner={props.showFollowSpinner}\n />\n }\n {FunctionHelper.isFunction(props.onClose) && <CloseWidgetButton onClose={props.onClose}/>}\n </div>\n </div>\n \n {hasDescription && (\n <div className='d-flex justify-content-between align-items-end'>\n <p className={`description curated-widget-description`}>\n <span>{props.description}</span>\n </p>\n {!!props.appLink && !!props.showSeeMoreLink && <SeeMore {...props}/> }\n </div>\n )}\n </div>\n );\n}","export enum TagType {\n Normal = 'normal',\n Pedagogy = 'pedagogy',\n Hidden = 'hidden',\n Skill = 'skill',\n Curation = 'curation'\n}\n\n/**\n * This should **only** be used to create new tags in master (as it only accepts enum values).\n * Use the string enum above for all other cases.\n */\nexport enum TagTypeNumber {\n Normal = 0,\n Pedagogy = 1,\n Hidden = 2,\n Skill = 3,\n Curation = 4\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { TagType } from 'libs/shared/enums/TagType';\nimport { Tag, ThemeColours } from 'libs/shared/interfaces';\n\nimport { DivButton } from '../div-button/DivButton';\n\nimport styles from './tags.module.scss';\n\nconst namespace = 'shared.tags';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface TagItemProps {\n tag: Tag;\n themeColours?: ThemeColours;\n appLink?: Core.AppLink;\n onClick?: () => void;\n onRemove?: () => void;\n disabled?: boolean;\n tagClass?: string;\n}\n\nfunction getTagTypeClass(tagType: TagType, hasThemeColour: boolean): string {\n switch (tagType) {\n case TagType.Pedagogy:\n case TagType.Skill:\n return 'pedagogy-tag text-white';\n\n case TagType.Hidden:\n return 'hidden-tag fw-normal';\n\n case TagType.Normal:\n if (!hasThemeColour)\n return 'bg-gray-100 fw-normal';\n return '';\n\n default:\n return '';\n }\n}\n\nexport function TagItem(props: TagItemProps): JSX.Element {\n const { tag, appLink, onClick, disabled, tagClass = 'tag' } = props;\n\n const name = tag.name.toLowerCase();\n const tagType = tag.tagType?.toLowerCase() as TagType;\n\n const hasThemeColour = (tagType === TagType.Normal && props.themeColours) && !!props.themeColours?.secondary;\n let classNames = `${styles.badgeBase} rounded-pill py-1 px-2 my-1 me-1 ${tagClass} ${getTagTypeClass(tagType, hasThemeColour)}`;\n let textContainerClass = `text-truncate text-nowrap`;\n\n if (hasThemeColour)\n classNames += ' text-white';\n\n if ((appLink || onClick) && !disabled)\n classNames += ' cursor-pointer';\n\n if (disabled)\n classNames += ' ' + styles.disabled;\n\n if (props.onRemove) {\n classNames += ' ' + styles.removeBadge;\n textContainerClass += ' ' + `${styles.removeBadgeText} d-inline-flex align-items-center lh-1`;\n }\n if (!appLink)\n classNames += ' d-inline-block';\n\n const style: React.CSSProperties = hasThemeColour\n ? { backgroundColor: props.themeColours.secondary }\n : {};\n\n if (appLink) {\n return (\n <AppLink\n onClick={onClick}\n appLink={appLink}\n className={classNames}\n title={name}\n style={style}\n >\n <span className={textContainerClass}>{name}</span>\n </AppLink>\n );\n }\n\n return (\n <button\n onClick={onClick}\n className={classNames}\n title={name}\n style={style}\n aria-label={`${getPhrase('ariaFilter')} ${name}`}\n >\n <span className={textContainerClass}>\n {name}\n {props.onRemove &&\n <DivButton\n onClick={props.onRemove}\n className={`${styles.close} btn-close font-size-normal`}\n role='button'\n aria-label='Close'\n />\n }\n </span>\n </button>\n );\n}"],"names":["CuratedDashboardAppLink","FilterIdNames","FilterBlacklist","FilterWhitelist","acc","prev","SourceFilterOptions","TypeFilterOptions","WidgetTemplate","WidgetTypeId","CuratedDashboardHelper","selectedObj","formikProps","data","ArrayHelper","objectId","newData","id","info","DashboardTargetType","options","presentationId","companyId","targetType","classificationId","slug","dashboard","type","split","_a","target","obj","now","from","DateHelper","to","widgetTypeId","templateId","audienceIds","preferredCurriculumId","params","_b","WidgetTypeIdConfig","widgets","systemGeneratedClassificationWidgetTypes","widget","targetInfo","settingsHash","config","partnerProfileWidgetTypeIdPredicate","widgetTemplate","appLinks","content","template","WarningOutlineSvg","props","jsx","WidgetStatus","WidgetHelper","UserAction","LocationContext","EntityType","ClickDescriptor","isPreviewing","preferences","removedItemIds","React","preferencesHash","current","removedItemIdsHash","contentCopy","sortedContent","a","b","aIndex","c","bIndex","item","minContent","_c","_d","_f","_e","status","presentation","metadata","breakpoints","firstItem","MasterTypeHelper","MasterType","items","mergeContent","ObjectHelper","groupedWidgets","mergedWidgets","widgetGroup","currentMergedWidget","groupMergedWidgets","namespace","getPhrase","LanguageService","SeeMore","styles","AppLink","CloseWidgetButton","FollowWidgetButton","Spinner","WidgetHeader","hasDescription","Fragment","isBelowMinimum","jsxs","SvgContainer","FunctionHelper","TagType","getTagTypeClass","tagType","hasThemeColour","TagItem","tag","appLink","onClick","disabled","tagClass","name","classNames","textContainerClass","style","DivButton"],"mappings":"qOASO,IAAKA,GAAAA,IACVA,EAAA,eAAiB,kBACjBA,EAAA,iBAAmB,qBACnBA,EAAA,6BAA+B,iCAC/BA,EAAA,wBAA0B,2BAJhBA,IAAAA,GAAA,CAAA,CAAA,ECFZ,MAAMC,EACN,CACE,OACA,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MvB,EAAO,YAC3BwB,GAAsB,IAASxB,EAAO,eAAe,0CAElDkB,IACHK,GAAc,mBAEhB,MAAME,EAA6BV,EAC/B,CAAE,gBAAiB9D,EAAM,aAAa,SAAA,EACtC,CAAA,EAEJ,OAAIiE,EAEAhE,EAAAA,IAAC+C,EAAA,CACC,QAAAkB,EACA,QAAAD,EACA,UAAWK,EACX,MAAOD,EACP,MAAAG,EAEA,SAAAvE,EAAAA,IAAC,OAAA,CAAK,UAAWsE,EAAqB,SAAAF,CAAA,CAAK,CAAA,CAAA,EAM/CpE,EAAAA,IAAC,SAAA,CACC,QAAAiE,EACA,UAAWI,EACX,MAAOD,EACP,MAAAG,EACA,aAAY,GAAG5B,GAAU,YAAY,CAAC,IAAIyB,CAAI,GAE9C,SAAAb,EAAAA,KAAC,OAAA,CAAK,UAAWe,EACd,SAAA,CAAAF,EACArE,EAAM,UACLC,EAAAA,IAACwE,EAAA,CACC,QAASzE,EAAM,SACf,UAAW,GAAG+C,EAAO,KAAK,8BAC1B,KAAK,SACL,aAAW,OAAA,CAAA,CACb,CAAA,CAEJ,CAAA,CAAA,CAGN"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,av as x,G as d,K as b,F as g,aq as j,ab as v,ag as N,Q as f,r as h,bH as y,bA as k}from"./app-
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{j as e,av as x,G as d,K as b,F as g,aq as j,ab as v,ag as N,Q as f,r as h,bH as y,bA as k}from"./app-DIXL6Xww.js";function T(n){return e.jsx("svg",{...n,children:e.jsx("path",{d:"M12 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m0 5.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m0-11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3",fill:"currentColor"})})}const C="_dropdownToggle_1jkd1_1",S={dropdownToggle:C};function p(){return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{padding:"0.53125rem 1rem"},children:e.jsx("div",{className:"partial-loading-background",style:{height:"1.0625rem",width:"8rem"}})}),e.jsx("div",{style:{padding:"0.53125rem 1rem"},children:e.jsx("div",{className:"partial-loading-background",style:{height:"1.0625rem",width:"12rem"}})}),e.jsx("div",{style:{padding:"0.53125rem 1rem"},children:e.jsx("div",{className:"partial-loading-background",style:{height:"1.0625rem",width:"11rem"}})}),e.jsx("div",{style:{padding:"0.53125rem 1rem"},children:e.jsx("div",{className:"partial-loading-background",style:{height:"1.0625rem",width:"9rem"}})})]})}function r(n){let o="dropdown-item";return n&&(o+=` ${n}`),o}function u(n){const o=g.isFunction(n.action.label)?n.action.label():e.jsx(e.Fragment,{children:n.action.label});if(n.action.appLink)return e.jsxs(j,{appLink:n.action.appLink,onClick:n.action.onClick,className:r(n.action.className),analyticsData:n.action.analyticsData,analyticsOptions:n.action.analyticsOptions,openInNewTab:n.action.openInNewTab,disabled:n.action.disabled,children:[n.action.svg&&e.jsx(d,{svg:n.action.svg,className:"d-inline-block svg-container me-2 align-middle"}),e.jsx("span",{className:"align-middle",children:o})]});function l(i){i.preventDefault(),n.action.analyticsData&&n.action.analyticsOptions&&v.logUserAction(n.action.analyticsData,n.action.analyticsOptions),g.isFunction(n.action.onClick)&&n.action.onClick(),n.action.href&&N.PageLoad(n.action.href,n.action.openInNewTab)}return n.action.href?e.jsxs("a",{className:r(n.action.className),onClick:l,href:n.action.href,children:[n.action.svg&&e.jsx(d,{svg:n.action.svg,className:"d-inline-block svg-container me-2 align-middle"}),e.jsx("span",{className:"align-middle",children:o})]}):e.jsxs("span",{className:`cursor-pointer ${r(n.action.className)}`,onClick:l,role:"button",tabIndex:0,onKeyDown:i=>i.key==="Enter"&&l(i),children:[n.action.svg&&e.jsx(d,{svg:n.action.svg,className:"d-inline-block svg-container me-2"}),o]})}w.defaultProps={dropdownToggleClassName:"btn btn-light",dropdownToggleSvgSize:f.Small};function w(n){if(!n.actions||!n.actions.length)return e.jsx(e.Fragment,{});const o=n.actions.some(t=>t.lazyPlaceholder);let l="dropdown";n.className&&(l+=` ${n.className}`);const i=`actions-dropdown-${x.getRandomInt()}`;let s=`dropdown-toggle px-0 ${S.dropdownToggle}`;n.dropdownToggleClassName&&(s+=` ${n.dropdownToggleClassName}`);let a;return e.jsxs("div",{className:l,children:[e.jsx("button",{className:s,type:"button",id:i,"data-bs-toggle":"dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"More actions dropdown",onClick:o?n.fetchMore:null,children:e.jsx(d,{svg:T,size:n.dropdownToggleSvgSize})}),e.jsx("ul",{className:"dropdown-menu dropdown-menu-end dropdown-menu-right font-size-normal","aria-labelledby":i,children:o?e.jsx(p,{}):n.actions.map((t,c)=>{const m=a!==void 0&&a!==t.group;return a=t.group,t.tooltip?e.jsxs("li",{children:[m&&e.jsx("hr",{className:"dropdown-divider",role:"separator"}),e.jsx(b,{title:t.tooltip,spanHack:!0,children:e.jsx(u,{action:t})})]},c):e.jsxs("li",{children:[m&&e.jsx("hr",{className:"dropdown-divider",role:"separator"}),e.jsx(u,{action:t})]},c)})})]})}function z(n){const o=h.useMemo(()=>n.actions.sort((a,t)=>a.order-t.order),[n.actions]),l=[],i=[];o.forEach(a=>{a.button?l.push(a):i.push(a)});let s="d-flex";return n.className&&(s+=` ${n.className}`),!l.length&&!i.length?e.jsx(e.Fragment,{}):e.jsxs("div",{className:s,children:[l.length?l.map((a,t)=>e.jsx(h.Fragment,{children:(()=>{if(a.label){const c=g.isFunction(a.label)?a.label():e.jsx(e.Fragment,{children:a.label});return e.jsx(y,{appLink:a.appLink,href:a.href,onClick:a.onClick,svg:a.svg,svgSize:n.dropdownToggleSvgSize,className:a.className,tooltip:a.tooltip,showSpinner:a.showSpinner,analyticsData:a.analyticsData,analyticsOptions:a.analyticsOptions,openInNewTab:a.openInNewTab,disabled:a.disabled,children:c})}return e.jsx(k,{appLink:a.appLink,href:a.href,onClick:a.onClick,svg:a.svg,className:a.className,analyticsData:a.analyticsData,analyticsOptions:a.analyticsOptions,openInNewTab:a.openInNewTab,disabled:a.disabled,showBorder:a.showBorder,customSize:n.customSize,ariaLabel:a.tooltip,tooltip:a.tooltip})})()},t)):e.jsx(e.Fragment,{}),n.sortComponent&&n.sortComponent,i.length?e.jsx(w,{actions:i,dropdownToggleClassName:n.actionsDropdownClassName,dropdownToggleSvgSize:n.dropdownToggleSvgSize,fetchMore:n.fetchMore}):e.jsx(e.Fragment,{})]})}export{z as A};
|
|
2
|
+
//# sourceMappingURL=BljWHlhm.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChMcPIOp.chunk.js","sources":["../../../../libs/shared/src/images/svg/actions/MoreSvg.tsx","../../../../libs/shared/src/components/actions/ActionsDropdown.tsx","../../../../libs/shared/src/components/actions/Actions.tsx"],"sourcesContent":["import React from 'react';\n\nexport function MoreSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='M12 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m0 5.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m0-11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import * as React from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Core } from 'libs/common/core';\nimport { RandomHelper } from 'libs/common/react/utils/RandomHelper';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { MoreSvg } from 'libs/shared/images/svg/actions/MoreSvg';\n\nimport { ActionOptions } from './Actions';\n\nimport styles from './actions.module.scss';\n\nfunction LazyDropdownItems(): JSX.Element {\n return (\n <>\n <div style={{ padding: '0.53125rem 1rem' }}>\n <div className='partial-loading-background' style={{ height: '1.0625rem', width: '8rem' }}></div>\n </div>\n <div style={{ padding: '0.53125rem 1rem' }}>\n <div className='partial-loading-background' style={{ height: '1.0625rem', width: '12rem' }}></div>\n </div>\n <div style={{ padding: '0.53125rem 1rem' }}>\n <div className='partial-loading-background' style={{ height: '1.0625rem', width: '11rem' }}></div>\n </div>\n <div style={{ padding: '0.53125rem 1rem' }}>\n <div className='partial-loading-background' style={{ height: '1.0625rem', width: '9rem' }}></div>\n </div>\n </>\n );\n}\n\nfunction getDropdownItemClassName(actionClassName?: string): string {\n let className = 'dropdown-item';\n\n if (actionClassName)\n className += ` ${actionClassName}`;\n\n return className;\n}\n\nexport type DropdownActionOptions = Omit<ActionOptions, 'button'>;\n\ninterface ActionsDropdownItemProps {\n action: DropdownActionOptions;\n}\n\nfunction ActionsDropdownItem(props: ActionsDropdownItemProps): React.ReactElement {\n const label = FunctionHelper.isFunction(props.action.label)\n ? props.action.label()\n : <>{props.action.label}</>;\n\n if (props.action.appLink)\n return (\n <AppLink\n appLink={props.action.appLink}\n onClick={props.action.onClick}\n className={getDropdownItemClassName(props.action.className)}\n analyticsData={props.action.analyticsData}\n analyticsOptions={props.action.analyticsOptions}\n openInNewTab={props.action.openInNewTab}\n disabled={props.action.disabled}\n >\n {props.action.svg && <SvgContainer svg={props.action.svg} className='d-inline-block svg-container me-2 align-middle' />}\n <span className='align-middle'>{label}</span>\n </AppLink>\n );\n\n function onClick(e: React.MouseEvent | React.KeyboardEvent): void {\n e.preventDefault();\n\n if (props.action.analyticsData && props.action.analyticsOptions)\n AnalyticsHelper.logUserAction(props.action.analyticsData, props.action.analyticsOptions);\n\n if (FunctionHelper.isFunction(props.action.onClick))\n props.action.onClick();\n\n if (props.action.href)\n Core.LocationUtils.PageLoad(props.action.href, props.action.openInNewTab);\n }\n\n if (props.action.href) {\n return (\n <a\n className={getDropdownItemClassName(props.action.className)}\n onClick={onClick}\n href={props.action.href}\n >\n {props.action.svg && <SvgContainer svg={props.action.svg} className='d-inline-block svg-container me-2 align-middle' />}\n <span className='align-middle'>{label}</span>\n </a>\n );\n }\n\n return (\n <span\n className={`cursor-pointer ${getDropdownItemClassName(props.action.className)}`}\n onClick={onClick}\n role='button'\n tabIndex={0}\n onKeyDown={(e: React.KeyboardEvent) => e.key === 'Enter' && onClick(e)}\n >\n {props.action.svg && <SvgContainer svg={props.action.svg} className='d-inline-block svg-container me-2' />}\n {label}\n </span>\n );\n}\n\ninterface ActionsDropdownProps {\n actions: DropdownActionOptions[];\n className?: string;\n dropdownToggleClassName?: string;\n dropdownToggleSvgSize?: SvgContainerSize;\n fetchMore?: () => void;\n}\n\nActionsDropdown.defaultProps = {\n dropdownToggleClassName: 'btn btn-light',\n dropdownToggleSvgSize: SvgContainerSize.Small\n};\n\nexport function ActionsDropdown(props: ActionsDropdownProps): React.ReactElement {\n if (!props.actions || !props.actions.length)\n return <></>;\n\n const isLazy = props.actions.some(a => a.lazyPlaceholder);\n\n let className = 'dropdown';\n\n if (props.className)\n className += ` ${props.className}`;\n\n // Generate unique id to avoid collisions.\n const dropdownToggleId = `actions-dropdown-${RandomHelper.getRandomInt()}`;\n\n let dropdownToggleClassName = `dropdown-toggle px-0 ${styles.dropdownToggle}`;\n\n if (props.dropdownToggleClassName)\n dropdownToggleClassName += ` ${props.dropdownToggleClassName}`;\n\n let currentGroup: string;\n\n return (\n <div className={className}>\n <button\n className={dropdownToggleClassName}\n type='button'\n id={dropdownToggleId}\n data-bs-toggle='dropdown'\n data-toggle='dropdown'\n aria-haspopup='true'\n aria-expanded='false'\n aria-label={'More actions dropdown'}\n onClick={isLazy ? props.fetchMore : null}\n >\n <SvgContainer svg={MoreSvg} size={props.dropdownToggleSvgSize} />\n </button>\n <ul className='dropdown-menu dropdown-menu-end dropdown-menu-right font-size-normal' aria-labelledby={dropdownToggleId}>\n {isLazy ?\n <LazyDropdownItems /> :\n props.actions.map((a, idx) => {\n const showDivider = currentGroup !== undefined && currentGroup !== a.group;\n currentGroup = a.group;\n \n if (a.tooltip) {\n return (\n <li key={idx}>\n {showDivider && <hr className='dropdown-divider' role='separator'></hr>}\n <Tooltip title={a.tooltip} spanHack>\n <ActionsDropdownItem action={a} />\n </Tooltip>\n \n </li>\n );\n }\n \n return (\n <li key={idx}>\n {showDivider && <hr className='dropdown-divider' role='separator'></hr>}\n <ActionsDropdownItem action={a} />\n </li>\n );\n })\n }\n </ul>\n </div>\n );\n}","import * as React from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { BaseObject } from 'libs/shared/interfaces';\nimport { SvgIcon } from 'libs/shared/utils/SvgHelper';\n\nimport { ActionButton } from './ActionButton';\nimport { ActionsDropdown } from './ActionsDropdown';\n\nexport interface ActionOptions {\n order?: number;\n label?: string | (() => JSX.Element);\n appLink?: Core.AppLink;\n href?: string;\n onClick?: () => void;\n svg?: SvgIcon;\n className?: string;\n button?: boolean; // If true, a button will be rendered. Otherwise the action will be rendered in the dropdown.\n tooltip?: string;\n showSpinner?: boolean;\n showBorder?: boolean; // only works for button without text label\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n disabled?: boolean;\n openInNewTab?: boolean; // Only used if appLink or href is provided\n group?: string;\n lazyPlaceholder?: boolean;\n}\n\nexport type ActionGenerator = (obj: BaseObject) => ActionOptions[];\n\ninterface ActionsProps {\n actions: ActionOptions[];\n className?: string;\n actionsDropdownClassName?: string;\n dropdownToggleSvgSize?: SvgContainerSize;\n sortComponent?: JSX.Element;\n customSize?: boolean;\n fetchMore?: () => void;\n}\n\nexport function Actions(props: ActionsProps): JSX.Element {\n const orderedActions = React.useMemo(() => props.actions.sort((a, b) => a.order - b.order), [props.actions]);\n\n const buttonActions: ActionOptions[] = [];\n const moreActions: ActionOptions[] = [];\n\n orderedActions.forEach(a => {\n if (a.button)\n buttonActions.push(a);\n else\n moreActions.push(a);\n });\n\n let className = 'd-flex';\n\n if (props.className)\n className += ` ${props.className}`;\n\n if (!buttonActions.length && !moreActions.length)\n return <></>;\n\n return (\n <div className={className}>\n {buttonActions.length ? buttonActions.map((a, idx) => (\n <React.Fragment key={idx}>\n {(() => {\n if (a.label) {\n const label: JSX.Element = FunctionHelper.isFunction(a.label)\n ? a.label()\n : <>{a.label}</>;\n\n return (\n <ActionButton\n appLink={a.appLink}\n href={a.href}\n onClick={a.onClick}\n svg={a.svg}\n svgSize={props.dropdownToggleSvgSize}\n className={a.className}\n tooltip={a.tooltip}\n showSpinner={a.showSpinner}\n analyticsData={a.analyticsData}\n analyticsOptions={a.analyticsOptions}\n openInNewTab={a.openInNewTab}\n disabled={a.disabled}\n >\n {label}\n </ActionButton>\n );\n }\n\n return (\n <IconButton\n appLink={a.appLink}\n href={a.href}\n onClick={a.onClick}\n svg={a.svg}\n className={a.className}\n analyticsData={a.analyticsData}\n analyticsOptions={a.analyticsOptions}\n openInNewTab={a.openInNewTab}\n disabled={a.disabled}\n showBorder={a.showBorder}\n customSize={props.customSize}\n ariaLabel={a.tooltip}\n tooltip={a.tooltip}\n />\n );\n })()}\n </React.Fragment>\n )) : <></>}\n {props.sortComponent && props.sortComponent}\n {moreActions.length ? (\n <ActionsDropdown\n actions={moreActions}\n dropdownToggleClassName={props.actionsDropdownClassName}\n dropdownToggleSvgSize={props.dropdownToggleSvgSize}\n fetchMore={props.fetchMore}\n />\n ) : <></>}\n </div>\n );\n}"],"names":["MoreSvg","props","jsx","LazyDropdownItems","jsxs","Fragment","getDropdownItemClassName","actionClassName","className","ActionsDropdownItem","label","FunctionHelper","AppLink","SvgContainer","onClick","e","AnalyticsHelper","Core.LocationUtils","ActionsDropdown","SvgContainerSize","isLazy","a","dropdownToggleId","RandomHelper","dropdownToggleClassName","styles","currentGroup","idx","showDivider","Tooltip","Actions","orderedActions","React.useMemo","b","buttonActions","moreActions","React.Fragment","ActionButton","IconButton"],"mappings":"yHAEO,SAASA,EAAQC,EAAsC,CAC5D,OACEC,EAAAA,IAAC,MAAA,CAAK,GAAGD,EACP,SAAAC,EAAAA,IAAC,OAAA,CACC,EAAE,kIACF,KAAK,cAAA,CAAA,EAET,CAEJ,wDCMA,SAASC,GAAiC,CACxC,OACEC,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAH,MAAC,OAAI,MAAO,CAAE,QAAS,iBAAA,EACrB,SAAAA,EAAAA,IAAC,MAAA,CAAI,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,QAAU,EAC7F,QACC,MAAA,CAAI,MAAO,CAAE,QAAS,iBAAA,EACrB,SAAAA,EAAAA,IAAC,MAAA,CAAI,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,SAAW,EAC9F,QACC,MAAA,CAAI,MAAO,CAAE,QAAS,iBAAA,EACrB,SAAAA,EAAAA,IAAC,MAAA,CAAI,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,SAAW,EAC9F,QACC,MAAA,CAAI,MAAO,CAAE,QAAS,iBAAA,EACrB,SAAAA,MAAC,MAAA,CAAI,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,MAAA,EAAU,CAAA,CAC7F,CAAA,EACF,CAEJ,CAEA,SAASI,EAAyBC,EAAkC,CAClE,IAAIC,EAAY,gBAEhB,OAAID,IACFC,GAAa,IAAID,CAAe,IAE3BC,CACT,CAQA,SAASC,EAAoBR,EAAqD,CAChF,MAAMS,EAAQC,EAAe,WAAWV,EAAM,OAAO,KAAK,EACtDA,EAAM,OAAO,MAAA,EACbC,EAAAA,IAAAG,WAAA,CAAG,SAAAJ,EAAM,OAAO,MAAM,EAE1B,GAAIA,EAAM,OAAO,QACf,OACEG,EAAAA,KAACQ,EAAA,CACC,QAASX,EAAM,OAAO,QACtB,QAASA,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AAE,cACjB,iBAAkB,EAAE,iBACpB,aAAc,EAAE,aAChB,SAAU,EAAE,SAEX,SAAAS,CAAA,CAAA,CAGP,CAEA,OACER,EAAAA,IAACoC,EAAA,CACC,QAAS,EAAE,QACX,KAAM,EAAE,KACR,QAAS,EAAE,QACX,IAAK,EAAE,IACP,UAAW,EAAE,UACb,cAAe,EAAE,cACjB,iBAAkB,EAAE,iBACpB,aAAc,EAAE,aAChB,SAAU,EAAE,SACZ,WAAY,EAAE,WACd,WAAYrC,EAAM,WAClB,UAAW,EAAE,QACb,QAAS,EAAE,OAAA,CAAA,CAGjB,GAAA,CAAG,EA5CgB0B,CA6CrB,CACD,EAAIzB,EAAAA,IAAAG,EAAAA,SAAA,EAAE,EACNJ,EAAM,eAAiBA,EAAM,cAC7BkC,EAAY,OACXjC,EAAAA,IAACgB,EAAA,CACC,QAASiB,EACT,wBAAyBlC,EAAM,yBAC/B,sBAAuBA,EAAM,sBAC7B,UAAWA,EAAM,SAAA,CAAA,EAEjBC,EAAAA,IAAAG,EAAAA,SAAA,CAAA,CAAE,CAAA,EACR,CAEJ"}
|
|
1
|
+
{"version":3,"file":"BljWHlhm.chunk.js","sources":["../../../../libs/shared/src/images/svg/actions/MoreSvg.tsx","../../../../libs/shared/src/components/actions/ActionsDropdown.tsx","../../../../libs/shared/src/components/actions/Actions.tsx"],"sourcesContent":["import React from 'react';\n\nexport function MoreSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='M12 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m0 5.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m0-11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import * as React from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Core } from 'libs/common/core';\nimport { RandomHelper } from 'libs/common/react/utils/RandomHelper';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { MoreSvg } from 'libs/shared/images/svg/actions/MoreSvg';\n\nimport { ActionOptions } from './Actions';\n\nimport styles from './actions.module.scss';\n\nfunction LazyDropdownItems(): JSX.Element {\n return (\n <>\n <div style={{ padding: '0.53125rem 1rem' }}>\n <div className='partial-loading-background' style={{ height: '1.0625rem', width: '8rem' }}></div>\n </div>\n <div style={{ padding: '0.53125rem 1rem' }}>\n <div className='partial-loading-background' style={{ height: '1.0625rem', width: '12rem' }}></div>\n </div>\n <div style={{ padding: '0.53125rem 1rem' }}>\n <div className='partial-loading-background' style={{ height: '1.0625rem', width: '11rem' }}></div>\n </div>\n <div style={{ padding: '0.53125rem 1rem' }}>\n <div className='partial-loading-background' style={{ height: '1.0625rem', width: '9rem' }}></div>\n </div>\n </>\n );\n}\n\nfunction getDropdownItemClassName(actionClassName?: string): string {\n let className = 'dropdown-item';\n\n if (actionClassName)\n className += ` ${actionClassName}`;\n\n return className;\n}\n\nexport type DropdownActionOptions = Omit<ActionOptions, 'button'>;\n\ninterface ActionsDropdownItemProps {\n action: DropdownActionOptions;\n}\n\nfunction ActionsDropdownItem(props: ActionsDropdownItemProps): React.ReactElement {\n const label = FunctionHelper.isFunction(props.action.label)\n ? props.action.label()\n : <>{props.action.label}</>;\n\n if (props.action.appLink)\n return (\n <AppLink\n appLink={props.action.appLink}\n onClick={props.action.onClick}\n className={getDropdownItemClassName(props.action.className)}\n analyticsData={props.action.analyticsData}\n analyticsOptions={props.action.analyticsOptions}\n openInNewTab={props.action.openInNewTab}\n disabled={props.action.disabled}\n >\n {props.action.svg && <SvgContainer svg={props.action.svg} className='d-inline-block svg-container me-2 align-middle' />}\n <span className='align-middle'>{label}</span>\n </AppLink>\n );\n\n function onClick(e: React.MouseEvent | React.KeyboardEvent): void {\n e.preventDefault();\n\n if (props.action.analyticsData && props.action.analyticsOptions)\n AnalyticsHelper.logUserAction(props.action.analyticsData, props.action.analyticsOptions);\n\n if (FunctionHelper.isFunction(props.action.onClick))\n props.action.onClick();\n\n if (props.action.href)\n Core.LocationUtils.PageLoad(props.action.href, props.action.openInNewTab);\n }\n\n if (props.action.href) {\n return (\n <a\n className={getDropdownItemClassName(props.action.className)}\n onClick={onClick}\n href={props.action.href}\n >\n {props.action.svg && <SvgContainer svg={props.action.svg} className='d-inline-block svg-container me-2 align-middle' />}\n <span className='align-middle'>{label}</span>\n </a>\n );\n }\n\n return (\n <span\n className={`cursor-pointer ${getDropdownItemClassName(props.action.className)}`}\n onClick={onClick}\n role='button'\n tabIndex={0}\n onKeyDown={(e: React.KeyboardEvent) => e.key === 'Enter' && onClick(e)}\n >\n {props.action.svg && <SvgContainer svg={props.action.svg} className='d-inline-block svg-container me-2' />}\n {label}\n </span>\n );\n}\n\ninterface ActionsDropdownProps {\n actions: DropdownActionOptions[];\n className?: string;\n dropdownToggleClassName?: string;\n dropdownToggleSvgSize?: SvgContainerSize;\n fetchMore?: () => void;\n}\n\nActionsDropdown.defaultProps = {\n dropdownToggleClassName: 'btn btn-light',\n dropdownToggleSvgSize: SvgContainerSize.Small\n};\n\nexport function ActionsDropdown(props: ActionsDropdownProps): React.ReactElement {\n if (!props.actions || !props.actions.length)\n return <></>;\n\n const isLazy = props.actions.some(a => a.lazyPlaceholder);\n\n let className = 'dropdown';\n\n if (props.className)\n className += ` ${props.className}`;\n\n // Generate unique id to avoid collisions.\n const dropdownToggleId = `actions-dropdown-${RandomHelper.getRandomInt()}`;\n\n let dropdownToggleClassName = `dropdown-toggle px-0 ${styles.dropdownToggle}`;\n\n if (props.dropdownToggleClassName)\n dropdownToggleClassName += ` ${props.dropdownToggleClassName}`;\n\n let currentGroup: string;\n\n return (\n <div className={className}>\n <button\n className={dropdownToggleClassName}\n type='button'\n id={dropdownToggleId}\n data-bs-toggle='dropdown'\n data-toggle='dropdown'\n aria-haspopup='true'\n aria-expanded='false'\n aria-label={'More actions dropdown'}\n onClick={isLazy ? props.fetchMore : null}\n >\n <SvgContainer svg={MoreSvg} size={props.dropdownToggleSvgSize} />\n </button>\n <ul className='dropdown-menu dropdown-menu-end dropdown-menu-right font-size-normal' aria-labelledby={dropdownToggleId}>\n {isLazy ?\n <LazyDropdownItems /> :\n props.actions.map((a, idx) => {\n const showDivider = currentGroup !== undefined && currentGroup !== a.group;\n currentGroup = a.group;\n \n if (a.tooltip) {\n return (\n <li key={idx}>\n {showDivider && <hr className='dropdown-divider' role='separator'></hr>}\n <Tooltip title={a.tooltip} spanHack>\n <ActionsDropdownItem action={a} />\n </Tooltip>\n \n </li>\n );\n }\n \n return (\n <li key={idx}>\n {showDivider && <hr className='dropdown-divider' role='separator'></hr>}\n <ActionsDropdownItem action={a} />\n </li>\n );\n })\n }\n </ul>\n </div>\n );\n}","import * as React from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { BaseObject } from 'libs/shared/interfaces';\nimport { SvgIcon } from 'libs/shared/utils/SvgHelper';\n\nimport { ActionButton } from './ActionButton';\nimport { ActionsDropdown } from './ActionsDropdown';\n\nexport interface ActionOptions {\n order?: number;\n label?: string | (() => JSX.Element);\n appLink?: Core.AppLink;\n href?: string;\n onClick?: () => void;\n svg?: SvgIcon;\n className?: string;\n button?: boolean; // If true, a button will be rendered. Otherwise the action will be rendered in the dropdown.\n tooltip?: string;\n showSpinner?: boolean;\n showBorder?: boolean; // only works for button without text label\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n disabled?: boolean;\n openInNewTab?: boolean; // Only used if appLink or href is provided\n group?: string;\n lazyPlaceholder?: boolean;\n}\n\nexport type ActionGenerator = (obj: BaseObject) => ActionOptions[];\n\ninterface ActionsProps {\n actions: ActionOptions[];\n className?: string;\n actionsDropdownClassName?: string;\n dropdownToggleSvgSize?: SvgContainerSize;\n sortComponent?: JSX.Element;\n customSize?: boolean;\n fetchMore?: () => void;\n}\n\nexport function Actions(props: ActionsProps): JSX.Element {\n const orderedActions = React.useMemo(() => props.actions.sort((a, b) => a.order - b.order), [props.actions]);\n\n const buttonActions: ActionOptions[] = [];\n const moreActions: ActionOptions[] = [];\n\n orderedActions.forEach(a => {\n if (a.button)\n buttonActions.push(a);\n else\n moreActions.push(a);\n });\n\n let className = 'd-flex';\n\n if (props.className)\n className += ` ${props.className}`;\n\n if (!buttonActions.length && !moreActions.length)\n return <></>;\n\n return (\n <div className={className}>\n {buttonActions.length ? buttonActions.map((a, idx) => (\n <React.Fragment key={idx}>\n {(() => {\n if (a.label) {\n const label: JSX.Element = FunctionHelper.isFunction(a.label)\n ? a.label()\n : <>{a.label}</>;\n\n return (\n <ActionButton\n appLink={a.appLink}\n href={a.href}\n onClick={a.onClick}\n svg={a.svg}\n svgSize={props.dropdownToggleSvgSize}\n className={a.className}\n tooltip={a.tooltip}\n showSpinner={a.showSpinner}\n analyticsData={a.analyticsData}\n analyticsOptions={a.analyticsOptions}\n openInNewTab={a.openInNewTab}\n disabled={a.disabled}\n >\n {label}\n </ActionButton>\n );\n }\n\n return (\n <IconButton\n appLink={a.appLink}\n href={a.href}\n onClick={a.onClick}\n svg={a.svg}\n className={a.className}\n analyticsData={a.analyticsData}\n analyticsOptions={a.analyticsOptions}\n openInNewTab={a.openInNewTab}\n disabled={a.disabled}\n showBorder={a.showBorder}\n customSize={props.customSize}\n ariaLabel={a.tooltip}\n tooltip={a.tooltip}\n />\n );\n })()}\n </React.Fragment>\n )) : <></>}\n {props.sortComponent && props.sortComponent}\n {moreActions.length ? (\n <ActionsDropdown\n actions={moreActions}\n dropdownToggleClassName={props.actionsDropdownClassName}\n dropdownToggleSvgSize={props.dropdownToggleSvgSize}\n fetchMore={props.fetchMore}\n />\n ) : <></>}\n </div>\n );\n}"],"names":["MoreSvg","props","jsx","LazyDropdownItems","jsxs","Fragment","getDropdownItemClassName","actionClassName","className","ActionsDropdownItem","label","FunctionHelper","AppLink","SvgContainer","onClick","e","AnalyticsHelper","Core.LocationUtils","ActionsDropdown","SvgContainerSize","isLazy","a","dropdownToggleId","RandomHelper","dropdownToggleClassName","styles","currentGroup","idx","showDivider","Tooltip","Actions","orderedActions","React.useMemo","b","buttonActions","moreActions","React.Fragment","ActionButton","IconButton"],"mappings":"yHAEO,SAASA,EAAQC,EAAsC,CAC5D,OACEC,EAAAA,IAAC,MAAA,CAAK,GAAGD,EACP,SAAAC,EAAAA,IAAC,OAAA,CACC,EAAE,kIACF,KAAK,cAAA,CAAA,EAET,CAEJ,wDCMA,SAASC,GAAiC,CACxC,OACEC,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAH,MAAC,OAAI,MAAO,CAAE,QAAS,iBAAA,EACrB,SAAAA,EAAAA,IAAC,MAAA,CAAI,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,QAAU,EAC7F,QACC,MAAA,CAAI,MAAO,CAAE,QAAS,iBAAA,EACrB,SAAAA,EAAAA,IAAC,MAAA,CAAI,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,SAAW,EAC9F,QACC,MAAA,CAAI,MAAO,CAAE,QAAS,iBAAA,EACrB,SAAAA,EAAAA,IAAC,MAAA,CAAI,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,SAAW,EAC9F,QACC,MAAA,CAAI,MAAO,CAAE,QAAS,iBAAA,EACrB,SAAAA,MAAC,MAAA,CAAI,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,MAAA,EAAU,CAAA,CAC7F,CAAA,EACF,CAEJ,CAEA,SAASI,EAAyBC,EA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