File

src/lib/label-designer/label-designer.component.ts

Description

Label designer window that can be used to load, edit, show preview and send the html from the labels to the host component.

Implements

OnInit OnDestroy

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector ll-label-designer
styleUrls ./label-designer.component.scss
templateUrl ./label-designer.component.html

Index

Methods
Inputs
Outputs
Accessors

Inputs

availableFields
Type : ILabelField[]

These are all the available fields that the user can add the label.

data
Type : []

Array of data objects. Each object in the array will generate one label.

defaultAvailableFields
Type : ILabelField[]

These are the default label fields. If the user import an excel file available fields changes and if that list is different from this there will be a reset button visible on label fields tab.

defaultDomain
Default value : ''

Default domain that is used on generate data dialog.

defaultSetup
Type : ISetup

Setup that is used when the user clicks new from the file menu. This is optional input and if this is missing there will not be new button visible.

fileColumnMap
Type : IColumnMap

Map spreadsheet columns to where fields

pdfLoading
Default value : false

Since the loading of the pdf is done externally this will tell the editor to display loading indicator on the download the pdf link.

presets
Type : PresetSetup[]

Preset setups that the user can pick from the file menu.

qrCodeErrorCorrectionLevel
Type : QRCodeErrorCorrectionLevel
Default value : QRCodeErrorCorrectionLevel.levelM

Error correction level used on the QR Code.

setup

Setup for the whole page see ISetup

showIntro
Default value : true

Whether or not show the intro on startup.

translations

Translations for the component. See LabelDesignerTranslationsInterface to see what values can be translated.

viewSettings

View settings to use. See IViewSettings for details on what can be set.

Outputs

availableFieldsChange
Type : EventEmitter<ILabelField[]>

Triggered when available fields are changed.

dataChange
Type : EventEmitter<object[]>

Triggered when the data is changed. This can occurs when the excel is imported or when the data is generated using the generate dialog.

fileColumnMapChange
Type : EventEmitter<IColumnMap>

Triggered when spreadsheet columns mapping changes

html
Type : EventEmitter<ILabelPdf>

Event that triggers when the html for the label is generated. Event holds the desired filename and the html string (See ILabelPdf).

introClosed
Type : EventEmitter<void>

Triggered when the intro dialog is closed.

pdfLoadingChange
Type : EventEmitter<boolean>

Triggered when pdf loading is changed

setupChange
Type : EventEmitter<ISetup>

Triggered when setup changes. This happens on every change on the label, so make sure that performance of the chain of the event's that this triggers is good and that it doesn't block the ui thread.

viewSettingsChange
Type : EventEmitter<IViewSettings>

Triggered when view settings change.

Methods

clearData
clearData()
Returns : void
openGenerate
openGenerate()

Open generate dialog

Returns : void
openGettingStarted
openGettingStarted()

Open getting started dialog

Returns : void
openImportExcel
openImportExcel()

Open excel import dialog

Returns : void
openIntro
openIntro()

Open intro dialog

Returns : void
redo
redo()

Redo the changes if there are anything to redo

Returns : void
setPreviewActive
setPreviewActive(idx: number)

Preview the specific item on the data array.

Parameters :
Name Type Optional
idx number No
Returns : void
undo
undo()

Undo the changes if there are anything to undo

Returns : void

Accessors

translations
settranslations(translations)

Translations for the component. See LabelDesignerTranslationsInterface to see what values can be translated.

Parameters :
Name Optional
translations No
Returns : void
data
getdata()
setdata(data: [])

Array of data objects. Each object in the array will generate one label.

Parameters :
Name Type Optional
data [] No
Returns : void
viewSettings
getviewSettings()
setviewSettings(settings)

View settings to use. See IViewSettings for details on what can be set.

Parameters :
Name Optional
settings No
Returns : void
setup
getsetup()
setsetup(setup)

Setup for the whole page see ISetup

Parameters :
Name Optional
setup No
Returns : void

result-matching ""

    No results matching ""