Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Commit

Permalink
remove mansory lib
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuamshana committed Jun 26, 2022
1 parent 944551c commit b1f03e0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 111 deletions.
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smartstock-web",
"version": "1.0.0",
"version": "1.0.1",
"scripts": {
"ng": "ng",
"box": "yarn install && yarn start",
Expand All @@ -25,14 +25,12 @@
"@angular/router": "^14.0.3",
"bfast": "6.0.1",
"comlink": "^4.3.1",
"masonry-layout": "4.2.2",
"moment": "2.29.3",
"ngx-infinite-scroll": "13.0.2",
"ngx-masonry": "13.0.0",
"rxjs": "~7.4.0",
"smartstock-accounts": "1.0.0",
"smartstock-core": "1.0.1",
"smartstock-shop": "1.0.0",
"smartstock-accounts": "1.0.1",
"smartstock-core": "1.0.2",
"smartstock-shop": "1.0.1",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/web-mock/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const routes: Routes = [
{
path: "account",
loadChildren: () =>
import("smartstockt-accounts").then((mod) => mod.AccountModule)
import("smartstock-accounts").then((mod) => mod.AccountModule)
}
];

Expand Down
2 changes: 1 addition & 1 deletion projects/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smartstock-web",
"version": "1.0.0",
"version": "1.0.1",
"repository": {
"url": "git://github.com/smartstocktz/smartstock-web.git"
},
Expand Down
16 changes: 1 addition & 15 deletions projects/web/src/componets/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,7 @@ import {MallProduct} from '../models/mall-product';

@Component({
selector: 'app-product',
template: `
<div ngxMasonryItem class="product-item"
routerLink="/shops/{{product.shop.projectId}}" [queryParams]="{product:product.product}">
<img *ngIf="!noImage" (error)="hideImage()" [src]="product.images[0]" alt="{{product.product}}"/>
<div [class]="!noImage?'product-item-detail':'product-item-detail-no-image'">
<p [style]="noImage?{color: '#f5f5f5'}:{}" class="product-item-detail-category">{{product.product}}</p>
<p [style]="noImage?{color: 'white'}:{}"
class="product-item-detail-price">{{product.retailPrice | currency: 'TZS '}}</p>
</div>
<a routerLink="/shops/{{product.shop.projectId}}" [queryParams]="{product:product.product}"
class="product-item-detail-link">
by {{product.shop.businessName}}
</a>
</div>
`,
templateUrl: './product.html',
styleUrls: ['../styles/product.scss']
})
export class Product {
Expand Down
25 changes: 1 addition & 24 deletions projects/web/src/componets/products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,7 @@ import {MallState} from '../states/mall.state';

@Component({
selector: 'app-products',
template: `
<div infiniteScroll
[infiniteScrollDistance]="5"
[infiniteScrollThrottle]="50"
[scrollWindow]="false"
(scrolled)="onScroll()"
class="products-container">
<app-join-promotion></app-join-promotion>
<ngx-masonry (layoutComplete)="donePopulate()" [ordered]="true" [options]="options">
<app-product [product]="product" *ngFor="let product of mallState.products | async"></app-product>
</ngx-masonry>
<div *ngIf="showLoadMore" class="load-more">
<button (click)="onScroll()"
mat-button color="primary" *ngIf="(mallState.loadProducts |async) === false">
Load More
</button>
<mat-progress-spinner *ngIf="(mallState.loadProducts | async) === true"
[diameter]="20"
color="primary"
mode="indeterminate">
</mat-progress-spinner>
</div>
</div>
`,
templateUrl: './products.html',
styleUrls: ['../styles/product.scss']
})

Expand Down
15 changes: 12 additions & 3 deletions projects/web/src/styles/product.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.products-container {
display: flex;
flex-wrap: wrap;
margin: auto;
align-items: flex-start;
justify-content: center;
}

.product-item {
width: 243px;
background: transparent;
Expand All @@ -9,7 +17,8 @@
height: auto;
border-radius: 8px;
}
:hover{

:hover {
cursor: pointer;
}
}
Expand Down Expand Up @@ -65,7 +74,7 @@
color: #000000;
}

.product-item-detail-link{
.product-item-detail-link {
font-family: Roboto, "Helvetica Neue", sans-serif;
font-style: normal;
font-weight: 200;
Expand Down Expand Up @@ -129,4 +138,4 @@
.product-item {
width: 130px;
}
}
}
4 changes: 1 addition & 3 deletions projects/web/src/web.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import { DesktopDownloadsComponent } from "./componets/desktop-downloads.compone
import { MobileDownloadsComponent } from "./componets/mobile-downloads.component";
import { ProductsPage } from "./pages/products.page";
import { Products } from "./componets/products";
import { NgxMasonryModule } from "ngx-masonry";
import { Product } from "./componets/product";

const routes: Routes = [
Expand Down Expand Up @@ -137,8 +136,7 @@ const routes: Routes = [
MatIconModule,
ScrollingModule,
InfiniteScrollModule,
MatProgressSpinnerModule,
NgxMasonryModule
MatProgressSpinnerModule
]
})
export class WebModule {}
70 changes: 12 additions & 58 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3527,11 +3527,6 @@ dependency-graph@^0.11.0:
resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27"
integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==

