@recursyve/nice-data-filter-kit 15.1.0 → 15.1.1

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.
Files changed (20) hide show
  1. package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.store.mjs +7 -11
  2. package/esm2020/lib/directive/selectable-list/providers/selectable-list-content.service.mjs +7 -6
  3. package/esm2020/lib/directive/selectable-list/public-api.mjs +2 -1
  4. package/esm2020/lib/directive/selectable-list/selectable-list-checkbox.directive.mjs +4 -4
  5. package/esm2020/lib/directive/selectable-list/selectable-list-select-all.directive.mjs +4 -4
  6. package/esm2020/lib/directive/selectable-list/selectable-list-state.directive.mjs +50 -0
  7. package/esm2020/lib/directive/selectable-list/selectable-list.directive.mjs +6 -6
  8. package/esm2020/lib/directive/selectable-list/selectable-list.module.mjs +5 -4
  9. package/fesm2015/recursyve-nice-data-filter-kit.mjs +67 -25
  10. package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
  11. package/fesm2020/recursyve-nice-data-filter-kit.mjs +66 -27
  12. package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -1
  13. package/lib/directive/selectable-list/providers/selectable-list-content.service.d.ts +3 -3
  14. package/lib/directive/selectable-list/public-api.d.ts +1 -0
  15. package/lib/directive/selectable-list/selectable-list-checkbox.directive.d.ts +2 -2
  16. package/lib/directive/selectable-list/selectable-list-select-all.directive.d.ts +2 -2
  17. package/lib/directive/selectable-list/selectable-list-state.directive.d.ts +24 -0
  18. package/lib/directive/selectable-list/selectable-list.directive.d.ts +2 -2
  19. package/lib/directive/selectable-list/selectable-list.module.d.ts +2 -1
  20. package/package.json +1 -1
@@ -2912,19 +2912,18 @@ class NiceFilterViewStore extends EntityStore {
2912
2912
  }
2913
2913
  const idKey = key !== null && key !== void 0 ? key : this.idKey;
2914
2914
  this.update({
2915
- filterResult: Object.assign(Object.assign({}, filterResult), { values: arrayUpsert(filterResult.values, value[idKey], value, key) })
2915
+ filterResult: Object.assign(Object.assign({}, filterResult), { values: arrayUpsert(filterResult.values, value[idKey], value, idKey) })
2916
2916
  });
2917
2917
  this.upsert(value[idKey], value);
2918
2918
  }
2919
2919
  upsertValues(values, key) {
2920
- const { filterResult } = this.getValue();
2921
- if (!filterResult) {
2922
- return;
2923
- }
2924
2920
  const idKey = key !== null && key !== void 0 ? key : this.idKey;
2925
2921
  for (const value of values) {
2926
- this.update({
2927
- filterResult: Object.assign(Object.assign({}, filterResult), { values: arrayUpsert(filterResult.values, value[idKey], value, key) })
2922
+ this.update(({ filterResult }) => {
2923
+ var _a;
2924
+ return ({
2925
+ filterResult: Object.assign(Object.assign({}, (filterResult !== null && filterResult !== void 0 ? filterResult : { values: [] })), { values: arrayUpsert((_a = filterResult === null || filterResult === void 0 ? void 0 : filterResult.values) !== null && _a !== void 0 ? _a : [], value[idKey], value, idKey) })
2926
+ });
2928
2927
  });
2929
2928
  this.upsert(value[idKey], value);
2930
2929
  }
@@ -2936,7 +2935,7 @@ class NiceFilterViewStore extends EntityStore {
2936
2935
  }
2937
2936
  const idKey = key !== null && key !== void 0 ? key : this.idKey;
2938
2937
  this.update({
2939
- filterResult: Object.assign(Object.assign({}, filterResult), { values: arrayRemove(filterResult.values, value[idKey], key) })
2938
+ filterResult: Object.assign(Object.assign({}, filterResult), { values: arrayRemove(filterResult.values, value[idKey], idKey) })
2940
2939
  });
2941
2940
  this.remove(value[idKey]);
2942
2941
  }
@@ -4804,7 +4803,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
4804
4803
  type: Input
4805
4804
  }] } });
