tailwind_dsl 0.0.10 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.builders/generators/domain-model.rb +30 -28
- data/.builders/generators/utilities.rb +19 -17
- data/CHANGELOG.md +14 -0
- data/docs/domain-model.drawio +49 -46
- data/docs/domain-model.json +144 -121
- data/docs/domain-model.svg +1 -1
- data/lib/tailwind_dsl/etl/component_structures/generator.rb +59 -65
- data/lib/tailwind_dsl/etl/component_structures/raw_component_query.rb +174 -0
- data/lib/tailwind_dsl/version.rb +1 -1
- data/lib/tailwind_dsl.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +3 -51
- data/.components/tui/application-ui/component/data-display/calendar/01.clean.html +0 -204
- data/.components/tui/application-ui/component/data-display/calendar/01.html +0 -243
- data/.components/tui/application-ui/component/data-display/calendar/01.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/calendar/02.clean.html +0 -496
- data/.components/tui/application-ui/component/data-display/calendar/02.html +0 -551
- data/.components/tui/application-ui/component/data-display/calendar/02.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/calendar/03.clean.html +0 -240
- data/.components/tui/application-ui/component/data-display/calendar/03.html +0 -274
- data/.components/tui/application-ui/component/data-display/calendar/03.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/calendar/04.clean.html +0 -385
- data/.components/tui/application-ui/component/data-display/calendar/04.html +0 -439
- data/.components/tui/application-ui/component/data-display/calendar/04.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/calendar/05.clean.html +0 -211
- data/.components/tui/application-ui/component/data-display/calendar/05.html +0 -254
- data/.components/tui/application-ui/component/data-display/calendar/05.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/calendar/06.clean.html +0 -320
- data/.components/tui/application-ui/component/data-display/calendar/06.html +0 -336
- data/.components/tui/application-ui/component/data-display/calendar/06.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/calendar/07.clean.html +0 -266
- data/.components/tui/application-ui/component/data-display/calendar/07.html +0 -294
- data/.components/tui/application-ui/component/data-display/calendar/07.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/calendar/08.clean.html +0 -268
- data/.components/tui/application-ui/component/data-display/calendar/08.html +0 -296
- data/.components/tui/application-ui/component/data-display/calendar/08.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/description-list/01.clean.html +0 -59
- data/.components/tui/application-ui/component/data-display/description-list/01.html +0 -61
- data/.components/tui/application-ui/component/data-display/description-list/01.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/description-list/02.clean.html +0 -59
- data/.components/tui/application-ui/component/data-display/description-list/02.html +0 -61
- data/.components/tui/application-ui/component/data-display/description-list/02.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/description-list/03.clean.html +0 -86
- data/.components/tui/application-ui/component/data-display/description-list/03.html +0 -88
- data/.components/tui/application-ui/component/data-display/description-list/03.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/description-list/04.clean.html +0 -59
- data/.components/tui/application-ui/component/data-display/description-list/04.html +0 -61
- data/.components/tui/application-ui/component/data-display/description-list/04.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/description-list/05.clean.html +0 -59
- data/.components/tui/application-ui/component/data-display/description-list/05.html +0 -61
- data/.components/tui/application-ui/component/data-display/description-list/05.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/stats/01.clean.html +0 -17
- data/.components/tui/application-ui/component/data-display/stats/01.html +0 -19
- data/.components/tui/application-ui/component/data-display/stats/01.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/stats/02.clean.html +0 -80
- data/.components/tui/application-ui/component/data-display/stats/02.html +0 -89
- data/.components/tui/application-ui/component/data-display/stats/02.settings.json +0 -9
- data/.components/tui/application-ui/component/data-display/stats/03.clean.html +0 -53
- data/.components/tui/application-ui/component/data-display/stats/03.html +0 -61
- data/.components/tui/application-ui/component/data-display/stats/03.settings.json +0 -9
- data/lib/tailwind_dsl/etl/component_structures/data.rb +0 -55
@@ -1,89 +0,0 @@
|
|
1
|
-
<div>
|
2
|
-
<h3 class="text-lg font-medium leading-6 text-gray-900">Last 30 days</h3>
|
3
|
-
|
4
|
-
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3">
|
5
|
-
<div class="relative overflow-hidden rounded-lg bg-white px-4 pt-5 pb-12 shadow sm:px-6 sm:pt-6">
|
6
|
-
<dt>
|
7
|
-
<div class="absolute rounded-md bg-indigo-500 p-3">
|
8
|
-
<!-- Heroicon name: outline/users -->
|
9
|
-
<svg class="h-6 w-6 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
10
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" />
|
11
|
-
</svg>
|
12
|
-
</div>
|
13
|
-
<p class="ml-16 truncate text-sm font-medium text-gray-500">Total Subscribers</p>
|
14
|
-
</dt>
|
15
|
-
<dd class="ml-16 flex items-baseline pb-6 sm:pb-7">
|
16
|
-
<p class="text-2xl font-semibold text-gray-900">71,897</p>
|
17
|
-
<p class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
|
18
|
-
<!-- Heroicon name: mini/arrow-up -->
|
19
|
-
<svg class="h-5 w-5 flex-shrink-0 self-center text-green-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
20
|
-
<path fill-rule="evenodd" d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z" clip-rule="evenodd" />
|
21
|
-
</svg>
|
22
|
-
<span class="sr-only"> Increased by </span>
|
23
|
-
122
|
24
|
-
</p>
|
25
|
-
<div class="absolute inset-x-0 bottom-0 bg-gray-50 px-4 py-4 sm:px-6">
|
26
|
-
<div class="text-sm">
|
27
|
-
<a href="#" class="font-medium text-indigo-600 hover:text-indigo-500"> View all<span class="sr-only"> Total Subscribers stats</span></a>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
</dd>
|
31
|
-
</div>
|
32
|
-
|
33
|
-
<div class="relative overflow-hidden rounded-lg bg-white px-4 pt-5 pb-12 shadow sm:px-6 sm:pt-6">
|
34
|
-
<dt>
|
35
|
-
<div class="absolute rounded-md bg-indigo-500 p-3">
|
36
|
-
<!-- Heroicon name: outline/envelope-open -->
|
37
|
-
<svg class="h-6 w-6 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
38
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M21.75 9v.906a2.25 2.25 0 01-1.183 1.981l-6.478 3.488M2.25 9v.906a2.25 2.25 0 001.183 1.981l6.478 3.488m8.839 2.51l-4.66-2.51m0 0l-1.023-.55a2.25 2.25 0 00-2.134 0l-1.022.55m0 0l-4.661 2.51m16.5 1.615a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V8.844a2.25 2.25 0 011.183-1.98l7.5-4.04a2.25 2.25 0 012.134 0l7.5 4.04a2.25 2.25 0 011.183 1.98V19.5z" />
|
39
|
-
</svg>
|
40
|
-
</div>
|
41
|
-
<p class="ml-16 truncate text-sm font-medium text-gray-500">Avg. Open Rate</p>
|
42
|
-
</dt>
|
43
|
-
<dd class="ml-16 flex items-baseline pb-6 sm:pb-7">
|
44
|
-
<p class="text-2xl font-semibold text-gray-900">58.16%</p>
|
45
|
-
<p class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
|
46
|
-
<!-- Heroicon name: mini/arrow-up -->
|
47
|
-
<svg class="h-5 w-5 flex-shrink-0 self-center text-green-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
48
|
-
<path fill-rule="evenodd" d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z" clip-rule="evenodd" />
|
49
|
-
</svg>
|
50
|
-
<span class="sr-only"> Increased by </span>
|
51
|
-
5.4%
|
52
|
-
</p>
|
53
|
-
<div class="absolute inset-x-0 bottom-0 bg-gray-50 px-4 py-4 sm:px-6">
|
54
|
-
<div class="text-sm">
|
55
|
-
<a href="#" class="font-medium text-indigo-600 hover:text-indigo-500"> View all<span class="sr-only"> Avg. Open Rate stats</span></a>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
</dd>
|
59
|
-
</div>
|
60
|
-
|
61
|
-
<div class="relative overflow-hidden rounded-lg bg-white px-4 pt-5 pb-12 shadow sm:px-6 sm:pt-6">
|
62
|
-
<dt>
|
63
|
-
<div class="absolute rounded-md bg-indigo-500 p-3">
|
64
|
-
<!-- Heroicon name: outline/cursor-arrow-rays -->
|
65
|
-
<svg class="h-6 w-6 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
66
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15.042 21.672L13.684 16.6m0 0l-2.51 2.225.569-9.47 5.227 7.917-3.286-.672zM12 2.25V4.5m5.834.166l-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243l-1.59-1.59" />
|
67
|
-
</svg>
|
68
|
-
</div>
|
69
|
-
<p class="ml-16 truncate text-sm font-medium text-gray-500">Avg. Click Rate</p>
|
70
|
-
</dt>
|
71
|
-
<dd class="ml-16 flex items-baseline pb-6 sm:pb-7">
|
72
|
-
<p class="text-2xl font-semibold text-gray-900">24.57%</p>
|
73
|
-
<p class="ml-2 flex items-baseline text-sm font-semibold text-red-600">
|
74
|
-
<!-- Heroicon name: mini/arrow-down -->
|
75
|
-
<svg class="h-5 w-5 flex-shrink-0 self-center text-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
76
|
-
<path fill-rule="evenodd" d="M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z" clip-rule="evenodd" />
|
77
|
-
</svg>
|
78
|
-
<span class="sr-only"> Decreased by </span>
|
79
|
-
3.2%
|
80
|
-
</p>
|
81
|
-
<div class="absolute inset-x-0 bottom-0 bg-gray-50 px-4 py-4 sm:px-6">
|
82
|
-
<div class="text-sm">
|
83
|
-
<a href="#" class="font-medium text-indigo-600 hover:text-indigo-500"> View all<span class="sr-only"> Avg. Click Rate stats</span></a>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
</dd>
|
87
|
-
</div>
|
88
|
-
</dl>
|
89
|
-
</div>
|
@@ -1,53 +0,0 @@
|
|
1
|
-
<div>
|
2
|
-
<h3 class="text-lg font-medium leading-6 text-gray-900">Last 30 days</h3>
|
3
|
-
<dl class="mt-5 grid grid-cols-1 divide-y divide-gray-200 overflow-hidden rounded-lg bg-white shadow md:grid-cols-3 md:divide-y-0 md:divide-x">
|
4
|
-
<div class="px-4 py-5 sm:p-6">
|
5
|
-
<dt class="text-base font-normal text-gray-900">Total Subscribers</dt>
|
6
|
-
<dd class="mt-1 flex items-baseline justify-between md:block lg:flex">
|
7
|
-
<div class="flex items-baseline text-2xl font-semibold text-indigo-600">
|
8
|
-
71,897
|
9
|
-
<span class="ml-2 text-sm font-medium text-gray-500">from 70,946</span>
|
10
|
-
</div>
|
11
|
-
<div class="inline-flex items-baseline px-2.5 py-0.5 rounded-full text-sm font-medium bg-green-100 text-green-800 md:mt-2 lg:mt-0">
|
12
|
-
<svg class="-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-green-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
13
|
-
<path fill-rule="evenodd" d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z" clip-rule="evenodd" />
|
14
|
-
</svg>
|
15
|
-
<span class="sr-only"> Increased by </span>
|
16
|
-
12%
|
17
|
-
</div>
|
18
|
-
</dd>
|
19
|
-
</div>
|
20
|
-
<div class="px-4 py-5 sm:p-6">
|
21
|
-
<dt class="text-base font-normal text-gray-900">Avg. Open Rate</dt>
|
22
|
-
<dd class="mt-1 flex items-baseline justify-between md:block lg:flex">
|
23
|
-
<div class="flex items-baseline text-2xl font-semibold text-indigo-600">
|
24
|
-
58.16%
|
25
|
-
<span class="ml-2 text-sm font-medium text-gray-500">from 56.14%</span>
|
26
|
-
</div>
|
27
|
-
<div class="inline-flex items-baseline px-2.5 py-0.5 rounded-full text-sm font-medium bg-green-100 text-green-800 md:mt-2 lg:mt-0">
|
28
|
-
<svg class="-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-green-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
29
|
-
<path fill-rule="evenodd" d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z" clip-rule="evenodd" />
|
30
|
-
</svg>
|
31
|
-
<span class="sr-only"> Increased by </span>
|
32
|
-
2.02%
|
33
|
-
</div>
|
34
|
-
</dd>
|
35
|
-
</div>
|
36
|
-
<div class="px-4 py-5 sm:p-6">
|
37
|
-
<dt class="text-base font-normal text-gray-900">Avg. Click Rate</dt>
|
38
|
-
<dd class="mt-1 flex items-baseline justify-between md:block lg:flex">
|
39
|
-
<div class="flex items-baseline text-2xl font-semibold text-indigo-600">
|
40
|
-
24.57%
|
41
|
-
<span class="ml-2 text-sm font-medium text-gray-500">from 28.62%</span>
|
42
|
-
</div>
|
43
|
-
<div class="inline-flex items-baseline px-2.5 py-0.5 rounded-full text-sm font-medium bg-red-100 text-red-800 md:mt-2 lg:mt-0">
|
44
|
-
<svg class="-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
45
|
-
<path fill-rule="evenodd" d="M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z" clip-rule="evenodd" />
|
46
|
-
</svg>
|
47
|
-
<span class="sr-only"> Decreased by </span>
|
48
|
-
4.05%
|
49
|
-
</div>
|
50
|
-
</dd>
|
51
|
-
</div>
|
52
|
-
</dl>
|
53
|
-
</div>
|
@@ -1,61 +0,0 @@
|
|
1
|
-
<div>
|
2
|
-
<h3 class="text-lg font-medium leading-6 text-gray-900">Last 30 days</h3>
|
3
|
-
<dl class="mt-5 grid grid-cols-1 divide-y divide-gray-200 overflow-hidden rounded-lg bg-white shadow md:grid-cols-3 md:divide-y-0 md:divide-x">
|
4
|
-
<div class="px-4 py-5 sm:p-6">
|
5
|
-
<dt class="text-base font-normal text-gray-900">Total Subscribers</dt>
|
6
|
-
<dd class="mt-1 flex items-baseline justify-between md:block lg:flex">
|
7
|
-
<div class="flex items-baseline text-2xl font-semibold text-indigo-600">
|
8
|
-
71,897
|
9
|
-
<span class="ml-2 text-sm font-medium text-gray-500">from 70,946</span>
|
10
|
-
</div>
|
11
|
-
|
12
|
-
<div class="inline-flex items-baseline px-2.5 py-0.5 rounded-full text-sm font-medium bg-green-100 text-green-800 md:mt-2 lg:mt-0">
|
13
|
-
<!-- Heroicon name: mini/arrow-up -->
|
14
|
-
<svg class="-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-green-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
15
|
-
<path fill-rule="evenodd" d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z" clip-rule="evenodd" />
|
16
|
-
</svg>
|
17
|
-
<span class="sr-only"> Increased by </span>
|
18
|
-
12%
|
19
|
-
</div>
|
20
|
-
</dd>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<div class="px-4 py-5 sm:p-6">
|
24
|
-
<dt class="text-base font-normal text-gray-900">Avg. Open Rate</dt>
|
25
|
-
<dd class="mt-1 flex items-baseline justify-between md:block lg:flex">
|
26
|
-
<div class="flex items-baseline text-2xl font-semibold text-indigo-600">
|
27
|
-
58.16%
|
28
|
-
<span class="ml-2 text-sm font-medium text-gray-500">from 56.14%</span>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<div class="inline-flex items-baseline px-2.5 py-0.5 rounded-full text-sm font-medium bg-green-100 text-green-800 md:mt-2 lg:mt-0">
|
32
|
-
<!-- Heroicon name: mini/arrow-up -->
|
33
|
-
<svg class="-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-green-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
34
|
-
<path fill-rule="evenodd" d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z" clip-rule="evenodd" />
|
35
|
-
</svg>
|
36
|
-
<span class="sr-only"> Increased by </span>
|
37
|
-
2.02%
|
38
|
-
</div>
|
39
|
-
</dd>
|
40
|
-
</div>
|
41
|
-
|
42
|
-
<div class="px-4 py-5 sm:p-6">
|
43
|
-
<dt class="text-base font-normal text-gray-900">Avg. Click Rate</dt>
|
44
|
-
<dd class="mt-1 flex items-baseline justify-between md:block lg:flex">
|
45
|
-
<div class="flex items-baseline text-2xl font-semibold text-indigo-600">
|
46
|
-
24.57%
|
47
|
-
<span class="ml-2 text-sm font-medium text-gray-500">from 28.62%</span>
|
48
|
-
</div>
|
49
|
-
|
50
|
-
<div class="inline-flex items-baseline px-2.5 py-0.5 rounded-full text-sm font-medium bg-red-100 text-red-800 md:mt-2 lg:mt-0">
|
51
|
-
<!-- Heroicon name: mini/arrow-down -->
|
52
|
-
<svg class="-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
53
|
-
<path fill-rule="evenodd" d="M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z" clip-rule="evenodd" />
|
54
|
-
</svg>
|
55
|
-
<span class="sr-only"> Decreased by </span>
|
56
|
-
4.05%
|
57
|
-
</div>
|
58
|
-
</dd>
|
59
|
-
</div>
|
60
|
-
</dl>
|
61
|
-
</div>
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TailwindDsl
|
4
|
-
module Etl
|
5
|
-
module ComponentStructures
|
6
|
-
# -----------------------------------------------------------------------------------------------
|
7
|
-
# Internal Data Structure
|
8
|
-
class Data
|
9
|
-
attr_reader :design_system_name
|
10
|
-
attr_reader :group # Component group information
|
11
|
-
attr_reader :source # Source file information for the component
|
12
|
-
attr_reader :target # Multiple target file information
|
13
|
-
|
14
|
-
# Storage buckets for data that is extracted from the source file
|
15
|
-
attr_accessor :captured_comment_text
|
16
|
-
attr_accessor :captured_comment_list
|
17
|
-
attr_accessor :captured_tailwind_config
|
18
|
-
|
19
|
-
# rubocop:disable Metrics/AbcSize
|
20
|
-
def initialize(design_system_name, group, file, root_raw_component_path)
|
21
|
-
@design_system_name = design_system_name
|
22
|
-
|
23
|
-
@captured_comment_text = ''
|
24
|
-
@captured_comment_list = []
|
25
|
-
@captured_tailwind_config = ''
|
26
|
-
|
27
|
-
@group = Group.new(key: group.key, type: group.type, sub_keys: group.sub_keys)
|
28
|
-
@source = Source.new(file: File.join(root_raw_component_path, design_system_name, file.file))
|
29
|
-
@target = Target.new(
|
30
|
-
folder: group.folder,
|
31
|
-
html_file: file.target.html_file,
|
32
|
-
clean_html_file: file.target.clean_html_file,
|
33
|
-
tailwind_config_file: file.target.tailwind_config_file,
|
34
|
-
settings_file: file.target.settings_file,
|
35
|
-
data_file: file.target.data_file,
|
36
|
-
astro_file: file.target.astro_file
|
37
|
-
)
|
38
|
-
end
|
39
|
-
# rubocop:enable Metrics/AbcSize
|
40
|
-
|
41
|
-
Group = Struct.new(:key, :type, :sub_keys, keyword_init: true)
|
42
|
-
Source = Struct.new(:file, keyword_init: true) do
|
43
|
-
def exist?
|
44
|
-
File.exist?(file)
|
45
|
-
end
|
46
|
-
|
47
|
-
def content
|
48
|
-
@content ||= File.exist?(file) ? File.read(file) : ''
|
49
|
-
end
|
50
|
-
end
|
51
|
-
Target = Struct.new(:folder, :html_file, :clean_html_file, :tailwind_config_file, :settings_file, :data_file, :astro_file, keyword_init: true)
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|