@sd-angular/core 1.3.29 → 1.3.30
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/bundles/sd-angular-core-grid.umd.js +50 -187
- package/bundles/sd-angular-core-grid.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid.umd.min.js +1 -1
- package/bundles/sd-angular-core-grid.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-upload-excel.umd.js.map +1 -1
- package/bundles/sd-angular-core-upload-excel.umd.min.js.map +1 -1
- package/bundles/sd-angular-core.umd.js +4 -4
- package/bundles/sd-angular-core.umd.min.js +1 -1
- package/bundles/sd-angular-core.umd.min.js.map +1 -1
- package/esm2015/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.component.js +35 -27
- package/esm2015/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.model.js +1 -1
- package/esm2015/grid/src/lib/grid.component.js +11 -118
- package/esm2015/public-api.js +1 -3
- package/esm2015/upload-excel/src/lib/upload-excel.component.js +1 -1
- package/fesm2015/sd-angular-core-grid.js +43 -142
- package/fesm2015/sd-angular-core-grid.js.map +1 -1
- package/fesm2015/sd-angular-core-upload-excel.js.map +1 -1
- package/fesm2015/sd-angular-core.js +0 -1
- package/fesm2015/sd-angular-core.js.map +1 -1
- package/grid/sd-angular-core-grid.metadata.json +1 -1
- package/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.component.d.ts +12 -12
- package/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.model.d.ts +1 -2
- package/grid/src/lib/grid.component.d.ts +5 -6
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/{sd-angular-core-1.3.29.tgz → sd-angular-core-1.3.30.tgz} +0 -0
- package/upload-excel/sd-angular-core-upload-excel.metadata.json +1 -1
- package/bundles/sd-angular-core-excel.umd.js +0 -500
- package/bundles/sd-angular-core-excel.umd.js.map +0 -1
- package/bundles/sd-angular-core-excel.umd.min.js +0 -16
- package/bundles/sd-angular-core-excel.umd.min.js.map +0 -1
- package/esm2015/excel/index.js +0 -2
- package/esm2015/excel/sd-angular-core-excel.js +0 -5
- package/esm2015/excel/src/lib/excel.model.js +0 -3
- package/esm2015/excel/src/lib/excel.service.js +0 -91
- package/esm2015/excel/src/public-api.js +0 -6
- package/excel/index.d.ts +0 -1
- package/excel/package.json +0 -12
- package/excel/sd-angular-core-excel.d.ts +0 -4
- package/excel/sd-angular-core-excel.metadata.json +0 -1
- package/excel/src/lib/excel.model.d.ts +0 -65
- package/excel/src/lib/excel.service.d.ts +0 -26
- package/excel/src/public-api.d.ts +0 -2
- package/fesm2015/sd-angular-core-excel.js +0 -100
- package/fesm2015/sd-angular-core-excel.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../projects/sd-core/excel/src/lib/excel.model.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../projects/sd-core/excel/src/lib/excel.service.ts"],"names":["EXCEL_CONFIG","InjectionToken","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","this","n","v","op","TypeError","call","pop","length","push","Object","create","configuration","_this","importId","uuid.v4","generateExcelTemplate","excelTemplate","Error","generateTemplate","_c","generateAndUploadExcelTemplate","key","generateAndUploadTemplate","uploadTemplate","validator","downloadTemplate","filePath","fileName","download","generateExcelDataByTemplate","columns","items","export","option","_a","bigExport","request","_b","getFiles","remove","name","Injectable","args","providedIn","Inject","type","Optional"],"mappings":"scA+DaA,EAAe,IAAIC,EAAAA,eAAoC;;;;;;;;;;;;;;6FCMpDC,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,IAAW,MAAOG,GAAKL,EAAOK,IACpF,SAAS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n columns: ExcelTempateColumn[];\r\n sheets?: {\r\n name: string,\r\n items: any[],\r\n fields: string[]\r\n }[];\r\n}\r\n\r\nexport interface ExcelTempateColumn {\r\n field: string;\r\n title: string;\r\n required?: boolean;\r\n color?: string;\r\n width?: string;\r\n description?: string;\r\n}\r\n\r\nexport interface ExcelConfig {\r\n removable?: boolean;\r\n name?: string;\r\n fullPath?: string;\r\n}\r\n\r\nexport interface IExportOption {\r\n columns: ExcelTempateColumn[];\r\n items: any[];\r\n}\r\n\r\nexport interface IBigExportRequest {\r\n filePath?: string;\r\n destination?: string;\r\n latestRow: number;\r\n columns: {\r\n field: string,\r\n title: string,\r\n description?: string,\r\n width?: string,\r\n }[];\r\n items: any[];\r\n}\r\n\r\nexport interface IBigExportResponse {\r\n filePath: string;\r\n destination: string;\r\n latestRow: number;\r\n}\r\n\r\nexport interface IExcelConfiguration {\r\n generateTemplate: (excelTemplate: ExcelTemplate) => Promise<{ filePath: string }>;\r\n generateAndUploadTemplate: (key: string, excelTemplate: ExcelTemplate) => Promise<{ fileName: string, filePath: string }>;\r\n uploadTemplate: (key?: string, validator?: (fileName: string) => string) => Promise<ExcelConfig>;\r\n download: (filePath: string, fileName?: string) => Promise<void>;\r\n generateExcelDataByTemplate: (filePath: string, columns: any[], items: any[], fileName?: string) => Promise<{ filePath: string }>;\r\n export?: (option: IExportOption) => Promise<{ filePath: string }>;\r\n bigExport?: (request: IBigExportRequest) => Promise<IBigExportResponse>;\r\n getFiles: (key?: string) => Promise<ExcelConfig[]>;\r\n remove: (key?: string, name?: string) => Promise<void>;\r\n}\r\n\r\nexport const EXCEL_CONFIG = new InjectionToken<IExcelConfiguration>('excel.configuration');\r\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { Optional } from '@angular/core';\r\nimport { Injectable, Inject } from '@angular/core';\r\nimport * as uuid from 'uuid';\r\nimport { ExcelTemplate, IExcelConfiguration, EXCEL_CONFIG, IExportOption, IBigExportRequest, IBigExportResponse } from './excel.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SdExcelService {\r\n importId = 'I' + uuid.v4();\r\n constructor(\r\n @Inject(EXCEL_CONFIG) @Optional() private configuration: IExcelConfiguration) {\r\n }\r\n\r\n generateExcelTemplate = async (excelTemplate: ExcelTemplate) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.generateTemplate(excelTemplate);\r\n }\r\n\r\n generateAndUploadExcelTemplate = async (key: string, excelTemplate: ExcelTemplate) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.generateAndUploadTemplate(key, excelTemplate);\r\n }\r\n\r\n uploadTemplate = async (key?: string, validator?: (fileName: string) => string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.uploadTemplate(key, validator);\r\n }\r\n\r\n downloadTemplate = async (filePath: string, fileName?: string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n await this.configuration.download(filePath, fileName);\r\n }\r\n\r\n generateExcelDataByTemplate = async (filePath: string, columns: any[], items: any[], fileName?: string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n const result = await this.configuration.generateExcelDataByTemplate(filePath, columns, items);\r\n if (result?.filePath) {\r\n await this.configuration.download(result.filePath, fileName || `${uuid.v4()}.xlsx`);\r\n }\r\n }\r\n\r\n export = async (option: IExportOption) => {\r\n if (!this.configuration?.export) {\r\n throw new Error('Please init excel export configuration');\r\n }\r\n const result = await this.configuration.export(option);\r\n if (result?.filePath) {\r\n await this.configuration.download(result.filePath);\r\n }\r\n }\r\n\r\n bigExport = async (request: IBigExportRequest): Promise<IBigExportResponse> => {\r\n if (!this.configuration?.bigExport) {\r\n throw new Error('Please init excel big export configuration');\r\n }\r\n return await this.configuration.bigExport(request);\r\n }\r\n\r\n getFiles = async (key?: string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.getFiles(key);\r\n }\r\n\r\n download = async (filePath: string) => {\r\n if (!filePath) {\r\n return;\r\n }\r\n await this.configuration.download(filePath);\r\n }\r\n\r\n remove = async (key?: string, name?: string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.remove(key, name);\r\n }\r\n}\r\n\r\nexport interface IExportInfo {\r\n data: any[];\r\n sheetName?: string;\r\n fileName?: string;\r\n}\r\n"]}
|
package/esm2015/excel/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './src/public-api';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiQzovVXNlcnMvbmdoaWF0dDE1X29uZW1vdW50L0RvY3VtZW50cy9saWItY29yZS11aS9wcm9qZWN0cy9zZC1jb3JlL2V4Y2VsLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQkFBa0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3JjL3B1YmxpYy1hcGknOyJdfQ==
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2QtYW5ndWxhci1jb3JlLWV4Y2VsLmpzIiwic291cmNlUm9vdCI6IkM6L1VzZXJzL25naGlhdHQxNV9vbmVtb3VudC9Eb2N1bWVudHMvbGliLWNvcmUtdWkvcHJvamVjdHMvc2QtY29yZS9leGNlbC8iLCJzb3VyY2VzIjpbInNkLWFuZ3VsYXItY29yZS1leGNlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export const EXCEL_CONFIG = new InjectionToken('excel.configuration');
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhjZWwubW9kZWwuanMiLCJzb3VyY2VSb290IjoiQzovVXNlcnMvbmdoaWF0dDE1X29uZW1vdW50L0RvY3VtZW50cy9saWItY29yZS11aS9wcm9qZWN0cy9zZC1jb3JlL2V4Y2VsLyIsInNvdXJjZXMiOlsic3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0+IFByb21pc2U8dm9pZD47XHJcbiAgZ2VuZXJhdGVFeGNlbERhdGFCeVRlbXBsYXRlOiAoZmlsZVBhdGg6IHN0cmluZywgY29sdW1uczogYW55W10sIGl0ZW1zOiBhbnlbXSwgZmlsZU5hbWU/OiBzdHJpbmcpID0+IFByb21pc2U8eyBmaWxlUGF0aDogc3RyaW5nIH0+O1xyXG4gIGV4cG9ydD86IChvcHRpb246IElFeHBvcnRPcHRpb24pID0+IFByb21pc2U8eyBmaWxlUGF0aDogc3RyaW5nIH0+O1xyXG4gIGJpZ0V4cG9ydD86IChyZXF1ZXN0OiBJQmlnRXhwb3J0UmVxdWVzdCkgPT4gUHJvbWlzZTxJQmlnRXhwb3J0UmVzcG9uc2U+O1xyXG4gIGdldEZpbGVzOiAoa2V5Pzogc3RyaW5nKSA9PiBQcm9taXNlPEV4Y2VsQ29uZmlnW10+O1xyXG4gIHJlbW92ZTogKGtleT86IHN0cmluZywgbmFtZT86IHN0cmluZykgPT4gUHJvbWlzZTx2b2lkPjtcclxufVxyXG5cclxuZXhwb3J0IGNvbnN0IEVYQ0VMX0NPTkZJRyA9IG5ldyBJbmplY3Rpb25Ub2tlbjxJRXhjZWxDb25maWd1cmF0aW9uPignZXhjZWwuY29uZmlndXJhdGlvbicpO1xyXG4iXX0=
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { __awaiter } from "tslib";
|
|
2
|
-
import { Optional } from '@angular/core';
|
|
3
|
-
import { Injectable, Inject } from '@angular/core';
|
|
4
|
-
import * as uuid from 'uuid';
|
|
5
|
-
import { EXCEL_CONFIG } from './excel.model';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "./excel.model";
|
|
8
|
-
export class SdExcelService {
|
|
9
|
-
constructor(configuration) {
|
|
10
|
-
this.configuration = configuration;
|
|
11
|
-
this.importId = 'I' + uuid.v4();
|
|
12
|
-
this.generateExcelTemplate = (excelTemplate) => __awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
if (!this.configuration) {
|
|
14
|
-
throw new Error('Please init excel configuration');
|
|
15
|
-
}
|
|
16
|
-
return yield this.configuration.generateTemplate(excelTemplate);
|
|
17
|
-
});
|
|
18
|
-
this.generateAndUploadExcelTemplate = (key, excelTemplate) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
if (!this.configuration) {
|
|
20
|
-
throw new Error('Please init excel configuration');
|
|
21
|
-
}
|
|
22
|
-
return yield this.configuration.generateAndUploadTemplate(key, excelTemplate);
|
|
23
|
-
});
|
|
24
|
-
this.uploadTemplate = (key, validator) => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
if (!this.configuration) {
|
|
26
|
-
throw new Error('Please init excel configuration');
|
|
27
|
-
}
|
|
28
|
-
return yield this.configuration.uploadTemplate(key, validator);
|
|
29
|
-
});
|
|
30
|
-
this.downloadTemplate = (filePath, fileName) => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
if (!this.configuration) {
|
|
32
|
-
throw new Error('Please init excel configuration');
|
|
33
|
-
}
|
|
34
|
-
yield this.configuration.download(filePath, fileName);
|
|
35
|
-
});
|
|
36
|
-
this.generateExcelDataByTemplate = (filePath, columns, items, fileName) => __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
if (!this.configuration) {
|
|
38
|
-
throw new Error('Please init excel configuration');
|
|
39
|
-
}
|
|
40
|
-
const result = yield this.configuration.generateExcelDataByTemplate(filePath, columns, items);
|
|
41
|
-
if (result === null || result === void 0 ? void 0 : result.filePath) {
|
|
42
|
-
yield this.configuration.download(result.filePath, fileName || `${uuid.v4()}.xlsx`);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
this.export = (option) => __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
var _a;
|
|
47
|
-
if (!((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.export)) {
|
|
48
|
-
throw new Error('Please init excel export configuration');
|
|
49
|
-
}
|
|
50
|
-
const result = yield this.configuration.export(option);
|
|
51
|
-
if (result === null || result === void 0 ? void 0 : result.filePath) {
|
|
52
|
-
yield this.configuration.download(result.filePath);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
this.bigExport = (request) => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
var _b;
|
|
57
|
-
if (!((_b = this.configuration) === null || _b === void 0 ? void 0 : _b.bigExport)) {
|
|
58
|
-
throw new Error('Please init excel big export configuration');
|
|
59
|
-
}
|
|
60
|
-
return yield this.configuration.bigExport(request);
|
|
61
|
-
});
|
|
62
|
-
this.getFiles = (key) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
if (!this.configuration) {
|
|
64
|
-
throw new Error('Please init excel configuration');
|
|
65
|
-
}
|
|
66
|
-
return yield this.configuration.getFiles(key);
|
|
67
|
-
});
|
|
68
|
-
this.download = (filePath) => __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
if (!filePath) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
yield this.configuration.download(filePath);
|
|
73
|
-
});
|
|
74
|
-
this.remove = (key, name) => __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
if (!this.configuration) {
|
|
76
|
-
throw new Error('Please init excel configuration');
|
|
77
|
-
}
|
|
78
|
-
return yield this.configuration.remove(key, name);
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
SdExcelService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SdExcelService_Factory() { return new SdExcelService(i0.ɵɵinject(i1.EXCEL_CONFIG, 8)); }, token: SdExcelService, providedIn: "root" });
|
|
83
|
-
SdExcelService.decorators = [
|
|
84
|
-
{ type: Injectable, args: [{
|
|
85
|
-
providedIn: 'root'
|
|
86
|
-
},] }
|
|
87
|
-
];
|
|
88
|
-
SdExcelService.ctorParameters = () => [
|
|
89
|
-
{ type: undefined, decorators: [{ type: Inject, args: [EXCEL_CONFIG,] }, { type: Optional }] }
|
|
90
|
-
];
|
|
91
|
-
//# sourceMappingURL=data:application/json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gc2hlZXROYW1lPzogc3RyaW5nO1xyXG4gIGZpbGVOYW1lPzogc3RyaW5nO1xyXG59XHJcbiJdfQ==
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of superdev-angular-core
|
|
3
|
-
*/
|
|
4
|
-
export * from './lib/excel.model';
|
|
5
|
-
export * from './lib/excel.service';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJDOi9Vc2Vycy9uZ2hpYXR0MTVfb25lbW91bnQvRG9jdW1lbnRzL2xpYi1jb3JlLXVpL3Byb2plY3RzL3NkLWNvcmUvZXhjZWwvIiwic291cmNlcyI6WyJzcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxxQkFBcUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXHJcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBzdXBlcmRldi1hbmd1bGFyLWNvcmVcclxuICovXHJcblxyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9leGNlbC5tb2RlbCc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2V4Y2VsLnNlcnZpY2UnO1xyXG4iXX0=
|
package/excel/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/public-api';
|
package/excel/package.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"peerDependencies": {},
|
|
3
|
-
"main": "../bundles/sd-angular-core-excel.umd.js",
|
|
4
|
-
"module": "../fesm2015/sd-angular-core-excel.js",
|
|
5
|
-
"es2015": "../fesm2015/sd-angular-core-excel.js",
|
|
6
|
-
"esm2015": "../esm2015/excel/sd-angular-core-excel.js",
|
|
7
|
-
"fesm2015": "../fesm2015/sd-angular-core-excel.js",
|
|
8
|
-
"typings": "sd-angular-core-excel.d.ts",
|
|
9
|
-
"metadata": "sd-angular-core-excel.metadata.json",
|
|
10
|
-
"sideEffects": false,
|
|
11
|
-
"name": "@sd-angular/core/excel"
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"ExcelTemplate":{"__symbolic":"interface"},"ExcelTempateColumn":{"__symbolic":"interface"},"ExcelConfig":{"__symbolic":"interface"},"IExportOption":{"__symbolic":"interface"},"IBigExportRequest":{"__symbolic":"interface"},"IBigExportResponse":{"__symbolic":"interface"},"IExcelConfiguration":{"__symbolic":"interface"},"EXCEL_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":63,"character":32},"arguments":["excel.configuration"]},"SdExcelService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":11,"character":5},"arguments":[{"__symbolic":"reference","name":"EXCEL_CONFIG"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":11,"character":27}}]],"parameters":[{"__symbolic":"reference","name":"IExcelConfiguration"}]}]},"statics":{"ɵprov":{}}},"IExportInfo":{"__symbolic":"interface"}},"origins":{"ExcelTemplate":"./src/lib/excel.model","ExcelTempateColumn":"./src/lib/excel.model","ExcelConfig":"./src/lib/excel.model","IExportOption":"./src/lib/excel.model","IBigExportRequest":"./src/lib/excel.model","IBigExportResponse":"./src/lib/excel.model","IExcelConfiguration":"./src/lib/excel.model","EXCEL_CONFIG":"./src/lib/excel.model","SdExcelService":"./src/lib/excel.service","IExportInfo":"./src/lib/excel.service"},"importAs":"@sd-angular/core/excel"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export interface ExcelTemplate {
|
|
3
|
-
fileName?: string;
|
|
4
|
-
columns: ExcelTempateColumn[];
|
|
5
|
-
sheets?: {
|
|
6
|
-
name: string;
|
|
7
|
-
items: any[];
|
|
8
|
-
fields: string[];
|
|
9
|
-
}[];
|
|
10
|
-
}
|
|
11
|
-
export interface ExcelTempateColumn {
|
|
12
|
-
field: string;
|
|
13
|
-
title: string;
|
|
14
|
-
required?: boolean;
|
|
15
|
-
color?: string;
|
|
16
|
-
width?: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface ExcelConfig {
|
|
20
|
-
removable?: boolean;
|
|
21
|
-
name?: string;
|
|
22
|
-
fullPath?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface IExportOption {
|
|
25
|
-
columns: ExcelTempateColumn[];
|
|
26
|
-
items: any[];
|
|
27
|
-
}
|
|
28
|
-
export interface IBigExportRequest {
|
|
29
|
-
filePath?: string;
|
|
30
|
-
destination?: string;
|
|
31
|
-
latestRow: number;
|
|
32
|
-
columns: {
|
|
33
|
-
field: string;
|
|
34
|
-
title: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
width?: string;
|
|
37
|
-
}[];
|
|
38
|
-
items: any[];
|
|
39
|
-
}
|
|
40
|
-
export interface IBigExportResponse {
|
|
41
|
-
filePath: string;
|
|
42
|
-
destination: string;
|
|
43
|
-
latestRow: number;
|
|
44
|
-
}
|
|
45
|
-
export interface IExcelConfiguration {
|
|
46
|
-
generateTemplate: (excelTemplate: ExcelTemplate) => Promise<{
|
|
47
|
-
filePath: string;
|
|
48
|
-
}>;
|
|
49
|
-
generateAndUploadTemplate: (key: string, excelTemplate: ExcelTemplate) => Promise<{
|
|
50
|
-
fileName: string;
|
|
51
|
-
filePath: string;
|
|
52
|
-
}>;
|
|
53
|
-
uploadTemplate: (key?: string, validator?: (fileName: string) => string) => Promise<ExcelConfig>;
|
|
54
|
-
download: (filePath: string, fileName?: string) => Promise<void>;
|
|
55
|
-
generateExcelDataByTemplate: (filePath: string, columns: any[], items: any[], fileName?: string) => Promise<{
|
|
56
|
-
filePath: string;
|
|
57
|
-
}>;
|
|
58
|
-
export?: (option: IExportOption) => Promise<{
|
|
59
|
-
filePath: string;
|
|
60
|
-
}>;
|
|
61
|
-
bigExport?: (request: IBigExportRequest) => Promise<IBigExportResponse>;
|
|
62
|
-
getFiles: (key?: string) => Promise<ExcelConfig[]>;
|
|
63
|
-
remove: (key?: string, name?: string) => Promise<void>;
|
|
64
|
-
}
|
|
65
|
-
export declare const EXCEL_CONFIG: InjectionToken<IExcelConfiguration>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ExcelTemplate, IExcelConfiguration, IExportOption, IBigExportRequest, IBigExportResponse } from './excel.model';
|
|
2
|
-
export declare class SdExcelService {
|
|
3
|
-
private configuration;
|
|
4
|
-
importId: string;
|
|
5
|
-
constructor(configuration: IExcelConfiguration);
|
|
6
|
-
generateExcelTemplate: (excelTemplate: ExcelTemplate) => Promise<{
|
|
7
|
-
filePath: string;
|
|
8
|
-
}>;
|
|
9
|
-
generateAndUploadExcelTemplate: (key: string, excelTemplate: ExcelTemplate) => Promise<{
|
|
10
|
-
fileName: string;
|
|
11
|
-
filePath: string;
|
|
12
|
-
}>;
|
|
13
|
-
uploadTemplate: (key?: string, validator?: (fileName: string) => string) => Promise<import("./excel.model").ExcelConfig>;
|
|
14
|
-
downloadTemplate: (filePath: string, fileName?: string) => Promise<void>;
|
|
15
|
-
generateExcelDataByTemplate: (filePath: string, columns: any[], items: any[], fileName?: string) => Promise<void>;
|
|
16
|
-
export: (option: IExportOption) => Promise<void>;
|
|
17
|
-
bigExport: (request: IBigExportRequest) => Promise<IBigExportResponse>;
|
|
18
|
-
getFiles: (key?: string) => Promise<import("./excel.model").ExcelConfig[]>;
|
|
19
|
-
download: (filePath: string) => Promise<void>;
|
|
20
|
-
remove: (key?: string, name?: string) => Promise<void>;
|
|
21
|
-
}
|
|
22
|
-
export interface IExportInfo {
|
|
23
|
-
data: any[];
|
|
24
|
-
sheetName?: string;
|
|
25
|
-
fileName?: string;
|
|
26
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, ɵɵdefineInjectable, ɵɵinject, Injectable, Inject, Optional } from '@angular/core';
|
|
2
|
-
import { __awaiter } from 'tslib';
|
|
3
|
-
import { v4 } from 'uuid';
|
|
4
|
-
|
|
5
|
-
const EXCEL_CONFIG = new InjectionToken('excel.configuration');
|
|
6
|
-
|
|
7
|
-
class SdExcelService {
|
|
8
|
-
constructor(configuration) {
|
|
9
|
-
this.configuration = configuration;
|
|
10
|
-
this.importId = 'I' + v4();
|
|
11
|
-
this.generateExcelTemplate = (excelTemplate) => __awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
if (!this.configuration) {
|
|
13
|
-
throw new Error('Please init excel configuration');
|
|
14
|
-
}
|
|
15
|
-
return yield this.configuration.generateTemplate(excelTemplate);
|
|
16
|
-
});
|
|
17
|
-
this.generateAndUploadExcelTemplate = (key, excelTemplate) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
if (!this.configuration) {
|
|
19
|
-
throw new Error('Please init excel configuration');
|
|
20
|
-
}
|
|
21
|
-
return yield this.configuration.generateAndUploadTemplate(key, excelTemplate);
|
|
22
|
-
});
|
|
23
|
-
this.uploadTemplate = (key, validator) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
if (!this.configuration) {
|
|
25
|
-
throw new Error('Please init excel configuration');
|
|
26
|
-
}
|
|
27
|
-
return yield this.configuration.uploadTemplate(key, validator);
|
|
28
|
-
});
|
|
29
|
-
this.downloadTemplate = (filePath, fileName) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
if (!this.configuration) {
|
|
31
|
-
throw new Error('Please init excel configuration');
|
|
32
|
-
}
|
|
33
|
-
yield this.configuration.download(filePath, fileName);
|
|
34
|
-
});
|
|
35
|
-
this.generateExcelDataByTemplate = (filePath, columns, items, fileName) => __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
if (!this.configuration) {
|
|
37
|
-
throw new Error('Please init excel configuration');
|
|
38
|
-
}
|
|
39
|
-
const result = yield this.configuration.generateExcelDataByTemplate(filePath, columns, items);
|
|
40
|
-
if (result === null || result === void 0 ? void 0 : result.filePath) {
|
|
41
|
-
yield this.configuration.download(result.filePath, fileName || `${v4()}.xlsx`);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
this.export = (option) => __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
var _a;
|
|
46
|
-
if (!((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.export)) {
|
|
47
|
-
throw new Error('Please init excel export configuration');
|
|
48
|
-
}
|
|
49
|
-
const result = yield this.configuration.export(option);
|
|
50
|
-
if (result === null || result === void 0 ? void 0 : result.filePath) {
|
|
51
|
-
yield this.configuration.download(result.filePath);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
this.bigExport = (request) => __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
var _b;
|
|
56
|
-
if (!((_b = this.configuration) === null || _b === void 0 ? void 0 : _b.bigExport)) {
|
|
57
|
-
throw new Error('Please init excel big export configuration');
|
|
58
|
-
}
|
|
59
|
-
return yield this.configuration.bigExport(request);
|
|
60
|
-
});
|
|
61
|
-
this.getFiles = (key) => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
if (!this.configuration) {
|
|
63
|
-
throw new Error('Please init excel configuration');
|
|
64
|
-
}
|
|
65
|
-
return yield this.configuration.getFiles(key);
|
|
66
|
-
});
|
|
67
|
-
this.download = (filePath) => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
if (!filePath) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
yield this.configuration.download(filePath);
|
|
72
|
-
});
|
|
73
|
-
this.remove = (key, name) => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
if (!this.configuration) {
|
|
75
|
-
throw new Error('Please init excel configuration');
|
|
76
|
-
}
|
|
77
|
-
return yield this.configuration.remove(key, name);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
SdExcelService.ɵprov = ɵɵdefineInjectable({ factory: function SdExcelService_Factory() { return new SdExcelService(ɵɵinject(EXCEL_CONFIG, 8)); }, token: SdExcelService, providedIn: "root" });
|
|
82
|
-
SdExcelService.decorators = [
|
|
83
|
-
{ type: Injectable, args: [{
|
|
84
|
-
providedIn: 'root'
|
|
85
|
-
},] }
|
|
86
|
-
];
|
|
87
|
-
SdExcelService.ctorParameters = () => [
|
|
88
|
-
{ type: undefined, decorators: [{ type: Inject, args: [EXCEL_CONFIG,] }, { type: Optional }] }
|
|
89
|
-
];
|
|
90
|
-
|
|
91
|
-
/*
|
|
92
|
-
* Public API Surface of superdev-angular-core
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Generated bundle index. Do not edit.
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
export { EXCEL_CONFIG, SdExcelService };
|
|
100
|
-
//# sourceMappingURL=sd-angular-core-excel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-excel.js","sources":["../../../../projects/sd-core/excel/src/lib/excel.model.ts","../../../../projects/sd-core/excel/src/lib/excel.service.ts","../../../../projects/sd-core/excel/src/public-api.ts","../../../../projects/sd-core/excel/sd-angular-core-excel.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport interface ExcelTemplate {\r\n fileName?: string;\r\n columns: ExcelTempateColumn[];\r\n sheets?: {\r\n name: string,\r\n items: any[],\r\n fields: string[]\r\n }[];\r\n}\r\n\r\nexport interface ExcelTempateColumn {\r\n field: string;\r\n title: string;\r\n required?: boolean;\r\n color?: string;\r\n width?: string;\r\n description?: string;\r\n}\r\n\r\nexport interface ExcelConfig {\r\n removable?: boolean;\r\n name?: string;\r\n fullPath?: string;\r\n}\r\n\r\nexport interface IExportOption {\r\n columns: ExcelTempateColumn[];\r\n items: any[];\r\n}\r\n\r\nexport interface IBigExportRequest {\r\n filePath?: string;\r\n destination?: string;\r\n latestRow: number;\r\n columns: {\r\n field: string,\r\n title: string,\r\n description?: string,\r\n width?: string,\r\n }[];\r\n items: any[];\r\n}\r\n\r\nexport interface IBigExportResponse {\r\n filePath: string;\r\n destination: string;\r\n latestRow: number;\r\n}\r\n\r\nexport interface IExcelConfiguration {\r\n generateTemplate: (excelTemplate: ExcelTemplate) => Promise<{ filePath: string }>;\r\n generateAndUploadTemplate: (key: string, excelTemplate: ExcelTemplate) => Promise<{ fileName: string, filePath: string }>;\r\n uploadTemplate: (key?: string, validator?: (fileName: string) => string) => Promise<ExcelConfig>;\r\n download: (filePath: string, fileName?: string) => Promise<void>;\r\n generateExcelDataByTemplate: (filePath: string, columns: any[], items: any[], fileName?: string) => Promise<{ filePath: string }>;\r\n export?: (option: IExportOption) => Promise<{ filePath: string }>;\r\n bigExport?: (request: IBigExportRequest) => Promise<IBigExportResponse>;\r\n getFiles: (key?: string) => Promise<ExcelConfig[]>;\r\n remove: (key?: string, name?: string) => Promise<void>;\r\n}\r\n\r\nexport const EXCEL_CONFIG = new InjectionToken<IExcelConfiguration>('excel.configuration');\r\n","import { Optional } from '@angular/core';\r\nimport { Injectable, Inject } from '@angular/core';\r\nimport * as uuid from 'uuid';\r\nimport { ExcelTemplate, IExcelConfiguration, EXCEL_CONFIG, IExportOption, IBigExportRequest, IBigExportResponse } from './excel.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SdExcelService {\r\n importId = 'I' + uuid.v4();\r\n constructor(\r\n @Inject(EXCEL_CONFIG) @Optional() private configuration: IExcelConfiguration) {\r\n }\r\n\r\n generateExcelTemplate = async (excelTemplate: ExcelTemplate) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.generateTemplate(excelTemplate);\r\n }\r\n\r\n generateAndUploadExcelTemplate = async (key: string, excelTemplate: ExcelTemplate) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.generateAndUploadTemplate(key, excelTemplate);\r\n }\r\n\r\n uploadTemplate = async (key?: string, validator?: (fileName: string) => string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.uploadTemplate(key, validator);\r\n }\r\n\r\n downloadTemplate = async (filePath: string, fileName?: string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n await this.configuration.download(filePath, fileName);\r\n }\r\n\r\n generateExcelDataByTemplate = async (filePath: string, columns: any[], items: any[], fileName?: string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n const result = await this.configuration.generateExcelDataByTemplate(filePath, columns, items);\r\n if (result?.filePath) {\r\n await this.configuration.download(result.filePath, fileName || `${uuid.v4()}.xlsx`);\r\n }\r\n }\r\n\r\n export = async (option: IExportOption) => {\r\n if (!this.configuration?.export) {\r\n throw new Error('Please init excel export configuration');\r\n }\r\n const result = await this.configuration.export(option);\r\n if (result?.filePath) {\r\n await this.configuration.download(result.filePath);\r\n }\r\n }\r\n\r\n bigExport = async (request: IBigExportRequest): Promise<IBigExportResponse> => {\r\n if (!this.configuration?.bigExport) {\r\n throw new Error('Please init excel big export configuration');\r\n }\r\n return await this.configuration.bigExport(request);\r\n }\r\n\r\n getFiles = async (key?: string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.getFiles(key);\r\n }\r\n\r\n download = async (filePath: string) => {\r\n if (!filePath) {\r\n return;\r\n }\r\n await this.configuration.download(filePath);\r\n }\r\n\r\n remove = async (key?: string, name?: string) => {\r\n if (!this.configuration) {\r\n throw new Error('Please init excel configuration');\r\n }\r\n return await this.configuration.remove(key, name);\r\n }\r\n}\r\n\r\nexport interface IExportInfo {\r\n data: any[];\r\n sheetName?: string;\r\n fileName?: string;\r\n}\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/excel.model';\r\nexport * from './lib/excel.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;MA+Da,YAAY,GAAG,IAAI,cAAc,CAAsB,qBAAqB;;MCvD5E,cAAc;IAEzB,YAC4C,aAAkC;QAAlC,kBAAa,GAAb,aAAa,CAAqB;QAF9E,aAAQ,GAAG,GAAG,GAAGA,EAAO,EAAE,CAAC;QAK3B,0BAAqB,GAAG,CAAO,aAA4B;YACzD,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;gBACvB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;aACpD;YACD,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;SACjE,CAAA,CAAA;QAED,mCAA8B,GAAG,CAAO,GAAW,EAAE,aAA4B;YAC/E,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;gBACvB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;aACpD;YACD,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;SAC/E,CAAA,CAAA;QAED,mBAAc,GAAG,CAAO,GAAY,EAAE,SAAwC;YAC5E,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;gBACvB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;aACpD;YACD,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;SAChE,CAAA,CAAA;QAED,qBAAgB,GAAG,CAAO,QAAgB,EAAE,QAAiB;YAC3D,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;gBACvB,MAAM,IAAI,KAAK,CAAC,iCAAiC,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