@eui/eds 21.3.4-snapshot-1783677674979

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/docs/classes/EdsChipModel.html +606 -0
  2. package/docs/classes/EuiChipTooltip.html +425 -0
  3. package/docs/components/EdsBadge.html +810 -0
  4. package/docs/components/EdsButton.html +793 -0
  5. package/docs/components/EdsChip.html +911 -0
  6. package/docs/components/EdsIcon.html +675 -0
  7. package/docs/components/EdsIconImage.html +604 -0
  8. package/docs/directives/EuiBaseColorVariantsDirective.html +1165 -0
  9. package/docs/directives/EuiBaseSizeVariantsDirective.html +1402 -0
  10. package/docs/fonts/ionicons.eot +0 -0
  11. package/docs/fonts/ionicons.svg +2090 -0
  12. package/docs/fonts/ionicons.ttf +0 -0
  13. package/docs/fonts/ionicons.woff +0 -0
  14. package/docs/fonts/ionicons.woff2 +0 -0
  15. package/docs/fonts/roboto-v15-latin-300.eot +0 -0
  16. package/docs/fonts/roboto-v15-latin-300.svg +314 -0
  17. package/docs/fonts/roboto-v15-latin-300.ttf +0 -0
  18. package/docs/fonts/roboto-v15-latin-300.woff +0 -0
  19. package/docs/fonts/roboto-v15-latin-300.woff2 +0 -0
  20. package/docs/fonts/roboto-v15-latin-700.eot +0 -0
  21. package/docs/fonts/roboto-v15-latin-700.svg +310 -0
  22. package/docs/fonts/roboto-v15-latin-700.ttf +0 -0
  23. package/docs/fonts/roboto-v15-latin-700.woff +0 -0
  24. package/docs/fonts/roboto-v15-latin-700.woff2 +0 -0
  25. package/docs/fonts/roboto-v15-latin-italic.eot +0 -0
  26. package/docs/fonts/roboto-v15-latin-italic.svg +323 -0
  27. package/docs/fonts/roboto-v15-latin-italic.ttf +0 -0
  28. package/docs/fonts/roboto-v15-latin-italic.woff +0 -0
  29. package/docs/fonts/roboto-v15-latin-italic.woff2 +0 -0
  30. package/docs/fonts/roboto-v15-latin-regular.eot +0 -0
  31. package/docs/fonts/roboto-v15-latin-regular.svg +308 -0
  32. package/docs/fonts/roboto-v15-latin-regular.ttf +0 -0
  33. package/docs/fonts/roboto-v15-latin-regular.woff +0 -0
  34. package/docs/fonts/roboto-v15-latin-regular.woff2 +0 -0
  35. package/docs/images/compodoc-vectorise-inverted.png +0 -0
  36. package/docs/images/compodoc-vectorise-inverted.svg +201 -0
  37. package/docs/images/compodoc-vectorise.png +0 -0
  38. package/docs/images/compodoc-vectorise.svg +201 -0
  39. package/docs/images/favicon.ico +0 -0
  40. package/docs/index.html +2264 -0
  41. package/docs/js/compodoc.js +14 -0
  42. package/docs/js/lazy-load-graphs.js +44 -0
  43. package/docs/js/libs/EventDispatcher.js +5 -0
  44. package/docs/js/libs/bootstrap-native.js +2 -0
  45. package/docs/js/libs/clipboard.min.js +7 -0
  46. package/docs/js/libs/custom-elements-es5-adapter.js +15 -0
  47. package/docs/js/libs/custom-elements.min.js +38 -0
  48. package/docs/js/libs/d3.v3.min.js +2 -0
  49. package/docs/js/libs/deep-iterator.js +2 -0
  50. package/docs/js/libs/es6-shim.min.js +12 -0
  51. package/docs/js/libs/htmlparser.js +23 -0
  52. package/docs/js/libs/innersvg.js +9 -0
  53. package/docs/js/libs/jszip.min.js +13 -0
  54. package/docs/js/libs/lit-html.js +1 -0
  55. package/docs/js/libs/prism.js +46 -0
  56. package/docs/js/libs/promise.min.js +6 -0
  57. package/docs/js/libs/svg-pan-zoom.min.js +3 -0
  58. package/docs/js/libs/tablesort.min.js +6 -0
  59. package/docs/js/libs/tablesort.number.min.js +6 -0
  60. package/docs/js/libs/vis-network.min.js +78 -0
  61. package/docs/js/libs/zepto.min.js +2 -0
  62. package/docs/js/menu-wc.js +119 -0
  63. package/docs/js/menu-wc_es5.js +40 -0
  64. package/docs/js/menu.js +269 -0
  65. package/docs/js/routes/routes_index.js +1 -0
  66. package/docs/js/routes.js +308 -0
  67. package/docs/js/search/lunr.min.js +6 -0
  68. package/docs/js/search/search-lunr.js +65 -0
  69. package/docs/js/search/search.js +273 -0
  70. package/docs/js/search/search_index.js +4 -0
  71. package/docs/js/sourceCode.js +58 -0
  72. package/docs/js/svg-pan-zoom.controls.js +53 -0
  73. package/docs/js/tabs.js +21 -0
  74. package/docs/js/tree.js +147 -0
  75. package/docs/json/EdsBadge.md +28 -0
  76. package/docs/json/EdsButton.md +31 -0
  77. package/docs/json/EdsChip.md +30 -0
  78. package/docs/json/EdsIcon.md +32 -0
  79. package/docs/json/EdsIconImage.md +13 -0
  80. package/docs/json/EuiBaseColorVariantsDirective.md +20 -0
  81. package/docs/json/EuiBaseSizeVariantsDirective.md +23 -0
  82. package/docs/json/HbsRenderService.md +6 -0
  83. package/docs/json/TemplateEditorService.md +6 -0
  84. package/docs/json/TemplatePlaygroundComponent.md +8 -0
  85. package/docs/json/ZipExportService.md +6 -0
  86. package/docs/json/documentation.json +5209 -0
  87. package/docs/miscellaneous/variables.html +415 -0
  88. package/docs/modules.html +201 -0
  89. package/docs/overview.html +236 -0
  90. package/docs/routes.html +204 -0
  91. package/docs/styles/bootstrap-card.css +219 -0
  92. package/docs/styles/bootstrap.min.css +6 -0
  93. package/docs/styles/compodoc.css +1124 -0
  94. package/docs/styles/dark.css +121 -0
  95. package/docs/styles/ionicons.min.css +11 -0
  96. package/docs/styles/laravel.css +113 -0
  97. package/docs/styles/material.css +131 -0
  98. package/docs/styles/original.css +51 -0
  99. package/docs/styles/postmark.css +238 -0
  100. package/docs/styles/prism.css +301 -0
  101. package/docs/styles/readthedocs.css +117 -0
  102. package/docs/styles/reset.css +129 -0
  103. package/docs/styles/stripe.css +106 -0
  104. package/docs/styles/style.css +7 -0
  105. package/docs/styles/tablesort.css +33 -0
  106. package/docs/styles/vagrant.css +130 -0
  107. package/docs/template-playground/default-templates.json +192 -0
  108. package/docs/template-playground/hbs-render.service.ts +212 -0
  109. package/docs/template-playground/main.ts +9 -0
  110. package/docs/template-playground/template-editor.service.ts +173 -0
  111. package/docs/template-playground/template-playground.component.ts +614 -0
  112. package/docs/template-playground/template-playground.module.ts +29 -0
  113. package/docs/template-playground/zip-export.service.ts +86 -0
  114. package/docs/template-playground-app/app.js +1389 -0
  115. package/docs/template-playground-app/index.html +462 -0
  116. package/fesm2022/eui-eds-eds-badge.mjs +175 -0
  117. package/fesm2022/eui-eds-eds-badge.mjs.map +1 -0
  118. package/fesm2022/eui-eds-eds-button.mjs +169 -0
  119. package/fesm2022/eui-eds-eds-button.mjs.map +1 -0
  120. package/fesm2022/eui-eds-eds-chip.mjs +196 -0
  121. package/fesm2022/eui-eds-eds-chip.mjs.map +1 -0
  122. package/fesm2022/eui-eds-eds-icon-image.mjs +65 -0
  123. package/fesm2022/eui-eds-eds-icon-image.mjs.map +1 -0
  124. package/fesm2022/eui-eds-eds-icon.mjs +136 -0
  125. package/fesm2022/eui-eds-eds-icon.mjs.map +1 -0
  126. package/fesm2022/eui-eds-shared.mjs +322 -0
  127. package/fesm2022/eui-eds-shared.mjs.map +1 -0
  128. package/fesm2022/eui-eds.mjs +6 -0
  129. package/fesm2022/eui-eds.mjs.map +1 -0
  130. package/package.json +72 -0
  131. package/types/eui-eds-eds-badge.d.ts +74 -0
  132. package/types/eui-eds-eds-badge.d.ts.map +1 -0
  133. package/types/eui-eds-eds-button.d.ts +75 -0
  134. package/types/eui-eds-eds-button.d.ts.map +1 -0
  135. package/types/eui-eds-eds-chip.d.ts +105 -0
  136. package/types/eui-eds-eds-chip.d.ts.map +1 -0
  137. package/types/eui-eds-eds-icon-image.d.ts +34 -0
  138. package/types/eui-eds-eds-icon-image.d.ts.map +1 -0
  139. package/types/eui-eds-eds-icon.d.ts +50 -0
  140. package/types/eui-eds-eds-icon.d.ts.map +1 -0
  141. package/types/eui-eds-shared.d.ts +86 -0
  142. package/types/eui-eds-shared.d.ts.map +1 -0
  143. package/types/eui-eds.d.ts +3 -0
  144. package/types/eui-eds.d.ts.map +1 -0
