0.0.45 • Published 5 months ago

winggy-angular v0.0.45

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

Winggy Angular

This package is mainly used for the following Common Contents:

Installing winggy-angular

  npm install winggy-angular --save

Integration of Common Modules

  • Using of Common Modules, import the below lines in the *.module.ts
  import { WinggyCommonModule } from 'winggy-angular';

  imports: [
    ...
    WinggyCommonModule.forRoot(),
    ...
  ]

Integration of Common Translator Modules

  • Using of Common Translator Module, import the below lines in app.module.ts
  import { WinggyTranslateModule } from 'winggy-angular';

  imports: [
    ...
    WinggyTranslateModule.forRoot(),
    ...
  ]

Integration of Common Services

  • Using of Common Services Import the below lines in the *.component.ts
  import { WinggyCommonService } from 'winggy-angular';

  constructor(
    ...
    public commonService: WinggyCommonService
  ) {}
  • To initiate the translator service and update the language for the translator service, follow the lines
    constructor(
    ...
    public commonService: WinggyCommonService
  ) {
      this.commonService.initiateTranslator();
  }

  this.commonService.setLanguage('English');

Integration of Common Components

  • Using of Common Components Import the below lines in parent module of the component.
  import { WinggyTranslateModule } from 'winggy-angular';

  imports: [
    ...
    WinggyTranslateModule.forRoot(),
    ...
  ]
  • Please follow the common components to integrate.

    • No data or Loader Component

      • HTML Template
      <winggy-no-data [error]="error"></winggy-no-data>
      • Properties

        Property TypePropertyDefault ValuesParameters/Data Type
        InputerrorNo data foundstring
    • Breadcrumb Component

      • HTML Template
      <winggy-breadcrumb [breadcrumbData]="breadcrumbData"></winggy-breadcrumb>
      breadcrumbData = [
        {
          name: "Home",
          path: null,
        },
        {
          name: "Menus",
          path: "/menu-management/menu-builder",
        },
        {
          name: "Menu Management",
          path: "/menu-management/menu-builder",
        },
        {
          name: "Edit Menus",
          path: null,
        },
      ];
    • Table Component

      • HTML Template
      <winggy-table
        [columns]="columns"
        [data]="data"
        (tableChanges)="tableChanges($event)"
        (tableAction)="tableAction($event)"
      ></winggy-table>
      columns = [
        {
          header: "",
          field: "expand",
          type: "tree",
        },
        {
          header: "",
          field: "multiSelection",
          type: "checkbox",
          hideAllSelect: false,
        },
        {
          header: "",
          field: "singleSelection",
          type: "radio",
        },
        {
          header: "Name",
          field: "name",
          type: "value",
          style: { width: "20%" },
        },
        {
          header: "Sample Input",
          field: "inputData",
          type: "input",
          style: { width: "20%" },
        },
        {
          header: "Course",
          field: "course",
          type: "select",
          style: { width: "20%" },
          options: [
            {
              label: "Select",
              value: "",
            },
            {
              label: "None",
              value: "None",
            },
            {
              label: "Drinks",
              value: "Drinks",
            },
            {
              label: "Appetizers",
              value: "Appetizers",
            },
            {
              label: "Entrees",
              value: "Entrees",
            },
            {
              label: "Deserts",
              value: "Deserts",
            },
          ],
          selectOptions: {
            label: "label",
            value: "value",
          },
        },
        {
          header: "Actions",
          field: "action",
          type: "action",
          style: { width: "20%" },
          actions: [
            {
              icon: "edit",
              title: "Edit",
              action: "edit",
            },
            {
              icon: "more_horiz",
              title: "Menu",
              contextMenu: [
                {
                  name: "Archieve",
                  action: "archieve",
                },
              ],
            },
          ],
        },
      ];
      
      data = [
        {
          name: "Food",
          inputData: "Food",
          course: "Drinks",
          prepStations: "No Print",
          children: {
            columns: [
              {
                header: "",
                field: "expand",
                type: "tree",
              },
              {
                header: "",
                field: "multiSelection",
                type: "checkbox",
                hideAllSelect: false,
              },
              {
                header: "",
                field: "singleSelection",
                type: "radio",
              }
            ],
            hideHeader: true,
            name: "Groups",
            data: [
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
            ]
          }
        },
        {
          name: "Drinks",
          course: "",
          prepStations: "",
          children: {
            columns: [
              {
                header: "",
                field: "expand",
                type: "tree",
              },
              {
                header: "",
                field: "multiSelection",
                type: "checkbox",
                hideAllSelect: false,
              },
              {
                header: "",
                field: "singleSelection",
                type: "radio",
              }
            ],
            hideHeader: true,
            name: "Groups",
            data: [
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
            ]
          }
        },
        {
          name: "Open Items",
          course: "",
          prepStations: "",
          children: {
            columns: [
              {
                header: "",
                field: "expand",
                type: "tree",
              },
              {
                header: "",
                field: "multiSelection",
                type: "checkbox",
                hideAllSelect: false,
              },
              {
                header: "",
                field: "singleSelection",
                type: "radio",
              }
            ],
            hideHeader: true,
            name: "Groups",
            data: [
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
              {
                name: "Food",
                inputData: "Food",
                course: "Drinks",
                prepStations: "No Print",
              },
            ]
          }
        },
      ];

