@dxs-ts/eveli-ide 0.0.3 → 0.0.4

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/build/index.d.ts CHANGED
@@ -438,6 +438,31 @@ declare namespace Burger {
438
438
  }
439
439
 
440
440
 
441
+ declare namespace HdesClient {
442
+ const StoreErrorImpl: typeof StoreErrorImplAs;
443
+ const StoreImpl: typeof DefaultStore;
444
+ class ServiceImpl implements HdesClient.Service {
445
+ private _store;
446
+ private _branch;
447
+ private _headers;
448
+ constructor(store: HdesClient.Store, branchName?: string);
449
+ withBranch(branchName?: string): HdesClient.ServiceImpl;
450
+ get branch(): string | undefined;
451
+ create(): HdesClient.CreateBuilder;
452
+ delete(): HdesClient.DeleteBuilder;
453
+ update(id: string, body: HdesClient.AstCommand[]): Promise<HdesClient.Site>;
454
+ createAsset(name: string, desc: string | undefined, type: HdesClient.AstBodyType | "SITE", body?: HdesClient.AstCommand[]): Promise<HdesClient.Site>;
455
+ ast(id: string, body: HdesClient.AstCommand[]): Promise<HdesClient.Entity<any>>;
456
+ getSite(): Promise<HdesClient.Site>;
457
+ debug(debug: HdesClient.DebugRequest): Promise<HdesClient.DebugResponse>;
458
+ copy(id: string, name: string): Promise<HdesClient.Site>;
459
+ version(): Promise<HdesClient.VersionEntity>;
460
+ diff(input: HdesClient.DiffRequest): Promise<HdesClient.DiffResponse>;
461
+ summary(tagId: string): Promise<HdesClient.AstTagSummary>;
462
+ }
463
+ }
464
+
465
+
441
466
  declare module 'react' {
442
467
  interface CSSProperties {
443
468
  '--tree-view-text-color'?: string;
@@ -490,57 +515,9 @@ declare module '@mui/material/styles' {
490
515
  }
491
516
 
492
517
 
493
- declare namespace HdesClient {
494
- const StoreErrorImpl: typeof StoreErrorImplAs;
495
- const StoreImpl: typeof DefaultStore;
496
- class ServiceImpl implements HdesClient.Service {
497
- private _store;
498
- private _branch;
499
- private _headers;
500
- constructor(store: HdesClient.Store, branchName?: string);
501
- withBranch(branchName?: string): HdesClient.ServiceImpl;
502
- get branch(): string | undefined;
503
- create(): HdesClient.CreateBuilder;
504
- delete(): HdesClient.DeleteBuilder;
505
- update(id: string, body: HdesClient.AstCommand[]): Promise<HdesClient.Site>;
506
- createAsset(name: string, desc: string | undefined, type: HdesClient.AstBodyType | "SITE", body?: HdesClient.AstCommand[]): Promise<HdesClient.Site>;
507
- ast(id: string, body: HdesClient.AstCommand[]): Promise<HdesClient.Entity<any>>;
508
- getSite(): Promise<HdesClient.Site>;
509
- debug(debug: HdesClient.DebugRequest): Promise<HdesClient.DebugResponse>;
510
- copy(id: string, name: string): Promise<HdesClient.Site>;
511
- version(): Promise<HdesClient.VersionEntity>;
512
- diff(input: HdesClient.DiffRequest): Promise<HdesClient.DiffResponse>;
513
- summary(tagId: string): Promise<HdesClient.AstTagSummary>;
514
- }
515
- }
516
-
517
-
518
518
  declare namespace Composer {
519
- interface SearchData {
520
- values: readonly SearchDataEntry[];
521
- filterLinks(keyword: string): readonly SearchResult[];
522
- filterWorkflows(keyword: string): readonly SearchResult[];
523
- filterArticles(keyword: string): readonly SearchResult[];
524
- }
525
- interface SearchDataEntry {
526
- id: string;
527
- type: "ARTICLE" | "LINK" | "WORKFLOW";
528
- values: readonly SearchableValue[];
529
- }
530
- interface SearchResult {
531
- source: SearchDataEntry;
532
- matches: SearchableValue[];
533
- }
534
- interface SearchableValue {
535
- id: string;
536
- value: string;
537
- type: "ARTICLE_NAME" | "ARTICLE_PAGE" | "WORKFLOW_NAME" | "WORKFLOW_LABEL" | "LINK_VALUE" | "LINK_LABEL";
538
- }
539
- type NavType = "ARTICLE_LINKS" | "ARTICLE_WORKFLOWS" | "ARTICLE_PAGES";
540
519
  interface Nav {
541
- type: NavType;
542
520
  value?: string | null;
543
- value2?: string | null;
544
521
  }
545
522
  interface TabData {
546
523
  nav?: Nav;
@@ -548,87 +525,53 @@ declare namespace Composer {
548
525
  }
549
526
  interface Tab extends Burger.TabSession<TabData> {
550
527
  }
528
+ interface DebugSession {
529
+ error?: HdesClient.StoreError;
530
+ debug?: HdesClient.DebugResponse;
531
+ csv?: string;
532
+ json?: string;
533
+ selected: HdesClient.EntityId;
534
+ inputType: DebugInputType;
535
+ }
536
+ type DebugInputType = "CSV" | "JSON";
537
+ interface DebugSessions {
538
+ selected?: HdesClient.EntityId;
539
+ values: Record<HdesClient.EntityId, DebugSession>;
540
+ }
551
541
  interface PageUpdate {
552
542
  saved: boolean;
553
- origin: StencilClient.Page;
554
- value: StencilClient.LocalisedContent;
555
- withValue(value: StencilClient.LocalisedContent): PageUpdate;
556
- }
557
- interface SessionFilter {
558
- locale?: StencilClient.LocaleId;
559
- withLocale(locale?: StencilClient.LocaleId): SessionFilter;
543
+ origin: HdesClient.Entity<any>;
544
+ value: HdesClient.AstCommand[];
545
+ withValue(value: HdesClient.AstCommand[]): PageUpdate;
560
546
  }
561
547
  interface Session {
562
- site: StencilClient.Site;
563
- pages: Record<StencilClient.PageId, PageUpdate>;
564
- articles: ArticleView[];
565
- workflows: WorkflowView[];
566
- links: LinkView[];
567
- search: SearchData;
568
- filter: SessionFilter;
569
- getArticleName(articleId: StencilClient.ArticleId): {
570
- missing: boolean;
571
- name: string;
572
- };
573
- getArticleView(articleId: StencilClient.ArticleId): ArticleView;
574
- getLinkView(linkId: StencilClient.LinkId): LinkView;
575
- getLinkName(linkId: StencilClient.LinkId): {
576
- missing: boolean;
577
- name: string;
578
- };
579
- getWorkflowView(workflowId: StencilClient.WorkflowId): WorkflowView;
580
- getWorkflowName(workflowId: StencilClient.WorkflowId): {
581
- missing: boolean;
582
- name: string;
583
- };
584
- getArticlesForLocale(locale: StencilClient.LocaleId): StencilClient.Article[];
585
- getArticlesForLocales(locales: StencilClient.LocaleId[]): StencilClient.Article[];
586
- withPage(page: StencilClient.PageId): Session;
587
- withPageValue(page: StencilClient.PageId, value: StencilClient.LocalisedContent): Session;
588
- withoutPages(pages: StencilClient.PageId[]): Session;
589
- withLocaleFilter(locale?: StencilClient.LocaleId): Session;
590
- withSite(site: StencilClient.Site): Session;
548
+ site: HdesClient.Site;
549
+ pages: Record<HdesClient.EntityId, PageUpdate>;
550
+ debug: DebugSessions;
551
+ branchName?: string;
552
+ getDecision(decisionName: string): undefined | HdesClient.Entity<HdesClient.AstDecision>;
553
+ getFlow(flowName: string): undefined | HdesClient.Entity<HdesClient.AstFlow>;
554
+ getService(serviceName: string): undefined | HdesClient.Entity<HdesClient.AstService>;
555
+ getEntity(id: HdesClient.EntityId): undefined | HdesClient.Entity<any>;
556
+ withDebug(page: DebugSession): Session;
557
+ withPage(page: HdesClient.EntityId): Session;
558
+ withPageValue(page: HdesClient.EntityId, value: HdesClient.AstCommand[]): Session;
559
+ withoutPages(pages: HdesClient.EntityId[]): Session;
560
+ withBranch(branchName?: string): Session;
561
+ withSite(site: HdesClient.Site): Session;
591
562
  }
592
563
  interface Actions {
593
564
  handleLoad(): Promise<void>;
594
- handleLoadSite(): Promise<void>;
595
- handlePageUpdate(page: StencilClient.PageId, value: StencilClient.LocalisedContent): void;
596
- handlePageUpdateRemove(pages: StencilClient.PageId[]): void;
597
- handleLocaleFilter(locale?: StencilClient.LocaleId): void;
565
+ handleLoadSite(site?: HdesClient.Site): Promise<void>;
566
+ handleDebugUpdate(debug: DebugSession): void;
567
+ handlePageUpdate(page: HdesClient.EntityId, value: HdesClient.AstCommand[]): void;
568
+ handlePageUpdateRemove(pages: HdesClient.EntityId[]): void;
569
+ handleBranchUpdate(branchName?: string): void;
598
570
  }
599
571
  interface ContextType {
600
572
  session: Session;
601
573
  actions: Actions;
602
- service: StencilClient.Service;
603
- }
604
- interface ArticleView {
605
- article: StencilClient.Article;
606
- pages: PageView[];
607
- canCreate: StencilClient.SiteLocale[];
608
- links: LinkView[];
609
- workflows: WorkflowView[];
610
- children: Composer.ArticleView[];
611
- displayOrder: number;
612
- getPageById(pageId: StencilClient.PageId): PageView;
613
- getPageByLocaleId(localeId: StencilClient.LocaleId): PageView;
614
- findPageByLocaleId(localeId: StencilClient.LocaleId): PageView | undefined;
615
- }
616
- interface PageView {
617
- title: string;
618
- page: StencilClient.Page;
619
- locale: StencilClient.SiteLocale;
620
- }
621
- interface LinkView {
622
- link: StencilClient.Link;
623
- labels: LabelView[];
624
- }
625
- interface WorkflowView {
626
- workflow: StencilClient.Workflow;
627
- labels: LabelView[];
628
- }
629
- interface LabelView {
630
- label: StencilClient.LocaleLabel;
631
- locale: StencilClient.SiteLocale;
574
+ service: HdesClient.Service;
632
575
  }
633
576
  }
634
577
 
@@ -636,31 +579,32 @@ declare namespace Composer {
636
579
  declare namespace Composer {
637
580
  const createTab: (props: {
638
581
  nav: Composer.Nav;
639
- page?: StencilClient.Page;
582
+ page?: HdesClient.Entity<any>;
640
583
  }) => ImmutableTabData;
641
584
  const ComposerContext: React.Context<ContextType>;
642
- const useUnsaved: (article: StencilClient.Article) => boolean;
585
+ const useUnsaved: (entity: HdesClient.Entity<any>) => boolean;
643
586
  const useComposer: () => {
644
587
  session: Session;
645
- service: StencilClient.Service;
588
+ service: HdesClient.Service;
646
589
  actions: Actions;
647
- site: StencilClient.Site;
648
- isArticleSaved: (article: StencilClient.Article) => boolean;
590
+ site: HdesClient.Site;
591
+ isArticleSaved: (entity: HdesClient.Entity<any>) => boolean;
649
592
  };
650
- const useSite: () => StencilClient.Site;
593
+ const useSite: () => HdesClient.Site;
594
+ const useBranchName: () => string | undefined;
651
595
  const useSession: () => Session;
652
596
  const useNav: () => {
653
597
  handleInTab: (props: {
654
- article: StencilClient.Article;
655
- type: Composer.NavType;
656
- locale?: string | null;
657
- secondary?: boolean;
598
+ article: HdesClient.Entity<any>;
658
599
  }) => void;
659
- findTab: (article: StencilClient.Article) => Composer.Tab | undefined;
600
+ findTab: (article: HdesClient.Entity<any>) => Composer.Tab | undefined;
601
+ };
602
+ const useDebug: () => {
603
+ handleDebugInit: (selected: HdesClient.EntityId) => void;
660
604
  };
661
605
  const Provider: React.FC<{
662
606
  children: React.ReactNode;
663
- service: StencilClient.Service;
607
+ service: HdesClient.Service;
664
608
  }>;
665
609
  }
666
610
 
@@ -946,8 +890,31 @@ declare namespace StencilClient {
946
890
 
947
891
 
948
892
  declare namespace Composer {
893
+ interface SearchData {
894
+ values: readonly SearchDataEntry[];
895
+ filterLinks(keyword: string): readonly SearchResult[];
896
+ filterWorkflows(keyword: string): readonly SearchResult[];
897
+ filterArticles(keyword: string): readonly SearchResult[];
898
+ }
899
+ interface SearchDataEntry {
900
+ id: string;
901
+ type: "ARTICLE" | "LINK" | "WORKFLOW";
902
+ values: readonly SearchableValue[];
903
+ }
904
+ interface SearchResult {
905
+ source: SearchDataEntry;
906
+ matches: SearchableValue[];
907
+ }
908
+ interface SearchableValue {
909
+ id: string;
910
+ value: string;
911
+ type: "ARTICLE_NAME" | "ARTICLE_PAGE" | "WORKFLOW_NAME" | "WORKFLOW_LABEL" | "LINK_VALUE" | "LINK_LABEL";
912
+ }
913
+ type NavType = "ARTICLE_LINKS" | "ARTICLE_WORKFLOWS" | "ARTICLE_PAGES";
949
914
  interface Nav {
915
+ type: NavType;
950
916
  value?: string | null;
917
+ value2?: string | null;
951
918
  }
952
919
  interface TabData {
953
920
  nav?: Nav;
@@ -955,53 +922,87 @@ declare namespace Composer {
955
922
  }
956
923
  interface Tab extends Burger.TabSession<TabData> {
957
924
  }
958
- interface DebugSession {
959
- error?: HdesClient.StoreError;
960
- debug?: HdesClient.DebugResponse;
961
- csv?: string;
962
- json?: string;
963
- selected: HdesClient.EntityId;
964
- inputType: DebugInputType;
965
- }
966
- type DebugInputType = "CSV" | "JSON";
967
- interface DebugSessions {
968
- selected?: HdesClient.EntityId;
969
- values: Record<HdesClient.EntityId, DebugSession>;
970
- }
971
925
  interface PageUpdate {
972
926
  saved: boolean;
973
- origin: HdesClient.Entity<any>;
974
- value: HdesClient.AstCommand[];
975
- withValue(value: HdesClient.AstCommand[]): PageUpdate;
927
+ origin: StencilClient.Page;
928
+ value: StencilClient.LocalisedContent;
929
+ withValue(value: StencilClient.LocalisedContent): PageUpdate;
930
+ }
931
+ interface SessionFilter {
932
+ locale?: StencilClient.LocaleId;
933
+ withLocale(locale?: StencilClient.LocaleId): SessionFilter;
976
934
  }
977
935
  interface Session {
978
- site: HdesClient.Site;
979
- pages: Record<HdesClient.EntityId, PageUpdate>;
980
- debug: DebugSessions;
981
- branchName?: string;
982
- getDecision(decisionName: string): undefined | HdesClient.Entity<HdesClient.AstDecision>;
983
- getFlow(flowName: string): undefined | HdesClient.Entity<HdesClient.AstFlow>;
984
- getService(serviceName: string): undefined | HdesClient.Entity<HdesClient.AstService>;
985
- getEntity(id: HdesClient.EntityId): undefined | HdesClient.Entity<any>;
986
- withDebug(page: DebugSession): Session;
987
- withPage(page: HdesClient.EntityId): Session;
988
- withPageValue(page: HdesClient.EntityId, value: HdesClient.AstCommand[]): Session;
989
- withoutPages(pages: HdesClient.EntityId[]): Session;
990
- withBranch(branchName?: string): Session;
991
- withSite(site: HdesClient.Site): Session;
936
+ site: StencilClient.Site;
937
+ pages: Record<StencilClient.PageId, PageUpdate>;
938
+ articles: ArticleView[];
939
+ workflows: WorkflowView[];
940
+ links: LinkView[];
941
+ search: SearchData;
942
+ filter: SessionFilter;
943
+ getArticleName(articleId: StencilClient.ArticleId): {
944
+ missing: boolean;
945
+ name: string;
946
+ };
947
+ getArticleView(articleId: StencilClient.ArticleId): ArticleView;
948
+ getLinkView(linkId: StencilClient.LinkId): LinkView;
949
+ getLinkName(linkId: StencilClient.LinkId): {
950
+ missing: boolean;
951
+ name: string;
952
+ };
953
+ getWorkflowView(workflowId: StencilClient.WorkflowId): WorkflowView;
954
+ getWorkflowName(workflowId: StencilClient.WorkflowId): {
955
+ missing: boolean;
956
+ name: string;
957
+ };
958
+ getArticlesForLocale(locale: StencilClient.LocaleId): StencilClient.Article[];
959
+ getArticlesForLocales(locales: StencilClient.LocaleId[]): StencilClient.Article[];
960
+ withPage(page: StencilClient.PageId): Session;
961
+ withPageValue(page: StencilClient.PageId, value: StencilClient.LocalisedContent): Session;
962
+ withoutPages(pages: StencilClient.PageId[]): Session;
963
+ withLocaleFilter(locale?: StencilClient.LocaleId): Session;
964
+ withSite(site: StencilClient.Site): Session;
992
965
  }
993
966
  interface Actions {
994
967
  handleLoad(): Promise<void>;
995
- handleLoadSite(site?: HdesClient.Site): Promise<void>;
996
- handleDebugUpdate(debug: DebugSession): void;
997
- handlePageUpdate(page: HdesClient.EntityId, value: HdesClient.AstCommand[]): void;
998
- handlePageUpdateRemove(pages: HdesClient.EntityId[]): void;
999
- handleBranchUpdate(branchName?: string): void;
968
+ handleLoadSite(): Promise<void>;
969
+ handlePageUpdate(page: StencilClient.PageId, value: StencilClient.LocalisedContent): void;
970
+ handlePageUpdateRemove(pages: StencilClient.PageId[]): void;
971
+ handleLocaleFilter(locale?: StencilClient.LocaleId): void;
1000
972
  }
1001
973
  interface ContextType {
1002
974
  session: Session;
1003
975
  actions: Actions;
1004
- service: HdesClient.Service;
976
+ service: StencilClient.Service;
977
+ }
978
+ interface ArticleView {
979
+ article: StencilClient.Article;
980
+ pages: PageView[];
981
+ canCreate: StencilClient.SiteLocale[];
982
+ links: LinkView[];
983
+ workflows: WorkflowView[];
984
+ children: Composer.ArticleView[];
985
+ displayOrder: number;
986
+ getPageById(pageId: StencilClient.PageId): PageView;
987
+ getPageByLocaleId(localeId: StencilClient.LocaleId): PageView;
988
+ findPageByLocaleId(localeId: StencilClient.LocaleId): PageView | undefined;
989
+ }
990
+ interface PageView {
991
+ title: string;
992
+ page: StencilClient.Page;
993
+ locale: StencilClient.SiteLocale;
994
+ }
995
+ interface LinkView {
996
+ link: StencilClient.Link;
997
+ labels: LabelView[];
998
+ }
999
+ interface WorkflowView {
1000
+ workflow: StencilClient.Workflow;
1001
+ labels: LabelView[];
1002
+ }
1003
+ interface LabelView {
1004
+ label: StencilClient.LocaleLabel;
1005
+ locale: StencilClient.SiteLocale;
1005
1006
  }
1006
1007
  }
1007
1008
 
@@ -1009,32 +1010,31 @@ declare namespace Composer {
1009
1010
  declare namespace Composer {
1010
1011
  const createTab: (props: {
1011
1012
  nav: Composer.Nav;
1012
- page?: HdesClient.Entity<any>;
1013
+ page?: StencilClient.Page;
1013
1014
  }) => ImmutableTabData;
1014
1015
  const ComposerContext: React.Context<ContextType>;
1015
- const useUnsaved: (entity: HdesClient.Entity<any>) => boolean;
1016
+ const useUnsaved: (article: StencilClient.Article) => boolean;
1016
1017
  const useComposer: () => {
1017
1018
  session: Session;
1018
- service: HdesClient.Service;
1019
+ service: StencilClient.Service;
1019
1020
  actions: Actions;
1020
- site: HdesClient.Site;
1021
- isArticleSaved: (entity: HdesClient.Entity<any>) => boolean;
1021
+ site: StencilClient.Site;
1022
+ isArticleSaved: (article: StencilClient.Article) => boolean;
1022
1023
  };
1023
- const useSite: () => HdesClient.Site;
1024
- const useBranchName: () => string | undefined;
1024
+ const useSite: () => StencilClient.Site;
1025
1025
  const useSession: () => Session;
1026
1026
  const useNav: () => {
1027
1027
  handleInTab: (props: {
1028
- article: HdesClient.Entity<any>;
1028
+ article: StencilClient.Article;
1029
+ type: Composer.NavType;
1030
+ locale?: string | null;
1031
+ secondary?: boolean;
1029
1032
  }) => void;
1030
- findTab: (article: HdesClient.Entity<any>) => Composer.Tab | undefined;
1031
- };
1032
- const useDebug: () => {
1033
- handleDebugInit: (selected: HdesClient.EntityId) => void;
1033
+ findTab: (article: StencilClient.Article) => Composer.Tab | undefined;
1034
1034
  };
1035
1035
  const Provider: React.FC<{
1036
1036
  children: React.ReactNode;
1037
- service: HdesClient.Service;
1037
+ service: StencilClient.Service;
1038
1038
  }>;
1039
1039
  }
1040
1040
 
package/build/index.js CHANGED
@@ -92946,7 +92946,7 @@ const L7e = ({ site: e }) => {
92946
92946
  ] })
92947
92947
  }
92948
92948
  );
92949
- }, i0 = { tag: "eveli-ide-0.0.3", built: "10/10/2024" }, B7e = (e, t, n) => {
92949
+ }, i0 = { tag: "eveli-ide-0.0.4", built: "10/10/2024" }, B7e = (e, t, n) => {
92950
92950
  var r, i, s, o, a, l, u, d;
92951
92951
  return [
92952
92952
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxs-ts/eveli-ide",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "homepage": "https://github.com/digiexpress-io/digiexpress-parent",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",