@rangka/client 0.1.1 → 0.1.3
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/dist/App.d.ts.map +1 -1
- package/dist/App.js +7 -1
- package/dist/App.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +20 -0
- package/dist/main.js.map +1 -1
- package/dist/shell/assets/index-63v1sBS3.css +1 -0
- package/dist/shell/assets/index-Dh7K40cQ.js +8634 -0
- package/dist/shell/assets/vendor-query-B2cydN5j.js +1 -0
- package/dist/shell/assets/vendor-radix-BJxYPxPb.js +69 -0
- package/dist/shell/assets/vendor-router-ET_myMt5.js +17 -0
- package/dist/shell/index.html +5 -2
- package/dist/theme.css +82 -0
- package/dist/widgets/components/lazy-manifest.d.ts +11 -0
- package/dist/widgets/components/lazy-manifest.d.ts.map +1 -0
- package/dist/widgets/components/lazy-manifest.js +32 -0
- package/dist/widgets/components/lazy-manifest.js.map +1 -0
- package/dist/widgets/components/register.js +12 -12
- package/dist/widgets/components/register.js.map +1 -1
- package/dist/widgets/loader.d.ts +3 -0
- package/dist/widgets/loader.d.ts.map +1 -0
- package/dist/widgets/loader.js +73 -0
- package/dist/widgets/loader.js.map +1 -0
- package/dist/widgets/renderer/LazyWidget.d.ts +8 -0
- package/dist/widgets/renderer/LazyWidget.d.ts.map +1 -0
- package/dist/widgets/renderer/LazyWidget.js +31 -0
- package/dist/widgets/renderer/LazyWidget.js.map +1 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.d.ts +17 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.d.ts.map +1 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.js +18 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.js.map +1 -0
- package/dist/widgets/renderer/WidgetRenderer.d.ts.map +1 -1
- package/dist/widgets/renderer/WidgetRenderer.js +8 -6
- package/dist/widgets/renderer/WidgetRenderer.js.map +1 -1
- package/package.json +7 -4
- package/.claude/skills/add-widget/SKILL.md +0 -101
- package/.turbo/turbo-build.log +0 -29
- package/CHANGELOG.md +0 -25
- package/CLAUDE.md +0 -236
- package/components.json +0 -25
- package/dist/components/ui/chart.d.ts +0 -45
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/chart.js +0 -119
- package/dist/components/ui/chart.js.map +0 -1
- package/dist/shell/assets/index--35CAvcP.js +0 -8715
- package/dist/shell/assets/index-COLmoPYo.css +0 -1
- package/index.html +0 -12
- package/src/App.tsx +0 -44
- package/src/__tests__/setup.ts +0 -1
- package/src/api/auth.ts +0 -41
- package/src/api/boot.ts +0 -10
- package/src/api/client.ts +0 -26
- package/src/api/paths.ts +0 -3
- package/src/api/token.ts +0 -13
- package/src/auth/LoginForm.tsx +0 -67
- package/src/auth/SessionExpired.tsx +0 -24
- package/src/auth/SetupForm.tsx +0 -76
- package/src/boot/BootGate.tsx +0 -35
- package/src/boot/BootProvider.tsx +0 -28
- package/src/boot/types.ts +0 -9
- package/src/boot/useBoot.ts +0 -111
- package/src/components/Icon.tsx +0 -17
- package/src/components/ui/accordion.tsx +0 -82
- package/src/components/ui/alert-dialog.tsx +0 -180
- package/src/components/ui/alert.tsx +0 -76
- package/src/components/ui/aspect-ratio.tsx +0 -9
- package/src/components/ui/avatar.tsx +0 -94
- package/src/components/ui/badge.tsx +0 -45
- package/src/components/ui/breadcrumb.tsx +0 -104
- package/src/components/ui/button-group.tsx +0 -78
- package/src/components/ui/button.tsx +0 -65
- package/src/components/ui/calendar.tsx +0 -187
- package/src/components/ui/card.tsx +0 -85
- package/src/components/ui/carousel.tsx +0 -229
- package/src/components/ui/chart.tsx +0 -339
- package/src/components/ui/checkbox.tsx +0 -27
- package/src/components/ui/collapsible.tsx +0 -21
- package/src/components/ui/combobox.tsx +0 -275
- package/src/components/ui/command.tsx +0 -178
- package/src/components/ui/context-menu.tsx +0 -242
- package/src/components/ui/dialog.tsx +0 -146
- package/src/components/ui/direction.tsx +0 -20
- package/src/components/ui/drawer.tsx +0 -118
- package/src/components/ui/dropdown-menu.tsx +0 -247
- package/src/components/ui/empty.tsx +0 -94
- package/src/components/ui/field.tsx +0 -224
- package/src/components/ui/hover-card.tsx +0 -36
- package/src/components/ui/input-group.tsx +0 -142
- package/src/components/ui/input-otp.tsx +0 -86
- package/src/components/ui/input.tsx +0 -19
- package/src/components/ui/item.tsx +0 -182
- package/src/components/ui/kbd.tsx +0 -26
- package/src/components/ui/label.tsx +0 -19
- package/src/components/ui/menubar.tsx +0 -260
- package/src/components/ui/native-select.tsx +0 -55
- package/src/components/ui/navigation-menu.tsx +0 -160
- package/src/components/ui/pagination.tsx +0 -112
- package/src/components/ui/popover.tsx +0 -74
- package/src/components/ui/progress.tsx +0 -31
- package/src/components/ui/radio-group.tsx +0 -42
- package/src/components/ui/resizable.tsx +0 -42
- package/src/components/ui/scroll-area.tsx +0 -53
- package/src/components/ui/select.tsx +0 -185
- package/src/components/ui/separator.tsx +0 -26
- package/src/components/ui/sheet.tsx +0 -128
- package/src/components/ui/sidebar.tsx +0 -669
- package/src/components/ui/skeleton.tsx +0 -13
- package/src/components/ui/slider.tsx +0 -54
- package/src/components/ui/sonner.tsx +0 -43
- package/src/components/ui/spinner.tsx +0 -16
- package/src/components/ui/switch.tsx +0 -33
- package/src/components/ui/table.tsx +0 -87
- package/src/components/ui/tabs.tsx +0 -80
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/toggle-group.tsx +0 -86
- package/src/components/ui/toggle.tsx +0 -44
- package/src/components/ui/tooltip.tsx +0 -53
- package/src/context/MetaContext.tsx +0 -22
- package/src/context/ModuleContext.tsx +0 -62
- package/src/context/PermissionsContext.tsx +0 -39
- package/src/context/ShellProviders.tsx +0 -33
- package/src/context/UserContext.tsx +0 -16
- package/src/data/QueryProvider.tsx +0 -7
- package/src/data/queryClient.ts +0 -18
- package/src/data/useModelMeta.ts +0 -17
- package/src/data/useMutation.ts +0 -60
- package/src/data/useRecord.ts +0 -29
- package/src/data/useSource.ts +0 -112
- package/src/hooks/use-mobile.ts +0 -19
- package/src/index.css +0 -260
- package/src/index.ts +0 -16
- package/src/lib/utils.ts +0 -6
- package/src/main.tsx +0 -17
- package/src/router/NotFound.tsx +0 -8
- package/src/router/RouterProvider.tsx +0 -7
- package/src/router/buildRouteTree.tsx +0 -63
- package/src/router/createShellRouter.ts +0 -9
- package/src/router/hooks.ts +0 -43
- package/src/shell/CommandPalette.tsx +0 -76
- package/src/shell/ConfirmDialog.tsx +0 -34
- package/src/shell/ConfirmProvider.tsx +0 -56
- package/src/shell/DrawerContext.tsx +0 -44
- package/src/shell/HeaderActions.tsx +0 -31
- package/src/shell/ModuleSelectorPage.tsx +0 -149
- package/src/shell/PageOutlet.tsx +0 -21
- package/src/shell/ShellContext.tsx +0 -45
- package/src/shell/ShellDevTools.tsx +0 -153
- package/src/shell/ShellLayout.tsx +0 -231
- package/src/shell/Toast.tsx +0 -58
- package/src/shell/ToastProvider.tsx +0 -60
- package/src/shell/app-sidebar/AppSidebar.tsx +0 -44
- package/src/shell/app-sidebar/ModuleSwitcher.tsx +0 -87
- package/src/shell/app-sidebar/NavMain.tsx +0 -64
- package/src/shell/app-sidebar/NavUser.tsx +0 -97
- package/src/shell/app-sidebar/SearchMenu.tsx +0 -22
- package/src/shell/app-sidebar/index.ts +0 -8
- package/src/shell/app-sidebar/types.ts +0 -38
- package/src/shell/types.ts +0 -6
- package/src/shell/useBreadcrumbs.ts +0 -42
- package/src/studio/bridge.ts +0 -125
- package/src/studio/index.ts +0 -3
- package/src/studio/overlay.ts +0 -47
- package/src/studio/types.ts +0 -32
- package/src/studio/walker.ts +0 -48
- package/src/vite-env.d.ts +0 -1
- package/src/widgets/__tests__/action-edge-cases.test.ts +0 -281
- package/src/widgets/__tests__/action.test.ts +0 -236
- package/src/widgets/__tests__/attachment-widget.test.tsx +0 -85
- package/src/widgets/__tests__/attachments-widget.test.tsx +0 -109
- package/src/widgets/__tests__/binding.test.ts +0 -76
- package/src/widgets/__tests__/button-widget.test.tsx +0 -145
- package/src/widgets/__tests__/checkbox-widget.test.tsx +0 -158
- package/src/widgets/__tests__/code-widget.test.tsx +0 -64
- package/src/widgets/__tests__/computed-widget.test.tsx +0 -62
- package/src/widgets/__tests__/condition-edge-cases.test.ts +0 -120
- package/src/widgets/__tests__/condition.test.ts +0 -221
- package/src/widgets/__tests__/context.test.ts +0 -99
- package/src/widgets/__tests__/data-widget.test.tsx +0 -204
- package/src/widgets/__tests__/datepicker-widget.test.tsx +0 -66
- package/src/widgets/__tests__/datetime-widget.test.tsx +0 -67
- package/src/widgets/__tests__/drawer-widget.test.tsx +0 -149
- package/src/widgets/__tests__/dynamic-link-widget.test.tsx +0 -52
- package/src/widgets/__tests__/edge-cases.test.ts +0 -232
- package/src/widgets/__tests__/evaluator.test.ts +0 -107
- package/src/widgets/__tests__/functions.test.ts +0 -147
- package/src/widgets/__tests__/grid-widget.test.tsx +0 -137
- package/src/widgets/__tests__/hooks.test.tsx +0 -249
- package/src/widgets/__tests__/icon-widget.test.tsx +0 -129
- package/src/widgets/__tests__/input-widget.test.tsx +0 -264
- package/src/widgets/__tests__/integration.test.ts +0 -116
- package/src/widgets/__tests__/json-widget.test.tsx +0 -70
- package/src/widgets/__tests__/link-widget.test.tsx +0 -92
- package/src/widgets/__tests__/many-to-many-widget.test.tsx +0 -93
- package/src/widgets/__tests__/modal-widget.test.tsx +0 -148
- package/src/widgets/__tests__/money-widget.test.tsx +0 -97
- package/src/widgets/__tests__/parser.test.ts +0 -171
- package/src/widgets/__tests__/reactive-variables.test.ts +0 -383
- package/src/widgets/__tests__/renderer.test.tsx +0 -300
- package/src/widgets/__tests__/repeat-widget.test.tsx +0 -229
- package/src/widgets/__tests__/select-widget.test.tsx +0 -231
- package/src/widgets/__tests__/sequence-widget.test.tsx +0 -58
- package/src/widgets/__tests__/shell-integration.test.tsx +0 -1343
- package/src/widgets/__tests__/split-widget.test.tsx +0 -133
- package/src/widgets/__tests__/state-edge-cases.test.ts +0 -118
- package/src/widgets/__tests__/state.test.ts +0 -106
- package/src/widgets/__tests__/table-data-binding.test.tsx +0 -482
- package/src/widgets/__tests__/table-filter-popover.test.tsx +0 -486
- package/src/widgets/__tests__/table-search.test.tsx +0 -305
- package/src/widgets/__tests__/table-widget.test.tsx +0 -509
- package/src/widgets/__tests__/textarea-widget.test.tsx +0 -105
- package/src/widgets/__tests__/tracker-validator-edge-cases.test.ts +0 -242
- package/src/widgets/__tests__/tracker.test.ts +0 -133
- package/src/widgets/__tests__/tree-widget.test.tsx +0 -97
- package/src/widgets/__tests__/use-model-source.test.ts +0 -67
- package/src/widgets/__tests__/validator.test.ts +0 -208
- package/src/widgets/action/dispatcher.ts +0 -334
- package/src/widgets/action/index.ts +0 -2
- package/src/widgets/binding/index.ts +0 -2
- package/src/widgets/binding/resolver.ts +0 -61
- package/src/widgets/components/AttachmentWidget.tsx +0 -111
- package/src/widgets/components/AttachmentsWidget.tsx +0 -121
- package/src/widgets/components/BadgeWidget.tsx +0 -35
- package/src/widgets/components/ButtonWidget.tsx +0 -43
- package/src/widgets/components/CardWidget.tsx +0 -68
- package/src/widgets/components/CheckboxWidget.tsx +0 -39
- package/src/widgets/components/CodeWidget.tsx +0 -44
- package/src/widgets/components/ColumnWidget.tsx +0 -22
- package/src/widgets/components/ComputedWidget.tsx +0 -49
- package/src/widgets/components/DataWidget.tsx +0 -189
- package/src/widgets/components/DatePickerWidget.tsx +0 -73
- package/src/widgets/components/DatetimeWidget.tsx +0 -160
- package/src/widgets/components/DividerWidget.tsx +0 -37
- package/src/widgets/components/DrawerWidget.tsx +0 -52
- package/src/widgets/components/DynamicLinkWidget.tsx +0 -130
- package/src/widgets/components/GridWidget.tsx +0 -134
- package/src/widgets/components/GroupWidget.tsx +0 -111
- package/src/widgets/components/IconWidget.tsx +0 -29
- package/src/widgets/components/ImageWidget.tsx +0 -28
- package/src/widgets/components/InputWidget.tsx +0 -70
- package/src/widgets/components/JsonWidget.tsx +0 -78
- package/src/widgets/components/LinkWidget.tsx +0 -99
- package/src/widgets/components/ManyToManyWidget.tsx +0 -125
- package/src/widgets/components/ModalWidget.tsx +0 -52
- package/src/widgets/components/MoneyWidget.tsx +0 -80
- package/src/widgets/components/RepeatWidget.tsx +0 -66
- package/src/widgets/components/ScrollAreaWidget.tsx +0 -40
- package/src/widgets/components/SectionWidget.tsx +0 -78
- package/src/widgets/components/SelectWidget.tsx +0 -63
- package/src/widgets/components/SequenceWidget.tsx +0 -32
- package/src/widgets/components/SpacerWidget.tsx +0 -29
- package/src/widgets/components/SplitWidget.tsx +0 -60
- package/src/widgets/components/StackWidget.tsx +0 -44
- package/src/widgets/components/TableWidget.tsx +0 -366
- package/src/widgets/components/TextWidget.tsx +0 -44
- package/src/widgets/components/TextareaWidget.tsx +0 -49
- package/src/widgets/components/TreeWidget.tsx +0 -109
- package/src/widgets/components/index.ts +0 -30
- package/src/widgets/components/register.ts +0 -93
- package/src/widgets/components/table/CellRenderers.tsx +0 -83
- package/src/widgets/components/table/TablePagination.tsx +0 -45
- package/src/widgets/components/table/TableToolbar.tsx +0 -285
- package/src/widgets/components/table/filter-operators.ts +0 -134
- package/src/widgets/components/table/index.ts +0 -11
- package/src/widgets/condition/evaluator.ts +0 -57
- package/src/widgets/condition/index.ts +0 -1
- package/src/widgets/context/builder.ts +0 -99
- package/src/widgets/context/index.ts +0 -8
- package/src/widgets/context/types.ts +0 -37
- package/src/widgets/data/index.ts +0 -5
- package/src/widgets/data/useModelQuery.ts +0 -116
- package/src/widgets/data/useModelRecord.ts +0 -37
- package/src/widgets/expression/evaluator.ts +0 -100
- package/src/widgets/expression/functions.ts +0 -131
- package/src/widgets/expression/index.ts +0 -13
- package/src/widgets/expression/parser.ts +0 -229
- package/src/widgets/expression/types.ts +0 -45
- package/src/widgets/form/FormContext.ts +0 -29
- package/src/widgets/form/FormProvider.tsx +0 -84
- package/src/widgets/form/FormWidget.tsx +0 -42
- package/src/widgets/form/index.ts +0 -4
- package/src/widgets/form/useFormState.ts +0 -127
- package/src/widgets/form/useFormSubmit.ts +0 -90
- package/src/widgets/form/useFormValidation.ts +0 -62
- package/src/widgets/hooks/index.ts +0 -8
- package/src/widgets/hooks/useAction.ts +0 -83
- package/src/widgets/hooks/useBind.ts +0 -34
- package/src/widgets/hooks/useCondition.ts +0 -21
- package/src/widgets/hooks/useDataQuery.ts +0 -48
- package/src/widgets/hooks/useExpression.ts +0 -14
- package/src/widgets/hooks/usePageState.ts +0 -21
- package/src/widgets/hooks/useSurfaceContext.ts +0 -11
- package/src/widgets/hooks/useWidgetContext.ts +0 -14
- package/src/widgets/index.ts +0 -80
- package/src/widgets/lib/layout-props.ts +0 -135
- package/src/widgets/reactivity/index.ts +0 -11
- package/src/widgets/reactivity/tracker.ts +0 -139
- package/src/widgets/reactivity/variables.ts +0 -213
- package/src/widgets/registry.ts +0 -41
- package/src/widgets/renderer/SlotRenderer.tsx +0 -47
- package/src/widgets/renderer/WidgetRenderer.tsx +0 -191
- package/src/widgets/renderer/index.ts +0 -4
- package/src/widgets/shell/WidgetSlotRenderer.tsx +0 -73
- package/src/widgets/shell/index.ts +0 -4
- package/src/widgets/shell/useActionHandlers.ts +0 -170
- package/src/widgets/state/index.ts +0 -2
- package/src/widgets/state/store.ts +0 -96
- package/src/widgets/types.ts +0 -28
- package/src/widgets/validation/index.ts +0 -2
- package/src/widgets/validation/validator.ts +0 -140
- package/tsconfig.json +0 -27
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -21
- package/vitest.config.ts +0 -16
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { describe, test, expect } from 'vitest';
|
|
2
|
-
import { parse } from '../expression/parser.js';
|
|
3
|
-
|
|
4
|
-
describe('Expression Parser', () => {
|
|
5
|
-
test('parses number literal', () => {
|
|
6
|
-
expect(parse('{{42}}')).toEqual({ type: 'literal', value: 42 });
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
test('parses decimal number', () => {
|
|
10
|
-
expect(parse('{{3.14}}')).toEqual({ type: 'literal', value: 3.14 });
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
test('parses string literal (double quotes)', () => {
|
|
14
|
-
expect(parse('{{"hello"}}')).toEqual({ type: 'literal', value: 'hello' });
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
test('parses string literal (single quotes)', () => {
|
|
18
|
-
expect(parse("{{'world'}}")).toEqual({ type: 'literal', value: 'world' });
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
test('parses boolean true', () => {
|
|
22
|
-
expect(parse('{{true}}')).toEqual({ type: 'literal', value: true });
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
test('parses boolean false', () => {
|
|
26
|
-
expect(parse('{{false}}')).toEqual({ type: 'literal', value: false });
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
test('parses null', () => {
|
|
30
|
-
expect(parse('{{null}}')).toEqual({ type: 'literal', value: null });
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
test('parses field reference', () => {
|
|
34
|
-
expect(parse('{{qty}}')).toEqual({ type: 'field', path: ['qty'] });
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
test('parses dotted field reference', () => {
|
|
38
|
-
expect(parse('{{$parent.currency}}')).toEqual({ type: 'field', path: ['$parent', 'currency'] });
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
test('parses deep field reference', () => {
|
|
42
|
-
expect(parse('{{$root.company.name}}')).toEqual({
|
|
43
|
-
type: 'field',
|
|
44
|
-
path: ['$root', 'company', 'name'],
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
test('parses addition', () => {
|
|
49
|
-
expect(parse('{{a + b}}')).toEqual({
|
|
50
|
-
type: 'binary',
|
|
51
|
-
operator: '+',
|
|
52
|
-
left: { type: 'field', path: ['a'] },
|
|
53
|
-
right: { type: 'field', path: ['b'] },
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
test('parses multiplication', () => {
|
|
58
|
-
expect(parse('{{qty * rate}}')).toEqual({
|
|
59
|
-
type: 'binary',
|
|
60
|
-
operator: '*',
|
|
61
|
-
left: { type: 'field', path: ['qty'] },
|
|
62
|
-
right: { type: 'field', path: ['rate'] },
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
test('respects operator precedence', () => {
|
|
67
|
-
const ast = parse('{{a + b * c}}');
|
|
68
|
-
expect(ast).toEqual({
|
|
69
|
-
type: 'binary',
|
|
70
|
-
operator: '+',
|
|
71
|
-
left: { type: 'field', path: ['a'] },
|
|
72
|
-
right: {
|
|
73
|
-
type: 'binary',
|
|
74
|
-
operator: '*',
|
|
75
|
-
left: { type: 'field', path: ['b'] },
|
|
76
|
-
right: { type: 'field', path: ['c'] },
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
test('parses parenthesized expression', () => {
|
|
82
|
-
const ast = parse('{{(a + b) * c}}');
|
|
83
|
-
expect(ast).toEqual({
|
|
84
|
-
type: 'binary',
|
|
85
|
-
operator: '*',
|
|
86
|
-
left: {
|
|
87
|
-
type: 'binary',
|
|
88
|
-
operator: '+',
|
|
89
|
-
left: { type: 'field', path: ['a'] },
|
|
90
|
-
right: { type: 'field', path: ['b'] },
|
|
91
|
-
},
|
|
92
|
-
right: { type: 'field', path: ['c'] },
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
test('parses comparison operators', () => {
|
|
97
|
-
expect(parse('{{a == b}}')).toMatchObject({ type: 'binary', operator: '==' });
|
|
98
|
-
expect(parse('{{a != b}}')).toMatchObject({ type: 'binary', operator: '!=' });
|
|
99
|
-
expect(parse('{{a > b}}')).toMatchObject({ type: 'binary', operator: '>' });
|
|
100
|
-
expect(parse('{{a < b}}')).toMatchObject({ type: 'binary', operator: '<' });
|
|
101
|
-
expect(parse('{{a >= b}}')).toMatchObject({ type: 'binary', operator: '>=' });
|
|
102
|
-
expect(parse('{{a <= b}}')).toMatchObject({ type: 'binary', operator: '<=' });
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
test('parses logical operators', () => {
|
|
106
|
-
expect(parse('{{a && b}}')).toMatchObject({ type: 'binary', operator: '&&' });
|
|
107
|
-
expect(parse('{{a || b}}')).toMatchObject({ type: 'binary', operator: '||' });
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
test('parses unary not', () => {
|
|
111
|
-
expect(parse('{{!active}}')).toEqual({
|
|
112
|
-
type: 'unary',
|
|
113
|
-
operator: '!',
|
|
114
|
-
operand: { type: 'field', path: ['active'] },
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
test('parses unary negation', () => {
|
|
119
|
-
expect(parse('{{-5}}')).toEqual({
|
|
120
|
-
type: 'unary',
|
|
121
|
-
operator: '-',
|
|
122
|
-
operand: { type: 'literal', value: 5 },
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
test('parses function call with no args', () => {
|
|
127
|
-
expect(parse('{{today()}}')).toEqual({ type: 'call', name: 'today', args: [] });
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
test('parses function call with args', () => {
|
|
131
|
-
expect(parse('{{round(value, 2)}}')).toEqual({
|
|
132
|
-
type: 'call',
|
|
133
|
-
name: 'round',
|
|
134
|
-
args: [
|
|
135
|
-
{ type: 'field', path: ['value'] },
|
|
136
|
-
{ type: 'literal', value: 2 },
|
|
137
|
-
],
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
test('parses nested function call', () => {
|
|
142
|
-
const ast = parse('{{format_currency(sum(items), "USD")}}');
|
|
143
|
-
expect(ast).toEqual({
|
|
144
|
-
type: 'call',
|
|
145
|
-
name: 'format_currency',
|
|
146
|
-
args: [
|
|
147
|
-
{ type: 'call', name: 'sum', args: [{ type: 'field', path: ['items'] }] },
|
|
148
|
-
{ type: 'literal', value: 'USD' },
|
|
149
|
-
],
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
test('parses if function', () => {
|
|
154
|
-
const ast = parse('{{if(status == "draft", "Pending", "Done")}}');
|
|
155
|
-
expect(ast.type).toBe('call');
|
|
156
|
-
expect((ast as { name: string }).name).toBe('if');
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
test('parses without delimiters', () => {
|
|
160
|
-
expect(parse('qty * rate')).toEqual({
|
|
161
|
-
type: 'binary',
|
|
162
|
-
operator: '*',
|
|
163
|
-
left: { type: 'field', path: ['qty'] },
|
|
164
|
-
right: { type: 'field', path: ['rate'] },
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
test('throws on invalid input', () => {
|
|
169
|
-
expect(() => parse('{{@invalid}}')).toThrow();
|
|
170
|
-
});
|
|
171
|
-
});
|
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
import { describe, test, expect } from 'vitest';
|
|
2
|
-
import {
|
|
3
|
-
parseFilterKey,
|
|
4
|
-
getFiltersForModel,
|
|
5
|
-
getSortForModel,
|
|
6
|
-
getPageForModel,
|
|
7
|
-
isReactiveVariableKey,
|
|
8
|
-
getModelFromKey,
|
|
9
|
-
} from '../reactivity/variables.js';
|
|
10
|
-
import { StateStore } from '../state/store.js';
|
|
11
|
-
|
|
12
|
-
describe('parseFilterKey', () => {
|
|
13
|
-
test('parses simple eq filter', () => {
|
|
14
|
-
const result = parseFilterKey('$filter.sales.order.status');
|
|
15
|
-
expect(result).toEqual({ model: 'sales.order', field: 'status', operator: 'eq' });
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
test('parses __gt suffix', () => {
|
|
19
|
-
const result = parseFilterKey('$filter.sales.order.total__gt');
|
|
20
|
-
expect(result).toEqual({ model: 'sales.order', field: 'total', operator: 'gt' });
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
test('parses __gte suffix', () => {
|
|
24
|
-
const result = parseFilterKey('$filter.sales.order.total__gte');
|
|
25
|
-
expect(result).toEqual({ model: 'sales.order', field: 'total', operator: 'gte' });
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
test('parses __lt suffix', () => {
|
|
29
|
-
const result = parseFilterKey('$filter.sales.order.total__lt');
|
|
30
|
-
expect(result).toEqual({ model: 'sales.order', field: 'total', operator: 'lt' });
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
test('parses __lte suffix', () => {
|
|
34
|
-
const result = parseFilterKey('$filter.sales.order.total__lte');
|
|
35
|
-
expect(result).toEqual({ model: 'sales.order', field: 'total', operator: 'lte' });
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
test('parses __like suffix', () => {
|
|
39
|
-
const result = parseFilterKey('$filter.sales.order.name__like');
|
|
40
|
-
expect(result).toEqual({ model: 'sales.order', field: 'name', operator: 'like' });
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
test('parses __empty suffix', () => {
|
|
44
|
-
const result = parseFilterKey('$filter.sales.order.deleted_at__empty');
|
|
45
|
-
expect(result).toEqual({ model: 'sales.order', field: 'deleted_at', operator: 'empty' });
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
test('parses __not_empty suffix', () => {
|
|
49
|
-
const result = parseFilterKey('$filter.sales.order.email__not_empty');
|
|
50
|
-
expect(result).toEqual({ model: 'sales.order', field: 'email', operator: 'not_empty' });
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
test('returns null for non-filter keys', () => {
|
|
54
|
-
expect(parseFilterKey('$state.activeTab')).toBeNull();
|
|
55
|
-
expect(parseFilterKey('$sort.sales.order')).toBeNull();
|
|
56
|
-
expect(parseFilterKey('$page.sales.order')).toBeNull();
|
|
57
|
-
expect(parseFilterKey('random.key')).toBeNull();
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
test('returns null for filter key with too few segments', () => {
|
|
61
|
-
expect(parseFilterKey('$filter.sales')).toBeNull();
|
|
62
|
-
expect(parseFilterKey('$filter.')).toBeNull();
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
test('handles field names with underscores', () => {
|
|
66
|
-
const result = parseFilterKey('$filter.hr.employee.first_name');
|
|
67
|
-
expect(result).toEqual({ model: 'hr.employee', field: 'first_name', operator: 'eq' });
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
test('handles field with underscore and operator suffix', () => {
|
|
71
|
-
const result = parseFilterKey('$filter.hr.employee.start_date__gte');
|
|
72
|
-
expect(result).toEqual({ model: 'hr.employee', field: 'start_date', operator: 'gte' });
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
describe('getFiltersForModel', () => {
|
|
77
|
-
test('returns empty array when no filters exist', () => {
|
|
78
|
-
const state = new Map<string, unknown>();
|
|
79
|
-
expect(getFiltersForModel(state, 'sales.order')).toEqual([]);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
test('returns filters for the specified model only', () => {
|
|
83
|
-
const state = new Map<string, unknown>([
|
|
84
|
-
['$filter.sales.order.status', 'draft'],
|
|
85
|
-
['$filter.sales.order.total__gt', 100],
|
|
86
|
-
['$filter.hr.employee.name', 'John'],
|
|
87
|
-
]);
|
|
88
|
-
|
|
89
|
-
const filters = getFiltersForModel(state, 'sales.order');
|
|
90
|
-
expect(filters).toHaveLength(2);
|
|
91
|
-
expect(filters).toContainEqual({
|
|
92
|
-
model: 'sales.order',
|
|
93
|
-
field: 'status',
|
|
94
|
-
operator: 'eq',
|
|
95
|
-
value: 'draft',
|
|
96
|
-
});
|
|
97
|
-
expect(filters).toContainEqual({
|
|
98
|
-
model: 'sales.order',
|
|
99
|
-
field: 'total',
|
|
100
|
-
operator: 'gt',
|
|
101
|
-
value: 100,
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
test('uses "in" operator when value is an array', () => {
|
|
106
|
-
const state = new Map<string, unknown>([['$filter.sales.order.status', ['draft', 'pending']]]);
|
|
107
|
-
|
|
108
|
-
const filters = getFiltersForModel(state, 'sales.order');
|
|
109
|
-
expect(filters).toEqual([
|
|
110
|
-
{
|
|
111
|
-
model: 'sales.order',
|
|
112
|
-
field: 'status',
|
|
113
|
-
operator: 'in',
|
|
114
|
-
value: ['draft', 'pending'],
|
|
115
|
-
},
|
|
116
|
-
]);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
test('skips null/undefined values (cleared filters)', () => {
|
|
120
|
-
const state = new Map<string, unknown>([
|
|
121
|
-
['$filter.sales.order.status', null],
|
|
122
|
-
['$filter.sales.order.total__gt', undefined],
|
|
123
|
-
['$filter.sales.order.name', 'Acme'],
|
|
124
|
-
]);
|
|
125
|
-
|
|
126
|
-
const filters = getFiltersForModel(state, 'sales.order');
|
|
127
|
-
expect(filters).toHaveLength(1);
|
|
128
|
-
expect(filters[0].field).toBe('name');
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
test('ignores non-filter keys in the state', () => {
|
|
132
|
-
const state = new Map<string, unknown>([
|
|
133
|
-
['$state.activeTab', 'orders'],
|
|
134
|
-
['$sort.sales.order', '-date'],
|
|
135
|
-
['$filter.sales.order.status', 'active'],
|
|
136
|
-
]);
|
|
137
|
-
|
|
138
|
-
const filters = getFiltersForModel(state, 'sales.order');
|
|
139
|
-
expect(filters).toHaveLength(1);
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
describe('getSortForModel', () => {
|
|
144
|
-
test('returns null when sort not set', () => {
|
|
145
|
-
const state = new Map<string, unknown>();
|
|
146
|
-
expect(getSortForModel(state, 'sales.order')).toBeNull();
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
test('returns null when sort is null', () => {
|
|
150
|
-
const state = new Map<string, unknown>([['$sort.sales.order', null]]);
|
|
151
|
-
expect(getSortForModel(state, 'sales.order')).toBeNull();
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
test('returns null for empty string', () => {
|
|
155
|
-
const state = new Map<string, unknown>([['$sort.sales.order', '']]);
|
|
156
|
-
expect(getSortForModel(state, 'sales.order')).toBeNull();
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
test('parses single ascending sort', () => {
|
|
160
|
-
const state = new Map<string, unknown>([['$sort.sales.order', 'name']]);
|
|
161
|
-
expect(getSortForModel(state, 'sales.order')).toEqual([{ field: 'name', direction: 'asc' }]);
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
test('parses single descending sort', () => {
|
|
165
|
-
const state = new Map<string, unknown>([['$sort.sales.order', '-date']]);
|
|
166
|
-
expect(getSortForModel(state, 'sales.order')).toEqual([{ field: 'date', direction: 'desc' }]);
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
test('parses multi-field sort', () => {
|
|
170
|
-
const state = new Map<string, unknown>([['$sort.sales.order', '-date,name']]);
|
|
171
|
-
expect(getSortForModel(state, 'sales.order')).toEqual([
|
|
172
|
-
{ field: 'date', direction: 'desc' },
|
|
173
|
-
{ field: 'name', direction: 'asc' },
|
|
174
|
-
]);
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
test('handles whitespace in sort string', () => {
|
|
178
|
-
const state = new Map<string, unknown>([['$sort.sales.order', ' -date , name ']]);
|
|
179
|
-
expect(getSortForModel(state, 'sales.order')).toEqual([
|
|
180
|
-
{ field: 'date', direction: 'desc' },
|
|
181
|
-
{ field: 'name', direction: 'asc' },
|
|
182
|
-
]);
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
test('returns sort for specific model only', () => {
|
|
186
|
-
const state = new Map<string, unknown>([
|
|
187
|
-
['$sort.sales.order', '-date'],
|
|
188
|
-
['$sort.hr.employee', 'name'],
|
|
189
|
-
]);
|
|
190
|
-
expect(getSortForModel(state, 'hr.employee')).toEqual([{ field: 'name', direction: 'asc' }]);
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
describe('getPageForModel', () => {
|
|
195
|
-
test('returns null when page not set', () => {
|
|
196
|
-
const state = new Map<string, unknown>();
|
|
197
|
-
expect(getPageForModel(state, 'sales.order')).toBeNull();
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
test('returns null when page is null', () => {
|
|
201
|
-
const state = new Map<string, unknown>([['$page.sales.order', null]]);
|
|
202
|
-
expect(getPageForModel(state, 'sales.order')).toBeNull();
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
test('returns page number', () => {
|
|
206
|
-
const state = new Map<string, unknown>([['$page.sales.order', 2]]);
|
|
207
|
-
expect(getPageForModel(state, 'sales.order')).toBe(2);
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
test('floors decimal page numbers', () => {
|
|
211
|
-
const state = new Map<string, unknown>([['$page.sales.order', 2.7]]);
|
|
212
|
-
expect(getPageForModel(state, 'sales.order')).toBe(2);
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
test('handles string page numbers', () => {
|
|
216
|
-
const state = new Map<string, unknown>([['$page.sales.order', '3']]);
|
|
217
|
-
expect(getPageForModel(state, 'sales.order')).toBe(3);
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
test('returns null for invalid page values', () => {
|
|
221
|
-
const state = new Map<string, unknown>([['$page.sales.order', 'abc']]);
|
|
222
|
-
expect(getPageForModel(state, 'sales.order')).toBeNull();
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
test('returns null for page less than 1', () => {
|
|
226
|
-
const state = new Map<string, unknown>([['$page.sales.order', 0]]);
|
|
227
|
-
expect(getPageForModel(state, 'sales.order')).toBeNull();
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
test('returns page for specific model only', () => {
|
|
231
|
-
const state = new Map<string, unknown>([
|
|
232
|
-
['$page.sales.order', 5],
|
|
233
|
-
['$page.hr.employee', 2],
|
|
234
|
-
]);
|
|
235
|
-
expect(getPageForModel(state, 'hr.employee')).toBe(2);
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
describe('isReactiveVariableKey', () => {
|
|
240
|
-
test('identifies filter keys', () => {
|
|
241
|
-
expect(isReactiveVariableKey('$filter.sales.order.status')).toBe('filter');
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
test('identifies sort keys', () => {
|
|
245
|
-
expect(isReactiveVariableKey('$sort.sales.order')).toBe('sort');
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
test('identifies page keys', () => {
|
|
249
|
-
expect(isReactiveVariableKey('$page.sales.order')).toBe('page');
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
test('identifies state keys', () => {
|
|
253
|
-
expect(isReactiveVariableKey('$state.activeTab')).toBe('state');
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
test('returns null for unrecognized keys', () => {
|
|
257
|
-
expect(isReactiveVariableKey('random.key')).toBeNull();
|
|
258
|
-
expect(isReactiveVariableKey('name')).toBeNull();
|
|
259
|
-
});
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
describe('getModelFromKey', () => {
|
|
263
|
-
test('extracts model from filter key', () => {
|
|
264
|
-
expect(getModelFromKey('$filter.sales.order.status')).toBe('sales.order');
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
test('extracts model from sort key', () => {
|
|
268
|
-
expect(getModelFromKey('$sort.sales.order')).toBe('sales.order');
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
test('extracts model from page key', () => {
|
|
272
|
-
expect(getModelFromKey('$page.sales.order')).toBe('sales.order');
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
test('returns null for state keys', () => {
|
|
276
|
-
expect(getModelFromKey('$state.activeTab')).toBeNull();
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
test('returns null for unrecognized keys', () => {
|
|
280
|
-
expect(getModelFromKey('random.key')).toBeNull();
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
describe('StateStore integration with reactive variables', () => {
|
|
285
|
-
test('stores and retrieves $filter values', () => {
|
|
286
|
-
const store = new StateStore();
|
|
287
|
-
store.set('$filter.sales.order.status', 'draft');
|
|
288
|
-
expect(store.get('$filter.sales.order.status')).toBe('draft');
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
test('stores and retrieves $sort values', () => {
|
|
292
|
-
const store = new StateStore();
|
|
293
|
-
store.set('$sort.sales.order', '-date,name');
|
|
294
|
-
expect(store.get('$sort.sales.order')).toBe('-date,name');
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
test('stores and retrieves $page values', () => {
|
|
298
|
-
const store = new StateStore();
|
|
299
|
-
store.set('$page.sales.order', 2);
|
|
300
|
-
expect(store.get('$page.sales.order')).toBe(2);
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
test('notifies subscribers for $filter changes', () => {
|
|
304
|
-
const store = new StateStore();
|
|
305
|
-
const calls: unknown[] = [];
|
|
306
|
-
store.subscribe('$filter.sales.order.status', (v) => calls.push(v));
|
|
307
|
-
store.set('$filter.sales.order.status', 'draft');
|
|
308
|
-
store.set('$filter.sales.order.status', 'active');
|
|
309
|
-
expect(calls).toEqual(['draft', 'active']);
|
|
310
|
-
});
|
|
311
|
-
|
|
312
|
-
test('notifies subscribers for $sort changes', () => {
|
|
313
|
-
const store = new StateStore();
|
|
314
|
-
const calls: unknown[] = [];
|
|
315
|
-
store.subscribe('$sort.sales.order', (v) => calls.push(v));
|
|
316
|
-
store.set('$sort.sales.order', '-date');
|
|
317
|
-
store.set('$sort.sales.order', 'name');
|
|
318
|
-
expect(calls).toEqual(['-date', 'name']);
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
test('notifies subscribers for $page changes', () => {
|
|
322
|
-
const store = new StateStore();
|
|
323
|
-
const calls: unknown[] = [];
|
|
324
|
-
store.subscribe('$page.sales.order', (v) => calls.push(v));
|
|
325
|
-
store.set('$page.sales.order', 1);
|
|
326
|
-
store.set('$page.sales.order', 2);
|
|
327
|
-
expect(calls).toEqual([1, 2]);
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
test('setMany works with mixed reactive variable keys', () => {
|
|
331
|
-
const store = new StateStore();
|
|
332
|
-
store.setMany({
|
|
333
|
-
'$filter.sales.order.status': 'draft',
|
|
334
|
-
'$sort.sales.order': '-date',
|
|
335
|
-
'$page.sales.order': 1,
|
|
336
|
-
});
|
|
337
|
-
expect(store.get('$filter.sales.order.status')).toBe('draft');
|
|
338
|
-
expect(store.get('$sort.sales.order')).toBe('-date');
|
|
339
|
-
expect(store.get('$page.sales.order')).toBe(1);
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
test('getFiltersForModel works with store snapshot', () => {
|
|
343
|
-
const store = new StateStore();
|
|
344
|
-
store.set('$filter.sales.order.status', 'draft');
|
|
345
|
-
store.set('$filter.sales.order.total__gt', 100);
|
|
346
|
-
store.set('$sort.sales.order', '-date');
|
|
347
|
-
|
|
348
|
-
// Build map from store keys
|
|
349
|
-
const stateMap = new Map<string, unknown>();
|
|
350
|
-
for (const key of store.keys()) {
|
|
351
|
-
stateMap.set(key, store.get(key));
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
const filters = getFiltersForModel(stateMap, 'sales.order');
|
|
355
|
-
expect(filters).toHaveLength(2);
|
|
356
|
-
expect(filters).toContainEqual({
|
|
357
|
-
model: 'sales.order',
|
|
358
|
-
field: 'status',
|
|
359
|
-
operator: 'eq',
|
|
360
|
-
value: 'draft',
|
|
361
|
-
});
|
|
362
|
-
expect(filters).toContainEqual({
|
|
363
|
-
model: 'sales.order',
|
|
364
|
-
field: 'total',
|
|
365
|
-
operator: 'gt',
|
|
366
|
-
value: 100,
|
|
367
|
-
});
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
test('clearing a filter by setting null removes it from results', () => {
|
|
371
|
-
const store = new StateStore();
|
|
372
|
-
store.set('$filter.sales.order.status', 'draft');
|
|
373
|
-
store.set('$filter.sales.order.status', null);
|
|
374
|
-
|
|
375
|
-
const stateMap = new Map<string, unknown>();
|
|
376
|
-
for (const key of store.keys()) {
|
|
377
|
-
stateMap.set(key, store.get(key));
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
const filters = getFiltersForModel(stateMap, 'sales.order');
|
|
381
|
-
expect(filters).toHaveLength(0);
|
|
382
|
-
});
|
|
383
|
-
});
|