@@ -0,0 +1,212 @@
1
+ import { Injectable } from '@angular/core';
2
+
3
+ declare const Handlebars: any;
4
+
5
+ @Injectable({
6
+ providedIn: 'root'
7
+ })
8
+ export class HbsRenderService {
9
+ private handlebarsInstance: any;
10
+
11
+ constructor() {
12
+ this.initializeHandlebars();
13
+ }
14
+
15
+ private initializeHandlebars() {
16
+ // Create a new Handlebars instance for the playground
17
+ this.handlebarsInstance = Handlebars.create();
18
+
19
+ // Register common helpers used in Compodoc templates
20
+ this.registerHelpers();
21
+ }
22
+
23
+ private registerHelpers() {
24
+ // Register the 'compare' helper
25
+ this.handlebarsInstance.registerHelper('compare', (left: any, operator: string, right: any, options: any) => {
26
+ let result;
27
+ switch (operator) {
28
+ case '===':
29
+ result = left === right;
30
+ break;
31
+ case '!==':
32
+ result = left !== right;
33
+ break;
34
+ case '<':
35
+ result = left < right;
36
+ break;
37
+ case '>':
38
+ result = left > right;
39
+ break;
40
+ case '<=':
41
+ result = left <= right;
42
+ break;
43
+ case '>=':
44
+ result = left >= right;
45
+ break;
46
+ default:
47
+ result = false;
48
+ }
49
+ return result ? options.fn(this) : options.inverse(this);
50
+ });
51
+
52
+ // Register the 'unless' helper
53
+ this.handlebarsInstance.registerHelper('unless', (conditional: any, options: any) => {
54
+ return !conditional ? options.fn(this) : options.inverse(this);
55
+ });
56
+
57
+ // Register the 'each' helper with index
58
+ this.handlebarsInstance.registerHelper('each', (context: any, options: any) => {
59
+ let ret = '';
60
+ for (let i = 0; i < context.length; i++) {
61
+ ret += options.fn(context[i], { data: { index: i } });
62
+ }
63
+ return ret;
64
+ });
65
+
66
+ // Register the 'if' helper
67
+ this.handlebarsInstance.registerHelper('if', (conditional: any, options: any) => {
68
+ return conditional ? options.fn(this) : options.inverse(this);
69
+ });
70
+
71
+ // Register the 'relativeURL' helper
72
+ this.handlebarsInstance.registerHelper('relativeURL', (depth: number, page?: string) => {
73
+ let url = '';
74
+ for (let i = 0; i < depth; i++) {
75
+ url += '../';
76
+ }
77
+ return url + (page || '');
78
+ });
79
+
80
+ // Register the 't' helper for translations
81
+ this.handlebarsInstance.registerHelper('t', (key: string) => {
82
+ // Simple translation mapping for preview
83
+ const translations: { [key: string]: string } = {
84
+ 'info': 'Information',
85
+ 'source': 'Source',
86
+ 'example': 'Example',
87
+ 'template': 'Template',
88
+ 'styles': 'Styles',
89
+ 'component': 'Component',
90
+ 'module': 'Module',
91
+ 'overview': 'Overview',
92
+ 'components': 'Components',
93
+ 'modules': 'Modules',
94
+ 'file': 'File',
95
+ 'description': 'Description',
96
+ 'selector': 'Selector',
97
+ 'properties': 'Properties',
98
+ 'methods': 'Methods',
99
+ 'inputs': 'Inputs',
100
+ 'outputs': 'Outputs'
101
+ };
102
+ return translations[key] || key;
103
+ });
104
+
105
+ // Register the 'orLength' helper
106
+ this.handlebarsInstance.registerHelper('orLength', (...args: any[]) => {
107
+ const options = args[args.length - 1];
108
+ const values = args.slice(0, -1);
109
+
110
+ for (const value of values) {
111
+ if (value && value.length && value.length > 0) {
112
+ return options.fn(this);
113
+ }
114
+ }
115
+ return options.inverse(this);
116
+ });
117
+
118
+ // Register the 'isTabEnabled' helper
119
+ this.handlebarsInstance.registerHelper('isTabEnabled', (navTabs: any[], tabId: string, options: any) => {
120
+ const tab = navTabs && navTabs.find((t: any) => t.id === tabId);
121
+ return tab ? options.fn(this) : options.inverse(this);
122
+ });
123
+
124
+ // Register the 'isInitialTab' helper
125
+ this.handlebarsInstance.registerHelper('isInitialTab', (navTabs: any[], tabId: string, options: any) => {
126
+ const isInitial = navTabs && navTabs.length > 0 && navTabs[0].id === tabId;
127
+ return isInitial ? options.fn(this) : options.inverse(this);
128
+ });
129
+ }
130
+
131
+ renderTemplate(templateContent: string, data: any): string {
132
+ try {
133
+ // Create a complete HTML document for preview
134
+ const template = this.handlebarsInstance.compile(templateContent);
135
+ const rendered = template({ data });
136
+
137
+ // Wrap in a basic HTML structure for preview
138
+ return `
139
+ <!DOCTYPE html>
140
+ <html>
141
+ <head>
142
+ <meta charset="utf-8">
143
+ <title>Template Preview</title>
144
+ <style>
145
+ body { font-family: Arial, sans-serif; margin: 20px; }
146
+ .preview-wrapper { border: 1px solid #ddd; padding: 20px; }
147
+ .preview-notice { background: #f0f8ff; padding: 10px; margin-bottom: 20px; border-left: 4px solid #007bff; }
148
+ </style>
149
+ </head>
150
+ <body>
151
+ <div class="preview-notice">
152
+ <strong>Template Preview:</strong> This is a live preview of your template with mock data.
153
+ </div>
154
+ <div class="preview-wrapper">
155
+ ${rendered}
156
+ </div>
157
+ </body>
158
+ </html>
159
+ `;
160
+ } catch (error) {
161
+ return `
162
+ <!DOCTYPE html>
163
+ <html>
164
+ <head>
165
+ <meta charset="utf-8">
166
+ <title>Template Preview - Error</title>
167
+ <style>
168
+ body { font-family: Arial, sans-serif; margin: 20px; }
169
+ .error { color: red; background: #fff5f5; padding: 20px; border: 1px solid #red; }
170
+ </style>
171
+ </head>
172
+ <body>
173
+ <div class="error">
174
+ <h3>Template Error</h3>
175
+ <p><strong>Error:</strong> ${error.message}</p>
176
+ <p>Please check your template syntax and try again.</p>
177
+ </div>
178
+ </body>
179
+ </html>
180
+ `;
181
+ }
182
+ }
183
+
184
+ getMockData(): any {
185
+ return {
186
+ documentationMainName: 'Sample Documentation',
187
+ depth: 0,
188
+ context: 'component',
189
+ components: [
190
+ {
191
+ name: 'SampleComponent',
192
+ selector: 'app-sample',
193
+ file: 'src/app/sample/sample.component.ts',
194
+ description: 'A sample component for demonstration',
195
+ properties: [
196
+ { name: 'title', type: 'string', description: 'The component title' },
197
+ { name: 'isVisible', type: 'boolean', description: 'Whether the component is visible' }
198
+ ],
199
+ methods: [
200
+ { name: 'ngOnInit', description: 'Lifecycle hook', signature: 'ngOnInit(): void' },
201
+ { name: 'onClick', description: 'Handle click events', signature: 'onClick(event: MouseEvent): void' }
202
+ ]
203
+ }
204
+ ],
205
+ navTabs: [
206
+ { id: 'info', label: 'Info', href: '#info' },
207
+ { id: 'source', label: 'Source', href: '#source' },
208
+ { id: 'example', label: 'Example', href: '#example' }
209
+ ]
210
+ };
211
+ }
212
+ }
@@ -0,0 +1,9 @@
1
+ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2
+ import { TemplatePlaygroundModule } from './template-playground.module';
3
+
4
+ // Bootstrap the Angular application when the DOM is ready
5
+ document.addEventListener('DOMContentLoaded', () => {
6
+ platformBrowserDynamic()
7
+ .bootstrapModule(TemplatePlaygroundModule)
8
+ .catch(err => console.error('Error starting template playground:', err));
9
+ });
@@ -0,0 +1,173 @@
1
+ import { Injectable } from '@angular/core';
2
+
3
+ declare const monaco: any;
4
+
5
+ @Injectable({
6
+ providedIn: 'root'
7
+ })
8
+ export class TemplateEditorService {
9
+ private editor: any;
10
+ private onChangeCallback: ((value: string) => void) | null = null;
11
+
12
+ initializeEditor(container: HTMLElement) {
13
+ // Initialize Monaco Editor
14
+ this.editor = monaco.editor.create(container, {
15
+ value: '',
16
+ language: 'html',
17
+ theme: 'vs-dark',
18
+ automaticLayout: true,
19
+ minimap: {
20
+ enabled: true
21
+ },
22
+ scrollBeyondLastLine: false,
23
+ fontSize: 14,
24
+ wordWrap: 'on',
25
+ lineNumbers: 'on',
26
+ roundedSelection: false,
27
+ scrollbar: {
28
+ horizontal: 'visible',
29
+ vertical: 'visible'
30
+ },
31
+ overviewRulerLanes: 2,
32
+ quickSuggestions: {
33
+ other: true,
34
+ comments: true,
35
+ strings: true
36
+ },
37
+ parameterHints: {
38
+ enabled: true
39
+ },
40
+ autoClosingBrackets: 'always',
41
+ autoClosingQuotes: 'always',
42
+ suggestOnTriggerCharacters: true,
43
+ acceptSuggestionOnEnter: 'on',
44
+ tabCompletion: 'on',
45
+ wordBasedSuggestions: false
46
+ });
47
+
48
+ // Set up change listener
49
+ this.editor.onDidChangeModelContent(() => {
50
+ if (this.onChangeCallback) {
51
+ this.onChangeCallback(this.editor.getValue());
52
+ }
53
+ });
54
+
55
+ // Register custom language definitions
56
+ this.registerHandlebarsLanguage();
57
+ }
58
+
59
+ setEditorContent(content: string, fileType: string) {
60
+ if (this.editor) {
61
+ const language = this.getLanguageFromFileType(fileType);
62
+ const model = monaco.editor.createModel(content, language);
63
+ this.editor.setModel(model);
64
+ }
65
+ }
66
+
67
+ setOnChangeCallback(callback: (value: string) => void) {
68
+ this.onChangeCallback = callback;
69
+ }
70
+
71
+ private getLanguageFromFileType(fileType: string): string {
72
+ switch (fileType) {
73
+ case 'hbs':
74
+ return 'handlebars';
75
+ case 'css':
76
+ case 'scss':
77
+ return 'css';
78
+ case 'js':
79
+ return 'javascript';
80
+ case 'ts':
81
+ return 'typescript';
82
+ default:
83
+ return 'html';
84
+ }
85
+ }
86
+
87
+ private registerHandlebarsLanguage() {
88
+ // Register Handlebars language for Monaco Editor
89
+ if (monaco.languages.getLanguages().find((lang: any) => lang.id === 'handlebars')) {
90
+ return; // Already registered
91
+ }
92
+
93
+ monaco.languages.register({ id: 'handlebars' });
94
+
95
+ monaco.languages.setMonarchTokensProvider('handlebars', {
96
+ tokenizer: {
97
+ root: [
98
+ [/\{\{\{/, { token: 'keyword', next: '@handlebars_unescaped' }],
99
+ [/\{\{/, { token: 'keyword', next: '@handlebars' }],
100
+ [/<!DOCTYPE/, 'metatag', '@doctype'],
101
+ [/<!--/, 'comment', '@comment'],
102
+ [/(<)(\w+)/, ['delimiter', { token: 'tag', next: '@tag' }]],
103
+ [/(<\/)(\w+)/, ['delimiter', { token: 'tag', next: '@tag' }]],
104
+ [/</, 'delimiter'],
105
+ [/[^<]+/]
106
+ ],
107
+
108
+ handlebars_unescaped: [
109
+ [/\}\}\}/, { token: 'keyword', next: '@pop' }],
110
+ [/[^}]+/, 'variable']
111
+ ],
112
+
113
+ handlebars: [
114
+ [/\}\}/, { token: 'keyword', next: '@pop' }],
115
+ [/#if|#unless|#each|#with|\/if|\/unless|\/each|\/with/, 'keyword'],
116
+ [/[a-zA-Z_][\w]*/, 'variable'],
117
+ [/[^}]+/, 'variable']
118
+ ],
119
+
120
+ comment: [
121
+ [/-->/, 'comment', '@pop'],
122
+ [/[^-]+/, 'comment'],
123
+ [/./, 'comment']
124
+ ],
125
+
126
+ doctype: [
127
+ [/[^>]+/, 'metatag.content'],
128
+ [/>/, 'metatag', '@pop']
129
+ ],
130
+
131
+ tag: [
132
+ [/[ \t\r\n]+/, 'white'],
133
+ [/(\w+)(\s*=\s*)("([^"]*)")/, ['attribute.name', 'delimiter', 'attribute.value', 'attribute.value']],
134
+ [/(\w+)(\s*=\s*)('([^']*)')/, ['attribute.name', 'delimiter', 'attribute.value', 'attribute.value']],
135
+ [/\w+/, 'attribute.name'],
136
+ [/>/, 'delimiter', '@pop']
137
+ ]
138
+ }
139
+ });
140
+
141
+ monaco.languages.setLanguageConfiguration('handlebars', {
142
+ comments: {
143
+ blockComment: ['<!--', '-->']
144
+ },
145
+ brackets: [
146
+ ['<', '>'],
147
+ ['{{', '}}'],
148
+ ['{{{', '}}}']
149
+ ],
150
+ autoClosingPairs: [
151
+ { open: '<', close: '>' },
152
+ { open: '{{', close: '}}' },
153
+ { open: '{{{', close: '}}}' },
154
+ { open: '"', close: '"' },
155
+ { open: "'", close: "'" }
156
+ ],
157
+ surroundingPairs: [
158
+ { open: '<', close: '>' },
159
+ { open: '{{', close: '}}' },
160
+ { open: '{{{', close: '}}}' },
161
+ { open: '"', close: '"' },
162
+ { open: "'", close: "'" }
163
+ ]
164
+ });
165
+ }
166
+
167
+ destroy() {
168
+ if (this.editor) {
169
+ this.editor.dispose();
170
+ this.editor = null;
171
+ }
172
+ }
173
+ }