npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

smaxapp

v13.8.13

Published

This library was generated to use in all module of SmaxApp.

Downloads

128

Readme

SmaxCommonLib

This library was generated to use in all module of SmaxApp.

Team

Author: @SmaxTeam from SmaxApp Dev Team.

Compatibility

Versions

| Angular | smaxapp | |-------------------|:---------------:| | >=13.x.x =<15.x.x | v13.x | | > 15.x.x <16.x.x | v16.x |


Getting started

Step1: Installation

Run npm install smaxapp to install the library.

Step2: Import the SmaxAppModule

Import the SmaxAppModule in Angular application module:

import { SmaxAppModule } from 'smaxapp';
@NgModule({
  declarations: [AppComponent],
  imports: [SmaxAppModule.forRoot(), FormsModule],
  bootstrap: [AppComponent]
})
export class AppModule {}

Step3: Include a style file

@import "~/smaxapp/src/styles/style.scss";

Note

Angular version 13.x.x please add config in angular.json like this:

"stylePreprocessorOptions": {
  "includePaths": ["node_modules"]
}

Step4: Update angular.json

"assets": [
  {
    "glob": "**/*",
    "input": "node_modules/smaxapp/assets",
    "output": "/assets/"
  }
],

Step5: Use the components

<smaxapp-logo
  bizAlias="demo"
  [modules]="modules"
  [currentModule]="currentModule"
  [quickModules]="quickModules"
  [menuPlacement]="'bottom'"
>
</smaxapp-logo>

<smaxapp-input-mask></smaxapp-input-mask>
<br>
<smaxapp-input-suggest-money></smaxapp-input-suggest-money>
<br>
<smaxapp-image-preview [imageUrls]="imageUrls" [indexImage]="0">
  <div childContent>
    ... template for image preview
  </div>
</smaxapp-image-preview>
<br>
<smaxapp-modal-confirm (onConfirm)="`call func here if you want...`">
  <div childContent>
    ... template for modal confirm
  </div>
</smaxapp-modal-confirm>

<div class="wrapper-chat">
  <smaxapp-box-chat [biz]="biz" [infoOrder]="orderInfo" [currentModule]="'sale-center'" (eventEmit)="$event"></smaxapp-box-chat>
</div>

<div class="embed-bubble-chat">
  <smax-bubble-chat [biz]="biz" (eventEmit)="$event"></smax-bubble-chat>
</div>
import { ModalConfirmService } from 'smaxapp';

export class AppComponent {
  constructor(
      private modalConfirmService: ModalConfirmService,
  ) {}
  
  okeFunction() {
    console.log('confirm');
  }

  handleOpenModal() {
    const modalContent: IModalConfirmContent = {
      title: 'Xác nhận',
      description: 'Bạn có chắc chắn muốn xóa?',
      okText: 'Xóa',
      type: 'warning',
      modalType: 'advance',
    };
    this.modalConfirmService.openModal(modalContent, this.okeFunction());
  }
}

API

ImagePreviewComponent

Inputs

| Input | Type | Default | Required | Description | |--------------|------------|---------|----------|-------------------------------------------------------| | [imageUrls] | string[] | [] | yes | List url image to show. | | [indexImage] | number | 0 | no | Default display image with image's index of list urls |

InputMaskComponent

Inputs

| Input | Type | Default | Required | Description | |------------------------|---------------------------|---------|----------|----------------------| | [id] | string | '' | yes | Id of input. | | [value] | number | 0 | no | Value of input | | [placeholder] | string | 0 | no | Placeholder of input | | [align] | left \| right | left | no | Alignment of input | | [require] | boolean | false | no | Requireable | | [readonly] | boolean | false | no | Readonly | | [isQuantity] | boolean | false | no | Is Quantity | | [allowNegativeNumbers] | boolean | false | no | Is allow negative | | [max] | number | null | no | Max Value | | [min] | number | null | no | Min Value | | [width] | string \| number | null | no | Width of Input | | [bizCurrency] | IBizCurrency \| unknown | null | yes | Width of Input |

Outputs

| Output | Type | Description | |------------|----------|---------------------| | (onChange) | number | Execute when change | | (paste) | Event | Execute when change |

InputSuggestMoneyComponent

Inputs

| Input | Type | Default | Required | Description | |-----------------------|------------------|----------------|----------|----------------------| | [value] | number | 0 | no | Value of input | | [placeholder] | string | 0 | no | Placeholder of input | | [align] | left \| right | left | no | Alignment of input | | [suggestMax] | number | 0 | no | Max Value suggested | | [amount] | number | 0 | yes | Amount value | | [customClass] | string | | yes | Custom class | | [optionInputCurrency] | string | | yes | Option Input | | [disabled] | string \| null | null | yes | Disabled | | [template] | any | null | no | Template of Input | | [tagEmpty] | string | Thẻ tag rỗng | no | Tag empty |

Outputs

| Output | Type | Description | |------------|----------|---------------------| | (onChange) | number | Execute when change | | (onRemove) | Event | Execute when remove |

ModalConfirmComponent

IModalConfirmContent

| Property | Type | Default | Required | Description | |----------------|------------------------|------------|----------|----------------------------| | title | string | Xác nhận | yes | Title of modal | | description | string | | yes | Description | | okText | string | Ok | yes | Text of ok button | | cancelText | string | Cancel | yes | Text of cancel button | | type | warning | info | warning | no | Type notice | | modalType | default | advance | default | no | Type of modal | | noFooter | boolean | false | no | Show or Hide footer | | noAcceptButton | boolean | false | no | Show or Hide Accept button |

Outputs

| Output | Type | Description | |-------------|---------|----------------------| | (onConfirm) | event | Execute when confirm |

SmaxApp Logo

Types

| Property | Type | Default | Required | Description | |----------------|----------|-----------|----------|----------------------------| | IModules | object | unknown | yes | Title of modal |

Inputs

| Output | Type | Description | |---------------|------------|------------------| | modules | IModules[] | List Module | | currentModule | IModules | Currently Module | | quickModules | string[] | Id Quick Module |

BoxChatComponent

Types

| Property | Type | Default | Required | Description | |---------------|------------------------|-----------|----------|----------------------| | Biz | object | unknown | yes | Biz | | infoOrder | {orderId; orderCode} | unknown | yes | Biz | | currentModule | string | `` | yes | Current Module Alias |

Inputs

| Output | Type | Description | |---------------|-----------|----------------------| | biz | Biz | Biz | | infoOrder | InfoOrder | Info Order | | currentModule | string | Current Module Alias |

BubbleChatComponent

Types

| Property | Type | Default | Required | Description | |---------------|------------------------|-----------|----------|----------------------| | Biz | object | unknown | yes | Biz |

Inputs

| Output | Type | Description | |---------------|-----------|----------------------| | biz | Biz | Biz |