Comparing version 0.1.8 to 0.1.9
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('observable-input')) : | ||
typeof define === 'function' && define.amd ? define('ng-sugar', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', 'observable-input'], factory) : | ||
(global = global || self, factory(global['ng-sugar'] = {}, global.ng.core, global.rxjs, global.rxjs.operators, global.observableInput)); | ||
}(this, (function (exports, core, rxjs, operators, observableInput) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('observable-input')) : | ||
typeof define === 'function' && define.amd ? define('ng-sugar', ['@angular/core', 'rxjs', 'rxjs/operators', 'observable-input'], factory) : | ||
(global = global || self, global['ng-sugar'] = factory(global.ng.core, global.rxjs, global.rxjs.operators, global.observableInput)); | ||
}(this, (function (core, rxjs, operators, observableInput) { 'use strict'; | ||
var onChangesKey = Symbol('onChanges'); | ||
var onInitKey = Symbol('onInit'); | ||
var doCheckKey = Symbol('doCheck'); | ||
var afterContentInitKey = Symbol('afterContentInit'); | ||
var afterContentCheckedKey = Symbol('afterContentChecked'); | ||
var afterViewInitKey = Symbol('afterViewInit'); | ||
var afterViewCheckedKey = Symbol('afterViewChecked'); | ||
var onDestroyKey = Symbol('onDestroy'); | ||
// originated from https://stackoverflow.com/a/46572739/2380455 | ||
// I had to go with @Component decorator as the compiler will brutally complain | ||
// with https://stackoverflow.com/a/62613494/2380455 if this is not decorated | ||
// tslint:disable: no-conflicting-lifecycle directive-class-suffix | ||
var ObservableComponent = /** @class */ (function () { | ||
function ObservableComponent() { | ||
} | ||
Object.defineProperty(ObservableComponent.prototype, "onChanges", { | ||
// all observables will complete on component destruction | ||
get: function () { | ||
return this.getObservable(onChangesKey).pipe(operators.takeUntil(this.onDestroy)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "onInit", { | ||
get: function () { | ||
return this.getObservable(onInitKey).pipe(operators.takeUntil(this.onDestroy), operators.take(1)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "doCheck", { | ||
get: function () { | ||
return this.getObservable(doCheckKey).pipe(operators.takeUntil(this.onDestroy)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "afterContentInit", { | ||
get: function () { | ||
return this.getObservable(afterContentInitKey).pipe(operators.takeUntil(this.onDestroy), operators.take(1)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "afterContentChecked", { | ||
get: function () { | ||
return this.getObservable(afterContentCheckedKey).pipe(operators.takeUntil(this.onDestroy)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "afterViewInit", { | ||
get: function () { | ||
return this.getObservable(afterViewInitKey).pipe(operators.takeUntil(this.onDestroy), operators.take(1)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "afterViewChecked", { | ||
get: function () { | ||
return this.getObservable(afterViewCheckedKey).pipe(operators.takeUntil(this.onDestroy)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "onDestroy", { | ||
get: function () { | ||
return this.getObservable(onDestroyKey).pipe(operators.take(1)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
ObservableComponent.prototype.ngOnChanges = function (changes) { this.emit(onChangesKey, changes); }; | ||
ObservableComponent.prototype.ngOnInit = function () { this.emit(onInitKey); }; | ||
ObservableComponent.prototype.ngDoCheck = function () { this.emit(doCheckKey); }; | ||
ObservableComponent.prototype.ngAfterContentInit = function () { this.emit(afterContentInitKey); }; | ||
ObservableComponent.prototype.ngAfterContentChecked = function () { this.emit(afterContentCheckedKey); }; | ||
ObservableComponent.prototype.ngAfterViewInit = function () { this.emit(afterViewInitKey); }; | ||
ObservableComponent.prototype.ngAfterViewChecked = function () { this.emit(afterViewCheckedKey); }; | ||
ObservableComponent.prototype.ngOnDestroy = function () { this.emit(onDestroyKey); }; | ||
ObservableComponent.prototype.getObservable = function (key) { | ||
return (this[key] || (this[key] = new rxjs.Subject())).asObservable(); | ||
}; | ||
ObservableComponent.prototype.emit = function (key, value) { | ||
var subject = this[key]; | ||
if (!subject) { | ||
return; | ||
} | ||
subject.next(value); | ||
}; | ||
return ObservableComponent; | ||
}()); | ||
ObservableComponent.decorators = [ | ||
{ type: core.Component, args: [{ | ||
selector: 'lib-observable-component', | ||
template: '' | ||
},] } | ||
]; | ||
ObservableComponent.ctorParameters = function () { return []; }; | ||
core = core && Object.prototype.hasOwnProperty.call(core, 'default') ? core['default'] : core; | ||
rxjs = rxjs && Object.prototype.hasOwnProperty.call(rxjs, 'default') ? rxjs['default'] : rxjs; | ||
operators = operators && Object.prototype.hasOwnProperty.call(operators, 'default') ? operators['default'] : operators; | ||
observableInput = observableInput && Object.prototype.hasOwnProperty.call(observableInput, 'default') ? observableInput['default'] : observableInput; | ||
var NgLetDirective = /** @class */ (function () { | ||
function NgLetDirective(viewContainer, templateRef) { | ||
this.letContext = { ngLet: null }; | ||
viewContainer.createEmbeddedView(templateRef, this.letContext); | ||
} | ||
Object.defineProperty(NgLetDirective.prototype, "ngLet", { | ||
set: function (value) { | ||
this.letContext.ngLet = value; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return NgLetDirective; | ||
}()); | ||
NgLetDirective.decorators = [ | ||
{ type: core.Directive, args: [{ | ||
selector: '[ngLet]' | ||
},] } | ||
]; | ||
NgLetDirective.ctorParameters = function () { return [ | ||
{ type: core.ViewContainerRef }, | ||
{ type: core.TemplateRef } | ||
]; }; | ||
NgLetDirective.propDecorators = { | ||
ngLet: [{ type: core.Input }] | ||
}; | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
function createCommonjsModule(fn, basedir, module) { | ||
return module = { | ||
path: basedir, | ||
exports: {}, | ||
require: function (path, base) { | ||
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); | ||
} | ||
}, fn(module, module.exports), module.exports; | ||
} | ||
function getCjsExportFromNamespace(n) { | ||
return n && n['default'] || n; | ||
} | ||
function commonjsRequire() { | ||
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); | ||
} | ||
var NgSugarModule = /** @class */ (function () { | ||
function NgSugarModule() { | ||
} | ||
return NgSugarModule; | ||
}()); | ||
NgSugarModule.decorators = [ | ||
{ type: core.NgModule, args: [{ | ||
declarations: [ | ||
ObservableComponent, | ||
NgLetDirective | ||
], | ||
imports: [], | ||
exports: [ | ||
ObservableComponent, | ||
NgLetDirective | ||
] | ||
},] } | ||
]; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
/* | ||
* Public API Surface of ng-sugar | ||
*/ | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) | ||
if (b.hasOwnProperty(p)) | ||
d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
function __extends(d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
} | ||
var __assign = function () { | ||
__assign = Object.assign || function __assign(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) | ||
if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
function __rest(s, e) { | ||
var t = {}; | ||
for (var p in s) | ||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
} | ||
function __decorate(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; | ||
} | ||
function __param(paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); }; | ||
} | ||
function __metadata(metadataKey, metadataValue) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") | ||
return Reflect.metadata(metadataKey, metadataValue); | ||
} | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { | ||
step(generator.next(value)); | ||
} | ||
catch (e) { | ||
reject(e); | ||
} } | ||
function rejected(value) { try { | ||
step(generator["throw"](value)); | ||
} | ||
catch (e) { | ||
reject(e); | ||
} } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
} | ||
function __generator(thisArg, body) { | ||
var _ = { label: 0, sent: function () { if (t[0] & 1) | ||
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) | ||
throw new TypeError("Generator is already executing."); | ||
while (_) | ||
try { | ||
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; | ||
if (y = 0, t) | ||
op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: | ||
case 1: | ||
t = op; | ||
break; | ||
case 4: | ||
_.label++; | ||
return { value: op[1], done: false }; | ||
case 5: | ||
_.label++; | ||
y = op[1]; | ||
op = [0]; | ||
continue; | ||
case 7: | ||
op = _.ops.pop(); | ||
_.trys.pop(); | ||
continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { | ||
_ = 0; | ||
continue; | ||
} | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { | ||
_.label = op[1]; | ||
break; | ||
} | ||
if (op[0] === 6 && _.label < t[1]) { | ||
_.label = t[1]; | ||
t = op; | ||
break; | ||
} | ||
if (t && _.label < t[2]) { | ||
_.label = t[2]; | ||
_.ops.push(op); | ||
break; | ||
} | ||
if (t[2]) | ||
_.ops.pop(); | ||
_.trys.pop(); | ||
continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} | ||
catch (e) { | ||
op = [6, e]; | ||
y = 0; | ||
} | ||
finally { | ||
f = t = 0; | ||
} | ||
if (op[0] & 5) | ||
throw op[1]; | ||
return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
} | ||
var __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]; | ||
}); | ||
function __exportStar(m, exports) { | ||
for (var p in m) | ||
if (p !== "default" && !exports.hasOwnProperty(p)) | ||
__createBinding(exports, m, p); | ||
} | ||
function __values(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) | ||
return m.call(o); | ||
if (o && typeof o.length === "number") | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) | ||
o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
} | ||
function __read(o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) | ||
return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) | ||
ar.push(r.value); | ||
} | ||
catch (error) { | ||
e = { error: error }; | ||
} | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) | ||
m.call(i); | ||
} | ||
finally { | ||
if (e) | ||
throw e.error; | ||
} | ||
} | ||
return ar; | ||
} | ||
function __spread() { | ||
for (var ar = [], i = 0; i < arguments.length; i++) | ||
ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
} | ||
function __spreadArrays() { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) | ||
s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
} | ||
; | ||
function __await(v) { | ||
return this instanceof __await ? (this.v = v, this) : new __await(v); | ||
} | ||
function __asyncGenerator(thisArg, _arguments, generator) { | ||
if (!Symbol.asyncIterator) | ||
throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; | ||
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); }); }; } | ||
function resume(n, v) { try { | ||
step(g[n](v)); | ||
} | ||
catch (e) { | ||
settle(q[0][3], e); | ||
} } | ||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } | ||
function fulfill(value) { resume("next", value); } | ||
function reject(value) { resume("throw", value); } | ||
function settle(f, v) { if (f(v), q.shift(), q.length) | ||
resume(q[0][0], q[0][1]); } | ||
} | ||
function __asyncDelegator(o) { | ||
var i, p; | ||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; | ||
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; } | ||
} | ||
function __asyncValues(o) { | ||
if (!Symbol.asyncIterator) | ||
throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var m = o[Symbol.asyncIterator], i; | ||
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); | ||
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); }); }; } | ||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); } | ||
} | ||
function __makeTemplateObject(cooked, raw) { | ||
if (Object.defineProperty) { | ||
Object.defineProperty(cooked, "raw", { value: raw }); | ||
} | ||
else { | ||
cooked.raw = raw; | ||
} | ||
return cooked; | ||
} | ||
; | ||
var __setModuleDefault = Object.create ? (function (o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function (o, v) { | ||
o["default"] = v; | ||
}; | ||
function __importStar(mod) { | ||
if (mod && mod.__esModule) | ||
return mod; | ||
var result = {}; | ||
if (mod != null) | ||
for (var k in mod) | ||
if (Object.hasOwnProperty.call(mod, k)) | ||
__createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
} | ||
function __importDefault(mod) { | ||
return (mod && mod.__esModule) ? mod : { default: mod }; | ||
} | ||
function __classPrivateFieldGet(receiver, privateMap) { | ||
if (!privateMap.has(receiver)) { | ||
throw new TypeError("attempted to get private field on non-instance"); | ||
} | ||
return privateMap.get(receiver); | ||
} | ||
function __classPrivateFieldSet(receiver, privateMap, value) { | ||
if (!privateMap.has(receiver)) { | ||
throw new TypeError("attempted to set private field on non-instance"); | ||
} | ||
privateMap.set(receiver, value); | ||
return value; | ||
} | ||
Object.keys(observableInput).forEach(function (k) { | ||
if (k !== 'default') Object.defineProperty(exports, k, { | ||
enumerable: true, | ||
get: function () { | ||
return observableInput[k]; | ||
} | ||
}); | ||
}); | ||
exports.NgSugarModule = NgSugarModule; | ||
exports.ObservableComponent = ObservableComponent; | ||
exports.ɵa = NgLetDirective; | ||
var tslib_es6 = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
__extends: __extends, | ||
get __assign () { return __assign; }, | ||
__rest: __rest, | ||
__decorate: __decorate, | ||
__param: __param, | ||
__metadata: __metadata, | ||
__awaiter: __awaiter, | ||
__generator: __generator, | ||
__createBinding: __createBinding, | ||
__exportStar: __exportStar, | ||
__values: __values, | ||
__read: __read, | ||
__spread: __spread, | ||
__spreadArrays: __spreadArrays, | ||
__await: __await, | ||
__asyncGenerator: __asyncGenerator, | ||
__asyncDelegator: __asyncDelegator, | ||
__asyncValues: __asyncValues, | ||
__makeTemplateObject: __makeTemplateObject, | ||
__importStar: __importStar, | ||
__importDefault: __importDefault, | ||
__classPrivateFieldGet: __classPrivateFieldGet, | ||
__classPrivateFieldSet: __classPrivateFieldSet | ||
}); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var observableComponent = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ObservableComponent = void 0; | ||
var onChangesKey = Symbol('onChanges'); | ||
var onInitKey = Symbol('onInit'); | ||
var doCheckKey = Symbol('doCheck'); | ||
var afterContentInitKey = Symbol('afterContentInit'); | ||
var afterContentCheckedKey = Symbol('afterContentChecked'); | ||
var afterViewInitKey = Symbol('afterViewInit'); | ||
var afterViewCheckedKey = Symbol('afterViewChecked'); | ||
var onDestroyKey = Symbol('onDestroy'); | ||
// originated from https://stackoverflow.com/a/46572739/2380455 | ||
// I had to go with @Component decorator as the compiler will brutally complain | ||
// with https://stackoverflow.com/a/62613494/2380455 if this is not decorated | ||
var ObservableComponent = /** @class */ (function () { | ||
function ObservableComponent() { | ||
} | ||
Object.defineProperty(ObservableComponent.prototype, "onChanges", { | ||
// all observables will complete on component destruction | ||
get: function () { | ||
return this.getObservable(onChangesKey).pipe(operators.takeUntil(this.onDestroy)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "onInit", { | ||
get: function () { | ||
return this.getObservable(onInitKey).pipe(operators.takeUntil(this.onDestroy), operators.take(1)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "doCheck", { | ||
get: function () { | ||
return this.getObservable(doCheckKey).pipe(operators.takeUntil(this.onDestroy)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "afterContentInit", { | ||
get: function () { | ||
return this.getObservable(afterContentInitKey).pipe(operators.takeUntil(this.onDestroy), operators.take(1)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "afterContentChecked", { | ||
get: function () { | ||
return this.getObservable(afterContentCheckedKey).pipe(operators.takeUntil(this.onDestroy)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "afterViewInit", { | ||
get: function () { | ||
return this.getObservable(afterViewInitKey).pipe(operators.takeUntil(this.onDestroy), operators.take(1)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "afterViewChecked", { | ||
get: function () { | ||
return this.getObservable(afterViewCheckedKey).pipe(operators.takeUntil(this.onDestroy)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ObservableComponent.prototype, "onDestroy", { | ||
get: function () { | ||
return this.getObservable(onDestroyKey).pipe(operators.take(1)); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
ObservableComponent.prototype.ngOnChanges = function (changes) { this.emit(onChangesKey, changes); }; | ||
ObservableComponent.prototype.ngOnInit = function () { this.emit(onInitKey); }; | ||
ObservableComponent.prototype.ngDoCheck = function () { this.emit(doCheckKey); }; | ||
ObservableComponent.prototype.ngAfterContentInit = function () { this.emit(afterContentInitKey); }; | ||
ObservableComponent.prototype.ngAfterContentChecked = function () { this.emit(afterContentCheckedKey); }; | ||
ObservableComponent.prototype.ngAfterViewInit = function () { this.emit(afterViewInitKey); }; | ||
ObservableComponent.prototype.ngAfterViewChecked = function () { this.emit(afterViewCheckedKey); }; | ||
ObservableComponent.prototype.ngOnDestroy = function () { this.emit(onDestroyKey); }; | ||
ObservableComponent.prototype.getObservable = function (key) { | ||
return (this[key] || (this[key] = new rxjs.Subject())).asObservable(); | ||
}; | ||
ObservableComponent.prototype.emit = function (key, value) { | ||
var subject = this[key]; | ||
if (!subject) { | ||
return; | ||
} | ||
subject.next(value); | ||
}; | ||
return ObservableComponent; | ||
}()); | ||
exports.ObservableComponent = ObservableComponent; | ||
ObservableComponent.decorators = [ | ||
{ type: core.Component, args: [{ | ||
selector: 'lib-observable-component', | ||
template: '' | ||
},] } | ||
]; | ||
ObservableComponent.ctorParameters = function () { return []; }; | ||
}); | ||
var ngLet_directive = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NgLetDirective = void 0; | ||
var NgLetDirective = /** @class */ (function () { | ||
function NgLetDirective(viewContainer, templateRef) { | ||
this.letContext = { ngLet: null }; | ||
viewContainer.createEmbeddedView(templateRef, this.letContext); | ||
} | ||
Object.defineProperty(NgLetDirective.prototype, "ngLet", { | ||
set: function (value) { | ||
this.letContext.ngLet = value; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return NgLetDirective; | ||
}()); | ||
exports.NgLetDirective = NgLetDirective; | ||
NgLetDirective.decorators = [ | ||
{ type: core.Directive, args: [{ | ||
selector: '[ngLet]' | ||
},] } | ||
]; | ||
NgLetDirective.ctorParameters = function () { return [ | ||
{ type: core.ViewContainerRef }, | ||
{ type: core.TemplateRef } | ||
]; }; | ||
NgLetDirective.propDecorators = { | ||
ngLet: [{ type: core.Input }] | ||
}; | ||
}); | ||
var ngSugar_module = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NgSugarModule = void 0; | ||
var NgSugarModule = /** @class */ (function () { | ||
function NgSugarModule() { | ||
} | ||
return NgSugarModule; | ||
}()); | ||
exports.NgSugarModule = NgSugarModule; | ||
NgSugarModule.decorators = [ | ||
{ type: core.NgModule, args: [{ | ||
declarations: [ | ||
observableComponent.ObservableComponent, | ||
ngLet_directive.NgLetDirective | ||
], | ||
imports: [], | ||
exports: [ | ||
observableComponent.ObservableComponent, | ||
ngLet_directive.NgLetDirective | ||
] | ||
},] } | ||
]; | ||
}); | ||
var publicApi = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
/* | ||
* Public API Surface of ng-sugar | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
tslib_es6.__exportStar(ngSugar_module, exports); | ||
tslib_es6.__exportStar(observableComponent, exports); | ||
tslib_es6.__exportStar(observableInput, exports); | ||
}); | ||
var ngSugar = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
tslib_es6.__exportStar(publicApi, exports); | ||
Object.defineProperty(exports, "\u0275a", { enumerable: true, get: function () { return ngLet_directive.NgLetDirective; } }); | ||
}); | ||
return ngSugar; | ||
}))); | ||
//# sourceMappingURL=ng-sugar.umd.js.map |
@@ -1,2 +0,16 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("observable-input")):"function"==typeof define&&define.amd?define("ng-sugar",["exports","@angular/core","rxjs","rxjs/operators","observable-input"],t):t((e=e||self)["ng-sugar"]={},e.ng.core,e.rxjs,e.rxjs.operators,e.observableInput)}(this,(function(e,t,n,r,o){"use strict";var i=Symbol("onChanges"),a=Symbol("onInit"),p=Symbol("doCheck"),s=Symbol("afterContentInit"),u=Symbol("afterContentChecked"),c=Symbol("afterViewInit"),f=Symbol("afterViewChecked"),b=Symbol("onDestroy"),l=function(){function e(){}return Object.defineProperty(e.prototype,"onChanges",{get:function(){return this.getObservable(i).pipe(r.takeUntil(this.onDestroy))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onInit",{get:function(){return this.getObservable(a).pipe(r.takeUntil(this.onDestroy),r.take(1))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doCheck",{get:function(){return this.getObservable(p).pipe(r.takeUntil(this.onDestroy))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"afterContentInit",{get:function(){return this.getObservable(s).pipe(r.takeUntil(this.onDestroy),r.take(1))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"afterContentChecked",{get:function(){return this.getObservable(u).pipe(r.takeUntil(this.onDestroy))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"afterViewInit",{get:function(){return this.getObservable(c).pipe(r.takeUntil(this.onDestroy),r.take(1))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"afterViewChecked",{get:function(){return this.getObservable(f).pipe(r.takeUntil(this.onDestroy))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDestroy",{get:function(){return this.getObservable(b).pipe(r.take(1))},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){this.emit(i,e)},e.prototype.ngOnInit=function(){this.emit(a)},e.prototype.ngDoCheck=function(){this.emit(p)},e.prototype.ngAfterContentInit=function(){this.emit(s)},e.prototype.ngAfterContentChecked=function(){this.emit(u)},e.prototype.ngAfterViewInit=function(){this.emit(c)},e.prototype.ngAfterViewChecked=function(){this.emit(f)},e.prototype.ngOnDestroy=function(){this.emit(b)},e.prototype.getObservable=function(e){return(this[e]||(this[e]=new n.Subject)).asObservable()},e.prototype.emit=function(e,t){var n=this[e];n&&n.next(t)},e}();l.decorators=[{type:t.Component,args:[{selector:"lib-observable-component",template:""}]}],l.ctorParameters=function(){return[]};var y=function(){function e(e,t){this.letContext={ngLet:null},e.createEmbeddedView(t,this.letContext)}return Object.defineProperty(e.prototype,"ngLet",{set:function(e){this.letContext.ngLet=e},enumerable:!1,configurable:!0}),e}();y.decorators=[{type:t.Directive,args:[{selector:"[ngLet]"}]}],y.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef}]},y.propDecorators={ngLet:[{type:t.Input}]};var g=function(){};g.decorators=[{type:t.NgModule,args:[{declarations:[l,y],imports:[],exports:[l,y]}]}],Object.keys(o).forEach((function(t){"default"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})),e.NgSugarModule=g,e.ObservableComponent=l,e.ɵa=y,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("observable-input")):"function"==typeof define&&define.amd?define("ng-sugar",["@angular/core","rxjs","rxjs/operators","observable-input"],t):(e=e||self)["ng-sugar"]=t(e.ng.core,e.rxjs,e.rxjs.operators,e.observableInput)}(this,(function(e,t,n,r){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n,r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")} | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */(null==t&&n.path)}},n.exports),n.exports}var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var u=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function l(e){return this instanceof l?(this.v=e,this):new l(e)}var p=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};var s=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return a},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},__decorate:function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},__createBinding:u,__exportStar:function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||u(t,e,n)},__values:c,__read:f,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r},__await:l,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof l?Promise.resolve(n.value.v).then(c,f):p(i[0][2],n)}catch(e){p(i[0][3],e)}var n}function c(e){u("next",e)}function f(e){u("throw",e)}function p(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:l(e[r](t)),done:"return"===r}:o?o(t):t}:o}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=c(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&u(t,e,n);return p(t,e),t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}),y=o((function(r,o){Object.defineProperty(o,"__esModule",{value:!0}),o.ObservableComponent=void 0;var i=Symbol("onChanges"),a=Symbol("onInit"),u=Symbol("doCheck"),c=Symbol("afterContentInit"),f=Symbol("afterContentChecked"),l=Symbol("afterViewInit"),p=Symbol("afterViewChecked"),s=Symbol("onDestroy"),y=function(){function e(){}return Object.defineProperty(e.prototype,"onChanges",{get:function(){return this.getObservable(i).pipe(n.takeUntil(this.onDestroy))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onInit",{get:function(){return this.getObservable(a).pipe(n.takeUntil(this.onDestroy),n.take(1))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doCheck",{get:function(){return this.getObservable(u).pipe(n.takeUntil(this.onDestroy))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"afterContentInit",{get:function(){return this.getObservable(c).pipe(n.takeUntil(this.onDestroy),n.take(1))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"afterContentChecked",{get:function(){return this.getObservable(f).pipe(n.takeUntil(this.onDestroy))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"afterViewInit",{get:function(){return this.getObservable(l).pipe(n.takeUntil(this.onDestroy),n.take(1))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"afterViewChecked",{get:function(){return this.getObservable(p).pipe(n.takeUntil(this.onDestroy))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDestroy",{get:function(){return this.getObservable(s).pipe(n.take(1))},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){this.emit(i,e)},e.prototype.ngOnInit=function(){this.emit(a)},e.prototype.ngDoCheck=function(){this.emit(u)},e.prototype.ngAfterContentInit=function(){this.emit(c)},e.prototype.ngAfterContentChecked=function(){this.emit(f)},e.prototype.ngAfterViewInit=function(){this.emit(l)},e.prototype.ngAfterViewChecked=function(){this.emit(p)},e.prototype.ngOnDestroy=function(){this.emit(s)},e.prototype.getObservable=function(e){return(this[e]||(this[e]=new t.Subject)).asObservable()},e.prototype.emit=function(e,t){var n=this[e];n&&n.next(t)},e}();o.ObservableComponent=y,y.decorators=[{type:e.Component,args:[{selector:"lib-observable-component",template:""}]}],y.ctorParameters=function(){return[]}})),b=o((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.NgLetDirective=void 0;var r=function(){function e(e,t){this.letContext={ngLet:null},e.createEmbeddedView(t,this.letContext)}return Object.defineProperty(e.prototype,"ngLet",{set:function(e){this.letContext.ngLet=e},enumerable:!1,configurable:!0}),e}();n.NgLetDirective=r,r.decorators=[{type:e.Directive,args:[{selector:"[ngLet]"}]}],r.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.TemplateRef}]},r.propDecorators={ngLet:[{type:e.Input}]}})),d=o((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.NgSugarModule=void 0;var r=function(){};n.NgSugarModule=r,r.decorators=[{type:e.NgModule,args:[{declarations:[y.ObservableComponent,b.NgLetDirective],imports:[],exports:[y.ObservableComponent,b.NgLetDirective]}]}]})),h=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),s.__exportStar(d,t),s.__exportStar(y,t),s.__exportStar(r,t)}));return o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),s.__exportStar(h,t),Object.defineProperty(t,"ɵa",{enumerable:!0,get:function(){return b.NgLetDirective}})}))})); | ||
//# sourceMappingURL=ng-sugar.umd.min.js.map |
@@ -1,3 +0,6 @@ | ||
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core'; | ||
export class NgLetDirective { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NgLetDirective = void 0; | ||
const core_1 = require("@angular/core"); | ||
class NgLetDirective { | ||
constructor(viewContainer, templateRef) { | ||
@@ -11,4 +14,5 @@ this.letContext = { ngLet: null }; | ||
} | ||
exports.NgLetDirective = NgLetDirective; | ||
NgLetDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
{ type: core_1.Directive, args: [{ | ||
selector: '[ngLet]' | ||
@@ -18,8 +22,8 @@ },] } | ||
NgLetDirective.ctorParameters = () => [ | ||
{ type: ViewContainerRef }, | ||
{ type: TemplateRef } | ||
{ type: core_1.ViewContainerRef }, | ||
{ type: core_1.TemplateRef } | ||
]; | ||
NgLetDirective.propDecorators = { | ||
ngLet: [{ type: Input }] | ||
ngLet: [{ type: core_1.Input }] | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctbGV0LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25nLXN1Z2FyL3NyYy9saWIvbmctbGV0LmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLEtBQUssRUFBRSxXQUFXLEVBQUUsZ0JBQWdCLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFTOUUsTUFBTSxPQUFPLGNBQWM7SUFHdkIsWUFBWSxhQUErQixFQUFFLFdBQXVDO1FBRjVFLGVBQVUsR0FBa0IsRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFTLENBQUM7UUFHdkQsYUFBYSxDQUF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6IG51bGwgfSBhcyBhbnk7XG5cbiAgICBjb25zdHJ1Y3Rvcih2aWV3Q29udGFpbmVyOiBWaWV3Q29udGFpbmVyUmVmLCB0ZW1wbGF0ZVJlZjogVGVtcGxhdGVSZWY8TGV0Q29udGV4dDxUPj4pIHtcbiAgICAgICAgdmlld0NvbnRhaW5lci5jcmVhdGVFbWJlZGRlZFZpZXcodGVtcGxhdGVSZWYsIHRoaXMubGV0Q29udGV4dCk7XG4gICAgfVxuXG4gICAgQElucHV0KClcbiAgICBzZXQgbmdMZXQodmFsdWU6IFQpIHtcbiAgICAgICAgdGhpcy5sZXRDb250ZXh0Lm5nTGV0ID0gdmFsdWU7XG4gICAgfVxufVxuIl19 |
@@ -1,19 +0,23 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { ObservableComponent } from './observable-component'; | ||
import { NgLetDirective } from './ng-let.directive'; | ||
export class NgSugarModule { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NgSugarModule = void 0; | ||
const core_1 = require("@angular/core"); | ||
const observable_component_1 = require("./observable-component"); | ||
const ng_let_directive_1 = require("./ng-let.directive"); | ||
class NgSugarModule { | ||
} | ||
exports.NgSugarModule = NgSugarModule; | ||
NgSugarModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
{ type: core_1.NgModule, args: [{ | ||
declarations: [ | ||
ObservableComponent, | ||
NgLetDirective | ||
observable_component_1.ObservableComponent, | ||
ng_let_directive_1.NgLetDirective | ||
], | ||
imports: [], | ||
exports: [ | ||
ObservableComponent, | ||
NgLetDirective | ||
observable_component_1.ObservableComponent, | ||
ng_let_directive_1.NgLetDirective | ||
] | ||
},] } | ||
]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctc3VnYXIubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmctc3VnYXIvc3JjL2xpYi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ZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmctc3VnYXIvc3JjL2xpYi9uZy1zdWdhci5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsd0NBQXlDO0FBQ3pDLGlFQUEyRDtBQUMzRCx5REFBb0Q7QUFFcEQsTUFXYSxhQUFhOztBQVgxQixzQ0FXNkI7O1lBWDVCLGVBQVEsU0FBQztnQkFDUixZQUFZLEVBQUU7b0JBQ1osMENBQW1CO29CQUNuQixpQ0FBYztpQkFDZjtnQkFDRCxPQUFPLEVBQUUsRUFBRTtnQkFDWCxPQUFPLEVBQUU7b0JBQ1AsMENBQW1CO29CQUNuQixpQ0FBYztpQkFDZjthQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7T2JzZXJ2YWJsZUNvbXBvbmVudH0gZnJvbSAnLi9vYnNlcnZhYmxlLWNvbXBvbmVudCc7XG5pbXBvcnQgeyBOZ0xldERpcmVjdGl2ZSB9IGZyb20gJy4vbmctbGV0LmRpcmVjdGl2ZSc7XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW1xuICAgIE9ic2VydmFibGVDb21wb25lbnQsXG4gICAgTmdMZXREaXJlY3RpdmVcbiAgXSxcbiAgaW1wb3J0czogW10sXG4gIGV4cG9ydHM6IFtcbiAgICBPYnNlcnZhYmxlQ29tcG9uZW50LFxuICAgIE5nTGV0RGlyZWN0aXZlXG4gIF1cbn0pXG5leHBvcnQgY2xhc3MgTmdTdWdhck1vZHVsZSB7fVxuIl19 |
@@ -1,4 +0,7 @@ | ||
import { Component } from '@angular/core'; | ||
import { Subject } from 'rxjs'; | ||
import { takeUntil, take } from 'rxjs/operators'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ObservableComponent = void 0; | ||
const core_1 = require("@angular/core"); | ||
const rxjs_1 = require("rxjs"); | ||
const operators_1 = require("rxjs/operators"); | ||
const onChangesKey = Symbol('onChanges'); | ||
@@ -15,29 +18,28 @@ const onInitKey = Symbol('onInit'); | ||
// with https://stackoverflow.com/a/62613494/2380455 if this is not decorated | ||
// tslint:disable: no-conflicting-lifecycle directive-class-suffix | ||
export class ObservableComponent { | ||
class ObservableComponent { | ||
constructor() { } | ||
// all observables will complete on component destruction | ||
get onChanges() { | ||
return this.getObservable(onChangesKey).pipe(takeUntil(this.onDestroy)); | ||
return this.getObservable(onChangesKey).pipe(operators_1.takeUntil(this.onDestroy)); | ||
} | ||
get onInit() { | ||
return this.getObservable(onInitKey).pipe(takeUntil(this.onDestroy), take(1)); | ||
return this.getObservable(onInitKey).pipe(operators_1.takeUntil(this.onDestroy), operators_1.take(1)); | ||
} | ||
get doCheck() { | ||
return this.getObservable(doCheckKey).pipe(takeUntil(this.onDestroy)); | ||
return this.getObservable(doCheckKey).pipe(operators_1.takeUntil(this.onDestroy)); | ||
} | ||
get afterContentInit() { | ||
return this.getObservable(afterContentInitKey).pipe(takeUntil(this.onDestroy), take(1)); | ||
return this.getObservable(afterContentInitKey).pipe(operators_1.takeUntil(this.onDestroy), operators_1.take(1)); | ||
} | ||
get afterContentChecked() { | ||
return this.getObservable(afterContentCheckedKey).pipe(takeUntil(this.onDestroy)); | ||
return this.getObservable(afterContentCheckedKey).pipe(operators_1.takeUntil(this.onDestroy)); | ||
} | ||
get afterViewInit() { | ||
return this.getObservable(afterViewInitKey).pipe(takeUntil(this.onDestroy), take(1)); | ||
return this.getObservable(afterViewInitKey).pipe(operators_1.takeUntil(this.onDestroy), operators_1.take(1)); | ||
} | ||
get afterViewChecked() { | ||
return this.getObservable(afterViewCheckedKey).pipe(takeUntil(this.onDestroy)); | ||
return this.getObservable(afterViewCheckedKey).pipe(operators_1.takeUntil(this.onDestroy)); | ||
} | ||
get onDestroy() { | ||
return this.getObservable(onDestroyKey).pipe(take(1)); | ||
return this.getObservable(onDestroyKey).pipe(operators_1.take(1)); | ||
} | ||
@@ -53,3 +55,3 @@ ngOnChanges(changes) { this.emit(onChangesKey, changes); } | ||
getObservable(key) { | ||
return (this[key] || (this[key] = new Subject())).asObservable(); | ||
return (this[key] || (this[key] = new rxjs_1.Subject())).asObservable(); | ||
} | ||
@@ -64,4 +66,5 @@ emit(key, value) { | ||
} | ||
exports.ObservableComponent = ObservableComponent; | ||
ObservableComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
{ type: core_1.Component, args: [{ | ||
selector: 'lib-observable-component', | ||
@@ -72,2 +75,2 @@ template: '' | ||
ObservableComponent.ctorParameters = () => []; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JzZXJ2YWJsZS1jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy1zdWdhci9zcmMvbGliL29ic2VydmFibGUtY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFTTSxTQUFTLEVBQ3JCLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBYyxPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDM0MsT0FBTyxFQUFFLFNBQVMsRUFBRSxJQUFJLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUVqRCxNQUFNLFlBQVksR0FBRyxNQUFNLENBQUMsV0FBVyxDQUFDLENBQUM7QUFDekMsTUFBTSxTQUFTLEdBQUcsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQ25DLE1BQU0sVUFBVSxHQUFHLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FBQztBQUNyQyxNQUFNLG1CQUFtQixHQUFHLE1BQU0sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0FBQ3ZELE1BQU0sc0JBQXNCLEdBQUcsTUFB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FmdGVyVmlld0NoZWNrZWQoKTogdm9pZCB7IHRoaXMuZW1pdChhZnRlclZpZXdDaGVja2VkS2V5KTsgfVxuICAgIG5nT25EZXN0cm95KCk6IHZvaWQgeyB0aGlzLmVtaXQob25EZXN0cm95S2V5KTsgfVxuXG4gICAgcHJpdmF0ZSBnZXRPYnNlcnZhYmxlKGtleTogc3ltYm9sKTogT2JzZXJ2YWJsZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuICh0aGlzW2tleV0gfHwgKHRoaXNba2V5XSA9IG5ldyBTdWJqZWN0PGFueT4oKSkpLmFzT2JzZXJ2YWJsZSgpO1xuICAgIH1cblxuICAgIHByaXZhdGUgZW1pdChrZXk6IHN5bWJvbCwgdmFsdWU/OiBhbnkpOiB2b2lkIHtcbiAgICAgICAgY29uc3Qgc3ViamVjdCA9IHRoaXNba2V5XTtcbiAgICAgICAgaWYgKCFzdWJqZWN0KXtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHN1YmplY3QubmV4dCh2YWx1ZSk7XG4gICAgfVxufVxuIl19 |
@@ -0,6 +1,10 @@ | ||
"use strict"; | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
export * from './public-api'; | ||
export { NgLetDirective as ɵa } from './lib/ng-let.directive'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctc3VnYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9uZy1zdWdhci9zcmMvbmctc3VnYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQztBQUU3QixPQUFPLEVBQUMsY0FBYyxJQUFJLEVBQUUsRUFBQyxNQUFNLHdCQUF3QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuXG5leHBvcnQge05nTGV0RGlyZWN0aXZlIGFzIMm1YX0gZnJvbSAnLi9saWIvbmctbGV0LmRpcmVjdGl2ZSc7Il19 | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./public-api"), exports); | ||
var ng_let_directive_1 = require("./lib/ng-let.directive"); | ||
Object.defineProperty(exports, "\u0275a", { enumerable: true, get: function () { return ng_let_directive_1.NgLetDirective; } }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctc3VnYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9uZy1zdWdhci9zcmMvbmctc3VnYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOztHQUVHOzs7QUFFSCx1REFBNkI7QUFFN0IsMkRBQTREO0FBQXBELDJHQUFBLGNBQWMsT0FBTSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcblxuZXhwb3J0IHtOZ0xldERpcmVjdGl2ZSBhcyDJtWF9IGZyb20gJy4vbGliL25nLWxldC5kaXJlY3RpdmUnOyJdfQ== |
@@ -0,7 +1,10 @@ | ||
"use strict"; | ||
/* | ||
* Public API Surface of ng-sugar | ||
*/ | ||
export * from './lib/ng-sugar.module'; | ||
export * from './lib/observable-component'; | ||
export * from 'observable-input'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25nLXN1Z2FyL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMsa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIG5nLXN1Z2FyXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvbmctc3VnYXIubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL29ic2VydmFibGUtY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJ29ic2VydmFibGUtaW5wdXQnO1xuIl19 | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./lib/ng-sugar.module"), exports); | ||
tslib_1.__exportStar(require("./lib/observable-component"), exports); | ||
tslib_1.__exportStar(require("observable-input"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25nLXN1Z2FyL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7R0FFRzs7O0FBRUgsZ0VBQXNDO0FBQ3RDLHFFQUEyQztBQUMzQywyREFBaUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIG5nLXN1Z2FyXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvbmctc3VnYXIubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL29ic2VydmFibGUtY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJ29ic2VydmFibGUtaW5wdXQnO1xuIl19 |
@@ -1,6 +0,34 @@ | ||
import { Component, Directive, ViewContainerRef, TemplateRef, Input, NgModule } from '@angular/core'; | ||
import { Subject } from 'rxjs'; | ||
import { takeUntil, take } from 'rxjs/operators'; | ||
export * from 'observable-input'; | ||
import tslib from 'tslib'; | ||
import core from '@angular/core'; | ||
import rxjs from 'rxjs'; | ||
import operators from 'rxjs/operators'; | ||
import observableInput from 'observable-input'; | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
function createCommonjsModule(fn, basedir, module) { | ||
return module = { | ||
path: basedir, | ||
exports: {}, | ||
require: function (path, base) { | ||
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); | ||
} | ||
}, fn(module, module.exports), module.exports; | ||
} | ||
function getCjsExportFromNamespace (n) { | ||
return n && n['default'] || n; | ||
} | ||
function commonjsRequire () { | ||
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); | ||
} | ||
var observableComponent = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ObservableComponent = void 0; | ||
const onChangesKey = Symbol('onChanges'); | ||
@@ -17,3 +45,2 @@ const onInitKey = Symbol('onInit'); | ||
// with https://stackoverflow.com/a/62613494/2380455 if this is not decorated | ||
// tslint:disable: no-conflicting-lifecycle directive-class-suffix | ||
class ObservableComponent { | ||
@@ -23,24 +50,24 @@ constructor() { } | ||
get onChanges() { | ||
return this.getObservable(onChangesKey).pipe(takeUntil(this.onDestroy)); | ||
return this.getObservable(onChangesKey).pipe(operators.takeUntil(this.onDestroy)); | ||
} | ||
get onInit() { | ||
return this.getObservable(onInitKey).pipe(takeUntil(this.onDestroy), take(1)); | ||
return this.getObservable(onInitKey).pipe(operators.takeUntil(this.onDestroy), operators.take(1)); | ||
} | ||
get doCheck() { | ||
return this.getObservable(doCheckKey).pipe(takeUntil(this.onDestroy)); | ||
return this.getObservable(doCheckKey).pipe(operators.takeUntil(this.onDestroy)); | ||
} | ||
get afterContentInit() { | ||
return this.getObservable(afterContentInitKey).pipe(takeUntil(this.onDestroy), take(1)); | ||
return this.getObservable(afterContentInitKey).pipe(operators.takeUntil(this.onDestroy), operators.take(1)); | ||
} | ||
get afterContentChecked() { | ||
return this.getObservable(afterContentCheckedKey).pipe(takeUntil(this.onDestroy)); | ||
return this.getObservable(afterContentCheckedKey).pipe(operators.takeUntil(this.onDestroy)); | ||
} | ||
get afterViewInit() { | ||
return this.getObservable(afterViewInitKey).pipe(takeUntil(this.onDestroy), take(1)); | ||
return this.getObservable(afterViewInitKey).pipe(operators.takeUntil(this.onDestroy), operators.take(1)); | ||
} | ||
get afterViewChecked() { | ||
return this.getObservable(afterViewCheckedKey).pipe(takeUntil(this.onDestroy)); | ||
return this.getObservable(afterViewCheckedKey).pipe(operators.takeUntil(this.onDestroy)); | ||
} | ||
get onDestroy() { | ||
return this.getObservable(onDestroyKey).pipe(take(1)); | ||
return this.getObservable(onDestroyKey).pipe(operators.take(1)); | ||
} | ||
@@ -56,3 +83,3 @@ ngOnChanges(changes) { this.emit(onChangesKey, changes); } | ||
getObservable(key) { | ||
return (this[key] || (this[key] = new Subject())).asObservable(); | ||
return (this[key] || (this[key] = new rxjs.Subject())).asObservable(); | ||
} | ||
@@ -67,4 +94,5 @@ emit(key, value) { | ||
} | ||
exports.ObservableComponent = ObservableComponent; | ||
ObservableComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
{ type: core.Component, args: [{ | ||
selector: 'lib-observable-component', | ||
@@ -76,2 +104,9 @@ template: '' | ||
}); | ||
var ngLet_directive = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NgLetDirective = void 0; | ||
class NgLetDirective { | ||
@@ -86,4 +121,5 @@ constructor(viewContainer, templateRef) { | ||
} | ||
exports.NgLetDirective = NgLetDirective; | ||
NgLetDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
{ type: core.Directive, args: [{ | ||
selector: '[ngLet]' | ||
@@ -93,21 +129,31 @@ },] } | ||
NgLetDirective.ctorParameters = () => [ | ||
{ type: ViewContainerRef }, | ||
{ type: TemplateRef } | ||
{ type: core.ViewContainerRef }, | ||
{ type: core.TemplateRef } | ||
]; | ||
NgLetDirective.propDecorators = { | ||
ngLet: [{ type: Input }] | ||
ngLet: [{ type: core.Input }] | ||
}; | ||
}); | ||
var ngSugar_module = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NgSugarModule = void 0; | ||
class NgSugarModule { | ||
} | ||
exports.NgSugarModule = NgSugarModule; | ||
NgSugarModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
{ type: core.NgModule, args: [{ | ||
declarations: [ | ||
ObservableComponent, | ||
NgLetDirective | ||
observableComponent.ObservableComponent, | ||
ngLet_directive.NgLetDirective | ||
], | ||
imports: [], | ||
exports: [ | ||
ObservableComponent, | ||
NgLetDirective | ||
observableComponent.ObservableComponent, | ||
ngLet_directive.NgLetDirective | ||
] | ||
@@ -117,11 +163,31 @@ },] } | ||
}); | ||
var publicApi = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
/* | ||
* Public API Surface of ng-sugar | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
tslib.__exportStar(ngSugar_module, exports); | ||
tslib.__exportStar(observableComponent, exports); | ||
tslib.__exportStar(observableInput, exports); | ||
}); | ||
var ngSugar = createCommonjsModule(function (module, exports) { | ||
"use strict"; | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export { NgSugarModule, ObservableComponent, NgLetDirective as ɵa }; | ||
tslib.__exportStar(publicApi, exports); | ||
Object.defineProperty(exports, "\u0275a", { enumerable: true, get: function () { return ngLet_directive.NgLetDirective; } }); | ||
}); | ||
export default ngSugar; | ||
//# sourceMappingURL=ng-sugar.js.map |
{ | ||
"name": "ng-sugar", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Syntactic sugar utils for Angular.", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
136207
924
1