desandro-matches-selector@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/desandro-matches-selector/-/desandro-matches-selector-2.0.2.tgz#717beed4dc13e7d8f3762f707a6d58a6774218e1"
integrity sha1-cXvu1NwT59jzdi9wem1YpndCGOE=

[email protected]:
version "1.2.0"
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015"
Expand Down Expand Up @@ -4081,11 +4076,6 @@ etag@~1.8.1:
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=

ev-emitter@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ev-emitter/-/ev-emitter-1.1.1.tgz#8f18b0ce5c76a5d18017f71c0a795c65b9138f2a"
integrity sha512-ipiDYhdQSCZ4hSbX4rMW+XzNKMD1prg/sTvoVmSLkuQ1MVlwjJQQA+sW8tMYR3BLUr9KjodFV4pvzunvRhd33Q==

eventemitter-asyncresource@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz#734ff2e44bf448e627f7748f905d6bdd57bdb65b"
Expand Down Expand Up @@ -4279,13 +4269,6 @@ find-up@^4.0.0, find-up@^4.1.0:
locate-path "^5.0.0"
path-exists "^4.0.0"

fizzy-ui-utils@^2.0.0:
version "2.0.7"
resolved "https://registry.yarnpkg.com/fizzy-ui-utils/-/fizzy-ui-utils-2.0.7.tgz#7df45dcc4eb374a08b65d39bb9a4beedf7330505"
integrity sha512-CZXDVXQ1If3/r8s0T+v+qVeMshhfcuq0rqIFgJnrtd+Bu8GmDmqMjntjUePypVtjHXKJ6V4sw9zeyox34n9aCg==
dependencies:
desandro-matches-selector "^2.0.0"

flatted@^3.2.5:
version "3.2.5"
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3"
Expand Down Expand Up @@ -4413,11 +4396,6 @@ get-package-type@^0.1.0:
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==

get-size@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/get-size/-/get-size-2.0.3.tgz#54a1d0256b20ea7ac646516756202769941ad2ef"
integrity sha512-lXNzT/h/dTjTxRbm9BXb+SGxxzkm97h/PCIKtlN/CBCxxmkkIVV21udumMS93MuVTDX583gqc94v3RjuHmI+2Q==

get-stream@^6.0.0:
version "6.0.1"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
Expand Down Expand Up @@ -5554,14 +5532,6 @@ make-fetch-happen@^9.1.0:
socks-proxy-agent "^6.0.0"
ssri "^8.0.0"

[email protected]:
version "4.2.2"
resolved "https://registry.yarnpkg.com/masonry-layout/-/masonry-layout-4.2.2.tgz#d57b44af13e601bfcdc423f1dd8348b5524de348"
integrity sha512-iGtAlrpHNyxaR19CvKC3npnEcAwszXoyJiI8ARV2ePi7fmYhIud25MHK8Zx4P0LCC4d3TNO9+rFa1KoK1OEOaA==
dependencies:
get-size "^2.0.2"
outlayer "^2.1.0"

