@nice2dev/ui-bi 1.1.10 → 1.2.0
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 +70 -0
- package/dist/NiceETLBuilder.d.ts +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +303 -259
- package/dist/types.d.ts +3 -5
- package/dist/ui-bi.css +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# @nice2dev/ui-bi
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3a4939d: 1.2.0 — the API cleanup announced for this version, dictionaries per language by default, and
|
|
8
|
+
three new controls. **Breaking:** every removal has a replacement, listed name by name in
|
|
9
|
+
`documentation/omniverk/OMNIVERK_UPGRADE_1.2.0.md`.
|
|
10
|
+
|
|
11
|
+
**Removed (breaking).** All 118 `@deprecated` names: the aliases without the `Nice` prefix in
|
|
12
|
+
`ui-audio`, `ui-graphics` and `ui-3d`; `NiceBarcodeGenerator` (→ `NiceBarcode`), `NiceFloorPlanCanvas`
|
|
13
|
+
(→ `NiceSpatialEditor` in `@nice2dev/ui-buildings`), the v2 props and types of `NiceTopNav`,
|
|
14
|
+
`NiceProgress.showLabel`, `NiceCountryPicker.showDialCode` / `showFlag`, `type` on
|
|
15
|
+
`NiceDateTimePicker` / `NiceDateRangeBox` (→ `dateFormatPreset`); `ZoneOccupancy` in
|
|
16
|
+
`ui-buildings` and `events`, the `SmartHome*` types; the icon variant `flat` (→ `cutout`) and
|
|
17
|
+
`NiceIconEditor` (→ `NiceVectorEditor`); `NiceSizeLegacy`; the `snapGrid` module of `ui-diagrams` (→
|
|
18
|
+
`@nice2dev/spatial-core`); the opt-in stylesheet `@nice2dev/ui/css/legacy-bg-text-aliases.css`, which
|
|
19
|
+
formed an alias cycle with `style.css`. Props that were accepted and never read — 19 on
|
|
20
|
+
`NiceModuleGrid`, and more on `NiceAutocomplete`, `NiceTaskInbox`, `NiceConsentBanner`, the
|
|
21
|
+
building and communication controls, four `ui-audio` panels and `NiceStreamDashboard` — are gone
|
|
22
|
+
from the types. `NiceResourceAllocation` in `ui-erp` is `NiceCapacityPlanner` (the one in `ui`
|
|
23
|
+
keeps its name); `NiceGenericPlayerStageVisualizer` (→ `NiceStageVisualizer`) and
|
|
24
|
+
`NiceCubeBrowserProps` are removed. The `@nice2dev/ui/overlays` entry calls its modal, drawer,
|
|
25
|
+
bottom sheet and context menu `NiceOverlayModal`, `NiceOverlayDrawer`, `NiceOverlayBottomSheet` and
|
|
26
|
+
`NiceOverlayContextMenu`: the old names belonged to different components of `@nice2dev/ui`.
|
|
27
|
+
|
|
28
|
+
**Dictionaries per language.** `NiceI18nProvider` loads only the language in use, with `import()`
|
|
29
|
+
(it was `NiceI18nLazyProvider` in 1.1.10, which stays as the same component); the controls show their
|
|
30
|
+
built-in English until it arrives — `await loadNiceDictionary(lang)` before the first render to start
|
|
31
|
+
in the language. Nothing on the main entry of `@nice2dev/i18n` imports a dictionary any more:
|
|
32
|
+
`NICE_I18N_DICTIONARIES`, `createTranslator`, `NICE_I18N_VARIANTS` / `resolvePlVariant` and the
|
|
33
|
+
translation tooling moved to the new entry `@nice2dev/i18n/all`, and `@nice2dev/ui-core` no longer
|
|
34
|
+
re-exports the dictionary map. `@nice2dev/ui` with what it bundles: 1283 kB → 952 kB gzip loaded up
|
|
35
|
+
front. The `ui-audio` controls read the app's `NiceI18nProvider` now; their own provider overrides it.
|
|
36
|
+
|
|
37
|
+
**New controls.** `NiceRecurrenceEditor`, `NiceStopwatch`, `NiceCountdownTimer` (`@nice2dev/ui`) and
|
|
38
|
+
`NicePasswordGenerator` (`@nice2dev/auth`), plus `recurrenceDates()` and `generatePassword()`.
|
|
39
|
+
`NiceScheduler` honours a weekly rule's `byDay`, which it ignored.
|
|
40
|
+
|
|
41
|
+
**Visible changes.** The palette meets WCAG AA for text on every fill: darker fills in the light
|
|
42
|
+
theme, dark text on the fills of the dark theme (new `--nice-text-on-success` / `-error` / `-info` /
|
|
43
|
+
`-accent` / `-warning`; `NiceThemeText` takes `onSuccess`, `onError`, `onInfo`, `onWarning`). Mobile
|
|
44
|
+
and platform panels follow the app theme instead of `prefers-color-scheme`. Swipes in
|
|
45
|
+
`NiceSwipeActions`, `NiceTouchTable` and `NiceMobileCalendar` work with a mouse and a pen. The
|
|
46
|
+
`ui-forms` editors have the intended spacing (it was four times too large). `NiceMAM`,
|
|
47
|
+
`NiceTranscoder`, `NiceVideoAnnotator` and `NiceStreamDashboard` use `nice-`-prefixed BEM classes.
|
|
48
|
+
|
|
49
|
+
**Fixes.** Controls that invented results ask the host instead: `NiceIntegrationHub`,
|
|
50
|
+
`NiceMLStudio` (`onExperimentRun` may return metrics), `NiceRemoteManagement`
|
|
51
|
+
(`onCaptureScreenshot`), `NicePoseDetector` (`detector`), `NiceBatchScannerProvider`,
|
|
52
|
+
`NiceCacheStrategies`; `NiceLowCodeStudio` accepts dropped components. Controls that did nothing
|
|
53
|
+
work or say why they are off: `NiceStreamDashboard` adds sources, sends chat and runs the chosen
|
|
54
|
+
transition (new `onAddPlatform`, `onSendChatMessage`, `onTransition`, `onScreenshot`,
|
|
55
|
+
`onOpenAudioMixer`, `onOpenSettings`; `receiveChatMessage` feeds incoming chat), `NiceMLStudio`
|
|
56
|
+
downloads through `onModelDownload`, `NiceETLBuilder` saves through `onSave` (its Save button had
|
|
57
|
+
no handler), `NiceTranscoder` makes jobs of picked and dropped files, `NiceAutomationEditor` offers
|
|
58
|
+
the trigger types its model has. Texts of about fifty components go
|
|
59
|
+
through `t()` in six languages, among them the AI data grid, chart and form builders, the ML
|
|
60
|
+
studio, the report designer, the song picker, `NiceProtocolConfig`, `NiceETLBuilder` and
|
|
61
|
+
`NiceInlineHelp` — every key the controls pass to `t()` now has a dictionary entry, so none of
|
|
62
|
+
them stays English under another language; `NiceDataGridAI` sorts on a query in any language, not
|
|
63
|
+
only in English. `NiceWindow`, `NiceConsole`, `NiceFileManager` and `NiceGitManager` no longer
|
|
64
|
+
crash when `accessMode` switches to or from `'hidden'`. Ids come from `createId()` (`@nice2dev/ui-core`), so nothing throws
|
|
65
|
+
outside a secure context as `crypto.randomUUID()` did on plain http. `ui-3d` runs on three r183
|
|
66
|
+
without its deprecation warnings. `NiceRemoteManagement` calls the handlers of the latest render.
|
|
67
|
+
The AI hint popover and the `ui-platform` panels follow the app theme, not the system's or a
|
|
68
|
+
`.dark` class on the host. `NiceCommandPalette` has styles and its search filters;
|
|
69
|
+
`NiceTimeoutFeedback` starts its clock; `NiceOfflineBanner` takes `online`; Monaco's workers in
|
|
70
|
+
`NiceCodeEditor` load; the `ui-audio` panels that used Bootstrap classes use Nice controls; colours
|
|
71
|
+
that reached a canvas as `var(…)` (karaoke lanes and notes) are resolved first.
|
|
72
|
+
|
|
3
73
|
## 1.1.10
|
|
4
74
|
|
|
5
75
|
### Patch Changes
|
package/dist/NiceETLBuilder.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import { NiceETLBuilderProps } from './types';
|
|
|
3
3
|
/**
|
|
4
4
|
* NiceETLBuilder - Visual ETL Pipeline Builder
|
|
5
5
|
*/
|
|
6
|
-
export declare function NiceETLBuilder({ pipeline: initialPipeline, dataSources, onChange, onRun, onSchedule, className, tutorial, }: NiceETLBuilderProps): React.ReactElement;
|
|
6
|
+
export declare function NiceETLBuilder({ pipeline: initialPipeline, dataSources, onChange, onRun, onSchedule, onSave, className, tutorial, }: NiceETLBuilderProps): React.ReactElement;
|
|
7
7
|
export default NiceETLBuilder;
|
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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("@nice2dev/ui"),f=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},E=o=>/^[a-z][a-z0-9-]*$/.test(o)?e.jsx(g.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:l=[],onChange:d,onRun:t,onSchedule:h,onSave:n,className:j="",tutorial:a}){const{t:c}=f.useNiceTranslation(),[p,I]=m.useState(()=>o||{...K,id:f.createId(),name:c("etlBuilder.newPipeline","New Pipeline")}),[u,_]=m.useState(null),[v,L]=m.useState("design"),[B,T]=m.useState(!1),[P,A]=m.useState([]),[y,N]=m.useState(null),F=m.useRef(null),b=m.useCallback(i=>{I(s=>{const r=i(s);return d==null||d(r),r})},[d]),S=m.useCallback(i=>{var r;const s={id:f.createId(),type:i.type,name:i.name,config:i.config,schema:(r=i.schema)==null?void 0:r.tables[0]};b(x=>({...x,sources:[...x.sources,s]}))},[b]),D=m.useCallback((i,s)=>{const r={id:f.createId(),type:i,name:(()=>{const x=w.find(H=>H.type===i);return x?c(x.key,x.label):i})(),input:[],output:f.createId(),config:Y(i)};b(x=>({...x,transformations:[...x.transformations,r]})),_({type:"transformation",id:r.id})},[b,c]),z=m.useCallback(()=>{const i={id:f.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(r=>{switch(i){case"source":return{...r,sources:r.sources.filter(x=>x.id!==s)};case"transformation":return{...r,transformations:r.transformations.filter(x=>x.id!==s)};case"destination":return{...r,destinations:r.destinations.filter(x=>x.id!==s)};default:return r}}),_(null)},[b]),R=m.useCallback(async()=>{if(t){T(!0);try{const i=await t(p);A(s=>[i,...s].slice(0,50))}finally{T(!1)}}},[p,t]),U=m.useCallback(i=>{b(s=>({...s,schedule:i})),h==null||h(p,i)},[p,b,h]),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 p.sources.find(i=>i.id===u.id);case"transformation":return p.transformations.find(i=>i.id===u.id);case"destination":return p.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")}),l.map(i=>e.jsxs("div",{className:"nice-etl-builder__palette-item",onClick:()=>S(i),children:[e.jsx("span",{className:"nice-etl-builder__palette-icon",children:e.jsx(g.NiceIcon,{name:"database",size:14})}),e.jsx("span",{children:i.name})]},i.id)),e.jsxs("button",{onClick:()=>S({id:"",name:c("etlBuilder.newSource","New Source"),type:"database",config:{}}),children:[e.jsx(g.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:E(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:z,children:[e.jsx(g.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:l,onChange:i=>{b(s=>{switch(u.type){case"source":return{...s,sources:s.sources.map(r=>r.id===u.id?{...r,...i}:r)};case"transformation":return{...s,transformations:s.transformations.map(r=>r.id===u.id?{...r,...i}:r)};case"destination":return{...s,destinations:s.destinations.map(r=>r.id===u.id?{...r,...i}:r)};default:return s}})},onClose:()=>_(null)}):void 0;return e.jsxs(g.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:p.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:()=>L(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||!t,title:t?void 0:c("etlBuilder.runNotSetUp","Running pipelines is not set up"),className:"nice-etl-builder__run-btn",children:[e.jsx(g.NiceIcon,{name:B?"clock":"play",size:14})," ",B?c("etlBuilder.running","Running..."):c("etlBuilder.run","Run")]}),e.jsxs("button",{onClick:()=>n==null?void 0:n(p),disabled:!n,title:n?void 0:c("etlBuilder.saveNotSetUp","Saving pipelines is not set up"),className:"nice-etl-builder__save-btn",children:[e.jsx(g.NiceIcon,{name:"save",size:14})," ",c("save","Save")]}),e.jsx(f.NiceTutorialButton,{steps:f.resolveTutorial(a,q)})]})]}),children:[v==="design"&&e.jsx("div",{ref:F,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")}),p.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(g.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")}),p.transformations.map(i=>{const s=w.find(r=>r.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)}),p.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(g.NiceIcon,{name:"arrow-right",size:16})}),e.jsxs("div",{className:"nice-etl-builder__column",children:[e.jsx("h5",{children:c("etlBuilder.destinations","Destinations")}),p.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(p,null,2)})}),v==="schedule"&&e.jsx(G,{schedule:p.schedule,monitoring:p.monitoring,onChange:U}),v==="history"&&e.jsx(Q,{runs:P})]})}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:l,icon:d,isSelected:t,onSelect:h,onDelete:n}){return e.jsxs("div",{className:`nice-etl-builder__node nice-etl-builder__node--${l} ${t?"nice-etl-builder__node--selected":""}`,onClick:j=>{j.stopPropagation(),h()},children:[e.jsx("span",{className:"nice-etl-builder__node-icon",children:E(d)}),e.jsx("span",{className:"nice-etl-builder__node-name",children:o.name}),e.jsx("button",{className:"nice-etl-builder__node-delete",onClick:j=>{j.stopPropagation(),n()},children:"×"})]})}function J({nodeType:o,node:l,dataSources:d,onChange:t,onClose:h}){var j;const{t:n}=f.useNiceTranslation();return l?e.jsxs("div",{className:"nice-etl-builder__properties",children:[e.jsxs("div",{className:"nice-etl-builder__properties-header",children:[e.jsxs("h4",{children:[o.charAt(0).toUpperCase()+o.slice(1)," Properties"]}),e.jsx("button",{onClick:h,children:"×"})]}),e.jsxs("div",{className:"nice-etl-builder__properties-content",children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.name","Name")}),e.jsx("input",{type:"text",value:l.name,onChange:a=>t({name:a.target.value})})]}),o==="source"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.type","Type")}),e.jsxs("select",{value:l.type,onChange:a=>t({type:a.target.value}),children:[e.jsx("option",{value:"database",children:n("etlBuilder.database","Database")}),e.jsx("option",{value:"api",children:"API"}),e.jsx("option",{value:"file",children:n("etlBuilder.file","File")}),e.jsx("option",{value:"stream",children:n("etlBuilder.stream","Stream")})]})]}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:((j=l.incremental)==null?void 0:j.enabled)||!1,onChange:a=>{var c;return t({incremental:{...l.incremental,enabled:a.target.checked,column:((c=l.incremental)==null?void 0:c.column)||""}})}}),n("etlBuilder.incrementalLoad","Incremental Load")]})})]}),o==="transformation"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.type","Type")}),e.jsx("span",{children:l.type})]}),l.type==="filter"&&e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.condition","Condition")}),e.jsx("textarea",{value:String(l.config.condition||""),onChange:a=>t({config:{...l.config,condition:a.target.value}}),placeholder:n("etlBuilder.conditionPlaceholder","e.g., age > 18 AND status = 'active'"),rows:3})]}),l.type==="derive"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.columnName","Column Name")}),e.jsx("input",{type:"text",value:String(l.config.name||""),onChange:a=>t({config:{...l.config,name:a.target.value}})})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.expression","Expression")}),e.jsx("input",{type:"text",value:String(l.config.expression||""),onChange:a=>t({config:{...l.config,expression:a.target.value}}),placeholder:n("etlBuilder.expressionPlaceholder","e.g., price * quantity")})]})]}),l.type==="custom"&&e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.code","Code")}),e.jsx("textarea",{value:String(l.config.code||""),onChange:a=>t({config:{...l.config,code:a.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:n("etlBuilder.type","Type")}),e.jsxs("select",{value:l.type,onChange:a=>t({type:a.target.value}),children:[e.jsx("option",{value:"database",children:n("etlBuilder.database","Database")}),e.jsx("option",{value:"file",children:n("etlBuilder.file","File")}),e.jsx("option",{value:"api",children:"API"}),e.jsx("option",{value:"warehouse",children:n("etlBuilder.dataWarehouse","Data Warehouse")})]})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:n("etlBuilder.writeMode","Write Mode")}),e.jsxs("select",{value:l.writeMode,onChange:a=>t({writeMode:a.target.value}),children:[e.jsx("option",{value:"append",children:n("etlBuilder.append","Append")}),e.jsx("option",{value:"overwrite",children:n("etlBuilder.overwrite","Overwrite")}),e.jsx("option",{value:"upsert",children:n("etlBuilder.upsert","Upsert")}),e.jsx("option",{value:"merge",children:n("etlBuilder.merge","Merge")})]})]})]})]})]}):e.jsx(e.Fragment,{})}function G({schedule:o,monitoring:l,onChange:d}){const{t}=f.useNiceTranslation(),[h,n]=m.useState(o||{enabled:!1});return e.jsxs("div",{className:"nice-etl-builder__schedule-editor",children:[e.jsx("h4",{children:t("etlBuilder.scheduleConfiguration","Schedule Configuration")}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:h.enabled,onChange:j=>{const a={...h,enabled:j.target.checked};n(a),d(a)}}),t("etlBuilder.enableScheduledExecution","Enable scheduled execution")]})}),h.enabled&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:t("etlBuilder.cronExpression","Cron Expression")}),e.jsx("input",{type:"text",value:h.cron||"",onChange:j=>{const a={...h,cron:j.target.value};n(a)},placeholder:t("etlBuilder.cronPlaceholder","0 * * * * (every hour)")}),e.jsx("small",{children:t("etlBuilder.cronFormat","Format: minute hour day month weekday")})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:t("etlBuilder.timezone","Timezone")}),e.jsxs("select",{value:h.timezone||"UTC",onChange:j=>{const a={...h,timezone:j.target.value};n(a)},children:[e.jsx("option",{value:"UTC",children:"UTC"}),e.jsx("option",{value:"America/New_York",children:t("etlBuilder.easternTime","Eastern Time")}),e.jsx("option",{value:"America/Chicago",children:t("etlBuilder.centralTime","Central Time")}),e.jsx("option",{value:"America/Los_Angeles",children:t("etlBuilder.pacificTime","Pacific Time")}),e.jsx("option",{value:"Europe/London",children:t("etlBuilder.london","London")}),e.jsx("option",{value:"Europe/Warsaw",children:t("etlBuilder.warsaw","Warsaw")})]})]}),e.jsx("button",{onClick:()=>d(h),children:t("etlBuilder.saveSchedule","Save Schedule")})]}),e.jsx("h4",{children:t("etlBuilder.monitoring","Monitoring")}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:(l==null?void 0:l.alertOnFailure)||!1,disabled:!0}),t("etlBuilder.alertOnFailure","Alert on failure")]})}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:t("etlBuilder.logLevel","Log Level")}),e.jsxs("select",{value:(l==null?void 0:l.logLevel)||"info",disabled:!0,children:[e.jsx("option",{value:"error",children:t("etlBuilder.error","Error")}),e.jsx("option",{value:"warn",children:t("etlBuilder.warning","Warning")}),e.jsx("option",{value:"info",children:t("etlBuilder.info","Info")}),e.jsx("option",{value:"debug",children:t("etlBuilder.debug","Debug")})]})]})]})}function Q({runs:o}){const{t:l}=f.useNiceTranslation();return e.jsxs("div",{className:"nice-etl-builder__history-view",children:[e.jsx("h4",{children:l("etlBuilder.runHistory","Run History")}),o.length===0?e.jsx("div",{className:"nice-etl-builder__no-history",children:l("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:l("etlBuilder.status","Status")}),e.jsx("th",{children:l("etlBuilder.startTime","Start Time")}),e.jsx("th",{children:l("etlBuilder.duration","Duration")}),e.jsx("th",{children:l("etlBuilder.rows","Rows")}),e.jsx("th",{children:l("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(g.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.d.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Nice2Dev Business Intelligence
|
|
4
4
|
*/
|
|
5
5
|
export { NiceETLBuilder } from './NiceETLBuilder';
|
|
6
|
-
export type { DataSource, DataSourceConfig, DataSchema, TableSchema, ColumnSchema, Relationship, Report, ReportQuery, QueryJoin, QueryColumn, QueryCondition, ReportLayout, ReportElement, ReportElementType, DataBinding, ElementStyle, ReportParameter, ReportFilter, ReportSorting, ReportGrouping, CalculatedField, ReportFormatting, ConditionalFormat, DrillDownConfig, DrillDownLevel, Dashboard, DashboardLayout, DashboardWidget, WidgetType, GridPosition, WidgetConfig, ChartType, ChartSeries, ChartAxis, LegendConfig, TableColumn, MapConfig, WidgetInteraction, DashboardFilter, DashboardTheme, SharingConfig, SharedUser, ETLPipeline, ETLSource, ETLTransformation, ETLTransformationType, ETLDestination, ETLSchedule, ETLMonitoring, ETLRun, ETLError, Cube, CubeDimension, CubeMeasure, CubeHierarchy, NiceETLBuilderProps,
|
|
6
|
+
export type { DataSource, DataSourceConfig, DataSchema, TableSchema, ColumnSchema, Relationship, Report, ReportQuery, QueryJoin, QueryColumn, QueryCondition, ReportLayout, ReportElement, ReportElementType, DataBinding, ElementStyle, ReportParameter, ReportFilter, ReportSorting, ReportGrouping, CalculatedField, ReportFormatting, ConditionalFormat, DrillDownConfig, DrillDownLevel, Dashboard, DashboardLayout, DashboardWidget, WidgetType, GridPosition, WidgetConfig, ChartType, ChartSeries, ChartAxis, LegendConfig, TableColumn, MapConfig, WidgetInteraction, DashboardFilter, DashboardTheme, SharingConfig, SharedUser, ETLPipeline, ETLSource, ETLTransformation, ETLTransformationType, ETLDestination, ETLSchedule, ETLMonitoring, ETLRun, ETLError, Cube, CubeDimension, CubeMeasure, CubeHierarchy, NiceETLBuilderProps, } from './types';
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e, Fragment as
|
|
2
|
-
import { NiceIcon as
|
|
3
|
-
import { useNiceTranslation as C, NiceTutorialButton as
|
|
4
|
-
import { useState as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { NiceIcon as g, NiceAppShell as q } from "@nice2dev/ui";
|
|
3
|
+
import { useNiceTranslation as C, createId as w, NiceTutorialButton as G, resolveTutorial as Q } from "@nice2dev/ui-core";
|
|
4
|
+
import { useState as N, useRef as X, useCallback as y } from "react";
|
|
5
|
+
const Z = [
|
|
6
6
|
{
|
|
7
7
|
target: ".nice-etl-builder",
|
|
8
8
|
titleKey: "tutorial.etlBuilder.intro.title",
|
|
@@ -11,168 +11,189 @@ const Q = [
|
|
|
11
11
|
content: "Wire sources → transformations → destinations into a pipeline, switch the views, then run it and save the configuration.",
|
|
12
12
|
placement: "auto"
|
|
13
13
|
}
|
|
14
|
-
],
|
|
14
|
+
], ee = {
|
|
15
15
|
id: "",
|
|
16
16
|
name: "New Pipeline",
|
|
17
17
|
sources: [],
|
|
18
18
|
transformations: [],
|
|
19
19
|
destinations: [],
|
|
20
20
|
version: 1
|
|
21
|
-
},
|
|
22
|
-
{ type: "filter", label: "Filter", icon: "filter" },
|
|
23
|
-
{ type: "map", label: "Map", icon: "shuffle" },
|
|
24
|
-
{ type: "aggregate", label: "Aggregate", icon: "∑" },
|
|
25
|
-
{ type: "join", label: "Join", icon: "link" },
|
|
26
|
-
{ type: "union", label: "Union", icon: "∪" },
|
|
27
|
-
{ type: "sort", label: "Sort", icon: "sort" },
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{ type: "
|
|
35
|
-
{ type: "
|
|
36
|
-
{ type: "
|
|
37
|
-
{ type: "
|
|
21
|
+
}, R = (u) => /^[a-z][a-z0-9-]*$/.test(u) ? /* @__PURE__ */ e(g, { name: u, size: 16 }) : u, E = [
|
|
22
|
+
{ type: "filter", key: "etlBuilder.transform.filter", label: "Filter", icon: "filter" },
|
|
23
|
+
{ type: "map", key: "etlBuilder.transform.map", label: "Map", icon: "shuffle" },
|
|
24
|
+
{ type: "aggregate", key: "etlBuilder.transform.aggregate", label: "Aggregate", icon: "∑" },
|
|
25
|
+
{ type: "join", key: "etlBuilder.transform.join", label: "Join", icon: "link" },
|
|
26
|
+
{ type: "union", key: "etlBuilder.transform.union", label: "Union", icon: "∪" },
|
|
27
|
+
{ type: "sort", key: "etlBuilder.transform.sort", label: "Sort", icon: "sort" },
|
|
28
|
+
{
|
|
29
|
+
type: "deduplicate",
|
|
30
|
+
key: "etlBuilder.transform.deduplicate",
|
|
31
|
+
label: "Deduplicate",
|
|
32
|
+
icon: "copy"
|
|
33
|
+
},
|
|
34
|
+
{ type: "pivot", key: "etlBuilder.transform.pivot", label: "Pivot", icon: "expand" },
|
|
35
|
+
{ type: "unpivot", key: "etlBuilder.transform.unpivot", label: "Unpivot", icon: "collapse" },
|
|
36
|
+
{ type: "split", key: "etlBuilder.transform.split", label: "Split", icon: "scissors" },
|
|
37
|
+
{ type: "merge", key: "etlBuilder.transform.merge", label: "Merge", icon: "git-branch" },
|
|
38
|
+
{ type: "lookup", key: "etlBuilder.transform.lookup", label: "Lookup", icon: "book" },
|
|
39
|
+
{ type: "derive", key: "etlBuilder.transform.derive", label: "Derive Column", icon: "plus" },
|
|
40
|
+
{ type: "validate", key: "etlBuilder.transform.validate", label: "Validate", icon: "check" },
|
|
41
|
+
{ type: "cleanse", key: "etlBuilder.transform.cleanse", label: "Cleanse", icon: "wand" },
|
|
42
|
+
{ type: "custom", key: "etlBuilder.transform.custom", label: "Custom", icon: "ƒ" }
|
|
38
43
|
];
|
|
39
|
-
function
|
|
40
|
-
pipeline:
|
|
44
|
+
function se({
|
|
45
|
+
pipeline: u,
|
|
41
46
|
dataSources: t = [],
|
|
42
|
-
onChange:
|
|
47
|
+
onChange: o,
|
|
43
48
|
onRun: n,
|
|
44
|
-
onSchedule:
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
onSchedule: h,
|
|
50
|
+
onSave: r,
|
|
51
|
+
className: f = "",
|
|
52
|
+
tutorial: c
|
|
47
53
|
}) {
|
|
48
|
-
const { t:
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
const { t: s } = C(), [m, U] = N(
|
|
55
|
+
() => u || {
|
|
56
|
+
...ee,
|
|
57
|
+
id: w(),
|
|
58
|
+
name: s("etlBuilder.newPipeline", "New Pipeline")
|
|
59
|
+
}
|
|
60
|
+
), [p, v] = N(null), [B, F] = N("design"), [S, P] = N(!1), [M, I] = N([]), [T, D] = N(null), $ = X(null), _ = y(
|
|
51
61
|
(i) => {
|
|
52
|
-
|
|
62
|
+
U((a) => {
|
|
53
63
|
const d = i(a);
|
|
54
|
-
return
|
|
64
|
+
return o == null || o(d), d;
|
|
55
65
|
});
|
|
56
66
|
},
|
|
57
|
-
[
|
|
58
|
-
),
|
|
67
|
+
[o]
|
|
68
|
+
), A = y(
|
|
59
69
|
(i) => {
|
|
60
70
|
var d;
|
|
61
71
|
const a = {
|
|
62
|
-
id:
|
|
72
|
+
id: w(),
|
|
63
73
|
type: i.type,
|
|
64
74
|
name: i.name,
|
|
65
75
|
config: i.config,
|
|
66
76
|
schema: (d = i.schema) == null ? void 0 : d.tables[0]
|
|
67
77
|
};
|
|
68
|
-
|
|
69
|
-
...
|
|
70
|
-
sources: [...
|
|
78
|
+
_((b) => ({
|
|
79
|
+
...b,
|
|
80
|
+
sources: [...b.sources, a]
|
|
71
81
|
}));
|
|
72
82
|
},
|
|
73
|
-
[
|
|
74
|
-
),
|
|
83
|
+
[_]
|
|
84
|
+
), z = y(
|
|
75
85
|
(i, a) => {
|
|
76
|
-
var f;
|
|
77
86
|
const d = {
|
|
78
|
-
id:
|
|
87
|
+
id: w(),
|
|
79
88
|
type: i,
|
|
80
|
-
name: ((
|
|
89
|
+
name: (() => {
|
|
90
|
+
const b = E.find((J) => J.type === i);
|
|
91
|
+
return b ? s(b.key, b.label) : i;
|
|
92
|
+
})(),
|
|
81
93
|
input: [],
|
|
82
|
-
output:
|
|
83
|
-
config:
|
|
94
|
+
output: w(),
|
|
95
|
+
config: ie(i)
|
|
84
96
|
};
|
|
85
|
-
|
|
86
|
-
...
|
|
87
|
-
transformations: [...
|
|
88
|
-
})),
|
|
97
|
+
_((b) => ({
|
|
98
|
+
...b,
|
|
99
|
+
transformations: [...b.transformations, d]
|
|
100
|
+
})), v({ type: "transformation", id: d.id });
|
|
89
101
|
},
|
|
90
|
-
[
|
|
91
|
-
), W =
|
|
102
|
+
[_, s]
|
|
103
|
+
), W = y(() => {
|
|
92
104
|
const i = {
|
|
93
|
-
id:
|
|
105
|
+
id: w(),
|
|
94
106
|
type: "database",
|
|
95
|
-
name: "New Destination",
|
|
107
|
+
name: s("etlBuilder.newDestination", "New Destination"),
|
|
96
108
|
config: {},
|
|
97
109
|
writeMode: "append"
|
|
98
110
|
};
|
|
99
|
-
|
|
111
|
+
_((a) => ({
|
|
100
112
|
...a,
|
|
101
113
|
destinations: [...a.destinations, i]
|
|
102
|
-
})),
|
|
103
|
-
}, [
|
|
114
|
+
})), v({ type: "destination", id: i.id });
|
|
115
|
+
}, [_, s]), x = y(
|
|
104
116
|
(i, a) => {
|
|
105
|
-
|
|
117
|
+
_((d) => {
|
|
106
118
|
switch (i) {
|
|
107
119
|
case "source":
|
|
108
|
-
return { ...d, sources: d.sources.filter((
|
|
120
|
+
return { ...d, sources: d.sources.filter((b) => b.id !== a) };
|
|
109
121
|
case "transformation":
|
|
110
122
|
return {
|
|
111
123
|
...d,
|
|
112
|
-
transformations: d.transformations.filter((
|
|
124
|
+
transformations: d.transformations.filter((b) => b.id !== a)
|
|
113
125
|
};
|
|
114
126
|
case "destination":
|
|
115
|
-
return { ...d, destinations: d.destinations.filter((
|
|
127
|
+
return { ...d, destinations: d.destinations.filter((b) => b.id !== a) };
|
|
116
128
|
default:
|
|
117
129
|
return d;
|
|
118
130
|
}
|
|
119
|
-
}),
|
|
131
|
+
}), v(null);
|
|
120
132
|
},
|
|
121
|
-
[
|
|
122
|
-
),
|
|
133
|
+
[_]
|
|
134
|
+
), O = y(async () => {
|
|
123
135
|
if (n) {
|
|
124
|
-
|
|
136
|
+
P(!0);
|
|
125
137
|
try {
|
|
126
|
-
const i = await n(
|
|
127
|
-
|
|
138
|
+
const i = await n(m);
|
|
139
|
+
I((a) => [i, ...a].slice(0, 50));
|
|
128
140
|
} finally {
|
|
129
|
-
|
|
141
|
+
P(!1);
|
|
130
142
|
}
|
|
131
143
|
}
|
|
132
|
-
}, [
|
|
144
|
+
}, [m, n]), H = y(
|
|
133
145
|
(i) => {
|
|
134
|
-
|
|
146
|
+
_((a) => ({ ...a, schedule: i })), h == null || h(m, i);
|
|
135
147
|
},
|
|
136
|
-
[
|
|
137
|
-
),
|
|
148
|
+
[m, _, h]
|
|
149
|
+
), j = y(
|
|
138
150
|
(i) => {
|
|
139
|
-
if (i.preventDefault(), !!
|
|
140
|
-
if (
|
|
141
|
-
const a =
|
|
142
|
-
|
|
151
|
+
if (i.preventDefault(), !!T) {
|
|
152
|
+
if (T.startsWith("transform:")) {
|
|
153
|
+
const a = T.replace("transform:", "");
|
|
154
|
+
z(a);
|
|
143
155
|
}
|
|
144
156
|
D(null);
|
|
145
157
|
}
|
|
146
158
|
},
|
|
147
|
-
[
|
|
148
|
-
),
|
|
149
|
-
if (!
|
|
159
|
+
[T, z]
|
|
160
|
+
), K = () => {
|
|
161
|
+
if (!p)
|
|
150
162
|
return null;
|
|
151
|
-
switch (
|
|
163
|
+
switch (p.type) {
|
|
152
164
|
case "source":
|
|
153
|
-
return
|
|
165
|
+
return m.sources.find((i) => i.id === p.id);
|
|
154
166
|
case "transformation":
|
|
155
|
-
return
|
|
167
|
+
return m.transformations.find((i) => i.id === p.id);
|
|
156
168
|
case "destination":
|
|
157
|
-
return
|
|
169
|
+
return m.destinations.find((i) => i.id === p.id);
|
|
158
170
|
default:
|
|
159
171
|
return null;
|
|
160
172
|
}
|
|
161
|
-
},
|
|
162
|
-
/* @__PURE__ */ e("h4", { children:
|
|
163
|
-
t.map((i) => /* @__PURE__ */ l("div", { className: "nice-etl-builder__palette-item", onClick: () =>
|
|
164
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: /* @__PURE__ */ e(
|
|
173
|
+
}, V = B === "design" ? /* @__PURE__ */ l("div", { className: "nice-etl-builder__palette", children: [
|
|
174
|
+
/* @__PURE__ */ e("h4", { children: s("etlBuilder.sources", "Sources") }),
|
|
175
|
+
t.map((i) => /* @__PURE__ */ l("div", { className: "nice-etl-builder__palette-item", onClick: () => A(i), children: [
|
|
176
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: /* @__PURE__ */ e(g, { name: "database", size: 14 }) }),
|
|
165
177
|
/* @__PURE__ */ e("span", { children: i.name })
|
|
166
178
|
] }, i.id)),
|
|
167
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ l(
|
|
168
180
|
"button",
|
|
169
181
|
{
|
|
170
|
-
onClick: () =>
|
|
171
|
-
|
|
182
|
+
onClick: () => A({
|
|
183
|
+
id: "",
|
|
184
|
+
name: s("etlBuilder.newSource", "New Source"),
|
|
185
|
+
type: "database",
|
|
186
|
+
config: {}
|
|
187
|
+
}),
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ e(g, { name: "plus", size: 14 }),
|
|
190
|
+
" ",
|
|
191
|
+
s("etlBuilder.addSource", "Add Source")
|
|
192
|
+
]
|
|
172
193
|
}
|
|
173
194
|
),
|
|
174
|
-
/* @__PURE__ */ e("h4", { children:
|
|
175
|
-
|
|
195
|
+
/* @__PURE__ */ e("h4", { children: s("etlBuilder.transformations", "Transformations") }),
|
|
196
|
+
E.map((i) => /* @__PURE__ */ l(
|
|
176
197
|
"div",
|
|
177
198
|
{
|
|
178
199
|
className: "nice-etl-builder__palette-item",
|
|
@@ -180,42 +201,46 @@ function ce({
|
|
|
180
201
|
onDragStart: () => D(`transform:${i.type}`),
|
|
181
202
|
onDragEnd: () => D(null),
|
|
182
203
|
children: [
|
|
183
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children:
|
|
184
|
-
/* @__PURE__ */ e("span", { children: i.label })
|
|
204
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: R(i.icon) }),
|
|
205
|
+
/* @__PURE__ */ e("span", { children: s(i.key, i.label) })
|
|
185
206
|
]
|
|
186
207
|
},
|
|
187
208
|
i.type
|
|
188
209
|
)),
|
|
189
|
-
/* @__PURE__ */ e("h4", { children:
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
|
|
192
|
-
|
|
210
|
+
/* @__PURE__ */ e("h4", { children: s("etlBuilder.destinations", "Destinations") }),
|
|
211
|
+
/* @__PURE__ */ l("button", { onClick: W, children: [
|
|
212
|
+
/* @__PURE__ */ e(g, { name: "plus", size: 14 }),
|
|
213
|
+
" ",
|
|
214
|
+
s("etlBuilder.addDestination", "Add Destination")
|
|
215
|
+
] })
|
|
216
|
+
] }) : void 0, Y = p && B === "design" ? /* @__PURE__ */ e(
|
|
217
|
+
le,
|
|
193
218
|
{
|
|
194
|
-
nodeType:
|
|
195
|
-
node:
|
|
219
|
+
nodeType: p.type,
|
|
220
|
+
node: K() ?? null,
|
|
196
221
|
dataSources: t,
|
|
197
222
|
onChange: (i) => {
|
|
198
|
-
|
|
199
|
-
switch (
|
|
223
|
+
_((a) => {
|
|
224
|
+
switch (p.type) {
|
|
200
225
|
case "source":
|
|
201
226
|
return {
|
|
202
227
|
...a,
|
|
203
228
|
sources: a.sources.map(
|
|
204
|
-
(d) => d.id ===
|
|
229
|
+
(d) => d.id === p.id ? { ...d, ...i } : d
|
|
205
230
|
)
|
|
206
231
|
};
|
|
207
232
|
case "transformation":
|
|
208
233
|
return {
|
|
209
234
|
...a,
|
|
210
235
|
transformations: a.transformations.map(
|
|
211
|
-
(d) => d.id ===
|
|
236
|
+
(d) => d.id === p.id ? { ...d, ...i } : d
|
|
212
237
|
)
|
|
213
238
|
};
|
|
214
239
|
case "destination":
|
|
215
240
|
return {
|
|
216
241
|
...a,
|
|
217
242
|
destinations: a.destinations.map(
|
|
218
|
-
(d) => d.id ===
|
|
243
|
+
(d) => d.id === p.id ? { ...d, ...i } : d
|
|
219
244
|
)
|
|
220
245
|
};
|
|
221
246
|
default:
|
|
@@ -223,107 +248,126 @@ function ce({
|
|
|
223
248
|
}
|
|
224
249
|
});
|
|
225
250
|
},
|
|
226
|
-
onClose: () =>
|
|
251
|
+
onClose: () => v(null)
|
|
227
252
|
}
|
|
228
253
|
) : void 0;
|
|
229
254
|
return /* @__PURE__ */ l(
|
|
230
|
-
|
|
255
|
+
q,
|
|
231
256
|
{
|
|
232
257
|
flush: !0,
|
|
233
|
-
className: `nice-etl-builder ${
|
|
258
|
+
className: `nice-etl-builder ${f}`,
|
|
234
259
|
height: "100%",
|
|
235
260
|
style: { minHeight: 600 },
|
|
236
|
-
sidebar:
|
|
237
|
-
rightSidebar:
|
|
261
|
+
sidebar: V,
|
|
262
|
+
rightSidebar: Y,
|
|
238
263
|
toolbar: /* @__PURE__ */ l("div", { className: "nice-etl-builder__toolbar", children: [
|
|
239
264
|
/* @__PURE__ */ e(
|
|
240
265
|
"input",
|
|
241
266
|
{
|
|
242
267
|
type: "text",
|
|
243
|
-
value:
|
|
244
|
-
onChange: (i) =>
|
|
268
|
+
value: m.name,
|
|
269
|
+
onChange: (i) => _((a) => ({ ...a, name: i.target.value })),
|
|
245
270
|
className: "nice-etl-builder__name-input"
|
|
246
271
|
}
|
|
247
272
|
),
|
|
248
273
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__tabs", children: ["design", "code", "schedule", "history"].map((i) => /* @__PURE__ */ e(
|
|
249
274
|
"button",
|
|
250
275
|
{
|
|
251
|
-
className: `nice-etl-builder__tab ${
|
|
252
|
-
onClick: () =>
|
|
253
|
-
children: i.charAt(0).toUpperCase() + i.slice(1)
|
|
276
|
+
className: `nice-etl-builder__tab ${B === i ? "nice-etl-builder__tab--active" : ""}`,
|
|
277
|
+
onClick: () => F(i),
|
|
278
|
+
children: s(`etlBuilder.tab.${i}`, i.charAt(0).toUpperCase() + i.slice(1))
|
|
254
279
|
},
|
|
255
280
|
i
|
|
256
281
|
)) }),
|
|
257
282
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__actions", children: [
|
|
258
|
-
/* @__PURE__ */ l(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
283
|
+
/* @__PURE__ */ l(
|
|
284
|
+
"button",
|
|
285
|
+
{
|
|
286
|
+
onClick: O,
|
|
287
|
+
disabled: S || !n,
|
|
288
|
+
title: n ? void 0 : s("etlBuilder.runNotSetUp", "Running pipelines is not set up"),
|
|
289
|
+
className: "nice-etl-builder__run-btn",
|
|
290
|
+
children: [
|
|
291
|
+
/* @__PURE__ */ e(g, { name: S ? "clock" : "play", size: 14 }),
|
|
292
|
+
" ",
|
|
293
|
+
S ? s("etlBuilder.running", "Running...") : s("etlBuilder.run", "Run")
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
),
|
|
297
|
+
/* @__PURE__ */ l(
|
|
298
|
+
"button",
|
|
299
|
+
{
|
|
300
|
+
onClick: () => r == null ? void 0 : r(m),
|
|
301
|
+
disabled: !r,
|
|
302
|
+
title: r ? void 0 : s("etlBuilder.saveNotSetUp", "Saving pipelines is not set up"),
|
|
303
|
+
className: "nice-etl-builder__save-btn",
|
|
304
|
+
children: [
|
|
305
|
+
/* @__PURE__ */ e(g, { name: "save", size: 14 }),
|
|
306
|
+
" ",
|
|
307
|
+
s("save", "Save")
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
),
|
|
311
|
+
/* @__PURE__ */ e(G, { steps: Q(c, Z) })
|
|
268
312
|
] })
|
|
269
313
|
] }),
|
|
270
314
|
children: [
|
|
271
|
-
|
|
315
|
+
B === "design" && /* @__PURE__ */ e(
|
|
272
316
|
"div",
|
|
273
317
|
{
|
|
274
|
-
ref:
|
|
318
|
+
ref: $,
|
|
275
319
|
className: "nice-etl-builder__canvas",
|
|
276
320
|
onDragOver: (i) => i.preventDefault(),
|
|
277
|
-
onDrop:
|
|
278
|
-
onClick: () =>
|
|
321
|
+
onDrop: j,
|
|
322
|
+
onClick: () => v(null),
|
|
279
323
|
children: /* @__PURE__ */ l("div", { className: "nice-etl-builder__flow", children: [
|
|
280
324
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__column", children: [
|
|
281
|
-
/* @__PURE__ */ e("h5", { children:
|
|
282
|
-
|
|
283
|
-
|
|
325
|
+
/* @__PURE__ */ e("h5", { children: s("etlBuilder.sources", "Sources") }),
|
|
326
|
+
m.sources.map((i) => /* @__PURE__ */ e(
|
|
327
|
+
L,
|
|
284
328
|
{
|
|
285
329
|
node: i,
|
|
286
330
|
nodeType: "source",
|
|
287
331
|
icon: "database",
|
|
288
|
-
isSelected: (
|
|
289
|
-
onSelect: () =>
|
|
290
|
-
onDelete: () =>
|
|
332
|
+
isSelected: (p == null ? void 0 : p.id) === i.id,
|
|
333
|
+
onSelect: () => v({ type: "source", id: i.id }),
|
|
334
|
+
onDelete: () => x("source", i.id)
|
|
291
335
|
},
|
|
292
336
|
i.id
|
|
293
337
|
))
|
|
294
338
|
] }),
|
|
295
|
-
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "
|
|
339
|
+
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", "aria-hidden": "true", children: /* @__PURE__ */ e(g, { name: "arrow-right", size: 16 }) }),
|
|
296
340
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__column nice-etl-builder__column--transforms", children: [
|
|
297
|
-
/* @__PURE__ */ e("h5", { children:
|
|
298
|
-
|
|
299
|
-
const a =
|
|
341
|
+
/* @__PURE__ */ e("h5", { children: s("etlBuilder.transformations", "Transformations") }),
|
|
342
|
+
m.transformations.map((i) => {
|
|
343
|
+
const a = E.find((d) => d.type === i.type);
|
|
300
344
|
return /* @__PURE__ */ e(
|
|
301
|
-
|
|
345
|
+
L,
|
|
302
346
|
{
|
|
303
347
|
node: i,
|
|
304
348
|
nodeType: "transformation",
|
|
305
349
|
icon: (a == null ? void 0 : a.icon) || "shuffle",
|
|
306
|
-
isSelected: (
|
|
307
|
-
onSelect: () =>
|
|
308
|
-
onDelete: () =>
|
|
350
|
+
isSelected: (p == null ? void 0 : p.id) === i.id,
|
|
351
|
+
onSelect: () => v({ type: "transformation", id: i.id }),
|
|
352
|
+
onDelete: () => x("transformation", i.id)
|
|
309
353
|
},
|
|
310
354
|
i.id
|
|
311
355
|
);
|
|
312
356
|
}),
|
|
313
|
-
|
|
357
|
+
m.transformations.length === 0 && /* @__PURE__ */ e("div", { className: "nice-etl-builder__empty-column", children: s("etlBuilder.dragTransformationsHere", "Drag transformations here") })
|
|
314
358
|
] }),
|
|
315
|
-
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "
|
|
359
|
+
/* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", "aria-hidden": "true", children: /* @__PURE__ */ e(g, { name: "arrow-right", size: 16 }) }),
|
|
316
360
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__column", children: [
|
|
317
|
-
/* @__PURE__ */ e("h5", { children:
|
|
318
|
-
|
|
319
|
-
|
|
361
|
+
/* @__PURE__ */ e("h5", { children: s("etlBuilder.destinations", "Destinations") }),
|
|
362
|
+
m.destinations.map((i) => /* @__PURE__ */ e(
|
|
363
|
+
L,
|
|
320
364
|
{
|
|
321
365
|
node: i,
|
|
322
366
|
nodeType: "destination",
|
|
323
367
|
icon: "download",
|
|
324
|
-
isSelected: (
|
|
325
|
-
onSelect: () =>
|
|
326
|
-
onDelete: () =>
|
|
368
|
+
isSelected: (p == null ? void 0 : p.id) === i.id,
|
|
369
|
+
onSelect: () => v({ type: "destination", id: i.id }),
|
|
370
|
+
onDelete: () => x("destination", i.id)
|
|
327
371
|
},
|
|
328
372
|
i.id
|
|
329
373
|
))
|
|
@@ -331,22 +375,22 @@ function ce({
|
|
|
331
375
|
] })
|
|
332
376
|
}
|
|
333
377
|
),
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
378
|
+
B === "code" && /* @__PURE__ */ e("div", { className: "nice-etl-builder__code-view", children: /* @__PURE__ */ e("pre", { children: JSON.stringify(m, null, 2) }) }),
|
|
379
|
+
B === "schedule" && /* @__PURE__ */ e(
|
|
380
|
+
te,
|
|
337
381
|
{
|
|
338
|
-
schedule:
|
|
339
|
-
monitoring:
|
|
340
|
-
onChange:
|
|
382
|
+
schedule: m.schedule,
|
|
383
|
+
monitoring: m.monitoring,
|
|
384
|
+
onChange: H
|
|
341
385
|
}
|
|
342
386
|
),
|
|
343
|
-
|
|
387
|
+
B === "history" && /* @__PURE__ */ e(ne, { runs: M })
|
|
344
388
|
]
|
|
345
389
|
}
|
|
346
390
|
);
|
|
347
391
|
}
|
|
348
|
-
function
|
|
349
|
-
switch (
|
|
392
|
+
function ie(u) {
|
|
393
|
+
switch (u) {
|
|
350
394
|
case "filter":
|
|
351
395
|
return { condition: "" };
|
|
352
396
|
case "map":
|
|
@@ -378,30 +422,30 @@ return data;` };
|
|
|
378
422
|
return {};
|
|
379
423
|
}
|
|
380
424
|
}
|
|
381
|
-
function
|
|
382
|
-
node:
|
|
425
|
+
function L({
|
|
426
|
+
node: u,
|
|
383
427
|
nodeType: t,
|
|
384
|
-
icon:
|
|
428
|
+
icon: o,
|
|
385
429
|
isSelected: n,
|
|
386
|
-
onSelect:
|
|
387
|
-
onDelete:
|
|
430
|
+
onSelect: h,
|
|
431
|
+
onDelete: r
|
|
388
432
|
}) {
|
|
389
433
|
return /* @__PURE__ */ l(
|
|
390
434
|
"div",
|
|
391
435
|
{
|
|
392
436
|
className: `nice-etl-builder__node nice-etl-builder__node--${t} ${n ? "nice-etl-builder__node--selected" : ""}`,
|
|
393
|
-
onClick: (
|
|
394
|
-
|
|
437
|
+
onClick: (f) => {
|
|
438
|
+
f.stopPropagation(), h();
|
|
395
439
|
},
|
|
396
440
|
children: [
|
|
397
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-icon", children:
|
|
398
|
-
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-name", children:
|
|
441
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-icon", children: R(o) }),
|
|
442
|
+
/* @__PURE__ */ e("span", { className: "nice-etl-builder__node-name", children: u.name }),
|
|
399
443
|
/* @__PURE__ */ e(
|
|
400
444
|
"button",
|
|
401
445
|
{
|
|
402
446
|
className: "nice-etl-builder__node-delete",
|
|
403
|
-
onClick: (
|
|
404
|
-
|
|
447
|
+
onClick: (f) => {
|
|
448
|
+
f.stopPropagation(), r();
|
|
405
449
|
},
|
|
406
450
|
children: "×"
|
|
407
451
|
}
|
|
@@ -410,48 +454,48 @@ function E({
|
|
|
410
454
|
}
|
|
411
455
|
);
|
|
412
456
|
}
|
|
413
|
-
function
|
|
414
|
-
nodeType:
|
|
457
|
+
function le({
|
|
458
|
+
nodeType: u,
|
|
415
459
|
node: t,
|
|
416
|
-
dataSources:
|
|
460
|
+
dataSources: o,
|
|
417
461
|
onChange: n,
|
|
418
|
-
onClose:
|
|
462
|
+
onClose: h
|
|
419
463
|
}) {
|
|
420
|
-
var
|
|
421
|
-
const { t:
|
|
464
|
+
var f;
|
|
465
|
+
const { t: r } = C();
|
|
422
466
|
return t ? /* @__PURE__ */ l("div", { className: "nice-etl-builder__properties", children: [
|
|
423
467
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__properties-header", children: [
|
|
424
468
|
/* @__PURE__ */ l("h4", { children: [
|
|
425
|
-
|
|
469
|
+
u.charAt(0).toUpperCase() + u.slice(1),
|
|
426
470
|
" Properties"
|
|
427
471
|
] }),
|
|
428
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
472
|
+
/* @__PURE__ */ e("button", { onClick: h, children: "×" })
|
|
429
473
|
] }),
|
|
430
474
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__properties-content", children: [
|
|
431
475
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
432
|
-
/* @__PURE__ */ e("label", { children:
|
|
476
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.name", "Name") }),
|
|
433
477
|
/* @__PURE__ */ e(
|
|
434
478
|
"input",
|
|
435
479
|
{
|
|
436
480
|
type: "text",
|
|
437
481
|
value: t.name,
|
|
438
|
-
onChange: (
|
|
482
|
+
onChange: (c) => n({ name: c.target.value })
|
|
439
483
|
}
|
|
440
484
|
)
|
|
441
485
|
] }),
|
|
442
|
-
|
|
486
|
+
u === "source" && /* @__PURE__ */ l(k, { children: [
|
|
443
487
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
444
|
-
/* @__PURE__ */ e("label", { children:
|
|
488
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.type", "Type") }),
|
|
445
489
|
/* @__PURE__ */ l(
|
|
446
490
|
"select",
|
|
447
491
|
{
|
|
448
492
|
value: t.type,
|
|
449
|
-
onChange: (
|
|
493
|
+
onChange: (c) => n({ type: c.target.value }),
|
|
450
494
|
children: [
|
|
451
|
-
/* @__PURE__ */ e("option", { value: "database", children:
|
|
495
|
+
/* @__PURE__ */ e("option", { value: "database", children: r("etlBuilder.database", "Database") }),
|
|
452
496
|
/* @__PURE__ */ e("option", { value: "api", children: "API" }),
|
|
453
|
-
/* @__PURE__ */ e("option", { value: "file", children:
|
|
454
|
-
/* @__PURE__ */ e("option", { value: "stream", children:
|
|
497
|
+
/* @__PURE__ */ e("option", { value: "file", children: r("etlBuilder.file", "File") }),
|
|
498
|
+
/* @__PURE__ */ e("option", { value: "stream", children: r("etlBuilder.stream", "Stream") })
|
|
455
499
|
]
|
|
456
500
|
}
|
|
457
501
|
)
|
|
@@ -461,37 +505,37 @@ function ee({
|
|
|
461
505
|
"input",
|
|
462
506
|
{
|
|
463
507
|
type: "checkbox",
|
|
464
|
-
checked: ((
|
|
465
|
-
onChange: (
|
|
466
|
-
var
|
|
508
|
+
checked: ((f = t.incremental) == null ? void 0 : f.enabled) || !1,
|
|
509
|
+
onChange: (c) => {
|
|
510
|
+
var s;
|
|
467
511
|
return n({
|
|
468
512
|
incremental: {
|
|
469
513
|
...t.incremental,
|
|
470
|
-
enabled:
|
|
471
|
-
column: ((
|
|
514
|
+
enabled: c.target.checked,
|
|
515
|
+
column: ((s = t.incremental) == null ? void 0 : s.column) || ""
|
|
472
516
|
}
|
|
473
517
|
});
|
|
474
518
|
}
|
|
475
519
|
}
|
|
476
520
|
),
|
|
477
|
-
|
|
521
|
+
r("etlBuilder.incrementalLoad", "Incremental Load")
|
|
478
522
|
] }) })
|
|
479
523
|
] }),
|
|
480
|
-
|
|
524
|
+
u === "transformation" && /* @__PURE__ */ l(k, { children: [
|
|
481
525
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
482
|
-
/* @__PURE__ */ e("label", { children:
|
|
526
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.type", "Type") }),
|
|
483
527
|
/* @__PURE__ */ e("span", { children: t.type })
|
|
484
528
|
] }),
|
|
485
529
|
t.type === "filter" && /* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
486
|
-
/* @__PURE__ */ e("label", { children:
|
|
530
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.condition", "Condition") }),
|
|
487
531
|
/* @__PURE__ */ e(
|
|
488
532
|
"textarea",
|
|
489
533
|
{
|
|
490
534
|
value: String(t.config.condition || ""),
|
|
491
|
-
onChange: (
|
|
492
|
-
config: { ...t.config, condition:
|
|
535
|
+
onChange: (c) => n({
|
|
536
|
+
config: { ...t.config, condition: c.target.value }
|
|
493
537
|
}),
|
|
494
|
-
placeholder:
|
|
538
|
+
placeholder: r(
|
|
495
539
|
"etlBuilder.conditionPlaceholder",
|
|
496
540
|
"e.g., age > 18 AND status = 'active'"
|
|
497
541
|
),
|
|
@@ -499,46 +543,46 @@ function ee({
|
|
|
499
543
|
}
|
|
500
544
|
)
|
|
501
545
|
] }),
|
|
502
|
-
t.type === "derive" && /* @__PURE__ */ l(
|
|
546
|
+
t.type === "derive" && /* @__PURE__ */ l(k, { children: [
|
|
503
547
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
504
|
-
/* @__PURE__ */ e("label", { children:
|
|
548
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.columnName", "Column Name") }),
|
|
505
549
|
/* @__PURE__ */ e(
|
|
506
550
|
"input",
|
|
507
551
|
{
|
|
508
552
|
type: "text",
|
|
509
553
|
value: String(t.config.name || ""),
|
|
510
|
-
onChange: (
|
|
511
|
-
config: { ...t.config, name:
|
|
554
|
+
onChange: (c) => n({
|
|
555
|
+
config: { ...t.config, name: c.target.value }
|
|
512
556
|
})
|
|
513
557
|
}
|
|
514
558
|
)
|
|
515
559
|
] }),
|
|
516
560
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
517
|
-
/* @__PURE__ */ e("label", { children:
|
|
561
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.expression", "Expression") }),
|
|
518
562
|
/* @__PURE__ */ e(
|
|
519
563
|
"input",
|
|
520
564
|
{
|
|
521
565
|
type: "text",
|
|
522
566
|
value: String(t.config.expression || ""),
|
|
523
|
-
onChange: (
|
|
567
|
+
onChange: (c) => n({
|
|
524
568
|
config: {
|
|
525
569
|
...t.config,
|
|
526
|
-
expression:
|
|
570
|
+
expression: c.target.value
|
|
527
571
|
}
|
|
528
572
|
}),
|
|
529
|
-
placeholder:
|
|
573
|
+
placeholder: r("etlBuilder.expressionPlaceholder", "e.g., price * quantity")
|
|
530
574
|
}
|
|
531
575
|
)
|
|
532
576
|
] })
|
|
533
577
|
] }),
|
|
534
578
|
t.type === "custom" && /* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
535
|
-
/* @__PURE__ */ e("label", { children:
|
|
579
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.code", "Code") }),
|
|
536
580
|
/* @__PURE__ */ e(
|
|
537
581
|
"textarea",
|
|
538
582
|
{
|
|
539
583
|
value: String(t.config.code || ""),
|
|
540
|
-
onChange: (
|
|
541
|
-
config: { ...t.config, code:
|
|
584
|
+
onChange: (c) => n({
|
|
585
|
+
config: { ...t.config, code: c.target.value }
|
|
542
586
|
}),
|
|
543
587
|
rows: 10,
|
|
544
588
|
className: "nice-etl-builder__code-input"
|
|
@@ -546,49 +590,49 @@ function ee({
|
|
|
546
590
|
)
|
|
547
591
|
] })
|
|
548
592
|
] }),
|
|
549
|
-
|
|
593
|
+
u === "destination" && /* @__PURE__ */ l(k, { children: [
|
|
550
594
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
551
|
-
/* @__PURE__ */ e("label", { children:
|
|
595
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.type", "Type") }),
|
|
552
596
|
/* @__PURE__ */ l(
|
|
553
597
|
"select",
|
|
554
598
|
{
|
|
555
599
|
value: t.type,
|
|
556
|
-
onChange: (
|
|
600
|
+
onChange: (c) => n({ type: c.target.value }),
|
|
557
601
|
children: [
|
|
558
|
-
/* @__PURE__ */ e("option", { value: "database", children:
|
|
559
|
-
/* @__PURE__ */ e("option", { value: "file", children:
|
|
602
|
+
/* @__PURE__ */ e("option", { value: "database", children: r("etlBuilder.database", "Database") }),
|
|
603
|
+
/* @__PURE__ */ e("option", { value: "file", children: r("etlBuilder.file", "File") }),
|
|
560
604
|
/* @__PURE__ */ e("option", { value: "api", children: "API" }),
|
|
561
|
-
/* @__PURE__ */ e("option", { value: "warehouse", children:
|
|
605
|
+
/* @__PURE__ */ e("option", { value: "warehouse", children: r("etlBuilder.dataWarehouse", "Data Warehouse") })
|
|
562
606
|
]
|
|
563
607
|
}
|
|
564
608
|
)
|
|
565
609
|
] }),
|
|
566
610
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
567
|
-
/* @__PURE__ */ e("label", { children:
|
|
611
|
+
/* @__PURE__ */ e("label", { children: r("etlBuilder.writeMode", "Write Mode") }),
|
|
568
612
|
/* @__PURE__ */ l(
|
|
569
613
|
"select",
|
|
570
614
|
{
|
|
571
615
|
value: t.writeMode,
|
|
572
|
-
onChange: (
|
|
616
|
+
onChange: (c) => n({ writeMode: c.target.value }),
|
|
573
617
|
children: [
|
|
574
|
-
/* @__PURE__ */ e("option", { value: "append", children:
|
|
575
|
-
/* @__PURE__ */ e("option", { value: "overwrite", children:
|
|
576
|
-
/* @__PURE__ */ e("option", { value: "upsert", children:
|
|
577
|
-
/* @__PURE__ */ e("option", { value: "merge", children:
|
|
618
|
+
/* @__PURE__ */ e("option", { value: "append", children: r("etlBuilder.append", "Append") }),
|
|
619
|
+
/* @__PURE__ */ e("option", { value: "overwrite", children: r("etlBuilder.overwrite", "Overwrite") }),
|
|
620
|
+
/* @__PURE__ */ e("option", { value: "upsert", children: r("etlBuilder.upsert", "Upsert") }),
|
|
621
|
+
/* @__PURE__ */ e("option", { value: "merge", children: r("etlBuilder.merge", "Merge") })
|
|
578
622
|
]
|
|
579
623
|
}
|
|
580
624
|
)
|
|
581
625
|
] })
|
|
582
626
|
] })
|
|
583
627
|
] })
|
|
584
|
-
] }) : /* @__PURE__ */ e(
|
|
628
|
+
] }) : /* @__PURE__ */ e(k, {});
|
|
585
629
|
}
|
|
586
|
-
function
|
|
587
|
-
schedule:
|
|
630
|
+
function te({
|
|
631
|
+
schedule: u,
|
|
588
632
|
monitoring: t,
|
|
589
|
-
onChange:
|
|
633
|
+
onChange: o
|
|
590
634
|
}) {
|
|
591
|
-
const { t: n } = C(), [
|
|
635
|
+
const { t: n } = C(), [h, r] = N(u || { enabled: !1 });
|
|
592
636
|
return /* @__PURE__ */ l("div", { className: "nice-etl-builder__schedule-editor", children: [
|
|
593
637
|
/* @__PURE__ */ e("h4", { children: n("etlBuilder.scheduleConfiguration", "Schedule Configuration") }),
|
|
594
638
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ l("label", { children: [
|
|
@@ -596,41 +640,41 @@ function ie({
|
|
|
596
640
|
"input",
|
|
597
641
|
{
|
|
598
642
|
type: "checkbox",
|
|
599
|
-
checked:
|
|
600
|
-
onChange: (
|
|
601
|
-
const
|
|
602
|
-
c
|
|
643
|
+
checked: h.enabled,
|
|
644
|
+
onChange: (f) => {
|
|
645
|
+
const c = { ...h, enabled: f.target.checked };
|
|
646
|
+
r(c), o(c);
|
|
603
647
|
}
|
|
604
648
|
}
|
|
605
649
|
),
|
|
606
650
|
n("etlBuilder.enableScheduledExecution", "Enable scheduled execution")
|
|
607
651
|
] }) }),
|
|
608
|
-
|
|
652
|
+
h.enabled && /* @__PURE__ */ l(k, { children: [
|
|
609
653
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
610
654
|
/* @__PURE__ */ e("label", { children: n("etlBuilder.cronExpression", "Cron Expression") }),
|
|
611
655
|
/* @__PURE__ */ e(
|
|
612
656
|
"input",
|
|
613
657
|
{
|
|
614
658
|
type: "text",
|
|
615
|
-
value:
|
|
616
|
-
onChange: (
|
|
617
|
-
const
|
|
618
|
-
c
|
|
659
|
+
value: h.cron || "",
|
|
660
|
+
onChange: (f) => {
|
|
661
|
+
const c = { ...h, cron: f.target.value };
|
|
662
|
+
r(c);
|
|
619
663
|
},
|
|
620
|
-
placeholder: n("etlBuilder.cronPlaceholder", "0
|
|
664
|
+
placeholder: n("etlBuilder.cronPlaceholder", "0 * * * * (every hour)")
|
|
621
665
|
}
|
|
622
666
|
),
|
|
623
|
-
/* @__PURE__ */ e("small", { children: "Format: minute hour day month weekday" })
|
|
667
|
+
/* @__PURE__ */ e("small", { children: n("etlBuilder.cronFormat", "Format: minute hour day month weekday") })
|
|
624
668
|
] }),
|
|
625
669
|
/* @__PURE__ */ l("div", { className: "nice-etl-builder__field", children: [
|
|
626
670
|
/* @__PURE__ */ e("label", { children: n("etlBuilder.timezone", "Timezone") }),
|
|
627
671
|
/* @__PURE__ */ l(
|
|
628
672
|
"select",
|
|
629
673
|
{
|
|
630
|
-
value:
|
|
631
|
-
onChange: (
|
|
632
|
-
const
|
|
633
|
-
c
|
|
674
|
+
value: h.timezone || "UTC",
|
|
675
|
+
onChange: (f) => {
|
|
676
|
+
const c = { ...h, timezone: f.target.value };
|
|
677
|
+
r(c);
|
|
634
678
|
},
|
|
635
679
|
children: [
|
|
636
680
|
/* @__PURE__ */ e("option", { value: "UTC", children: "UTC" }),
|
|
@@ -643,7 +687,7 @@ function ie({
|
|
|
643
687
|
}
|
|
644
688
|
)
|
|
645
689
|
] }),
|
|
646
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
690
|
+
/* @__PURE__ */ e("button", { onClick: () => o(h), children: n("etlBuilder.saveSchedule", "Save Schedule") })
|
|
647
691
|
] }),
|
|
648
692
|
/* @__PURE__ */ e("h4", { children: n("etlBuilder.monitoring", "Monitoring") }),
|
|
649
693
|
/* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ l("label", { children: [
|
|
@@ -661,11 +705,11 @@ function ie({
|
|
|
661
705
|
] })
|
|
662
706
|
] });
|
|
663
707
|
}
|
|
664
|
-
function
|
|
708
|
+
function ne({ runs: u }) {
|
|
665
709
|
const { t } = C();
|
|
666
710
|
return /* @__PURE__ */ l("div", { className: "nice-etl-builder__history-view", children: [
|
|
667
711
|
/* @__PURE__ */ e("h4", { children: t("etlBuilder.runHistory", "Run History") }),
|
|
668
|
-
|
|
712
|
+
u.length === 0 ? /* @__PURE__ */ e("div", { className: "nice-etl-builder__no-history", children: t("etlBuilder.noRunsYet", "No runs yet") }) : /* @__PURE__ */ l("table", { className: "nice-etl-builder__history-table", children: [
|
|
669
713
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ l("tr", { children: [
|
|
670
714
|
/* @__PURE__ */ e("th", { children: t("etlBuilder.status", "Status") }),
|
|
671
715
|
/* @__PURE__ */ e("th", { children: t("etlBuilder.startTime", "Start Time") }),
|
|
@@ -673,42 +717,42 @@ function le({ runs: o }) {
|
|
|
673
717
|
/* @__PURE__ */ e("th", { children: t("etlBuilder.rows", "Rows") }),
|
|
674
718
|
/* @__PURE__ */ e("th", { children: t("etlBuilder.errors", "Errors") })
|
|
675
719
|
] }) }),
|
|
676
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
720
|
+
/* @__PURE__ */ e("tbody", { children: u.map((o) => /* @__PURE__ */ l(
|
|
677
721
|
"tr",
|
|
678
722
|
{
|
|
679
|
-
className: `nice-etl-builder__run nice-etl-builder__run--${
|
|
723
|
+
className: `nice-etl-builder__run nice-etl-builder__run--${o.status}`,
|
|
680
724
|
children: [
|
|
681
725
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ l(
|
|
682
726
|
"span",
|
|
683
727
|
{
|
|
684
|
-
className: `nice-etl-builder__status nice-etl-builder__status--${
|
|
728
|
+
className: `nice-etl-builder__status nice-etl-builder__status--${o.status}`,
|
|
685
729
|
children: [
|
|
686
730
|
/* @__PURE__ */ e(
|
|
687
|
-
|
|
731
|
+
g,
|
|
688
732
|
{
|
|
689
|
-
name:
|
|
733
|
+
name: o.status === "success" ? "check" : o.status === "failed" ? "close" : "clock",
|
|
690
734
|
size: 12
|
|
691
735
|
}
|
|
692
736
|
),
|
|
693
|
-
|
|
737
|
+
o.status
|
|
694
738
|
]
|
|
695
739
|
}
|
|
696
740
|
) }),
|
|
697
|
-
/* @__PURE__ */ e("td", { children:
|
|
698
|
-
/* @__PURE__ */ e("td", { children:
|
|
741
|
+
/* @__PURE__ */ e("td", { children: o.startTime.toLocaleString() }),
|
|
742
|
+
/* @__PURE__ */ e("td", { children: o.endTime ? `${Math.round((o.endTime.getTime() - o.startTime.getTime()) / 1e3)}s` : "-" }),
|
|
699
743
|
/* @__PURE__ */ l("td", { children: [
|
|
700
|
-
|
|
744
|
+
o.rowsProcessed.toLocaleString(),
|
|
701
745
|
" / ",
|
|
702
|
-
|
|
746
|
+
o.rowsWritten.toLocaleString()
|
|
703
747
|
] }),
|
|
704
|
-
/* @__PURE__ */ e("td", { children:
|
|
748
|
+
/* @__PURE__ */ e("td", { children: o.errors.length })
|
|
705
749
|
]
|
|
706
750
|
},
|
|
707
|
-
|
|
751
|
+
o.id
|
|
708
752
|
)) })
|
|
709
753
|
] })
|
|
710
754
|
] });
|
|
711
755
|
}
|
|
712
756
|
export {
|
|
713
|
-
|
|
757
|
+
se as NiceETLBuilder
|
|
714
758
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -417,14 +417,12 @@ export interface NiceETLBuilderProps {
|
|
|
417
417
|
pipeline?: ETLPipeline;
|
|
418
418
|
dataSources?: DataSource[];
|
|
419
419
|
onChange?: (pipeline: ETLPipeline) => void;
|
|
420
|
+
/** Runs the pipeline. Without it the Run button is disabled and says why. */
|
|
420
421
|
onRun?: (pipeline: ETLPipeline) => Promise<ETLRun>;
|
|
421
422
|
onSchedule?: (pipeline: ETLPipeline, schedule: ETLSchedule) => void;
|
|
423
|
+
/** Saves the pipeline (the Save button). Without it the button is disabled and says why. */
|
|
424
|
+
onSave?: (pipeline: ETLPipeline) => void;
|
|
422
425
|
className?: string;
|
|
423
426
|
/** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
|
|
424
427
|
tutorial?: NiceComponentTutorial;
|
|
425
428
|
}
|
|
426
|
-
export interface NiceCubeBrowserProps {
|
|
427
|
-
cube?: Cube;
|
|
428
|
-
onQuery?: (dimensions: string[], measures: string[], filters: ReportFilter[]) => Promise<unknown[]>;
|
|
429
|
-
className?: string;
|
|
430
|
-
}
|
package/dist/ui-bi.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.nice-etl-builder{font-family:system-ui,-apple-system,sans-serif;background:var(--nice-bg, #fff)}.nice-etl-builder__toolbar{display:flex;align-items:center;gap:1rem;padding:.5rem 1rem;border-bottom:1px solid var(--nice-border, #ddd);background:var(--nice-bg-secondary, #f8f9fa)}.nice-etl-builder__name-input{padding:.375rem .75rem;border:1px solid var(--nice-border, #ddd);border-radius:var(--nice-radius-sm, 4px);font-size:.9375rem;font-weight:500}.nice-etl-builder__tabs{display:flex;gap:.25rem;flex:1}.nice-etl-builder__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font-size:.875rem;border-radius:var(--nice-radius-sm, 4px)}.nice-etl-builder__tab:hover{background:var(--nice-hover-bg, #e9ecef)}.nice-etl-builder__tab--active{background:var(--nice-primary, #0066cc);color
|
|
1
|
+
.nice-etl-builder{font-family:system-ui,-apple-system,sans-serif;background:var(--nice-bg, #fff)}.nice-etl-builder__toolbar{display:flex;align-items:center;gap:1rem;padding:.5rem 1rem;border-bottom:1px solid var(--nice-border, #ddd);background:var(--nice-bg-secondary, #f8f9fa)}.nice-etl-builder__name-input{padding:.375rem .75rem;border:1px solid var(--nice-border, #ddd);border-radius:var(--nice-radius-sm, 4px);font-size:.9375rem;font-weight:500}.nice-etl-builder__tabs{display:flex;gap:.25rem;flex:1}.nice-etl-builder__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font-size:.875rem;border-radius:var(--nice-radius-sm, 4px)}.nice-etl-builder__tab:hover{background:var(--nice-hover-bg, #e9ecef)}.nice-etl-builder__tab--active{background:var(--nice-primary, #0066cc);color:var(--nice-text-on-primary)}.nice-etl-builder__actions{display:flex;gap:.5rem}.nice-etl-builder__run-btn{padding:.5rem 1rem;background:var(--nice-success, #28a745);color:var(--nice-text-on-success);border:none;border-radius:var(--nice-radius-sm, 4px);cursor:pointer;font-weight:500}.nice-etl-builder__run-btn:disabled{background:var(--nice-bg-tertiary, #6c757d);cursor:not-allowed}.nice-etl-builder__save-btn{padding:.5rem 1rem;background:var(--nice-primary, #0066cc);color:var(--nice-text-on-primary);border:none;border-radius:var(--nice-radius-sm, 4px);cursor:pointer}.nice-etl-builder__palette{width:200px;border-right:1px solid var(--nice-border, #ddd);padding:.5rem;overflow-y:auto;background:var(--nice-bg-secondary, #f8f9fa)}.nice-etl-builder__palette h4{margin:.5rem 0;font-size:.75rem;color:var(--nice-text-muted, #6c757d);text-transform:uppercase}.nice-etl-builder__palette-item{display:flex;align-items:center;gap:.5rem;padding:.5rem;border-radius:var(--nice-radius-sm, 4px);cursor:grab;font-size:.875rem}.nice-etl-builder__palette-item:hover{background:var(--nice-hover-bg, #e9ecef)}.nice-etl-builder__palette-icon{font-size:1rem}.nice-etl-builder__palette button{width:100%;padding:.5rem;border:1px dashed var(--nice-border, #ddd);background:transparent;border-radius:var(--nice-radius-sm, 4px);cursor:pointer;font-size:.875rem;margin-top:.5rem}.nice-etl-builder__canvas{flex:1;height:100%;overflow:auto;padding:1rem}.nice-etl-builder__flow{display:flex;gap:1rem;align-items:flex-start;min-height:100%}.nice-etl-builder__column{min-width:200px;max-width:300px}.nice-etl-builder__column h5{margin:0 0 .5rem;font-size:.75rem;color:var(--nice-text-muted, #6c757d);text-transform:uppercase}.nice-etl-builder__column--transforms{flex:1;min-width:300px}.nice-etl-builder__arrow{display:flex;align-items:center;font-size:1.5rem;color:var(--nice-text-muted, #6c757d);padding-top:2rem}.nice-etl-builder__empty-column{padding:2rem 1rem;border:2px dashed var(--nice-border, #ddd);border-radius:var(--nice-radius-lg, 8px);text-align:center;color:var(--nice-text-muted, #6c757d)}.nice-etl-builder__node{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;background:#fff;border:1px solid var(--nice-border, #ddd);border-radius:var(--nice-radius-lg, 8px);margin-bottom:.5rem;cursor:pointer;box-shadow:0 1px 3px var(--nice-overlay-5, rgba(0, 0, 0, .05))}.nice-etl-builder__node:hover{border-color:var(--nice-primary, #0066cc)}.nice-etl-builder__node--selected{border-color:var(--nice-primary, #0066cc);box-shadow:0 0 0 2px var(--nice-primary-tint-20, rgba(0, 102, 204, .2))}.nice-etl-builder__node-icon{font-size:1.125rem}.nice-etl-builder__node-name{flex:1;font-size:.875rem;font-weight:500}.nice-etl-builder__node-delete{padding:0;width:20px;height:20px;border:none;background:transparent;cursor:pointer;opacity:0;transition:opacity .2s}.nice-etl-builder__node:hover .nice-etl-builder__node-delete{opacity:.5}.nice-etl-builder__node-delete:hover{opacity:1;color:var(--nice-danger, #dc3545)}.nice-etl-builder__properties{width:300px;border-left:1px solid var(--nice-border, #ddd);display:flex;flex-direction:column;background:#fff}.nice-etl-builder__properties-header{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;border-bottom:1px solid var(--nice-border, #ddd);background:var(--nice-bg-secondary, #f8f9fa)}.nice-etl-builder__properties-header h4{margin:0;font-size:.875rem}.nice-etl-builder__properties-content{flex:1;overflow-y:auto;padding:1rem}.nice-etl-builder__field{margin-bottom:1rem}.nice-etl-builder__field label{display:block;margin-bottom:.25rem;font-size:.8125rem;font-weight:500}.nice-etl-builder__field input,.nice-etl-builder__field select,.nice-etl-builder__field textarea{width:100%;padding:.375rem .5rem;border:1px solid var(--nice-border, #ddd);border-radius:var(--nice-radius-sm, 4px);font-size:.875rem}.nice-etl-builder__code-input{font-family:Fira Code,monospace;font-size:.8125rem}.nice-etl-builder__code-view,.nice-etl-builder__schedule-editor,.nice-etl-builder__history-view{flex:1;padding:1rem;overflow:auto}.nice-etl-builder__code-view pre{margin:0;font-family:Fira Code,monospace;font-size:.8125rem}.nice-etl-builder__schedule-editor h4{margin:0 0 1rem}.nice-etl-builder__schedule-editor small{display:block;color:var(--nice-text-muted, #6c757d);font-size:.75rem;margin-top:.25rem}.nice-etl-builder__history-table{width:100%;border-collapse:collapse}.nice-etl-builder__history-table th,.nice-etl-builder__history-table td{padding:.75rem;text-align:left;border-bottom:1px solid var(--nice-border, #ddd)}.nice-etl-builder__history-table th{background:var(--nice-bg-secondary, #f8f9fa);font-weight:500;font-size:.8125rem}.nice-etl-builder__status{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .5rem;border-radius:var(--nice-radius-sm, 4px);font-size:.8125rem}.nice-etl-builder__status--success{background:var(--nice-success-bg, #d4edda);color:var(--nice-success-dark, #155724)}.nice-etl-builder__status--failed{background:var(--nice-danger-bg, #f8d7da);color:var(--nice-danger-dark, #721c24)}.nice-etl-builder__status--running{background:var(--nice-warning-bg, #fff3cd);color:var(--nice-warning-dark, #856404)}.nice-etl-builder__no-history{text-align:center;color:var(--nice-text-muted, #6c757d);padding:2rem}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/ui-bi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Nice2Dev Business Intelligence — Report builder, dashboard studio, ETL pipeline builder",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"react-dom": ">=17.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@nice2dev/ui": "^1.
|
|
43
|
-
"@nice2dev/ui-core": "^1.
|
|
42
|
+
"@nice2dev/ui": "^1.2.0",
|
|
43
|
+
"@nice2dev/ui-core": "^1.2.0",
|
|
44
44
|
"@testing-library/jest-dom": "^7.0.1",
|
|
45
45
|
"@testing-library/react": "^16.3.3",
|
|
46
46
|
"@types/react": "^19.2.18",
|