Skip to content

Commit

Permalink
Merge pull request #15348 from primefaces/prod
Browse files Browse the repository at this point in the history
Prod
  • Loading branch information
cetincakiroglu authored Apr 24, 2024
2 parents 7c47c3f + a1110cd commit 0fcf6ae
Show file tree
Hide file tree
Showing 9 changed files with 179 additions and 105 deletions.
41 changes: 14 additions & 27 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The MIT License (MIT)

Copyright (c) 2016-2022 PrimeTek
Copyright (c) 2016-2024 PrimeTek

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -30,59 +30,46 @@ The term “Software” includes all source and object code, in whole and/or par

## Summary

* Can be used on unlimited sites and servers
* Source-code cannot be resold or distributed
* Commercial use allowed
* Can modify source-code but cannot distribute modifications (derivative works)
- Can be used on unlimited sites and servers
- Source-code cannot be resold or distributed
- Commercial use allowed
- Can modify source-code but cannot distribute modifications (derivative works)

## Terms and Conditions

1. **License Grant:** Licensor hereby grants Licensee a Personal, Non-assignable and non-transferable, Commercial, Royalty free, Including the rights to create but not distribute derivative works, Non-exclusive license identified with a unique key stated in section 3, all with accordance with the terms set forth and other legal restrictions set forth in 3rd party software used while running Software.

1. **Limited:** Licensee may use Software for the purpose of:

1. Running Software on Licensee’s Website\[s\] and Server\[s\];
2. Allowing 3rd Parties to run Software on Licensee’s Website\[s\] and Server\[s\];
3. Publishing Software’s output to Licensee and 3rd Parties;
4. Distribute verbatim copies of Software’s output (including compiled binaries);
5. Modify Software to suit Licensee’s needs and specifications.

2. **Non Assignable and Non-Transferable:** Licensee may not assign or transfer his rights and duties under this license.

3. **Commercial, Royalty Free:** Licensee may use Software for any purpose, including paid-services, without any royalties

4. **Including the Right to Create Derivative Works:** Licensee may create derivative works based on Software, including amending Software’s source code, modifying it, integrating it into a larger work or removing portions of Software, as long as no distribution of the derivative works is made

2. **Term & Termination:** The Term of this license shall be until terminated. Licensor may terminate this Agreement, including Licensee’s license in the case where Licensee :
1. became insolvent or otherwise entered into any liquidation process; or

2. exported The Software to any jurisdiction where licensor may not enforce his rights under this agreements in; or

3. Licensee was in breach of any of this license's terms and conditions and such breach was not cured, immediately upon notification; or

4. Licensee in breach of any of the terms of clause 2 to this license; or

5. Licensee otherwise entered into any arrangement which caused Licensor to be unable to enforce his rights under this License.

3. **Payment:** In consideration of the License granted under clause 2, Licensee shall pay Licensor a fee, via credit card or any other mean which Licensor may deem adequate. Failure to perform payment shall construe as material breach of this Agreement. Transaction id of the payment is the unique license key granted to Licensee.
4. **Upgrades, Updates and Fixes:** .

1. **Fix:** for the purpose of this license, a fix shall be a minor amendment in The Software, intended to remove bugs or alter minor features which impair the The Software's functionality. A fix shall be marked as a new sub-sub-version number. For example, should Licensee purchase Software under version 1.1.1, an upgrade shall commence under number 1.1.2.

5. **Support:** Software is provided under an AS-IS basis and without any support, updates or maintenance. Nothing in this Agreement shall require Licensor to provide Licensee with support or fixes to any bug, failure, mis-performance or other defect in The Software.

6. **Liability:** To the extent permitted under Law, The Software is provided under an AS-IS basis. Licensor shall never, and without any limit, be liable for any damage, cost, expense or any other payment incurred by Licesee as a result of Software’s actions, failure, bugs and/or any other interaction between The Software and Licesee’s end-equipment, computers, other software or any 3rd party, end-equipment, computer or services. Moreover, Licensor shall never be liable for any defect in source code written by Licensee when relying on The Software or using The Software’s source code.

7. **Warranty:**

1. **Intellectual Property:** Licensor hereby warrants that The Software does not violate or infringe any 3rd party claims in regards to intellectual property, patents and/or trademarks and that to the best of its knowledge no legal action has been taken against it for any infringement or violation of any 3rd party intellectual property rights.

2. **No-Warranty:** The Software is provided without any warranty; Licensor hereby disclaims any warranty that The Software shall be error free, without defects or code which may cause damage to Licensee’s computers or to Licensee, and that Software shall be functional. Licensee shall be solely liable to any damage, defect or loss incurred as a result of operating software and undertake the risks contained in running The Software on License’s Server\[s\] and Website\[s\].

