diff --git a/How to/Download start event/.editorconfig b/How to/Download start event/.editorconfig new file mode 100644 index 0000000..59d9a3a --- /dev/null +++ b/How to/Download start event/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/How to/Download start event/.gitignore b/How to/Download start event/.gitignore new file mode 100644 index 0000000..0711527 --- /dev/null +++ b/How to/Download start event/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/How to/Download start event/README.md b/How to/Download start event/README.md new file mode 100644 index 0000000..b2cbbe3 --- /dev/null +++ b/How to/Download start event/README.md @@ -0,0 +1,27 @@ +# Getting started + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.4. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/How to/Download start event/angular.json b/How to/Download start event/angular.json new file mode 100644 index 0000000..419ea66 --- /dev/null +++ b/How to/Download start event/angular.json @@ -0,0 +1,101 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "my-app": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/my-app", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "browserTarget": "my-app:build:production" + }, + "development": { + "browserTarget": "my-app:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "my-app:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": "8d9c65e2-01c9-4a66-bc68-685c535cc647" + } +} diff --git a/How to/Download start event/package.json b/How to/Download start event/package.json new file mode 100644 index 0000000..052728f --- /dev/null +++ b/How to/Download start event/package.json @@ -0,0 +1,39 @@ +{ + "name": "my-app", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^15.0.0", + "@angular/common": "^15.0.0", + "@angular/compiler": "^15.0.0", + "@angular/core": "^15.0.0", + "@angular/forms": "^15.0.0", + "@angular/platform-browser": "^15.0.0", + "@angular/platform-browser-dynamic": "^15.0.0", + "@angular/router": "^15.0.0", + "@syncfusion/ej2-angular-pdfviewer": "*", + "rxjs": "~7.5.0", + "tslib": "^2.3.0", + "zone.js": "~0.12.0" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.0.4", + "@angular/cli": "~15.0.4", + "@angular/compiler-cli": "^15.0.0", + "@types/jasmine": "~4.3.0", + "jasmine-core": "~4.5.0", + "karma": "~6.4.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.0.0", + "typescript": "~4.8.2" + } +} diff --git a/How to/Download start event/src/app/app.component.css b/How to/Download start event/src/app/app.component.css new file mode 100644 index 0000000..e69de29 diff --git a/How to/Download start event/src/app/app.component.html b/How to/Download start event/src/app/app.component.html new file mode 100644 index 0000000..e4e763e --- /dev/null +++ b/How to/Download start event/src/app/app.component.html @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + +
+ + +
+ + + Rocket Ship + + + + + + + + + + {{ title }} app is running! + + + Rocket Ship Smoke + + + +
+ + +

Resources

+

Here are some links to help you get started:

+ +
+ + + Learn Angular + + + + + CLI Documentation + + + + + + Angular Material + + + + + + Angular Blog + + + + + + Angular DevTools + + + +
+ + +

Next Steps

+

What do you want to do next with your app?