4806
4805
 
4807
- class SelectableListContentService {
4806
+ class NiceSelectableListContentService {
4808
4807
  constructor() {
4809
4808
  this._state = null;
4810
4809
  this._checkboxes = new QueryList();
@@ -4830,10 +4829,11 @@ class SelectableListContentService {
4830
4829
  this._checkboxes = checkboxes;
4831
4830
  }
4832
4831
  }
4833
- SelectableListContentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectableListContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4834
- SelectableListContentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectableListContentService });
4835
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectableListContentService, decorators: [{
4836
- type: Injectable
4832
+ NiceSelectableListContentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4833
+ NiceSelectableListContentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListContentService, providedIn: "any" });
4834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListContentService, decorators: [{
4835
+ type: Injectable,
4836
+ args: [{ providedIn: "any" }]
4837
4837
  }] });
4838
4838
 
4839
4839
  // tslint:disable-next-line:directive-class-suffix
@@ -4948,14 +4948,14 @@ class NiceSelectableListCheckboxDirective {
4948
4948
  }
4949
4949
  }
4950
4950
  }
4951
- NiceSelectableListCheckboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListCheckboxDirective, deps: [{ token: i1$4.MatCheckbox }, { token: SelectableListContentService }, { token: NiceSelectableListService }], target: i0.ɵɵFactoryTarget.Directive });
4951
+ NiceSelectableListCheckboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListCheckboxDirective, deps: [{ token: i1$4.MatCheckbox }, { token: NiceSelectableListContentService }, { token: NiceSelectableListService }], target: i0.ɵɵFactoryTarget.Directive });
4952
4952
  NiceSelectableListCheckboxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceSelectableListCheckboxDirective, selector: "mat-checkbox[niceSelectableListCheckbox]", inputs: { selectableEntity: "selectableEntity", selectPage: "selectPage" }, ngImport: i0 });