3. **Prior Inspection:** Licensee hereby states that he inspected The Software thoroughly and found it satisfactory and adequate to his needs, that it does not interfere with his regular operation and that it does meet the standards and scope of his computer systems and architecture. Licensee found that The Software interacts with his development, website and server environment and that it does not infringe any of End User License Agreement of any software Licensee may use in performing his services. Licensee hereby waives any claims regarding The Software's incompatibility, performance, results and features, and warrants that he inspected the The Software.

8. **No Refunds:** Licensee warrants that he inspected The Software according to clause 7(c) and that it is adequate to his needs. Accordingly, as The Software is intangible goods, Licensee shall not be, ever, entitled to any refund, rebate, compensation or restitution for any reason whatsoever, even if The Software contains material flaws.

9. **Indemnification:** Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for any lawsuit brought against it in regards to Licensee’s use of The Software in means that violate, breach or otherwise circumvent this license, Licensor's intellectual property rights or Licensor's title in The Software. Licensor shall promptly notify Licensee in case of such legal action and request Licensee’s consent prior to any settlement in relation to such lawsuit or claim.

10. **Governing Law, Jurisdiction:** Licensee hereby agrees not to initiate class-action lawsuits against Licensor in relation to this license and to compensate Licensor for any legal fees, cost or attorney fees should any claim brought by Licensee against Licensor be denied, in part or in full.

