UNPKG

devextreme-angular

Version:

DevExtreme UI and Visualization Components for Angular

1 lines 4.26 kB
{"version":3,"file":"devextreme-angular-server.mjs","sources":["../../../dist/server/render.ts","../../../dist/server/index.ts","../../../dist/server/devextreme-angular-server.ts"],"sourcesContent":["/*!\n * devextreme-angular\n * Version: 26.1.3\n * Build date: Wed Jun 10 2026\n *\n * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED\n *\n * This software may be modified and distributed under the terms\n * of the MIT license. See the LICENSE file in the root of the project for details.\n *\n * https://github.com/DevExpress/DevExtreme\n */\n\nimport { NgModule, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport infernoRenderer from 'devextreme/core/inferno_renderer';\nimport { renderToString } from 'inferno-server';\n\n@NgModule({\n exports: [],\n imports: [],\n providers: [],\n})\nexport class DxServerModule {\n constructor(@Inject(PLATFORM_ID) platformId: any) {\n if (isPlatformServer(platformId)) {\n infernoRenderer.inject({\n render: (\n component,\n props,\n container,\n ) => {\n const el = infernoRenderer.createElement(component, props);\n const document = container.ownerDocument;\n const temp = document.createElement(container.tagName);\n\n temp.innerHTML = renderToString(el);\n\n const mainElement = temp.childNodes[0];\n if (!mainElement) {\n return;\n }\n const childString = mainElement.innerHTML;\n\n for (let i = 0; i < mainElement.attributes.length; i++) {\n const attr = mainElement.attributes[i];\n\n if (!container.hasAttribute(attr.name)) {\n container.setAttribute(attr.name, attr.value);\n }\n }\n\n container.innerHTML = childString;\n },\n renderIntoContainer: (\n jsx,\n container,\n ) => {\n if (jsx === null) {\n container.innerHTML = '';\n return;\n }\n\n container.innerHTML = renderToString(jsx);\n },\n });\n }\n }\n}\n","/*!\n * devextreme-angular\n * Version: 26.1.3\n * Build date: Wed Jun 10 2026\n *\n * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED\n *\n * This software may be modified and distributed under the terms\n * of the MIT license. See the LICENSE file in the root of the project for details.\n *\n * https://github.com/DevExpress/DevExtreme\n */\n\nexport * from './render';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;AAWG;MAaU,cAAc,CAAA;AACzB,IAAA,WAAA,CAAiC,UAAe,EAAA;AAC9C,QAAA,IAAI,gBAAgB,CAAC,UAAU,CAAC,EAAE;YAChC,eAAe,CAAC,MAAM,CAAC;gBACrB,MAAM,EAAE,CACN,SAAS,EACT,KAAK,EACL,SAAS,KACP;oBACF,MAAM,EAAE,GAAG,eAAe,CAAC,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC;AAC1D,oBAAA,MAAM,QAAQ,GAAG,SAAS,CAAC,aAAa;oBACxC,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC;AAEtD,oBAAA,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,EAAE,CAAC;oBAEnC,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;oBACtC,IAAI,CAAC,WAAW,EAAE;wBAChB;oBACF;AACA,oBAAA,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS;AAEzC,oBAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBACtD,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;wBAEtC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;4BACtC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;wBAC/C;oBACF;AAEA,oBAAA,SAAS,CAAC,SAAS,GAAG,WAAW;gBACnC,CAAC;AACD,gBAAA,mBAAmB,EAAE,CACnB,GAAG,EACH,SAAS,KACP;AACF,oBAAA,IAAI,GAAG,KAAK,IAAI,EAAE;AAChB,wBAA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