@zeniai/client-epic-state 5.2.18 → 5.2.19-betaAK0
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/lib/esm/view/invoicing/dataImportView/dataImportViewSelector.js +2 -0
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +5 -1
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.d.ts +2 -0
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.js +2 -0
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +5 -1
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +4 -0
- package/package.json +71 -38
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { invoicingFieldHelpForGroup } from '../invoicingConfigView/invoicingConfigViewSelector';
|
|
1
2
|
/**
|
|
2
3
|
* Single bundled view for the invoicing data-import surfaces — consumers read
|
|
3
4
|
* only this. Carries the migration `sessions` list + `sessionsFetch`, the
|
|
@@ -7,6 +8,7 @@
|
|
|
7
8
|
export const getInvoicingDataImportView = (state) => {
|
|
8
9
|
const dataImportState = state.invoicingDataImportViewState;
|
|
9
10
|
return {
|
|
11
|
+
fieldHelp: invoicingFieldHelpForGroup(state, 'data_import'),
|
|
10
12
|
activeMigrationSessionId: dataImportState.activeDetailId,
|
|
11
13
|
sessionDetail: dataImportState.sessionDetail,
|
|
12
14
|
sessionDetailFetch: dataImportState.sessionDetailFetch,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getInvoicingQboAccountMappingId, } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
2
2
|
import { getFormattedAddress } from '../../addressView/addressViewSelector';
|
|
3
|
-
import { getInvoicingConfigView } from '../invoicingConfigView/invoicingConfigViewSelector';
|
|
3
|
+
import { getInvoicingConfigView, invoicingFieldHelpForGroup, } from '../invoicingConfigView/invoicingConfigViewSelector';
|
|
4
4
|
import { getInvoicingQboView, isInvoicingAccountingPickerDataLoading, } from '../invoicingQboView/invoicingQboViewSelector';
|
|
5
5
|
import { INVOICING_BUSINESS_ADDRESS_TYPE, entityToInvoicingBrandingFormLocalData, } from './invoicingBrandingFormConfig';
|
|
6
6
|
import { initialInvoicingQboSettingsLocalData, } from './invoicingQboSettingsFormConfig';
|
|
@@ -26,6 +26,7 @@ export const getInvoicingSettingsFetchState = (state) => ({
|
|
|
26
26
|
export const getInvoicingSettingsView = (state) => {
|
|
27
27
|
const { error, fetchState, saveFetchState, settings, stripeFetchState } = state.invoicingSettingsViewState;
|
|
28
28
|
return {
|
|
29
|
+
fieldHelp: invoicingFieldHelpForGroup(state, 'settings'),
|
|
29
30
|
error,
|
|
30
31
|
fetchState,
|
|
31
32
|
saveState: saveFetchState,
|
|
@@ -78,6 +79,7 @@ export const getInvoicingSettingsHubView = (state) => {
|
|
|
78
79
|
const { dunningScheduleActionOptions, enableState, error: configError, fetchState: configFetchState, qboAccountMappingKindOptions, qboCustomerMatchingOptions, qboSyncStatusOptions, status, } = getInvoicingConfigView(state);
|
|
79
80
|
const { canEnable, isQboConfigured, isStripeConnected } = deriveInvoicingEnablePrerequisites(state.invoicingSettingsViewState.settings, state.invoicingQboViewState.connection?.connected === true, qboAccountMappingKindOptions);
|
|
80
81
|
return {
|
|
82
|
+
fieldHelp: invoicingFieldHelpForGroup(state, 'settings'),
|
|
81
83
|
// Keeps the onboarding step in the gate: a tenant that has not accepted the
|
|
82
84
|
// terms cannot enable invoicing, whatever the integrations say.
|
|
83
85
|
canEnableInvoicing: status === 'settings' && canEnable,
|
|
@@ -108,6 +110,7 @@ export const getInvoicingQboSettingsFormView = (state) => {
|
|
|
108
110
|
const { fetchState: configFetchState, qboAccountMappingKindOptions, qboCustomerMatchingOptions, qboSyncStatusOptions, } = getInvoicingConfigView(state);
|
|
109
111
|
const qboView = getInvoicingQboView(state);
|
|
110
112
|
return {
|
|
113
|
+
fieldHelp: invoicingFieldHelpForGroup(state, 'settings'),
|
|
111
114
|
accountMappingKindOptions: qboAccountMappingKindOptions,
|
|
112
115
|
accounts: qboView.accounts,
|
|
113
116
|
backfillState: qboView.backfillState,
|
|
@@ -147,6 +150,7 @@ export const getInvoicingBrandingFormView = (state) => {
|
|
|
147
150
|
? getFormattedAddress(newAddress.addressToCreate)
|
|
148
151
|
: undefined;
|
|
149
152
|
return {
|
|
153
|
+
fieldHelp: invoicingFieldHelpForGroup(state, 'settings'),
|
|
150
154
|
addressLabel,
|
|
151
155
|
dateFormatOptions: getInvoicingConfigView(state).dateFormatOptions,
|
|
152
156
|
localData: brandingDraft ?? entityToInvoicingBrandingFormLocalData(settings),
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
+
import { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
2
3
|
import { RootState } from '../../../rootStateTypes';
|
|
3
4
|
import { InvoicingDataImportStatusRow, InvoicingMigrationSession } from './dataImportViewPayload';
|
|
4
5
|
import { InvoicingMigrationDiagnosticsState } from './dataImportViewState';
|
|
5
6
|
export interface InvoicingDataImportView {
|
|
6
7
|
activeMigrationSessionId: ID | null;
|
|
7
8
|
diagnosticsBySession: Record<ID, InvoicingMigrationDiagnosticsState>;
|
|
9
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
8
10
|
sessionDetail: Record<ID, InvoicingMigrationSession>;
|
|
9
11
|
sessionDetailFetch: FetchStateAndError;
|
|
10
12
|
sessions: InvoicingMigrationSession[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getInvoicingDataImportView = void 0;
|
|
4
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
4
5
|
/**
|
|
5
6
|
* Single bundled view for the invoicing data-import surfaces — consumers read
|
|
6
7
|
* only this. Carries the migration `sessions` list + `sessionsFetch`, the
|
|
@@ -10,6 +11,7 @@ exports.getInvoicingDataImportView = void 0;
|
|
|
10
11
|
const getInvoicingDataImportView = (state) => {
|
|
11
12
|
const dataImportState = state.invoicingDataImportViewState;
|
|
12
13
|
return {
|
|
14
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'data_import'),
|
|
13
15
|
activeMigrationSessionId: dataImportState.activeDetailId,
|
|
14
16
|
sessionDetail: dataImportState.sessionDetail,
|
|
15
17
|
sessionDetailFetch: dataImportState.sessionDetailFetch,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { FetchState, FetchStateAndError } from '../../../commonStateTypes/common';
|
|
3
|
-
import { InvoicingDunningActionOption, InvoicingNamedOption, InvoicingQboAccountMappingKindOption, InvoicingSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
|
+
import { InvoicingDunningActionOption, InvoicingFieldHelpByCode, InvoicingNamedOption, InvoicingQboAccountMappingKindOption, InvoicingSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
5
5
|
import { RootState } from '../../../rootStateTypes';
|
|
6
6
|
import { InvoicingQboConnection, InvoicingQboSyncHealth } from '../invoicingQboView/invoicingQboViewPayload';
|
|
@@ -20,6 +20,7 @@ export declare const getInvoicingSettings: (state: RootState) => InvoicingSettin
|
|
|
20
20
|
export declare const getInvoicingSettingsFetchState: (state: RootState) => FetchStateAndError;
|
|
21
21
|
export interface InvoicingSettingsView {
|
|
22
22
|
fetchState: FetchState;
|
|
23
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
23
24
|
saveState: FetchStateAndError;
|
|
24
25
|
stripeConnectState: FetchStateAndError;
|
|
25
26
|
error?: ZeniAPIStatus;
|
|
@@ -56,6 +57,7 @@ export interface InvoicingSettingsHubView {
|
|
|
56
57
|
*/
|
|
57
58
|
configFetchState: FetchState;
|
|
58
59
|
dunningScheduleActionOptions: InvoicingDunningActionOption[];
|
|
60
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
59
61
|
isEnablingInvoicing: boolean;
|
|
60
62
|
/**
|
|
61
63
|
* Whether the tenant has already enabled invoicing. The enable footer is for
|
|
@@ -95,6 +97,7 @@ export interface InvoicingQboSettingsFormView {
|
|
|
95
97
|
/** So the screen can fetch only what is missing, without reading the slices. */
|
|
96
98
|
configFetchState: FetchState;
|
|
97
99
|
customerMatchingOptions: InvoicingNamedOption[];
|
|
100
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
98
101
|
isLoading: boolean;
|
|
99
102
|
/** The persisted sync toggle — the backfill guard checks that, not the draft. */
|
|
100
103
|
isSyncEnabledSaved: boolean;
|
|
@@ -120,6 +123,7 @@ export interface InvoicingQboSettingsFormView {
|
|
|
120
123
|
export declare const getInvoicingQboSettingsFormView: (state: RootState) => InvoicingQboSettingsFormView;
|
|
121
124
|
export interface InvoicingBrandingFormView {
|
|
122
125
|
dateFormatOptions: InvoicingNamedOption[];
|
|
126
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
123
127
|
localData: InvoicingBrandingFormLocalData;
|
|
124
128
|
saveState: FetchStateAndError;
|
|
125
129
|
addressLabel?: string;
|
|
@@ -32,6 +32,7 @@ exports.getInvoicingSettingsFetchState = getInvoicingSettingsFetchState;
|
|
|
32
32
|
const getInvoicingSettingsView = (state) => {
|
|
33
33
|
const { error, fetchState, saveFetchState, settings, stripeFetchState } = state.invoicingSettingsViewState;
|
|
34
34
|
return {
|
|
35
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'settings'),
|
|
35
36
|
error,
|
|
36
37
|
fetchState,
|
|
37
38
|
saveState: saveFetchState,
|
|
@@ -85,6 +86,7 @@ const getInvoicingSettingsHubView = (state) => {
|
|
|
85
86
|
const { dunningScheduleActionOptions, enableState, error: configError, fetchState: configFetchState, qboAccountMappingKindOptions, qboCustomerMatchingOptions, qboSyncStatusOptions, status, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
86
87
|
const { canEnable, isQboConfigured, isStripeConnected } = deriveInvoicingEnablePrerequisites(state.invoicingSettingsViewState.settings, state.invoicingQboViewState.connection?.connected === true, qboAccountMappingKindOptions);
|
|
87
88
|
return {
|
|
89
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'settings'),
|
|
88
90
|
// Keeps the onboarding step in the gate: a tenant that has not accepted the
|
|
89
91
|
// terms cannot enable invoicing, whatever the integrations say.
|
|
90
92
|
canEnableInvoicing: status === 'settings' && canEnable,
|
|
@@ -116,6 +118,7 @@ const getInvoicingQboSettingsFormView = (state) => {
|
|
|
116
118
|
const { fetchState: configFetchState, qboAccountMappingKindOptions, qboCustomerMatchingOptions, qboSyncStatusOptions, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
117
119
|
const qboView = (0, invoicingQboViewSelector_1.getInvoicingQboView)(state);
|
|
118
120
|
return {
|
|
121
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'settings'),
|
|
119
122
|
accountMappingKindOptions: qboAccountMappingKindOptions,
|
|
120
123
|
accounts: qboView.accounts,
|
|
121
124
|
backfillState: qboView.backfillState,
|
|
@@ -156,6 +159,7 @@ const getInvoicingBrandingFormView = (state) => {
|
|
|
156
159
|
? (0, addressViewSelector_1.getFormattedAddress)(newAddress.addressToCreate)
|
|
157
160
|
: undefined;
|
|
158
161
|
return {
|
|
162
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'settings'),
|
|
159
163
|
addressLabel,
|
|
160
164
|
dateFormatOptions: (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state).dateFormatOptions,
|
|
161
165
|
localData: brandingDraft ?? (0, invoicingBrandingFormConfig_1.entityToInvoicingBrandingFormLocalData)(settings),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.19-betaAK0",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -33,6 +33,44 @@
|
|
|
33
33
|
"require": "./lib/view/*.js"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"clean": "rimraf lib",
|
|
38
|
+
"test:typecheck": "echo 'Typechecking test files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.typecheck.json",
|
|
39
|
+
"test:typecheck-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && SINCE_DAYS=30 ./scripts/tsc-modified-files.sh master tsconfig.typecheck.json",
|
|
40
|
+
"test:typecheck-mocks": "echo 'Typechecking mock files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.mocks.json",
|
|
41
|
+
"test:typecheck-mocks-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && SINCE_DAYS=30 ./scripts/tsc-modified-files.sh master tsconfig.mocks.json",
|
|
42
|
+
"test": "pnpm lint-modified-files && pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
|
|
43
|
+
"test:full": "pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
|
|
44
|
+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 --fix",
|
|
45
|
+
"lint-modified-files": "chmod +x ./scripts/lint-modified-files.sh && ./scripts/lint-modified-files.sh",
|
|
46
|
+
"lint:fix-modified-files": "chmod +x ./scripts/lint-modified-files.sh && LINT_FIX=true ./scripts/lint-modified-files.sh",
|
|
47
|
+
"tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
|
|
48
|
+
"typecheck": "tsc --noEmit",
|
|
49
|
+
"circular-dependency": "madge --circular --extensions ts ./src",
|
|
50
|
+
"circular-dependency-modified-files": "chmod +x ./scripts/circular-dependency-modified-files.sh && ./scripts/circular-dependency-modified-files.sh",
|
|
51
|
+
"build": "chmod +x ./scripts/run_build.sh && ./scripts/run_build.sh && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
52
|
+
"only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
53
|
+
"only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
54
|
+
"format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
|
|
55
|
+
"format-watch": "bash ./scripts/run-format-watch.sh",
|
|
56
|
+
"check-version": "node ./scripts/check_version.js",
|
|
57
|
+
"prepublishOnly": "chmod +x ./scripts/branch_validation.sh && ./scripts/branch_validation.sh && pnpm update-slack-group-topic && pnpm run check-version && pnpm clean && pnpm build",
|
|
58
|
+
"version": "git add -A src",
|
|
59
|
+
"postversion": "git push && git push --tags",
|
|
60
|
+
"check-dependencies": "node ./scripts/check_dependencies.js",
|
|
61
|
+
"clean-overrides": "node ./scripts/clean_overrides.js",
|
|
62
|
+
"create-or-update-release-branch": "chmod +x ./scripts/create_or_update_release_branch.sh && ./scripts/create_or_update_release_branch.sh",
|
|
63
|
+
"bump-versions-master": "chmod +x ./scripts/bump_versions_master.sh && ./scripts/bump_versions_master.sh",
|
|
64
|
+
"bump-versions-beta": "chmod +x ./scripts/bump_versions_beta.sh && ./scripts/bump_versions_beta.sh",
|
|
65
|
+
"bump-update-web-app-cockpit-beta": "chmod +x ./scripts/bump_and_update_web_app_ui_beta.sh && ./scripts/bump_and_update_web_app_ui_beta.sh",
|
|
66
|
+
"send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
|
|
67
|
+
"update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
|
|
68
|
+
"build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
|
|
69
|
+
"pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
|
|
70
|
+
"raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
|
|
71
|
+
"test:file": "bash ./scripts/test-file.sh",
|
|
72
|
+
"find-unused-code": "knip"
|
|
73
|
+
},
|
|
36
74
|
"files": [
|
|
37
75
|
"lib/**/*"
|
|
38
76
|
],
|
|
@@ -100,41 +138,36 @@
|
|
|
100
138
|
"dayjs": "^1.10.7",
|
|
101
139
|
"url-parse": "^1.5.10"
|
|
102
140
|
},
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
|
|
135
|
-
"pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
|
|
136
|
-
"raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
|
|
137
|
-
"test:file": "bash ./scripts/test-file.sh",
|
|
138
|
-
"find-unused-code": "knip"
|
|
141
|
+
"pnpm": {
|
|
142
|
+
"overrides": {
|
|
143
|
+
"@babel/core": ">=7.29.6",
|
|
144
|
+
"@babel/helpers": ">=7.26.10",
|
|
145
|
+
"@babel/runtime": ">=7.26.10",
|
|
146
|
+
"@babel/traverse": ">=7.23.2",
|
|
147
|
+
"@eslint/eslintrc>ajv": ">=6.14.0 <7",
|
|
148
|
+
"@eslint/plugin-kit": ">=0.3.4",
|
|
149
|
+
"@modelcontextprotocol/sdk": ">=1.25.2",
|
|
150
|
+
"ajv": ">=8.18.0",
|
|
151
|
+
"body-parser": ">=2.2.1",
|
|
152
|
+
"brace-expansion": ">=5.0.9",
|
|
153
|
+
"cross-spawn": ">=7.0.5",
|
|
154
|
+
"esbuild": ">=0.28.1",
|
|
155
|
+
"eslint>ajv": ">=6.14.0 <7",
|
|
156
|
+
"flatted": ">=3.4.2",
|
|
157
|
+
"glob": ">=11.1.0",
|
|
158
|
+
"hono": ">=4.11.4",
|
|
159
|
+
"immutable": ">=4.3.9 <5",
|
|
160
|
+
"js-yaml": ">=4.3.1 <5",
|
|
161
|
+
"minimatch": ">=10.2.3",
|
|
162
|
+
"nanoid": ">=3.3.17 <4",
|
|
163
|
+
"picomatch": ">=4.0.4",
|
|
164
|
+
"postcss": ">=8.5.18",
|
|
165
|
+
"qs": "^6.14.1",
|
|
166
|
+
"rollup": ">=4.59.0",
|
|
167
|
+
"shell-quote": ">=1.9.0",
|
|
168
|
+
"tough-cookie": "=4.1.3",
|
|
169
|
+
"vite": ">=7.3.5 <8",
|
|
170
|
+
"yaml": ">=2.9.0"
|
|
171
|
+
}
|
|
139
172
|
}
|
|
140
|
-
}
|
|
173
|
+
}
|