@docengine/editor 0.0.105 → 0.0.106

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.
Files changed (34) hide show
  1. package/README.md +5 -1
  2. package/lib/.tsbuildinfo +1 -1
  3. package/lib/create-editor.d.ts.map +1 -1
  4. package/lib/fields/inline-fields.d.ts +1 -1
  5. package/lib/index.d.ts +1 -1
  6. package/lib/index.d.ts.map +1 -1
  7. package/lib/index.js +1 -1
  8. package/lib/index.js.map +1 -1
  9. package/lib/ui/field-mapping-badges.test.js +11 -11
  10. package/lib/ui/field-mapping-badges.test.js.map +1 -1
  11. package/lib/ui/mapping-drag-drop.test.js +11 -11
  12. package/lib/ui/mapping-drag-drop.test.js.map +1 -1
  13. package/lib/ui/mapping-result-helper.d.ts +1 -1
  14. package/lib/ui/mapping-result-helper.d.ts.map +1 -1
  15. package/lib/ui/mapping-result-helper.js +32 -13
  16. package/lib/ui/mapping-result-helper.js.map +1 -1
  17. package/lib/ui/mapping-result-helper.test.js +58 -20
  18. package/lib/ui/mapping-result-helper.test.js.map +1 -1
  19. package/lib/ui/source-path-canvas-drop.test.js +28 -28
  20. package/lib/ui/source-path-canvas-drop.test.js.map +1 -1
  21. package/lib/ui/source-schema-tree.d.ts.map +1 -1
  22. package/lib/ui/source-schema-tree.js +4 -0
  23. package/lib/ui/source-schema-tree.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/index.ts +3 -0
  26. package/src/styles/editor.css +109 -87
  27. package/src/themes/bridge.css +134 -15
  28. package/src/themes/prime.css +128 -37
  29. package/src/ui/field-mapping-badges.test.ts +11 -11
  30. package/src/ui/mapping-drag-drop.test.ts +11 -11
  31. package/src/ui/mapping-result-helper.test.ts +61 -20
  32. package/src/ui/mapping-result-helper.ts +30 -12
  33. package/src/ui/source-path-canvas-drop.test.ts +32 -32
  34. package/src/ui/source-schema-tree.ts +3 -0
@@ -78,12 +78,12 @@
78
78
  --me-field-missing-color: #b45309;
79
79
  --me-field-missing-bg: #fffbeb;
80
80
  --me-field-missing-outline: #f59e0b;
81
- --me-field-filled-color: #0d9488;
82
- --me-field-filled-bg: #f0fdfa;
81
+ --me-field-filled-color: #0f766e;
82
+ --me-field-filled-bg: #ccfbf1;
83
83
  --me-field-inert-color: #64748b;
84
- --me-field-active-outline: #0000FF;
85
- --me-field-fill-color: #0000FF;
86
- --me-field-fill-bg: #F0FDFA;
84
+ --me-field-active-outline: #0d9488;
85
+ --me-field-fill-color: #0f766e;
86
+ --me-field-fill-bg: #ccfbf1;
87
87
  --me-field-fill-font-weight: 500;
88
88
  --me-field-fill-border-width: 1px;
89
89
 
@@ -636,8 +636,48 @@
636
636
  color: var(--me-text);
637
637
  }
638
638
 
639
+ .field-palette__database,
639
640
  .field-palette__body {
640
641
  background: var(--me-surface-0);
642
+ color: var(--me-text);
643
+ }
644
+
645
+ .field-palette__database-header,
646
+ .field-palette__database-toolbar {
647
+ border-color: var(--me-border);
648
+ color: var(--me-text);
649
+ }
650
+
651
+ .field-mapping-schema {
652
+ background: var(--me-surface-0);
653
+ border-color: var(--me-border);
654
+ color: var(--me-text);
655
+ }
656
+
657
+ .field-mapping-schema__drag {
658
+ background: var(--me-surface-muted);
659
+ color: var(--me-text);
660
+ }
661
+
662
+ .field-mapping-schema__drag:hover,
663
+ .field-mapping-schema__drag--active {
664
+ border-color: var(--me-accent-border, var(--me-primary));
665
+ background: var(--me-accent-surface);
666
+ }
667
+
668
+ .field-mapping-schema__key {
669
+ color: var(--me-text);
670
+ }
671
+
672
+ .field-mapping-schema__type,
673
+ .field-mapping-schema__toggle {
674
+ color: var(--me-text-muted);
675
+ }
676
+
677
+ .field-mapping-editor-mount {
678
+ background: var(--me-surface-0);
679
+ border-color: var(--me-border);
680
+ color: var(--me-text);
641
681
  }
