aboutsummaryrefslogtreecommitdiffstats
path: root/stories/ng2-component-lab/tag-cloud.component.exp.ts
blob: 83ad03c83a2be3e809cf7a1920a49a1ecde2f6a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { experimentOn } from '@islavi/ng2-component-lab';

export default experimentOn('Tag Cloud').group('Tag Cloud', [
    {
        id: 'list',
        title: 'Simple tag-cloud',
        description: 'Simple tag-cloud',
        showSource: true,
        template: `
        <sdc-tag-cloud label="Please Enter value"
                placeholder="Type a value and then click enter or '+'"
                [list]="['aaa', 'bbb']">

        </sdc-tag-cloud>
    `
    },
    {
        id: 'unique-tag-cloud',
        title: 'List with unique validation',
        description: 'List with unique validation',
        showSource: true,
        template: `
        <sdc-tag-cloud label="Please Enter value"
                placeholder="Type a value and then click enter or '+'"
                [list]="['aaa', 'bbb']"
                [isUniqueList]="true"
                [uniqueErrorMessage]="'This value is already in the list'">

        </sdc-tag-cloud>
    `
    },
    {
        id: 'disabled-tag-cloud',
        title: 'Disabled tag-cloud',
        description: 'When the parameter isViewOnly = true, the tag-cloud control is disabled',
        showSource: true,
        template: `
        <sdc-tag-cloud label="Please Enter value"
                placeholder="Type a value and then click enter or '+'"
                [list]="['aaa', 'bbb']"
                [isViewOnly]="true">

        </sdc-tag-cloud>
    `
    },
    {
        id: 'tag-cloud-with-disabled-items',
        title: 'List with some readonly items',
        description: 'The parameter isViewOnly can get an array of indexes of tag-cloud items.',
        showSource: true,
        template: `
        <sdc-tag-cloud label="Please Enter value"
                placeholder="Type a value and then click enter or '+'"
                [list]="['aaa', 'bbb', 'ccc', 'ddd']"
                [isViewOnly]="[1,3]">

        </sdc-tag-cloud>
    `
    }
]);