@dxs-ts/eveli-ide 0.0.16 → 0.0.17

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
@@ -1,6 +1,114 @@
1
1
  import { default as default_2 } from 'react';
2
2
  import { Theme } from '@mui/material/styles';
3
3
 
4
+ export declare namespace BurgerApi {
5
+ export interface Release {
6
+ id: string;
7
+ body: {
8
+ name: string;
9
+ note?: string;
10
+ created: string;
11
+ data?: string;
12
+ };
13
+ }
14
+ export type AppId = string;
15
+ export interface App<T extends Object> {
16
+ id: AppId;
17
+ state: [AppStateCreate<T>, AppStateRestore<T>];
18
+ components: {
19
+ toolbar: React.ElementType<ToolbarProps>;
20
+ primary: React.ElementType<PrimaryProps>;
21
+ secondary: React.ElementType<SecondaryProps>;
22
+ };
23
+ }
24
+ export type AppStateCreate<T extends Object> = (children: React.ReactNode, restorePoint?: AppState<T>) => React.ReactNode;
25
+ export type AppStateRestore<T> = () => {
26
+ restorePoint?: T;
27
+ };
28
+ export interface AppState<T extends Object> {
29
+ id: AppId;
30
+ secondary: SecondarySession;
31
+ tabs: TabsSession;
32
+ restorePoint: T;
33
+ }
34
+ export interface AppContextType {
35
+ session: AppSession;
36
+ actions: AppActions;
37
+ }
38
+ export interface AppSession {
39
+ history: readonly AppState<any>[];
40
+ active: AppId;
41
+ withActive(active: AppId): AppSession;
42
+ withAppState(appState: AppState<any>): AppSession;
43
+ }
44
+ export interface AppActions {
45
+ handleActive(active: AppId): void;
46
+ }
47
+ export interface ToolbarProps {
48
+ }
49
+ export interface PrimaryProps {
50
+ }
51
+ export interface SecondaryProps {
52
+ }
53
+ export interface SecondaryContextType {
54
+ session: SecondarySession;
55
+ actions: SecondaryActions;
56
+ }
57
+ export interface SecondarySession {
58
+ appId: string;
59
+ secondary?: string;
60
+ withSecondary(newItemId?: string): SecondarySession;
61
+ }
62
+ export interface SecondaryActions {
63
+ handleSecondary(newItemId?: string): void;
64
+ }
65
+ export interface TabsContextType {
66
+ session: TabsSession;
67
+ actions: TabsActions;
68
+ }
69
+ export interface TabsSession {
70
+ appId: string;
71
+ history: TabsHistory;
72
+ tabs: readonly TabSession<any>[];
73
+ findTab(newTabId: string): number | undefined;
74
+ getTabData(tabId: string): any;
75
+ withTabData(tabId: string, updateCommand: (oldData: any) => any): TabsSession;
76
+ withTab(newTabOrTabIndex: TabSession<any> | number): TabsSession;
77
+ deleteTabs(): TabsSession;
78
+ deleteTab(tabId: string): TabsSession;
79
+ }
80
+ export interface TabSession<T> {
81
+ id: string;
82
+ label: string | React.ReactElement;
83
+ icon?: string | React.ReactElement;
84
+ data?: T;
85
+ edit?: boolean;
86
+ }
87
+ export interface TabsHistory {
88
+ previous?: TabsHistory;
89
+ open: number;
90
+ }
91
+ export interface TabsActions {
92
+ handleTabAdd(newItem: TabSession<any>): void;
93
+ handleTabData(tabId: string, updateCommand: (oldData: any) => any): void;
94
+ handleTabChange(tabIndex: number): void;
95
+ handleTabClose(tab: TabSession<any>): void;
96
+ handleTabCloseCurrent(): void;
97
+ handleTabCloseAll(): void;
98
+ }
99
+ export interface DrawerContextType {
100
+ session: DrawerSession;
101
+ actions: DrawerActions;
102
+ }
103
+ export interface DrawerSession {
104
+ drawer: boolean;
105
+ withDrawer(open: boolean): DrawerSession;
106
+ }
107
+ export interface DrawerActions {
108
+ handleDrawerOpen(open: boolean): void;
109
+ }
110
+ }
111
+
4
112
  declare namespace HdesApi {
5
113
  type TagId = string;
6
114
  type EntityId = string;
@@ -791,6 +899,156 @@ declare namespace HdesClient {
791
899
  }
792
900
  }
793
901
 
