@dataworkz/crystal 0.1.0-beta.0 → 0.1.0-beta.2
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.
- package/CHANGELOG.md +41 -13
- package/README.md +6 -0
- package/fesm2022/dataworkz-crystal-icons.mjs +31 -321
- package/fesm2022/dataworkz-crystal-icons.mjs.map +1 -1
- package/fesm2022/dataworkz-crystal-markdown.mjs +1 -1
- package/fesm2022/dataworkz-crystal-markdown.mjs.map +1 -1
- package/fesm2022/dataworkz-crystal-primeng.mjs +23 -4
- package/fesm2022/dataworkz-crystal-primeng.mjs.map +1 -1
- package/fesm2022/dataworkz-crystal.mjs +99 -70
- package/fesm2022/dataworkz-crystal.mjs.map +1 -1
- package/icons/index.d.ts +30 -96
- package/icons/svg/files/csv.svg +0 -1
- package/icons/svg/files/generic.svg +0 -1
- package/icons/svg/files/multimedia.svg +0 -1
- package/icons/svg/glyphs/agentBuilder.svg +1 -1
- package/icons/svg/glyphs/notesPad.svg +1 -1
- package/icons/svg/glyphs/panelCollapse.svg +1 -1
- package/icons/svg/glyphs/panelExpand.svg +1 -1
- package/icons/svg/glyphs/play.svg +1 -1
- package/icons/svg/glyphs/robot.svg +1 -1
- package/icons/svg/glyphs/sidebarCollapse.svg +1 -1
- package/icons/svg/glyphs/sidebarExpand.svg +1 -1
- package/icons/svg/glyphs/tagFilled.svg +1 -1
- package/icons/svg/glyphs/testShield.svg +1 -1
- package/icons/svg/storage/generic.svg +0 -1
- package/icons/svg/storage/legacy/microsoft-mail.svg +0 -1
- package/icons/svg/storage/local/microsoft-mail.svg +0 -1
- package/index.d.ts +86 -47
- package/package.json +1 -1
- package/primeng/index.d.ts +33 -4
- package/styles/base.css +4 -4
- package/styles/components/button.css +3 -0
- package/styles/components/content.css +0 -102
- package/styles/components/data.css +1 -1
- package/styles/components/form.css +3 -2
- package/styles/components/surface.css +2 -2
- package/styles/components/toast.css +1 -1
- package/styles/crystal-no-fonts.css +1 -2
- package/styles/tokens/primitives.css +1 -3
- package/styles/tokens/semantic-dark.css +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,30 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this package. Versions follow [semver](https://semver.org); betas may still change the API.
|
|
4
4
|
|
|
5
|
+
## 0.1.0-beta.2 — 2026-11-04
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Small selects get small options wherever their list is appended: `provideCrystalPrimeNG()` now adds
|
|
9
|
+
`dw-select-panel--sm` to the overlay of every `p-select` / `p-multiselect` with `size="small"`, through PrimeNG's
|
|
10
|
+
pass-through (`DW_PRIMENG_PT`, exported). Lists appended to `<body>` used to keep the 14px rows; screens no longer
|
|
11
|
+
set the class by hand. An app's own `pt` settings are merged over crystal's.
|
|
12
|
+
- A selected `dw-icon-button` with `variant="danger"` stays danger red instead of switching to the accent (e.g. a
|
|
13
|
+
"not helpful" rating). Every other variant's selected state is unchanged.
|
|
14
|
+
|
|
15
|
+
## 0.1.0-beta.1 — 2026-11-04
|
|
16
|
+
|
|
17
|
+
The package is now product-neutral: no app type ids, app-only CSS or app validator messages ship in it. An app maps
|
|
18
|
+
its own vocabulary onto crystal through two new provider hooks.
|
|
19
|
+
|
|
20
|
+
### Breaking
|
|
21
|
+
- Logo lookups are by icon key only. `getToolIconPath`, `resolveToolIconKey`, `getStorageIconPath`,
|
|
22
|
+
`resolveStorageIconKey`, `BUILT_IN_TOOL_ICON`, `AGENT_NODE_ICON` and `GENERIC_STORAGE_ICON_LEGACY` are removed; use
|
|
23
|
+
`toolIcon(key)` and `storageIcon(key, { set })`. Type-id → key maps belong to the app.
|
|
24
|
+
- `dw-entity-icon` `kind="tool"` / `kind="storage"` read `type` as an icon key (`snowflake`, `s3`…), unless the app
|
|
25
|
+
provides a resolver (below).
|
|
26
|
+
- The chat-message, chat-composer and citation-chip CSS is removed from `styles/` (it was app-specific).
|
|
27
|
+
- `DW_FIELD_MESSAGES` holds Angular's built-in validators only (`required`, `requiredTrue`, `email`, `pattern`, `min`,
|
|
28
|
+
`max`, `minlength`, `maxlength`). Messages for an app's own validators come from `provideCrystalFieldMessages()`.
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- `TOOL_ICON_KEYS`, `isToolIconKey()`, `toolIcon()`, `GENERIC_TOOL_ICON`, `storageIconKeys()`, `storageIcon()`, and the
|
|
32
|
+
`ToolIconKey` / `StorageIconKey` types (`@dataworkz/crystal/icons`).
|
|
33
|
+
- `provideCrystalIconResolvers({ tool, storage })`: map an app's type ids to icon keys for `dw-entity-icon`.
|
|
34
|
+
- `provideCrystalFieldMessages({ … })`: messages for an app's own validator keys (a per-field `messages` input still
|
|
35
|
+
wins).
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- Comments, examples and the raw `icons/svg/` files carry no internal references; shipped SVGs have no comments.
|
|
39
|
+
- The package check fails a build that ships app vocabulary, source maps included.
|
|
40
|
+
|
|
5
41
|
## 0.1.0-beta.0 — 2026-11-04
|
|
6
42
|
|
|
7
|
-
First release
|
|
43
|
+
First release.
|
|
8
44
|
|
|
9
45
|
### Added
|
|
10
46
|
- 49 `dw-*` components and directives (buttons, menus, badges, tags, chips, cards, sections, tabs, nav list, dialogs,
|
|
11
|
-
drawers, popovers, tables, fields, file dropzone, toasts…)
|
|
47
|
+
drawers, popovers, tables, fields, file dropzone, toasts…).
|
|
12
48
|
- `provideCrystal({ theme })` and `ThemeService` (light / dark on `data-theme`), `provideCrystalPrimeNG()` and `DwPreset`
|
|
13
49
|
(`@dataworkz/crystal/primeng`).
|
|
14
50
|
- Toasts: `DwToastService` owns the stack (`success / info / warning / error`, `dismiss`, `clear`, `toasts`), rendered by
|
|
15
|
-
`<dw-toast-host
|
|
16
|
-
- Icons: every
|
|
17
|
-
|
|
51
|
+
`<dw-toast-host>`.
|
|
52
|
+
- Icons: every icon is an `.svg` file, inlined (no asset URLs): glyphs via `dw-icon` / `dwi-<name>`, tool / storage /
|
|
53
|
+
file-type logos as data URIs (`@dataworkz/crystal/icons`, raw files under `icons/svg/`).
|
|
18
54
|
`provideCrystalIcons()` / `DwIconRegistry` register an app's own icons by name.
|
|
19
55
|
- Theme CSS (`styles/crystal.css`, `crystal-no-fonts.css`) with Inter and IBM Plex Mono bundled (OFL); nothing is
|
|
20
56
|
loaded from a font service or CDN.
|
|
21
57
|
- `installCrystalHostTheme()` themes pages crystal doesn't own (federated custom elements).
|
|
22
58
|
- Token helpers `dwVar`, `cssVar`, `chartPalette` (`@dataworkz/crystal/tokens`); `dw-code-block`, `dw-markdown`
|
|
23
59
|
(`@dataworkz/crystal/markdown`, optional `ngx-markdown`).
|
|
24
|
-
|
|
25
|
-
### Changed (compared with the copies in dataworkz-ui)
|
|
26
|
-
- `DwMenuItem.privilege` is gone: hide items with `visible` (e.g. `visible: auth.hasPrivilege('x')`).
|
|
27
|
-
- The icon lookups (`getToolIconPath`, `getStorageIconPath`, `fileIconByExtension`) return data URIs instead of asset paths.
|
|
28
|
-
- `DW_ICON_NAMES` is alphabetical.
|
|
29
|
-
- `installElementTheme()` / `DwElementThemeComponent` are replaced by `installCrystalHostTheme()`; element hosts take the
|
|
30
|
-
`dw-element` class for the theme font.
|
|
31
|
-
- `dw-tile` keeps a real space between its count and unit (screen readers read "3 connections").
|
package/README.md
CHANGED
|
@@ -33,6 +33,12 @@ export const appConfig = {
|
|
|
33
33
|
- **Toasts:** `inject(DwToastService).success('Saved')`, `.error('Failed', { sticky: true })`, `.dismiss(id)`, `.clear()`.
|
|
34
34
|
- **Your own icons:** `provideCrystalIcons({ rocket: rocketSvg })` (markup strings, e.g. `import rocketSvg from './rocket.svg?raw'`;
|
|
35
35
|
any name not starting with `dw`), then `<dw-icon name="rocket" />` or `icon="rocket"`.
|
|
36
|
+
- **Logos:** `toolIcon('snowflake')`, `storageIcon('s3')`, `storageIcon('postgres', { set: 'sources' })` (data URIs;
|
|
37
|
+
`TOOL_ICON_KEYS` / `storageIconKeys()` list the keys). `<dw-entity-icon kind="tool" type="snowflake" />` reads `type`
|
|
38
|
+
as a key; to pass your own type ids instead, map them once:
|
|
39
|
+
`provideCrystalIconResolvers({ tool: (type) => myToolKeys[type], storage: (type) => myStorageKeys[type] })`.
|
|
40
|
+
- **Field messages:** `dw-field` knows Angular's built-in validators. Add messages for your own validator keys with
|
|
41
|
+
`provideCrystalFieldMessages({ duplicate: 'This name already exists' })` (a field's `messages` input still wins).
|
|
36
42
|
- **Federated custom elements on a page you don't own:** `provideCrystal({ theme: { apply: false } })`, call
|
|
37
43
|
`installCrystalHostTheme()` in the element's bootstrap, and put the `dw-element` class on the element host.
|
|
38
44
|
`installCrystalHostTheme({ fonts: false })` if the page already loads Inter / IBM Plex Mono.
|
|
@@ -267,339 +267,49 @@ function icon(name, size = '1em', color = 'currentColor') {
|
|
|
267
267
|
return DW_GLYPH_SVGS[name].replace('<svg', `<svg width="${size}" height="${size}"`).replace(/currentColor/g, color);
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
/**
|
|
270
|
+
/** Every tool icon key, from the files in `icons/svg/tools/`. */
|
|
271
|
+
const TOOL_ICON_KEYS = Object.keys(DW_LOGO_URIS)
|
|
272
|
+
.filter((path) => path.startsWith('tools/') && path !== 'tools/generic')
|
|
273
|
+
.map((path) => path.slice('tools/'.length));
|
|
274
|
+
/** Shown for a tool without its own artwork. */
|
|
271
275
|
const GENERIC_TOOL_ICON = DW_LOGO_URIS['tools/generic'];
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
const AGENT_NODE_ICON = DW_LOGO_URIS['tools/agent'];
|
|
276
|
-
/**
|
|
277
|
-
* Backend `typeId` / `subType` values (lowercased) -> canonical family.
|
|
278
|
-
* Also accepts the UI filter keys (`dataset-query`, `built-in`, ...) so filter
|
|
279
|
-
* rows and tool rows resolve through the same table.
|
|
280
|
-
*/
|
|
281
|
-
const TYPE_ID_TO_KEY = {
|
|
282
|
-
'dw-data-api': 'dataset-read',
|
|
283
|
-
dataset: 'dataset-read',
|
|
284
|
-
'dataset-query': 'dataset-read',
|
|
285
|
-
'dw-data-write-api': 'dataset-write',
|
|
286
|
-
'dataset-write': 'dataset-write',
|
|
287
|
-
qna: 'rag-app',
|
|
288
|
-
'qna-search': 'rag-app',
|
|
289
|
-
'rag-app': 'rag-app',
|
|
290
|
-
'mongodb.query': 'mongodb',
|
|
291
|
-
mongodb: 'mongodb',
|
|
292
|
-
graphql: 'graphql',
|
|
293
|
-
snowflake: 'snowflake',
|
|
294
|
-
'rest-api': 'rest-api',
|
|
295
|
-
llm: 'llm',
|
|
296
|
-
'relational-db': 'relational-db',
|
|
297
|
-
jdbc: 'relational-db',
|
|
298
|
-
composite: 'workflow',
|
|
299
|
-
workflow: 'workflow',
|
|
300
|
-
'call-agent': 'call-agent',
|
|
301
|
-
'dw-docstore-finddocs-api': 'docstore',
|
|
302
|
-
'dw-docstore-getdoc-api': 'docstore',
|
|
303
|
-
'dw-docstore-fetchdoccon-api': 'docstore',
|
|
304
|
-
// Custom metric tools. Only built-in rows carry these types, so they share the built-in
|
|
305
|
-
// mark - also on surfaces that pass the typeId without the dz- tool id.
|
|
306
|
-
'dw-metric-write-api': 'built-in',
|
|
307
|
-
'dw-metric-read-api': 'built-in',
|
|
308
|
-
'dw-metric-list-api': 'built-in',
|
|
309
|
-
agent: 'agent',
|
|
310
|
-
'built-in': 'built-in',
|
|
311
|
-
// Closed-loop system tools call a REST endpoint through a stored connection, so they reuse the
|
|
312
|
-
// rest-api family. Both the saved typeId and the create-route segment resolve here. A branded
|
|
313
|
-
// system that gains its own artwork adds a ToolIconKey; until then one row each is enough.
|
|
314
|
-
'generic-close-loop-system': 'rest-api',
|
|
315
|
-
'generic-saas': 'rest-api',
|
|
316
|
-
};
|
|
317
|
-
/**
|
|
318
|
-
* The canonical icon per tool family. Bare glyphs — see the framing note above.
|
|
319
|
-
*
|
|
320
|
-
* `docstore` and `built-in` deliberately share the Dataworkz document mark: the
|
|
321
|
-
* docstore APIs *are* built-in tools, and the two were only ever distinguished
|
|
322
|
-
* by which folder a surface happened to read from.
|
|
323
|
-
*/
|
|
324
|
-
const TOOL_ICONS = {
|
|
325
|
-
'dataset-read': DW_LOGO_URIS['tools/dataset-read'],
|
|
326
|
-
'dataset-write': DW_LOGO_URIS['tools/dataset-write'],
|
|
327
|
-
'rag-app': DW_LOGO_URIS['tools/rag-app'],
|
|
328
|
-
mongodb: DW_LOGO_URIS['tools/mongodb'],
|
|
329
|
-
graphql: DW_LOGO_URIS['tools/graphql'],
|
|
330
|
-
snowflake: DW_LOGO_URIS['tools/snowflake'],
|
|
331
|
-
'rest-api': DW_LOGO_URIS['tools/rest-api'],
|
|
332
|
-
llm: DW_LOGO_URIS['tools/llm'],
|
|
333
|
-
'relational-db': DW_LOGO_URIS['tools/relational-db'],
|
|
334
|
-
workflow: DW_LOGO_URIS['tools/workflow'],
|
|
335
|
-
'call-agent': DW_LOGO_URIS['tools/call-agent'],
|
|
336
|
-
docstore: BUILT_IN_TOOL_ICON,
|
|
337
|
-
agent: AGENT_NODE_ICON,
|
|
338
|
-
'built-in': BUILT_IN_TOOL_ICON,
|
|
339
|
-
};
|
|
340
|
-
const has = (text, needle) => text.includes(needle);
|
|
341
|
-
const isDocStore = (text) => has(text, 'docstore') || has(text, 'doc store');
|
|
276
|
+
function isToolIconKey(key) {
|
|
277
|
+
return !!key && TOOL_ICON_KEYS.includes(key);
|
|
278
|
+
}
|
|
342
279
|
/**
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
* matters: the first match wins.
|
|
280
|
+
* The tool icon (a data URI) for a key, e.g. `toolIcon('snowflake')`, or `fallback` for an unknown key.
|
|
281
|
+
* Keys are crystal's artwork names; map your own tool types to them (e.g. with `provideCrystalIconResolvers()`).
|
|
346
282
|
*/
|
|
347
|
-
|
|
348
|
-
{
|
|
349
|
-
key: 'dataset-write',
|
|
350
|
-
test: text => text === 'dw-data-write-api' ||
|
|
351
|
-
(has(text, 'dataset') && has(text, 'write')) ||
|
|
352
|
-
(isDocStore(text) && has(text, 'write')),
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
key: 'dataset-read',
|
|
356
|
-
test: text => text === 'dw-data-api' ||
|
|
357
|
-
(has(text, 'dataset') && (has(text, 'read') || has(text, 'query'))) ||
|
|
358
|
-
(isDocStore(text) && (has(text, 'read') || has(text, 'query'))),
|
|
359
|
-
},
|
|
360
|
-
{ key: 'dataset-read', test: isDocStore },
|
|
361
|
-
{
|
|
362
|
-
key: 'rag-app',
|
|
363
|
-
test: text => text === 'qna' || text === 'qna-search' || text === 'rag-app' || has(text, 'rag'),
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
key: 'mongodb',
|
|
367
|
-
test: text => text === 'mongodb.query' || text === 'mongodb' || has(text, 'mongo'),
|
|
368
|
-
},
|
|
369
|
-
{ key: 'graphql', test: text => text === 'graphql' || has(text, 'graph') },
|
|
370
|
-
{ key: 'snowflake', test: text => has(text, 'snowflake') },
|
|
371
|
-
{ key: 'rest-api', test: text => text === 'rest-api' || has(text, 'rest') },
|
|
372
|
-
{ key: 'llm', test: text => has(text, 'llm') },
|
|
373
|
-
{
|
|
374
|
-
key: 'relational-db',
|
|
375
|
-
test: text => text === 'relational-db' || text === 'jdbc' || has(text, 'relational'),
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
key: 'workflow',
|
|
379
|
-
test: text => text === 'composite' || text === 'workflow' || has(text, 'workflow'),
|
|
380
|
-
},
|
|
381
|
-
{ key: 'call-agent', test: text => text === 'call-agent' || has(text, 'call agent') },
|
|
382
|
-
];
|
|
383
|
-
/** Canonical family for a typeId / subType, or `null` when unknown. */
|
|
384
|
-
function resolveToolIconKey(typeId, options = {}) {
|
|
385
|
-
const normalized = String(typeId ?? '')
|
|
386
|
-
.trim()
|
|
387
|
-
.toLowerCase();
|
|
388
|
-
if (!normalized)
|
|
389
|
-
return null;
|
|
390
|
-
if (options.fuzzy) {
|
|
391
|
-
return FUZZY_RULES.find(rule => rule.test(normalized))?.key ?? null;
|
|
392
|
-
}
|
|
393
|
-
return TYPE_ID_TO_KEY[normalized] ?? null;
|
|
394
|
-
}
|
|
395
|
-
/** Icon (a data URI) for a tool type. The only place a tool icon is decided. (The name is kept from when it returned an asset path.) */
|
|
396
|
-
function getToolIconPath(typeId, options = {}) {
|
|
397
|
-
const toolId = String(options.toolId ?? '')
|
|
398
|
-
.trim()
|
|
399
|
-
.toLowerCase();
|
|
400
|
-
if (toolId.startsWith('dz-'))
|
|
401
|
-
return TOOL_ICONS['built-in'];
|
|
402
|
-
const key = resolveToolIconKey(typeId, options);
|
|
403
|
-
if (key)
|
|
404
|
-
return TOOL_ICONS[key];
|
|
405
|
-
return options.fallback ?? GENERIC_TOOL_ICON;
|
|
283
|
+
function toolIcon(key, fallback = GENERIC_TOOL_ICON) {
|
|
284
|
+
return isToolIconKey(key) ? DW_LOGO_URIS[`tools/${key}`] : fallback;
|
|
406
285
|
}
|
|
407
286
|
|
|
408
|
-
/** Shown for a storage type the set has no artwork for. */
|
|
287
|
+
/** Shown for a storage type the set has no artwork for (the `local` and `legacy` sets). */
|
|
409
288
|
const GENERIC_STORAGE_ICON = DW_LOGO_URIS['storage/generic'];
|
|
410
|
-
/**
|
|
411
|
-
const GENERIC_STORAGE_ICON_LEGACY = DW_LOGO_URIS['storage/generic'];
|
|
412
|
-
/** Fallback for collection rows, which read better as a generic datastore. */
|
|
289
|
+
/** A generic datastore, e.g. for collection rows. */
|
|
413
290
|
const GENERIC_COLLECTION_ICON = DW_LOGO_URIS['storage/collection'];
|
|
414
|
-
/**
|
|
415
|
-
* Raw `storageType` values (lowercased) -> canonical family. Closed-loop SaaS
|
|
416
|
-
* connectors are listed explicitly rather than prefix-stripped, because
|
|
417
|
-
* `google` (cloud storage) and `closedloop_google` (Sheets) are different logos.
|
|
418
|
-
*/
|
|
419
|
-
const STORAGE_TYPE_TO_KEY = {
|
|
420
|
-
s3: 's3',
|
|
421
|
-
azure: 'azure',
|
|
422
|
-
google: 'google-cloud',
|
|
423
|
-
gcp: 'google-cloud',
|
|
424
|
-
gcs: 'google-cloud',
|
|
425
|
-
hdfs: 'hdfs',
|
|
426
|
-
snowflake: 'snowflake',
|
|
427
|
-
bigquery: 'bigquery',
|
|
428
|
-
databricks: 'databricks',
|
|
429
|
-
datastax: 'datastax',
|
|
430
|
-
relational_mysql: 'mysql',
|
|
431
|
-
relational_postgres: 'postgres',
|
|
432
|
-
relational_cockroach: 'cockroach',
|
|
433
|
-
relational_oracle: 'oracle',
|
|
434
|
-
graph_oracle: 'oracle',
|
|
435
|
-
relational_mariadb: 'mariadb',
|
|
436
|
-
relational_db2: 'db2',
|
|
437
|
-
relational_microsoft: 'sqlserver',
|
|
438
|
-
mongodb: 'mongodb',
|
|
439
|
-
elastic_search: 'elastic',
|
|
440
|
-
aerospike: 'aerospike',
|
|
441
|
-
redshift: 'redshift',
|
|
442
|
-
kafka: 'kafka',
|
|
443
|
-
pinecone: 'pinecone',
|
|
444
|
-
neo4j: 'neo4j',
|
|
445
|
-
opensearch: 'opensearch',
|
|
446
|
-
couchbase: 'couchbase',
|
|
447
|
-
salesforce: 'salesforce',
|
|
448
|
-
closedloop_salesforce: 'salesforce',
|
|
449
|
-
marketo: 'marketo',
|
|
450
|
-
closedloop_marketo: 'marketo',
|
|
451
|
-
hubspot: 'hubspot',
|
|
452
|
-
closedloop_hubspot: 'hubspot',
|
|
453
|
-
jira: 'jira',
|
|
454
|
-
closedloop_jira: 'jira',
|
|
455
|
-
zoom: 'zoom',
|
|
456
|
-
closedloop_zoom: 'zoom',
|
|
457
|
-
outreach: 'outreach',
|
|
458
|
-
closedloop_outreach: 'outreach',
|
|
459
|
-
pendo: 'pendo',
|
|
460
|
-
closedloop_pendo: 'pendo',
|
|
461
|
-
closedloop_google: 'google-sheets',
|
|
462
|
-
storagebridge: 'storagebridge',
|
|
463
|
-
closedloop_storagebridge: 'storagebridge',
|
|
464
|
-
onedrive: 'onedrive',
|
|
465
|
-
sharepoint: 'sharepoint',
|
|
466
|
-
googledrive: 'googledrive',
|
|
467
|
-
nas: 'nas',
|
|
468
|
-
upload: 'upload',
|
|
469
|
-
microsoftmail: 'microsoft-mail',
|
|
470
|
-
closedloop_microsoftmail: 'microsoft-mail',
|
|
471
|
-
filestream: 'filestream',
|
|
472
|
-
closedloop_filestream: 'filestream',
|
|
473
|
-
broadcomclarity: 'broadcom-clarity',
|
|
474
|
-
closedloop_broadcomclarity: 'broadcom-clarity',
|
|
475
|
-
};
|
|
476
|
-
/**
|
|
477
|
-
* dataworkz-ui's own artwork. File sources (onedrive, sharepoint, nas, upload…),
|
|
478
|
-
* cockroach and the closed-loop-only connectors have no local art — those fall
|
|
479
|
-
* through to the generic icon, as they did before.
|
|
480
|
-
*/
|
|
481
|
-
const LOCAL_ICONS = {
|
|
482
|
-
s3: DW_LOGO_URIS['storage/local/s3'],
|
|
483
|
-
azure: DW_LOGO_URIS['storage/local/azure'],
|
|
484
|
-
'google-cloud': DW_LOGO_URIS['storage/local/google-cloud'],
|
|
485
|
-
hdfs: DW_LOGO_URIS['storage/local/hdfs'],
|
|
486
|
-
snowflake: DW_LOGO_URIS['storage/local/snowflake'],
|
|
487
|
-
bigquery: DW_LOGO_URIS['storage/local/bigquery'],
|
|
488
|
-
databricks: DW_LOGO_URIS['storage/local/databricks'],
|
|
489
|
-
datastax: DW_LOGO_URIS['storage/local/datastax'],
|
|
490
|
-
mysql: DW_LOGO_URIS['storage/local/mysql'],
|
|
491
|
-
postgres: DW_LOGO_URIS['storage/local/postgres'],
|
|
492
|
-
oracle: DW_LOGO_URIS['storage/local/oracle'],
|
|
493
|
-
mariadb: DW_LOGO_URIS['storage/local/mariadb'],
|
|
494
|
-
db2: DW_LOGO_URIS['storage/local/db2'],
|
|
495
|
-
sqlserver: DW_LOGO_URIS['storage/local/sqlserver'],
|
|
496
|
-
mongodb: DW_LOGO_URIS['storage/local/mongodb'],
|
|
497
|
-
elastic: DW_LOGO_URIS['storage/local/elastic'],
|
|
498
|
-
aerospike: DW_LOGO_URIS['storage/local/aerospike'],
|
|
499
|
-
redshift: DW_LOGO_URIS['storage/local/redshift'],
|
|
500
|
-
kafka: DW_LOGO_URIS['storage/local/kafka'],
|
|
501
|
-
pinecone: DW_LOGO_URIS['storage/local/pinecone'],
|
|
502
|
-
neo4j: DW_LOGO_URIS['storage/local/neo4j'],
|
|
503
|
-
opensearch: DW_LOGO_URIS['storage/local/opensearch'],
|
|
504
|
-
couchbase: DW_LOGO_URIS['storage/local/couchbase'],
|
|
505
|
-
salesforce: DW_LOGO_URIS['storage/local/salesforce'],
|
|
506
|
-
marketo: DW_LOGO_URIS['storage/local/marketo'],
|
|
507
|
-
hubspot: DW_LOGO_URIS['storage/local/hubspot'],
|
|
508
|
-
jira: DW_LOGO_URIS['storage/local/jira'],
|
|
509
|
-
zoom: DW_LOGO_URIS['storage/local/zoom'],
|
|
510
|
-
outreach: DW_LOGO_URIS['storage/local/outreach'],
|
|
511
|
-
pendo: DW_LOGO_URIS['storage/local/pendo'],
|
|
512
|
-
'google-sheets': DW_LOGO_URIS['storage/local/google-sheets'],
|
|
513
|
-
'microsoft-mail': DW_LOGO_URIS['storage/local/microsoft-mail'],
|
|
514
|
-
};
|
|
515
|
-
/**
|
|
516
|
-
* dataworkz-web's artwork — the widest set, and the only one carrying
|
|
517
|
-
* file-source and closed-loop-only artwork. Some logos differ from `local`
|
|
518
|
-
* (e.g. sqlserver, onedrive).
|
|
519
|
-
*/
|
|
520
|
-
const LEGACY_ICONS = {
|
|
521
|
-
s3: DW_LOGO_URIS['storage/legacy/s3'],
|
|
522
|
-
azure: DW_LOGO_URIS['storage/legacy/azure'],
|
|
523
|
-
'google-cloud': DW_LOGO_URIS['storage/legacy/google-cloud'],
|
|
524
|
-
hdfs: DW_LOGO_URIS['storage/legacy/hdfs'],
|
|
525
|
-
snowflake: DW_LOGO_URIS['storage/legacy/snowflake'],
|
|
526
|
-
bigquery: DW_LOGO_URIS['storage/legacy/bigquery'],
|
|
527
|
-
databricks: DW_LOGO_URIS['storage/legacy/databricks'],
|
|
528
|
-
datastax: DW_LOGO_URIS['storage/legacy/datastax'],
|
|
529
|
-
mysql: DW_LOGO_URIS['storage/legacy/mysql'],
|
|
530
|
-
postgres: DW_LOGO_URIS['storage/legacy/postgres'],
|
|
531
|
-
cockroach: DW_LOGO_URIS['storage/legacy/cockroach'],
|
|
532
|
-
oracle: DW_LOGO_URIS['storage/legacy/oracle'],
|
|
533
|
-
mariadb: DW_LOGO_URIS['storage/legacy/mariadb'],
|
|
534
|
-
db2: DW_LOGO_URIS['storage/legacy/db2'],
|
|
535
|
-
sqlserver: DW_LOGO_URIS['storage/legacy/sqlserver'],
|
|
536
|
-
mongodb: DW_LOGO_URIS['storage/legacy/mongodb'],
|
|
537
|
-
elastic: DW_LOGO_URIS['storage/legacy/elastic'],
|
|
538
|
-
aerospike: DW_LOGO_URIS['storage/legacy/aerospike'],
|
|
539
|
-
redshift: DW_LOGO_URIS['storage/legacy/redshift'],
|
|
540
|
-
kafka: DW_LOGO_URIS['storage/legacy/kafka'],
|
|
541
|
-
pinecone: DW_LOGO_URIS['storage/legacy/pinecone'],
|
|
542
|
-
neo4j: DW_LOGO_URIS['storage/legacy/neo4j'],
|
|
543
|
-
opensearch: DW_LOGO_URIS['storage/legacy/opensearch'],
|
|
544
|
-
couchbase: DW_LOGO_URIS['storage/legacy/couchbase'],
|
|
545
|
-
salesforce: DW_LOGO_URIS['storage/legacy/salesforce'],
|
|
546
|
-
marketo: DW_LOGO_URIS['storage/legacy/marketo'],
|
|
547
|
-
hubspot: DW_LOGO_URIS['storage/legacy/hubspot'],
|
|
548
|
-
jira: DW_LOGO_URIS['storage/legacy/jira'],
|
|
549
|
-
zoom: DW_LOGO_URIS['storage/legacy/zoom'],
|
|
550
|
-
outreach: DW_LOGO_URIS['storage/legacy/outreach'],
|
|
551
|
-
pendo: DW_LOGO_URIS['storage/legacy/pendo'],
|
|
552
|
-
'google-sheets': DW_LOGO_URIS['storage/legacy/google-sheets'],
|
|
553
|
-
storagebridge: DW_LOGO_URIS['storage/legacy/storagebridge'],
|
|
554
|
-
onedrive: DW_LOGO_URIS['storage/legacy/onedrive'],
|
|
555
|
-
sharepoint: DW_LOGO_URIS['storage/legacy/sharepoint'],
|
|
556
|
-
googledrive: DW_LOGO_URIS['storage/legacy/googledrive'],
|
|
557
|
-
nas: DW_LOGO_URIS['storage/legacy/nas'],
|
|
558
|
-
upload: DW_LOGO_URIS['storage/legacy/upload'],
|
|
559
|
-
filestream: DW_LOGO_URIS['storage/legacy/filestream'],
|
|
560
|
-
'broadcom-clarity': DW_LOGO_URIS['storage/legacy/broadcom-clarity'],
|
|
561
|
-
// dataworkz-web has no artwork of its own for it: the same file as `local`.
|
|
562
|
-
'microsoft-mail': DW_LOGO_URIS['storage/legacy/microsoft-mail'],
|
|
563
|
-
};
|
|
564
|
-
/** File-source artwork for the data-collections drawers. */
|
|
565
|
-
const SOURCES_ICONS = {
|
|
566
|
-
s3: DW_LOGO_URIS['storage/sources/s3'],
|
|
567
|
-
azure: DW_LOGO_URIS['storage/sources/azure'],
|
|
568
|
-
'google-cloud': DW_LOGO_URIS['storage/sources/google-cloud'],
|
|
569
|
-
sharepoint: DW_LOGO_URIS['storage/sources/sharepoint'],
|
|
570
|
-
onedrive: DW_LOGO_URIS['storage/sources/onedrive'],
|
|
571
|
-
googledrive: DW_LOGO_URIS['storage/sources/googledrive'],
|
|
572
|
-
nas: DW_LOGO_URIS['storage/sources/nas'],
|
|
573
|
-
};
|
|
574
|
-
const ICON_SETS = {
|
|
575
|
-
local: LOCAL_ICONS,
|
|
576
|
-
legacy: LEGACY_ICONS,
|
|
577
|
-
sources: SOURCES_ICONS,
|
|
578
|
-
};
|
|
291
|
+
/** What each set falls back to: the generic icon, or nothing for `sources` (its callers hide the icon slot). */
|
|
579
292
|
const SET_FALLBACK = {
|
|
580
293
|
local: GENERIC_STORAGE_ICON,
|
|
581
|
-
legacy:
|
|
582
|
-
// The drawers hide the icon slot entirely when a source has no artwork.
|
|
294
|
+
legacy: GENERIC_STORAGE_ICON,
|
|
583
295
|
sources: '',
|
|
584
296
|
};
|
|
585
|
-
/**
|
|
586
|
-
function
|
|
587
|
-
const
|
|
588
|
-
|
|
589
|
-
.
|
|
590
|
-
|
|
591
|
-
return null;
|
|
592
|
-
return STORAGE_TYPE_TO_KEY[normalized] ?? null;
|
|
297
|
+
/** The storage icon keys a set has artwork for. */
|
|
298
|
+
function storageIconKeys(set = 'local') {
|
|
299
|
+
const prefix = `storage/${set}/`;
|
|
300
|
+
return Object.keys(DW_LOGO_URIS)
|
|
301
|
+
.filter((path) => path.startsWith(prefix))
|
|
302
|
+
.map((path) => path.slice(prefix.length));
|
|
593
303
|
}
|
|
594
304
|
/**
|
|
595
|
-
*
|
|
596
|
-
*
|
|
305
|
+
* The storage icon (a data URI) for a key in a set, e.g. `storageIcon('s3')` or `storageIcon('upload', { set: 'legacy' })`,
|
|
306
|
+
* else the set's fallback. Keys are crystal's artwork names; map your own storage types to them (e.g. with
|
|
307
|
+
* `provideCrystalIconResolvers()`).
|
|
597
308
|
*/
|
|
598
|
-
function
|
|
309
|
+
function storageIcon(key, options = {}) {
|
|
599
310
|
const set = options.set ?? 'local';
|
|
600
|
-
const
|
|
601
|
-
|
|
602
|
-
return icon ?? options.fallback ?? SET_FALLBACK[set];
|
|
311
|
+
const uri = key ? DW_LOGO_URIS[`storage/${set}/${key}`] : undefined;
|
|
312
|
+
return uri ?? options.fallback ?? SET_FALLBACK[set];
|
|
603
313
|
}
|
|
604
314
|
|
|
605
315
|
const FILE_EXTENSION_GROUPS = {
|
|
@@ -821,13 +531,13 @@ function sourceTypeLabelByExtension(extension) {
|
|
|
821
531
|
}
|
|
822
532
|
|
|
823
533
|
/*
|
|
824
|
-
* @dataworkz/crystal/icons — framework-free icon names and
|
|
825
|
-
*
|
|
534
|
+
* @dataworkz/crystal/icons — framework-free icon names, markup and logos (no Angular imports). Every icon is a file in
|
|
535
|
+
* icons/svg/, inlined: glyphs as markup, logos as data URIs.
|
|
826
536
|
*/
|
|
827
537
|
|
|
828
538
|
/**
|
|
829
539
|
* Generated bundle index. Do not edit.
|
|
830
540
|
*/
|
|
831
541
|
|
|
832
|
-
export {
|
|
542
|
+
export { DW_ICON_NAMES, DW_ICON_PREFIX, DW_LOGO_URIS, GENERIC_COLLECTION_ICON, GENERIC_STORAGE_ICON, GENERIC_TOOL_ICON, TOOL_ICON_KEYS, dwIconName, fileIconByExtension, icon, isGlyphName, isToolIconKey, storageIcon, storageIconKeys, toolIcon };
|
|
833
543
|
//# sourceMappingURL=dataworkz-crystal-icons.mjs.map
|