Nybble Processing Mainframe

    @skoda-dms/component-lib
    TypeScript icon, indicating that this package has built-in type declarations

    1.9.75 • Public • Published

    @skoda-dms/component-lib

    Skoda DMS component VUE library

    Includes:

    • components
    • directives
    • filters

    Usage

    Install:

    $  npm i

    Build:

    $ npm run build

    Publish to repo:

    • Commit changes git commit
    • Make tag git tag *.*.*
    • Push to repository git push origin master
    • Publish to NPM npm publish

    Link to main project in developement

    When you develop new feature and want to update main projekt in the same time use npm link to create symlink between main project and this library projekt.

    cd ~/projects/skoda-dms-component
    npm link  # Step 1.
    cd ~/projects/MPOV/VUE
    npm link @skoda-dms/component-lib  # Step 2.
    
    # Back to normal dependency
    cd  ~/projects/MPOV/VUE
    npm uninstall --no-save @skoda-dms/component-lib && npm install
    
    # Clean global Link
    cd ~/projects/skoda-dms-componen
    npm uninstall
    

    Library

    See doc/ directory for api.

    Registrations of new component

    !!! Important to note that all components, directives and fitlers must be registered in lib/(components | directives | filters)/names.ts file !!!

    Components

    Components witch extends BaseComponent have access to main project Vuex object via this.$store attribute

    Follow file format rules for each type of component:

    • Components: *.component.ts
    • Directives: *.directive.ts
    • Filters: *.filter.ts
    AuthComponent //check if user is authentificated, fires success or failed event
    auth:success | auth:success
    <SKDMSAuthComponent />
    
    AuthInfoWidgetComponent // display info about auth user, fire sign out action and event response
    sign:out:success | sign:out:failed
    <SKDMSAuthInfoWidgetComponent />
    
    PageLoaderComponent // Page loader component
    <SKDMSPageLoader>
        <template #text>
            Loading
        </template>
    </SKDMSPageLoader>

    Forms

    Forms include basic components and CustomRules

    • Custom rules can be dfined in components/forms/rules.ts
    // Basic form Components
    TextBasicComponent - basic  text input field
    CheckboxBasicComponent - basic checkbox
    ListBasicComponent - basic select
    CheckboxGroupComponent - multi checkboxes
    RadioBasicComponent - radio button
    
    ***TextExternalListComponent***
    Text box with popup external list window (list)
    
    | Attribute   | Description                                         |
    | ----------- | -----------------------------------------------     |
    | host        | Host name including protocol                        |
    | tenantPath  | Path to DMS page                                    |
    | prop        | Prop name must be unique                            |
    | extraParams | Object of route params which will be added to query |
    
    Example:
    <SKDMSTextExternal v-model="..//" prop="..//" host="https://some-tenant.com" tenantPath="/path/to/site"  :extraParams="{ partnerType: 'leasing' }" :placeholder="..//" />
    
    Example with  slot prepend text inputs (one or two text fields supported):
    <SKDMSTextExternal v-model="model.criteria1.carTypeDMKPart3" prop="carTypeDMKPart3" :disabled="false" >
        <template #prepend>
            <SKDMSText v-model="model.criteria1.carTypeDMKPart1" prop="carTypeDMKPar1" />
            <SKDMSText v-model="model.criteria1.carTypeDMKPart2" prop="carTypeDMKPar2" />
        </template>
    </SKDMSTextExternal>
    
    //Classes
    SKDMSBaseFormComponent - abstract class for form manipulation extended by main form component

    Directives

    demo  // demo directive

    Filters

    to-upper // demo filter

    Related topics

    See Create Vue component module. See Npm link

    Keywords

    Install

    npm i @skoda-dms/component-lib

    DownloadsWeekly Downloads

    113

    Version

    1.9.75

    License

    ISC

    Unpacked Size

    1.95 MB

    Total Files

    263

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar