{"index.ts":"import { enableRipple } from '@syncfusion/ej2-base';\nenableRipple(true);\n/**\n * MultiSelect Remote Data & Local Data Samples\n */\nimport { MultiSelect } from '@syncfusion/ej2-dropdowns';\nimport { Query, DataManager, ODataV4Adaptor } from '@syncfusion/ej2-data';\n\n\n\n\n let countries: { [key: string]: Object; }[] = [\n { Name: 'Australia', Code: 'AU' },\n { Name: 'Bermuda', Code: 'BM' },\n { Name: 'Canada', Code: 'CA' },\n { Name: 'Cameroon', Code: 'CM' },\n { Name: 'Denmark', Code: 'DK' },\n { Name: 'France', Code: 'FR' },\n { Name: 'Finland', Code: 'FI' },\n { Name: 'Germany', Code: 'DE' },\n { Name: 'Greenland', Code: 'GL' },\n { Name: 'Hong Kong', Code: 'HK' },\n { Name: 'India', Code: 'IN' },\n { Name: 'Italy', Code: 'IT' },\n { Name: 'Japan', Code: 'JP' },\n { Name: 'Mexico', Code: 'MX' },\n { Name: 'Norway', Code: 'NO' },\n { Name: 'Poland', Code: 'PL' },\n { Name: 'Switzerland', Code: 'CH' },\n { Name: 'United Kingdom', Code: 'GB' },\n { Name: 'United States', Code: 'US' }\n ];\n\n\n let listObj: MultiSelect = new MultiSelect({\n dataSource: new DataManager({\n url: 'http://services.odata.org/V4/Northwind/Northwind.svc/Customers',\n adaptor: new ODataV4Adaptor,\n crossDomain: true\n }),\n query: new Query().select(['ContactName', 'CustomerID']).take(25),\n fields: { text: 'ContactName', value: 'CustomerID' },\n placeholder: 'Select customer',\n sortOrder: 'Ascending',\n actionBegin: () => {\n let element: HTMLElement[] = <HTMLElement[] & NodeListOf<Element>>\n document.querySelector('.control-section').querySelectorAll('.e-chips-close.e-icon');\n element[1].classList.remove('e-close-hooker');\n element[1].classList.add('e-spinner-icon');\n element[1].style.display = 'block';\n },\n actionComplete: () => {\n removeIcon();\n },\n actionFailure: () => {\n removeIcon();\n }\n });\n listObj.appendTo('#remote');\n\n let games: MultiSelect = new MultiSelect({\n dataSource: countries,\n fields: { text: 'Name', value: 'Code'},\n placeholder: 'Select countries',\n });\n games.appendTo('#local');\n function removeIcon(): void {\n let element: HTMLElement[] = <HTMLElement[] & NodeListOf<Element>>\n document.querySelector('.control-section').querySelectorAll('.e-chips-close.e-icon');\n element[1].classList.add('e-close-hooker');\n element[1].classList.remove('e-spinner-icon');\n element[1].style.display = 'none';\n }\n","index.html":"<!DOCTYPE html><html><head>\n <link href=\"http://npmci.syncfusion.com/packages/production/material.css\" rel=\"stylesheet\">\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js\"></script>\n <script src=\"systemjs.config.js\"></script>\n</head>\n<body>\n<div class=\"control-section\">\n <div id=\"local-data\" style=\"padding-top:15px\">\n <div class=\"content\">\n <div class=\"control-styles\">\n <h4> Local Data</h4>\n <input type=\"text\" id=\"local\">\n </div>\n <div id=\"remote-data\">\n <div class=\"control-styles\">\n <h4>Remote Data</h4>\n <input type=\"text\" id=\"remote\">\n </div>\n </div>\n </div>\n </div> \n</div>\n\n\n\n<style>\n .content {\n margin: 0 auto;\n width: 250px;\n }\n \n .e-multi-select-wrapper .e-chips>.e-chipcontent {\n max-width: 80%;\n white-space: nowrap;\n }\n .control-styles { \n width:400px;\n margin: 0 auto;\n padding-top: 30px; \n }\n .e-bigger .control-styles {\n width:300px;\n }\n .e-spinner-icon {\n background-image: url(./styles/images/Medium-36px-spin.gif) !important;\n background-size: 16px 16px !important;\n background-repeat: no-repeat !important;\n background-position: center center !important;\n top: 2px;\n position: relative;\n left: 24px;\n }\n\n .e-bigger .e-spinner-icon {\n top: 4px;\n }\n\n .e-spinner-icon {\n border: none;\n }\n</style>\n\n</body></html>","systemjs.config.js":"System.config({\n transpiler: \"typescript\",\n typescriptOptions: {\n compilerOptions: {\n target: \"umd\",\n module: \"commonjs\",\n moduleResolution: \"node\",\n emitDecoratorMetadata: true,\n experimentalDecorators: true\n }\n },\n paths: {\n \"syncfusion:\": \"http://npmci.syncfusion.com/packages/production/\"\n },\n map: {\n main: \"index.ts\",\n typescript: \"https://unpkg.com/
[email protected]/lib/typescript.js\",\n 'plugin-json':'https://cdnjs.cloudflare.com/ajax/libs/systemjs-plugin-json/0.3.0/json.min.js',\n \"@syncfusion/ej2-base\": \"syncfusion:ej2-base/dist/ej2-base.umd.min.js\",\n \"@syncfusion/ej2-buttons\": \"syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js\",\n \"@syncfusion/ej2-calendars\": \"syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js\",\n \"@syncfusion/ej2-charts\": \"syncfusion:ej2-charts/dist/ej2-charts.umd.min.js\",\n \"@syncfusion/ej2-circulargauge\": \"syncfusion:ej2-circulargauge/dist/ej2-circulargauge.umd.min.js\",\n \"@syncfusion/ej2-lineargauge\": \"syncfusion:ej2-lineargauge/dist/ej2-lineargauge.umd.min.js\",\n \"@syncfusion/ej2-data\": \"syncfusion:ej2-data/dist/ej2-data.umd.min.js\",\n \"@syncfusion/ej2-dropdowns\": \"syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js\",\n \"@syncfusion/ej2-grids\": \"syncfusion:ej2-grids/dist/ej2-grids.umd.min.js\", \n \"@syncfusion/ej2-inputs\": \"syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js\", \n \"@syncfusion/ej2-lists\": \"syncfusion:ej2-lists/dist/ej2-lists.umd.min.js\",\n \"@syncfusion/ej2-navigations\": \"syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js\", \n \"@syncfusion/ej2-popups\": \"syncfusion:ej2-popups/dist/ej2-popups.umd.min.js\"\n },\n meta: { \n '*.json': { loader: 'plugin-json' }\n }\n});\nSystem.import('index.ts').catch(console.error.bind(console));"}
0 commit comments