10. **Governing Law, Jurisdiction:** Licensee hereby agrees not to initiate class-action lawsuits against Licensor in relation to this license and to compensate Licensor for any legal fees, cost or attorney fees should any claim brought by Licensee against Licensor be denied, in part or in full.
4 changes: 4 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
"rgbcolor"
],
"server": "src/main.server.ts",
"prerender": {
"discoverRoutes": false,
"routesFile": "routes.txt"
},
"ssr": {
"entry": "server.ts"
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"e2e": "ng e2e",
"lint": "ng lint",
"format": "prettier --write \"**/*.{js,ts,d.ts}\"",
"build": "ng build",
"format:check": "prettier --check \"**/*.{js,ts,d.ts}\"",
"build:lib": "npm run build:check && npm run build:package",
"build:package": "BROWSERSLIST_ENV=library ng build primeng-library && gulp build-assets",
"build:check": "npm run format:check && npm run security:check",
"security:check": "npm audit --production --audit-level high",
"apidoc": "node ./api-generator/build-apidoc.ts",
"vercel-build": "ng build"
"apidoc": "node ./api-generator/build-apidoc.ts"
},
"repository": {
"type": "git",
Expand Down
130 changes: 130 additions & 0 deletions routes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
/
/accordion
/animateonscroll
/autocomplete
/autofocus
/avatar
/badge
/blockui
/breadcrumb
/button
/calendar
/card
/carousel
/cascadeselect
/chart
/checkbox
/chip
/chips
/colorpicker
/colors
/configuration
/confirmdialog
/confirmpopup
/contextmenu
/customicons
/dataview
/defer
/dialog
/divider
/dock
/dragdrop
/dropdown
/dynamicdialog
/editor
/fieldset
/fileupload
/filterservice
/floatlabel
/focustrap
/galleria
/guides
/guides/accessibility
/guides/csslayer
/guides/templateupdate
/iconfield
/icons
/image
/inplace
/inputgroup
/inputmask
/inputnumber
/inputotp
/inputswitch
/inputtext
/inputtextarea
/installation
/keyfilter
/knob
/listbox
/lts
/megamenu
/menu
/menubar
/messages
/metergroup
/multiselect
/notfound
/orderlist
/organizationchart
/overlay
/overlaypanel
/paginator
/panel
/panelmenu
/partners
/password
/picklist
/playground
/progressbar
/progressspinner
/radiobutton
/rating
/ripple
/roadmap
/scroller
/scrollpanel
/scrolltop
/selectbutton
/sidebar
/skeleton
/slider
/speeddial
/splitbutton
/splitter
/stepper
/steps
/steps/confirmation
/steps/payment
/steps/personal
/steps/seat
/styleclass
/support
/table
/tabmenu
/tabview
/tag
/team
/templates
/templates/apollo
/templates/atlantis
/templates/avalon
/templates/diamond
/templates/freya
/templates/poseidon
/templates/sakai
/templates/ultima
/templates/verona
/terminal
/theming
/tieredmenu
/timeline
/toast
/togglebutton
/toolbar
/tooltip
/tree
/treeselect
/treetable
/tristatecheckbox
/uikit
28 changes: 20 additions & 8 deletions server.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { APP_BASE_HREF } from '@angular/common';
import { CommonEngine } from '@angular/ssr';
import express from 'express';
import { join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { dirname, join, resolve } from 'node:path';
import bootstrap from './src/main.server';
import { environment } from 'src/environments/environment';

// The Express app is exported so that it can be used by serverless Functions.
export function app(): express.Express {
const server = express();
const distFolder = join(process.cwd(), 'dist/primeng/browser');
const indexHtml = join(distFolder, 'index.html');
const serverDistFolder = dirname(fileURLToPath(import.meta.url));
const browserDistFolder = resolve(serverDistFolder, '../browser');
const indexHtml = join(serverDistFolder, 'index.server.html');

const commonEngine = new CommonEngine();

server.set('view engine', 'html');
server.set('views', distFolder);
server.set('views', browserDistFolder);

// Example Express Rest API endpoints
// server.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get(
'*.*',
express.static(distFolder, {
express.static(browserDistFolder, {
maxAge: '1y'
})
);
Expand All @@ -35,7 +35,7 @@ export function app(): express.Express {
bootstrap,
documentFilePath: indexHtml,
url: `${protocol}://${headers.host}${originalUrl}`,
publicPath: distFolder,
publicPath: browserDistFolder,
providers: [{ provide: APP_BASE_HREF, useValue: baseUrl }]
})
.then((html) => res.send(html))
Expand All @@ -44,3 +44,15 @@ export function app(): express.Express {

return server;
}

function run(): void {
const port = process.env['PORT'] || 4000;

// Start up the Node server
const server = app();
server.listen(port, () => {
console.log(`Node Express server listening on http://localhost:${port}`);
});
}

run();
28 changes: 8 additions & 20 deletions src/app/showcase/doc/icons/listdoc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectorRef, Component } from '@angular/core';
import { IconService } from '../../service/iconservice';
import { Component } from '@angular/core';
import { default as IconData } from 'src/assets/showcase/data/icons.json';

@Component({
selector: 'list-doc',
Expand All @@ -21,31 +21,19 @@ import { IconService } from '../../service/iconservice';
`
})
export class ListDoc {
icons: any[];
icons: any;

filteredIcons: any[];

selectedIcon: any;

constructor(private iconService: IconService, private cd: ChangeDetectorRef) {}

ngOnInit() {
this.iconService.getIcons().subscribe((data) => {
data = data.filter((value) => {
return value.icon.tags.indexOf('deprecate') === -1;
});

let icons = data;
icons.sort((icon1, icon2) => {
if (icon1.properties.name < icon2.properties.name) return -1;
else if (icon1.properties.name < icon2.properties.name) return 1;
else return 0;
});

this.icons = icons;
this.filteredIcons = data;
this.cd.markForCheck();
this.icons = IconData.icons.sort((icon1, icon2) => {
if (icon1.properties.name < icon2.properties.name) return -1;
else if (icon1.properties.name < icon2.properties.name) return 1;
else return 0;
});
this.filteredIcons = IconData.icons;
}

onFilter(event: KeyboardEvent): void {
Expand Down
3 changes: 1 addition & 2 deletions src/app/showcase/layout/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { CarService } from '../service/carservice';
import { CountryService } from '../service/countryservice';
import { CustomerService } from '../service/customerservice';
import { EventService } from '../service/eventservice';
import { IconService } from '../service/iconservice';
import { NodeService } from '../service/nodeservice';
import { PhotoService } from '../service/photoservice';
import { ProductService } from '../service/productservice';
Expand All @@ -25,7 +24,7 @@ import { AppTopBarComponent } from './topbar/app.topbar.component';
templateUrl: './app.component.html',
standalone: true,
imports: [RouterOutlet, FormsModule, ReactiveFormsModule, HttpClientModule, AppMainComponent, LandingComponent, AppNewsComponent, AppConfigComponent, AppTopBarComponent, AppMenuComponent],
providers: [CarService, CountryService, EventService, NodeService, IconService, CustomerService, PhotoService, AppConfigService, ProductService]
providers: [CarService, CountryService, EventService, NodeService, CustomerService, PhotoService, AppConfigService, ProductService]
})
export class AppComponent implements OnInit {
constructor(@Inject(DOCUMENT) private document: Document, private renderer: Renderer2, private primeng: PrimeNGConfig, private configService: AppConfigService, private router: Router, @Inject(PLATFORM_ID) private platformId: any) {
Expand Down
30 changes: 0 additions & 30 deletions src/app/showcase/service/iconservice.ts

This file was deleted.

Loading

0 comments on commit 0fcf6ae

Please sign in to comment.