4953
4953
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListCheckboxDirective, decorators: [{
4954
4954
  type: Directive,
4955
4955
  args: [{
4956
4956
  selector: "mat-checkbox[niceSelectableListCheckbox]"
4957
4957
  }]
4958
- }], ctorParameters: function () { return [{ type: i1$4.MatCheckbox }, { type: SelectableListContentService }, { type: NiceSelectableListService }]; }, propDecorators: { selectableEntity: [{
4958
+ }], ctorParameters: function () { return [{ type: i1$4.MatCheckbox }, { type: NiceSelectableListContentService }, { type: NiceSelectableListService }]; }, propDecorators: { selectableEntity: [{
4959
4959
  type: Input
4960
4960
  }], selectPage: [{
4961
4961
  type: Input
@@ -5027,15 +5027,15 @@ class NiceSelectableListDirective {
5027
5027
  this.stateQuery.selectActiveId().pipe(takeUntil(this.unsubscribeQuerySub$)).subscribe(() => this.stateService.setQueryParams());
5028
5028
  }
5029
5029
  }
5030
- NiceSelectableListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListDirective, deps: [{ token: SelectableListContentService }, { token: NiceSelectableListService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Directive });
5031
- NiceSelectableListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceSelectableListDirective, selector: "[niceSelectableList]", inputs: { state: "state", options: "options" }, providers: [SelectableListContentService], queries: [{ propertyName: "checkboxes", predicate: NiceSelectableListCheckboxDirective, descendants: true }], usesOnChanges: true, ngImport: i0 });
5030
+ NiceSelectableListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListDirective, deps: [{ token: NiceSelectableListContentService }, { token: NiceSelectableListService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Directive });
5031
+ NiceSelectableListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceSelectableListDirective, selector: "[niceSelectableList]", inputs: { state: "state", options: "options" }, providers: [NiceSelectableListContentService], queries: [{ propertyName: "checkboxes", predicate: NiceSelectableListCheckboxDirective, descendants: true }], usesOnChanges: true, ngImport: i0 });
5032
5032
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListDirective, decorators: [{
5033
5033
  type: Directive,
5034
5034
  args: [{
5035
5035
  selector: "[niceSelectableList]",
5036
- providers: [SelectableListContentService]
5036
+ providers: [NiceSelectableListContentService]
5037
5037
  }]
5038
- }], ctorParameters: function () { return [{ type: SelectableListContentService }, { type: NiceSelectableListService }, { type: i2.ActivatedRoute }]; }, propDecorators: { state: [{
5038
+ }], ctorParameters: function () { return [{ type: NiceSelectableListContentService }, { type: NiceSelectableListService }, { type: i2.ActivatedRoute }]; }, propDecorators: { state: [{
5039
5039
  type: Input
5040
5040
  }], options: [{
5041
5041
  type: Input
@@ -5328,7 +5328,7 @@ class NiceSelectableListSelectAllDirective {
5328
5328
  }
5329
5329
  }
5330
5330
  }
5331
- NiceSelectableListSelectAllDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListSelectAllDirective, deps: [{ token: NiceFilterViewQuery, optional: true }, { token: SelectableListContentService }, { token: NiceSelectableListService }], target: i0.ɵɵFactoryTarget.Directive });
5331
+ NiceSelectableListSelectAllDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListSelectAllDirective, deps: [{ token: NiceFilterViewQuery, optional: true }, { token: NiceSelectableListContentService }, { token: NiceSelectableListService }], target: i0.ɵɵFactoryTarget.Directive });
5332
5332
  NiceSelectableListSelectAllDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceSelectableListSelectAllDirective, selector: "button[niceSelectableListSelectAll]", inputs: { action: "action" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
5333
5333
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListSelectAllDirective, decorators: [{
5334
5334
  type: Directive,
@@ -5338,7 +5338,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
5338
5338
  }], ctorParameters: function () {
5339
5339
  return [{ type: NiceFilterViewQuery, decorators: [{
5340
5340
  type: Optional
5341
- }] }, { type: SelectableListContentService }, { type: NiceSelectableListService }];
5341
+ }] }, { type: NiceSelectableListContentService }, { type: NiceSelectableListService }];
5342
5342
  }, propDecorators: { action: [{
5343
5343
  type: Input
5344
5344
  }], onClick: [{
@@ -5346,6 +5346,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
5346
5346
  args: ["click"]
5347
5347
  }] } });
5348
5348
 