Integration of Common Styles

  • Using of Common Styles Import the below lines in the style.scss
@import "node_modules/winggy-angular/assets/scss/common";
  • Use the below template to start the new menu component
<div class="winggy-page-layout">
  <div class="winggy-page-header">
    <!-- Breadcrumb Component -->
  </div>
  <div class="winggy-page-content">
    <div class="indo-menu-title">
      <h2>Menu Header</h2>
      <!-- Actions Div -->
    </div>
    <!-- Contents -->
  </div>
</div>
  • Please follow the styles to integrate with the common styles.
Class NameDescriptionSample Classes
winggy-w-*Width in percentage from 1 to 100winggy-w-10
winggy-width-*Width in vh from 1 to 100winggy-width-10
winggy-min-width-*Min Width in vh from 1 to 100winggy-min-width-10
winggy-max-width-*Max Width in vh from 1 to 100winggy-max-width-10
winggy-h-*Height in percentage from 1 to 100winggy-h-10
winggy-height-*Height in vh from 1 to 100winggy-height-10
winggy-min-height-*Min Height in vh from 1 to 100winggy-min-height-10
winggy-max-height-*Max Height in vh from 1 to 100winggy-max-height-10
winggy-p-*Padding in vh from 1 to 100winggy-p-10
winggy-pt-*Padding Top in vh from 1 to 100winggy-pt-10
winggy-pb-*Padding Bottom in vh from 1 to 100winggy-pb-10
winggy-pr-*Padding Right in vh from 1 to 100winggy-pr-10
winggy-pl-*Padding Left in vh from 1 to 100winggy-pl-10
winggy-m-*Margin in vh from 1 to 100winggy-m-10
winggy-mt-*Margin Top in vh from 1 to 100winggy-mt-10
winggy-mb-*Margin Bottom in vh from 1 to 100winggy-mb-10
winggy-mr-*Margin Right in vh from 1 to 100winggy-mr-10
winggy-ml-*Margin Left in vh from 1 to 100winggy-ml-10
winggy-capitalizeText-transform is captializewinggy-capitalize
winggy-buttonButton Styleswinggy-button
winggy-rounded-buttonRounded Button Styleswinggy-rounded-button
winggy-cur-pointerThis is used for cursor: pointer;winggy-cur-pointer
winggy-d-flexThis is used for display: flex;winggy-d-flex
winggy-fd-colThis is used for flex-direction: column;winggy-fd-col
winggy-fw-wrapThis is used for flex-wrap: wrap;winggy-fw-wrap
winggy-jc-cThis is used for justify-content: center;winggy-jc-c
winggy-jc-feThis is used for justify-content: flex-end;winggy-jc-fe
winggy-jc-saThis is used for justify-content: space-around;winggy-jc-sa
winggy-jc-sbThis is used for justify-content: space-between;winggy-jc-sb
winggy-ai-cThis is used for align-items: center;winggy-ai-c
winggy-ai-feThis is used for align-items: flex-endwinggy-ai-fe
winggy-ai-saThis is used for align-items: space-aroundwinggy-ai-sa
winggy-ai-sbThis is used for align-items: space-betweenwinggy-ai-sb

Author: Narenthiran Y

License: MIT

0.0.44

5 months ago

0.0.45

5 months ago

0.0.43

5 months ago

0.0.40

5 months ago

0.0.41

5 months ago

0.0.42

5 months ago

0.0.37

10 months ago

0.0.38

8 months ago

0.0.39

8 months ago

0.0.36

10 months ago

0.0.34

1 year ago

0.0.35

1 year ago

0.0.32

1 year ago

0.0.33

1 year ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years 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