cmat 0.0.50 → 0.0.52
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/components/masonry/index.d.ts +4 -1
- package/components/rating/index.d.ts +1 -0
- package/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
- package/fesm2022/cmat-components-card.mjs +3 -3
- package/fesm2022/cmat-components-carousel.mjs +14 -14
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +9 -9
- package/fesm2022/cmat-components-chip-input.mjs +3 -3
- package/fesm2022/cmat-components-custom-formly.mjs +95 -97
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +3 -3
- package/fesm2022/cmat-components-drawer.mjs +6 -6
- package/fesm2022/cmat-components-fullscreen.mjs +3 -3
- package/fesm2022/cmat-components-highlight.mjs +6 -6
- package/fesm2022/cmat-components-image-viewer.mjs +3 -3
- package/fesm2022/cmat-components-json-editor.mjs +3 -3
- package/fesm2022/cmat-components-knob-input.mjs +3 -3
- package/fesm2022/cmat-components-masonry.mjs +9 -7
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +3 -3
- package/fesm2022/cmat-components-material-datetimepicker.mjs +42 -42
- package/fesm2022/cmat-components-navigation.mjs +39 -39
- package/fesm2022/cmat-components-opt-input.mjs +3 -3
- package/fesm2022/cmat-components-org-chart.mjs +9 -9
- package/fesm2022/cmat-components-pagination.mjs +12 -12
- package/fesm2022/cmat-components-password-strength.mjs +9 -9
- package/fesm2022/cmat-components-popover.mjs +9 -9
- package/fesm2022/cmat-components-progress-bar.mjs +3 -3
- package/fesm2022/cmat-components-qrcode.mjs +3 -3
- package/fesm2022/cmat-components-rating.mjs +8 -11
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +9 -9
- package/fesm2022/cmat-components-select-table.mjs +3 -3
- package/fesm2022/cmat-components-select-tree.mjs +3 -3
- package/fesm2022/cmat-components-speed-dial.mjs +9 -9
- package/fesm2022/cmat-components-timeline.mjs +12 -12
- package/fesm2022/cmat-components-toast.mjs +9 -9
- package/fesm2022/cmat-components-transfer-picker.mjs +18 -18
- package/fesm2022/cmat-components-treetable.mjs +6 -6
- package/fesm2022/cmat-components-upload.mjs +11 -11
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
- package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-data-exporter.mjs +21 -21
- package/fesm2022/cmat-directives-debounce.mjs +9 -9
- package/fesm2022/cmat-directives-digit-only.mjs +6 -6
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs +3 -3
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs +16 -13
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-confirmation.mjs +6 -6
- package/fesm2022/cmat-services-data.mjs +3 -3
- package/fesm2022/cmat-services-export-as.mjs +3 -3
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +3 -3
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs +3 -3
- package/fesm2022/cmat-services-title.mjs +3 -3
- package/fesm2022/cmat-services-translation.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs +4 -4
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/package.json +74 -74
- package/services/alert/index.d.ts +4 -2
|
@@ -123,7 +123,7 @@ class CmatUtilsService {
|
|
|
123
123
|
console.error('Backend - ' +
|
|
124
124
|
`status: ${error.status}, ` +
|
|
125
125
|
`statusText: ${error.statusText}, ` +
|
|
126
|
-
`message: ${error.
|
|
126
|
+
`message: ${error.error}`);
|
|
127
127
|
}
|
|
128
128
|
// return an observable with a user-facing error message
|
|
129
129
|
return throwError(() => error ?? 'server error');
|
|
@@ -503,10 +503,10 @@ class CmatUtilsService {
|
|
|
503
503
|
}
|
|
504
504
|
return id;
|
|
505
505
|
}
|
|
506
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
507
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
506
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: CmatUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
507
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: CmatUtilsService, providedIn: 'root' }); }
|
|
508
508
|
}
|
|
509
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: CmatUtilsService, decorators: [{
|
|
510
510
|
type: Injectable,
|
|
511
511
|
args: [{
|
|
512
512
|
providedIn: 'root'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-services-utils.mjs","sources":["../../../projects/cmat/services/utils/utils.service.ts","../../../projects/cmat/services/utils/cmat-services-utils.ts"],"sourcesContent":["import { HttpErrorResponse, HttpHeaders, HttpResponse, HttpResponseBase } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { IsActiveMatchOptions } from '@angular/router';\r\nimport AES from 'crypto-js/aes';\r\nimport CryptoJSCore from 'crypto-js/core';\r\nimport Base64 from 'crypto-js/enc-base64';\r\nimport Hex from 'crypto-js/enc-hex';\r\nimport UTF8 from 'crypto-js/enc-utf8';\r\nimport Pkcs7 from 'crypto-js/pad-pkcs7';\r\nimport dayjs from 'dayjs';\r\nimport { isUndefined } from 'lodash-es';\r\nimport { throwError, Observable } from 'rxjs';\r\nimport { CMAT_VERSION } from 'cmat/version';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatUtilsService {\r\n public static readonly captionAndMessageSeparator = ':';\r\n public static readonly noNetworkMessageCaption = '无网络';\r\n public static readonly noNetworkMessageDetail = '无法连接服务器';\r\n public static readonly accessDeniedMessageCaption = '拒绝访问!';\r\n public static readonly accessDeniedMessageDetail = '';\r\n private static readonly key = UTF8.parse('14789632236987411478963223698741');//32位\r\n private static readonly iv = UTF8.parse('1478963223698741');//16位\r\n\r\n get exactMatchOptions(): IsActiveMatchOptions {\r\n return {\r\n paths: 'exact',\r\n fragment: 'ignored',\r\n matrixParams: 'ignored',\r\n queryParams: 'exact'\r\n };\r\n }\r\n\r\n get subsetMatchOptions(): IsActiveMatchOptions {\r\n return {\r\n paths: 'subset',\r\n fragment: 'ignored',\r\n matrixParams: 'ignored',\r\n queryParams: 'subset'\r\n };\r\n }\r\n\r\n public static getRequestHeaders(): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Content-Type', 'application/json')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', CMAT_VERSION);\r\n }\r\n\r\n public static getRequestIdempotentHeaders(): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Content-Type', 'application/json')\r\n .append('X-Request-ID', CmatUtilsService.newGuid())\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', CMAT_VERSION);\r\n }\r\n\r\n public static getRequestBypassHeaders(): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Content-Type', 'application/json')\r\n .append('bypass', 'true')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', CMAT_VERSION);\r\n }\r\n\r\n public static getRequestIdempotentBypassHeaders(): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Content-Type', 'application/json')\r\n .append('X-Request-ID', CmatUtilsService.newGuid())\r\n .append('bypass', 'true')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', CMAT_VERSION);\r\n }\r\n\r\n public static getRequestCryptoHeaders(params: string): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());\r\n }\r\n\r\n public static getRequestCryptoBypassHeaders(params: string): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('bypass', 'true')\r\n .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());\r\n }\r\n\r\n public static getRequestCryptoIdempotentHeaders(params: string): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('X-Request-ID', CmatUtilsService.newGuid())\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());\r\n }\r\n\r\n public static getRequestCryptoIdempotentBypassHeaders(params: string): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('X-Request-ID', CmatUtilsService.newGuid())\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('bypass', 'true')\r\n .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());\r\n }\r\n\r\n public static getEncryptData(data: string): string {\r\n const src = UTF8.parse(data);\r\n\r\n return AES.encrypt(src, this.key, {\r\n iv: this.iv,\r\n mode: CryptoJSCore.mode.CBC,\r\n padding: Pkcs7\r\n }).ciphertext.toString();\r\n }\r\n\r\n public static getDecryptData(data: string): string {\r\n const encryptedHexStr = Hex.parse(data);\r\n return AES.decrypt(Base64.stringify(encryptedHexStr), this.key, {\r\n iv: this.iv,\r\n mode: CryptoJSCore.mode.CBC,\r\n padding: Pkcs7\r\n }).toString(UTF8).toString();\r\n }\r\n\r\n public static handleError(error: any): Observable<never> {\r\n if (error.error instanceof ErrorEvent) {\r\n // A client-side or network error occurred. Handle it accordingly.\r\n console.error('Client side network error occurred:', error.message);\r\n } else {\r\n // The backend returned an unsuccessful response code.\r\n // The response body may contain clues as to what went wrong,\r\n console.error('Backend - ' +\r\n `status: ${error.status}, ` +\r\n `statusText: ${error.statusText}, ` +\r\n `message: ${error.message}`);\r\n }\r\n\r\n // return an observable with a user-facing error message\r\n return throwError(() => error ?? 'server error');\r\n }\r\n\r\n public static getHttpResponseMessage(data: any): string[] {\r\n\r\n const responses: string[] = [];\r\n\r\n if (data instanceof HttpResponseBase) {\r\n if (this.checkNoNetwork(data)) {\r\n responses.push(`${this.noNetworkMessageCaption}${this.captionAndMessageSeparator} ${this.noNetworkMessageDetail}`);\r\n } else {\r\n const responseObject = this.getResponseBody(data);\r\n\r\n if (responseObject && (typeof responseObject === 'object' || responseObject instanceof Object)) {\r\n\r\n for (const key in responseObject) {\r\n if (Object.prototype.hasOwnProperty.call(responseObject, key)) {\r\n if (key) {\r\n responses.push(`${key}${this.captionAndMessageSeparator} ${responseObject[key]}`);\r\n } else if (responseObject[key]) {\r\n responses.push(responseObject[key].toString());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!responses.length && this.getResponseBody(data)) {\r\n responses.push(`${this.getResponseBody(data).toString()}`);\r\n }\r\n }\r\n\r\n if (!responses.length) {\r\n responses.push(data.toString());\r\n }\r\n\r\n if (this.checkAccessDenied(data)) {\r\n responses.splice(0, 0, `${this.accessDeniedMessageCaption}${this.captionAndMessageSeparator} ${this.accessDeniedMessageDetail}`);\r\n }\r\n\r\n return responses;\r\n }\r\n\r\n\r\n public static findHttpResponseMessage(messageToFind: string, data: any, seachInCaptionOnly = true, includeCaptionInResult = false): string | null {\r\n const searchString = messageToFind.toLowerCase();\r\n const httpMessages = this.getHttpResponseMessage(data);\r\n\r\n for (const message of httpMessages) {\r\n const fullMessage = CmatUtilsService.splitInTwo(message, this.captionAndMessageSeparator);\r\n\r\n if (fullMessage.firstPart?.toLowerCase().includes(searchString)) {\r\n return includeCaptionInResult ? message : fullMessage.secondPart ?? fullMessage.firstPart;\r\n }\r\n }\r\n\r\n if (!seachInCaptionOnly) {\r\n for (const message of httpMessages) {\r\n\r\n if (message.toLowerCase().includes(searchString)) {\r\n if (includeCaptionInResult) {\r\n return message;\r\n } else {\r\n const fullMessage = CmatUtilsService.splitInTwo(message, this.captionAndMessageSeparator);\r\n return fullMessage.secondPart ?? fullMessage.firstPart;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public static getResponseBody(response: HttpResponseBase): any {\r\n if (response instanceof HttpResponse) {\r\n return response.body;\r\n }\r\n\r\n if (response instanceof HttpErrorResponse) {\r\n return response.error ?? response.message ?? response.statusText;\r\n }\r\n return response;\r\n }\r\n\r\n\r\n public static checkNoNetwork(response: HttpResponseBase): boolean {\r\n if (response instanceof HttpResponseBase) {\r\n return response.status === 0;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public static checkAccessDenied(response: HttpResponseBase): boolean {\r\n if (response instanceof HttpResponseBase) {\r\n return response.status === 403;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public static checkNotFound(response: HttpResponseBase): boolean {\r\n if (response instanceof HttpResponseBase) {\r\n return response.status === 404;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public static checkIsLocalHost(url: string, base?: string): boolean {\r\n if (url) {\r\n const location = new URL(url, base);\r\n return location.hostname === 'localhost' || location.hostname === '127.0.0.1';\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public static getQueryParamsFromString(paramString: string): Record<string, string | null> | null {\r\n if (!paramString) {\r\n return null;\r\n }\r\n\r\n const params: Record<string, string | null> = {};\r\n\r\n for (const param of paramString.split('&')) {\r\n const keyValue = CmatUtilsService.splitInTwo(param, '=');\r\n params[keyValue.firstPart] = keyValue.secondPart;\r\n }\r\n\r\n return params;\r\n }\r\n\r\n public static splitInTwo(text: string, separator?: string): { firstPart: string; secondPart: string | null } {\r\n const separatorIndex = separator ? text.indexOf(separator) : -1;\r\n\r\n if (separatorIndex === -1) {\r\n return { firstPart: text, secondPart: null };\r\n }\r\n\r\n const part1 = text.substring(0, separatorIndex).trim();\r\n const part2 = text.substring(separatorIndex + 1).trim();\r\n\r\n return { firstPart: part1, secondPart: part2 };\r\n }\r\n\r\n public static safeStringify(object: any): string {\r\n let result: string;\r\n\r\n try {\r\n result = JSON.stringify(object);\r\n return result;\r\n } catch { /* empty */ }\r\n\r\n const simpleObject: any = {};\r\n\r\n for (const prop in object) {\r\n if (!Object.prototype.hasOwnProperty.call(object, prop)) {\r\n continue;\r\n }\r\n if (typeof (object[prop]) == 'object') {\r\n continue;\r\n }\r\n if (typeof (object[prop]) == 'function') {\r\n continue;\r\n }\r\n simpleObject[prop] = object[prop];\r\n }\r\n\r\n result = '[***Sanitized Object***]: ' + JSON.stringify(simpleObject);\r\n\r\n return result;\r\n }\r\n\r\n public static jsonTryParse(value: string): string | void {\r\n try {\r\n return JSON.parse(value);\r\n } catch {\r\n if (isUndefined(value)) {\r\n return void 0;\r\n }\r\n\r\n return value;\r\n }\r\n }\r\n\r\n public static capitalizeFirstLetter(text: string): string {\r\n if (text) {\r\n return text.charAt(0).toUpperCase() + text.slice(1);\r\n } else {\r\n return text;\r\n }\r\n }\r\n\r\n\r\n public static toTitleCase(text: string): string {\r\n return text.replace(/\\w\\S*/g, subString => subString.charAt(0).toUpperCase() + subString.substring(1).toLowerCase());\r\n }\r\n\r\n public static toLowerCase(items: any): string | string[] | void {\r\n if (items instanceof Array) {\r\n const loweredRoles: string[] = [];\r\n\r\n for (let i = 0; i < items.length; i++) {\r\n loweredRoles[i] = items[i].toLowerCase();\r\n }\r\n\r\n return loweredRoles;\r\n } else if (typeof items === 'string' || items instanceof String) {\r\n return items.toLowerCase();\r\n }\r\n\r\n return void 0;\r\n }\r\n\r\n public static uniqueId(): string {\r\n return this.randomNumber(1000000, 9000000).toString();\r\n }\r\n\r\n public static randomNumber(min: number, max: number): number {\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n }\r\n\r\n public static baseUrl(): string {\r\n let base: string;\r\n\r\n if (window.location.origin) {\r\n base = window.location.origin;\r\n } else {\r\n base = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\r\n }\r\n\r\n return base.replace(/\\/$/, '');\r\n }\r\n\r\n public static newGuid(): string {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\r\n\r\n const r = (Math.random() * 16) | 0;\r\n\r\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n }\r\n\r\n public static testIsAbsoluteUrl(url: string): boolean {\r\n const r = new RegExp('^(?:[a-z]+:)?//', 'i');\r\n return r.test(url);\r\n }\r\n\r\n public static convertToAbsoluteUrl(url: string): string {\r\n return CmatUtilsService.testIsAbsoluteUrl(url) ? url : '//' + url;\r\n }\r\n\r\n public static urlBase64Decode(str: string): string {\r\n let output = str.replace(/-/g, '+').replace(/_/g, '/');\r\n switch (output.length % 4) {\r\n case 0: {\r\n break;\r\n }\r\n case 2: {\r\n output += '==';\r\n break;\r\n }\r\n case 3: {\r\n output += '=';\r\n break;\r\n }\r\n }\r\n return this._base64DecodeUnicode(output);\r\n }\r\n\r\n public static decodeToken(token: string): any {\r\n const parts = token.split('.');\r\n\r\n if (parts.length !== 3) {\r\n throw new Error('JWT must have 3 parts');\r\n }\r\n\r\n const decoded = this.urlBase64Decode(parts[1]);\r\n if (!decoded) {\r\n throw new Error('Cannot decode the token');\r\n }\r\n\r\n return JSON.parse(decoded);\r\n }\r\n\r\n public static getTokenExpirationDate(token: string): Date | null {\r\n const decoded = this.decodeToken(token);\r\n\r\n if (!Object.prototype.hasOwnProperty.call(decoded, 'exp')) {\r\n return null;\r\n }\r\n\r\n const date = new Date(0); // The 0 here is the key, which sets the date to the epoch\r\n date.setUTCSeconds(decoded.exp);\r\n\r\n return date;\r\n }\r\n\r\n public static isTokenExpired(token: string, offsetSeconds?: number): boolean {\r\n const date = this.getTokenExpirationDate(token);\r\n offsetSeconds = offsetSeconds ?? 0;\r\n\r\n if (date == null) {\r\n return false;\r\n }\r\n\r\n // Token expired?\r\n return !(date.valueOf() > (new Date().valueOf() + (offsetSeconds * 1000)));\r\n }\r\n\r\n public static readAsDataURL(file: File): Promise<any> {\r\n // Return a new promise\r\n return new Promise((resolve, reject) => {\r\n\r\n // Create a new reader\r\n const reader = new FileReader();\r\n\r\n // Resolve the promise on success\r\n reader.onload = (): void => {\r\n resolve(reader.result);\r\n };\r\n\r\n // Reject the promise on error\r\n reader.onerror = (e): void => {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(e);\r\n };\r\n\r\n // Read the file as the\r\n reader.readAsDataURL(file);\r\n });\r\n }\r\n\r\n public static dataURIToBlob(dataURI: string): Blob {\r\n const splitDataURI = dataURI.split(',');\r\n\r\n const byteString = splitDataURI[0].includes('base64') ? atob(splitDataURI[1]) : decodeURI(splitDataURI[1]);\r\n const mimeString = splitDataURI[0].split(':')[1].split(';')[0];\r\n\r\n const ia = new Uint8Array(byteString.length);\r\n for (let i = 0; i < byteString.length; i++) {\r\n ia[i] = byteString.charCodeAt(i);\r\n }\r\n\r\n return new Blob([ia], { type: mimeString });\r\n }\r\n\r\n public static getFileType(accept: string): 'csv' | 'gif' | 'word' | 'excel' | 'jpg' | 'outlook' | 'pdf' | 'png' | 'ppt' | 'file' | 'text' | 'video' | 'zip' {\r\n let fileType = 'file';\r\n switch (accept) {\r\n case 'image/jpeg':\r\n case 'image/jpg':\r\n fileType = 'jpg';\r\n break;\r\n case 'image/png':\r\n fileType = 'png';\r\n break;\r\n case 'text/csv':\r\n fileType = 'csv';\r\n break;\r\n case 'image/gif':\r\n fileType = 'gif';\r\n break;\r\n case 'application/msword':\r\n case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':\r\n fileType = 'word';\r\n break;\r\n case 'application/vnd.ms-excel':\r\n case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':\r\n fileType = 'word';\r\n break;\r\n case 'application/pdf':\r\n fileType = 'pdf';\r\n break;\r\n case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':\r\n case 'application/vnd.ms-powerpoint':\r\n fileType = 'ppt';\r\n break;\r\n case 'text/plain':\r\n fileType = 'text';\r\n break;\r\n case 'video/mpeg':\r\n case 'video/mp4':\r\n case 'audio/mp4':\r\n fileType = 'video';\r\n break;\r\n case 'aplication/zip':\r\n fileType = 'zip';\r\n break;\r\n }\r\n\r\n return fileType as 'csv' | 'gif' | 'word' | 'excel' | 'jpg' | 'outlook' | 'pdf' | 'png' | 'ppt' | 'file' | 'text' | 'video' | 'zip';\r\n }\r\n\r\n // 添加一个私有方法用于更准确地判断是否为日期字符串\r\n public static isDateString(value: any): boolean {\r\n // 首先检查是否为字符串或数字\r\n if (!value || (typeof value !== 'string' && typeof value !== 'number')) {\r\n return false;\r\n }\r\n\r\n // 转换为字符串进行检查\r\n const stringValue = String(value);\r\n\r\n // 排除纯数字字符串(如 \"1\", \"123\" 等)\r\n if (/^\\d+$/.test(stringValue)) {\r\n return false;\r\n }\r\n\r\n // 尝试解析日期\r\n const parsedDate = Date.parse(stringValue);\r\n\r\n // 检查是否能成功解析且不是纯数字\r\n if (isNaN(parsedDate)) {\r\n return false;\r\n }\r\n\r\n // 使用 dayjs 验证是否为有效日期\r\n return dayjs(stringValue).isValid();\r\n }\r\n\r\n //用于导出时结构转换,columns结构为{ code: string;label: string;}\r\n public static transformObjectsForExport(jsonObjects: any[], columns: any[]): any[] {\r\n return jsonObjects.map((jsonObject) => {\r\n const result: any = {};\r\n columns.forEach((info) => {\r\n const parts = info.code.split('.');\r\n const lastPart = parts.pop()!;\r\n let currentValue = jsonObject;\r\n\r\n // 遍历对象路径,直到找到最终属性所在的对象\r\n parts.forEach((part:any) => {\r\n if (Object.prototype.hasOwnProperty.call(currentValue, part)) {\r\n currentValue = currentValue[part];\r\n } else {\r\n // 如果路径中的任何部分不存在,则设置为 undefined\r\n currentValue = undefined;\r\n }\r\n });\r\n\r\n // 如果最终属性不存在,则设置为默认值(这里为空字符串)\r\n // 或者,您可以根据需要设置其他默认值或进行其他逻辑处理\r\n result[info.code] = currentValue ? (Object.prototype.hasOwnProperty.call(currentValue, lastPart) ? currentValue[lastPart] : '') : '';\r\n });\r\n\r\n return result;\r\n });\r\n }\r\n\r\n private static _base64DecodeUnicode(str: any): string {\r\n return decodeURIComponent(Array.prototype.map.call(atob(str), (c: any) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)).join(''));\r\n }\r\n\r\n randomId(stringLength: number = 10): string {\r\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n let id = '';\r\n\r\n for (let i = 0; i < stringLength; i++) {\r\n id += chars.charAt(Math.floor(Math.random() * chars.length));\r\n }\r\n\r\n return id;\r\n }\r\n\r\n\r\n}\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAiBa,gBAAgB,CAAA;aACF,IAAA,CAAA,0BAA0B,GAAG,GAAH,CAAO;aACjC,IAAA,CAAA,uBAAuB,GAAG,KAAH,CAAS;aAChC,IAAA,CAAA,sBAAsB,GAAG,SAAH,CAAa;aACnC,IAAA,CAAA,0BAA0B,GAAG,OAAH,CAAW;aACrC,IAAA,CAAA,yBAAyB,GAAG,EAAH,CAAM;aAC9B,IAAA,CAAA,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,kCAAkC,CAAhD,CAAkD,EAAA;aACrD,IAAA,CAAA,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAhC,CAAkC,EAAA;AAE5D,IAAA,IAAI,iBAAiB,GAAA;QACjB,OAAO;AACH,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,SAAS;AACnB,YAAA,YAAY,EAAE,SAAS;AACvB,YAAA,WAAW,EAAE;SAChB;IACL;AAEA,IAAA,IAAI,kBAAkB,GAAA;QAClB,OAAO;AACH,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,QAAQ,EAAE,SAAS;AACnB,YAAA,YAAY,EAAE,SAAS;AACvB,YAAA,WAAW,EAAE;SAChB;IACL;AAEO,IAAA,OAAO,iBAAiB,GAAA;QAC3B,OAAO,IAAI,WAAW;AACjB,aAAA,MAAM,CAAC,6BAA6B,EAAE,GAAG;AACzC,aAAA,MAAM,CAAC,cAAc,EAAE,kBAAkB;AACzC,aAAA,MAAM,CAAC,QAAQ,EAAE,CAAA,sBAAA,EAAyB,YAAY,0CAA0C;AAChG,aAAA,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC;IAC5C;AAEO,IAAA,OAAO,2BAA2B,GAAA;QACrC,OAAO,IAAI,WA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,EAAE,EAAE;AACnC,YAAA,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QAChE;AAEA,QAAA,OAAO,EAAE;IACb;8GAhlBS,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFb,MAAM,EAAA,CAAA,CAAA;;2FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cmat-services-utils.mjs","sources":["../../../projects/cmat/services/utils/utils.service.ts","../../../projects/cmat/services/utils/cmat-services-utils.ts"],"sourcesContent":["import { HttpErrorResponse, HttpHeaders, HttpResponse, HttpResponseBase } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { IsActiveMatchOptions } from '@angular/router';\r\nimport AES from 'crypto-js/aes';\r\nimport CryptoJSCore from 'crypto-js/core';\r\nimport Base64 from 'crypto-js/enc-base64';\r\nimport Hex from 'crypto-js/enc-hex';\r\nimport UTF8 from 'crypto-js/enc-utf8';\r\nimport Pkcs7 from 'crypto-js/pad-pkcs7';\r\nimport dayjs from 'dayjs';\r\nimport { isUndefined } from 'lodash-es';\r\nimport { throwError, Observable } from 'rxjs';\r\nimport { CMAT_VERSION } from 'cmat/version';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatUtilsService {\r\n public static readonly captionAndMessageSeparator = ':';\r\n public static readonly noNetworkMessageCaption = '无网络';\r\n public static readonly noNetworkMessageDetail = '无法连接服务器';\r\n public static readonly accessDeniedMessageCaption = '拒绝访问!';\r\n public static readonly accessDeniedMessageDetail = '';\r\n private static readonly key = UTF8.parse('14789632236987411478963223698741');//32位\r\n private static readonly iv = UTF8.parse('1478963223698741');//16位\r\n\r\n get exactMatchOptions(): IsActiveMatchOptions {\r\n return {\r\n paths: 'exact',\r\n fragment: 'ignored',\r\n matrixParams: 'ignored',\r\n queryParams: 'exact'\r\n };\r\n }\r\n\r\n get subsetMatchOptions(): IsActiveMatchOptions {\r\n return {\r\n paths: 'subset',\r\n fragment: 'ignored',\r\n matrixParams: 'ignored',\r\n queryParams: 'subset'\r\n };\r\n }\r\n\r\n public static getRequestHeaders(): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Content-Type', 'application/json')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', CMAT_VERSION);\r\n }\r\n\r\n public static getRequestIdempotentHeaders(): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Content-Type', 'application/json')\r\n .append('X-Request-ID', CmatUtilsService.newGuid())\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', CMAT_VERSION);\r\n }\r\n\r\n public static getRequestBypassHeaders(): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Content-Type', 'application/json')\r\n .append('bypass', 'true')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', CMAT_VERSION);\r\n }\r\n\r\n public static getRequestIdempotentBypassHeaders(): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Content-Type', 'application/json')\r\n .append('X-Request-ID', CmatUtilsService.newGuid())\r\n .append('bypass', 'true')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', CMAT_VERSION);\r\n }\r\n\r\n public static getRequestCryptoHeaders(params: string): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());\r\n }\r\n\r\n public static getRequestCryptoBypassHeaders(params: string): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('bypass', 'true')\r\n .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());\r\n }\r\n\r\n public static getRequestCryptoIdempotentHeaders(params: string): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('X-Request-ID', CmatUtilsService.newGuid())\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());\r\n }\r\n\r\n public static getRequestCryptoIdempotentBypassHeaders(params: string): HttpHeaders {\r\n return new HttpHeaders()\r\n .append('Access-Control-Allow-Origin', '*')\r\n .append('X-Request-ID', CmatUtilsService.newGuid())\r\n .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)\r\n .append('bypass', 'true')\r\n .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());\r\n }\r\n\r\n public static getEncryptData(data: string): string {\r\n const src = UTF8.parse(data);\r\n\r\n return AES.encrypt(src, this.key, {\r\n iv: this.iv,\r\n mode: CryptoJSCore.mode.CBC,\r\n padding: Pkcs7\r\n }).ciphertext.toString();\r\n }\r\n\r\n public static getDecryptData(data: string): string {\r\n const encryptedHexStr = Hex.parse(data);\r\n return AES.decrypt(Base64.stringify(encryptedHexStr), this.key, {\r\n iv: this.iv,\r\n mode: CryptoJSCore.mode.CBC,\r\n padding: Pkcs7\r\n }).toString(UTF8).toString();\r\n }\r\n\r\n public static handleError(error: any): Observable<never> {\r\n if (error.error instanceof ErrorEvent) {\r\n // A client-side or network error occurred. Handle it accordingly.\r\n console.error('Client side network error occurred:', error.message);\r\n } else {\r\n // The backend returned an unsuccessful response code.\r\n // The response body may contain clues as to what went wrong,\r\n console.error('Backend - ' +\r\n `status: ${error.status}, ` +\r\n `statusText: ${error.statusText}, ` +\r\n `message: ${error.error}`);\r\n }\r\n\r\n // return an observable with a user-facing error message\r\n return throwError(() => error ?? 'server error');\r\n }\r\n\r\n public static getHttpResponseMessage(data: any): string[] {\r\n\r\n const responses: string[] = [];\r\n\r\n if (data instanceof HttpResponseBase) {\r\n if (this.checkNoNetwork(data)) {\r\n responses.push(`${this.noNetworkMessageCaption}${this.captionAndMessageSeparator} ${this.noNetworkMessageDetail}`);\r\n } else {\r\n const responseObject = this.getResponseBody(data);\r\n\r\n if (responseObject && (typeof responseObject === 'object' || responseObject instanceof Object)) {\r\n\r\n for (const key in responseObject) {\r\n if (Object.prototype.hasOwnProperty.call(responseObject, key)) {\r\n if (key) {\r\n responses.push(`${key}${this.captionAndMessageSeparator} ${responseObject[key]}`);\r\n } else if (responseObject[key]) {\r\n responses.push(responseObject[key].toString());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!responses.length && this.getResponseBody(data)) {\r\n responses.push(`${this.getResponseBody(data).toString()}`);\r\n }\r\n }\r\n\r\n if (!responses.length) {\r\n responses.push(data.toString());\r\n }\r\n\r\n if (this.checkAccessDenied(data)) {\r\n responses.splice(0, 0, `${this.accessDeniedMessageCaption}${this.captionAndMessageSeparator} ${this.accessDeniedMessageDetail}`);\r\n }\r\n\r\n return responses;\r\n }\r\n\r\n\r\n public static findHttpResponseMessage(messageToFind: string, data: any, seachInCaptionOnly = true, includeCaptionInResult = false): string | null {\r\n const searchString = messageToFind.toLowerCase();\r\n const httpMessages = this.getHttpResponseMessage(data);\r\n\r\n for (const message of httpMessages) {\r\n const fullMessage = CmatUtilsService.splitInTwo(message, this.captionAndMessageSeparator);\r\n\r\n if (fullMessage.firstPart?.toLowerCase().includes(searchString)) {\r\n return includeCaptionInResult ? message : fullMessage.secondPart ?? fullMessage.firstPart;\r\n }\r\n }\r\n\r\n if (!seachInCaptionOnly) {\r\n for (const message of httpMessages) {\r\n\r\n if (message.toLowerCase().includes(searchString)) {\r\n if (includeCaptionInResult) {\r\n return message;\r\n } else {\r\n const fullMessage = CmatUtilsService.splitInTwo(message, this.captionAndMessageSeparator);\r\n return fullMessage.secondPart ?? fullMessage.firstPart;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public static getResponseBody(response: HttpResponseBase): any {\r\n if (response instanceof HttpResponse) {\r\n return response.body;\r\n }\r\n\r\n if (response instanceof HttpErrorResponse) {\r\n return response.error ?? response.message ?? response.statusText;\r\n }\r\n return response;\r\n }\r\n\r\n\r\n public static checkNoNetwork(response: HttpResponseBase): boolean {\r\n if (response instanceof HttpResponseBase) {\r\n return response.status === 0;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public static checkAccessDenied(response: HttpResponseBase): boolean {\r\n if (response instanceof HttpResponseBase) {\r\n return response.status === 403;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public static checkNotFound(response: HttpResponseBase): boolean {\r\n if (response instanceof HttpResponseBase) {\r\n return response.status === 404;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public static checkIsLocalHost(url: string, base?: string): boolean {\r\n if (url) {\r\n const location = new URL(url, base);\r\n return location.hostname === 'localhost' || location.hostname === '127.0.0.1';\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public static getQueryParamsFromString(paramString: string): Record<string, string | null> | null {\r\n if (!paramString) {\r\n return null;\r\n }\r\n\r\n const params: Record<string, string | null> = {};\r\n\r\n for (const param of paramString.split('&')) {\r\n const keyValue = CmatUtilsService.splitInTwo(param, '=');\r\n params[keyValue.firstPart] = keyValue.secondPart;\r\n }\r\n\r\n return params;\r\n }\r\n\r\n public static splitInTwo(text: string, separator?: string): { firstPart: string; secondPart: string | null } {\r\n const separatorIndex = separator ? text.indexOf(separator) : -1;\r\n\r\n if (separatorIndex === -1) {\r\n return { firstPart: text, secondPart: null };\r\n }\r\n\r\n const part1 = text.substring(0, separatorIndex).trim();\r\n const part2 = text.substring(separatorIndex + 1).trim();\r\n\r\n return { firstPart: part1, secondPart: part2 };\r\n }\r\n\r\n public static safeStringify(object: any): string {\r\n let result: string;\r\n\r\n try {\r\n result = JSON.stringify(object);\r\n return result;\r\n } catch { /* empty */ }\r\n\r\n const simpleObject: any = {};\r\n\r\n for (const prop in object) {\r\n if (!Object.prototype.hasOwnProperty.call(object, prop)) {\r\n continue;\r\n }\r\n if (typeof (object[prop]) == 'object') {\r\n continue;\r\n }\r\n if (typeof (object[prop]) == 'function') {\r\n continue;\r\n }\r\n simpleObject[prop] = object[prop];\r\n }\r\n\r\n result = '[***Sanitized Object***]: ' + JSON.stringify(simpleObject);\r\n\r\n return result;\r\n }\r\n\r\n public static jsonTryParse(value: string): string | void {\r\n try {\r\n return JSON.parse(value);\r\n } catch {\r\n if (isUndefined(value)) {\r\n return void 0;\r\n }\r\n\r\n return value;\r\n }\r\n }\r\n\r\n public static capitalizeFirstLetter(text: string): string {\r\n if (text) {\r\n return text.charAt(0).toUpperCase() + text.slice(1);\r\n } else {\r\n return text;\r\n }\r\n }\r\n\r\n\r\n public static toTitleCase(text: string): string {\r\n return text.replace(/\\w\\S*/g, subString => subString.charAt(0).toUpperCase() + subString.substring(1).toLowerCase());\r\n }\r\n\r\n public static toLowerCase(items: any): string | string[] | void {\r\n if (items instanceof Array) {\r\n const loweredRoles: string[] = [];\r\n\r\n for (let i = 0; i < items.length; i++) {\r\n loweredRoles[i] = items[i].toLowerCase();\r\n }\r\n\r\n return loweredRoles;\r\n } else if (typeof items === 'string' || items instanceof String) {\r\n return items.toLowerCase();\r\n }\r\n\r\n return void 0;\r\n }\r\n\r\n public static uniqueId(): string {\r\n return this.randomNumber(1000000, 9000000).toString();\r\n }\r\n\r\n public static randomNumber(min: number, max: number): number {\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n }\r\n\r\n public static baseUrl(): string {\r\n let base: string;\r\n\r\n if (window.location.origin) {\r\n base = window.location.origin;\r\n } else {\r\n base = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\r\n }\r\n\r\n return base.replace(/\\/$/, '');\r\n }\r\n\r\n public static newGuid(): string {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\r\n\r\n const r = (Math.random() * 16) | 0;\r\n\r\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n }\r\n\r\n public static testIsAbsoluteUrl(url: string): boolean {\r\n const r = new RegExp('^(?:[a-z]+:)?//', 'i');\r\n return r.test(url);\r\n }\r\n\r\n public static convertToAbsoluteUrl(url: string): string {\r\n return CmatUtilsService.testIsAbsoluteUrl(url) ? url : '//' + url;\r\n }\r\n\r\n public static urlBase64Decode(str: string): string {\r\n let output = str.replace(/-/g, '+').replace(/_/g, '/');\r\n switch (output.length % 4) {\r\n case 0: {\r\n break;\r\n }\r\n case 2: {\r\n output += '==';\r\n break;\r\n }\r\n case 3: {\r\n output += '=';\r\n break;\r\n }\r\n }\r\n return this._base64DecodeUnicode(output);\r\n }\r\n\r\n public static decodeToken(token: string): any {\r\n const parts = token.split('.');\r\n\r\n if (parts.length !== 3) {\r\n throw new Error('JWT must have 3 parts');\r\n }\r\n\r\n const decoded = this.urlBase64Decode(parts[1]);\r\n if (!decoded) {\r\n throw new Error('Cannot decode the token');\r\n }\r\n\r\n return JSON.parse(decoded);\r\n }\r\n\r\n public static getTokenExpirationDate(token: string): Date | null {\r\n const decoded = this.decodeToken(token);\r\n\r\n if (!Object.prototype.hasOwnProperty.call(decoded, 'exp')) {\r\n return null;\r\n }\r\n\r\n const date = new Date(0); // The 0 here is the key, which sets the date to the epoch\r\n date.setUTCSeconds(decoded.exp);\r\n\r\n return date;\r\n }\r\n\r\n public static isTokenExpired(token: string, offsetSeconds?: number): boolean {\r\n const date = this.getTokenExpirationDate(token);\r\n offsetSeconds = offsetSeconds ?? 0;\r\n\r\n if (date == null) {\r\n return false;\r\n }\r\n\r\n // Token expired?\r\n return !(date.valueOf() > (new Date().valueOf() + (offsetSeconds * 1000)));\r\n }\r\n\r\n public static readAsDataURL(file: File): Promise<any> {\r\n // Return a new promise\r\n return new Promise((resolve, reject) => {\r\n\r\n // Create a new reader\r\n const reader = new FileReader();\r\n\r\n // Resolve the promise on success\r\n reader.onload = (): void => {\r\n resolve(reader.result);\r\n };\r\n\r\n // Reject the promise on error\r\n reader.onerror = (e): void => {\r\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\r\n reject(e);\r\n };\r\n\r\n // Read the file as the\r\n reader.readAsDataURL(file);\r\n });\r\n }\r\n\r\n public static dataURIToBlob(dataURI: string): Blob {\r\n const splitDataURI = dataURI.split(',');\r\n\r\n const byteString = splitDataURI[0].includes('base64') ? atob(splitDataURI[1]) : decodeURI(splitDataURI[1]);\r\n const mimeString = splitDataURI[0].split(':')[1].split(';')[0];\r\n\r\n const ia = new Uint8Array(byteString.length);\r\n for (let i = 0; i < byteString.length; i++) {\r\n ia[i] = byteString.charCodeAt(i);\r\n }\r\n\r\n return new Blob([ia], { type: mimeString });\r\n }\r\n\r\n public static getFileType(accept: string): 'csv' | 'gif' | 'word' | 'excel' | 'jpg' | 'outlook' | 'pdf' | 'png' | 'ppt' | 'file' | 'text' | 'video' | 'zip' {\r\n let fileType = 'file';\r\n switch (accept) {\r\n case 'image/jpeg':\r\n case 'image/jpg':\r\n fileType = 'jpg';\r\n break;\r\n case 'image/png':\r\n fileType = 'png';\r\n break;\r\n case 'text/csv':\r\n fileType = 'csv';\r\n break;\r\n case 'image/gif':\r\n fileType = 'gif';\r\n break;\r\n case 'application/msword':\r\n case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':\r\n fileType = 'word';\r\n break;\r\n case 'application/vnd.ms-excel':\r\n case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':\r\n fileType = 'word';\r\n break;\r\n case 'application/pdf':\r\n fileType = 'pdf';\r\n break;\r\n case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':\r\n case 'application/vnd.ms-powerpoint':\r\n fileType = 'ppt';\r\n break;\r\n case 'text/plain':\r\n fileType = 'text';\r\n break;\r\n case 'video/mpeg':\r\n case 'video/mp4':\r\n case 'audio/mp4':\r\n fileType = 'video';\r\n break;\r\n case 'aplication/zip':\r\n fileType = 'zip';\r\n break;\r\n }\r\n\r\n return fileType as 'csv' | 'gif' | 'word' | 'excel' | 'jpg' | 'outlook' | 'pdf' | 'png' | 'ppt' | 'file' | 'text' | 'video' | 'zip';\r\n }\r\n\r\n // 添加一个私有方法用于更准确地判断是否为日期字符串\r\n public static isDateString(value: any): boolean {\r\n // 首先检查是否为字符串或数字\r\n if (!value || (typeof value !== 'string' && typeof value !== 'number')) {\r\n return false;\r\n }\r\n\r\n // 转换为字符串进行检查\r\n const stringValue = String(value);\r\n\r\n // 排除纯数字字符串(如 \"1\", \"123\" 等)\r\n if (/^\\d+$/.test(stringValue)) {\r\n return false;\r\n }\r\n\r\n // 尝试解析日期\r\n const parsedDate = Date.parse(stringValue);\r\n\r\n // 检查是否能成功解析且不是纯数字\r\n if (isNaN(parsedDate)) {\r\n return false;\r\n }\r\n\r\n // 使用 dayjs 验证是否为有效日期\r\n return dayjs(stringValue).isValid();\r\n }\r\n\r\n //用于导出时结构转换,columns结构为{ code: string;label: string;}\r\n public static transformObjectsForExport(jsonObjects: any[], columns: any[]): any[] {\r\n return jsonObjects.map((jsonObject) => {\r\n const result: any = {};\r\n columns.forEach((info) => {\r\n const parts = info.code.split('.');\r\n const lastPart = parts.pop()!;\r\n let currentValue = jsonObject;\r\n\r\n // 遍历对象路径,直到找到最终属性所在的对象\r\n parts.forEach((part:any) => {\r\n if (Object.prototype.hasOwnProperty.call(currentValue, part)) {\r\n currentValue = currentValue[part];\r\n } else {\r\n // 如果路径中的任何部分不存在,则设置为 undefined\r\n currentValue = undefined;\r\n }\r\n });\r\n\r\n // 如果最终属性不存在,则设置为默认值(这里为空字符串)\r\n // 或者,您可以根据需要设置其他默认值或进行其他逻辑处理\r\n result[info.code] = currentValue ? (Object.prototype.hasOwnProperty.call(currentValue, lastPart) ? currentValue[lastPart] : '') : '';\r\n });\r\n\r\n return result;\r\n });\r\n }\r\n\r\n private static _base64DecodeUnicode(str: any): string {\r\n return decodeURIComponent(Array.prototype.map.call(atob(str), (c: any) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)).join(''));\r\n }\r\n\r\n randomId(stringLength: number = 10): string {\r\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n let id = '';\r\n\r\n for (let i = 0; i < stringLength; i++) {\r\n id += chars.charAt(Math.floor(Math.random() * chars.length));\r\n }\r\n\r\n return id;\r\n }\r\n\r\n\r\n}\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAiBa,gBAAgB,CAAA;aACF,IAAA,CAAA,0BAA0B,GAAG,GAAH,CAAO;aACjC,IAAA,CAAA,uBAAuB,GAAG,KAAH,CAAS;aAChC,IAAA,CAAA,sBAAsB,GAAG,SAAH,CAAa;aACnC,IAAA,CAAA,0BAA0B,GAAG,OAAH,CAAW;aACrC,IAAA,CAAA,yBAAyB,GAAG,EAAH,CAAM;aAC9B,IAAA,CAAA,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,kCAAkC,CAAhD,CAAkD,EAAA;aACrD,IAAA,CAAA,EAAE,GAAG,IAAI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A,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;AChBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cmat",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.52",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Yu Tao",
|
|
6
6
|
"email": "916426364@qq.com"
|
|
@@ -45,26 +45,26 @@
|
|
|
45
45
|
"types": "./index.d.ts",
|
|
46
46
|
"default": "./fesm2022/cmat.mjs"
|
|
47
47
|
},
|
|
48
|
-
"./version": {
|
|
49
|
-
"types": "./version/index.d.ts",
|
|
50
|
-
"default": "./fesm2022/cmat-version.mjs"
|
|
51
|
-
},
|
|
52
48
|
"./validators": {
|
|
53
49
|
"types": "./validators/index.d.ts",
|
|
54
50
|
"default": "./fesm2022/cmat-validators.mjs"
|
|
55
51
|
},
|
|
52
|
+
"./version": {
|
|
53
|
+
"types": "./version/index.d.ts",
|
|
54
|
+
"default": "./fesm2022/cmat-version.mjs"
|
|
55
|
+
},
|
|
56
56
|
"./components/adapter": {
|
|
57
57
|
"types": "./components/adapter/index.d.ts",
|
|
58
58
|
"default": "./fesm2022/cmat-components-adapter.mjs"
|
|
59
59
|
},
|
|
60
|
-
"./components/card": {
|
|
61
|
-
"types": "./components/card/index.d.ts",
|
|
62
|
-
"default": "./fesm2022/cmat-components-card.mjs"
|
|
63
|
-
},
|
|
64
60
|
"./components/breadcrumb": {
|
|
65
61
|
"types": "./components/breadcrumb/index.d.ts",
|
|
66
62
|
"default": "./fesm2022/cmat-components-breadcrumb.mjs"
|
|
67
63
|
},
|
|
64
|
+
"./components/card": {
|
|
65
|
+
"types": "./components/card/index.d.ts",
|
|
66
|
+
"default": "./fesm2022/cmat-components-card.mjs"
|
|
67
|
+
},
|
|
68
68
|
"./components/carousel": {
|
|
69
69
|
"types": "./components/carousel/index.d.ts",
|
|
70
70
|
"default": "./fesm2022/cmat-components-carousel.mjs"
|
|
@@ -97,14 +97,14 @@
|
|
|
97
97
|
"types": "./components/highlight/index.d.ts",
|
|
98
98
|
"default": "./fesm2022/cmat-components-highlight.mjs"
|
|
99
99
|
},
|
|
100
|
-
"./components/json-editor": {
|
|
101
|
-
"types": "./components/json-editor/index.d.ts",
|
|
102
|
-
"default": "./fesm2022/cmat-components-json-editor.mjs"
|
|
103
|
-
},
|
|
104
100
|
"./components/image-viewer": {
|
|
105
101
|
"types": "./components/image-viewer/index.d.ts",
|
|
106
102
|
"default": "./fesm2022/cmat-components-image-viewer.mjs"
|
|
107
103
|
},
|
|
104
|
+
"./components/json-editor": {
|
|
105
|
+
"types": "./components/json-editor/index.d.ts",
|
|
106
|
+
"default": "./fesm2022/cmat-components-json-editor.mjs"
|
|
107
|
+
},
|
|
108
108
|
"./components/knob-input": {
|
|
109
109
|
"types": "./components/knob-input/index.d.ts",
|
|
110
110
|
"default": "./fesm2022/cmat-components-knob-input.mjs"
|
|
@@ -121,26 +121,26 @@
|
|
|
121
121
|
"types": "./components/material-datetimepicker/index.d.ts",
|
|
122
122
|
"default": "./fesm2022/cmat-components-material-datetimepicker.mjs"
|
|
123
123
|
},
|
|
124
|
-
"./components/opt-input": {
|
|
125
|
-
"types": "./components/opt-input/index.d.ts",
|
|
126
|
-
"default": "./fesm2022/cmat-components-opt-input.mjs"
|
|
127
|
-
},
|
|
128
124
|
"./components/navigation": {
|
|
129
125
|
"types": "./components/navigation/index.d.ts",
|
|
130
126
|
"default": "./fesm2022/cmat-components-navigation.mjs"
|
|
131
127
|
},
|
|
128
|
+
"./components/opt-input": {
|
|
129
|
+
"types": "./components/opt-input/index.d.ts",
|
|
130
|
+
"default": "./fesm2022/cmat-components-opt-input.mjs"
|
|
131
|
+
},
|
|
132
132
|
"./components/org-chart": {
|
|
133
133
|
"types": "./components/org-chart/index.d.ts",
|
|
134
134
|
"default": "./fesm2022/cmat-components-org-chart.mjs"
|
|
135
135
|
},
|
|
136
|
-
"./components/password-strength": {
|
|
137
|
-
"types": "./components/password-strength/index.d.ts",
|
|
138
|
-
"default": "./fesm2022/cmat-components-password-strength.mjs"
|
|
139
|
-
},
|
|
140
136
|
"./components/pagination": {
|
|
141
137
|
"types": "./components/pagination/index.d.ts",
|
|
142
138
|
"default": "./fesm2022/cmat-components-pagination.mjs"
|
|
143
139
|
},
|
|
140
|
+
"./components/password-strength": {
|
|
141
|
+
"types": "./components/password-strength/index.d.ts",
|
|
142
|
+
"default": "./fesm2022/cmat-components-password-strength.mjs"
|
|
143
|
+
},
|
|
144
144
|
"./components/popover": {
|
|
145
145
|
"types": "./components/popover/index.d.ts",
|
|
146
146
|
"default": "./fesm2022/cmat-components-popover.mjs"
|
|
@@ -157,17 +157,17 @@
|
|
|
157
157
|
"types": "./components/rating/index.d.ts",
|
|
158
158
|
"default": "./fesm2022/cmat-components-rating.mjs"
|
|
159
159
|
},
|
|
160
|
-
"./components/select-
|
|
161
|
-
"types": "./components/select-
|
|
162
|
-
"default": "./fesm2022/cmat-components-select-
|
|
160
|
+
"./components/select-search": {
|
|
161
|
+
"types": "./components/select-search/index.d.ts",
|
|
162
|
+
"default": "./fesm2022/cmat-components-select-search.mjs"
|
|
163
163
|
},
|
|
164
164
|
"./components/select-table": {
|
|
165
165
|
"types": "./components/select-table/index.d.ts",
|
|
166
166
|
"default": "./fesm2022/cmat-components-select-table.mjs"
|
|
167
167
|
},
|
|
168
|
-
"./components/select-
|
|
169
|
-
"types": "./components/select-
|
|
170
|
-
"default": "./fesm2022/cmat-components-select-
|
|
168
|
+
"./components/select-tree": {
|
|
169
|
+
"types": "./components/select-tree/index.d.ts",
|
|
170
|
+
"default": "./fesm2022/cmat-components-select-tree.mjs"
|
|
171
171
|
},
|
|
172
172
|
"./components/speed-dial": {
|
|
173
173
|
"types": "./components/speed-dial/index.d.ts",
|
|
@@ -177,34 +177,34 @@
|
|
|
177
177
|
"types": "./components/timeline/index.d.ts",
|
|
178
178
|
"default": "./fesm2022/cmat-components-timeline.mjs"
|
|
179
179
|
},
|
|
180
|
-
"./components/transfer-picker": {
|
|
181
|
-
"types": "./components/transfer-picker/index.d.ts",
|
|
182
|
-
"default": "./fesm2022/cmat-components-transfer-picker.mjs"
|
|
183
|
-
},
|
|
184
180
|
"./components/toast": {
|
|
185
181
|
"types": "./components/toast/index.d.ts",
|
|
186
182
|
"default": "./fesm2022/cmat-components-toast.mjs"
|
|
187
183
|
},
|
|
188
|
-
"./
|
|
189
|
-
"types": "./
|
|
190
|
-
"default": "./fesm2022/cmat-
|
|
191
|
-
},
|
|
192
|
-
"./components/upload": {
|
|
193
|
-
"types": "./components/upload/index.d.ts",
|
|
194
|
-
"default": "./fesm2022/cmat-components-upload.mjs"
|
|
184
|
+
"./components/transfer-picker": {
|
|
185
|
+
"types": "./components/transfer-picker/index.d.ts",
|
|
186
|
+
"default": "./fesm2022/cmat-components-transfer-picker.mjs"
|
|
195
187
|
},
|
|
196
188
|
"./components/treetable": {
|
|
197
189
|
"types": "./components/treetable/index.d.ts",
|
|
198
190
|
"default": "./fesm2022/cmat-components-treetable.mjs"
|
|
199
191
|
},
|
|
200
|
-
"./
|
|
201
|
-
"types": "./
|
|
202
|
-
"default": "./fesm2022/cmat-
|
|
192
|
+
"./components/upload": {
|
|
193
|
+
"types": "./components/upload/index.d.ts",
|
|
194
|
+
"default": "./fesm2022/cmat-components-upload.mjs"
|
|
203
195
|
},
|
|
204
196
|
"./components/x6-angular-shape": {
|
|
205
197
|
"types": "./components/x6-angular-shape/index.d.ts",
|
|
206
198
|
"default": "./fesm2022/cmat-components-x6-angular-shape.mjs"
|
|
207
199
|
},
|
|
200
|
+
"./directives/animate-on-scroll": {
|
|
201
|
+
"types": "./directives/animate-on-scroll/index.d.ts",
|
|
202
|
+
"default": "./fesm2022/cmat-directives-animate-on-scroll.mjs"
|
|
203
|
+
},
|
|
204
|
+
"./directives/arrow-cursor": {
|
|
205
|
+
"types": "./directives/arrow-cursor/index.d.ts",
|
|
206
|
+
"default": "./fesm2022/cmat-directives-arrow-cursor.mjs"
|
|
207
|
+
},
|
|
208
208
|
"./directives/autofocus": {
|
|
209
209
|
"types": "./directives/autofocus/index.d.ts",
|
|
210
210
|
"default": "./fesm2022/cmat-directives-autofocus.mjs"
|
|
@@ -221,53 +221,57 @@
|
|
|
221
221
|
"types": "./directives/digit-only/index.d.ts",
|
|
222
222
|
"default": "./fesm2022/cmat-directives-digit-only.mjs"
|
|
223
223
|
},
|
|
224
|
-
"./pipes/bytes": {
|
|
225
|
-
"types": "./pipes/bytes/index.d.ts",
|
|
226
|
-
"default": "./fesm2022/cmat-pipes-bytes.mjs"
|
|
227
|
-
},
|
|
228
224
|
"./directives/equal-validator": {
|
|
229
225
|
"types": "./directives/equal-validator/index.d.ts",
|
|
230
226
|
"default": "./fesm2022/cmat-directives-equal-validator.mjs"
|
|
231
227
|
},
|
|
228
|
+
"./lib/mock-api": {
|
|
229
|
+
"types": "./lib/mock-api/index.d.ts",
|
|
230
|
+
"default": "./fesm2022/cmat-lib-mock-api.mjs"
|
|
231
|
+
},
|
|
232
|
+
"./pipes/bytes": {
|
|
233
|
+
"types": "./pipes/bytes/index.d.ts",
|
|
234
|
+
"default": "./fesm2022/cmat-pipes-bytes.mjs"
|
|
235
|
+
},
|
|
232
236
|
"./pipes/date-format": {
|
|
233
237
|
"types": "./pipes/date-format/index.d.ts",
|
|
234
238
|
"default": "./fesm2022/cmat-pipes-date-format.mjs"
|
|
235
239
|
},
|
|
236
|
-
"./pipes/group-by": {
|
|
237
|
-
"types": "./pipes/group-by/index.d.ts",
|
|
238
|
-
"default": "./fesm2022/cmat-pipes-group-by.mjs"
|
|
239
|
-
},
|
|
240
240
|
"./pipes/find-by-key": {
|
|
241
241
|
"types": "./pipes/find-by-key/index.d.ts",
|
|
242
242
|
"default": "./fesm2022/cmat-pipes-find-by-key.mjs"
|
|
243
243
|
},
|
|
244
|
-
"./pipes/
|
|
245
|
-
"types": "./pipes/
|
|
246
|
-
"default": "./fesm2022/cmat-pipes-
|
|
244
|
+
"./pipes/group-by": {
|
|
245
|
+
"types": "./pipes/group-by/index.d.ts",
|
|
246
|
+
"default": "./fesm2022/cmat-pipes-group-by.mjs"
|
|
247
|
+
},
|
|
248
|
+
"./services/alert": {
|
|
249
|
+
"types": "./services/alert/index.d.ts",
|
|
250
|
+
"default": "./fesm2022/cmat-services-alert.mjs"
|
|
247
251
|
},
|
|
248
252
|
"./pipes/keys": {
|
|
249
253
|
"types": "./pipes/keys/index.d.ts",
|
|
250
254
|
"default": "./fesm2022/cmat-pipes-keys.mjs"
|
|
251
255
|
},
|
|
256
|
+
"./services/config": {
|
|
257
|
+
"types": "./services/config/index.d.ts",
|
|
258
|
+
"default": "./fesm2022/cmat-services-config.mjs"
|
|
259
|
+
},
|
|
260
|
+
"./pipes/secure": {
|
|
261
|
+
"types": "./pipes/secure/index.d.ts",
|
|
262
|
+
"default": "./fesm2022/cmat-pipes-secure.mjs"
|
|
263
|
+
},
|
|
252
264
|
"./pipes/uppercase": {
|
|
253
265
|
"types": "./pipes/uppercase/index.d.ts",
|
|
254
266
|
"default": "./fesm2022/cmat-pipes-uppercase.mjs"
|
|
255
267
|
},
|
|
256
|
-
"./lib/mock-api": {
|
|
257
|
-
"types": "./lib/mock-api/index.d.ts",
|
|
258
|
-
"default": "./fesm2022/cmat-lib-mock-api.mjs"
|
|
259
|
-
},
|
|
260
|
-
"./services/alert": {
|
|
261
|
-
"types": "./services/alert/index.d.ts",
|
|
262
|
-
"default": "./fesm2022/cmat-services-alert.mjs"
|
|
263
|
-
},
|
|
264
268
|
"./services/confirmation": {
|
|
265
269
|
"types": "./services/confirmation/index.d.ts",
|
|
266
270
|
"default": "./fesm2022/cmat-services-confirmation.mjs"
|
|
267
271
|
},
|
|
268
|
-
"./services/
|
|
269
|
-
"types": "./services/
|
|
270
|
-
"default": "./fesm2022/cmat-services-
|
|
272
|
+
"./services/loading": {
|
|
273
|
+
"types": "./services/loading/index.d.ts",
|
|
274
|
+
"default": "./fesm2022/cmat-services-loading.mjs"
|
|
271
275
|
},
|
|
272
276
|
"./services/data": {
|
|
273
277
|
"types": "./services/data/index.d.ts",
|
|
@@ -281,30 +285,26 @@
|
|
|
281
285
|
"types": "./services/local-storage/index.d.ts",
|
|
282
286
|
"default": "./fesm2022/cmat-services-local-storage.mjs"
|
|
283
287
|
},
|
|
284
|
-
"./services/loading": {
|
|
285
|
-
"types": "./services/loading/index.d.ts",
|
|
286
|
-
"default": "./fesm2022/cmat-services-loading.mjs"
|
|
287
|
-
},
|
|
288
288
|
"./services/media-watcher": {
|
|
289
289
|
"types": "./services/media-watcher/index.d.ts",
|
|
290
290
|
"default": "./fesm2022/cmat-services-media-watcher.mjs"
|
|
291
291
|
},
|
|
292
|
-
"./services/splash-screen": {
|
|
293
|
-
"types": "./services/splash-screen/index.d.ts",
|
|
294
|
-
"default": "./fesm2022/cmat-services-splash-screen.mjs"
|
|
295
|
-
},
|
|
296
292
|
"./services/platform": {
|
|
297
293
|
"types": "./services/platform/index.d.ts",
|
|
298
294
|
"default": "./fesm2022/cmat-services-platform.mjs"
|
|
299
295
|
},
|
|
300
|
-
"./services/
|
|
301
|
-
"types": "./services/
|
|
302
|
-
"default": "./fesm2022/cmat-services-
|
|
296
|
+
"./services/splash-screen": {
|
|
297
|
+
"types": "./services/splash-screen/index.d.ts",
|
|
298
|
+
"default": "./fesm2022/cmat-services-splash-screen.mjs"
|
|
303
299
|
},
|
|
304
300
|
"./services/title": {
|
|
305
301
|
"types": "./services/title/index.d.ts",
|
|
306
302
|
"default": "./fesm2022/cmat-services-title.mjs"
|
|
307
303
|
},
|
|
304
|
+
"./services/translation": {
|
|
305
|
+
"types": "./services/translation/index.d.ts",
|
|
306
|
+
"default": "./fesm2022/cmat-services-translation.mjs"
|
|
307
|
+
},
|
|
308
308
|
"./services/utils": {
|
|
309
309
|
"types": "./services/utils/index.d.ts",
|
|
310
310
|
"default": "./fesm2022/cmat-services-utils.mjs"
|
|
@@ -14,7 +14,7 @@ declare enum CmatMessageSeverity {
|
|
|
14
14
|
warning = "warning",
|
|
15
15
|
wait = "wait"
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
interface ApiResult {
|
|
18
18
|
success: boolean;
|
|
19
19
|
msg: string;
|
|
20
20
|
type: string;
|
|
@@ -69,8 +69,10 @@ declare class CmatAlertService {
|
|
|
69
69
|
logWarning(msg: any): void;
|
|
70
70
|
resetStickyMessage(): void;
|
|
71
71
|
private _showMessageHelper;
|
|
72
|
+
private isApiResult;
|
|
72
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<CmatAlertService, never>;
|
|
73
74
|
static ɵprov: i0.ɵɵInjectableDeclaration<CmatAlertService>;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
export {
|
|
77
|
+
export { CmatAlertDialog, CmatAlertMessage, CmatAlertService, CmatDialogType, CmatMessageSeverity };
|
|
78
|
+
export type { ApiResult };
|