902
+
903
+ declare namespace StencilComposerApi {
904
+ interface SearchData {
905
+ values: readonly SearchDataEntry[];
906
+ filterLinks(keyword: string): readonly SearchResult[];
907
+ filterWorkflows(keyword: string): readonly SearchResult[];
908
+ filterArticles(keyword: string): readonly SearchResult[];
909
+ }
910
+ interface SearchDataEntry {
911
+ id: string;
912
+ type: "ARTICLE" | "LINK" | "WORKFLOW";
913
+ values: readonly SearchableValue[];
914
+ }
915
+ interface SearchResult {
916
+ source: SearchDataEntry;
917
+ matches: SearchableValue[];
918
+ }
919
+ interface SearchableValue {
920
+ id: string;
921
+ value: string;
922
+ type: "ARTICLE_NAME" | "ARTICLE_PAGE" | "WORKFLOW_NAME" | "WORKFLOW_LABEL" | "LINK_VALUE" | "LINK_LABEL";
923
+ }
924
+ type NavType = "ARTICLE_LINKS" | "ARTICLE_WORKFLOWS" | "ARTICLE_PAGES";
925
+ interface Nav {
926
+ type: NavType;
927
+ value?: string | null;
928
+ value2?: string | null;
929
+ }
930
+ interface TabData {
931
+ nav?: Nav;
932
+ withNav(nav: Nav): TabData;
933
+ }
934
+ interface Tab extends BurgerApi.TabSession<TabData> {
935
+ }
936
+ interface PageUpdate {
937
+ saved: boolean;
938
+ origin: StencilClient.Page;
939
+ value: StencilClient.LocalisedContent;
940
+ withValue(value: StencilClient.LocalisedContent): PageUpdate;
941
+ }
942
+ interface SessionFilter {
943
+ locale?: StencilClient.LocaleId;
944
+ withLocale(locale?: StencilClient.LocaleId): SessionFilter;
945
+ }
946
+ interface Session {
947
+ site: StencilClient.Site;
948
+ pages: Record<StencilClient.PageId, PageUpdate>;
949
+ articles: ArticleView[];
950
+ workflows: WorkflowView[];
951
+ links: LinkView[];
952
+ search: SearchData;
953
+ filter: SessionFilter;
954
+ getArticleName(articleId: StencilClient.ArticleId): {
955
+ missing: boolean;
956
+ name: string;
957
+ };
958
+ getArticleView(articleId: StencilClient.ArticleId): ArticleView;
959
+ getLinkView(linkId: StencilClient.LinkId): LinkView;
960
+ getLinkName(linkId: StencilClient.LinkId): {
961
+ missing: boolean;
962
+ name: string;
963
+ };
964
+ getWorkflowView(workflowId: StencilClient.WorkflowId): WorkflowView;
965
+ getWorkflowName(workflowId: StencilClient.WorkflowId): {
966
+ missing: boolean;
967
+ name: string;
968
+ };
969
+ getArticlesForLocale(locale: StencilClient.LocaleId): StencilClient.Article[];
970
+ getArticlesForLocales(locales: StencilClient.LocaleId[]): StencilClient.Article[];
971
+ withPage(page: StencilClient.PageId): Session;
972
+ withPageValue(page: StencilClient.PageId, value: StencilClient.LocalisedContent): Session;
973
+ withoutPages(pages: StencilClient.PageId[]): Session;
974
+ withLocaleFilter(locale?: StencilClient.LocaleId): Session;
975
+ withSite(site: StencilClient.Site): Session;
976
+ }
977
+ interface Actions {
978
+ handleLoad(): Promise<void>;
979
+ handleLoadSite(): Promise<void>;
980
+ handlePageUpdate(page: StencilClient.PageId, value: StencilClient.LocalisedContent): void;
981
+ handlePageUpdateRemove(pages: StencilClient.PageId[]): void;
982
+ handleLocaleFilter(locale?: StencilClient.LocaleId): void;
983
+ }
984
+ interface ContextType {
985
+ session: Session;
986
+ actions: Actions;
987
+ service: StencilClient.Service;
988
+ }
989
+ interface ArticleView {
990
+ article: StencilClient.Article;
991
+ pages: PageView[];
992
+ canCreate: StencilClient.SiteLocale[];
993
+ links: LinkView[];
994
+ workflows: WorkflowView[];
995
+ children: ArticleView[];
996
+ displayOrder: number;
997
+ getPageById(pageId: StencilClient.PageId): PageView;
998
+ getPageByLocaleId(localeId: StencilClient.LocaleId): PageView;
999
+ findPageByLocaleId(localeId: StencilClient.LocaleId): PageView | undefined;
1000
+ }
1001
+ interface PageView {
1002
+ title: string;
1003
+ page: StencilClient.Page;
1004
+ locale: StencilClient.SiteLocale;
1005
+ }
1006
+ interface LinkView {
1007
+ link: StencilClient.Link;
1008
+ labels: LabelView[];
1009
+ }
1010
+ interface WorkflowView {
1011
+ workflow: StencilClient.Workflow;
1012
+ labels: LabelView[];
1013
+ }
1014
+ interface LabelView {
1015
+ label: StencilClient.LocaleLabel;
1016
+ locale: StencilClient.SiteLocale;
1017
+ }
1018
+ }
1019
+
1020
+
1021
+ declare namespace StencilComposerApi {
1022
+ const createTab: (props: {
1023
+ nav: Nav;
1024
+ page?: StencilClient.Page;
1025
+ }) => ImmutableTabData;
1026
+ const ComposerContext: React.Context<ContextType>;
1027
+ const useUnsaved: (article: StencilClient.Article) => boolean;
1028
+ const useComposer: () => {
1029
+ session: Session;
1030
+ service: StencilClient.Service;
1031
+ actions: Actions;
1032
+ site: StencilClient.Site;
1033
+ isArticleSaved: (article: StencilClient.Article) => boolean;
1034
+ };
1035
+ const useSite: () => StencilClient.Site;
1036
+ const useSession: () => Session;
1037
+ const useNav: () => {
1038
+ handleInTab: (props: {
1039
+ article: StencilClient.Article;
1040
+ type: NavType;
1041
+ locale?: string | null;
1042
+ secondary?: boolean;
1043
+ }) => void;
1044
+ findTab: (article: StencilClient.Article) => Tab | undefined;
1045
+ };
1046
+ const Provider: React.FC<{
1047
+ children: React.ReactNode;
1048
+ service: StencilClient.Service;
1049
+ }>;
1050
+ }
1051
+
794
1052
  declare namespace StencilClient {
795
1053
  type PageId = string;
796
1054
  type LinkId = string;
@@ -1165,156 +1423,6 @@ declare namespace WrenchComposerApi {
1165
1423
  }>;
1166
1424
  }
