@antelopejs/interface-dms 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,28 +116,23 @@ export declare const TableViewSchema: z.ZodObject<{
116
116
  hasSelection: z.ZodOptional<z.ZodBoolean>;
117
117
  custom: z.ZodOptional<z.ZodType<CustomRowAction<Record<string, unknown>>[], z.ZodTypeDef, CustomRowAction<Record<string, unknown>>[]>>;
118
118
  }, "strip", z.ZodTypeAny, {
119
- add?: boolean | {
120
- isEnabled?: boolean | undefined;
121
- isVisible?: boolean | undefined;
122
- rule?: RowActionRule | undefined;
123
- } | undefined;
124
- custom?: CustomRowAction<Record<string, unknown>>[] | undefined;
125
- copyLink?: boolean | {
119
+ delete?: boolean | {
126
120
  isEnabled?: boolean | undefined;
127
121
  isVisible?: boolean | undefined;
128
122
  rule?: RowActionRule | undefined;
129
123
  } | undefined;
130
- details?: boolean | {
124
+ edit?: boolean | {
131
125
  isEnabled?: boolean | undefined;
132
126
  isVisible?: boolean | undefined;
133
127
  rule?: RowActionRule | undefined;
134
128
  } | undefined;
135
- delete?: boolean | {
129
+ custom?: CustomRowAction<Record<string, unknown>>[] | undefined;
130
+ add?: boolean | {
136
131
  isEnabled?: boolean | undefined;
137
132
  isVisible?: boolean | undefined;
138
133
  rule?: RowActionRule | undefined;
139
134
  } | undefined;
140
- edit?: boolean | {
135
+ details?: boolean | {
141
136
  isEnabled?: boolean | undefined;
142
137
  isVisible?: boolean | undefined;
143
138
  rule?: RowActionRule | undefined;
@@ -157,30 +152,30 @@ export declare const TableViewSchema: z.ZodObject<{
157
152
  isVisible?: boolean | undefined;
158
153
  rule?: RowActionRule | undefined;
159
154
  } | undefined;
160
- hasSelection?: boolean | undefined;
161
- }, {
162
- add?: boolean | {
155
+ copyLink?: boolean | {
163
156
  isEnabled?: boolean | undefined;
164
157
  isVisible?: boolean | undefined;
165
158
  rule?: RowActionRule | undefined;
166
159
  } | undefined;
167
- custom?: CustomRowAction<Record<string, unknown>>[] | undefined;
168
- copyLink?: boolean | {
160
+ hasSelection?: boolean | undefined;
161
+ }, {
162
+ delete?: boolean | {
169
163
  isEnabled?: boolean | undefined;
170
164
  isVisible?: boolean | undefined;
171
165
  rule?: RowActionRule | undefined;
172
166
  } | undefined;
173
- details?: boolean | {
167
+ edit?: boolean | {
174
168
  isEnabled?: boolean | undefined;
175
169
  isVisible?: boolean | undefined;
176
170
  rule?: RowActionRule | undefined;
177
171
  } | undefined;
178
- delete?: boolean | {
172
+ custom?: CustomRowAction<Record<string, unknown>>[] | undefined;
173
+ add?: boolean | {
179
174
  isEnabled?: boolean | undefined;
180
175
  isVisible?: boolean | undefined;
181
176
  rule?: RowActionRule | undefined;
182
177
  } | undefined;
183
- edit?: boolean | {
178
+ details?: boolean | {
184
179
  isEnabled?: boolean | undefined;
185
180
  isVisible?: boolean | undefined;
186
181
  rule?: RowActionRule | undefined;
@@ -200,6 +195,11 @@ export declare const TableViewSchema: z.ZodObject<{
200
195
  isVisible?: boolean | undefined;
201
196
  rule?: RowActionRule | undefined;
202
197
  } | undefined;
198
+ copyLink?: boolean | {
199
+ isEnabled?: boolean | undefined;
200
+ isVisible?: boolean | undefined;
201
+ rule?: RowActionRule | undefined;
202
+ } | undefined;
203
203
  hasSelection?: boolean | undefined;
204
204
  }>>;
205
205
  customButtons: z.ZodOptional<z.ZodType<CustomButton[], z.ZodTypeDef, CustomButton[]>>;
@@ -276,13 +276,13 @@ export declare const TableViewSchema: z.ZodObject<{
276
276
  urlSlug?: string | undefined;
277
277
  customPage?: boolean | undefined;
278
278
  } | undefined;
279
- view?: {
279
+ edit?: {
280
280
  description?: string | undefined;
281
281
  displayName?: string | undefined;
282
282
  urlSlug?: string | undefined;
283
283
  customPage?: boolean | undefined;
284
284
  } | undefined;
285
- edit?: {
285
+ view?: {
286
286
  description?: string | undefined;
287
287
  displayName?: string | undefined;
288
288
  urlSlug?: string | undefined;
@@ -295,13 +295,13 @@ export declare const TableViewSchema: z.ZodObject<{
295
295
  urlSlug?: string | undefined;
296
296
  customPage?: boolean | undefined;
297
297
  } | undefined;
298
- view?: {
298
+ edit?: {
299
299
  description?: string | undefined;
300
300
  displayName?: string | undefined;
301
301
  urlSlug?: string | undefined;
302
302
  customPage?: boolean | undefined;
303
303
  } | undefined;
304
- edit?: {
304
+ view?: {
305
305
  description?: string | undefined;
306
306
  displayName?: string | undefined;
307
307
  urlSlug?: string | undefined;
@@ -317,13 +317,13 @@ export declare const TableViewSchema: z.ZodObject<{
317
317
  urlSlug?: string | undefined;
318
318
  customPage?: boolean | undefined;
319
319
  } | undefined;
320
- view?: {
320
+ edit?: {
321
321
  description?: string | undefined;
322
322
  displayName?: string | undefined;
323
323
  urlSlug?: string | undefined;
324
324
  customPage?: boolean | undefined;
325
325
  } | undefined;
326
- edit?: {
326
+ view?: {
327
327
  description?: string | undefined;
328
328
  displayName?: string | undefined;
329
329
  urlSlug?: string | undefined;
@@ -339,13 +339,13 @@ export declare const TableViewSchema: z.ZodObject<{
339
339
  urlSlug?: string | undefined;
340
340
  customPage?: boolean | undefined;
341
341
  } | undefined;
342
- view?: {
342
+ edit?: {
343
343
  description?: string | undefined;
344
344
  displayName?: string | undefined;
345
345
  urlSlug?: string | undefined;
346
346
  customPage?: boolean | undefined;
347
347
  } | undefined;
348
- edit?: {
348
+ view?: {
349
349
  description?: string | undefined;
350
350
  displayName?: string | undefined;
351
351
  urlSlug?: string | undefined;
@@ -418,8 +418,8 @@ export declare const TableViewSchema: z.ZodObject<{
418
418
  textColor: z.ZodOptional<z.ZodType<ColorValue, z.ZodTypeDef, ColorValue>>;
419
419
  iconColor: z.ZodOptional<z.ZodType<ColorValue, z.ZodTypeDef, ColorValue>>;
420
420
  }, "strip", z.ZodTypeAny, {
421
- id: string;
422
421
  label: string;
422
+ id: string;
423
423
  filters: {
424
424
  mode: string;
425
425
  accessorKey: string;
@@ -429,8 +429,8 @@ export declare const TableViewSchema: z.ZodObject<{
429
429
  textColor?: ColorValue | undefined;
430
430
  iconColor?: ColorValue | undefined;
431
431
  }, {
432
- id: string;
433
432
  label: string;
433
+ id: string;
434
434
  filters: {
435
435
  mode: string;
436
436
  accessorKey: string;
@@ -448,16 +448,16 @@ export declare const TableViewSchema: z.ZodObject<{
448
448
  draggable: z.ZodDefault<z.ZodBoolean>;
449
449
  columnMaxHeight: z.ZodDefault<z.ZodString>;
450
450
  }, "strip", z.ZodTypeAny, {
451
- draggable: boolean;
452
451
  groupByField: string;
452
+ draggable: boolean;
453
453
  columnMaxHeight: string;
454
454
  cardComponent?: import("../..").Component<unknown> | undefined;
455
455
  cardFields?: string[] | undefined;
456
456
  }, {
457
457
  groupByField: string;
458
- draggable?: boolean | undefined;
459
458
  cardComponent?: import("../..").Component<unknown> | undefined;
460
459
  cardFields?: string[] | undefined;
460
+ draggable?: boolean | undefined;
461
461
  columnMaxHeight?: string | undefined;
462
462
  }>>;
463
463
  displays: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -513,49 +513,48 @@ export declare const TableViewSchema: z.ZodObject<{
513
513
  guards: z.ZodOptional<z.ZodType<TableViewGuards<Record<string, unknown>>, z.ZodTypeDef, TableViewGuards<Record<string, unknown>>>>;
514
514
  bypassTenantAccessGate: z.ZodOptional<z.ZodBoolean>;
515
515
  }, "strip", z.ZodTypeAny, {
516
- realtime: boolean;
517
516
  rowIdKey: string;
517
+ realtime: boolean;
518
518
  defaultDisplay: string;
519
- caption?: string | undefined;
520
519
  customButtons?: CustomButton[] | undefined;
521
520
  rowActions?: {
522
- add?: boolean | {
521
+ delete?: boolean | {
523
522
  isEnabled?: boolean | undefined;
524
523
  isVisible?: boolean | undefined;
525
524
  rule?: RowActionRule | undefined;
526
525
  } | undefined;
527
- custom?: CustomRowAction<Record<string, unknown>>[] | undefined;
528
- copyLink?: boolean | {
526
+ edit?: boolean | {
529
527
  isEnabled?: boolean | undefined;
530
528
  isVisible?: boolean | undefined;
531
529
  rule?: RowActionRule | undefined;
532
530
  } | undefined;
533
- details?: boolean | {
531
+ custom?: CustomRowAction<Record<string, unknown>>[] | undefined;
532
+ add?: boolean | {
534
533
  isEnabled?: boolean | undefined;
535
534
  isVisible?: boolean | undefined;
536
535
  rule?: RowActionRule | undefined;
537
536
  } | undefined;
538
- delete?: boolean | {
537
+ details?: boolean | {
539
538
  isEnabled?: boolean | undefined;
540
539
  isVisible?: boolean | undefined;
541
540
  rule?: RowActionRule | undefined;
542
541
  } | undefined;
543
- edit?: boolean | {
542
+ duplicate?: boolean | {
544
543
  isEnabled?: boolean | undefined;
545
544
  isVisible?: boolean | undefined;
546
545
  rule?: RowActionRule | undefined;
547
546
  } | undefined;
548
- duplicate?: boolean | {
547
+ archive?: boolean | {
549
548
  isEnabled?: boolean | undefined;
550
549
  isVisible?: boolean | undefined;
551
550
  rule?: RowActionRule | undefined;
552
551
  } | undefined;
553
- archive?: boolean | {
552
+ restore?: boolean | {
554
553
  isEnabled?: boolean | undefined;
555
554
  isVisible?: boolean | undefined;
556
555
  rule?: RowActionRule | undefined;
557
556
  } | undefined;
558
- restore?: boolean | {
557
+ copyLink?: boolean | {
559
558
  isEnabled?: boolean | undefined;
560
559
  isVisible?: boolean | undefined;
561
560
  rule?: RowActionRule | undefined;
@@ -563,8 +562,8 @@ export declare const TableViewSchema: z.ZodObject<{
563
562
  hasSelection?: boolean | undefined;
564
563
  } | undefined;
565
564
  kanban?: {
566
- draggable: boolean;
567
565
  groupByField: string;
566
+ draggable: boolean;
568
567
  columnMaxHeight: string;
569
568
  cardComponent?: import("../..").Component<unknown> | undefined;
570
569
  cardFields?: string[] | undefined;
@@ -582,6 +581,7 @@ export declare const TableViewSchema: z.ZodObject<{
582
581
  sorting?: boolean | undefined;
583
582
  } | undefined;
584
583
  }[] | undefined;
584
+ caption?: string | undefined;
585
585
  labelKey?: string | undefined;
586
586
  formContainer?: {
587
587
  type: "drawer";
@@ -597,13 +597,13 @@ export declare const TableViewSchema: z.ZodObject<{
597
597
  urlSlug?: string | undefined;
598
598
  customPage?: boolean | undefined;
599
599
  } | undefined;
600
- view?: {
600
+ edit?: {
601
601
  description?: string | undefined;
602
602
  displayName?: string | undefined;
603
603
  urlSlug?: string | undefined;
604
604
  customPage?: boolean | undefined;
605
605
  } | undefined;
606
- edit?: {
606
+ view?: {
607
607
  description?: string | undefined;
608
608
  displayName?: string | undefined;
609
609
  urlSlug?: string | undefined;
@@ -631,8 +631,8 @@ export declare const TableViewSchema: z.ZodObject<{
631
631
  }> | undefined;
632
632
  strictRuleValidation?: boolean | undefined;
633
633
  tabs?: {
634
- id: string;
635
634
  label: string;
635
+ id: string;
636
636
  filters: {
637
637
  mode: string;
638
638
  accessorKey: string;
@@ -645,47 +645,45 @@ export declare const TableViewSchema: z.ZodObject<{
645
645
  guards?: TableViewGuards<Record<string, unknown>> | undefined;
646
646
  bypassTenantAccessGate?: boolean | undefined;
647
647
  }, {
648
- realtime?: boolean | undefined;
649
- caption?: string | undefined;
650
648
  customButtons?: CustomButton[] | undefined;
651
649
  rowActions?: {
652
- add?: boolean | {
650
+ delete?: boolean | {
653
651
  isEnabled?: boolean | undefined;
654
652
  isVisible?: boolean | undefined;
655
653
  rule?: RowActionRule | undefined;
656
654
  } | undefined;
657
- custom?: CustomRowAction<Record<string, unknown>>[] | undefined;
658
- copyLink?: boolean | {
655
+ edit?: boolean | {
659
656
  isEnabled?: boolean | undefined;
660
657
  isVisible?: boolean | undefined;
661
658
  rule?: RowActionRule | undefined;
662
659
  } | undefined;
663
- details?: boolean | {
660
+ custom?: CustomRowAction<Record<string, unknown>>[] | undefined;
661
+ add?: boolean | {
664
662
  isEnabled?: boolean | undefined;
665
663
  isVisible?: boolean | undefined;
666
664
  rule?: RowActionRule | undefined;
667
665
  } | undefined;
668
- delete?: boolean | {
666
+ details?: boolean | {
669
667
  isEnabled?: boolean | undefined;
670
668
  isVisible?: boolean | undefined;
671
669
  rule?: RowActionRule | undefined;
672
670
  } | undefined;
673
- edit?: boolean | {
671
+ duplicate?: boolean | {
674
672
  isEnabled?: boolean | undefined;
675
673
  isVisible?: boolean | undefined;
676
674
  rule?: RowActionRule | undefined;
677
675
  } | undefined;
678
- duplicate?: boolean | {
676
+ archive?: boolean | {
679
677
  isEnabled?: boolean | undefined;
680
678
  isVisible?: boolean | undefined;
681
679
  rule?: RowActionRule | undefined;
682
680
  } | undefined;
683
- archive?: boolean | {
681
+ restore?: boolean | {
684
682
  isEnabled?: boolean | undefined;
685
683
  isVisible?: boolean | undefined;
686
684
  rule?: RowActionRule | undefined;
687
685
  } | undefined;
688
- restore?: boolean | {
686
+ copyLink?: boolean | {
689
687
  isEnabled?: boolean | undefined;
690
688
  isVisible?: boolean | undefined;
691
689
  rule?: RowActionRule | undefined;
@@ -694,9 +692,9 @@ export declare const TableViewSchema: z.ZodObject<{
694
692
  } | undefined;
695
693
  kanban?: {
696
694
  groupByField: string;
697
- draggable?: boolean | undefined;
698
695
  cardComponent?: import("../..").Component<unknown> | undefined;
699
696
  cardFields?: string[] | undefined;
697
+ draggable?: boolean | undefined;
700
698
  columnMaxHeight?: string | undefined;
701
699
  } | undefined;
702
700
  displays?: {
@@ -712,6 +710,7 @@ export declare const TableViewSchema: z.ZodObject<{
712
710
  sorting?: boolean | undefined;
713
711
  } | undefined;
714
712
  }[] | undefined;
713
+ caption?: string | undefined;
715
714
  rowIdKey?: string | undefined;
716
715
  labelKey?: string | undefined;
717
716
  formContainer?: {
@@ -728,13 +727,13 @@ export declare const TableViewSchema: z.ZodObject<{
728
727
  urlSlug?: string | undefined;
729
728
  customPage?: boolean | undefined;
730
729
  } | undefined;
731
- view?: {
730
+ edit?: {
732
731
  description?: string | undefined;
733
732
  displayName?: string | undefined;
734
733
  urlSlug?: string | undefined;
735
734
  customPage?: boolean | undefined;
736
735
  } | undefined;
737
- edit?: {
736
+ view?: {
738
737
  description?: string | undefined;
739
738
  displayName?: string | undefined;
740
739
  urlSlug?: string | undefined;
@@ -762,8 +761,8 @@ export declare const TableViewSchema: z.ZodObject<{
762
761
  }> | undefined;
763
762
  strictRuleValidation?: boolean | undefined;
764
763
  tabs?: {
765
- id: string;
766
764
  label: string;
765
+ id: string;
767
766
  filters: {
768
767
  mode: string;
769
768
  accessorKey: string;
@@ -773,6 +772,7 @@ export declare const TableViewSchema: z.ZodObject<{
773
772
  textColor?: ColorValue | undefined;
774
773
  iconColor?: ColorValue | undefined;
775
774
  }[] | undefined;
775
+ realtime?: boolean | undefined;
776
776
  defaultDisplay?: string | undefined;
777
777
  guards?: TableViewGuards<Record<string, unknown>> | undefined;
778
778
  bypassTenantAccessGate?: boolean | undefined;
@@ -77,93 +77,93 @@ export declare const TopListCardSchema: z.ZodObject<{
77
77
  }>>;
78
78
  to: z.ZodOptional<z.ZodString>;
79
79
  }, "strip", z.ZodTypeAny, {
80
- id: string | number;
81
80
  value: number;
82
81
  title: string;
83
- delta?: number | null | undefined;
84
- description?: string | undefined;
82
+ id: string | number;
85
83
  icon?: string | undefined;
84
+ description?: string | undefined;
86
85
  avatar?: {
87
86
  src: string;
88
87
  alt?: string | undefined;
89
88
  } | undefined;
89
+ delta?: number | null | undefined;
90
90
  sparkline?: number[] | undefined;
91
91
  to?: string | undefined;
92
92
  }, {
93
- id: string | number;
94
93
  value: number;
95
94
  title: string;
96
- delta?: number | null | undefined;
97
- description?: string | undefined;
95
+ id: string | number;
98
96
  icon?: string | undefined;
97
+ description?: string | undefined;
99
98
  avatar?: {
100
99
  src: string;
101
100
  alt?: string | undefined;
102
101
  } | undefined;
102
+ delta?: number | null | undefined;
103
103
  sparkline?: number[] | undefined;
104
104
  to?: string | undefined;
105
105
  }>, "many">>;
106
106
  emptyLabel: z.ZodOptional<z.ZodString>;
107
107
  }, "strip", z.ZodTypeAny, {
108
108
  title: string;
109
- invert?: boolean | undefined;
110
- maxHeight?: string | undefined;
111
109
  description?: string | undefined;
112
110
  fetchUrl?: string | undefined;
113
111
  fetchUrlMethod?: HttpMethod | undefined;
114
112
  periodScope?: string | undefined;
115
- valueFormat?: "number" | "percent" | "currency" | "compact" | undefined;
113
+ valueFormat?: "number" | "currency" | "percent" | "compact" | undefined;
116
114
  currencyCode?: string | undefined;
117
115
  showDelta?: boolean | undefined;
118
116
  showSparkline?: boolean | undefined;
119
117
  sparklineAccent?: "auto" | ChartColorValue | undefined;
118
+ invert?: boolean | undefined;
120
119
  showRank?: boolean | undefined;
121
120
  highlightTopN?: number | undefined;
122
121
  rankColor?: ChartColorValue | undefined;
123
122
  badgeColor?: ChartColorValue | undefined;
123
+ maxHeight?: string | undefined;
124
124
  staticItems?: {
125
- id: string | number;
126
125
  value: number;
127
126
  title: string;
128
- delta?: number | null | undefined;
129
- description?: string | undefined;
127
+ id: string | number;
130
128
  icon?: string | undefined;
129
+ description?: string | undefined;
131
130
  avatar?: {
132
131
  src: string;
133
132
  alt?: string | undefined;
134
133
  } | undefined;
134
+ delta?: number | null | undefined;
135
135
  sparkline?: number[] | undefined;
136
136
  to?: string | undefined;
137
137
  }[] | undefined;
138
138
  emptyLabel?: string | undefined;
139
139
  }, {
140
140
  title: string;
141
- invert?: boolean | undefined;
142
- maxHeight?: string | undefined;
143
141
  description?: string | undefined;
144
142
  fetchUrl?: string | undefined;
145
143
  fetchUrlMethod?: HttpMethod | undefined;
146
144
  periodScope?: string | undefined;
147
- valueFormat?: "number" | "percent" | "currency" | "compact" | undefined;
145
+ valueFormat?: "number" | "currency" | "percent" | "compact" | undefined;
148
146
  currencyCode?: string | undefined;
149
147
  showDelta?: boolean | undefined;
150
148
  showSparkline?: boolean | undefined;
151
149
  sparklineAccent?: "auto" | ChartColorValue | undefined;
150
+ invert?: boolean | undefined;
152
151
  showRank?: boolean | undefined;
153
152
  highlightTopN?: number | undefined;
154
153
  rankColor?: ChartColorValue | undefined;
155
154
  badgeColor?: ChartColorValue | undefined;
155
+ maxHeight?: string | undefined;
156
156
  staticItems?: {
157
- id: string | number;
158
157
  value: number;
159
158
  title: string;
160
- delta?: number | null | undefined;
161
- description?: string | undefined;
159
+ id: string | number;
162
160
  icon?: string | undefined;
161
+ description?: string | undefined;
163
162
  avatar?: {
164
163
  src: string;
165
164
  alt?: string | undefined;
166
165
  } | undefined;
166
+ delta?: number | null | undefined;
167
167
  sparkline?: number[] | undefined;
168
168
  to?: string | undefined;
169
169
  }[] | undefined;
@@ -74,16 +74,16 @@ export declare const TreeSchema: z.ZodObject<{
74
74
  }, "strip", z.ZodTypeAny, {
75
75
  selectionBehavior: TreeSelectionBehavior;
76
76
  color?: Color | undefined;
77
- expanded?: string[] | undefined;
78
- title?: string | undefined;
79
77
  disabled?: boolean | undefined;
80
- multiple?: boolean | undefined;
81
- size?: Size | undefined;
82
78
  description?: string | undefined;
79
+ size?: Size | undefined;
80
+ title?: string | undefined;
83
81
  trailingIcon?: string | undefined;
84
82
  expandedIcon?: string | undefined;
85
83
  collapsedIcon?: string | undefined;
84
+ multiple?: boolean | undefined;
86
85
  defaultExpanded?: string[] | undefined;
86
+ expanded?: string[] | undefined;
87
87
  propagateSelect?: boolean | undefined;
88
88
  fetchUrl?: string | undefined;
89
89
  fetchUrlMethod?: HttpMethod | undefined;
@@ -94,16 +94,16 @@ export declare const TreeSchema: z.ZodObject<{
94
94
  }, {
95
95
  selectionBehavior: TreeSelectionBehavior;
96
96
  color?: Color | undefined;
97
- expanded?: string[] | undefined;
98
- title?: string | undefined;
99
97
  disabled?: boolean | undefined;
100
- multiple?: boolean | undefined;
101
- size?: Size | undefined;
102
98
  description?: string | undefined;
99
+ size?: Size | undefined;
100
+ title?: string | undefined;
103
101
  trailingIcon?: string | undefined;
104
102
  expandedIcon?: string | undefined;
105
103
  collapsedIcon?: string | undefined;
104
+ multiple?: boolean | undefined;
106
105
  defaultExpanded?: string[] | undefined;
106
+ expanded?: string[] | undefined;
107
107
  propagateSelect?: boolean | undefined;
108
108
  fetchUrl?: string | undefined;
109
109
  fetchUrlMethod?: HttpMethod | undefined;
@@ -0,0 +1,11 @@
1
+ export interface FormPageRouteClaim {
2
+ owner: string;
3
+ pageFullId: string;
4
+ kind: string;
5
+ fullId: string;
6
+ fullSlug: string;
7
+ }
8
+ export declare class FormPageRouteConflictError extends Error {
9
+ constructor(message: string);
10
+ }
11
+ export declare function claimFormPageRoute(claim: FormPageRouteClaim): void;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormPageRouteConflictError = void 0;
4
+ exports.claimFormPageRoute = claimFormPageRoute;
5
+ const registry_1 = require("./registry");
6
+ class FormPageRouteConflictError extends Error {
7
+ constructor(message) {
8
+ super(message);
9
+ this.name = "FormPageRouteConflictError";
10
+ }
11
+ }
12
+ exports.FormPageRouteConflictError = FormPageRouteConflictError;
13
+ const claimsByFullId = new Map();
14
+ const claimsBySlug = new Map();
15
+ function conflict(held, claim, what) {
16
+ throw new FormPageRouteConflictError(`[dms] TableView "${held.owner}" and TableView "${claim.owner}" on page "${claim.pageFullId}" both register their "${claim.kind}" form page ${what}. Give one of them a URL of its own with formContainer.pages.${claim.kind}.urlSlug.`);
17
+ }
18
+ function claimFormPageRoute(claim) {
19
+ const byId = claimsByFullId.get(claim.fullId);
20
+ if (byId &&
21
+ byId.owner !== claim.owner &&
22
+ registry_1.pageMetadataByFullId.has(claim.fullId)) {
23
+ conflict(byId, claim, `under the id "${claim.fullId}"`);
24
+ }
25
+ const bySlug = claimsBySlug.get(claim.fullSlug);
26
+ if (bySlug &&
27
+ bySlug.owner !== claim.owner &&
28
+ registry_1.pageLayoutHandlers.has(claim.fullSlug)) {
29
+ conflict(bySlug, claim, `at "${claim.fullSlug}"`);
30
+ }
31
+ if (byId && byId.fullSlug !== claim.fullSlug) {
32
+ claimsBySlug.delete(byId.fullSlug);
33
+ }
34
+ claimsByFullId.set(claim.fullId, claim);
35
+ claimsBySlug.set(claim.fullSlug, claim);
36
+ }
37
+ //# sourceMappingURL=form-page-routes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-page-routes.js","sourceRoot":"","sources":["../../src/page/form-page-routes.ts"],"names":[],"mappings":";;;AAuDA,gDAwBC;AAvED,yCAAsE;AAmBtE,MAAa,0BAA2B,SAAQ,KAAK;IACnD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;IAC3C,CAAC;CACF;AALD,gEAKC;AAED,MAAM,cAAc,GAAG,IAAI,GAAG,EAA8B,CAAC;AAC7D,MAAM,YAAY,GAAG,IAAI,GAAG,EAA8B,CAAC;AAE3D,SAAS,QAAQ,CACf,IAAwB,EACxB,KAAyB,EACzB,IAAY;IAEZ,MAAM,IAAI,0BAA0B,CAClC,oBAAoB,IAAI,CAAC,KAAK,oBAAoB,KAAK,CAAC,KAAK,cAAc,KAAK,CAAC,UAAU,0BAA0B,KAAK,CAAC,IAAI,eAAe,IAAI,gEAAgE,KAAK,CAAC,IAAI,WAAW,CACxO,CAAC;AACJ,CAAC;AAUD,SAAgB,kBAAkB,CAAC,KAAyB;IAC1D,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9C,IACE,IAAI;QACJ,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK;QAC1B,+BAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EACtC,CAAC;QACD,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,iBAAiB,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAChD,IACE,MAAM;QACN,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK;QAC5B,6BAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EACtC,CAAC;QACD,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;IACpD,CAAC;IAED,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC7C,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IACD,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACxC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC1C,CAAC"}
@@ -19,6 +19,7 @@ const categories_1 = require("./categories");
19
19
  const component_tree_1 = require("./component-tree");
20
20
  const extension_assembly_1 = require("./extension-assembly");
21
21
  const extension_validation_1 = require("./extension-validation");
22
+ const form_page_routes_1 = require("./form-page-routes");
22
23
  const layout_filter_1 = require("./layout-filter");
23
24
  const registry_1 = require("./registry");
24
25
  const page_registration_1 = require("./page-registration");
@@ -432,6 +433,8 @@ class PageMetadata {
432
433
  node.component.onPageCreated(this);
433
434
  }
434
435
  catch (error) {
436
+ if (error instanceof form_page_routes_1.FormPageRouteConflictError)
437
+ throw error;
435
438
  logging_1.Logging.Error(`[dms] component "${node.permissionId}" failed its onCreated hook on page "${this.pageInfo?.fullId}": ${String(error)}`);
436
439
  }
437
440
  }
@@ -503,6 +506,8 @@ class PageMetadata {
503
506
  catch (error) {
504
507
  entries.pop();
505
508
  this.unregisterComponent(contribution.component, this.extensionComponentPath(contribution));
509
+ if (error instanceof form_page_routes_1.FormPageRouteConflictError)
510
+ throw error;
506
511
  logging_1.Logging.Error(`[dms] page extension "${info.extensionName}" could not register component "${contribution.key}" on page "${info.targetFullId}": ${String(error)}`);
507
512
  }
508
513
  }