5349
+ class NiceSelectableListIsEmptyDirectiveContext {
5350
+ }
5351
+ // tslint:disable-next-line:directive-selector
5352
+ class NiceSelectableListIsEmptyDirective {
5353
+ constructor(templateRef, viewContainerRef, contentService, selectableListService) {
5354
+ this.templateRef = templateRef;
5355
+ this.viewContainerRef = viewContainerRef;
5356
+ this.contentService = contentService;
5357
+ this.selectableListService = selectableListService;
5358
+ this.context = new NiceSelectableListIsEmptyDirectiveContext();
5359
+ this.embeddedViewRef = null;
5360
+ this.unsubscribeAll$ = new Subject();
5361
+ }
5362
+ static ngTemplateContextGuard(directive, ctx) {
5363
+ return true;
5364
+ }
5365
+ ngOnInit() {
5366
+ const state = this.contentService.state;
5367
+ const query = this.selectableListService.query(state);
5368
+ this.context.$implicit = this.context.isEmpty = (query.getCount() === 0);
5369
+ if (!this.embeddedViewRef) {
5370
+ this.viewContainerRef.clear();
5371
+ this.embeddedViewRef = this.viewContainerRef.createEmbeddedView(this.templateRef, this.context);
5372
+ }
5373
+ query.selectCount().pipe(takeUntil(this.unsubscribeAll$), map((count) => count === 0), distinctUntilChanged()).subscribe((isEmpty) => {
5374
+ this.context.$implicit = this.context.isEmpty = isEmpty;
5375
+ this.embeddedViewRef.context = this.context;
5376
+ this.embeddedViewRef.markForCheck();
5377
+ });
5378
+ }
5379
+ ngOnDestroy() {
5380
+ this.unsubscribeAll$.next();
5381
+ this.unsubscribeAll$.complete();
5382
+ }
5383
+ }
5384
+ NiceSelectableListIsEmptyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListIsEmptyDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NiceSelectableListContentService }, { token: NiceSelectableListService }], target: i0.ɵɵFactoryTarget.Directive });
5385
+ NiceSelectableListIsEmptyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceSelectableListIsEmptyDirective, selector: "[niceSelectableListIsEmpty]", ngImport: i0 });
5386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListIsEmptyDirective, decorators: [{
5387
+ type: Directive,
5388
+ args: [{ selector: "[niceSelectableListIsEmpty]" }]
5389
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: NiceSelectableListContentService }, { type: NiceSelectableListService }]; } });
5390
+
5349
5391
  class NiceSelectableListModule {
5350
5392
  static register(...providers) {
5351
5393
  return {
@@ -5359,14 +5401,14 @@ class NiceSelectableListModule {
5359
5401
  }
5360
5402
  }
5361
5403
  NiceSelectableListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5362
- NiceSelectableListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListModule, declarations: [NiceSelectableListDirective, NiceSelectableListCheckboxDirective, NiceSelectableListSelectAllDirective], exports: [NiceSelectableListDirective, NiceSelectableListCheckboxDirective, NiceSelectableListSelectAllDirective] });
5404
+ NiceSelectableListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListModule, declarations: [NiceSelectableListDirective, NiceSelectableListCheckboxDirective, NiceSelectableListSelectAllDirective, NiceSelectableListIsEmptyDirective], exports: [NiceSelectableListDirective, NiceSelectableListCheckboxDirective, NiceSelectableListSelectAllDirective, NiceSelectableListIsEmptyDirective] });
5363
5405
  NiceSelectableListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListModule });
5364
5406
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceSelectableListModule, decorators: [{
5365
5407
  type: NgModule,
5366
5408
  args: [{
5367
5409
  imports: [],
5368
- declarations: [NiceSelectableListDirective, NiceSelectableListCheckboxDirective, NiceSelectableListSelectAllDirective],
5369
- exports: [NiceSelectableListDirective, NiceSelectableListCheckboxDirective, NiceSelectableListSelectAllDirective]
5410
+ declarations: [NiceSelectableListDirective, NiceSelectableListCheckboxDirective, NiceSelectableListSelectAllDirective, NiceSelectableListIsEmptyDirective],
5411
+ exports: [NiceSelectableListDirective, NiceSelectableListCheckboxDirective, NiceSelectableListSelectAllDirective, NiceSelectableListIsEmptyDirective]
5370
5412
  }]
5371
5413
  }] });
5372
5414
 