642
682
 
643
683
  .design-panel--left .field-palette--vertical {
@@ -697,27 +737,37 @@ body:has(.page > .design-shell:not(.design-shell--active)) {
697
737
  }
698
738
 
699
739
  .design-panel--center {
700
- background: #f1f5f9;
740
+ background: var(--me-surface-100, #f1f5f9);
701
741
  padding: var(--me-space-4);
702
742
  }
703
743
 
704
744
  .design-panel {
705
- background: #f1f5f9;
745
+ background: var(--me-surface-100, #f1f5f9);
706
746
  }
707
747
 
708
748
  .design-panel__editor-scroll {
709
749
  border: none;
710
750
  border-radius: var(--me-radius-md);
711
751
  box-shadow: none;
712
- background: #f1f5f9;
752
+ background: var(--me-surface-100, #f1f5f9);
713
753
  }
714
754
 
715
755
  .design-panel__editor-scroll--fill-page,
716
756
  .design-panel__editor-scroll:has(.editor-holder--fill-page) {
717
- background: #f1f5f9;
757
+ background: var(--me-surface-100, #f1f5f9);
718
758
  box-shadow: none;
719
759
  }
720
760
 
761
+ /* Print sheet: always light, even when chrome tokens follow a dark host. */
762
+ .editor-holder--fill-page .codex-editor,
763
+ .design-panel__editor-scroll .codex-editor {
764
+ background: #fff;
765
+ color: #1a1a1a;
766
+ --me-surface-0: #fff;
767
+ --me-field-fill-bg: #f0fdfa;
768
+ --me-field-fill-color: #0000ff;
769
+ }
770
+
721
771
  .design-panel__editor-scroll .editor-holder,
722
772
  .design-panel--center .editor-holder {
723
773
  background: transparent;
@@ -839,9 +889,9 @@ body:has(.page > .design-shell:not(.design-shell--active)) {
839
889
  }
840
890
 
841
891
  .form-callout {
842
- background: #f8fafc;
892
+ background: var(--me-accent-hover, #f8fafc);
843
893
  color: #64748b;
844
- border: 1px solid #e2e8f0;
894
+ border: 1px solid var(--me-border, #e2e8f0);
845
895
  border-radius: 8px;
846
896
  line-height: 1.55;
847
897
  }
@@ -1018,6 +1068,75 @@ body:has(.page > .design-shell:not(.design-shell--active)) {
1018
1068
  z-index: var(--me-overlay-z-index);
1019
1069
  }
1020
1070
 
1071
+ /* Field mapping mounts on document.body — must sit above OpenVue Dialog. */
1072
+ .modal-overlay--field-mapping {
1073
+ z-index: 50000;
1074
+ }
1075
+
1076
+ .modal-overlay--field-mapping .modal--field-mapping,
1077
+ .modal-overlay--field-mapping .field-mapping-panel,
1078
+ .modal-overlay--field-mapping .field-mapping-panel__preview,
1079
+ .modal-overlay--field-mapping .field-mapping-tree,
1080
+ .modal-overlay--field-mapping .field-mapping-schema,
1081
+ .modal-overlay--field-mapping .field-mapping-result-highlight,
1082
+ .modal-overlay--field-mapping .field-mapping-path-helper {
1083
+ background: var(--me-surface-0);
1084
+ border-color: var(--me-border);
1085
+ color: var(--me-text);
1086
+ }
1087
+
1088
+ .modal-overlay--field-mapping .field-mapping-panel {
1089
+ background: var(--me-surface-muted);
1090
+ }
1091
+
1092
+ /* Template fields sheet — keep print-light tokens (do not inherit chrome dark). */
1093
+ .modal-overlay--field-mapping .field-mapping-editor-mount,
1094
+ .modal-overlay--field-mapping .field-mapping-editor-holder,
1095
+ .modal-overlay--field-mapping .field-mapping-editor-holder .codex-editor {
1096
+ background: #fff;
1097
+ color: #1a1a1a;
1098
+ --me-surface-0: #fff;
1099
+ --me-surface-muted: #f5f5f5;
1100
+ --me-text: #1a1a1a;
1101
+ --me-text-body: #1a1a1a;
1102
+ --me-text-muted: #64748b;
1103
+ --me-field-fill-bg: #ccfbf1;
1104
+ --me-field-fill-color: #0f766e;
1105
+ --me-accent-color: #2563eb;
1106
+ }
1107
+
1108
+ .modal-overlay--field-mapping .field-mapping-panel__textarea,
1109
+ .modal-overlay--field-mapping .modal__search,
1110
+ .modal-overlay--field-mapping textarea,
1111
+ .modal-overlay--field-mapping input[type='search'] {
1112
+ background: var(--me-surface-0);
1113
+ border-color: var(--me-border-input);
1114
+ color: var(--me-text);
1115
+ }
1116
+
1117
+ .modal-overlay--field-mapping .field-mapping-schema__drag {
1118
+ background: var(--me-surface-100);
1119
+ color: var(--me-text);
1120
+ }
1121
+
1122
+ .modal-overlay--field-mapping .field-mapping-schema__drag:hover,
1123
+ .modal-overlay--field-mapping .field-mapping-schema__drag--active {
1124
+ background: var(--me-accent-surface);
1125
+ border-color: var(--me-accent-border);
1126
+ }
1127
+
1128
+ .modal-overlay--field-mapping .field-mapping-path-helper__item:hover,
1129
+ .modal-overlay--field-mapping .field-mapping-path-helper__item--active {
1130
+ background: var(--me-accent-surface);
1131
+ }
1132
+
1133
+ .modal-overlay--field-mapping .modal__header,
1134
+ .modal-overlay--field-mapping .modal__footer {
1135
+ background: var(--me-surface-100);
1136
+ border-color: var(--me-border);
1137
+ color: var(--me-text);
1138
+ }
1139
+
1021
1140
  /* Inside LightningModal / .doc-shell — cover the host, stay in focus trap */
1022
1141
  .modal-overlay--contained {
1023
1142
  position: absolute;
@@ -1589,12 +1708,12 @@ body.design-mode .ce-block--selected .ce-block__content {
1589
1708
 
1590
1709
  .vision-table th,
1591
1710
  .vision-table td {
1592
- border: 1px solid #e2e8f0;
1711
+ border: 1px solid var(--me-border, #e2e8f0);
1593
1712
  padding: var(--me-space-2) var(--me-space-3);
1594
1713
  }
1595
1714
 
1596
1715
  .vision-table th {
1597
- background: #f8fafc;
1716
+ background: var(--me-accent-hover, #f8fafc);
1598
1717
  font-family: inherit;
1599
1718
  font-size: inherit;
1600
1719
  font-weight: inherit;
@@ -1603,7 +1722,7 @@ body.design-mode .ce-block--selected .ce-block__content {
1603
1722
  text-transform: none;
1604
1723
  letter-spacing: normal;
1605
1724
  text-align: inherit;
1606
- border-bottom: 1px solid #e2e8f0;
1725
+ border-bottom: 1px solid var(--me-border, #e2e8f0);
1607
1726
  }
1608
1727
 
1609
1728
  .vision-table tbody tr:nth-child(even) td {
@@ -1611,7 +1730,7 @@ body.design-mode .ce-block--selected .ce-block__content {
1611
1730
  }
1612
1731
 
1613
1732
  .vision-table tbody tr:hover td {
1614
- background: #f8fafc;
1733
+ background: var(--me-accent-hover, #f8fafc);
1615
1734
  }
1616
1735
 
1617
1736
  .vision-table__col-resizer:hover::after,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * PrimeVue 4 theme adapter for @docengine/editor.
2
+ * PrimeVue 4 / OpenVue theme adapter for @docengine/editor.
3
3
  *
4
4
  * Requires PrimeVue styled mode (design tokens / --p-* CSS variables).
5
5
  * Import after styles.css and bridge.css:
@@ -8,44 +8,75 @@
8
8
  * import '@docengine/editor/themes/bridge.css';
9
9
  * import '@docengine/editor/themes/prime.css';
10
10
  *
11
- * Recommended PrimeVue setup (main.js):
11
+ * Surfaces and accents are derived from semantic tokens (--p-content-background,
12
+ * --p-text-color, --p-primary-color) so Template design chrome follows light and
13
+ * dark hosts. Do not bind chrome to raw --p-surface-N / --p-primary-50 — Aura
14
+ * keeps those as a fixed light→dark ramp that does not flip under .app-dark.
15
+ *
16
+ * Recommended host setup:
12
17
  *
13
18
  * app.use(PrimeVue, {
14
19
  * theme: {
15
20
  * preset: Aura,
16
- * options: {
17
- * cssLayer: {
18
- * name: 'primevue',
19
- * order: 'reset, primevue, doc-editor, app',
20
- * },
21
- * },
21
+ * options: { darkModeSelector: '.app-dark' },
22
22
  * },
23
23
  * });
24
- *
25
- * Then wrap bridge + prime imports in @layer doc-editor { ... } in your
26
- * app entry, or import them after PrimeVue so overrides apply correctly.
27
24
  */
28
25
 
29
- :root {
26
+ /*
27
+ * Bind tokens on chrome hosts (not only :root) so --p-* dark values under
28
+ * .app-dark re-resolve for Template design panels and toolbar.
29
+ */
30
+ :root,
31
+ .editor-holder,
32
+ .design-shell,
33
+ .doc-editor-host,
34
+ .document-builder,
35
+ .modal-overlay {
30
36
  /* Brand */
31
37
  --me-primary: var(--p-primary-color, #4a7ab5);
32
38
  --me-primary-hover: var(--p-primary-hover-color, #3a6a9f);
33
39
  --me-primary-contrast: var(--p-primary-contrast-color, #fff);
34
- --me-primary-muted: var(--p-primary-600, #2a5a9e);
40
+ --me-primary-muted: var(--p-primary-color, #2a5a9e);
35
41
 
36
- /* Surfaces */
42
+ /* Surfaces — mode-aware mixes (not raw Aura surface steps) */
37
43
  --me-surface-0: var(--p-content-background, #fff);
38
- --me-surface-50: var(--p-surface-50, #f8f8f8);
39
- --me-surface-100: var(--p-surface-100, #f4f4f4);
40
- --me-surface-200: var(--p-surface-200, #f0f0f0);
41
- --me-surface-300: var(--p-surface-300, #e8e8e8);
42
- --me-surface-muted: var(--p-surface-50, #fafafa);
44
+ --me-surface-50: color-mix(
45
+ in srgb,
46
+ var(--p-content-background, #fff) 96%,
47
+ var(--p-text-color, #1a1a1a)
48
+ );
49
+ --me-surface-100: color-mix(
50
+ in srgb,
51
+ var(--p-content-background, #fff) 92%,
52
+ var(--p-text-color, #1a1a1a)
53
+ );
54
+ --me-surface-200: color-mix(
55
+ in srgb,
56
+ var(--p-content-background, #fff) 86%,
57
+ var(--p-text-color, #1a1a1a)
58
+ );
59
+ --me-surface-300: color-mix(
60
+ in srgb,
61
+ var(--p-content-background, #fff) 76%,
62
+ var(--p-text-color, #1a1a1a)
63
+ );
64
+ --me-surface-muted: color-mix(
65
+ in srgb,
66
+ var(--p-content-background, #fff) 96%,
67
+ var(--p-text-color, #1a1a1a)
68
+ );
43
69
 
44
70
  /* Borders */
45
71
  --me-border: var(--p-content-border-color, #ccc);
46
72
  --me-border-strong: var(--p-form-field-border-color, #999);
47
73
  --me-border-input: var(--p-inputtext-border-color, #aaa);
48
- --me-border-subtle: var(--p-surface-200, #ddd);
74
+ --me-border-subtle: color-mix(
75
+ in srgb,
76
+ var(--p-content-background, #fff) 86%,
77
+ var(--p-text-color, #1a1a1a)
78
+ );
79
+ --me-border-color: var(--me-border);
49
80
 
50
81
  /* Text */
51
82
  --me-text: var(--p-text-color, #1a1a1a);
@@ -54,37 +85,97 @@
54
85
  --me-text-subtle: var(--p-text-muted-color, #666);
55
86
  --me-text-placeholder: var(--p-text-muted-color, #888);
56
87
 
57
- /* Accent panels */
58
- --me-accent-surface: var(--p-primary-50, #e8f0fa);
59
- --me-accent-border: var(--p-primary-200, #9ab);
60
- --me-accent-hover: var(--p-primary-50, #f0f8ff);
61
- --me-accent-hover-border: var(--p-primary-300, #7a9);
62
- --me-accent-panel: var(--p-surface-100, #e4eaf2);
88
+ /* Accent panels — never --p-primary-50 (stays light in dark mode) */
89
+ --me-accent-surface: color-mix(
90
+ in srgb,
91
+ var(--p-primary-color, #4a7ab5) 14%,
92
+ var(--p-content-background, #fff)
93
+ );
94
+ --me-accent-border: color-mix(
95
+ in srgb,
96
+ var(--p-primary-color, #4a7ab5) 35%,
97
+ var(--p-content-border-color, #ccc)
98
+ );
99
+ --me-accent-hover: color-mix(
100
+ in srgb,
101
+ var(--p-primary-color, #4a7ab5) 20%,
102
+ var(--p-content-background, #fff)
103
+ );
104
+ --me-accent-hover-border: var(--p-primary-color, #4a7ab5);
105
+ --me-accent-panel: color-mix(
106
+ in srgb,
107
+ var(--p-content-background, #fff) 92%,
108
+ var(--p-text-color, #1a1a1a)
109
+ );
63
110
 
64
- /* Filled field pills */
65
- --me-field-filled-bg: var(--p-primary-50, #e8f0fa);
66
- --me-field-filled-color: var(--p-primary-color, #4a7ab5);
111
+ /* Filled / empty field pills — mix against white paper, not chrome bg
112
+ * (content-background is dark in app-dark and would wash pills to black). */
113
+ --me-field-filled-bg: color-mix(
114
+ in srgb,
115
+ var(--p-primary-color, #0d9488) 22%,
116
+ #ffffff
117
+ );
118
+ --me-field-filled-color: var(--p-primary-color, #0f766e);
119
+ --me-field-fill-bg: color-mix(
120
+ in srgb,
121
+ var(--p-primary-color, #0d9488) 22%,
122
+ #ffffff
123
+ );
124
+ --me-field-fill-color: var(--p-primary-color, #0f766e);
125
+ --me-field-fill-font-weight: 500;
126
+ --me-field-fill-border-width: 1px;
127
+ --me-field-active-outline: var(--p-primary-color, #4a7ab5);
67
128
 
68
129
  /* Focus / selection */
69
130
  --me-focus-color: var(--p-primary-color, #4a7ab5);
70
- --me-focus-ring: var(--p-focus-ring-shadow, 0 0 0 2px color-mix(in srgb, var(--p-primary-color) 35%, transparent));
131
+ --me-focus-ring: var(
132
+ --p-focus-ring-shadow,
133
+ 0 0 0 2px color-mix(in srgb, var(--p-primary-color) 35%, transparent)
134
+ );
71
135
  --me-selection-outline: var(--p-primary-color, #2563eb);
72
- --me-selection-text: #0f172a;
73
- --me-selection-bg: var(--p-primary-50, #eff6ff);
136
+ --me-selection-text: var(--p-text-color, #0f172a);
137
+ --me-selection-bg: color-mix(
138
+ in srgb,
139
+ var(--p-primary-color, #4a7ab5) 16%,
140
+ var(--p-content-background, #fff)
141
+ );
74
142
  --me-drop-indicator: var(--p-primary-color, #2563eb);
75
143
 
76
144
  /* Semantic */
77
145
  --me-danger: var(--p-red-500, #c44);
78
146
  --me-danger-strong: var(--p-red-600, #b00020);
79
- --me-danger-bg: var(--p-red-50, #fee);
80
- --me-danger-surface: var(--p-red-50, #fff3f3);
81
- --me-danger-border: var(--p-red-200, #e0a0a0);
147
+ --me-danger-bg: color-mix(
148
+ in srgb,
149
+ var(--p-red-500, #c44) 14%,
150
+ var(--p-content-background, #fff)
151
+ );
152
+ --me-danger-surface: color-mix(
153
+ in srgb,
154
+ var(--p-red-500, #c44) 10%,
155
+ var(--p-content-background, #fff)
156
+ );
157
+ --me-danger-border: color-mix(
158
+ in srgb,
159
+ var(--p-red-500, #c44) 35%,
160
+ var(--p-content-border-color, #ccc)
161
+ );
82
162
  --me-warning: var(--p-yellow-500, #e6a800);
83
- --me-warning-bg: var(--p-yellow-50, #fff3cd);
163
+ --me-warning-bg: color-mix(
164
+ in srgb,
165
+ var(--p-yellow-500, #e6a800) 16%,
166
+ var(--p-content-background, #fff)
167
+ );
84
168
  --me-warning-outline: var(--p-yellow-600, #c9a227);
85
169
 
86
170
  /* Typography */
87
- --me-font-family: var(--p-font-family, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
171
+ --me-font-family: var(
172
+ --p-font-family,
173
+ 'Segoe UI',
174
+ Tahoma,
175
+ Geneva,
176
+ Verdana,
177
+ sans-serif
178
+ );
88
179
  --me-font-size: var(--p-form-field-font-size, 13px);
89
180
  --me-font-size-sm: var(--p-form-field-sm-font-size, 12px);
90
181
  --me-font-size-xs: 11px;
@@ -20,7 +20,7 @@ describe('field-mapping-badges', () => {
20
20
  section: 'Anamnesis',
21
21
  field: 'Complaints',
22
22
  fieldId: 'fld1',
23
- sourcePath: '$payload.sections.anamnesis.complaints',
23
+ sourcePath: 'sections.anamnesis.complaints',
24
24
  },
25
25
  ];
26
26
 
@@ -28,11 +28,11 @@ describe('field-mapping-badges', () => {
28
28
 
29
29
  const token = holder.querySelector('.field-token');
30
30
  assert.ok(token.classList.contains('field-token--mapped'));
31
- assert.equal(token.title, '$payload.sections.anamnesis.complaints');
32
- assert.equal(token.dataset.sourcePath, '$payload.sections.anamnesis.complaints');
31
+ assert.equal(token.title, 'sections.anamnesis.complaints');
32
+ assert.equal(token.dataset.sourcePath, 'sections.anamnesis.complaints');
33
33
  assert.equal(
34
34
  token.querySelector('.field-token__mapping-badge')?.title,
35
- '$payload.sections.anamnesis.complaints',
35
+ 'sections.anamnesis.complaints',
36
36
  );
37
37
  });
38
38
 
@@ -49,13 +49,13 @@ describe('field-mapping-badges', () => {
49
49
  {
50
50
  section: 'main',
51
51
  field: '_source',
52
- sourcePath: '$payload.Contacts',
53
- sourceArrayPath: '$payload.Contacts',
52
+ sourcePath: 'Contacts',
53
+ sourceArrayPath: 'Contacts',
54
54
  },
55
55
  ]);
56
56
  const header = holder.querySelector('.document-section__header');
57
57
  assert.ok(header?.classList.contains('document-section__header--sourced'));
58
- assert.equal(header?.dataset.sectionSource, '$payload.Contacts');
58
+ assert.equal(header?.dataset.sectionSource, 'Contacts');
59
59
  assert.match(
60
60
  header?.querySelector('.document-section__source-badge')?.textContent ?? '',
61
61
  /_source:\s*Contacts/,
@@ -73,21 +73,21 @@ describe('field-mapping-badges', () => {
73
73
  section: 'Anamnesis',
74
74
  field: 'Complaints',
75
75
  fieldId: 'fld1',
76
- sourcePath: '$payload.a',
76
+ sourcePath: 'a',
77
77
  },
78
78
  {
79
79
  section: 'VA',
80
80
  field: 'Table',
81
81
  fieldId: 'tbl',
82
82
  columnKey: 'vis',
83
- sourcePath: '$payload.b',
83
+ sourcePath: 'b',
84
84
  },
85
85
  ];
86
86
  applyMappingBadges(holder, rules);
87
87
 
88
88
  const plain = holder.querySelector('[data-field-id="fld1"]');
89
89
  const cell = holder.querySelector('.field-token--cell');
90
- assert.equal(findRuleForMappedToken(plain, rules)?.sourcePath, '$payload.a');
91
- assert.equal(findRuleForMappedToken(cell, rules)?.sourcePath, '$payload.b');
90
+ assert.equal(findRuleForMappedToken(plain, rules)?.sourcePath, 'a');
91
+ assert.equal(findRuleForMappedToken(cell, rules)?.sourcePath, 'b');
92
92
  });
93
93
  });
@@ -12,13 +12,13 @@ describe('mapping-drag-drop section source helpers', () => {
12
12
  {
13
13
  section: 'main',
14
14
  field: '_source',
15
- sourcePath: '$payload.Contacts',
16
- sourceArrayPath: '$payload.Contacts',
15
+ sourcePath: 'Contacts',
16
+ sourceArrayPath: 'Contacts',
17
17
  },
18
18
  ]),
19
- '$payload.Contacts',
19
+ 'Contacts',
20
20
  );
21
- assert.equal(getSectionSourcePath('other', [{ section: 'main', field: '_source', sourcePath: '$payload.X' }]), null);
21
+ assert.equal(getSectionSourcePath('other', [{ section: 'main', field: '_source', sourcePath: 'X' }]), null);
22
22
  });
23
23
 
24
24
  it('rewrites absolute field paths under section source to relative', () => {
@@ -27,18 +27,18 @@ describe('mapping-drag-drop section source helpers', () => {
27
27
  {
28
28
  section: 'main',
29
29
  field: 'Name',
30
- sourcePath: '$payload.Contacts.Name',
30
+ sourcePath: 'Contacts.Name',
31
31
  },
32
32
  {
33
33
  section: 'main',
34
34
  field: 'Phone',
35
- sourcePath: '$payload.AccountPhone',
35
+ sourcePath: 'AccountPhone',
36
36
  },
37
37
  ],
38
- '$payload.Contacts',
38
+ 'Contacts',
39
39
  );
40
40
  assert.equal(next[0].sourcePath, '$Name');
41
- assert.equal(next[1].sourcePath, '$payload.AccountPhone');
41
+ assert.equal(next[1].sourcePath, 'AccountPhone');
42
42
  });
43
43
 
44
44
  it('shortens nested values.amount column drops to $amount under $values', () => {
@@ -49,11 +49,11 @@ describe('mapping-drag-drop section source helpers', () => {
49
49
  field: 'Table',
50
50
  fieldId: 'table_1',
51
51
  columnKey: 'amount',
52
- sourcePath: '$payload.sections.items.Table.values.amount',
53
- sourceArrayPath: '$payload.sections.items.Table.values',
52
+ sourcePath: 'sections.items.Table.values.amount',
53
+ sourceArrayPath: 'sections.items.Table.values',
54
54
  },
55
55
  ],
56
- '$payload.sections.items.Table',
56
+ 'sections.items.Table',
57
57
  );
58
58
  assert.equal(next[0].sourceArrayPath, '$values');
59
59
  assert.equal(next[0].sourcePath, '$amount');