13.6.15 • Published 29 days ago

smaxapp v13.6.15

Weekly downloads
-
License
-
Repository
-
Last release
29 days ago

SmaxCommonLib

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

Team

Author: @SmaxTeam from SmaxApp Dev Team.

Compatibility

Versions

Angularsmaxapp
>=13.x.x =<15.x.xv13.x
> 15.x.x <16.x.xv16.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

InputTypeDefaultRequiredDescription
imageUrlsstring[][]yesList url image to show.
indexImagenumber0noDefault display image with image's index of list urls

InputMaskComponent

Inputs

InputTypeDefaultRequiredDescription
idstring''yesId of input.
valuenumber0noValue of input
placeholderstring0noPlaceholder of input
alignleft \| rightleftnoAlignment of input
requirebooleanfalsenoRequireable
readonlybooleanfalsenoReadonly
isQuantitybooleanfalsenoIs Quantity
allowNegativeNumbersbooleanfalsenoIs allow negative
maxnumbernullnoMax Value
minnumbernullnoMin Value
widthstring \| numbernullnoWidth of Input
bizCurrencyIBizCurrency \| unknownnullyesWidth of Input

Outputs

OutputTypeDescription
(onChange)numberExecute when change
(paste)EventExecute when change

InputSuggestMoneyComponent

Inputs

InputTypeDefaultRequiredDescription
valuenumber0noValue of input
placeholderstring0noPlaceholder of input
alignleft \| rightleftnoAlignment of input
suggestMaxnumber0noMax Value suggested
amountnumber0yesAmount value
customClassstringyesCustom class
optionInputCurrencystringyesOption Input
disabledstring \| nullnullyesDisabled
templateanynullnoTemplate of Input
tagEmptystringThẻ tag rỗngnoTag empty

Outputs

OutputTypeDescription
(onChange)numberExecute when change
(onRemove)EventExecute when remove

ModalConfirmComponent

IModalConfirmContent

PropertyTypeDefaultRequiredDescription
titlestringXác nhậnyesTitle of modal
descriptionstringyesDescription
okTextstringOkyesText of ok button
cancelTextstringCancelyesText of cancel button
typewarning | infowarningnoType notice
modalTypedefault | advancedefaultnoType of modal
noFooterbooleanfalsenoShow or Hide footer
noAcceptButtonbooleanfalsenoShow or Hide Accept button

Outputs

OutputTypeDescription
(onConfirm)eventExecute when confirm

SmaxApp Logo

Types

PropertyTypeDefaultRequiredDescription
IModulesobjectunknownyesTitle of modal

Inputs

OutputTypeDescription
modulesIModules[]List Module
currentModuleIModulesCurrently Module
quickModulesstring[]Id Quick Module

BoxChatComponent

Types

PropertyTypeDefaultRequiredDescription
BizobjectunknownyesBiz
infoOrder{orderId; orderCode}unknownyesBiz
currentModulestring | yes | Current Module Alias

Inputs

OutputTypeDescription
bizBizBiz
infoOrderInfoOrderInfo Order
currentModulestringCurrent Module Alias

BubbleChatComponent

Types

PropertyTypeDefaultRequiredDescription
BizobjectunknownyesBiz

Inputs

OutputTypeDescription
bizBizBiz
13.6.14

30 days ago

13.6.15

29 days ago

13.6.8

1 month ago

13.6.9

1 month ago

13.6.6

1 month ago

13.6.7

1 month ago

13.6.4

1 month ago

13.6.5

1 month ago

13.6.2

1 month ago

13.6.3

1 month ago

13.6.13

1 month ago

13.6.11

1 month ago

13.6.12

1 month ago

13.6.10

1 month ago

13.6.1

1 month ago

13.5.9

1 month ago

13.5.7

1 month ago

13.5.8

1 month ago

13.5.5

1 month ago

13.5.6

1 month ago

13.5.3

1 month ago

13.5.4

1 month ago

13.6.0

1 month ago

13.5.1

1 month ago

13.5.2

1 month ago

13.5.0

1 month ago

17.0.2

2 months ago

17.0.1

2 months ago

17.0.0

2 months ago

13.4.4

3 months ago

13.4.5

3 months ago

13.4.6-RX.6

3 months ago

16.4.4

3 months ago

13.4.5-RX.6

3 months ago

13.4.4-RX.6

4 months ago

13.4.3-RX.6

4 months ago

13.4.2

4 months ago

13.4.3

4 months ago

13.3.5

4 months ago

13.3.6

4 months ago

13.4.0

4 months ago

13.4.1

4 months ago

16.4.0

4 months ago

13.3.3

4 months ago

13.3.4

4 months ago

13.3.2

4 months ago

13.3.1

4 months ago

16.3.3

4 months ago

16.3.2

5 months ago

16.3.1

5 months ago

13.3.0

8 months ago

0.0.9

10 months ago

16.3.0

8 months ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago