Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
EndyKaufman committed Jan 27, 2019
2 parents 1a24141 + eb1ad1c commit bd0fdad
Show file tree
Hide file tree
Showing 31 changed files with 624 additions and 800 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# [0.1.0](https://github.com/rucken/ionic/compare/0.0.4...0.1.0) (2019-01-27)


### Bug Fixes

* Revert use form-group to without bindIO ([9697fc6](https://github.com/rucken/ionic/commit/9697fc6))


### Features

* Add ngx-bind-io and update all sources ([4ac5ab6](https://github.com/rucken/ionic/commit/4ac5ab6))



## [0.0.4](https://github.com/rucken/ionic/compare/0.0.3...0.0.4) (2019-01-12)


Expand Down
4 changes: 3 additions & 1 deletion apps/demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { MetaLoader, MetaModule } from '@ngx-meta/core';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { AccountModule, AuthModalModule, AuthModule, BrowserStorage, CONTENT_TYPES_CONFIG_TOKEN, defaultContentTypesConfig, defaultGroupsConfig, defaultPermissionsConfig, defaultUsersConfig, ErrorsExtractor, GROUPS_CONFIG_TOKEN, LangModule, LangService, PermissionsGuard, PERMISSIONS_CONFIG_TOKEN, PipesModule, STORAGE_CONFIG_TOKEN, TokenService, TransferHttpCacheModule, USERS_CONFIG_TOKEN } from '@rucken/core';
import { GroupsListFiltersModalModule, GroupsListFiltersModalService, IonicAuthModalModule, IonicModalsModule, NavbarModule, UsersListFiltersModalModule, UsersListFiltersModalService } from '@rucken/ionic';
import { NgxBindIOModule } from 'ngx-bind-io';
import { CookieService } from 'ngx-cookie-service';
import { NgxPermissionsModule } from 'ngx-permissions';
import { NgxRepositoryModule } from 'ngx-repository';
Expand Down Expand Up @@ -62,7 +63,8 @@ import { initializeApp } from './utils/initialize-app';
NavbarModule,
IonicModalsModule,
UsersListFiltersModalModule.forRoot(),
GroupsListFiltersModalModule.forRoot()
GroupsListFiltersModalModule.forRoot(),
NgxBindIOModule.forRoot()
],
providers: [
{
Expand Down
12 changes: 6 additions & 6 deletions libs/rucken/ionic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rucken/ionic",
"version": "0.0.4",
"version": "0.1.0",
"engines": {
"node": ">=10",
"npm": ">=6.4.0"
Expand Down Expand Up @@ -35,14 +35,14 @@
}
],
"peerDependencies": {
"@angular/common": "~7.2.0",
"@angular/core": "~7.2.0",
"@ionic/angular": "4.0.0-rc.1",
"@rucken/core": "^3.7.1"
"@angular/common": "~7.2.2",
"@angular/core": "~7.2.2",
"@ionic/angular": "4.0.0",
"@rucken/core": "^3.8.1"
},
"dependencies": {
"@ngx-translate/core": "^11.0.1",
"ngx-dynamic-form-builder": "^0.8.1",
"ngx-dynamic-form-builder": "^0.9.0",
"ngx-permissions": "^6.0.4",
"ngx-repository": "^0.6.3",
"bind-observable": "^1.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,66 +30,61 @@ export class EntityListComponent<TModel extends IModel> {
defaultEntityListHeaderTemplate: TemplateRef<any>;

@Input()
gridFieldTemplate: TemplateRef<any>;
gridFieldTemplate: TemplateRef<any> = undefined;
@Input()
gridCellTemplate: TemplateRef<any>;
gridCellTemplate: TemplateRef<any> = undefined;
@Input()
gridFieldContent: TemplateRef<any>;
gridFieldContent: TemplateRef<any> = undefined;
@Input()
gridFieldActionContent: TemplateRef<any>;
gridFieldActionContent: TemplateRef<any> = undefined;
@Input()
gridCellContent: TemplateRef<any>;
gridCellContent: TemplateRef<any> = undefined;
@Input()
gridCellTranslatedContent: TemplateRef<any>;
gridCellTranslatedContent: TemplateRef<any> = undefined;
@Input()
gridCellActionContent: TemplateRef<any>;
gridCellActionContent: TemplateRef<any> = undefined;
@Input()
searchFieldTemplate: TemplateRef<any>;
searchFieldTemplate: TemplateRef<any> = undefined;
@Input()
entityListFooterTemplate: TemplateRef<any>;
entityListFooterTemplate: TemplateRef<any> = undefined;
@Input()
entityListHeaderTemplate: TemplateRef<any>;
entityListHeaderTemplate: TemplateRef<any> = undefined;

@Input()
viewLink: string;
viewLink: string = undefined;
@Input()
updateLink: string;
updateLink: string = undefined;
@Input()
deleteLink: string;
deleteLink: string = undefined;

@Input()
showSearchField = false;
@Input()
selectFirst?: boolean;
selectFirst?: boolean = undefined;
@Input()
set processing(value: boolean) {
this._processing = undefined;
if (value) {
this._loadingController.create({
message: this._translateService.instant('Loading...')
}).then(loading => {
this._processingModal = loading;
loading.present().then(modal => {
if (this._processing === undefined) {
this._processing = value;
} else {
if (this._processingModal && this._processing === false) {
this._processingModal.dismiss().then(() => {
this._processing = false;
this._processingModal = undefined;
});
}
}
});
});
} else {
if (this._processingModal) {
this._processingModal.dismiss().then(() => {
this._processing = false;
this._processingModal = undefined;
});
this._processing = value;
if (this._processingModal !== null) {
if (this._processingModal === undefined) {
this._processingModal = null;
if (value) {
this._loadingController.create({
message: this._translateService.instant('Loading...')
}).then(element => {
element.present().then(_ => {
this._processingModal = element;
if (this._processing === false) {
this.processing = false;
}
});
});
}
} else {
this._processing = false;
if (!value) {
this._processingModal.dismiss().then(() => {
this._processingModal = undefined;
});
}
}
}
}
Expand All @@ -99,21 +94,21 @@ export class EntityListComponent<TModel extends IModel> {
@Input()
searchField: FormControl = new FormControl();
@Input()
title: string;
title: string = undefined;
@Input()
createTitle = translate('Create');
@Input()
createClass = 'btn btn-primary';
@Input()
translatedCells: string[] = [];
@Input()
orderColumns: string[];
orderColumns: string[] = undefined;
@Input()
columnsClasses: { [key: string]: string };
columnsClasses: { [key: string]: string } = undefined;
@Input()
orderBy: string;
orderBy: string = undefined;
@Input()
multiSelectColumns: string[];
multiSelectColumns: string[] = undefined;
@Input()
set columns(columns: string[]) {
this._columns = columns;
Expand All @@ -133,14 +128,11 @@ export class EntityListComponent<TModel extends IModel> {
}
}
@Input()
classes: string[];
classes: string[] = undefined;
@Input()
strings: any;
strings: any = undefined;
@Input()
set items(items: TModel[]) {
if (this._refresher && this._refresher.target) {
this._refresher.target.complete();
}
this._items = items;
if (
this.selectFirst !== false &&
Expand All @@ -150,6 +142,9 @@ export class EntityListComponent<TModel extends IModel> {
) {
this.onSelected([]);
}
if (this._refresher && this._refresher.target) {
this._refresher.target.complete();
}
}
get items() {
return this._items;
Expand Down Expand Up @@ -182,7 +177,7 @@ export class EntityListComponent<TModel extends IModel> {
nextPage: EventEmitter<boolean> = new EventEmitter<boolean>();

@Input()
readonly: boolean;
readonly: boolean = undefined;
@Input()
enableCreate = true;
@Input()
Expand All @@ -192,7 +187,7 @@ export class EntityListComponent<TModel extends IModel> {
@Input()
enableAppendFromGrid = true;
@Input()
paginationMeta: PaginationMeta;
paginationMeta: PaginationMeta = undefined;

get enableOnlyUpdateOrDelete() {
return (this.isEnableDelete && !this.isEnableUpdate) || (!this.isEnableDelete && this.isEnableUpdate);
Expand All @@ -204,12 +199,12 @@ export class EntityListComponent<TModel extends IModel> {
return this.appendFromGrid.observers.length > 0;
}

private _refresher: any;
private _processingModal: any;
private _refresher: any = undefined;
private _processingModal: any = undefined;
private _processing = false;
private _selected: TModel[];
private _items: TModel[];
private _columns: string[];
private _selected: TModel[] = undefined;
private _items: TModel[] = undefined;
private _columns: string[] = undefined;

constructor(
private _viewContainerRef: ViewContainerRef,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { map } from 'rxjs/operators';
})
export class FormGroupComponent implements AfterViewInit {
@Input()
checkIsDirty?: boolean;
checkIsDirty?: boolean = undefined;
@Input()
tooltipPlacement?: string;
tooltipPlacement?: string = undefined;

get errors(): Observable<any> {
if (this.form && (this.checkIsDirty !== true || this.form.dirty)) {
Expand All @@ -29,7 +29,7 @@ export class FormGroupComponent implements AfterViewInit {
}
}
@Input()
form: DynamicFormGroup<any>;
form: DynamicFormGroup<any> = undefined;
@Input()
set name(name: string) {
this._name = name;
Expand All @@ -38,7 +38,7 @@ export class FormGroupComponent implements AfterViewInit {
return this._name;
}
@Input()
title: string;
title: string = undefined;

get valid() {
return !this.form || this.form.get(this.name).valid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { BehaviorSubject } from 'rxjs';
})
export class NavbarComponent {
@Input()
showSignIn: boolean;
showSignIn: boolean = undefined;
@Input()
showSignOut: boolean;
showSignOut: boolean = undefined;
@Input()
title: string;
title: string = undefined;
@Input()
set routes(routes: any[]) {
this.allowedRoutes$.next(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class PromptFormModalComponent extends BasePromptModalComponent {
@Input()
hideFooter = false;
@Input()
class: string;
class: string = undefined;
@Input()
hideTopNo = false;
@Input()
Expand All @@ -26,11 +26,11 @@ export class PromptFormModalComponent extends BasePromptModalComponent {
@Input()
iconTopInfo = 'information-circle-outline';
@Input()
footerButtonsTemplate: TemplateRef<any>;
footerButtonsTemplate: TemplateRef<any> = undefined;
@Input()
readonlyFooterButtonsTemplate: TemplateRef<any>;
readonlyFooterButtonsTemplate: TemplateRef<any> = undefined;
@Input()
headerTemplate: TemplateRef<any>;
headerTemplate: TemplateRef<any> = undefined;
constructor(
protected modalController: ModalController,
private _modalsService: ModalsService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class SelectInputComponent implements ControlValueAccessor, OnDestroy, On
titleField = 'title';
@Input()
@BindObservable()
items: SelectInput[];
items: SelectInput[] = undefined;
items$!: Observable<SelectInput[]>;
@BindObservable()
selectedIds: (string | number)[];
Expand All @@ -49,8 +49,6 @@ export class SelectInputComponent implements ControlValueAccessor, OnDestroy, On
this.selectedIds$.pipe(takeUntil(this._destroyed$)).subscribe(ids => {
if (ids !== undefined && !Array.isArray(ids)) {
ids = [ids];
} else {
ids = [];
}
const selectedItems = this.items.filter(item => ids.filter(id => item.id === id).length > 0);
if (this.multiple) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,8 @@
[formGroup]="form"
novalidate>
<prompt-form-modal
[class]="class"
[title]="title"
[message]="message"
[infoMessage]="infoMessage"
[errorMessage]="errorMessage"
[noTitle]="noTitle"
[yesTitle]="yesTitle"
[readonly]="readonly"
(no)="onNoClick()"
(yes)="onYesClick()"
[data]="data"
[processing]="processing$ | async"
[disabled]="disabled"
[iconTopYes]="data.id?'checkmark':'add'"
[hideYes]="hideYes"
[hideNo]="hideNo">
bindIO
[iconTopYes]="data.id?'checkmark':'add'">
<form-group
[checkIsDirty]="checkIsDirty"
[form]="form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { PermissionsService } from '../../../services/permissions.service';
})
export class GroupModalComponent extends BasePromptFormModalComponent<Group> {
@Input()
class: string;
class: string = undefined;
permissions$: Observable<Permission[]>;

constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { TranslateModule } from '@ngx-translate/core';
import { DirectivesModule, PipesModule } from '@rucken/core';
import { NgxBindIOModule } from 'ngx-bind-io';
import { FormGroupModule } from '../../../components/form-group/form-group.module';
import { PromptFormModalModule } from '../../../components/prompt-form-modal/prompt-form-modal.module';
import { SelectInputModule } from '../../../components/select-input/select-input.module';
Expand All @@ -19,7 +20,8 @@ import { GroupModalComponent } from './group-modal.component';
DirectivesModule,
PipesModule,
PromptFormModalModule,
SelectInputModule
SelectInputModule,
NgxBindIOModule
],
declarations: [GroupModalComponent],
entryComponents: [GroupModalComponent],
Expand Down
Loading

0 comments on commit bd0fdad

Please sign in to comment.