@nice2dev/ui-bi 1.2.0 → 1.2.1
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 +103 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +130 -128
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,108 @@
|
|
|
1
1
|
# @nice2dev/ui-bi
|
|
2
2
|
|
|
3
|
+
## 1.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8c82c30: 1.2.1 — the decisions that waited since 1.2.0, and the debts the CI gates were holding. One API
|
|
8
|
+
change, agreed: `NiceIconSuggestorAI` suggests Nice icons only. Two stylesheets to import if you use
|
|
9
|
+
the packages: `@nice2dev/social/style.css`, `@nice2dev/ui-science/style.css`. Upgrade notes:
|
|
10
|
+
`documentation/omniverk/OMNIVERK_UPGRADE_1.2.1.md`.
|
|
11
|
+
|
|
12
|
+
**Tree-shaking.** An import from a package no longer brings the whole package. Module-level
|
|
13
|
+
statements that may have a side effect — a `displayName` assigned after each component (now
|
|
14
|
+
`Object.assign` inside `/* @__PURE__ */`, or under a development check for plain functions),
|
|
15
|
+
unannotated `forwardRef` / `memo` / `createContext` / icon-factory calls, spreads, registries filled
|
|
16
|
+
at import, `<style>` tags injected at import, a direct `eval` in ui-math — are gone. One import from
|
|
17
|
+
each of 53 packages: 5066.5 kB → 1171.6 kB (`@nice2dev/ui` 1928.2 kB → 12.9 kB, icon packs 48–275 kB
|
|
18
|
+
→ 1.6–2.6 kB). `defaultViewRegistry` has the Nice\* input controls from the start, each loading its
|
|
19
|
+
module on first render; sixteen controls add their styles to `<head>` on first render.
|
|
20
|
+
|
|
21
|
+
**Dead code.** 405 source files no entry point imported (never on npm) are deleted;
|
|
22
|
+
`NiceClipboardStack` (`@nice2dev/ui`) and `NiceSampleBrowser` (`@nice2dev/ui-audio`), finished and
|
|
23
|
+
documented, are exported.
|
|
24
|
+
|
|
25
|
+
**ui-mobile draws Nice icons.** New peer `@nice2dev/icons ^1.2.0`; `TabIcons`, `DrawerIcons`,
|
|
26
|
+
`HeaderIcons`, the `NiceSwipeActions` presets and the `NiceInfiniteScroll` states are `Ntd*` icons
|
|
27
|
+
instead of pasted `<svg>`, simple glyphs are CSS marks. `@nice2dev/icons` adds `NtdReply` and
|
|
28
|
+
`NtdInbox`; an icon no longer throws without `window.matchMedia`.
|
|
29
|
+
|
|
30
|
+
**`NiceIconSuggestorAI` (breaking, agreed).** `AIIconLibrary` is `'nice'`; `svgPath` and `unicode`
|
|
31
|
+
left `AISuggestedIcon`; the preview is a `<NiceIcon>`, "Copy SVG" is "Copy JSX".
|
|
32
|
+
|
|
33
|
+
**Peer ranges.** Every internal `@nice2dev/*` peer is `^1.2.0` (was as wide as `^1.0.20`), except
|
|
34
|
+
`@nice2dev/icons ^1.2.1` where a package draws an icon new in 1.2.1: ui-mobile (`NtdReply`,
|
|
35
|
+
`NtdInbox`), ui-audio (`NtdMicrophoneOff`) and ui-security (`NtdBackspace`). ui-security, licensing
|
|
36
|
+
(`^1.2.0`) and templates (`^1.2.0`) gain the `@nice2dev/icons` peer: their glyph icons (`⌫`, `←`,
|
|
37
|
+
`→`, `↑`, `↓`) are Nice icons now. `@nice2dev/icons` adds `NtdBackspace`.
|
|
38
|
+
|
|
39
|
+
**Class names inside components.** 834 class names in library stylesheets had no `nice-` prefix
|
|
40
|
+
(`.tab-button`, `.status-badge`, `.selected`, …) and styled every element of that name on the page.
|
|
41
|
+
They follow `nice-{block}__{element}--{modifier}` now — no change on screen. The class theme hooks
|
|
42
|
+
next to `[data-theme]` on seven controls (`dark` on the AI chart / data grid / code and HTML
|
|
43
|
+
editors / form builder, `light-theme` on `NiceMAM` and `NiceVideoAnnotator`) are `nice-dark` /
|
|
44
|
+
`nice-light`; `NiceLowPowerMode` marks `<html>` with `nice-lpm-no-animations` /
|
|
45
|
+
`nice-lpm-reduced-quality`; the `NiceVideoEditor` of `@nice2dev/ui-video` styles its elements under
|
|
46
|
+
`nice-video-studio`, so they no longer collide with the `NiceVideoEditor` of `@nice2dev/ui`.
|
|
47
|
+
Rules for classes nothing rendered are gone, among them the stylesheet of `NiceGanttChart`, which
|
|
48
|
+
left ui-erp in 1.0.10.
|
|
49
|
+
|
|
50
|
+
**Translations.** About 3,400 UI texts in 32 packages were hard-coded; they go through `t()` now,
|
|
51
|
+
with the English text unchanged and pl / de / fr / es / uk in `@nice2dev/i18n` (ui-diagrams,
|
|
52
|
+
ui-presentations and ui-math in their own dictionaries). In `@nice2dev/events` and
|
|
53
|
+
`@nice2dev/admin` that includes column headers, option labels and the statuses and roles they used
|
|
54
|
+
to print raw (`checked-in`, `no-show`) — English labels for those come from the dictionary. ui-3d and ui-graphics read the app's
|
|
55
|
+
global translator, as ui-audio does since 1.2.0 — their own provider overrides it. ui-audio's
|
|
56
|
+
controls used 631 keys the dictionary did not have (English in every language), and the radio
|
|
57
|
+
player showed raw keys (`search_stations`). Texts that were hard-coded **in Polish** — in
|
|
58
|
+
`NiceSidebarNav`, `NiceNetworkDiscoveryPanel`, the backup and smart-home controls,
|
|
59
|
+
`NiceSavedQueryPanel`, `NiceNotificationPreferences`, the ui-buildings panels, the ui-printing
|
|
60
|
+
template editor and the photo editor — default to English now; Polish is in the dictionary. English
|
|
61
|
+
plurals glued on (`result{s}`) are two keys. `presentationsTranslator(lang)` (ui-presentations)
|
|
62
|
+
translates outside its provider.
|
|
63
|
+
|
|
64
|
+
**List props are optional.** 170 list props (`items`, `columns`, `data`, …) in 15 packages that
|
|
65
|
+
were required without a default are optional, with a stable empty default; every one of those
|
|
66
|
+
controls mounts without data (tested). `NiceStockChart` without data no longer computes NaN
|
|
67
|
+
coordinates.
|
|
68
|
+
|
|
69
|
+
**Unstyled components get stylesheets.** 98 components rendered class names no stylesheet had —
|
|
70
|
+
admin panels, auth forms, events rounds and pickers, the ERP invoice / purchase order / VAT table /
|
|
71
|
+
HR dashboard, the radio player, `NiceInbox`, PWA prompts, `NiceViewRenderer`, shells, smart-home,
|
|
72
|
+
… The fixed layout that sat in inline style objects is in classes now, so an app can override it;
|
|
73
|
+
values that depend on data stay inline. **`@nice2dev/social` and `@nice2dev/ui-science` ship a
|
|
74
|
+
stylesheet — import `@nice2dev/social/style.css` / `@nice2dev/ui-science/style.css`.** ui-science's
|
|
75
|
+
`sideEffects` is `["*.css"]`. Colours, spacing and radii in every stylesheet come from theme tokens
|
|
76
|
+
(visible in dark themes: `NiceRecipe` difficulty badges, transcoder states, warehouse heat map).
|
|
77
|
+
|
|
78
|
+
**Icons only from Nice.** About 130 glyphs (`×`, `→`, `↑`) and 100 pasted `<svg>` used as icons
|
|
79
|
+
are Nice icons; 11 `<svg>` stay as the control's own graphic (logos, spinners, checkbox mark). `NiceIcon`
|
|
80
|
+
gains `pin`, `mic-off`, `log-out`, `chevrons-left`, `chevrons-right`, `zoom-in`, `zoom-out`,
|
|
81
|
+
`navigation`, `refresh-ccw`, `minimize` and `smartphone`; `@nice2dev/icons` gains
|
|
82
|
+
`NtdMicrophoneOff`. The `icon` fields of the module, menu, tab, mode, quick-action, scene and admin
|
|
83
|
+
widget DTOs, notification channels and view toolbar items are rendered through `NiceIcon` — they
|
|
84
|
+
used to be printed as text. `NiceRatings` `thumbs` draws shapes instead of emoji.
|
|
85
|
+
|
|
86
|
+
**Dialogs instead of `window.prompt` / `confirm` / `alert`.** New `useNiceDialogs()` — `prompt`,
|
|
87
|
+
`confirm` and `alert` as promises on `NicePromptDialog` / `NiceConfirmDialog` — and
|
|
88
|
+
`NiceConfirmDialog.showReject`. Seventeen controls asked through the browser's blocking dialogs and
|
|
89
|
+
use the library's now (`NiceFileManager`, `NiceHtmlEditor`, `NiceViewRenderer` action `confirm`, the 3D,
|
|
90
|
+
vector and pixel editors, …). Keys pressed in `NicePromptDialog` / `NiceConfirmDialog` no longer
|
|
91
|
+
reach the page's shortcuts (Escape still closes them), and `NicePromptDialog`'s backdrop covers the
|
|
92
|
+
whole viewport.
|
|
93
|
+
|
|
94
|
+
**Smaller fixes.** `NiceFileManager.items` is optional. `NiceMLStudio` status badges: `draft`,
|
|
95
|
+
`registered`, `archived`, `cancelled` get a neutral colour, deploying / stopped deployments theirs.
|
|
96
|
+
Component docs (`doc.json`) list only props the components have. `NiceMobileTabs`: tabs beyond
|
|
97
|
+
`maxTabs` open from "More" (it only logged). `NiceInventoryManager`: new `onCreatePurchaseOrder`;
|
|
98
|
+
without it the "Create PO" button is gone (it only logged). Keyboard: `NiceNavShell` tabs follow the
|
|
99
|
+
WAI-ARIA tabs pattern, clickable `NiceDeviceTile` / `NiceCardGroup` cards and animated icons with
|
|
100
|
+
`trigger="click"` are focusable. ui-math: `CalculatorService.evaluate` parses instead of running
|
|
101
|
+
`new Function` (`asin`, `sinh`, `ceil`, exponents and `angleUnit` were wrong); `ExpressionParser`
|
|
102
|
+
takes `functions`, `constants`, `ignoreCase` and `strict`, multiplies implicitly (`2x`) and reads `^`
|
|
103
|
+
right to left. `InvoiceLine.vatRate` and `VatRate.rate` are documented as fractions (0.23).
|
|
104
|
+
`AmqpServerBinding` is `Record<string, never>`.
|
|
105
|
+
|
|
3
106
|
## 1.2.0
|
|
4
107
|
|
|
5
108
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
2
|
-
return data;`};default:return{}}}function C({node:o,nodeType:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("@nice2dev/ui"),g=require("@nice2dev/ui-core"),m=require("react"),q=[{target:".nice-etl-builder",titleKey:"tutorial.etlBuilder.intro.title",title:"ETL builder",contentKey:"tutorial.etlBuilder.intro.content",content:"Wire sources → transformations → destinations into a pipeline, switch the views, then run it and save the configuration.",placement:"auto"}],K={id:"",name:"New Pipeline",sources:[],transformations:[],destinations:[],version:1},P=o=>/^[a-z][a-z0-9-]*$/.test(o)?e.jsx(f.NiceIcon,{name:o,size:16}):o,w=[{type:"filter",key:"etlBuilder.transform.filter",label:"Filter",icon:"filter"},{type:"map",key:"etlBuilder.transform.map",label:"Map",icon:"shuffle"},{type:"aggregate",key:"etlBuilder.transform.aggregate",label:"Aggregate",icon:"∑"},{type:"join",key:"etlBuilder.transform.join",label:"Join",icon:"link"},{type:"union",key:"etlBuilder.transform.union",label:"Union",icon:"∪"},{type:"sort",key:"etlBuilder.transform.sort",label:"Sort",icon:"sort"},{type:"deduplicate",key:"etlBuilder.transform.deduplicate",label:"Deduplicate",icon:"copy"},{type:"pivot",key:"etlBuilder.transform.pivot",label:"Pivot",icon:"expand"},{type:"unpivot",key:"etlBuilder.transform.unpivot",label:"Unpivot",icon:"collapse"},{type:"split",key:"etlBuilder.transform.split",label:"Split",icon:"scissors"},{type:"merge",key:"etlBuilder.transform.merge",label:"Merge",icon:"git-branch"},{type:"lookup",key:"etlBuilder.transform.lookup",label:"Lookup",icon:"book"},{type:"derive",key:"etlBuilder.transform.derive",label:"Derive Column",icon:"plus"},{type:"validate",key:"etlBuilder.transform.validate",label:"Validate",icon:"check"},{type:"cleanse",key:"etlBuilder.transform.cleanse",label:"Cleanse",icon:"wand"},{type:"custom",key:"etlBuilder.transform.custom",label:"Custom",icon:"ƒ"}];function V({pipeline:o,dataSources:t=[],onChange:d,onRun:n,onSchedule:p,onSave:l,className:j="",tutorial:r}){const{t:c}=g.useNiceTranslation(),[h,I]=m.useState(()=>o||{...K,id:g.createId(),name:c("etlBuilder.newPipeline","New Pipeline")}),[u,_]=m.useState(null),[v,E]=m.useState("design"),[B,S]=m.useState(!1),[L,A]=m.useState([]),[y,N]=m.useState(null),z=m.useRef(null),b=m.useCallback(i=>{I(s=>{const a=i(s);return d==null||d(a),a})},[d]),T=m.useCallback(i=>{var a;const s={id:g.createId(),type:i.type,name:i.name,config:i.config,schema:(a=i.schema)==null?void 0:a.tables[0]};b(x=>({...x,sources:[...x.sources,s]}))},[b]),D=m.useCallback((i,s)=>{const a={id:g.createId(),type:i,name:(()=>{const x=w.find(H=>H.type===i);return x?c(x.key,x.label):i})(),input:[],output:g.createId(),config:Y(i)};b(x=>({...x,transformations:[...x.transformations,a]})),_({type:"transformation",id:a.id})},[b,c]),F=m.useCallback(()=>{const i={id:g.createId(),type:"database",name:c("etlBuilder.newDestination","New Destination"),config:{},writeMode:"append"};b(s=>({...s,destinations:[...s.destinations,i]})),_({type:"destination",id:i.id})},[b,c]),k=m.useCallback((i,s)=>{b(a=>{switch(i){case"source":return{...a,sources:a.sources.filter(x=>x.id!==s)};case"transformation":return{...a,transformations:a.transformations.filter(x=>x.id!==s)};case"destination":return{...a,destinations:a.destinations.filter(x=>x.id!==s)};default:return a}}),_(null)},[b]),R=m.useCallback(async()=>{if(n){S(!0);try{const i=await n(h);A(s=>[i,...s].slice(0,50))}finally{S(!1)}}},[h,n]),U=m.useCallback(i=>{b(s=>({...s,schedule:i})),p==null||p(h,i)},[h,b,p]),M=m.useCallback(i=>{if(i.preventDefault(),!!y){if(y.startsWith("transform:")){const s=y.replace("transform:","");D(s)}N(null)}},[y,D]),$=()=>{if(!u)return null;switch(u.type){case"source":return h.sources.find(i=>i.id===u.id);case"transformation":return h.transformations.find(i=>i.id===u.id);case"destination":return h.destinations.find(i=>i.id===u.id);default:return null}},O=v==="design"?e.jsxs("div",{className:"nice-etl-builder__palette",children:[e.jsx("h4",{children:c("etlBuilder.sources","Sources")}),t.map(i=>e.jsxs("div",{className:"nice-etl-builder__palette-item",onClick:()=>T(i),children:[e.jsx("span",{className:"nice-etl-builder__palette-icon",children:e.jsx(f.NiceIcon,{name:"database",size:14})}),e.jsx("span",{children:i.name})]},i.id)),e.jsxs("button",{onClick:()=>T({id:"",name:c("etlBuilder.newSource","New Source"),type:"database",config:{}}),children:[e.jsx(f.NiceIcon,{name:"plus",size:14})," ",c("etlBuilder.addSource","Add Source")]}),e.jsx("h4",{children:c("etlBuilder.transformations","Transformations")}),w.map(i=>e.jsxs("div",{className:"nice-etl-builder__palette-item",draggable:!0,onDragStart:()=>N(`transform:${i.type}`),onDragEnd:()=>N(null),children:[e.jsx("span",{className:"nice-etl-builder__palette-icon",children:P(i.icon)}),e.jsx("span",{children:c(i.key,i.label)})]},i.type)),e.jsx("h4",{children:c("etlBuilder.destinations","Destinations")}),e.jsxs("button",{onClick:F,children:[e.jsx(f.NiceIcon,{name:"plus",size:14})," ",c("etlBuilder.addDestination","Add Destination")]})]}):void 0,W=u&&v==="design"?e.jsx(J,{nodeType:u.type,node:$()??null,dataSources:t,onChange:i=>{b(s=>{switch(u.type){case"source":return{...s,sources:s.sources.map(a=>a.id===u.id?{...a,...i}:a)};case"transformation":return{...s,transformations:s.transformations.map(a=>a.id===u.id?{...a,...i}:a)};case"destination":return{...s,destinations:s.destinations.map(a=>a.id===u.id?{...a,...i}:a)};default:return s}})},onClose:()=>_(null)}):void 0;return e.jsxs(f.NiceAppShell,{flush:!0,className:`nice-etl-builder ${j}`,height:"100%",style:{minHeight:600},sidebar:O,rightSidebar:W,toolbar:e.jsxs("div",{className:"nice-etl-builder__toolbar",children:[e.jsx("input",{type:"text",value:h.name,onChange:i=>b(s=>({...s,name:i.target.value})),className:"nice-etl-builder__name-input"}),e.jsx("div",{className:"nice-etl-builder__tabs",children:["design","code","schedule","history"].map(i=>e.jsx("button",{className:`nice-etl-builder__tab ${v===i?"nice-etl-builder__tab--active":""}`,onClick:()=>E(i),children:c(`etlBuilder.tab.${i}`,i.charAt(0).toUpperCase()+i.slice(1))},i))}),e.jsxs("div",{className:"nice-etl-builder__actions",children:[e.jsxs("button",{onClick:R,disabled:B||!n,title:n?void 0:c("etlBuilder.runNotSetUp","Running pipelines is not set up"),className:"nice-etl-builder__run-btn",children:[e.jsx(f.NiceIcon,{name:B?"clock":"play",size:14})," ",B?c("etlBuilder.running","Running..."):c("etlBuilder.run","Run")]}),e.jsxs("button",{onClick:()=>l==null?void 0:l(h),disabled:!l,title:l?void 0:c("etlBuilder.saveNotSetUp","Saving pipelines is not set up"),className:"nice-etl-builder__save-btn",children:[e.jsx(f.NiceIcon,{name:"save",size:14})," ",c("save","Save")]}),e.jsx(g.NiceTutorialButton,{steps:g.resolveTutorial(r,q)})]})]}),children:[v==="design"&&e.jsx("div",{ref:z,className:"nice-etl-builder__canvas",onDragOver:i=>i.preventDefault(),onDrop:M,onClick:()=>_(null),children:e.jsxs("div",{className:"nice-etl-builder__flow",children:[e.jsxs("div",{className:"nice-etl-builder__column",children:[e.jsx("h5",{children:c("etlBuilder.sources","Sources")}),h.sources.map(i=>e.jsx(C,{node:i,nodeType:"source",icon:"database",isSelected:(u==null?void 0:u.id)===i.id,onSelect:()=>_({type:"source",id:i.id}),onDelete:()=>k("source",i.id)},i.id))]}),e.jsx("div",{className:"nice-etl-builder__arrow","aria-hidden":"true",children:e.jsx(f.NiceIcon,{name:"arrow-right",size:16})}),e.jsxs("div",{className:"nice-etl-builder__column nice-etl-builder__column--transforms",children:[e.jsx("h5",{children:c("etlBuilder.transformations","Transformations")}),h.transformations.map(i=>{const s=w.find(a=>a.type===i.type);return e.jsx(C,{node:i,nodeType:"transformation",icon:(s==null?void 0:s.icon)||"shuffle",isSelected:(u==null?void 0:u.id)===i.id,onSelect:()=>_({type:"transformation",id:i.id}),onDelete:()=>k("transformation",i.id)},i.id)}),h.transformations.length===0&&e.jsx("div",{className:"nice-etl-builder__empty-column",children:c("etlBuilder.dragTransformationsHere","Drag transformations here")})]}),e.jsx("div",{className:"nice-etl-builder__arrow","aria-hidden":"true",children:e.jsx(f.NiceIcon,{name:"arrow-right",size:16})}),e.jsxs("div",{className:"nice-etl-builder__column",children:[e.jsx("h5",{children:c("etlBuilder.destinations","Destinations")}),h.destinations.map(i=>e.jsx(C,{node:i,nodeType:"destination",icon:"download",isSelected:(u==null?void 0:u.id)===i.id,onSelect:()=>_({type:"destination",id:i.id}),onDelete:()=>k("destination",i.id)},i.id))]})]})}),v==="code"&&e.jsx("div",{className:"nice-etl-builder__code-view",children:e.jsx("pre",{children:JSON.stringify(h,null,2)})}),v==="schedule"&&e.jsx(G,{schedule:h.schedule,monitoring:h.monitoring,onChange:U}),v==="history"&&e.jsx(Q,{runs:L})]})}function Y(o){switch(o){case"filter":return{condition:""};case"map":return{mappings:[]};case"aggregate":return{groupBy:[],aggregations:[]};case"join":return{joinType:"inner",leftKey:"",rightKey:""};case"union":return{inputs:[]};case"sort":return{columns:[],directions:[]};case"deduplicate":return{columns:[],keepFirst:!0};case"pivot":return{pivotColumn:"",valueColumn:"",aggregation:"sum"};case"unpivot":return{columns:[],nameColumn:"name",valueColumn:"value"};case"derive":return{name:"",expression:""};case"validate":return{rules:[]};case"cleanse":return{operations:[]};case"custom":return{code:`// Custom transformation
|
|
2
|
+
return data;`};default:return{}}}function C({node:o,nodeType:t,icon:d,isSelected:n,onSelect:p,onDelete:l}){const{t:j}=g.useNiceTranslation();return e.jsxs("div",{className:`nice-etl-builder__node nice-etl-builder__node--${t} ${n?"nice-etl-builder__node--selected":""}`,onClick:r=>{r.stopPropagation(),p()},children:[e.jsx("span",{className:"nice-etl-builder__node-icon",children:P(d)}),e.jsx("span",{className:"nice-etl-builder__node-name",children:o.name}),e.jsx("button",{"aria-label":j("etlBuilder.close","Close"),className:"nice-etl-builder__node-delete",onClick:r=>{r.stopPropagation(),l()},children:e.jsx(f.NiceIcon,{name:"close",size:14})})]})}function J({nodeType:o,node:t,dataSources:d,onChange:n,onClose:p}){var j;const{t:l}=g.useNiceTranslation();return t?e.jsxs("div",{className:"nice-etl-builder__properties",children:[e.jsxs("div",{className:"nice-etl-builder__properties-header",children:[e.jsx("h4",{children:o==="source"?l("etlBuilder.sourceProperties","Source Properties"):o==="transformation"?l("etlBuilder.transformationProperties","Transformation Properties"):o==="destination"?l("etlBuilder.destinationProperties","Destination Properties"):l("etlBuilder.properties","{type} Properties").replace("{type}",o.charAt(0).toUpperCase()+o.slice(1))}),e.jsx("button",{onClick:p,"aria-label":l("etlBuilder.close","Close"),children:e.jsx(f.NiceIcon,{name:"close",size:14})})]}),e.jsxs("div",{className:"nice-etl-builder__properties-content",children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:l("etlBuilder.name","Name")}),e.jsx("input",{type:"text",value:t.name,onChange:r=>n({name:r.target.value})})]}),o==="source"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:l("etlBuilder.type","Type")}),e.jsxs("select",{value:t.type,onChange:r=>n({type:r.target.value}),children:[e.jsx("option",{value:"database",children:l("etlBuilder.database","Database")}),e.jsx("option",{value:"api",children:"API"}),e.jsx("option",{value:"file",children:l("etlBuilder.file","File")}),e.jsx("option",{value:"stream",children:l("etlBuilder.stream","Stream")})]})]}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:((j=t.incremental)==null?void 0:j.enabled)||!1,onChange:r=>{var c;return n({incremental:{...t.incremental,enabled:r.target.checked,column:((c=t.incremental)==null?void 0:c.column)||""}})}}),l("etlBuilder.incrementalLoad","Incremental Load")]})})]}),o==="transformation"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:l("etlBuilder.type","Type")}),e.jsx("span",{children:t.type})]}),t.type==="filter"&&e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:l("etlBuilder.condition","Condition")}),e.jsx("textarea",{value:String(t.config.condition||""),onChange:r=>n({config:{...t.config,condition:r.target.value}}),placeholder:l("etlBuilder.conditionPlaceholder","e.g., age > 18 AND status = 'active'"),rows:3})]}),t.type==="derive"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:l("etlBuilder.columnName","Column Name")}),e.jsx("input",{type:"text",value:String(t.config.name||""),onChange:r=>n({config:{...t.config,name:r.target.value}})})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:l("etlBuilder.expression","Expression")}),e.jsx("input",{type:"text",value:String(t.config.expression||""),onChange:r=>n({config:{...t.config,expression:r.target.value}}),placeholder:l("etlBuilder.expressionPlaceholder","e.g., price * quantity")})]})]}),t.type==="custom"&&e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:l("etlBuilder.code","Code")}),e.jsx("textarea",{value:String(t.config.code||""),onChange:r=>n({config:{...t.config,code:r.target.value}}),rows:10,className:"nice-etl-builder__code-input"})]})]}),o==="destination"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:l("etlBuilder.type","Type")}),e.jsxs("select",{value:t.type,onChange:r=>n({type:r.target.value}),children:[e.jsx("option",{value:"database",children:l("etlBuilder.database","Database")}),e.jsx("option",{value:"file",children:l("etlBuilder.file","File")}),e.jsx("option",{value:"api",children:"API"}),e.jsx("option",{value:"warehouse",children:l("etlBuilder.dataWarehouse","Data Warehouse")})]})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:l("etlBuilder.writeMode","Write Mode")}),e.jsxs("select",{value:t.writeMode,onChange:r=>n({writeMode:r.target.value}),children:[e.jsx("option",{value:"append",children:l("etlBuilder.append","Append")}),e.jsx("option",{value:"overwrite",children:l("etlBuilder.overwrite","Overwrite")}),e.jsx("option",{value:"upsert",children:l("etlBuilder.upsert","Upsert")}),e.jsx("option",{value:"merge",children:l("etlBuilder.merge","Merge")})]})]})]})]})]}):e.jsx(e.Fragment,{})}function G({schedule:o,monitoring:t,onChange:d}){const{t:n}=g.useNiceTranslation(),[p,l]=m.useState(o||{enabled:!1});return e.jsxs("div",{className:"nice-etl-builder__schedule-editor",children:[e.jsx("h4",{children:n("etlBuilder.scheduleConfiguration","Schedule Configuration")}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:p.enabled,onChange:j=>{const r={...p,enabled:j.target.checked};l(r),d(r)}}),n("etlBuilder.enableScheduledExecution","Enable scheduled execution")]})}),p.enabled&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.cronExpression","Cron Expression")}),e.jsx("input",{type:"text",value:p.cron||"",onChange:j=>{const r={...p,cron:j.target.value};l(r)},placeholder:n("etlBuilder.cronPlaceholder","0 * * * * (every hour)")}),e.jsx("small",{children:n("etlBuilder.cronFormat","Format: minute hour day month weekday")})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.timezone","Timezone")}),e.jsxs("select",{value:p.timezone||"UTC",onChange:j=>{const r={...p,timezone:j.target.value};l(r)},children:[e.jsx("option",{value:"UTC",children:"UTC"}),e.jsx("option",{value:"America/New_York",children:n("etlBuilder.easternTime","Eastern Time")}),e.jsx("option",{value:"America/Chicago",children:n("etlBuilder.centralTime","Central Time")}),e.jsx("option",{value:"America/Los_Angeles",children:n("etlBuilder.pacificTime","Pacific Time")}),e.jsx("option",{value:"Europe/London",children:n("etlBuilder.london","London")}),e.jsx("option",{value:"Europe/Warsaw",children:n("etlBuilder.warsaw","Warsaw")})]})]}),e.jsx("button",{onClick:()=>d(p),children:n("etlBuilder.saveSchedule","Save Schedule")})]}),e.jsx("h4",{children:n("etlBuilder.monitoring","Monitoring")}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:(t==null?void 0:t.alertOnFailure)||!1,disabled:!0}),n("etlBuilder.alertOnFailure","Alert on failure")]})}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.logLevel","Log Level")}),e.jsxs("select",{value:(t==null?void 0:t.logLevel)||"info",disabled:!0,children:[e.jsx("option",{value:"error",children:n("etlBuilder.error","Error")}),e.jsx("option",{value:"warn",children:n("etlBuilder.warning","Warning")}),e.jsx("option",{value:"info",children:n("etlBuilder.info","Info")}),e.jsx("option",{value:"debug",children:n("etlBuilder.debug","Debug")})]})]})]})}function Q({runs:o}){const{t}=g.useNiceTranslation();return e.jsxs("div",{className:"nice-etl-builder__history-view",children:[e.jsx("h4",{children:t("etlBuilder.runHistory","Run History")}),o.length===0?e.jsx("div",{className:"nice-etl-builder__no-history",children:t("etlBuilder.noRunsYet","No runs yet")}):e.jsxs("table",{className:"nice-etl-builder__history-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:t("etlBuilder.status","Status")}),e.jsx("th",{children:t("etlBuilder.startTime","Start Time")}),e.jsx("th",{children:t("etlBuilder.duration","Duration")}),e.jsx("th",{children:t("etlBuilder.rows","Rows")}),e.jsx("th",{children:t("etlBuilder.errors","Errors")})]})}),e.jsx("tbody",{children:o.map(d=>e.jsxs("tr",{className:`nice-etl-builder__run nice-etl-builder__run--${d.status}`,children:[e.jsx("td",{children:e.jsxs("span",{className:`nice-etl-builder__status nice-etl-builder__status--${d.status}`,children:[e.jsx(f.NiceIcon,{name:d.status==="success"?"check":d.status==="failed"?"close":"clock",size:12}),d.status]})}),e.jsx("td",{children:d.startTime.toLocaleString()}),e.jsx("td",{children:d.endTime?`${Math.round((d.endTime.getTime()-d.startTime.getTime())/1e3)}s`:"-"}),e.jsxs("td",{children:[d.rowsProcessed.toLocaleString()," / ",d.rowsWritten.toLocaleString()]}),e.jsx("td",{children:d.errors.length})]},d.id))})]})]})}exports.NiceETLBuilder=V;
|
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ const Z = [
|
|
|
18
18
|
transformations: [],
|
|
19
19
|
destinations: [],
|
|
20
20
|
version: 1
|
|
21
|
-
}, R = (u) => /^[a-z][a-z0-9-]*$/.test(u) ? /* @__PURE__ */ e(g, { name: u, size: 16 }) : u,
|
|
21
|
+
}, R = (u) => /^[a-z][a-z0-9-]*$/.test(u) ? /* @__PURE__ */ e(g, { name: u, size: 16 }) : u, x = [
|
|
22
22
|
{ type: "filter", key: "etlBuilder.transform.filter", label: "Filter", icon: "filter" },
|
|
23
23
|
{ type: "map", key: "etlBuilder.transform.map", label: "Map", icon: "shuffle" },
|
|
24
24
|
{ type: "aggregate", key: "etlBuilder.transform.aggregate", label: "Aggregate", icon: "∑" },
|
|
@@ -41,23 +41,23 @@ const Z = [
|
|
|
41
41
|
{ type: "cleanse", key: "etlBuilder.transform.cleanse", label: "Cleanse", icon: "wand" },
|
|
42
42
|
{ type: "custom", key: "etlBuilder.transform.custom", label: "Custom", icon: "ƒ" }
|
|
43
43
|
];
|
|
44
|
-
function
|
|
44
|
+
function ce({
|
|
45
45
|
pipeline: u,
|
|
46
46
|
dataSources: t = [],
|
|
47
47
|
onChange: o,
|
|
48
|
-
onRun:
|
|
48
|
+
onRun: r,
|
|
49
49
|
onSchedule: h,
|
|
50
|
-
onSave:
|
|
50
|
+
onSave: n,
|
|
51
51
|
className: f = "",
|
|
52
|
-
tutorial:
|
|
52
|
+
tutorial: s
|
|
53
53
|
}) {
|
|
54
|
-
const { t:
|
|
54
|
+
const { t: c } = C(), [m, U] = N(
|
|
55
55
|
() => u || {
|
|
56
56
|
...ee,
|
|
57
57
|
id: w(),
|
|
58
|
-
name:
|
|
58
|
+
name: c("etlBuilder.newPipeline", "New Pipeline")
|
|
59
59
|
}
|
|
60
|
-
), [p, v] = N(null), [B, F] = N("design"), [S,
|
|
60
|
+
), [p, v] = N(null), [B, F] = N("design"), [S, L] = N(!1), [M, I] = N([]), [T, D] = N(null), $ = X(null), _ = y(
|
|
61
61
|
(i) => {
|
|
62
62
|
U((a) => {
|
|
63
63
|
const d = i(a);
|
|
@@ -87,8 +87,8 @@ function se({
|
|
|
87
87
|
id: w(),
|
|
88
88
|
type: i,
|
|
89
89
|
name: (() => {
|
|
90
|
-
const b =
|
|
91
|
-
return b ?
|
|
90
|
+
const b = x.find((J) => J.type === i);
|
|
91
|
+
return b ? c(b.key, b.label) : i;
|
|
92
92
|
})(),
|
|
93
93
|
input: [],
|
|
94
94
|
output: w(),
|
|
@@ -99,12 +99,12 @@ function se({
|
|
|
99
99
|
transformations: [...b.transformations, d]
|
|
100
100
|
})), v({ type: "transformation", id: d.id });
|
|
101
101
|
},
|
|
102
|
-
[_,
|
|
102
|
+
[_, c]
|
|
103
103
|
), W = y(() => {
|
|
104
104
|
const i = {
|
|
105
105
|
id: w(),
|
|
106
106
|
type: "database",
|
|
107
|
-
name:
|
|
107
|
+
name: c("etlBuilder.newDestination", "New Destination"),
|
|
108
108
|
config: {},
|
|
109
109
|
writeMode: "append"
|
|
110
110
|
};
|
|
@@ -112,7 +112,7 @@ function se({
|
|
|
112
112
|
...a,
|
|
113
113
|
destinations: [...a.destinations, i]
|
|
114
114
|
})), v({ type: "destination", id: i.id });
|
|
115
|
-
}, [_,
|
|
115
|
+
}, [_, c]), P = y(
|
|
116
116
|
(i, a) => {
|
|
117
117
|
_((d) => {
|
|
118
118
|
switch (i) {
|
|
@@ -132,16 +132,16 @@ function se({
|
|
|
132
132
|
},
|
|
133
133
|
[_]
|
|
134
134
|
), O = y(async () => {
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
if (r) {
|
|
136
|
+
L(!0);
|
|
137
137
|
try {
|
|
138
|
-
const i = await
|
|
138
|
+
const i = await r(m);
|
|
139
139
|
I((a) => [i, ...a].slice(0, 50));
|
|
140
140
|
} finally {
|
|
141
|
-
|
|
141
|
+
L(!1);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}, [m,
|
|
144
|
+
}, [m, r]), H = y(
|
|
145
145
|
(i) => {
|
|
146
146
|
_((a) => ({ ...a, schedule: i })), h == null || h(m, i);
|
|
147
147
|
},
|
|
@@ -171,7 +171,7 @@ function se({
|
|
|
171
171
|
return null;
|
|
172
172
|
}
|
|
173
173
|
}, V = B === "design" ? /* @__PURE__ */ l("div", { className: "nice-etl-builder__palette", children: [
|
|
174
|
-
/* @__PURE__ */ e("h4", { children:
|
|
174
|
+
/* @__PURE__ */ e("h4", { children: c("etlBuilder.sources", "Sources") }),
|
|
175
175
|
t.map((i) => /* @__PURE__ */ l("div", { className: "nice-etl-builder__palette-item", onClick: () => A(i), children: [
|
|
176
176
|
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: /* @__PURE__ */ e(g, { name: "database", size: 14 }) }),
|
|
177
177
|
/* @__PURE__ */ e("span", { children: i.name })
|
|
@@ -181,19 +181,19 @@ function se({
|
|
|
181
181
|
{
|
|
182
182
|
onClick: () => A({
|
|
183
183
|
id: "",
|
|
184
|
-
name:
|
|
184
|
+
name: c("etlBuilder.newSource", "New Source"),
|
|
185
185
|
type: "database",
|
|
186
186
|
config: {}
|
|
187
187
|
}),
|
|
188
188
|
children: [
|
|
189
189
|
/* @__PURE__ */ e(g, { name: "plus", size: 14 }),
|
|
190
190
|
" ",
|
|
191
|
-
|
|
191
|
+
c("etlBuilder.addSource", "Add Source")
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
),
|
|
195
|
-
/* @__PURE__ */ e("h4", { children:
|
|
196
|
-
|
|
195
|
+
/* @__PURE__ */ e("h4", { children: c("etlBuilder.transformations", "Transformations") }),
|
|
196
|
+
x.map((i) => /* @__PURE__ */ l(
|
|
197
197
|
"div",
|
|
198
198
|
{
|
|
199
199
|
className: "nice-etl-builder__palette-item",
|
|
@@ -202,16 +202,16 @@ function se({
|
|
|
202
202
|
onDragEnd: () => D(null),
|
|
203
203
|
children: [
|
|
204
204
|
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: R(i.icon) }),
|
|
205
|
-
/* @__PURE__ */ e("span", { children:
|
|
205
|
+
/* @__PURE__ */ e("span", { children: c(i.key, i.label) })
|
|
206
206
|
]
|
|
207
207
|
},
|
|
208
208
|
i.type
|
|
209
209
|
)),
|
|
210
|
-
/* @__PURE__ */ e("h4", { children:
|
|
210
|
+
/* @__PURE__ */ e("h4", { children: c("etlBuilder.destinations", "Destinations") }),
|
|
211
211
|
/* @__PURE__ */ l("button", { onClick: W, children: [
|
|
212
212
|
/* @__PURE__ */ e(g, { name: "plus", size: 14 }),
|
|
213
213
|
" ",
|
|
214
|
-
|
|
214
|
+
c("etlBuilder.addDestination", "Add Destination")
|
|
215
215
|
] })
|
|
216
216
|
] }) : void 0, Y = p && B === "design" ? /* @__PURE__ */ e(
|
|
217
217
|
le,
|
|
@@ -275,7 +275,7 @@ function se({
|
|
|
275
275
|
{
|
|
276
276
|
className: `nice-etl-builder__tab ${B === i ? "nice-etl-builder__tab--active" : ""}`,
|
|
277
277
|
onClick: () => F(i),
|
|
278
|
-
children:
|
|
278
|
+
children: c(`etlBuilder.tab.${i}`, i.charAt(0).toUpperCase() + i.slice(1))
|
|
279
279
|
},
|
|
280
280
|
i
|
|
281
281
|
)) }),
|
|
@@ -284,31 +284,31 @@ function se({
|
|
|
284
284
|
"button",
|
|
285
285
|
{
|
|
286
286
|
onClick: O,
|
|
287
|
-
disabled: S || !
|
|
288
|
-
title:
|
|
287
|
+
disabled: S || !r,
|
|
288
|
+
title: r ? void 0 : c("etlBuilder.runNotSetUp", "Running pipelines is not set up"),
|
|
289
289
|
className: "nice-etl-builder__run-btn",
|
|
290
290
|
children: [
|
|
291
291
|
/* @__PURE__ */ e(g, { name: S ? "clock" : "play", size: 14 }),
|
|
292
292
|
" ",
|
|
293
|
-
S ?
|
|
293
|
+
S ? c("etlBuilder.running", "Running...") : c("etlBuilder.run", "Run")
|
|
294
294
|
]
|
|
295
295
|
}
|
|
296
296
|
),
|
|
297
297
|
/* @__PURE__ */ l(
|
|
298
298
|
"button",
|
|
299
299
|
{
|
|
300
|
-
onClick: () =>
|
|
301
|
-
disabled: !
|
|
302
|
-
title:
|
|
300
|
+
onClick: () => n == null ? void 0 : n(m),
|
|
301
|
+
disabled: !n,
|
|
302
|
+
title: n ? void 0 : c("etlBuilder.saveNotSetUp", "Saving pipelines is not set up"),
|
|
303
303
|
className: "nice-etl-builder__save-btn",
|
|
304
304
|
children: [
|
|
305
305
|
/* @__PURE__ */ e(g, { name: "save", size: 14 }),
|
|
306
306
|
" ",
|
|
307
|
-
|
|
307
|
+
c("save", "Save")
|
|
308
308
|
]
|
|
309
309
|
}
|
|
310
310
|
),
|
|
311
|
-
/* @__PURE__ */ e(G, { steps: Q(
|
|
311
|
+
/* @__PURE__ */ e(G, { steps: Q(s, Z) })
|
|
312
312
|
] })
|
|
313
313
|
] }),
|
|
314
314
|
children: [
|
|
@@ -322,52 +322,52 @@ function se({
|
|
|
322
322
|
onClick: () => v(null),
|
|
323
323
|
children: /* @__PURE__ */ l("div", { className: "nice-etl-builder__flow", children: [
|
|
324
324
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__column", children: [
|
|
325
|
-
/* @__PURE__ */ e("h5", { children:
|
|
325
|
+
/* @__PURE__ */ e("h5", { children: c("etlBuilder.sources", "Sources") }),
|
|
326
326
|
m.sources.map((i) => /* @__PURE__ */ e(
|
|
327
|
-
|
|
327
|
+
E,
|
|
328
328
|
{
|
|
329
329
|
node: i,
|
|
330
330
|
nodeType: "source",
|
|
331
331
|
icon: "database",
|
|
332
332
|
isSelected: (p == null ? void 0 : p.id) === i.id,
|
|
333
333
|
onSelect: () => v({ type: "source", id: i.id }),
|
|
334
|
-
onDelete: () =>
|
|
334
|
+
onDelete: () => P("source", i.id)
|
|
335
335
|
},
|
|
336
336
|
i.id
|
|
337
337
|
))
|
|
338
338
|
] }),
|
|
339
339
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", "aria-hidden": "true", children: /* @__PURE__ */ e(g, { name: "arrow-right", size: 16 }) }),
|
|
340
340
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__column nice-etl-builder__column--transforms", children: [
|
|
341
|
-
/* @__PURE__ */ e("h5", { children:
|
|
341
|
+
/* @__PURE__ */ e("h5", { children: c("etlBuilder.transformations", "Transformations") }),
|
|
342
342
|
m.transformations.map((i) => {
|
|
343
|
-
const a =
|
|
343
|
+
const a = x.find((d) => d.type === i.type);
|
|
344
344
|
return /* @__PURE__ */ e(
|
|
345
|
-
|
|
345
|
+
E,
|
|
346
346
|
{
|
|
347
347
|
node: i,
|
|
348
348
|
nodeType: "transformation",
|
|
349
349
|
icon: (a == null ? void 0 : a.icon) || "shuffle",
|
|
350
350
|
isSelected: (p == null ? void 0 : p.id) === i.id,
|
|
351
351
|
onSelect: () => v({ type: "transformation", id: i.id }),
|
|
352
|
-
onDelete: () =>
|
|
352
|
+
onDelete: () => P("transformation", i.id)
|
|
353
353
|
},
|
|
354
354
|
i.id
|
|
355
355
|
);
|
|
356
356
|
}),
|
|
357
|
-
m.transformations.length === 0 && /* @__PURE__ */ e("div", { className: "nice-etl-builder__empty-column", children:
|
|
357
|
+
m.transformations.length === 0 && /* @__PURE__ */ e("div", { className: "nice-etl-builder__empty-column", children: c("etlBuilder.dragTransformationsHere", "Drag transformations here") })
|
|
358
358
|
] }),
|
|
359
359
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", "aria-hidden": "true", children: /* @__PURE__ */ e(g, { name: "arrow-right", size: 16 }) }),
|
|
360
360
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__column", children: [
|
|
361
|
-
/* @__PURE__ */ e("h5", { children:
|
|
361
|
+
/* @__PURE__ */ e("h5", { children: c("etlBuilder.destinations", "Destinations") }),
|
|
362
362
|
m.destinations.map((i) => /* @__PURE__ */ e(
|
|
363
|
-
|
|
363
|
+
E,
|
|
364
364
|
{
|
|
365
365
|
node: i,
|
|
366
366
|
nodeType: "destination",
|
|
367
367
|
icon: "download",
|
|
368
368
|
isSelected: (p == null ? void 0 : p.id) === i.id,
|
|
369
369
|
onSelect: () => v({ type: "destination", id: i.id }),
|
|
370
|
-
onDelete: () =>
|
|
370
|
+
onDelete: () => P("destination", i.id)
|
|
371
371
|
},
|
|
372
372
|
i.id
|
|
373
373
|
))
|
|
@@ -422,20 +422,21 @@ return data;` };
|
|
|
422
422
|
return {};
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function E({
|
|
426
426
|
node: u,
|
|
427
427
|
nodeType: t,
|
|
428
428
|
icon: o,
|
|
429
|
-
isSelected:
|
|
429
|
+
isSelected: r,
|
|
430
430
|
onSelect: h,
|
|
431
|
-
onDelete:
|
|
431
|
+
onDelete: n
|
|
432
432
|
}) {
|
|
433
|
+
const { t: f } = C();
|
|
433
434
|
return /* @__PURE__ */ l(
|
|
434
435
|
"div",
|
|
435
436
|
{
|
|
436
|
-
className: `nice-etl-builder__node nice-etl-builder__node--${t} ${
|
|
437
|
-
onClick: (
|
|
438
|
-
|
|
437
|
+
className: `nice-etl-builder__node nice-etl-builder__node--${t} ${r ? "nice-etl-builder__node--selected" : ""}`,
|
|
438
|
+
onClick: (s) => {
|
|
439
|
+
s.stopPropagation(), h();
|
|
439
440
|
},
|
|
440
441
|
children: [
|
|
441
442
|
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-icon", children: R(o) }),
|
|
@@ -443,11 +444,12 @@ function L({
|
|
|
443
444
|
/* @__PURE__ */ e(
|
|
444
445
|
"button",
|
|
445
446
|
{
|
|
447
|
+
"aria-label": f("etlBuilder.close", "Close"),
|
|
446
448
|
className: "nice-etl-builder__node-delete",
|
|
447
|
-
onClick: (
|
|
448
|
-
|
|
449
|
+
onClick: (s) => {
|
|
450
|
+
s.stopPropagation(), n();
|
|
449
451
|
},
|
|
450
|
-
children: "
|
|
452
|
+
children: /* @__PURE__ */ e(g, { name: "close", size: 14 })
|
|
451
453
|
}
|
|
452
454
|
)
|
|
453
455
|
]
|
|
@@ -458,44 +460,44 @@ function le({
|
|
|
458
460
|
nodeType: u,
|
|
459
461
|
node: t,
|
|
460
462
|
dataSources: o,
|
|
461
|
-
onChange:
|
|
463
|
+
onChange: r,
|
|
462
464
|
onClose: h
|
|
463
465
|
}) {
|
|
464
466
|
var f;
|
|
465
|
-
const { t:
|
|
467
|
+
const { t: n } = C();
|
|
466
468
|
return t ? /* @__PURE__ */ l("div", { className: "nice-etl-builder__properties", children: [
|
|
467
469
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__properties-header", children: [
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
/* @__PURE__ */ e("button", { onClick: h, children: "
|
|
470
|
+
/* @__PURE__ */ e("h4", { children: u === "source" ? n("etlBuilder.sourceProperties", "Source Properties") : u === "transformation" ? n("etlBuilder.transformationProperties", "Transformation Properties") : u === "destination" ? n("etlBuilder.destinationProperties", "Destination Properties") : n("etlBuilder.properties", "{type} Properties").replace(
|
|
471
|
+
"{type}",
|
|
472
|
+
u.charAt(0).toUpperCase() + u.slice(1)
|
|
473
|
+
) }),
|
|
474
|
+
/* @__PURE__ */ e("button", { onClick: h, "aria-label": n("etlBuilder.close", "Close"), children: /* @__PURE__ */ e(g, { name: "close", size: 14 }) })
|
|
473
475
|
] }),
|
|
474
476
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__properties-content", children: [
|
|
475
477
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
476
|
-
/* @__PURE__ */ e("label", { children:
|
|
478
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.name", "Name") }),
|
|
477
479
|
/* @__PURE__ */ e(
|
|
478
480
|
"input",
|
|
479
481
|
{
|
|
480
482
|
type: "text",
|
|
481
483
|
value: t.name,
|
|
482
|
-
onChange: (
|
|
484
|
+
onChange: (s) => r({ name: s.target.value })
|
|
483
485
|
}
|
|
484
486
|
)
|
|
485
487
|
] }),
|
|
486
488
|
u === "source" && /* @__PURE__ */ l(k, { children: [
|
|
487
489
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
488
|
-
/* @__PURE__ */ e("label", { children:
|
|
490
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.type", "Type") }),
|
|
489
491
|
/* @__PURE__ */ l(
|
|
490
492
|
"select",
|
|
491
493
|
{
|
|
492
494
|
value: t.type,
|
|
493
|
-
onChange: (
|
|
495
|
+
onChange: (s) => r({ type: s.target.value }),
|
|
494
496
|
children: [
|
|
495
|
-
/* @__PURE__ */ e("option", { value: "database", children:
|
|
497
|
+
/* @__PURE__ */ e("option", { value: "database", children: n("etlBuilder.database", "Database") }),
|
|
496
498
|
/* @__PURE__ */ e("option", { value: "api", children: "API" }),
|
|
497
|
-
/* @__PURE__ */ e("option", { value: "file", children:
|
|
498
|
-
/* @__PURE__ */ e("option", { value: "stream", children:
|
|
499
|
+
/* @__PURE__ */ e("option", { value: "file", children: n("etlBuilder.file", "File") }),
|
|
500
|
+
/* @__PURE__ */ e("option", { value: "stream", children: n("etlBuilder.stream", "Stream") })
|
|
499
501
|
]
|
|
500
502
|
}
|
|
501
503
|
)
|
|
@@ -506,36 +508,36 @@ function le({
|
|
|
506
508
|
{
|
|
507
509
|
type: "checkbox",
|
|
508
510
|
checked: ((f = t.incremental) == null ? void 0 : f.enabled) || !1,
|
|
509
|
-
onChange: (
|
|
510
|
-
var
|
|
511
|
-
return
|
|
511
|
+
onChange: (s) => {
|
|
512
|
+
var c;
|
|
513
|
+
return r({
|
|
512
514
|
incremental: {
|
|
513
515
|
...t.incremental,
|
|
514
|
-
enabled:
|
|
515
|
-
column: ((
|
|
516
|
+
enabled: s.target.checked,
|
|
517
|
+
column: ((c = t.incremental) == null ? void 0 : c.column) || ""
|
|
516
518
|
}
|
|
517
519
|
});
|
|
518
520
|
}
|
|
519
521
|
}
|
|
520
522
|
),
|
|
521
|
-
|
|
523
|
+
n("etlBuilder.incrementalLoad", "Incremental Load")
|
|
522
524
|
] }) })
|
|
523
525
|
] }),
|
|
524
526
|
u === "transformation" && /* @__PURE__ */ l(k, { children: [
|
|
525
527
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
526
|
-
/* @__PURE__ */ e("label", { children:
|
|
528
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.type", "Type") }),
|
|
527
529
|
/* @__PURE__ */ e("span", { children: t.type })
|
|
528
530
|
] }),
|
|
529
531
|
t.type === "filter" && /* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
530
|
-
/* @__PURE__ */ e("label", { children:
|
|
532
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.condition", "Condition") }),
|
|
531
533
|
/* @__PURE__ */ e(
|
|
532
534
|
"textarea",
|
|
533
535
|
{
|
|
534
536
|
value: String(t.config.condition || ""),
|
|
535
|
-
onChange: (
|
|
536
|
-
config: { ...t.config, condition:
|
|
537
|
+
onChange: (s) => r({
|
|
538
|
+
config: { ...t.config, condition: s.target.value }
|
|
537
539
|
}),
|
|
538
|
-
placeholder:
|
|
540
|
+
placeholder: n(
|
|
539
541
|
"etlBuilder.conditionPlaceholder",
|
|
540
542
|
"e.g., age > 18 AND status = 'active'"
|
|
541
543
|
),
|
|
@@ -545,44 +547,44 @@ function le({
|
|
|
545
547
|
] }),
|
|
546
548
|
t.type === "derive" && /* @__PURE__ */ l(k, { children: [
|
|
547
549
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
548
|
-
/* @__PURE__ */ e("label", { children:
|
|
550
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.columnName", "Column Name") }),
|
|
549
551
|
/* @__PURE__ */ e(
|
|
550
552
|
"input",
|
|
551
553
|
{
|
|
552
554
|
type: "text",
|
|
553
555
|
value: String(t.config.name || ""),
|
|
554
|
-
onChange: (
|
|
555
|
-
config: { ...t.config, name:
|
|
556
|
+
onChange: (s) => r({
|
|
557
|
+
config: { ...t.config, name: s.target.value }
|
|
556
558
|
})
|
|
557
559
|
}
|
|
558
560
|
)
|
|
559
561
|
] }),
|
|
560
562
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
561
|
-
/* @__PURE__ */ e("label", { children:
|
|
563
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.expression", "Expression") }),
|
|
562
564
|
/* @__PURE__ */ e(
|
|
563
565
|
"input",
|
|
564
566
|
{
|
|
565
567
|
type: "text",
|
|
566
568
|
value: String(t.config.expression || ""),
|
|
567
|
-
onChange: (
|
|
569
|
+
onChange: (s) => r({
|
|
568
570
|
config: {
|
|
569
571
|
...t.config,
|
|
570
|
-
expression:
|
|
572
|
+
expression: s.target.value
|
|
571
573
|
}
|
|
572
574
|
}),
|
|
573
|
-
placeholder:
|
|
575
|
+
placeholder: n("etlBuilder.expressionPlaceholder", "e.g., price * quantity")
|
|
574
576
|
}
|
|
575
577
|
)
|
|
576
578
|
] })
|
|
577
579
|
] }),
|
|
578
580
|
t.type === "custom" && /* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
579
|
-
/* @__PURE__ */ e("label", { children:
|
|
581
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.code", "Code") }),
|
|
580
582
|
/* @__PURE__ */ e(
|
|
581
583
|
"textarea",
|
|
582
584
|
{
|
|
583
585
|
value: String(t.config.code || ""),
|
|
584
|
-
onChange: (
|
|
585
|
-
config: { ...t.config, code:
|
|
586
|
+
onChange: (s) => r({
|
|
587
|
+
config: { ...t.config, code: s.target.value }
|
|
586
588
|
}),
|
|
587
589
|
rows: 10,
|
|
588
590
|
className: "nice-etl-builder__code-input"
|
|
@@ -592,33 +594,33 @@ function le({
|
|
|
592
594
|
] }),
|
|
593
595
|
u === "destination" && /* @__PURE__ */ l(k, { children: [
|
|
594
596
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
595
|
-
/* @__PURE__ */ e("label", { children:
|
|
597
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.type", "Type") }),
|
|
596
598
|
/* @__PURE__ */ l(
|
|
597
599
|
"select",
|
|
598
600
|
{
|
|
599
601
|
value: t.type,
|
|
600
|
-
onChange: (
|
|
602
|
+
onChange: (s) => r({ type: s.target.value }),
|
|
601
603
|
children: [
|
|
602
|
-
/* @__PURE__ */ e("option", { value: "database", children:
|
|
603
|
-
/* @__PURE__ */ e("option", { value: "file", children:
|
|
604
|
+
/* @__PURE__ */ e("option", { value: "database", children: n("etlBuilder.database", "Database") }),
|
|
605
|
+
/* @__PURE__ */ e("option", { value: "file", children: n("etlBuilder.file", "File") }),
|
|
604
606
|
/* @__PURE__ */ e("option", { value: "api", children: "API" }),
|
|
605
|
-
/* @__PURE__ */ e("option", { value: "warehouse", children:
|
|
607
|
+
/* @__PURE__ */ e("option", { value: "warehouse", children: n("etlBuilder.dataWarehouse", "Data Warehouse") })
|
|
606
608
|
]
|
|
607
609
|
}
|
|
608
610
|
)
|
|
609
611
|
] }),
|
|
610
612
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
611
|
-
/* @__PURE__ */ e("label", { children:
|
|
613
|
+
/* @__PURE__ */ e("label", { children: n("etlBuilder.writeMode", "Write Mode") }),
|
|
612
614
|
/* @__PURE__ */ l(
|
|
613
615
|
"select",
|
|
614
616
|
{
|
|
615
617
|
value: t.writeMode,
|
|
616
|
-
onChange: (
|
|
618
|
+
onChange: (s) => r({ writeMode: s.target.value }),
|
|
617
619
|
children: [
|
|
618
|
-
/* @__PURE__ */ e("option", { value: "append", children:
|
|
619
|
-
/* @__PURE__ */ e("option", { value: "overwrite", children:
|
|
620
|
-
/* @__PURE__ */ e("option", { value: "upsert", children:
|
|
621
|
-
/* @__PURE__ */ e("option", { value: "merge", children:
|
|
620
|
+
/* @__PURE__ */ e("option", { value: "append", children: n("etlBuilder.append", "Append") }),
|
|
621
|
+
/* @__PURE__ */ e("option", { value: "overwrite", children: n("etlBuilder.overwrite", "Overwrite") }),
|
|
622
|
+
/* @__PURE__ */ e("option", { value: "upsert", children: n("etlBuilder.upsert", "Upsert") }),
|
|
623
|
+
/* @__PURE__ */ e("option", { value: "merge", children: n("etlBuilder.merge", "Merge") })
|
|
622
624
|
]
|
|
623
625
|
}
|
|
624
626
|
)
|
|
@@ -632,9 +634,9 @@ function te({
|
|
|
632
634
|
monitoring: t,
|
|
633
635
|
onChange: o
|
|
634
636
|
}) {
|
|
635
|
-
const { t:
|
|
637
|
+
const { t: r } = C(), [h, n] = N(u || { enabled: !1 });
|
|
636
638
|
return /* @__PURE__ */ l("div", { className: "nice-etl-builder__schedule-editor", children: [
|
|
637
|
-
/* @__PURE__ */ e("h4", { children:
|
|
639
|
+
/* @__PURE__ */ e("h4", { children: r("etlBuilder.scheduleConfiguration", "Schedule Configuration") }),
|
|
638
640
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ l("label", { children: [
|
|
639
641
|
/* @__PURE__ */ e(
|
|
640
642
|
"input",
|
|
@@ -642,65 +644,65 @@ function te({
|
|
|
642
644
|
type: "checkbox",
|
|
643
645
|
checked: h.enabled,
|
|
644
646
|
onChange: (f) => {
|
|
645
|
-
const
|
|
646
|
-
|
|
647
|
+
const s = { ...h, enabled: f.target.checked };
|
|
648
|
+
n(s), o(s);
|
|
647
649
|
}
|
|
648
650
|
}
|
|
649
651
|
),
|
|
650
|
-
|
|
652
|
+
r("etlBuilder.enableScheduledExecution", "Enable scheduled execution")
|
|
651
653
|
] }) }),
|
|
652
654
|
h.enabled && /* @__PURE__ */ l(k, { children: [
|
|
653
655
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
654
|
-
/* @__PURE__ */ e("label", { children:
|
|
656
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.cronExpression", "Cron Expression") }),
|
|
655
657
|
/* @__PURE__ */ e(
|
|
656
658
|
"input",
|
|
657
659
|
{
|
|
658
660
|
type: "text",
|
|
659
661
|
value: h.cron || "",
|
|
660
662
|
onChange: (f) => {
|
|
661
|
-
const
|
|
662
|
-
|
|
663
|
+
const s = { ...h, cron: f.target.value };
|
|
664
|
+
n(s);
|
|
663
665
|
},
|
|
664
|
-
placeholder:
|
|
666
|
+
placeholder: r("etlBuilder.cronPlaceholder", "0 * * * * (every hour)")
|
|
665
667
|
}
|
|
666
668
|
),
|
|
667
|
-
/* @__PURE__ */ e("small", { children:
|
|
669
|
+
/* @__PURE__ */ e("small", { children: r("etlBuilder.cronFormat", "Format: minute hour day month weekday") })
|
|
668
670
|
] }),
|
|
669
671
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
670
|
-
/* @__PURE__ */ e("label", { children:
|
|
672
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.timezone", "Timezone") }),
|
|
671
673
|
/* @__PURE__ */ l(
|
|
672
674
|
"select",
|
|
673
675
|
{
|
|
674
676
|
value: h.timezone || "UTC",
|
|
675
677
|
onChange: (f) => {
|
|
676
|
-
const
|
|
677
|
-
|
|
678
|
+
const s = { ...h, timezone: f.target.value };
|
|
679
|
+
n(s);
|
|
678
680
|
},
|
|
679
681
|
children: [
|
|
680
682
|
/* @__PURE__ */ e("option", { value: "UTC", children: "UTC" }),
|
|
681
|
-
/* @__PURE__ */ e("option", { value: "America/New_York", children:
|
|
682
|
-
/* @__PURE__ */ e("option", { value: "America/Chicago", children:
|
|
683
|
-
/* @__PURE__ */ e("option", { value: "America/Los_Angeles", children:
|
|
684
|
-
/* @__PURE__ */ e("option", { value: "Europe/London", children:
|
|
685
|
-
/* @__PURE__ */ e("option", { value: "Europe/Warsaw", children:
|
|
683
|
+
/* @__PURE__ */ e("option", { value: "America/New_York", children: r("etlBuilder.easternTime", "Eastern Time") }),
|
|
684
|
+
/* @__PURE__ */ e("option", { value: "America/Chicago", children: r("etlBuilder.centralTime", "Central Time") }),
|
|
685
|
+
/* @__PURE__ */ e("option", { value: "America/Los_Angeles", children: r("etlBuilder.pacificTime", "Pacific Time") }),
|
|
686
|
+
/* @__PURE__ */ e("option", { value: "Europe/London", children: r("etlBuilder.london", "London") }),
|
|
687
|
+
/* @__PURE__ */ e("option", { value: "Europe/Warsaw", children: r("etlBuilder.warsaw", "Warsaw") })
|
|
686
688
|
]
|
|
687
689
|
}
|
|
688
690
|
)
|
|
689
691
|
] }),
|
|
690
|
-
/* @__PURE__ */ e("button", { onClick: () => o(h), children:
|
|
692
|
+
/* @__PURE__ */ e("button", { onClick: () => o(h), children: r("etlBuilder.saveSchedule", "Save Schedule") })
|
|
691
693
|
] }),
|
|
692
|
-
/* @__PURE__ */ e("h4", { children:
|
|
694
|
+
/* @__PURE__ */ e("h4", { children: r("etlBuilder.monitoring", "Monitoring") }),
|
|
693
695
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ l("label", { children: [
|
|
694
696
|
/* @__PURE__ */ e("input", { type: "checkbox", checked: (t == null ? void 0 : t.alertOnFailure) || !1, disabled: !0 }),
|
|
695
|
-
|
|
697
|
+
r("etlBuilder.alertOnFailure", "Alert on failure")
|
|
696
698
|
] }) }),
|
|
697
699
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
698
|
-
/* @__PURE__ */ e("label", { children:
|
|
700
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.logLevel", "Log Level") }),
|
|
699
701
|
/* @__PURE__ */ l("select", { value: (t == null ? void 0 : t.logLevel) || "info", disabled: !0, children: [
|
|
700
|
-
/* @__PURE__ */ e("option", { value: "error", children:
|
|
701
|
-
/* @__PURE__ */ e("option", { value: "warn", children:
|
|
702
|
-
/* @__PURE__ */ e("option", { value: "info", children:
|
|
703
|
-
/* @__PURE__ */ e("option", { value: "debug", children:
|
|
702
|
+
/* @__PURE__ */ e("option", { value: "error", children: r("etlBuilder.error", "Error") }),
|
|
703
|
+
/* @__PURE__ */ e("option", { value: "warn", children: r("etlBuilder.warning", "Warning") }),
|
|
704
|
+
/* @__PURE__ */ e("option", { value: "info", children: r("etlBuilder.info", "Info") }),
|
|
705
|
+
/* @__PURE__ */ e("option", { value: "debug", children: r("etlBuilder.debug", "Debug") })
|
|
704
706
|
] })
|
|
705
707
|
] })
|
|
706
708
|
] });
|
|
@@ -754,5 +756,5 @@ function ne({ runs: u }) {
|
|
|
754
756
|
] });
|
|
755
757
|
}
|
|
756
758
|
export {
|
|
757
|
-
|
|
759
|
+
ce as NiceETLBuilder
|
|
758
760
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/ui-bi",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Nice2Dev Business Intelligence — Report builder, dashboard studio, ETL pipeline builder",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"prepublishOnly": "npm run build"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@nice2dev/ui": "^1.0
|
|
37
|
-
"@nice2dev/ui-core": "^1.0
|
|
36
|
+
"@nice2dev/ui": "^1.2.0",
|
|
37
|
+
"@nice2dev/ui-core": "^1.2.0",
|
|
38
38
|
"react": ">=17.0.0",
|
|
39
39
|
"react-dom": ">=17.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@nice2dev/ui": "^1.2.
|
|
43
|
-
"@nice2dev/ui-core": "^1.2.
|
|
42
|
+
"@nice2dev/ui": "^1.2.1",
|
|
43
|
+
"@nice2dev/ui-core": "^1.2.1",
|
|
44
44
|
"@testing-library/jest-dom": "^7.0.1",
|
|
45
45
|
"@testing-library/react": "^16.3.3",
|
|
46
46
|
"@types/react": "^19.2.18",
|