+ + + +
+ + + + + + + + + + + +
+ + +
+
ng generate component xyz
+
ng add @angular/material
+
ng add @angular/pwa
+
ng add _____
+
ng test
+
ng build
+
+ + +
+ + + Meetup Logo + + + + + + + Discord Logo + + + + +
+ + + + + + Gray Clouds Background + + + +
+ + + + + + + + + diff --git a/How to/Download start event/src/app/app.component.spec.ts b/How to/Download start event/src/app/app.component.spec.ts new file mode 100644 index 0000000..03e0fd7 --- /dev/null +++ b/How to/Download start event/src/app/app.component.spec.ts @@ -0,0 +1,31 @@ +import { TestBed } from '@angular/core/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + }).compileComponents(); + }); + + it('should create the app', () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); + + it(`should have as title 'my-app'`, () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app.title).toEqual('my-app'); + }); + + it('should render title', () => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('.content span')?.textContent).toContain('my-app app is running!'); + }); +}); diff --git a/How to/Download start event/src/app/app.component.ts b/How to/Download start event/src/app/app.component.ts new file mode 100644 index 0000000..56eb011 --- /dev/null +++ b/How to/Download start event/src/app/app.component.ts @@ -0,0 +1,61 @@ +import { Component, OnInit, ViewEncapsulation, ViewChild } from '@angular/core'; +import { + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + AnnotationService, + TextSearchService, + TextSelectionService, + FormFieldsService, + FormDesignerService, + PrintService, + PageOrganizerService +} from '@syncfusion/ej2-angular-pdfviewer'; + +@Component({ + selector: 'app-root', + template: `
+ + + +
`, + encapsulation: ViewEncapsulation.None, + + providers: [ + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService, + AnnotationService, + FormFieldsService, + FormDesignerService, + PageOrganizerService + ], +}) + + +export class AppComponent implements OnInit { + public document = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf'; + public resource: string = 'https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib'; + + ngOnInit(): void { + } + + public downloadStart(args: any): void { + // Your custom logic here + args.cancel = true; // Prevent download action + } + +} \ No newline at end of file diff --git a/How to/Download start event/src/app/app.module.ts b/How to/Download start event/src/app/app.module.ts new file mode 100644 index 0000000..fadea53 --- /dev/null +++ b/How to/Download start event/src/app/app.module.ts @@ -0,0 +1,36 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { + PdfViewerModule, + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService +} from '@syncfusion/ej2-angular-pdfviewer'; +import { AppComponent } from './app.component'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + PdfViewerModule + ], + providers: [LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/How to/Download start event/src/assets/.gitkeep b/How to/Download start event/src/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/How to/Download start event/src/favicon.ico b/How to/Download start event/src/favicon.ico new file mode 100644 index 0000000..997406a Binary files /dev/null and b/How to/Download start event/src/favicon.ico differ diff --git a/How to/Download start event/src/index.html b/How to/Download start event/src/index.html new file mode 100644 index 0000000..7fa8cd9 --- /dev/null +++ b/How to/Download start event/src/index.html @@ -0,0 +1,13 @@ + + + + + MyApp + + + + + + + + diff --git a/How to/Download start event/src/main.ts b/How to/Download start event/src/main.ts new file mode 100644 index 0000000..c58dc05 --- /dev/null +++ b/How to/Download start event/src/main.ts @@ -0,0 +1,7 @@ +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; + + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); diff --git a/How to/Download start event/src/styles.css b/How to/Download start event/src/styles.css new file mode 100644 index 0000000..fc9d8ef --- /dev/null +++ b/How to/Download start event/src/styles.css @@ -0,0 +1,10 @@ +/* You can add global styles to this file, and also import other style files */ +@import '../node_modules/@syncfusion/ej2-base/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-popups/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-pdfviewer/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-notifications/styles/material.css'; \ No newline at end of file diff --git a/How to/Download start event/tsconfig.app.json b/How to/Download start event/tsconfig.app.json new file mode 100644 index 0000000..374cc9d --- /dev/null +++ b/How to/Download start event/tsconfig.app.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/How to/Download start event/tsconfig.json b/How to/Download start event/tsconfig.json new file mode 100644 index 0000000..ed966d4 --- /dev/null +++ b/How to/Download start event/tsconfig.json @@ -0,0 +1,33 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/How to/Download start event/tsconfig.spec.json b/How to/Download start event/tsconfig.spec.json new file mode 100644 index 0000000..be7e9da --- /dev/null +++ b/How to/Download start event/tsconfig.spec.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/How to/Min and Max zoom/.editorconfig b/How to/Min and Max zoom/.editorconfig new file mode 100644 index 0000000..59d9a3a --- /dev/null +++ b/How to/Min and Max zoom/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/How to/Min and Max zoom/.gitignore b/How to/Min and Max zoom/.gitignore new file mode 100644 index 0000000..0711527 --- /dev/null +++ b/How to/Min and Max zoom/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/How to/Min and Max zoom/README.md b/How to/Min and Max zoom/README.md new file mode 100644 index 0000000..b2cbbe3 --- /dev/null +++ b/How to/Min and Max zoom/README.md @@ -0,0 +1,27 @@ +# Getting started + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.4. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/How to/Min and Max zoom/angular.json b/How to/Min and Max zoom/angular.json new file mode 100644 index 0000000..419ea66 --- /dev/null +++ b/How to/Min and Max zoom/angular.json @@ -0,0 +1,101 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "my-app": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/my-app", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "browserTarget": "my-app:build:production" + }, + "development": { + "browserTarget": "my-app:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "my-app:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": "8d9c65e2-01c9-4a66-bc68-685c535cc647" + } +} diff --git a/How to/Min and Max zoom/package.json b/How to/Min and Max zoom/package.json new file mode 100644 index 0000000..052728f --- /dev/null +++ b/How to/Min and Max zoom/package.json @@ -0,0 +1,39 @@ +{ + "name": "my-app", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^15.0.0", + "@angular/common": "^15.0.0", + "@angular/compiler": "^15.0.0", + "@angular/core": "^15.0.0", + "@angular/forms": "^15.0.0", + "@angular/platform-browser": "^15.0.0", + "@angular/platform-browser-dynamic": "^15.0.0", + "@angular/router": "^15.0.0", + "@syncfusion/ej2-angular-pdfviewer": "*", + "rxjs": "~7.5.0", + "tslib": "^2.3.0", + "zone.js": "~0.12.0" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.0.4", + "@angular/cli": "~15.0.4", + "@angular/compiler-cli": "^15.0.0", + "@types/jasmine": "~4.3.0", + "jasmine-core": "~4.5.0", + "karma": "~6.4.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.0.0", + "typescript": "~4.8.2" + } +} diff --git a/How to/Min and Max zoom/src/app/app.component.css b/How to/Min and Max zoom/src/app/app.component.css new file mode 100644 index 0000000..e69de29 diff --git a/How to/Min and Max zoom/src/app/app.component.html b/How to/Min and Max zoom/src/app/app.component.html new file mode 100644 index 0000000..e4e763e --- /dev/null +++ b/How to/Min and Max zoom/src/app/app.component.html @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + +
+ + +
+ + + Rocket Ship + + + + + + + + + + {{ title }} app is running! + + + Rocket Ship Smoke + + + +
+ + +

Resources

+

Here are some links to help you get started:

+ +
+ + + Learn Angular + + + + + CLI Documentation + + + + + + Angular Material + + + + + + Angular Blog + + + + + + Angular DevTools + + + +
+ + +

Next Steps

+

What do you want to do next with your app?

+ + + +
+ + + + + + + + + + + +
+ + +
+
ng generate component xyz
+
ng add @angular/material
+
ng add @angular/pwa
+
ng add _____
+
ng test
+
ng build
+
+ + +
+ + + Meetup Logo + + + + + + + Discord Logo + + + + +
+ + + + + + Gray Clouds Background + + + +
+ + + + + + + + + diff --git a/How to/Min and Max zoom/src/app/app.component.spec.ts b/How to/Min and Max zoom/src/app/app.component.spec.ts new file mode 100644 index 0000000..03e0fd7 --- /dev/null +++ b/How to/Min and Max zoom/src/app/app.component.spec.ts @@ -0,0 +1,31 @@ +import { TestBed } from '@angular/core/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + }).compileComponents(); + }); + + it('should create the app', () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); + + it(`should have as title 'my-app'`, () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app.title).toEqual('my-app'); + }); + + it('should render title', () => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('.content span')?.textContent).toContain('my-app app is running!'); + }); +}); diff --git a/How to/Min and Max zoom/src/app/app.component.ts b/How to/Min and Max zoom/src/app/app.component.ts new file mode 100644 index 0000000..a646466 --- /dev/null +++ b/How to/Min and Max zoom/src/app/app.component.ts @@ -0,0 +1,58 @@ +import { Component, OnInit, ViewEncapsulation, ViewChild } from '@angular/core'; +import { + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + AnnotationService, + TextSearchService, + TextSelectionService, + FormFieldsService, + FormDesignerService, + PrintService, + PageOrganizerService +} from '@syncfusion/ej2-angular-pdfviewer'; + +@Component({ + selector: 'app-root', + template: `
+ + + +
`, + encapsulation: ViewEncapsulation.None, + + providers: [ + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService, + AnnotationService, + FormFieldsService, + FormDesignerService, + PageOrganizerService + ], +}) + + +export class AppComponent implements OnInit { + public document = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf'; + public resource: string = 'https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib'; + public maxZoom = 270; + public minZoom = 45; + + ngOnInit(): void { + } +} \ No newline at end of file diff --git a/How to/Min and Max zoom/src/app/app.module.ts b/How to/Min and Max zoom/src/app/app.module.ts new file mode 100644 index 0000000..fadea53 --- /dev/null +++ b/How to/Min and Max zoom/src/app/app.module.ts @@ -0,0 +1,36 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { + PdfViewerModule, + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService +} from '@syncfusion/ej2-angular-pdfviewer'; +import { AppComponent } from './app.component'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + PdfViewerModule + ], + providers: [LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/How to/Min and Max zoom/src/assets/.gitkeep b/How to/Min and Max zoom/src/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/How to/Min and Max zoom/src/favicon.ico b/How to/Min and Max zoom/src/favicon.ico new file mode 100644 index 0000000..997406a Binary files /dev/null and b/How to/Min and Max zoom/src/favicon.ico differ diff --git a/How to/Min and Max zoom/src/index.html b/How to/Min and Max zoom/src/index.html new file mode 100644 index 0000000..7fa8cd9 --- /dev/null +++ b/How to/Min and Max zoom/src/index.html @@ -0,0 +1,13 @@ + + + + + MyApp + + + + + + + + diff --git a/How to/Min and Max zoom/src/main.ts b/How to/Min and Max zoom/src/main.ts new file mode 100644 index 0000000..c58dc05 --- /dev/null +++ b/How to/Min and Max zoom/src/main.ts @@ -0,0 +1,7 @@ +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; + + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); diff --git a/How to/Min and Max zoom/src/styles.css b/How to/Min and Max zoom/src/styles.css new file mode 100644 index 0000000..fc9d8ef --- /dev/null +++ b/How to/Min and Max zoom/src/styles.css @@ -0,0 +1,10 @@ +/* You can add global styles to this file, and also import other style files */ +@import '../node_modules/@syncfusion/ej2-base/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-popups/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-pdfviewer/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-notifications/styles/material.css'; \ No newline at end of file diff --git a/How to/Min and Max zoom/tsconfig.app.json b/How to/Min and Max zoom/tsconfig.app.json new file mode 100644 index 0000000..374cc9d --- /dev/null +++ b/How to/Min and Max zoom/tsconfig.app.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/How to/Min and Max zoom/tsconfig.json b/How to/Min and Max zoom/tsconfig.json new file mode 100644 index 0000000..ed966d4 --- /dev/null +++ b/How to/Min and Max zoom/tsconfig.json @@ -0,0 +1,33 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/How to/Min and Max zoom/tsconfig.spec.json b/How to/Min and Max zoom/tsconfig.spec.json new file mode 100644 index 0000000..be7e9da --- /dev/null +++ b/How to/Min and Max zoom/tsconfig.spec.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/How to/Organize pdf/src/app/app.component.ts b/How to/Organize pdf/src/app/app.component.ts index 05bf229..3365eac 100644 --- a/How to/Organize pdf/src/app/app.component.ts +++ b/How to/Organize pdf/src/app/app.component.ts @@ -19,10 +19,14 @@ import { selector: 'app-root', // specifies the template string for the PDF Viewer component template: `
+
`, @@ -43,7 +47,8 @@ import { }) export class AppComponent implements OnInit { public document = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf'; - public resource: string = 'https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib';; + public resource: string = 'https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib'; + public pageOrganizerSettings = { canDelete: true, canInsert: true, canRotate: true, canCopy: true, canRearrange: true }; ngOnInit(): void { } @@ -57,4 +62,9 @@ export class AppComponent implements OnInit { viewer.isPageOrganizerOpen = false; } } + closePageOrganizer() { + var viewer = (document.getElementById('pdfViewer')).ej2_instances[0]; + // Close Page Organizer panel. + viewer.pageOrganizer.closePageOrganizer(); + } } \ No newline at end of file diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/.editorconfig b/How to/Restrict Zoom Percentage on Mobile Devices/.editorconfig new file mode 100644 index 0000000..59d9a3a --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/.gitignore b/How to/Restrict Zoom Percentage on Mobile Devices/.gitignore new file mode 100644 index 0000000..0711527 --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/README.md b/How to/Restrict Zoom Percentage on Mobile Devices/README.md new file mode 100644 index 0000000..b2cbbe3 --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/README.md @@ -0,0 +1,27 @@ +# Getting started + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.4. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/angular.json b/How to/Restrict Zoom Percentage on Mobile Devices/angular.json new file mode 100644 index 0000000..419ea66 --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/angular.json @@ -0,0 +1,101 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "my-app": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/my-app", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "browserTarget": "my-app:build:production" + }, + "development": { + "browserTarget": "my-app:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "my-app:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": "8d9c65e2-01c9-4a66-bc68-685c535cc647" + } +} diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/package.json b/How to/Restrict Zoom Percentage on Mobile Devices/package.json new file mode 100644 index 0000000..77d71aa --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/package.json @@ -0,0 +1,40 @@ +{ + "name": "my-app", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^15.0.0", + "@angular/common": "^15.0.0", + "@angular/compiler": "^15.0.0", + "@angular/core": "^15.0.0", + "@angular/forms": "^15.0.0", + "@angular/platform-browser": "^15.0.0", + "@angular/platform-browser-dynamic": "^15.0.0", + "@angular/router": "^15.0.0", + "@syncfusion/ej2-angular-pdfviewer": "*", + "@syncfusion/ej2-base": "*", + "rxjs": "~7.5.0", + "tslib": "^2.3.0", + "zone.js": "~0.12.0" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.0.4", + "@angular/cli": "~15.0.4", + "@angular/compiler-cli": "^15.0.0", + "@types/jasmine": "~4.3.0", + "jasmine-core": "~4.5.0", + "karma": "~6.4.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.0.0", + "typescript": "~4.8.2" + } +} diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.css b/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.css new file mode 100644 index 0000000..e69de29 diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.html b/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.html new file mode 100644 index 0000000..e4e763e --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.html @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + +
+ + +
+ + + Rocket Ship + + + + + + + + + + {{ title }} app is running! + + + Rocket Ship Smoke + + + +
+ + +

Resources

+

Here are some links to help you get started:

+ + + + +

Next Steps

+

What do you want to do next with your app?

+ + + +
+ + + + + + + + + + + +
+ + +
+
ng generate component xyz
+
ng add @angular/material
+
ng add @angular/pwa
+
ng add _____
+
ng test
+
ng build
+
+ + + + + + + + + Gray Clouds Background + + + +
+ + + + + + + + + diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.spec.ts b/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.spec.ts new file mode 100644 index 0000000..03e0fd7 --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.spec.ts @@ -0,0 +1,31 @@ +import { TestBed } from '@angular/core/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + }).compileComponents(); + }); + + it('should create the app', () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); + + it(`should have as title 'my-app'`, () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app.title).toEqual('my-app'); + }); + + it('should render title', () => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('.content span')?.textContent).toContain('my-app app is running!'); + }); +}); diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.ts b/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.ts new file mode 100644 index 0000000..b4ca092 --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.component.ts @@ -0,0 +1,61 @@ +import { Component, OnInit } from '@angular/core'; +import { + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + AnnotationService, + TextSearchService, + TextSelectionService, + FormFieldsService, + FormDesignerService, + PrintService, + PageOrganizerService +} from '@syncfusion/ej2-angular-pdfviewer'; +import {Browser} from '@syncfusion/ej2-base'; + +@Component({ + selector: 'app-root', + // specifies the template string for the PDF Viewer component + template: `
+ + +
`, + providers: [ + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + AnnotationService, + TextSearchService, + TextSelectionService, + FormFieldsService, + FormDesignerService, + PrintService, + PageOrganizerService] +}) +export class AppComponent implements OnInit { + public document = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf'; + public resource: string = 'https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib';; + ngOnInit(): void { + } + + public documentLoaded(args: any): void { + var viewer = (document.getElementById('pdfViewer')).ej2_instances[0]; + if (Browser.isDevice && !viewer.enableDesktopMode) { + viewer.maxZoom = 200; + viewer.minZoom = 10; + } + else { + viewer.zoomMode = 'Default'; + } + } +} \ No newline at end of file diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.module.ts b/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.module.ts new file mode 100644 index 0000000..ab3a2ae --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/src/app/app.module.ts @@ -0,0 +1,38 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { + PdfViewerModule, + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService, + PageOrganizerService +} from '@syncfusion/ej2-angular-pdfviewer'; +import { AppComponent } from './app.component'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + PdfViewerModule + ], + providers: [LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService, + PageOrganizerService], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/assets/.gitkeep b/How to/Restrict Zoom Percentage on Mobile Devices/src/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/favicon.ico b/How to/Restrict Zoom Percentage on Mobile Devices/src/favicon.ico new file mode 100644 index 0000000..997406a Binary files /dev/null and b/How to/Restrict Zoom Percentage on Mobile Devices/src/favicon.ico differ diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/index.html b/How to/Restrict Zoom Percentage on Mobile Devices/src/index.html new file mode 100644 index 0000000..7fa8cd9 --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/src/index.html @@ -0,0 +1,13 @@ + + + + + MyApp + + + + + + + + diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/main.ts b/How to/Restrict Zoom Percentage on Mobile Devices/src/main.ts new file mode 100644 index 0000000..c58dc05 --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/src/main.ts @@ -0,0 +1,7 @@ +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; + + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/src/styles.css b/How to/Restrict Zoom Percentage on Mobile Devices/src/styles.css new file mode 100644 index 0000000..fc9d8ef --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/src/styles.css @@ -0,0 +1,10 @@ +/* You can add global styles to this file, and also import other style files */ +@import '../node_modules/@syncfusion/ej2-base/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-popups/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-pdfviewer/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-notifications/styles/material.css'; \ No newline at end of file diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/tsconfig.app.json b/How to/Restrict Zoom Percentage on Mobile Devices/tsconfig.app.json new file mode 100644 index 0000000..374cc9d --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/tsconfig.app.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/tsconfig.json b/How to/Restrict Zoom Percentage on Mobile Devices/tsconfig.json new file mode 100644 index 0000000..ed966d4 --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/tsconfig.json @@ -0,0 +1,33 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/How to/Restrict Zoom Percentage on Mobile Devices/tsconfig.spec.json b/How to/Restrict Zoom Percentage on Mobile Devices/tsconfig.spec.json new file mode 100644 index 0000000..be7e9da --- /dev/null +++ b/How to/Restrict Zoom Percentage on Mobile Devices/tsconfig.spec.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/How to/selectSignature and unSelectSignature Event/.editorconfig b/How to/selectSignature and unSelectSignature Event/.editorconfig new file mode 100644 index 0000000..59d9a3a --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/How to/selectSignature and unSelectSignature Event/.gitignore b/How to/selectSignature and unSelectSignature Event/.gitignore new file mode 100644 index 0000000..0711527 --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/How to/selectSignature and unSelectSignature Event/README.md b/How to/selectSignature and unSelectSignature Event/README.md new file mode 100644 index 0000000..b2cbbe3 --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/README.md @@ -0,0 +1,27 @@ +# Getting started + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.4. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/How to/selectSignature and unSelectSignature Event/angular.json b/How to/selectSignature and unSelectSignature Event/angular.json new file mode 100644 index 0000000..419ea66 --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/angular.json @@ -0,0 +1,101 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "my-app": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/my-app", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "browserTarget": "my-app:build:production" + }, + "development": { + "browserTarget": "my-app:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "my-app:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + } + } + } + } + }, + "cli": { + "analytics": "8d9c65e2-01c9-4a66-bc68-685c535cc647" + } +} diff --git a/How to/selectSignature and unSelectSignature Event/package.json b/How to/selectSignature and unSelectSignature Event/package.json new file mode 100644 index 0000000..052728f --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/package.json @@ -0,0 +1,39 @@ +{ + "name": "my-app", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "^15.0.0", + "@angular/common": "^15.0.0", + "@angular/compiler": "^15.0.0", + "@angular/core": "^15.0.0", + "@angular/forms": "^15.0.0", + "@angular/platform-browser": "^15.0.0", + "@angular/platform-browser-dynamic": "^15.0.0", + "@angular/router": "^15.0.0", + "@syncfusion/ej2-angular-pdfviewer": "*", + "rxjs": "~7.5.0", + "tslib": "^2.3.0", + "zone.js": "~0.12.0" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.0.4", + "@angular/cli": "~15.0.4", + "@angular/compiler-cli": "^15.0.0", + "@types/jasmine": "~4.3.0", + "jasmine-core": "~4.5.0", + "karma": "~6.4.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.0.0", + "typescript": "~4.8.2" + } +} diff --git a/How to/selectSignature and unSelectSignature Event/src/app/app.component.css b/How to/selectSignature and unSelectSignature Event/src/app/app.component.css new file mode 100644 index 0000000..e69de29 diff --git a/How to/selectSignature and unSelectSignature Event/src/app/app.component.html b/How to/selectSignature and unSelectSignature Event/src/app/app.component.html new file mode 100644 index 0000000..e4e763e --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/src/app/app.component.html @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + +
+ + +
+ + + Rocket Ship + + + + + + + + + + {{ title }} app is running! + + + Rocket Ship Smoke + + + +
+ + +

Resources

+

Here are some links to help you get started:

+ + + + +

Next Steps

+

What do you want to do next with your app?

+ + + +
+ + + + + + + + + + + +
+ + +
+
ng generate component xyz
+
ng add @angular/material
+
ng add @angular/pwa
+
ng add _____
+
ng test
+
ng build
+
+ + + + + + + + + Gray Clouds Background + + + +
+ + + + + + + + + diff --git a/How to/selectSignature and unSelectSignature Event/src/app/app.component.spec.ts b/How to/selectSignature and unSelectSignature Event/src/app/app.component.spec.ts new file mode 100644 index 0000000..03e0fd7 --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/src/app/app.component.spec.ts @@ -0,0 +1,31 @@ +import { TestBed } from '@angular/core/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + }).compileComponents(); + }); + + it('should create the app', () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); + + it(`should have as title 'my-app'`, () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app.title).toEqual('my-app'); + }); + + it('should render title', () => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('.content span')?.textContent).toContain('my-app app is running!'); + }); +}); diff --git a/How to/selectSignature and unSelectSignature Event/src/app/app.component.ts b/How to/selectSignature and unSelectSignature Event/src/app/app.component.ts new file mode 100644 index 0000000..7ccdc14 --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/src/app/app.component.ts @@ -0,0 +1,64 @@ +import { Component, OnInit, ViewEncapsulation, ViewChild } from '@angular/core'; +import { + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + AnnotationService, + TextSearchService, + TextSelectionService, + FormFieldsService, + FormDesignerService, + PrintService, + PageOrganizerService +} from '@syncfusion/ej2-angular-pdfviewer'; + +@Component({ + selector: 'app-root', + template: `
+ + + +
`, + encapsulation: ViewEncapsulation.None, + + providers: [ + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService, + AnnotationService, + FormFieldsService, + FormDesignerService, + PageOrganizerService + ], +}) + + +export class AppComponent implements OnInit { + public document = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf'; + public resource: string = 'https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib'; + ; + ngOnInit(): void { + } + public signatureSelect(args: any): void { + console.log('Signature selected:', args); + } + + public signatureUnselect(args: any): void { + console.log('Signature unselected:', args); + } + +} \ No newline at end of file diff --git a/How to/selectSignature and unSelectSignature Event/src/app/app.module.ts b/How to/selectSignature and unSelectSignature Event/src/app/app.module.ts new file mode 100644 index 0000000..fadea53 --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/src/app/app.module.ts @@ -0,0 +1,36 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { + PdfViewerModule, + LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService +} from '@syncfusion/ej2-angular-pdfviewer'; +import { AppComponent } from './app.component'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + PdfViewerModule + ], + providers: [LinkAnnotationService, + BookmarkViewService, + MagnificationService, + ThumbnailViewService, + ToolbarService, + NavigationService, + TextSearchService, + TextSelectionService, + PrintService], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/How to/selectSignature and unSelectSignature Event/src/assets/.gitkeep b/How to/selectSignature and unSelectSignature Event/src/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/How to/selectSignature and unSelectSignature Event/src/favicon.ico b/How to/selectSignature and unSelectSignature Event/src/favicon.ico new file mode 100644 index 0000000..997406a Binary files /dev/null and b/How to/selectSignature and unSelectSignature Event/src/favicon.ico differ diff --git a/How to/selectSignature and unSelectSignature Event/src/index.html b/How to/selectSignature and unSelectSignature Event/src/index.html new file mode 100644 index 0000000..7fa8cd9 --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/src/index.html @@ -0,0 +1,13 @@ + + + + + MyApp + + + + + + + + diff --git a/How to/selectSignature and unSelectSignature Event/src/main.ts b/How to/selectSignature and unSelectSignature Event/src/main.ts new file mode 100644 index 0000000..c58dc05 --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/src/main.ts @@ -0,0 +1,7 @@ +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; + + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); diff --git a/How to/selectSignature and unSelectSignature Event/src/styles.css b/How to/selectSignature and unSelectSignature Event/src/styles.css new file mode 100644 index 0000000..fc9d8ef --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/src/styles.css @@ -0,0 +1,10 @@ +/* You can add global styles to this file, and also import other style files */ +@import '../node_modules/@syncfusion/ej2-base/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-popups/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-pdfviewer/styles/material.css'; +@import '../node_modules/@syncfusion/ej2-notifications/styles/material.css'; \ No newline at end of file diff --git a/How to/selectSignature and unSelectSignature Event/tsconfig.app.json b/How to/selectSignature and unSelectSignature Event/tsconfig.app.json new file mode 100644 index 0000000..374cc9d --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/tsconfig.app.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/How to/selectSignature and unSelectSignature Event/tsconfig.json b/How to/selectSignature and unSelectSignature Event/tsconfig.json new file mode 100644 index 0000000..ed966d4 --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/tsconfig.json @@ -0,0 +1,33 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/How to/selectSignature and unSelectSignature Event/tsconfig.spec.json b/How to/selectSignature and unSelectSignature Event/tsconfig.spec.json new file mode 100644 index 0000000..be7e9da --- /dev/null +++ b/How to/selectSignature and unSelectSignature Event/tsconfig.spec.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +}