mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
[ADF-1586] Updated paths of import statements in docs (#2735)
This commit is contained in:
parent
8834b0c2d2
commit
2f07fa339d
@ -10,7 +10,7 @@ Defines how the input fields of [ADF Form](form.component.md) and
|
||||
```
|
||||
|
||||
```ts
|
||||
import { FORM_FIELD_VALIDATORS } from 'ng2-activiti-form';
|
||||
import { FORM_FIELD_VALIDATORS } from 'lib/core/form/components/widgets/core';
|
||||
|
||||
@Component({...})
|
||||
export class AppComponent {
|
||||
@ -85,7 +85,7 @@ The validator in the example
|
||||
below simply checks that "admin" is not entered into a text field:
|
||||
|
||||
```ts
|
||||
import { FormFieldModel, FormFieldTypes, FormFieldValidator } from 'ng2-activiti-form';
|
||||
import { FormFieldModel, FormFieldTypes, FormFieldValidator } from 'lib/core/form/components/widgets/core';
|
||||
|
||||
export class DemoFieldValidator implements FormFieldValidator {
|
||||
|
||||
|
@ -20,7 +20,7 @@ And also import it in the way shown below.
|
||||
## Importing
|
||||
|
||||
```ts
|
||||
import { ActivitiAlfrescoContentService } from 'ng2-activiti-form/src/services/activiti-alfresco.service';
|
||||
import { ActivitiAlfrescoContentService } from 'lib/core/form/services/activiti-alfresco.service';
|
||||
|
||||
export class SomePageComponent implements OnInit {
|
||||
|
||||
|
@ -65,7 +65,7 @@ Below is a simple example of using the AppConfigService in practice.
|
||||
**app.component.ts**
|
||||
|
||||
```ts
|
||||
import { AppConfigService } from 'ng2-alfresco-core';
|
||||
import { AppConfigService } from 'lib/core/app-config';
|
||||
|
||||
@Component({...})
|
||||
export class AppComponent {
|
||||
|
@ -19,7 +19,7 @@ Provides authentication for use with the Login component.
|
||||
**app.component.ts**
|
||||
|
||||
```ts
|
||||
import { AuthenticationService } from 'ng2-alfresco-core';
|
||||
import { AuthenticationService } from 'lib/core/services';
|
||||
|
||||
@Component({...})
|
||||
export class AppComponent {
|
||||
|
@ -197,7 +197,7 @@ Your model has to extend the **CardViewBaseItemModel** and implement the **CardV
|
||||
*(You can check how the CardViewTextItemModel is implemented for further guidance.)*
|
||||
|
||||
```js
|
||||
import { CardViewBaseItemModel, CardViewItem, DynamicComponentModel } from 'ng2-alfresco-core';
|
||||
import { CardViewBaseItemModel, CardViewItem, DynamicComponentModel } from 'lib/core/card-view';
|
||||
|
||||
export class CardViewStarDateItemModel extends CardViewBaseItemModel implements
|
||||
CardViewItem, DynamicComponentModel {
|
||||
|
@ -81,7 +81,7 @@ You can create custom tooltips for the table cells by providing a `formatTooltip
|
||||
And the code in this case will be similar to the following:
|
||||
|
||||
```ts
|
||||
import { DataColumn, DataRow } from 'ng2-alfresco-datatable';
|
||||
import { DataColumn, DataRow } from 'lib/core/data-column';
|
||||
|
||||
@Component({...})
|
||||
export class MyComponent {
|
||||
|
@ -45,7 +45,7 @@ See it live: [DataTable Quickstart](https://embed.plnkr.co/80qr4YFBeHjLMdAV0F6l/
|
||||
**app.component.ts**
|
||||
|
||||
```ts
|
||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
import { ObjectDataTableAdapter } from 'lib/core/datatable/data';
|
||||
|
||||
@Component({...})
|
||||
export class DataTableDemo {
|
||||
@ -94,7 +94,7 @@ You can also use HTML-based schema declaration like shown below:
|
||||
```
|
||||
|
||||
```ts
|
||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
import { ObjectDataTableAdapter } from 'lib/core/datatable/data';
|
||||
|
||||
@Component({...})
|
||||
export class DataTableDemo {
|
||||
@ -430,7 +430,7 @@ corresponding menu item.
|
||||
```
|
||||
|
||||
```ts
|
||||
import { DataCellEvent, DataRowActionEvent } from 'ng2-alfresco-datatable';
|
||||
import { DataCellEvent, DataRowActionEvent } from 'lib/core/datatable/components/datatable';
|
||||
|
||||
onShowRowActionsMenu(event: DataCellEvent) {
|
||||
let myAction = {
|
||||
|
@ -18,7 +18,7 @@ This action will invoke the `myDocumentActionHandler` function each time it is s
|
||||
from the Document List menu.
|
||||
|
||||
```ts
|
||||
import { DocumentActionsService } from 'ng2-alfresco-documentlist';
|
||||
import { DocumentActionsService } from 'lib/content-services/document-list/services';
|
||||
|
||||
export class MyView {
|
||||
|
||||
|
@ -295,7 +295,7 @@ For the sake of simplicity example below shows only main points you may need to
|
||||
|
||||
```ts
|
||||
import { ChangeDetectorRef } from '@angular/core';
|
||||
import { AlfrescoApiService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoApiService } from 'lib/core/services';
|
||||
|
||||
export class FilesComponent implements OnInit {
|
||||
|
||||
@ -368,7 +368,7 @@ Note the `#documentList` ID we've just added to be able referencing this compone
|
||||
|
||||
```ts
|
||||
import { ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { DocumentListComponent } from 'ng2-alfresco-documentlist';
|
||||
import { DocumentListComponent } from 'lib/content-services/document-list/components';
|
||||
|
||||
@Component({...})
|
||||
export class MyAppComponent implements AfterViewInit {
|
||||
@ -624,7 +624,7 @@ _Note that for the sake of simplicity the example code below was reduced to the
|
||||
**View1.component.ts**
|
||||
|
||||
```ts
|
||||
import { RowFilter, ShareDataRow } from 'ng2-alfresco-documentlist';
|
||||
import { RowFilter, ShareDataRow } from 'lib/content-services/document-list/data';
|
||||
|
||||
export class View1 {
|
||||
|
||||
@ -682,8 +682,8 @@ _Note that for the sake of simplicity the example code below was reduced to the
|
||||
**View1.component.ts**
|
||||
|
||||
```ts
|
||||
import { DataColumn, DataRow } from 'ng2-alfresco-datatable';
|
||||
import { ImageResolver } from 'ng2-alfresco-documentlist';
|
||||
import { DataColumn, DataRow } from 'lib/core/datatable/data';
|
||||
import { ImageResolver } from 'lib/content-services/document-list/data';
|
||||
|
||||
export class View1 {
|
||||
|
||||
|
@ -97,7 +97,7 @@ Every custom widget must inherit `WidgetComponent` class in order to function pr
|
||||
|
||||
```ts
|
||||
import { Component } from '@angular/core';
|
||||
import { WidgetComponent } from 'ng2-activiti-form';
|
||||
import { WidgetComponent } from 'lib/core/form/components/widgets';
|
||||
|
||||
@Component({
|
||||
selector: 'custom-editor',
|
||||
@ -196,7 +196,7 @@ Let's create an Angular 2 component to render missing content:
|
||||
|
||||
```ts
|
||||
import { Component } from '@angular/core';
|
||||
import { WidgetComponent } from 'ng2-activiti-form';
|
||||
import { WidgetComponent } from 'lib/core/form/components/widgets';
|
||||
|
||||
@Component({
|
||||
selector: 'custom-stencil-01',
|
||||
|
@ -18,7 +18,7 @@ This action will invoke the `myFolderActionHandler` function each time it is sel
|
||||
from the Document List menu.
|
||||
|
||||
```ts
|
||||
import { FolderActionsService } from 'ng2-alfresco-documentlist';
|
||||
import { FolderActionsService } from 'lib/content-services/document-list/services';
|
||||
|
||||
export class MyView {
|
||||
|
||||
|
@ -201,7 +201,7 @@ Alternatively you may want just running additional code on outcome execution wit
|
||||
**MyView.component.ts**
|
||||
|
||||
```ts
|
||||
import { FormOutcomeEvent } from 'ng2-activiti-form';
|
||||
import { FormOutcomeEvent } from 'lib/core/form/components/widgets/core';
|
||||
|
||||
export class MyView {
|
||||
|
||||
|
@ -1,21 +1,12 @@
|
||||
# FormService Service
|
||||
# Form service
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
* [Events](#events)
|
||||
* [Methods](#methods)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
Implements Process Services form methods
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```ts
|
||||
import { FormService, FormEvent, FormFieldEvent } from 'ng2-activiti-form';
|
||||
import { FormService } from 'lib/core/form/services';
|
||||
import { FormEvent, FormFieldEvent } from 'lib/core/form/events';
|
||||
|
||||
@Component(...)
|
||||
class MyComponent {
|
||||
|
@ -2,23 +2,12 @@
|
||||
|
||||
Provide a log functionality for your ADF application.
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
* [Log levels](#log-levels)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Basic Usage
|
||||
|
||||
**app.component.ts**
|
||||
|
||||
```ts
|
||||
import { LogService } from 'ng2-alfresco-core';
|
||||
import { LogService } from 'lib/core/services';
|
||||
|
||||
@Component({...})
|
||||
export class AppComponent {
|
||||
|
@ -80,7 +80,7 @@ When designing a component you want to work this directive with, you have two im
|
||||
The component has to implement the NodePermissionSubject interface which basically means it has to have a boolean **disabled** property. This is the property which will be set by the directive.
|
||||
|
||||
```js
|
||||
import { NodePermissionSubject } from 'ng2-alfresco-core';
|
||||
import { NodePermissionSubject } from 'lib/core/directives';
|
||||
|
||||
@Component({...})
|
||||
export class UploadDragAreaComponent implements NodePermissionSubject {
|
||||
@ -98,7 +98,7 @@ The directive will look up the component in the dependency injection tree, up to
|
||||
- because of the emphasized second sentence you have to provide your component as a viewProvider.
|
||||
|
||||
```js
|
||||
import { EXTENDIBLE_COMPONENT } from 'ng2-alfresco-core';
|
||||
import { EXTENDIBLE_COMPONENT } from 'lib/core/interface';
|
||||
|
||||
@Component({
|
||||
...
|
||||
|
@ -101,7 +101,7 @@ use the Nodes Api service to "decode" the ID string into a MinimalNodeEntryEntit
|
||||
```ts
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NodesApiService } from 'ng2-alfresco-core';
|
||||
import { NodesApiService } from 'lib/core/services';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
...
|
||||
|
||||
|
@ -18,7 +18,7 @@ The Notification Service is implemented on top of the Angular 2 Material Design
|
||||
Use this service to show a notification message, and optionally get feedback from it.
|
||||
|
||||
```ts
|
||||
import { NotificationService } from 'ng2-alfresco-core';
|
||||
import { NotificationService } from 'lib/core/services';
|
||||
|
||||
export class MyComponent implements OnInit {
|
||||
|
||||
@ -34,7 +34,7 @@ export class MyComponent implements OnInit {
|
||||
```
|
||||
|
||||
```ts
|
||||
import { NotificationService } from 'ng2-alfresco-core';
|
||||
import { NotificationService } from 'lib/core/services';
|
||||
|
||||
export class MyComponent implements OnInit {
|
||||
|
||||
|
@ -24,7 +24,7 @@ and register its parent `i18n` folder with your component or application module.
|
||||
For example:
|
||||
|
||||
```ts
|
||||
import { TRANSLATION_PROVIDER } from 'ng2-alfresco-core';
|
||||
import { TRANSLATION_PROVIDER } from 'lib/core/services';
|
||||
|
||||
@NgModule({
|
||||
...
|
||||
|
@ -2,16 +2,6 @@
|
||||
|
||||
Stores preferences for components.
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Details](#details)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Details
|
||||
|
||||
The preferences are bound to a particular `prefix` so the application can switch between different profiles on demand.
|
||||
@ -19,7 +9,7 @@ The preferences are bound to a particular `prefix` so the application can switch
|
||||
For example upon login you can set the `prefix` as current username:
|
||||
|
||||
```ts
|
||||
import { UserPreferencesService, AuthenticationService } from 'ng2-alfresco-core';
|
||||
import { UserPreferencesService, AuthenticationService } from 'lib/core/services';
|
||||
|
||||
@Component({...})
|
||||
class AppComponent {
|
||||
|
@ -6,7 +6,7 @@ Base class for standard and custom widget classes.
|
||||
|
||||
```ts
|
||||
import { Component } from '@angular/core';
|
||||
import { WidgetComponent } from 'ng2-activiti-form';
|
||||
import { WidgetComponent } from 'lib/core/form/components/widgets';
|
||||
|
||||
@Component({
|
||||
selector: 'custom-editor',
|
||||
|
Loading…
x
Reference in New Issue
Block a user