@emartech/angular-translate
Advanced tools
Comparing version 2.5.2 to 3.0.0
@@ -0,4 +1,8 @@ | ||
import { ModuleWithProviders, Provider } from '@angular/core'; | ||
import * as i0 from "@angular/core"; | ||
import * as i1 from "./lib/pipe"; | ||
import * as i2 from "./lib/translate-part.pipe"; | ||
import * as i3 from "./lib/translate-chunk.pipe"; | ||
export * from './lib/service'; | ||
export * from './lib/pipe'; | ||
import { ModuleWithProviders, Provider } from '@angular/core'; | ||
export declare type Translations = { | ||
@@ -10,2 +14,5 @@ [name: string]: string; | ||
static forRoot(providedTranslations?: Provider): ModuleWithProviders<TranslateModule>; | ||
static ɵfac: i0.ɵɵFactoryDef<TranslateModule, never>; | ||
static ɵmod: i0.ɵɵNgModuleDefWithMeta<TranslateModule, [typeof i1.TranslatePipe, typeof i2.TranslatePartPipe, typeof i3.TranslateChunkPipe], never, [typeof i1.TranslatePipe, typeof i2.TranslatePartPipe, typeof i3.TranslateChunkPipe]>; | ||
static ɵinj: i0.ɵɵInjectorDef<TranslateModule>; | ||
} |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
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; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var TranslateModule_1; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./lib/service")); | ||
__export(require("./lib/pipe")); | ||
exports.TranslateModule = exports.translationsFactory = void 0; | ||
const core_1 = require("@angular/core"); | ||
@@ -20,18 +19,26 @@ const pipe_1 = require("./lib/pipe"); | ||
const service_1 = require("./lib/service"); | ||
const i0 = require("@angular/core"); | ||
__exportStar(require("./lib/service"), exports); | ||
__exportStar(require("./lib/pipe"), exports); | ||
function translationsFactory() { return {}; } | ||
exports.translationsFactory = translationsFactory; | ||
let TranslateModule = TranslateModule_1 = class TranslateModule { | ||
class TranslateModule { | ||
static forRoot(providedTranslations = { provide: 'translations', useFactory: translationsFactory }) { | ||
return { | ||
ngModule: TranslateModule_1, | ||
ngModule: TranslateModule, | ||
providers: [service_1.TranslateService, providedTranslations] | ||
}; | ||
} | ||
}; | ||
TranslateModule = TranslateModule_1 = __decorate([ | ||
core_1.NgModule({ | ||
declarations: [pipe_1.TranslatePipe, translate_part_pipe_1.TranslatePartPipe, translate_chunk_pipe_1.TranslateChunkPipe], | ||
exports: [pipe_1.TranslatePipe, translate_part_pipe_1.TranslatePartPipe, translate_chunk_pipe_1.TranslateChunkPipe] | ||
}) | ||
], TranslateModule); | ||
} | ||
exports.TranslateModule = TranslateModule; | ||
TranslateModule.ɵfac = function TranslateModule_Factory(t) { return new (t || TranslateModule)(); }; | ||
TranslateModule.ɵmod = i0.ɵɵdefineNgModule({ type: TranslateModule }); | ||
TranslateModule.ɵinj = i0.ɵɵdefineInjector({}); | ||
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TranslateModule, { declarations: [pipe_1.TranslatePipe, translate_part_pipe_1.TranslatePartPipe, translate_chunk_pipe_1.TranslateChunkPipe], exports: [pipe_1.TranslatePipe, translate_part_pipe_1.TranslatePartPipe, translate_chunk_pipe_1.TranslateChunkPipe] }); })(); | ||
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslateModule, [{ | ||
type: core_1.NgModule, | ||
args: [{ | ||
declarations: [pipe_1.TranslatePipe, translate_part_pipe_1.TranslatePartPipe, translate_chunk_pipe_1.TranslateChunkPipe], | ||
exports: [pipe_1.TranslatePipe, translate_part_pipe_1.TranslatePartPipe, translate_chunk_pipe_1.TranslateChunkPipe] | ||
}] | ||
}], null, null); })(); |
import { TranslateService } from './service'; | ||
import * as i0 from "@angular/core"; | ||
export declare class TranslatePipe { | ||
@@ -6,2 +7,4 @@ private _translateService; | ||
transform(value: string, options?: any[]): string; | ||
static ɵfac: i0.ɵɵFactoryDef<TranslatePipe, never>; | ||
static ɵpipe: i0.ɵɵPipeDefWithMeta<TranslatePipe, "translate">; | ||
} |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
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; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TranslatePipe = void 0; | ||
const core_1 = require("@angular/core"); | ||
const service_1 = require("./service"); | ||
let TranslatePipe = class TranslatePipe { | ||
const i0 = require("@angular/core"); | ||
const i1 = require("./service"); | ||
class TranslatePipe { | ||
constructor(_translateService) { | ||
@@ -21,7 +15,9 @@ this._translateService = _translateService; | ||
} | ||
}; | ||
TranslatePipe = __decorate([ | ||
core_1.Pipe({ name: 'translate' }), | ||
__metadata("design:paramtypes", [service_1.TranslateService]) | ||
], TranslatePipe); | ||
} | ||
exports.TranslatePipe = TranslatePipe; | ||
TranslatePipe.ɵfac = function TranslatePipe_Factory(t) { return new (t || TranslatePipe)(i0.ɵɵdirectiveInject(i1.TranslateService)); }; | ||
TranslatePipe.ɵpipe = i0.ɵɵdefinePipe({ name: "translate", type: TranslatePipe, pure: true }); | ||
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslatePipe, [{ | ||
type: core_1.Pipe, | ||
args: [{ name: 'translate' }] | ||
}], function () { return [{ type: i1.TranslateService }]; }, null); })(); |
@@ -0,1 +1,2 @@ | ||
import * as i0 from "@angular/core"; | ||
export declare class TranslateService { | ||
@@ -17,2 +18,4 @@ private _translations; | ||
private _getDefaultForPart; | ||
static ɵfac: i0.ɵɵFactoryDef<TranslateService, never>; | ||
static ɵprov: i0.ɵɵInjectableDef<TranslateService>; | ||
} |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
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; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TranslateService = void 0; | ||
const core_1 = require("@angular/core"); | ||
const flat_1 = require("flat"); | ||
const sprintf_js_1 = require("sprintf-js"); | ||
let TranslateService = class TranslateService { | ||
const i0 = require("@angular/core"); | ||
class TranslateService { | ||
constructor(_translations) { | ||
@@ -67,8 +57,11 @@ this._translations = _translations; | ||
} | ||
}; | ||
TranslateService = __decorate([ | ||
core_1.Injectable(), | ||
__param(0, core_1.Inject('translations')), | ||
__metadata("design:paramtypes", [Object]) | ||
], TranslateService); | ||
} | ||
exports.TranslateService = TranslateService; | ||
TranslateService.ɵfac = function TranslateService_Factory(t) { return new (t || TranslateService)(i0.ɵɵinject('translations')); }; | ||
TranslateService.ɵprov = i0.ɵɵdefineInjectable({ token: TranslateService, factory: TranslateService.ɵfac }); | ||
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslateService, [{ | ||
type: core_1.Injectable | ||
}], function () { return [{ type: undefined, decorators: [{ | ||
type: core_1.Inject, | ||
args: ['translations'] | ||
}] }]; }, null); })(); |
import { TranslateService } from './service'; | ||
import * as i0 from "@angular/core"; | ||
export declare class TranslateChunkPipe { | ||
@@ -10,2 +11,4 @@ private _translateService; | ||
}; | ||
static ɵfac: i0.ɵɵFactoryDef<TranslateChunkPipe, never>; | ||
static ɵpipe: i0.ɵɵPipeDefWithMeta<TranslateChunkPipe, "translateChunk">; | ||
} |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
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; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TranslateChunkPipe = void 0; | ||
const core_1 = require("@angular/core"); | ||
const service_1 = require("./service"); | ||
let TranslateChunkPipe = class TranslateChunkPipe { | ||
const i0 = require("@angular/core"); | ||
const i1 = require("./service"); | ||
class TranslateChunkPipe { | ||
constructor(translateService) { | ||
@@ -21,7 +15,9 @@ this._translateService = translateService; | ||
} | ||
}; | ||
TranslateChunkPipe = __decorate([ | ||
core_1.Pipe({ name: 'translateChunk' }), | ||
__metadata("design:paramtypes", [service_1.TranslateService]) | ||
], TranslateChunkPipe); | ||
} | ||
exports.TranslateChunkPipe = TranslateChunkPipe; | ||
TranslateChunkPipe.ɵfac = function TranslateChunkPipe_Factory(t) { return new (t || TranslateChunkPipe)(i0.ɵɵdirectiveInject(i1.TranslateService)); }; | ||
TranslateChunkPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "translateChunk", type: TranslateChunkPipe, pure: true }); | ||
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslateChunkPipe, [{ | ||
type: core_1.Pipe, | ||
args: [{ name: 'translateChunk' }] | ||
}], function () { return [{ type: i1.TranslateService }]; }, null); })(); |
import { TranslateService } from './service'; | ||
import * as i0 from "@angular/core"; | ||
export declare class TranslatePartPipe { | ||
@@ -6,2 +7,4 @@ private _translateService; | ||
transform(key: string, part: number): string; | ||
static ɵfac: i0.ɵɵFactoryDef<TranslatePartPipe, never>; | ||
static ɵpipe: i0.ɵɵPipeDefWithMeta<TranslatePartPipe, "translatePart">; | ||
} |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
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; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TranslatePartPipe = void 0; | ||
const core_1 = require("@angular/core"); | ||
const service_1 = require("./service"); | ||
let TranslatePartPipe = class TranslatePartPipe { | ||
const i0 = require("@angular/core"); | ||
const i1 = require("./service"); | ||
class TranslatePartPipe { | ||
constructor(translateService) { | ||
@@ -21,7 +15,9 @@ this._translateService = translateService; | ||
} | ||
}; | ||
TranslatePartPipe = __decorate([ | ||
core_1.Pipe({ name: 'translatePart' }), | ||
__metadata("design:paramtypes", [service_1.TranslateService]) | ||
], TranslatePartPipe); | ||
} | ||
exports.TranslatePartPipe = TranslatePartPipe; | ||
TranslatePartPipe.ɵfac = function TranslatePartPipe_Factory(t) { return new (t || TranslatePartPipe)(i0.ɵɵdirectiveInject(i1.TranslateService)); }; | ||
TranslatePartPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "translatePart", type: TranslatePartPipe, pure: true }); | ||
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslatePartPipe, [{ | ||
type: core_1.Pipe, | ||
args: [{ name: 'translatePart' }] | ||
}], function () { return [{ type: i1.TranslateService }]; }, null); })(); |
@@ -28,18 +28,18 @@ { | ||
"engines": { | ||
"node": ">=10.18.0 <15.0.0", | ||
"yarn": ">=1.22.4 <2" | ||
"node": ">=10.18.0 <15.0.0" | ||
}, | ||
"dependencies": { | ||
"@angular/compiler": "8.2.14", | ||
"@angular/core": "8.2.14", | ||
"@angular/compiler": "11.2.6", | ||
"@angular/core": "11.2.6", | ||
"flat": "5.0.2", | ||
"sprintf-js": "1.1.2", | ||
"zone.js": "0.9.1" | ||
"zone.js": "0.11.4" | ||
}, | ||
"peerDependencies": { | ||
"@angular/core": ">=8.0.0" | ||
"@angular/core": ">=11.0.0", | ||
"@angular/compiler": ">=11.0.0" | ||
}, | ||
"devDependencies": { | ||
"@angular/cli": "8.3.29", | ||
"@angular/compiler-cli": "8.2.14", | ||
"@angular/cli": "11.2.5", | ||
"@angular/compiler-cli": "11.2.6", | ||
"@types/chai": "4.2.15", | ||
@@ -55,5 +55,5 @@ "@types/flat": "5.0.1", | ||
"ts-node": "8.10.2", | ||
"typescript": "3.5.3" | ||
"typescript": "4.1.5" | ||
}, | ||
"version": "2.5.2" | ||
"version": "3.0.0" | ||
} |
@@ -20,3 +20,6 @@ { | ||
"./lib/*.ts" | ||
] | ||
], | ||
"angularCompilerOptions": { | ||
// "enableIvy": false | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
268
14820
7
16
+ Added@angular/compiler@11.2.6(transitive)
+ Added@angular/core@11.2.6(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedzone.js@0.11.4(transitive)
- Removed@angular/compiler@8.2.14(transitive)
- Removed@angular/core@8.2.14(transitive)
- Removedzone.js@0.9.1(transitive)
Updated@angular/compiler@11.2.6
Updated@angular/core@11.2.6
Updatedzone.js@0.11.4