1167
1425
 
1168
-
1169
- declare namespace StencilComposerApi {
1170
- interface SearchData {
1171
- values: readonly SearchDataEntry[];
1172
- filterLinks(keyword: string): readonly SearchResult[];
1173
- filterWorkflows(keyword: string): readonly SearchResult[];
1174
- filterArticles(keyword: string): readonly SearchResult[];
1175
- }
1176
- interface SearchDataEntry {
1177
- id: string;
1178
- type: "ARTICLE" | "LINK" | "WORKFLOW";
1179
- values: readonly SearchableValue[];
1180
- }
1181
- interface SearchResult {
1182
- source: SearchDataEntry;
1183
- matches: SearchableValue[];
1184
- }
1185
- interface SearchableValue {
1186
- id: string;
1187
- value: string;
1188
- type: "ARTICLE_NAME" | "ARTICLE_PAGE" | "WORKFLOW_NAME" | "WORKFLOW_LABEL" | "LINK_VALUE" | "LINK_LABEL";
1189
- }
1190
- type NavType = "ARTICLE_LINKS" | "ARTICLE_WORKFLOWS" | "ARTICLE_PAGES";
1191
- interface Nav {
1192
- type: NavType;
1193
- value?: string | null;
1194
- value2?: string | null;
1195
- }
1196
- interface TabData {
1197
- nav?: Nav;
1198
- withNav(nav: Nav): TabData;
1199
- }
1200
- interface Tab extends BurgerApi.TabSession<TabData> {
1201
- }
1202
- interface PageUpdate {
1203
- saved: boolean;
1204
- origin: StencilClient.Page;
1205
- value: StencilClient.LocalisedContent;
1206
- withValue(value: StencilClient.LocalisedContent): PageUpdate;
1207
- }
1208
- interface SessionFilter {
1209
- locale?: StencilClient.LocaleId;
1210
- withLocale(locale?: StencilClient.LocaleId): SessionFilter;
1211
- }
1212
- interface Session {
1213
- site: StencilClient.Site;
1214
- pages: Record<StencilClient.PageId, PageUpdate>;
1215
- articles: ArticleView[];
1216
- workflows: WorkflowView[];
1217
- links: LinkView[];
1218
- search: SearchData;
1219
- filter: SessionFilter;
1220
- getArticleName(articleId: StencilClient.ArticleId): {
1221
- missing: boolean;
1222
- name: string;
1223
- };
1224
- getArticleView(articleId: StencilClient.ArticleId): ArticleView;
1225
- getLinkView(linkId: StencilClient.LinkId): LinkView;
1226
- getLinkName(linkId: StencilClient.LinkId): {
1227
- missing: boolean;
1228
- name: string;
1229
- };
1230
- getWorkflowView(workflowId: StencilClient.WorkflowId): WorkflowView;
1231
- getWorkflowName(workflowId: StencilClient.WorkflowId): {
1232
- missing: boolean;
1233
- name: string;
1234
- };
1235
- getArticlesForLocale(locale: StencilClient.LocaleId): StencilClient.Article[];
1236
- getArticlesForLocales(locales: StencilClient.LocaleId[]): StencilClient.Article[];
1237
- withPage(page: StencilClient.PageId): Session;
1238
- withPageValue(page: StencilClient.PageId, value: StencilClient.LocalisedContent): Session;
1239
- withoutPages(pages: StencilClient.PageId[]): Session;
1240
- withLocaleFilter(locale?: StencilClient.LocaleId): Session;
1241
- withSite(site: StencilClient.Site): Session;
1242
- }
1243
- interface Actions {
1244
- handleLoad(): Promise<void>;
1245
- handleLoadSite(): Promise<void>;
1246
- handlePageUpdate(page: StencilClient.PageId, value: StencilClient.LocalisedContent): void;
1247
- handlePageUpdateRemove(pages: StencilClient.PageId[]): void;
1248
- handleLocaleFilter(locale?: StencilClient.LocaleId): void;
1249
- }
1250
- interface ContextType {
1251
- session: Session;
1252
- actions: Actions;
1253
- service: StencilClient.Service;
1254
- }
1255
- interface ArticleView {
1256
- article: StencilClient.Article;
1257
- pages: PageView[];
1258
- canCreate: StencilClient.SiteLocale[];
1259
- links: LinkView[];
1260
- workflows: WorkflowView[];
1261
- children: ArticleView[];
1262
- displayOrder: number;
1263
- getPageById(pageId: StencilClient.PageId): PageView;
1264
- getPageByLocaleId(localeId: StencilClient.LocaleId): PageView;
1265
- findPageByLocaleId(localeId: StencilClient.LocaleId): PageView | undefined;
1266
- }
1267
- interface PageView {
1268
- title: string;
1269
- page: StencilClient.Page;
1270
- locale: StencilClient.SiteLocale;
1271
- }
1272
- interface LinkView {
1273
- link: StencilClient.Link;
1274
- labels: LabelView[];
1275
- }
1276
- interface WorkflowView {
1277
- workflow: StencilClient.Workflow;
1278
- labels: LabelView[];
1279
- }
1280
- interface LabelView {
1281
- label: StencilClient.LocaleLabel;
1282
- locale: StencilClient.SiteLocale;
1283
- }
1284
- }
1285
-
1286
-
1287
- declare namespace StencilComposerApi {
1288
- const createTab: (props: {
1289
- nav: Nav;
1290
- page?: StencilClient.Page;
1291
- }) => ImmutableTabData;
1292
- const ComposerContext: React.Context<ContextType>;
1293
- const useUnsaved: (article: StencilClient.Article) => boolean;
1294
- const useComposer: () => {
1295
- session: Session;
1296
- service: StencilClient.Service;
1297
- actions: Actions;
1298
- site: StencilClient.Site;
1299
- isArticleSaved: (article: StencilClient.Article) => boolean;
1300
- };
1301
- const useSite: () => StencilClient.Site;
1302
- const useSession: () => Session;
1303
- const useNav: () => {
1304
- handleInTab: (props: {
1305
- article: StencilClient.Article;
1306
- type: NavType;
1307
- locale?: string | null;
1308
- secondary?: boolean;
1309
- }) => void;
1310
- findTab: (article: StencilClient.Article) => Tab | undefined;
1311
- };
1312
- const Provider: React.FC<{
1313
- children: React.ReactNode;
1314
- service: StencilClient.Service;
1315
- }>;
1316
- }
1317
-
1318
1426
  declare namespace Decision {
1319
1427
  const Table: import("react").FC<{
1320
1428
  ast: import("../../client").HdesApi.AstDecision;
package/build/index.js CHANGED
@@ -92942,7 +92942,7 @@ const I7e = ({ site: e }) => {
92942
92942
  ] })
92943
92943
  }
92944
92944
  );
92945
- }, h0 = { tag: "eveli-ide-0.0.16", built: "11/10/2024" }, P7e = (e, t, n) => {
92945
+ }, h0 = { tag: "eveli-ide-0.0.17", built: "11/10/2024" }, P7e = (e, t, n) => {
92946
92946
  var r, i, s, o, a, l, u, d;
92947
92947
  return [
92948
92948
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxs-ts/eveli-ide",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "homepage": "https://github.com/digiexpress-io/digiexpress-parent",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",