[email protected]:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
Expand Down Expand Up @@ -5881,13 +5851,6 @@ [email protected]:
dependencies:
tslib "^2.3.0"

[email protected]:
version "13.0.0"
resolved "https://registry.yarnpkg.com/ngx-masonry/-/ngx-masonry-13.0.0.tgz#03a74a10fd655d9ce383dc6b81972c920ff76a75"
integrity sha512-orNkCPe1KJqHrRkcUB/WACM+ufBqEv2mkGCQ7Nn7ThOs+XaHlcYdyXHBjf6IT0nBzlLl+ypGVYJ8hbGX8VI+Mw==
dependencies:
tslib "^2.0.0"

nice-napi@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/nice-napi/-/nice-napi-1.0.2.tgz#dc0ab5a1eac20ce548802fc5686eaa6bc654927b"
Expand Down Expand Up @@ -6161,15 +6124,6 @@ os-tmpdir@~1.0.1, os-tmpdir@~1.0.2:
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=

outlayer@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/outlayer/-/outlayer-2.1.1.tgz#29863b6de10ea5dadfffcadfa0d728907387e9a2"
integrity sha1-KYY7beEOpdrf/8rfoNcokHOH6aI=
dependencies:
ev-emitter "^1.0.0"
fizzy-ui-utils "^2.0.0"
get-size "^2.0.2"

p-limit@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
Expand Down Expand Up @@ -7517,24 +7471,24 @@ smart-buffer@^4.1.0, smart-buffer@^4.2.0:
resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae"
integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==

[email protected].0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/smartstock-accounts/-/smartstock-accounts-1.0.0.tgz#4833fc650a469c26d224e14f336601d8c86e6776"
integrity sha512-H1GpoCiRqoVivVoZ+atMqKxtt+qHjfX/qOVHQPez6hEDUqyPQ5gZpdOcvOOvz3Nutv+zWPIMRXFsVhAFvlbENg==
[email protected].1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/smartstock-accounts/-/smartstock-accounts-1.0.1.tgz#ca51195d2f4c1511418a2f90bd0784191abd7ac3"
integrity sha512-8gcEnQwc99GE6eQfXAm+S6kgj4MTRCdHzYBKnBbKrf4DyIkIDC/ya2mkngkDjnkj6ciTSehjkqtwSML50i+ajw==
dependencies:
tslib "^2.0.0"

[email protected].1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/smartstock-core/-/smartstock-core-1.0.1.tgz#a9036725e8b6a8a2d7225c6356cd9309ef70ddc6"
integrity sha512-MEFGz2eYGnKMnEy1bU2sLAziVmTL8jVGnuXhYExOuvZnAcYmVzsf3zy+gHwKeK8Fv2z6YxWsiMBEfAWe5120Pg==
[email protected].2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/smartstock-core/-/smartstock-core-1.0.2.tgz#530f2950b4448a1ac006fbc38388fb650b000503"
integrity sha512-b4rMY8g7ClMRK55OTBrm4opvzg9SbSc6eihUY56vCFjAEAbDBCTNdRgP1JfazY/aSbweoq8285/KTgxkxDDO1A==
dependencies:
tslib "^2.0.0"

[email protected].0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/smartstock-shop/-/smartstock-shop-1.0.0.tgz#3f47721d6fbdd063cab1325ed3976ce70d18a2be"
integrity sha512-FmKf6mr6uNrsAaXhO8b+sT8Q+GiFhhCOAKeoACihggFftlFM2qK/c7FotYeloF1rPYoGHw0t+1IWzr8mhZoaYA==
[email protected].1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/smartstock-shop/-/smartstock-shop-1.0.1.tgz#c8fe2ef4fcf2f5fec18155ed5198a1cf283a498a"
integrity sha512-fKX5R02bR9E7zctVsWc4nsL2wvPxZiHKLw/3BQQmLwxwByhTbpWM/sPoF3Oe9cD86Bxox+S/+K2Ms+6YDigm3Q==
dependencies:
tslib "^2.0.0"

Expand Down

0 comments on commit b1f03e0

Please sign in to comment.