@coolon/angular-ui-powerups 0.0.123 → 0.0.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/coolon-angular-ui-powerups.umd.js +71 -89
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/esm2015/lib/place/place-component.js +2 -8
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +67 -83
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
- package/esm5/lib/place/place-component.js +6 -9
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +67 -83
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +68 -89
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +72 -90
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter-decorators.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-decorators.ts"],"names":[],"mappings":";;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"parameter-decorators.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-decorators.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EACL,OAAO,EACP,YAAY,EAEZ,MAAM,EACN,gBAAgB,EAChB,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE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KAAK,CAAC,CAAC;QAC3E,gBAAgB,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,iBAAiB,EAAK,EAAE,iBAAiB;;;;QAAE,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAjB,CAAiB,EAAC,CAAC;IAClH,CAAC,EAAC;AACJ,CAAC;;;;;;AAED,MAAM,UAAU,kBAAkB,CAAI,OAAsC;;QACpE,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;IAC9B;;;;;IAAO,UAAC,SAAiB,EAAE,WAA4B;;YAC/C,KAAK,GAAG,IAAI,mBAAmB,CAAC,cAAc,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QAC3H,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QAC3E,gBAAgB,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,gBAAgB,EAAK,EAAE,qBAAqB;;;;QAAE,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,EAAnB,CAAmB,EAAC,CAAC;IACvH,CAAC,EAAC;AACJ,CAAC","sourcesContent":["import {\n Binding,\n DebugContext,\n HasValue,\n Logger,\n MutableListModel,\n MutableValueModel,\n UseDelegate\n} from '@coolon/pectin';\nimport { Klass, Opts } from '@coolon/typescript-utilities';\nimport { ROUTE_PARAMETER_LIST_KEY } from '../place-component';\nimport { Formatter } from './formatter';\nimport { ParameterDefinition } from './parameter-definition.class';\n\n\nexport interface RouteIdOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T;\n // sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser<T>;\n}\n\nexport interface RouteParameterOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T;\n storeInUrl?: Formatter<T>\n // sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser<T>;\n}\n\nexport interface RouteListParameterOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T[];\n storeInUrl?: Formatter<T>\n // sanitiser?: Constructable<ParameterSanitiser<T[]>> | ParameterSanitiser<T[]>;\n}\n\n\nfunction installMechanics<M extends HasValue<any>>(prototype: Object, propertyKey: string | symbol, backingModel: M, tagPrefix: string, isEmpty: (mode: M) => boolean) {\n const mechanics = {\n backingModel: backingModel,\n binding: null as Binding<any, any>\n };\n const tag = `${tagPrefix}(${prototype.constructor.name}.${propertyKey.toString()})`;\n DebugContext.get(mechanics.backingModel).tag(tag);\n Logger.get(mechanics.backingModel).tag(tag);\n Object.defineProperty(prototype, propertyKey, {\n get: function() {\n return mechanics.backingModel;\n },\n set: function(userModel: M) {\n // This handles the scenario where we want to push an existing value model (such as a form model)\n // to and from the route.\n if (mechanics.binding) {\n mechanics.binding.dispose();\n }\n if (userModel) {\n mechanics.binding = new Binding(mechanics.backingModel, userModel);\n if (isEmpty(userModel)) {\n mechanics.binding.writeRight(); // push the visit into the user model;\n } else {\n if (!isEmpty(mechanics.backingModel)) {\n console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');\n }\n mechanics.binding.writeLeft(); // push the user model into the visit\n }\n }\n }\n });\n}\n\nexport function RouteId<T extends string | number>(type: Formatter<T>, options?: RouteIdOptions<T>): PropertyDecorator {\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableValueModel<T>(), \"@RouteId\", m => m.query().isNil());\n };\n}\n\nexport function VisitParameter<T>(options?: RouteParameterOptions<T>): PropertyDecorator {\n const opts = Opts.get(options);\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableValueModel<T>(), \"@VisitParameter\", m => m.query().isNil());\n };\n}\n\nexport function VisitParameterList<E>(options?: RouteListParameterOptions<E>): PropertyDecorator {\n const opts = Opts.get(options);\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableListModel<E>(), \"@VisitParameterList\", m => m.query().isEmpty());\n };\n}\n"]}
|
|
@@ -4,7 +4,7 @@ import { FormsModule } from '@angular/forms';
|
|
|
4
4
|
import { MatInputModule, MatFormFieldModule, MatSelectModule, MatButtonModule, MatDialogModule, MatTabsModule as MatTabsModule$1, MatProgressSpinnerModule, MatDialog } from '@angular/material';
|
|
5
5
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
|
-
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableValueModel, MutableListModel, DebugContext, Binding,
|
|
7
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableValueModel, MutableListModel, DebugContext, Binding, Guard, StoreInValueModel, Command, ValueHolder } from '@coolon/pectin';
|
|
8
8
|
import { __decorate, __metadata, __awaiter } from 'tslib';
|
|
9
9
|
import { PortalModule } from '@angular/cdk/portal';
|
|
10
10
|
import { RouterModule, UrlSegment, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, Router, UrlSerializer } from '@angular/router';
|
|
@@ -2691,6 +2691,7 @@ class PlaceComponent extends DisposableComponent {
|
|
|
2691
2691
|
this.installBinding(parameterDef);
|
|
2692
2692
|
}));
|
|
2693
2693
|
}
|
|
2694
|
+
// @Trace()
|
|
2694
2695
|
/**
|
|
2695
2696
|
* @private
|
|
2696
2697
|
* @template T, S
|
|
@@ -2752,12 +2753,6 @@ class PlaceComponent extends DisposableComponent {
|
|
|
2752
2753
|
onPlaceReady() {
|
|
2753
2754
|
}
|
|
2754
2755
|
}
|
|
2755
|
-
__decorate([
|
|
2756
|
-
Trace(),
|
|
2757
|
-
__metadata("design:type", Function),
|
|
2758
|
-
__metadata("design:paramtypes", [ParameterDefinition]),
|
|
2759
|
-
__metadata("design:returntype", void 0)
|
|
2760
|
-
], PlaceComponent.prototype, "installBinding", null);
|
|
2761
2756
|
__decorate([
|
|
2762
2757
|
Memoize$1(),
|
|
2763
2758
|
__metadata("design:type", PlaceDefinition),
|
|
@@ -6823,6 +6818,57 @@ if (false) {
|
|
|
6823
6818
|
/** @type {?|undefined} */
|
|
6824
6819
|
RouteListParameterOptions.prototype.storeInUrl;
|
|
6825
6820
|
}
|
|
6821
|
+
/**
|
|
6822
|
+
* @template M
|
|
6823
|
+
* @param {?} prototype
|
|
6824
|
+
* @param {?} propertyKey
|
|
6825
|
+
* @param {?} backingModel
|
|
6826
|
+
* @param {?} tagPrefix
|
|
6827
|
+
* @param {?} isEmpty
|
|
6828
|
+
* @return {?}
|
|
6829
|
+
*/
|
|
6830
|
+
function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmpty) {
|
|
6831
|
+
/** @type {?} */
|
|
6832
|
+
const mechanics = {
|
|
6833
|
+
backingModel: backingModel,
|
|
6834
|
+
binding: (/** @type {?} */ (null))
|
|
6835
|
+
};
|
|
6836
|
+
/** @type {?} */
|
|
6837
|
+
const tag = `${tagPrefix}(${prototype.constructor.name}.${propertyKey.toString()})`;
|
|
6838
|
+
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
6839
|
+
Logger.get(mechanics.backingModel).tag(tag);
|
|
6840
|
+
Object.defineProperty(prototype, propertyKey, {
|
|
6841
|
+
get: (/**
|
|
6842
|
+
* @return {?}
|
|
6843
|
+
*/
|
|
6844
|
+
function () {
|
|
6845
|
+
return mechanics.backingModel;
|
|
6846
|
+
}),
|
|
6847
|
+
set: (/**
|
|
6848
|
+
* @param {?} userModel
|
|
6849
|
+
* @return {?}
|
|
6850
|
+
*/
|
|
6851
|
+
function (userModel) {
|
|
6852
|
+
// This handles the scenario where we want to push an existing value model (such as a form model)
|
|
6853
|
+
// to and from the route.
|
|
6854
|
+
if (mechanics.binding) {
|
|
6855
|
+
mechanics.binding.dispose();
|
|
6856
|
+
}
|
|
6857
|
+
if (userModel) {
|
|
6858
|
+
mechanics.binding = new Binding(mechanics.backingModel, userModel);
|
|
6859
|
+
if (isEmpty(userModel)) {
|
|
6860
|
+
mechanics.binding.writeRight(); // push the visit into the user model;
|
|
6861
|
+
}
|
|
6862
|
+
else {
|
|
6863
|
+
if (!isEmpty(mechanics.backingModel)) {
|
|
6864
|
+
console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
|
|
6865
|
+
}
|
|
6866
|
+
mechanics.binding.writeLeft(); // push the user model into the visit
|
|
6867
|
+
}
|
|
6868
|
+
}
|
|
6869
|
+
})
|
|
6870
|
+
});
|
|
6871
|
+
}
|
|
6826
6872
|
/**
|
|
6827
6873
|
* @template T
|
|
6828
6874
|
* @param {?} type
|
|
@@ -6839,8 +6885,11 @@ function RouteId(type, options) {
|
|
|
6839
6885
|
/** @type {?} */
|
|
6840
6886
|
const param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);
|
|
6841
6887
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
6842
|
-
|
|
6843
|
-
|
|
6888
|
+
installMechanics(prototype, propertyKey, new MutableValueModel(), "@RouteId", (/**
|
|
6889
|
+
* @param {?} m
|
|
6890
|
+
* @return {?}
|
|
6891
|
+
*/
|
|
6892
|
+
m => m.query().isNil()));
|
|
6844
6893
|
});
|
|
6845
6894
|
}
|
|
6846
6895
|
/**
|
|
@@ -6860,46 +6909,11 @@ function VisitParameter(options) {
|
|
|
6860
6909
|
/** @type {?} */
|
|
6861
6910
|
const param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
6862
6911
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
/** @type {?} */
|
|
6869
|
-
const tag = `@VisitParameter(${prototype.constructor.name}.${propertyKey.toString()})`;
|
|
6870
|
-
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
6871
|
-
Logger.get(mechanics.backingModel).tag(tag);
|
|
6872
|
-
Object.defineProperty(prototype, propertyKey, {
|
|
6873
|
-
get: (/**
|
|
6874
|
-
* @return {?}
|
|
6875
|
-
*/
|
|
6876
|
-
function () {
|
|
6877
|
-
return mechanics.backingModel;
|
|
6878
|
-
}),
|
|
6879
|
-
set: (/**
|
|
6880
|
-
* @param {?} userModel
|
|
6881
|
-
* @return {?}
|
|
6882
|
-
*/
|
|
6883
|
-
function (userModel) {
|
|
6884
|
-
// This handles the scenario where we want to push an existing value model (such as a form model)
|
|
6885
|
-
// to and from the route.
|
|
6886
|
-
if (mechanics.binding) {
|
|
6887
|
-
mechanics.binding.dispose();
|
|
6888
|
-
}
|
|
6889
|
-
if (userModel) {
|
|
6890
|
-
mechanics.binding = new Binding(mechanics.backingModel, userModel);
|
|
6891
|
-
if (userModel.query().isNil()) {
|
|
6892
|
-
mechanics.binding.writeRight(); // push the visit into the user model;
|
|
6893
|
-
}
|
|
6894
|
-
else {
|
|
6895
|
-
if (!mechanics.backingModel.query().isNil()) {
|
|
6896
|
-
console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
|
|
6897
|
-
}
|
|
6898
|
-
mechanics.binding.writeLeft(); // push the user model into the visit
|
|
6899
|
-
}
|
|
6900
|
-
}
|
|
6901
|
-
})
|
|
6902
|
-
});
|
|
6912
|
+
installMechanics(prototype, propertyKey, new MutableValueModel(), "@VisitParameter", (/**
|
|
6913
|
+
* @param {?} m
|
|
6914
|
+
* @return {?}
|
|
6915
|
+
*/
|
|
6916
|
+
m => m.query().isNil()));
|
|
6903
6917
|
});
|
|
6904
6918
|
}
|
|
6905
6919
|
/**
|
|
@@ -6919,46 +6933,11 @@ function VisitParameterList(options) {
|
|
|
6919
6933
|
/** @type {?} */
|
|
6920
6934
|
const param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
6921
6935
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
/** @type {?} */
|
|
6928
|
-
const tag = `@VisitParameterList(${prototype.constructor.name}.${propertyKey.toString()})`;
|
|
6929
|
-
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
6930
|
-
Logger.get(mechanics.backingModel).tag(tag);
|
|
6931
|
-
Object.defineProperty(prototype, propertyKey, {
|
|
6932
|
-
get: (/**
|
|
6933
|
-
* @return {?}
|
|
6934
|
-
*/
|
|
6935
|
-
function () {
|
|
6936
|
-
return mechanics.backingModel;
|
|
6937
|
-
}),
|
|
6938
|
-
set: (/**
|
|
6939
|
-
* @param {?} userModel
|
|
6940
|
-
* @return {?}
|
|
6941
|
-
*/
|
|
6942
|
-
function (userModel) {
|
|
6943
|
-
// This handles the scenario where we want to push an existing value model (such as a form model)
|
|
6944
|
-
// to and from the route.
|
|
6945
|
-
if (mechanics.binding) {
|
|
6946
|
-
mechanics.binding.dispose();
|
|
6947
|
-
}
|
|
6948
|
-
if (userModel) {
|
|
6949
|
-
mechanics.binding = new Binding(mechanics.backingModel, userModel);
|
|
6950
|
-
if (userModel.query().isEmpty()) {
|
|
6951
|
-
mechanics.binding.writeRight(); // push the visit into the user model;
|
|
6952
|
-
}
|
|
6953
|
-
else {
|
|
6954
|
-
if (!mechanics.backingModel.query().isEmpty()) {
|
|
6955
|
-
console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
|
|
6956
|
-
}
|
|
6957
|
-
mechanics.binding.writeLeft(); // push the user model into the visit
|
|
6958
|
-
}
|
|
6959
|
-
}
|
|
6960
|
-
})
|
|
6961
|
-
});
|
|
6936
|
+
installMechanics(prototype, propertyKey, new MutableListModel(), "@VisitParameterList", (/**
|
|
6937
|
+
* @param {?} m
|
|
6938
|
+
* @return {?}
|
|
6939
|
+
*/
|
|
6940
|
+
m => m.query().isEmpty()));
|
|
6962
6941
|
});
|
|
6963
6942
|
}
|
|
6964
6943
|
|