@@ -5386,5 +5428,5 @@ String.prototype.toTableColumn = function (sortableOrOptions, nullLast) {
5386
5428
  * Generated bundle index. Do not edit.
5387
5429
  */
5388
5430
 
5389
- export { AdvancedFiltersForm, AdvancedFiltersTriggerDirective, DateFilterComponent, FilterComponent$1 as FilterComponent, FilterForm, FilterFormValues, FilterGroupIconPipe, FilterOperatorTypes, FilterSelectionComponent, FilterType, FilterUtils, LayoutContent, NiceAdvancedFiltersButtonComponent, NiceAdvancedFiltersComponent, NiceAdvancedFiltersModule, NiceBaseFilterViewComponent, NiceBaseListButtonsDirective, NiceBaseListCardsDirective, NiceBaseListComponent, NiceBaseListCustomContentDirective, NiceBaseListDirectiveModule, NiceBaseListEmptySearchResultStateDirective, NiceBaseListEmptyStateDirective, NiceBaseListFiltersDirective, NiceBaseListModule, NiceBaseListQuery, NiceBaseListService, NiceBaseListStore, NiceBaseListTableDirective, NiceBaseListTitleDirective, NiceCustomDateAdapter, NiceFilterApi, NiceFilterCustomDataViewComponent, NiceFilterDataDirective, NiceFilterExportButtonsComponent, NiceFilterExportDirective, NiceFilterGroupService, NiceFilterInfiniteScrollDataViewComponent, NiceFilterMatPaginatorPaginationDirective, NiceFilterMatSortSortingDirective, NiceFilterMatTableViewDirective, NiceFilterQueryParamsDirective, NiceFilterSearchComponent, NiceFilterService, NiceFilterViewComponent, NiceFilterViewModule, NiceFilterViewQuery, NiceFilterViewService, NiceListState, NiceMultiStateFilterService, NiceMultiStateListComponent, NiceMultiStateListModule, NiceMultiStateListQuery, NiceMultiStateListService, NiceMultiStateListStore, NicePreloadSelectedEntitiesProvider, NiceQueryBuilderComponent, NiceQueryBuilderModule, NiceSavedReportService, NiceSelectableListCheckboxDirective, NiceSelectableListDirective, NiceSelectableListModule, NiceSelectableListSelectAllDirective, NiceSelectableListService, NiceSelectableListStateQuery, NiceSelectableListStateService, NumberFilterComponent, OrderUtils, QBFilterUtils, QueryBuilderTriggerDirective, RadioFilterComponent, RuleComponent, SelectFilterComponent, StringUtils, TableColumns, TextFilterComponent, defaultLayout, initialBaseListState, initialValue$1 as initialValue, mixinNiceFilterApi };
5431
+ export { AdvancedFiltersForm, AdvancedFiltersTriggerDirective, DateFilterComponent, FilterComponent$1 as FilterComponent, FilterForm, FilterFormValues, FilterGroupIconPipe, FilterOperatorTypes, FilterSelectionComponent, FilterType, FilterUtils, LayoutContent, NiceAdvancedFiltersButtonComponent, NiceAdvancedFiltersComponent, NiceAdvancedFiltersModule, NiceBaseFilterViewComponent, NiceBaseListButtonsDirective, NiceBaseListCardsDirective, NiceBaseListComponent, NiceBaseListCustomContentDirective, NiceBaseListDirectiveModule, NiceBaseListEmptySearchResultStateDirective, NiceBaseListEmptyStateDirective, NiceBaseListFiltersDirective, NiceBaseListModule, NiceBaseListQuery, NiceBaseListService, NiceBaseListStore, NiceBaseListTableDirective, NiceBaseListTitleDirective, NiceCustomDateAdapter, NiceFilterApi, NiceFilterCustomDataViewComponent, NiceFilterDataDirective, NiceFilterExportButtonsComponent, NiceFilterExportDirective, NiceFilterGroupService, NiceFilterInfiniteScrollDataViewComponent, NiceFilterMatPaginatorPaginationDirective, NiceFilterMatSortSortingDirective, NiceFilterMatTableViewDirective, NiceFilterQueryParamsDirective, NiceFilterSearchComponent, NiceFilterService, NiceFilterViewComponent, NiceFilterViewModule, NiceFilterViewQuery, NiceFilterViewService, NiceListState, NiceMultiStateFilterService, NiceMultiStateListComponent, NiceMultiStateListModule, NiceMultiStateListQuery, NiceMultiStateListService, NiceMultiStateListStore, NicePreloadSelectedEntitiesProvider, NiceQueryBuilderComponent, NiceQueryBuilderModule, NiceSavedReportService, NiceSelectableListCheckboxDirective, NiceSelectableListDirective, NiceSelectableListIsEmptyDirective, NiceSelectableListModule, NiceSelectableListSelectAllDirective, NiceSelectableListService, NiceSelectableListStateQuery, NiceSelectableListStateService, NumberFilterComponent, OrderUtils, QBFilterUtils, QueryBuilderTriggerDirective, RadioFilterComponent, RuleComponent, SelectFilterComponent, StringUtils, TableColumns, TextFilterComponent, defaultLayout, initialBaseListState, initialValue$1 as initialValue, mixinNiceFilterApi };
5390
5432
  //# sourceMappingURL=recursyve-nice-data-filter-kit.mjs.map