@powerhousedao/contributor-billing 0.1.31 → 0.1.33
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/document-models/account-transactions/actions.d.ts +20 -0
- package/dist/document-models/account-transactions/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/actions.js +9 -0
- package/dist/document-models/account-transactions/gen/account/actions.d.ts +8 -0
- package/dist/document-models/account-transactions/gen/account/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/account/creators.d.ts +4 -0
- package/dist/document-models/account-transactions/gen/account/creators.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/account/creators.js +3 -0
- package/dist/document-models/account-transactions/gen/account/error.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/account/operations.d.ts +7 -0
- package/dist/document-models/account-transactions/gen/account/operations.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/actions.d.ts +8 -0
- package/dist/document-models/account-transactions/gen/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/actions.js +3 -0
- package/dist/document-models/account-transactions/gen/budgets/actions.d.ts +16 -0
- package/dist/document-models/account-transactions/gen/budgets/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/budgets/actions.js +1 -0
- package/dist/document-models/account-transactions/gen/budgets/creators.d.ts +6 -0
- package/dist/document-models/account-transactions/gen/budgets/creators.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/budgets/creators.js +5 -0
- package/dist/document-models/account-transactions/gen/budgets/error.d.ts +2 -0
- package/dist/document-models/account-transactions/gen/budgets/error.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/budgets/error.js +1 -0
- package/dist/document-models/account-transactions/gen/budgets/operations.d.ts +9 -0
- package/dist/document-models/account-transactions/gen/budgets/operations.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/budgets/operations.js +3 -0
- package/dist/document-models/account-transactions/gen/creators.d.ts +7 -0
- package/dist/document-models/account-transactions/gen/creators.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/creators.js +6 -0
- package/dist/document-models/account-transactions/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/document-model.js +139 -0
- package/dist/document-models/account-transactions/gen/document-schema.d.ts +180 -0
- package/dist/document-models/account-transactions/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/document-schema.js +33 -0
- package/dist/document-models/account-transactions/gen/document-type.d.ts +2 -0
- package/dist/document-models/account-transactions/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/document-type.js +1 -0
- package/dist/document-models/account-transactions/gen/index.d.ts +14 -0
- package/dist/document-models/account-transactions/gen/index.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/index.js +13 -0
- package/dist/document-models/account-transactions/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/account-transactions/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/ph-factories.js +59 -0
- package/dist/document-models/account-transactions/gen/reducer.d.ts +3 -0
- package/dist/document-models/account-transactions/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/reducer.js +47 -0
- package/dist/document-models/account-transactions/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/schema/types.d.ts +230 -0
- package/dist/document-models/account-transactions/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/schema/zod.d.ts +25 -0
- package/dist/document-models/account-transactions/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/schema/zod.js +144 -0
- package/dist/document-models/account-transactions/gen/transactions/actions.d.ts +20 -0
- package/dist/document-models/account-transactions/gen/transactions/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/transactions/actions.js +1 -0
- package/dist/document-models/account-transactions/gen/transactions/creators.d.ts +7 -0
- package/dist/document-models/account-transactions/gen/transactions/creators.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/transactions/creators.js +6 -0
- package/dist/document-models/account-transactions/gen/transactions/error.d.ts +2 -0
- package/dist/document-models/account-transactions/gen/transactions/error.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/transactions/error.js +1 -0
- package/dist/document-models/account-transactions/gen/transactions/operations.d.ts +10 -0
- package/dist/document-models/account-transactions/gen/transactions/operations.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/transactions/operations.js +3 -0
- package/dist/document-models/account-transactions/gen/types.d.ts +12 -0
- package/dist/document-models/account-transactions/gen/types.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/utils.d.ts +15 -0
- package/dist/document-models/account-transactions/gen/utils.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/utils.js +63 -0
- package/dist/document-models/account-transactions/hooks.d.ts +11 -0
- package/dist/document-models/account-transactions/hooks.d.ts.map +1 -0
- package/dist/document-models/account-transactions/hooks.js +26 -0
- package/dist/document-models/account-transactions/index.d.ts.map +1 -0
- package/dist/document-models/account-transactions/module.d.ts +5 -0
- package/dist/document-models/account-transactions/module.d.ts.map +1 -0
- package/dist/document-models/account-transactions/module.js +10 -0
- package/dist/document-models/account-transactions/src/index.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/reducers/account.d.ts +3 -0
- package/dist/document-models/account-transactions/src/reducers/account.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/reducers/account.js +13 -0
- package/dist/document-models/account-transactions/src/reducers/budgets.d.ts +3 -0
- package/dist/document-models/account-transactions/src/reducers/budgets.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/reducers/budgets.js +20 -0
- package/dist/document-models/account-transactions/src/reducers/transactions.d.ts +3 -0
- package/dist/document-models/account-transactions/src/reducers/transactions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/reducers/transactions.js +69 -0
- package/dist/document-models/{integrations/src/tests/integrations.test.d.ts → account-transactions/src/tests/account.test.d.ts} +1 -1
- package/dist/document-models/account-transactions/src/tests/account.test.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/tests/account.test.js +19 -0
- package/dist/document-models/account-transactions/src/tests/budgets.test.d.ts +6 -0
- package/dist/document-models/account-transactions/src/tests/budgets.test.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/tests/budgets.test.js +39 -0
- package/dist/document-models/account-transactions/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/tests/document-model.test.js +104 -0
- package/dist/document-models/account-transactions/src/tests/transactions.test.d.ts +6 -0
- package/dist/document-models/account-transactions/src/tests/transactions.test.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/tests/transactions.test.js +49 -0
- package/dist/document-models/account-transactions/src/utils.d.ts.map +1 -0
- package/dist/document-models/account-transactions/utils.d.ts +14 -0
- package/dist/document-models/account-transactions/utils.d.ts.map +1 -0
- package/dist/document-models/account-transactions/utils.js +7 -0
- package/dist/document-models/{integrations → accounts}/actions.d.ts +5 -4
- package/dist/document-models/accounts/actions.d.ts.map +1 -0
- package/dist/document-models/accounts/actions.js +4 -0
- package/dist/document-models/accounts/gen/accounts/actions.d.ts +20 -0
- package/dist/document-models/accounts/gen/accounts/actions.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/accounts/actions.js +1 -0
- package/dist/document-models/accounts/gen/accounts/creators.d.ts +7 -0
- package/dist/document-models/accounts/gen/accounts/creators.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/accounts/creators.js +6 -0
- package/dist/document-models/accounts/gen/accounts/error.d.ts +2 -0
- package/dist/document-models/accounts/gen/accounts/error.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/accounts/error.js +1 -0
- package/dist/document-models/accounts/gen/accounts/operations.d.ts +10 -0
- package/dist/document-models/accounts/gen/accounts/operations.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/accounts/operations.js +3 -0
- package/dist/document-models/accounts/gen/actions.d.ts +4 -0
- package/dist/document-models/accounts/gen/actions.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/actions.js +1 -0
- package/dist/document-models/accounts/gen/creators.d.ts +3 -0
- package/dist/document-models/accounts/gen/creators.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/creators.js +2 -0
- package/dist/document-models/accounts/gen/document-model.d.ts +3 -0
- package/dist/document-models/accounts/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/document-model.js +81 -0
- package/dist/document-models/accounts/gen/document-schema.d.ts +142 -0
- package/dist/document-models/accounts/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/document-schema.js +33 -0
- package/dist/document-models/accounts/gen/document-type.d.ts +2 -0
- package/dist/document-models/accounts/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/document-type.js +1 -0
- package/dist/document-models/{integrations → accounts}/gen/index.d.ts +2 -2
- package/dist/document-models/accounts/gen/index.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/gen/index.js +2 -2
- package/dist/document-models/accounts/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/accounts/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/gen/ph-factories.js +3 -5
- package/dist/document-models/accounts/gen/reducer.d.ts +3 -0
- package/dist/document-models/accounts/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/reducer.js +29 -0
- package/dist/document-models/accounts/gen/schema/index.d.ts +3 -0
- package/dist/document-models/accounts/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/schema/index.js +2 -0
- package/dist/document-models/{integrations → accounts}/gen/schema/types.d.ts +41 -53
- package/dist/document-models/accounts/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/schema/types.js +1 -0
- package/dist/document-models/accounts/gen/schema/zod.d.ts +20 -0
- package/dist/document-models/accounts/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/schema/zod.js +80 -0
- package/dist/document-models/accounts/gen/types.d.ts +12 -0
- package/dist/document-models/accounts/gen/types.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/types.js +1 -0
- package/dist/document-models/accounts/gen/utils.d.ts +15 -0
- package/dist/document-models/accounts/gen/utils.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/gen/utils.js +8 -10
- package/dist/document-models/accounts/hooks.d.ts +11 -0
- package/dist/document-models/accounts/hooks.d.ts.map +1 -0
- package/dist/document-models/accounts/hooks.js +26 -0
- package/dist/document-models/accounts/index.d.ts +10 -0
- package/dist/document-models/accounts/index.d.ts.map +1 -0
- package/dist/document-models/accounts/index.js +9 -0
- package/dist/document-models/accounts/module.d.ts +5 -0
- package/dist/document-models/accounts/module.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/module.js +2 -2
- package/dist/document-models/accounts/src/index.d.ts +2 -0
- package/dist/document-models/accounts/src/index.d.ts.map +1 -0
- package/dist/document-models/accounts/src/index.js +1 -0
- package/dist/document-models/accounts/src/reducers/accounts.d.ts +3 -0
- package/dist/document-models/accounts/src/reducers/accounts.d.ts.map +1 -0
- package/dist/document-models/accounts/src/reducers/accounts.js +52 -0
- package/dist/document-models/accounts/src/tests/accounts.test.d.ts +6 -0
- package/dist/document-models/accounts/src/tests/accounts.test.d.ts.map +1 -0
- package/dist/document-models/accounts/src/tests/accounts.test.js +19 -0
- package/dist/document-models/accounts/src/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/accounts/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/src/tests/document-model.test.js +26 -26
- package/dist/document-models/accounts/src/utils.d.ts +2 -0
- package/dist/document-models/accounts/src/utils.d.ts.map +1 -0
- package/dist/document-models/accounts/src/utils.js +1 -0
- package/dist/document-models/accounts/utils.d.ts +14 -0
- package/dist/document-models/accounts/utils.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/utils.js +1 -1
- package/dist/document-models/billing-statement/gen/document-schema.d.ts +32 -32
- package/dist/document-models/billing-statement/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/line-items.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/line-items.js +0 -1
- package/dist/document-models/document-models.d.ts.map +1 -1
- package/dist/document-models/document-models.js +11 -3
- package/dist/document-models/expense-report/actions.d.ts +2 -0
- package/dist/document-models/expense-report/actions.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/document-model.js +25 -3
- package/dist/document-models/expense-report/gen/document-schema.d.ts +38 -0
- package/dist/document-models/expense-report/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/ph-factories.js +17 -15
- package/dist/document-models/expense-report/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/reducer.js +9 -1
- package/dist/document-models/expense-report/gen/schema/types.d.ts +14 -0
- package/dist/document-models/expense-report/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/schema/zod.d.ts +5 -1
- package/dist/document-models/expense-report/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/schema/zod.js +22 -0
- package/dist/document-models/expense-report/gen/utils.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/utils.js +17 -15
- package/dist/document-models/expense-report/gen/wallet/actions.d.ts +10 -2
- package/dist/document-models/expense-report/gen/wallet/actions.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/wallet/creators.d.ts +4 -2
- package/dist/document-models/expense-report/gen/wallet/creators.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/wallet/creators.js +3 -1
- package/dist/document-models/expense-report/gen/wallet/operations.d.ts +3 -1
- package/dist/document-models/expense-report/gen/wallet/operations.d.ts.map +1 -1
- package/dist/document-models/expense-report/src/reducers/wallet.d.ts.map +1 -1
- package/dist/document-models/expense-report/src/reducers/wallet.js +29 -7
- package/dist/document-models/index.d.ts +10 -2
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +10 -2
- package/dist/document-models/invoice/gen/document-schema.d.ts +96 -96
- package/dist/document-models/invoice/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/service-offering/actions.d.ts +42 -0
- package/dist/document-models/service-offering/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/actions.js +10 -0
- package/dist/document-models/service-offering/gen/actions.d.ts +10 -0
- package/dist/document-models/service-offering/gen/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/actions.js +4 -0
- package/dist/document-models/service-offering/gen/creators.d.ts +9 -0
- package/dist/document-models/service-offering/gen/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/creators.js +8 -0
- package/dist/document-models/service-offering/gen/document-model.d.ts +3 -0
- package/dist/document-models/service-offering/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/document-model.js +620 -0
- package/dist/document-models/service-offering/gen/document-schema.d.ts +427 -0
- package/dist/document-models/service-offering/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/document-schema.js +33 -0
- package/dist/document-models/service-offering/gen/document-type.d.ts +2 -0
- package/dist/document-models/service-offering/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/document-type.js +1 -0
- package/dist/document-models/service-offering/gen/index.d.ts +15 -0
- package/dist/document-models/service-offering/gen/index.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/index.js +14 -0
- package/dist/document-models/service-offering/gen/offering-management/actions.d.ts +52 -0
- package/dist/document-models/service-offering/gen/offering-management/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/offering-management/actions.js +1 -0
- package/dist/document-models/service-offering/gen/offering-management/creators.d.ts +15 -0
- package/dist/document-models/service-offering/gen/offering-management/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/offering-management/creators.js +14 -0
- package/dist/document-models/service-offering/gen/offering-management/error.d.ts +35 -0
- package/dist/document-models/service-offering/gen/offering-management/error.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/offering-management/error.js +38 -0
- package/dist/document-models/service-offering/gen/offering-management/operations.d.ts +18 -0
- package/dist/document-models/service-offering/gen/offering-management/operations.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/offering-management/operations.js +3 -0
- package/dist/document-models/service-offering/gen/option-group-management/actions.d.ts +16 -0
- package/dist/document-models/service-offering/gen/option-group-management/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/actions.js +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/creators.d.ts +6 -0
- package/dist/document-models/service-offering/gen/option-group-management/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/creators.js +5 -0
- package/dist/document-models/service-offering/gen/option-group-management/error.d.ts +28 -0
- package/dist/document-models/service-offering/gen/option-group-management/error.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/error.js +29 -0
- package/dist/document-models/service-offering/gen/option-group-management/operations.d.ts +9 -0
- package/dist/document-models/service-offering/gen/option-group-management/operations.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/operations.js +3 -0
- package/dist/document-models/service-offering/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/service-offering/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/ph-factories.js +62 -0
- package/dist/document-models/service-offering/gen/reducer.d.ts +3 -0
- package/dist/document-models/service-offering/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/reducer.js +136 -0
- package/dist/document-models/service-offering/gen/schema/index.d.ts +3 -0
- package/dist/document-models/service-offering/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/schema/index.js +2 -0
- package/dist/document-models/service-offering/gen/schema/types.d.ts +424 -0
- package/dist/document-models/service-offering/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/schema/types.js +1 -0
- package/dist/document-models/service-offering/gen/schema/zod.d.ts +54 -0
- package/dist/document-models/service-offering/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/schema/zod.js +408 -0
- package/dist/document-models/service-offering/gen/service-management/actions.d.ts +24 -0
- package/dist/document-models/service-offering/gen/service-management/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/service-management/actions.js +1 -0
- package/dist/document-models/service-offering/gen/service-management/creators.d.ts +8 -0
- package/dist/document-models/service-offering/gen/service-management/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/service-management/creators.js +7 -0
- package/dist/document-models/service-offering/gen/service-management/error.d.ts +52 -0
- package/dist/document-models/service-offering/gen/service-management/error.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/service-management/error.js +61 -0
- package/dist/document-models/service-offering/gen/service-management/operations.d.ts +11 -0
- package/dist/document-models/service-offering/gen/service-management/operations.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/service-management/operations.js +3 -0
- package/dist/document-models/service-offering/gen/tier-management/actions.d.ts +44 -0
- package/dist/document-models/service-offering/gen/tier-management/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/tier-management/actions.js +1 -0
- package/dist/document-models/service-offering/gen/tier-management/creators.d.ts +13 -0
- package/dist/document-models/service-offering/gen/tier-management/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/tier-management/creators.js +12 -0
- package/dist/document-models/service-offering/gen/tier-management/error.d.ts +107 -0
- package/dist/document-models/service-offering/gen/tier-management/error.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/tier-management/error.js +134 -0
- package/dist/document-models/service-offering/gen/tier-management/operations.d.ts +16 -0
- package/dist/document-models/service-offering/gen/tier-management/operations.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/tier-management/operations.js +3 -0
- package/dist/document-models/service-offering/gen/types.d.ts +12 -0
- package/dist/document-models/service-offering/gen/types.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/types.js +1 -0
- package/dist/document-models/service-offering/gen/utils.d.ts +15 -0
- package/dist/document-models/service-offering/gen/utils.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/utils.js +66 -0
- package/dist/document-models/service-offering/hooks.d.ts +11 -0
- package/dist/document-models/service-offering/hooks.d.ts.map +1 -0
- package/dist/document-models/service-offering/hooks.js +26 -0
- package/dist/document-models/service-offering/index.d.ts +10 -0
- package/dist/document-models/service-offering/index.d.ts.map +1 -0
- package/dist/document-models/service-offering/index.js +9 -0
- package/dist/document-models/service-offering/module.d.ts +5 -0
- package/dist/document-models/service-offering/module.d.ts.map +1 -0
- package/dist/document-models/service-offering/module.js +10 -0
- package/dist/document-models/service-offering/src/index.d.ts +2 -0
- package/dist/document-models/service-offering/src/index.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/index.js +1 -0
- package/dist/document-models/service-offering/src/reducers/offering-management.d.ts +3 -0
- package/dist/document-models/service-offering/src/reducers/offering-management.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/reducers/offering-management.js +100 -0
- package/dist/document-models/service-offering/src/reducers/option-group-management.d.ts +3 -0
- package/dist/document-models/service-offering/src/reducers/option-group-management.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/reducers/option-group-management.js +47 -0
- package/dist/document-models/service-offering/src/reducers/service-management.d.ts +3 -0
- package/dist/document-models/service-offering/src/reducers/service-management.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/reducers/service-management.js +74 -0
- package/dist/document-models/service-offering/src/reducers/tier-management.d.ts +3 -0
- package/dist/document-models/service-offering/src/reducers/tier-management.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/reducers/tier-management.js +159 -0
- package/dist/document-models/service-offering/src/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/service-offering/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/document-model.test.js +104 -0
- package/dist/document-models/service-offering/src/tests/offering-management.test.d.ts +6 -0
- package/dist/document-models/service-offering/src/tests/offering-management.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/offering-management.test.js +129 -0
- package/dist/document-models/service-offering/src/tests/option-group-management.test.d.ts +6 -0
- package/dist/document-models/service-offering/src/tests/option-group-management.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/option-group-management.test.js +39 -0
- package/dist/document-models/service-offering/src/tests/service-management.test.d.ts +6 -0
- package/dist/document-models/service-offering/src/tests/service-management.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/service-management.test.js +59 -0
- package/dist/document-models/service-offering/src/tests/tier-management.test.d.ts +2 -0
- package/dist/document-models/service-offering/src/tests/tier-management.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/tier-management.test.js +1 -0
- package/dist/document-models/service-offering/src/utils.d.ts +2 -0
- package/dist/document-models/service-offering/src/utils.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/utils.js +1 -0
- package/dist/document-models/service-offering/utils.d.ts +14 -0
- package/dist/document-models/service-offering/utils.d.ts.map +1 -0
- package/dist/document-models/service-offering/utils.js +7 -0
- package/dist/document-models/service-subscriptions/actions.d.ts +25 -0
- package/dist/document-models/service-subscriptions/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/actions.js +9 -0
- package/dist/document-models/service-subscriptions/gen/actions.d.ts +8 -0
- package/dist/document-models/service-subscriptions/gen/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/actions.js +3 -0
- package/dist/document-models/service-subscriptions/gen/categories/actions.d.ts +16 -0
- package/dist/document-models/service-subscriptions/gen/categories/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/actions.js +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/creators.d.ts +6 -0
- package/dist/document-models/service-subscriptions/gen/categories/creators.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/creators.js +5 -0
- package/dist/document-models/service-subscriptions/gen/categories/error.d.ts +2 -0
- package/dist/document-models/service-subscriptions/gen/categories/error.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/error.js +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/operations.d.ts +9 -0
- package/dist/document-models/service-subscriptions/gen/categories/operations.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/operations.js +3 -0
- package/dist/document-models/service-subscriptions/gen/creators.d.ts +7 -0
- package/dist/document-models/service-subscriptions/gen/creators.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/creators.js +6 -0
- package/dist/document-models/service-subscriptions/gen/document-model.d.ts +3 -0
- package/dist/document-models/service-subscriptions/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/document-model.js +194 -0
- package/dist/document-models/service-subscriptions/gen/document-schema.d.ts +180 -0
- package/dist/document-models/service-subscriptions/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/document-schema.js +33 -0
- package/dist/document-models/service-subscriptions/gen/document-type.d.ts +2 -0
- package/dist/document-models/service-subscriptions/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/document-type.js +1 -0
- package/dist/document-models/service-subscriptions/gen/index.d.ts +14 -0
- package/dist/document-models/service-subscriptions/gen/index.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/index.js +13 -0
- package/dist/document-models/service-subscriptions/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/service-subscriptions/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/ph-factories.js +45 -0
- package/dist/document-models/service-subscriptions/gen/reducer.d.ts +3 -0
- package/dist/document-models/service-subscriptions/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/reducer.js +67 -0
- package/dist/document-models/service-subscriptions/gen/schema/index.d.ts +3 -0
- package/dist/document-models/service-subscriptions/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/schema/index.js +2 -0
- package/dist/document-models/service-subscriptions/gen/schema/types.d.ts +274 -0
- package/dist/document-models/service-subscriptions/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/schema/types.js +1 -0
- package/dist/document-models/service-subscriptions/gen/schema/zod.d.ts +31 -0
- package/dist/document-models/service-subscriptions/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/schema/zod.js +199 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/actions.d.ts +32 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/actions.js +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/creators.d.ts +10 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/creators.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/creators.js +9 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/error.d.ts +2 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/error.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/error.js +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/operations.d.ts +13 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/operations.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/operations.js +3 -0
- package/dist/document-models/service-subscriptions/gen/types.d.ts +12 -0
- package/dist/document-models/service-subscriptions/gen/types.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/types.js +1 -0
- package/dist/document-models/service-subscriptions/gen/utils.d.ts +15 -0
- package/dist/document-models/service-subscriptions/gen/utils.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/utils.js +53 -0
- package/dist/document-models/service-subscriptions/gen/vendors/actions.d.ts +16 -0
- package/dist/document-models/service-subscriptions/gen/vendors/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/actions.js +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/creators.d.ts +6 -0
- package/dist/document-models/service-subscriptions/gen/vendors/creators.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/creators.js +5 -0
- package/dist/document-models/service-subscriptions/gen/vendors/error.d.ts +2 -0
- package/dist/document-models/service-subscriptions/gen/vendors/error.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/error.js +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/operations.d.ts +9 -0
- package/dist/document-models/service-subscriptions/gen/vendors/operations.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/operations.js +3 -0
- package/dist/document-models/service-subscriptions/hooks.d.ts +11 -0
- package/dist/document-models/service-subscriptions/hooks.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/hooks.js +26 -0
- package/dist/document-models/service-subscriptions/index.d.ts +10 -0
- package/dist/document-models/service-subscriptions/index.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/index.js +9 -0
- package/dist/document-models/service-subscriptions/module.d.ts +5 -0
- package/dist/document-models/service-subscriptions/module.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/module.js +10 -0
- package/dist/document-models/service-subscriptions/src/index.d.ts +2 -0
- package/dist/document-models/service-subscriptions/src/index.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/index.js +1 -0
- package/dist/document-models/service-subscriptions/src/reducers/categories.d.ts +3 -0
- package/dist/document-models/service-subscriptions/src/reducers/categories.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/reducers/categories.js +24 -0
- package/dist/document-models/service-subscriptions/src/reducers/subscriptions.d.ts +3 -0
- package/dist/document-models/service-subscriptions/src/reducers/subscriptions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/reducers/subscriptions.js +114 -0
- package/dist/document-models/service-subscriptions/src/reducers/vendors.d.ts +3 -0
- package/dist/document-models/service-subscriptions/src/reducers/vendors.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/reducers/vendors.js +30 -0
- package/dist/document-models/service-subscriptions/src/tests/categories.test.d.ts +6 -0
- package/dist/document-models/service-subscriptions/src/tests/categories.test.d.ts.map +1 -0
- package/dist/document-models/{integrations/src/tests/integrations.test.js → service-subscriptions/src/tests/categories.test.js} +17 -17
- package/dist/document-models/service-subscriptions/src/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/service-subscriptions/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/tests/document-model.test.js +104 -0
- package/dist/document-models/service-subscriptions/src/tests/subscriptions.test.d.ts +6 -0
- package/dist/document-models/service-subscriptions/src/tests/subscriptions.test.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/tests/subscriptions.test.js +79 -0
- package/dist/document-models/service-subscriptions/src/tests/vendors.test.d.ts +6 -0
- package/dist/document-models/service-subscriptions/src/tests/vendors.test.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/tests/vendors.test.js +39 -0
- package/dist/document-models/service-subscriptions/src/utils.d.ts +2 -0
- package/dist/document-models/service-subscriptions/src/utils.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/utils.js +1 -0
- package/dist/document-models/service-subscriptions/utils.d.ts +14 -0
- package/dist/document-models/service-subscriptions/utils.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/utils.js +7 -0
- package/dist/document-models/snapshot-report/actions.d.ts +29 -0
- package/dist/document-models/snapshot-report/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/actions.js +10 -0
- package/dist/document-models/snapshot-report/gen/accounts/actions.d.ts +16 -0
- package/dist/document-models/snapshot-report/gen/accounts/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/actions.js +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/creators.d.ts +6 -0
- package/dist/document-models/snapshot-report/gen/accounts/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/creators.js +5 -0
- package/dist/document-models/snapshot-report/gen/accounts/error.d.ts +28 -0
- package/dist/document-models/snapshot-report/gen/accounts/error.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/error.js +29 -0
- package/dist/document-models/snapshot-report/gen/accounts/operations.d.ts +9 -0
- package/dist/document-models/snapshot-report/gen/accounts/operations.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/operations.js +3 -0
- package/dist/document-models/snapshot-report/gen/actions.d.ts +10 -0
- package/dist/document-models/snapshot-report/gen/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/actions.js +4 -0
- package/dist/document-models/snapshot-report/gen/balances/actions.d.ts +20 -0
- package/dist/document-models/snapshot-report/gen/balances/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/balances/actions.js +1 -0
- package/dist/document-models/snapshot-report/gen/balances/creators.d.ts +7 -0
- package/dist/document-models/snapshot-report/gen/balances/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/balances/creators.js +6 -0
- package/dist/document-models/snapshot-report/gen/balances/error.d.ts +35 -0
- package/dist/document-models/snapshot-report/gen/balances/error.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/balances/error.js +38 -0
- package/dist/document-models/snapshot-report/gen/balances/operations.d.ts +10 -0
- package/dist/document-models/snapshot-report/gen/balances/operations.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/balances/operations.js +3 -0
- package/dist/document-models/snapshot-report/gen/configuration/actions.d.ts +28 -0
- package/dist/document-models/snapshot-report/gen/configuration/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/actions.js +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/creators.d.ts +9 -0
- package/dist/document-models/snapshot-report/gen/configuration/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/creators.js +8 -0
- package/dist/document-models/snapshot-report/gen/configuration/error.d.ts +2 -0
- package/dist/document-models/snapshot-report/gen/configuration/error.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/error.js +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/operations.d.ts +12 -0
- package/dist/document-models/snapshot-report/gen/configuration/operations.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/operations.js +3 -0
- package/dist/document-models/snapshot-report/gen/creators.d.ts +9 -0
- package/dist/document-models/snapshot-report/gen/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/creators.js +8 -0
- package/dist/document-models/snapshot-report/gen/document-model.d.ts +3 -0
- package/dist/document-models/snapshot-report/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/document-model.js +332 -0
- package/dist/document-models/snapshot-report/gen/document-schema.d.ts +275 -0
- package/dist/document-models/snapshot-report/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/document-schema.js +33 -0
- package/dist/document-models/snapshot-report/gen/document-type.d.ts +2 -0
- package/dist/document-models/snapshot-report/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/document-type.js +1 -0
- package/dist/document-models/snapshot-report/gen/index.d.ts +15 -0
- package/dist/document-models/snapshot-report/gen/index.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/index.js +14 -0
- package/dist/document-models/snapshot-report/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/snapshot-report/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/ph-factories.js +54 -0
- package/dist/document-models/snapshot-report/gen/reducer.d.ts +3 -0
- package/dist/document-models/snapshot-report/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/reducer.js +84 -0
- package/dist/document-models/snapshot-report/gen/schema/index.d.ts +3 -0
- package/dist/document-models/snapshot-report/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/schema/index.js +2 -0
- package/dist/document-models/snapshot-report/gen/schema/types.d.ts +264 -0
- package/dist/document-models/snapshot-report/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/schema/types.js +1 -0
- package/dist/document-models/snapshot-report/gen/schema/zod.d.ts +37 -0
- package/dist/document-models/snapshot-report/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/schema/zod.js +208 -0
- package/dist/document-models/snapshot-report/gen/transactions/actions.d.ts +20 -0
- package/dist/document-models/snapshot-report/gen/transactions/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/actions.js +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/creators.d.ts +7 -0
- package/dist/document-models/snapshot-report/gen/transactions/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/creators.js +6 -0
- package/dist/document-models/snapshot-report/gen/transactions/error.d.ts +33 -0
- package/dist/document-models/snapshot-report/gen/transactions/error.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/error.js +36 -0
- package/dist/document-models/snapshot-report/gen/transactions/operations.d.ts +10 -0
- package/dist/document-models/snapshot-report/gen/transactions/operations.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/operations.js +3 -0
- package/dist/document-models/snapshot-report/gen/types.d.ts +12 -0
- package/dist/document-models/snapshot-report/gen/types.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/types.js +1 -0
- package/dist/document-models/snapshot-report/gen/utils.d.ts +15 -0
- package/dist/document-models/snapshot-report/gen/utils.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/utils.js +58 -0
- package/dist/document-models/snapshot-report/hooks.d.ts +11 -0
- package/dist/document-models/snapshot-report/hooks.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/hooks.js +26 -0
- package/dist/document-models/snapshot-report/index.d.ts +10 -0
- package/dist/document-models/snapshot-report/index.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/index.js +9 -0
- package/dist/document-models/snapshot-report/module.d.ts +5 -0
- package/dist/document-models/snapshot-report/module.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/module.js +10 -0
- package/dist/document-models/snapshot-report/src/index.d.ts +2 -0
- package/dist/document-models/snapshot-report/src/index.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/index.js +1 -0
- package/dist/document-models/snapshot-report/src/reducers/accounts.d.ts +3 -0
- package/dist/document-models/snapshot-report/src/reducers/accounts.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/reducers/accounts.js +34 -0
- package/dist/document-models/snapshot-report/src/reducers/balances.d.ts +3 -0
- package/dist/document-models/snapshot-report/src/reducers/balances.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/reducers/balances.js +60 -0
- package/dist/document-models/snapshot-report/src/reducers/configuration.d.ts +3 -0
- package/dist/document-models/snapshot-report/src/reducers/configuration.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/reducers/configuration.js +35 -0
- package/dist/document-models/snapshot-report/src/reducers/transactions.d.ts +3 -0
- package/dist/document-models/snapshot-report/src/reducers/transactions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/reducers/transactions.js +99 -0
- package/dist/document-models/snapshot-report/src/tests/accounts.test.d.ts +6 -0
- package/dist/document-models/snapshot-report/src/tests/accounts.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/accounts.test.js +39 -0
- package/dist/document-models/snapshot-report/src/tests/balances.test.d.ts +6 -0
- package/dist/document-models/snapshot-report/src/tests/balances.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/balances.test.js +49 -0
- package/dist/document-models/snapshot-report/src/tests/configuration.test.d.ts +6 -0
- package/dist/document-models/snapshot-report/src/tests/configuration.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/configuration.test.js +39 -0
- package/dist/document-models/snapshot-report/src/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/snapshot-report/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/document-model.test.js +104 -0
- package/dist/document-models/snapshot-report/src/tests/transactions.test.d.ts +6 -0
- package/dist/document-models/snapshot-report/src/tests/transactions.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/transactions.test.js +39 -0
- package/dist/document-models/snapshot-report/src/utils.d.ts +2 -0
- package/dist/document-models/snapshot-report/src/utils.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/utils.js +1 -0
- package/dist/document-models/snapshot-report/utils.d.ts +14 -0
- package/dist/document-models/snapshot-report/utils.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/utils.js +7 -0
- package/dist/editors/account-transactions-editor/alchemyIntegration.d.ts +55 -0
- package/dist/editors/account-transactions-editor/alchemyIntegration.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/alchemyIntegration.js +136 -0
- package/dist/editors/account-transactions-editor/components/AccountSection.d.ts +9 -0
- package/dist/editors/account-transactions-editor/components/AccountSection.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/components/AccountSection.js +18 -0
- package/dist/editors/account-transactions-editor/components/DocumentHeader.d.ts +8 -0
- package/dist/editors/account-transactions-editor/components/DocumentHeader.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/components/DocumentHeader.js +13 -0
- package/dist/editors/account-transactions-editor/components/TransactionForm.d.ts +10 -0
- package/dist/editors/account-transactions-editor/components/TransactionForm.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/components/TransactionForm.js +70 -0
- package/dist/editors/account-transactions-editor/components/TransactionsTable.d.ts +9 -0
- package/dist/editors/account-transactions-editor/components/TransactionsTable.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/components/TransactionsTable.js +56 -0
- package/dist/editors/account-transactions-editor/editor.d.ts +3 -0
- package/dist/editors/account-transactions-editor/editor.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/editor.js +212 -0
- package/dist/editors/account-transactions-editor/index.d.ts +3 -0
- package/dist/editors/account-transactions-editor/index.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/index.js +9 -0
- package/dist/editors/account-transactions-editor/module.d.ts +3 -0
- package/dist/editors/account-transactions-editor/module.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/module.js +9 -0
- package/dist/editors/accounts-editor/components/AccountCard.d.ts +12 -0
- package/dist/editors/accounts-editor/components/AccountCard.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/AccountCard.js +23 -0
- package/dist/editors/accounts-editor/components/AccountForm.d.ts +19 -0
- package/dist/editors/accounts-editor/components/AccountForm.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/AccountForm.js +66 -0
- package/dist/editors/accounts-editor/components/AccountsFilter.d.ts +8 -0
- package/dist/editors/accounts-editor/components/AccountsFilter.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/AccountsFilter.js +34 -0
- package/dist/editors/accounts-editor/components/AccountsList.d.ts +12 -0
- package/dist/editors/accounts-editor/components/AccountsList.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/AccountsList.js +8 -0
- package/dist/editors/accounts-editor/components/DocumentHeader.d.ts +15 -0
- package/dist/editors/accounts-editor/components/DocumentHeader.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/DocumentHeader.js +23 -0
- package/dist/editors/accounts-editor/components/KYCStatusBadge.d.ts +7 -0
- package/dist/editors/accounts-editor/components/KYCStatusBadge.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/KYCStatusBadge.js +17 -0
- package/dist/editors/accounts-editor/editor.d.ts +3 -0
- package/dist/editors/accounts-editor/editor.d.ts.map +1 -0
- package/dist/editors/accounts-editor/editor.js +159 -0
- package/dist/editors/accounts-editor/index.d.ts +3 -0
- package/dist/editors/accounts-editor/index.d.ts.map +1 -0
- package/dist/editors/accounts-editor/index.js +9 -0
- package/dist/editors/accounts-editor/module.d.ts +3 -0
- package/dist/editors/accounts-editor/module.d.ts.map +1 -0
- package/dist/editors/accounts-editor/module.js +9 -0
- package/dist/editors/accounts-editor/services/accountTransactionsService.d.ts +29 -0
- package/dist/editors/accounts-editor/services/accountTransactionsService.d.ts.map +1 -0
- package/dist/editors/accounts-editor/services/accountTransactionsService.js +252 -0
- package/dist/editors/builder-team-admin/components/CreateDocument.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/DriveContents.d.ts +6 -0
- package/dist/editors/builder-team-admin/components/DriveContents.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/DriveContents.js +36 -0
- package/dist/editors/builder-team-admin/components/DriveExplorer.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/DriveExplorer.js +49 -0
- package/dist/editors/builder-team-admin/components/EmptyState.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/ExpenseReportsStats.d.ts +11 -0
- package/dist/editors/builder-team-admin/components/ExpenseReportsStats.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/ExpenseReportsStats.js +137 -0
- package/dist/editors/builder-team-admin/components/Files.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/FolderTree.d.ts +14 -0
- package/dist/editors/builder-team-admin/components/FolderTree.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/FolderTree.js +307 -0
- package/dist/editors/builder-team-admin/components/Folders.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/NavigationBreadcrumbs.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/expense-reports.d.ts +2 -0
- package/dist/editors/builder-team-admin/components/expense-reports.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/expense-reports.js +118 -0
- package/dist/editors/builder-team-admin/components/overview/ProfileHeader.d.ts +10 -0
- package/dist/editors/builder-team-admin/components/overview/ProfileHeader.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/overview/ProfileHeader.js +24 -0
- package/dist/editors/builder-team-admin/components/overview/SubscriptionsStats.d.ts +15 -0
- package/dist/editors/builder-team-admin/components/overview/SubscriptionsStats.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/overview/SubscriptionsStats.js +61 -0
- package/dist/editors/builder-team-admin/components/overview/TeamMembersOverview.d.ts +10 -0
- package/dist/editors/builder-team-admin/components/overview/TeamMembersOverview.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/overview/TeamMembersOverview.js +121 -0
- package/dist/editors/builder-team-admin/components/snapshot-reports.d.ts +2 -0
- package/dist/editors/builder-team-admin/components/snapshot-reports.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/snapshot-reports.js +116 -0
- package/dist/editors/builder-team-admin/components/team-members.d.ts +2 -0
- package/dist/editors/builder-team-admin/components/team-members.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/team-members.js +309 -0
- package/dist/editors/{clean-new-editor → builder-team-admin}/config.d.ts +1 -1
- package/dist/editors/builder-team-admin/config.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/config.js +8 -0
- package/dist/editors/{clean-new-editor → builder-team-admin}/editor.d.ts +1 -1
- package/dist/editors/builder-team-admin/editor.d.ts.map +1 -0
- package/dist/editors/{clean-new-editor → builder-team-admin}/editor.js +1 -1
- package/dist/editors/builder-team-admin/hooks/useExpenseReportAutoPlacement.d.ts +25 -0
- package/dist/editors/builder-team-admin/hooks/useExpenseReportAutoPlacement.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/hooks/useExpenseReportAutoPlacement.js +180 -0
- package/dist/editors/builder-team-admin/hooks/useRemoteBuilderProfiles.d.ts +20 -0
- package/dist/editors/builder-team-admin/hooks/useRemoteBuilderProfiles.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/hooks/useRemoteBuilderProfiles.js +57 -0
- package/dist/editors/builder-team-admin/hooks/useSnapshotReportAutoPlacement.d.ts +25 -0
- package/dist/editors/builder-team-admin/hooks/useSnapshotReportAutoPlacement.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/hooks/useSnapshotReportAutoPlacement.js +180 -0
- package/dist/editors/builder-team-admin/module.d.ts +3 -0
- package/dist/editors/builder-team-admin/module.d.ts.map +1 -0
- package/dist/editors/{clean-new-editor → builder-team-admin}/module.js +3 -3
- package/dist/editors/builder-team-admin/utils/graphql-client.d.ts +41 -0
- package/dist/editors/builder-team-admin/utils/graphql-client.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/utils/graphql-client.js +189 -0
- package/dist/editors/contributor-billing/components/DriveContents.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveContents.js +5 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.js +7 -7
- package/dist/editors/contributor-billing/components/FolderTree.d.ts +12 -3
- package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/FolderTree.js +146 -56
- package/dist/editors/contributor-billing/components/InvoiceTable/ConfirmationModal.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +1 -0
- package/dist/{old-contributor-billing → editors/contributor-billing}/components/InvoiceTable/HeaderStats.js +10 -9
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/{InvoiceTable.js → InvoiceTable/InvoiceTable.js} +5 -5
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableContainer.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +1 -0
- package/dist/editors/contributor-billing/config.d.ts.map +1 -1
- package/dist/editors/contributor-billing/config.js +0 -1
- package/dist/editors/editors.d.ts.map +1 -1
- package/dist/editors/editors.js +13 -3
- package/dist/editors/expense-report/components/AddBillingStatementModal.d.ts.map +1 -1
- package/dist/editors/expense-report/components/AddReportToRemoteDrive.d.ts +13 -0
- package/dist/editors/expense-report/components/AddReportToRemoteDrive.d.ts.map +1 -0
- package/dist/editors/expense-report/components/AddReportToRemoteDrive.js +76 -0
- package/dist/editors/expense-report/components/AggregatedExpensesTable.d.ts.map +1 -1
- package/dist/editors/expense-report/components/AggregatedExpensesTable.js +9 -7
- package/dist/editors/expense-report/components/ExpenseReportPDF.d.ts.map +1 -1
- package/dist/editors/expense-report/components/ExpenseReportTransactionsTable.d.ts +15 -0
- package/dist/editors/expense-report/components/ExpenseReportTransactionsTable.d.ts.map +1 -0
- package/dist/editors/expense-report/components/ExpenseReportTransactionsTable.js +64 -0
- package/dist/editors/expense-report/components/SetOwner.d.ts +8 -0
- package/dist/editors/expense-report/components/SetOwner.d.ts.map +1 -0
- package/dist/editors/expense-report/components/SetOwner.js +98 -0
- package/dist/editors/expense-report/components/WalletsTable.d.ts +3 -1
- package/dist/editors/expense-report/components/WalletsTable.d.ts.map +1 -1
- package/dist/editors/expense-report/components/WalletsTable.js +564 -89
- package/dist/editors/expense-report/editor.d.ts.map +1 -1
- package/dist/editors/expense-report/editor.js +120 -21
- package/dist/editors/expense-report/hooks/useSyncWallet.d.ts +2 -2
- package/dist/editors/expense-report/hooks/useSyncWallet.d.ts.map +1 -1
- package/dist/editors/expense-report/hooks/useSyncWallet.js +92 -17
- package/dist/editors/expense-report/hooks/useWalletSync.d.ts.map +1 -1
- package/dist/editors/expense-report/hooks/useWalletSync.js +2 -1
- package/dist/editors/expense-report/services/walletAccountService.d.ts +40 -0
- package/dist/editors/expense-report/services/walletAccountService.d.ts.map +1 -0
- package/dist/editors/expense-report/services/walletAccountService.js +403 -0
- package/dist/editors/hooks/useAccountTransactionsDocument.d.ts +4 -0
- package/dist/editors/hooks/useAccountTransactionsDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useAccountTransactionsDocument.js +8 -0
- package/dist/editors/hooks/useAccountsDocument.d.ts +4 -0
- package/dist/editors/hooks/useAccountsDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useAccountsDocument.js +8 -0
- package/dist/editors/hooks/useSnapshotReportDocument.d.ts +4 -0
- package/dist/editors/hooks/useSnapshotReportDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useSnapshotReportDocument.js +8 -0
- package/dist/editors/index.d.ts +7 -2
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +7 -2
- package/dist/editors/invoice/editor.d.ts.map +1 -1
- package/dist/editors/invoice/editor.js +20 -34
- package/dist/editors/invoice/ingestPDF.js +1 -1
- package/dist/editors/invoice/invoiceToGnosis.js +3 -3
- package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/lineItemTags.js +4 -25
- package/dist/editors/invoice/lineItems.d.ts +1 -1
- package/dist/editors/invoice/lineItems.d.ts.map +1 -1
- package/dist/editors/invoice/lineItems.js +31 -75
- package/dist/editors/invoice/module.d.ts +1 -1
- package/dist/editors/invoice/module.d.ts.map +1 -1
- package/dist/editors/invoice/module.js +1 -1
- package/dist/editors/invoice/requestFinance.js +2 -2
- package/dist/editors/invoice/uploadPdfChunked.js +2 -2
- package/dist/editors/service-offering-editor/components/EditName.d.ts +3 -0
- package/dist/editors/service-offering-editor/components/EditName.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/EditName.js +31 -0
- package/dist/editors/service-offering-editor/components/OfferingInfo.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/OfferingInfo.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/OfferingInfo.js +62 -0
- package/dist/editors/service-offering-editor/components/ScopeAndFacets.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/ScopeAndFacets.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/ScopeAndFacets.js +1077 -0
- package/dist/editors/service-offering-editor/components/ServiceCatalog.d.ts +16 -0
- package/dist/editors/service-offering-editor/components/ServiceCatalog.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/ServiceCatalog.js +1379 -0
- package/dist/editors/service-offering-editor/components/ServicesList.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/ServicesList.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/ServicesList.js +63 -0
- package/dist/editors/service-offering-editor/components/TabNavigation.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/TabNavigation.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/TabNavigation.js +243 -0
- package/dist/editors/service-offering-editor/components/TheMatrix.d.ts +10 -0
- package/dist/editors/service-offering-editor/components/TheMatrix.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/TheMatrix.js +1686 -0
- package/dist/editors/service-offering-editor/components/TierDefinition.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/TierDefinition.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/TierDefinition.js +653 -0
- package/dist/editors/service-offering-editor/components/TiersList.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/TiersList.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/TiersList.js +137 -0
- package/dist/editors/service-offering-editor/editor.d.ts +2 -0
- package/dist/editors/service-offering-editor/editor.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/editor.js +336 -0
- package/dist/editors/service-offering-editor/module.d.ts +4 -0
- package/dist/editors/service-offering-editor/module.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/module.js +10 -0
- package/dist/editors/service-subscriptions-editor/components/AddCategoryModal.d.ts +7 -0
- package/dist/editors/service-subscriptions-editor/components/AddCategoryModal.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/AddCategoryModal.js +39 -0
- package/dist/editors/service-subscriptions-editor/components/AddSubscriptionModal.d.ts +10 -0
- package/dist/editors/service-subscriptions-editor/components/AddSubscriptionModal.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/AddSubscriptionModal.js +64 -0
- package/dist/editors/service-subscriptions-editor/components/AddVendorModal.d.ts +7 -0
- package/dist/editors/service-subscriptions-editor/components/AddVendorModal.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/AddVendorModal.js +43 -0
- package/dist/editors/service-subscriptions-editor/components/CategoriesList.d.ts +8 -0
- package/dist/editors/service-subscriptions-editor/components/CategoriesList.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/CategoriesList.js +23 -0
- package/dist/editors/service-subscriptions-editor/components/EditName.d.ts +3 -0
- package/dist/editors/service-subscriptions-editor/components/EditName.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/EditName.js +31 -0
- package/dist/editors/service-subscriptions-editor/components/StatsOverview.d.ts +8 -0
- package/dist/editors/service-subscriptions-editor/components/StatsOverview.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/StatsOverview.js +32 -0
- package/dist/editors/service-subscriptions-editor/components/SubscriptionsList.d.ts +10 -0
- package/dist/editors/service-subscriptions-editor/components/SubscriptionsList.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/SubscriptionsList.js +88 -0
- package/dist/editors/service-subscriptions-editor/components/VendorsList.d.ts +8 -0
- package/dist/editors/service-subscriptions-editor/components/VendorsList.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/VendorsList.js +23 -0
- package/dist/editors/service-subscriptions-editor/editor.d.ts +2 -0
- package/dist/editors/service-subscriptions-editor/editor.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/editor.js +60 -0
- package/dist/editors/{integrations → service-subscriptions-editor}/module.d.ts +1 -1
- package/dist/editors/service-subscriptions-editor/module.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/module.js +10 -0
- package/dist/editors/snapshot-report-editor/components/AddReportToRemoteDrive.d.ts +13 -0
- package/dist/editors/snapshot-report-editor/components/AddReportToRemoteDrive.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/components/AddReportToRemoteDrive.js +76 -0
- package/dist/editors/snapshot-report-editor/components/SetOwner.d.ts +8 -0
- package/dist/editors/snapshot-report-editor/components/SetOwner.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/components/SetOwner.js +98 -0
- package/dist/editors/snapshot-report-editor/editor.d.ts +2 -0
- package/dist/editors/snapshot-report-editor/editor.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/editor.js +560 -0
- package/dist/editors/snapshot-report-editor/hooks/useSyncSnapshotAccount.d.ts +15 -0
- package/dist/editors/snapshot-report-editor/hooks/useSyncSnapshotAccount.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/hooks/useSyncSnapshotAccount.js +327 -0
- package/dist/editors/snapshot-report-editor/module.d.ts +3 -0
- package/dist/editors/snapshot-report-editor/module.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/module.js +9 -0
- package/dist/editors/snapshot-report-editor/utils/balanceCalculations.d.ts +26 -0
- package/dist/editors/snapshot-report-editor/utils/balanceCalculations.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/utils/balanceCalculations.js +103 -0
- package/dist/editors/snapshot-report-editor/utils/deriveTransactions.d.ts +47 -0
- package/dist/editors/snapshot-report-editor/utils/deriveTransactions.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/utils/deriveTransactions.js +89 -0
- package/dist/editors/snapshot-report-editor/utils/flowTypeCalculations.d.ts +29 -0
- package/dist/editors/snapshot-report-editor/utils/flowTypeCalculations.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/utils/flowTypeCalculations.js +63 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/powerhouse.manifest.json +78 -6
- package/dist/scripts/alchemy/alchemyClient.d.ts +63 -0
- package/dist/scripts/alchemy/alchemyClient.d.ts.map +1 -0
- package/dist/scripts/alchemy/alchemyClient.js +232 -0
- package/dist/scripts/alchemy/alchemyEnvironment.d.ts +29 -0
- package/dist/scripts/alchemy/alchemyEnvironment.d.ts.map +1 -0
- package/dist/scripts/alchemy/alchemyEnvironment.js +49 -0
- package/dist/scripts/alchemy/alchemyHelpers.d.ts +24 -0
- package/dist/scripts/alchemy/alchemyHelpers.d.ts.map +1 -0
- package/dist/scripts/alchemy/alchemyHelpers.js +116 -0
- package/dist/scripts/alchemy/alchemyTypes.d.ts +93 -0
- package/dist/scripts/alchemy/alchemyTypes.d.ts.map +1 -0
- package/dist/scripts/alchemy/alchemyTypes.js +25 -0
- package/dist/scripts/invoice/pdfToClaudeAI.d.ts.map +1 -1
- package/dist/scripts/invoice/pdfToClaudeAI.js +186 -4
- package/dist/style.css +4288 -158
- package/dist/subgraphs/{integrations → acc-txs-addon}/index.d.ts +1 -1
- package/dist/subgraphs/acc-txs-addon/index.d.ts.map +1 -0
- package/dist/subgraphs/{integrations → acc-txs-addon}/index.js +2 -2
- package/dist/subgraphs/acc-txs-addon/resolvers.d.ts +3 -0
- package/dist/subgraphs/acc-txs-addon/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/acc-txs-addon/resolvers.js +144 -0
- package/dist/subgraphs/acc-txs-addon/schema.d.ts.map +1 -0
- package/dist/subgraphs/acc-txs-addon/schema.js +47 -0
- package/dist/subgraphs/account-transactions/index.d.ts +11 -0
- package/dist/subgraphs/account-transactions/index.d.ts.map +1 -0
- package/dist/subgraphs/account-transactions/index.js +11 -0
- package/dist/subgraphs/account-transactions/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/account-transactions/resolvers.js +168 -0
- package/dist/subgraphs/account-transactions/schema.d.ts +3 -0
- package/dist/subgraphs/account-transactions/schema.d.ts.map +1 -0
- package/dist/subgraphs/account-transactions/schema.js +129 -0
- package/dist/subgraphs/accounts/index.d.ts +11 -0
- package/dist/subgraphs/accounts/index.d.ts.map +1 -0
- package/dist/subgraphs/accounts/index.js +11 -0
- package/dist/subgraphs/accounts/resolvers.d.ts +3 -0
- package/dist/subgraphs/accounts/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/{integrations → accounts}/resolvers.js +27 -15
- package/dist/subgraphs/accounts/schema.d.ts +3 -0
- package/dist/subgraphs/accounts/schema.d.ts.map +1 -0
- package/dist/subgraphs/accounts/schema.js +75 -0
- package/dist/subgraphs/expense-report/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/resolvers.js +24 -0
- package/dist/subgraphs/expense-report/schema.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/schema.js +24 -0
- package/dist/subgraphs/index.d.ts +6 -1
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/subgraphs/index.js +6 -1
- package/dist/subgraphs/invoice-addon/customResolvers.js +1 -1
- package/dist/subgraphs/service-offering/index.d.ts +11 -0
- package/dist/subgraphs/service-offering/index.d.ts.map +1 -0
- package/dist/subgraphs/service-offering/index.js +11 -0
- package/dist/subgraphs/service-offering/resolvers.d.ts +3 -0
- package/dist/subgraphs/service-offering/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/service-offering/resolvers.js +432 -0
- package/dist/subgraphs/service-offering/schema.d.ts +3 -0
- package/dist/subgraphs/service-offering/schema.d.ts.map +1 -0
- package/dist/subgraphs/service-offering/schema.js +386 -0
- package/dist/subgraphs/service-subscriptions/index.d.ts +11 -0
- package/dist/subgraphs/service-subscriptions/index.d.ts.map +1 -0
- package/dist/subgraphs/service-subscriptions/index.js +11 -0
- package/dist/subgraphs/service-subscriptions/resolvers.d.ts +3 -0
- package/dist/subgraphs/service-subscriptions/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/service-subscriptions/resolvers.js +228 -0
- package/dist/subgraphs/service-subscriptions/schema.d.ts +3 -0
- package/dist/subgraphs/service-subscriptions/schema.d.ts.map +1 -0
- package/dist/subgraphs/service-subscriptions/schema.js +193 -0
- package/dist/subgraphs/snapshot-report/index.d.ts +11 -0
- package/dist/subgraphs/snapshot-report/index.d.ts.map +1 -0
- package/dist/subgraphs/snapshot-report/index.js +11 -0
- package/dist/subgraphs/snapshot-report/resolvers.d.ts +3 -0
- package/dist/subgraphs/snapshot-report/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/snapshot-report/resolvers.js +276 -0
- package/dist/subgraphs/snapshot-report/schema.d.ts +3 -0
- package/dist/subgraphs/snapshot-report/schema.d.ts.map +1 -0
- package/dist/subgraphs/snapshot-report/schema.js +206 -0
- package/package.json +15 -13
- package/dist/document-models/integrations/actions.d.ts.map +0 -1
- package/dist/document-models/integrations/actions.js +0 -4
- package/dist/document-models/integrations/gen/actions.d.ts +0 -4
- package/dist/document-models/integrations/gen/actions.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/actions.js +0 -1
- package/dist/document-models/integrations/gen/creators.d.ts +0 -3
- package/dist/document-models/integrations/gen/creators.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/creators.js +0 -2
- package/dist/document-models/integrations/gen/document-model.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/document-model.js +0 -70
- package/dist/document-models/integrations/gen/document-schema.d.ts +0 -180
- package/dist/document-models/integrations/gen/document-schema.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/document-schema.js +0 -33
- package/dist/document-models/integrations/gen/document-type.d.ts +0 -2
- package/dist/document-models/integrations/gen/document-type.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/document-type.js +0 -1
- package/dist/document-models/integrations/gen/index.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/integrations/actions.d.ts +0 -16
- package/dist/document-models/integrations/gen/integrations/actions.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/integrations/creators.d.ts +0 -6
- package/dist/document-models/integrations/gen/integrations/creators.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/integrations/creators.js +0 -5
- package/dist/document-models/integrations/gen/integrations/error.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/integrations/operations.d.ts +0 -9
- package/dist/document-models/integrations/gen/integrations/operations.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/ph-factories.d.ts +0 -23
- package/dist/document-models/integrations/gen/ph-factories.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/reducer.d.ts +0 -3
- package/dist/document-models/integrations/gen/reducer.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/reducer.js +0 -25
- package/dist/document-models/integrations/gen/schema/index.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/schema/types.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/schema/zod.d.ts +0 -19
- package/dist/document-models/integrations/gen/schema/zod.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/schema/zod.js +0 -97
- package/dist/document-models/integrations/gen/types.d.ts +0 -12
- package/dist/document-models/integrations/gen/types.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/utils.d.ts +0 -15
- package/dist/document-models/integrations/gen/utils.d.ts.map +0 -1
- package/dist/document-models/integrations/hooks.d.ts +0 -11
- package/dist/document-models/integrations/hooks.d.ts.map +0 -1
- package/dist/document-models/integrations/hooks.js +0 -26
- package/dist/document-models/integrations/index.d.ts.map +0 -1
- package/dist/document-models/integrations/module.d.ts +0 -5
- package/dist/document-models/integrations/module.d.ts.map +0 -1
- package/dist/document-models/integrations/src/index.d.ts.map +0 -1
- package/dist/document-models/integrations/src/reducers/integrations.d.ts +0 -3
- package/dist/document-models/integrations/src/reducers/integrations.d.ts.map +0 -1
- package/dist/document-models/integrations/src/reducers/integrations.js +0 -14
- package/dist/document-models/integrations/src/tests/document-model.test.d.ts.map +0 -1
- package/dist/document-models/integrations/src/tests/integrations.test.d.ts.map +0 -1
- package/dist/document-models/integrations/src/utils.d.ts.map +0 -1
- package/dist/document-models/integrations/utils.d.ts +0 -14
- package/dist/document-models/integrations/utils.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/CreateDocument.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/DriveContents.d.ts +0 -3
- package/dist/editors/clean-new-editor/components/DriveContents.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/DriveContents.js +0 -10
- package/dist/editors/clean-new-editor/components/DriveExplorer.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/DriveExplorer.js +0 -16
- package/dist/editors/clean-new-editor/components/EmptyState.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/Files.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/FolderTree.d.ts +0 -6
- package/dist/editors/clean-new-editor/components/FolderTree.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/FolderTree.js +0 -65
- package/dist/editors/clean-new-editor/components/Folders.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/config.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/config.js +0 -5
- package/dist/editors/clean-new-editor/editor.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/module.d.ts +0 -3
- package/dist/editors/clean-new-editor/module.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/ConfirmationModal.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/HeaderControls.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/HeaderStats.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/HeaderStats.js +0 -73
- package/dist/editors/contributor-billing/components/InvoiceTable.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTableContainer.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTableRow.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTableSection.d.ts.map +0 -1
- package/dist/editors/integrations/components/EditName.d.ts +0 -3
- package/dist/editors/integrations/components/EditName.d.ts.map +0 -1
- package/dist/editors/integrations/components/EditName.js +0 -31
- package/dist/editors/integrations/editor.d.ts +0 -3
- package/dist/editors/integrations/editor.d.ts.map +0 -1
- package/dist/editors/integrations/editor.js +0 -6
- package/dist/editors/integrations/module.d.ts.map +0 -1
- package/dist/editors/integrations/module.js +0 -10
- package/dist/old-contributor-billing/components/DriveExplorer.d.ts +0 -7
- package/dist/old-contributor-billing/components/DriveExplorer.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/DriveExplorer.js +0 -184
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderControls.d.ts +0 -25
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderControls.js +0 -154
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts +0 -2
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTable.d.ts +0 -30
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTable.js +0 -254
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts +0 -16
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableRow.js +0 -47
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts +0 -10
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableSection.js +0 -10
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.d.ts +0 -8
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.js +0 -2
- package/dist/old-contributor-billing/config.d.ts +0 -3
- package/dist/old-contributor-billing/config.d.ts.map +0 -1
- package/dist/old-contributor-billing/config.js +0 -4
- package/dist/old-contributor-billing/editor.d.ts +0 -3
- package/dist/old-contributor-billing/editor.d.ts.map +0 -1
- package/dist/old-contributor-billing/editor.js +0 -8
- package/dist/old-contributor-billing/module.d.ts +0 -3
- package/dist/old-contributor-billing/module.d.ts.map +0 -1
- package/dist/old-contributor-billing/module.js +0 -9
- package/dist/old-contributor-billing/util.d.ts +0 -10
- package/dist/old-contributor-billing/util.d.ts.map +0 -1
- package/dist/old-contributor-billing/util.js +0 -112
- package/dist/subgraphs/integrations/index.d.ts.map +0 -1
- package/dist/subgraphs/integrations/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/integrations/schema.d.ts.map +0 -1
- package/dist/subgraphs/integrations/schema.js +0 -69
- /package/dist/document-models/{integrations/gen/integrations → account-transactions/gen/account}/actions.js +0 -0
- /package/dist/document-models/{integrations/gen/integrations → account-transactions/gen/account}/error.d.ts +0 -0
- /package/dist/document-models/{integrations/gen/integrations → account-transactions/gen/account}/error.js +0 -0
- /package/dist/document-models/{integrations/gen/integrations → account-transactions/gen/account}/operations.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/document-model.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/schema/index.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/schema/index.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/schema/types.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/types.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/index.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/index.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/index.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/index.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/tests/document-model.test.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/utils.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/utils.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/CreateDocument.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/CreateDocument.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/DriveExplorer.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/EmptyState.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/EmptyState.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/Files.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/Files.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/Folders.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/Folders.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/NavigationBreadcrumbs.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/NavigationBreadcrumbs.js +0 -0
- /package/dist/editors/contributor-billing/components/{ConfirmationModal.d.ts → InvoiceTable/ConfirmationModal.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{ConfirmationModal.js → InvoiceTable/ConfirmationModal.js} +0 -0
- /package/dist/editors/contributor-billing/components/{HeaderControls.d.ts → InvoiceTable/HeaderControls.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{HeaderControls.js → InvoiceTable/HeaderControls.js} +0 -0
- /package/dist/editors/contributor-billing/components/{HeaderStats.d.ts → InvoiceTable/HeaderStats.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTable.d.ts → InvoiceTable/InvoiceTable.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableContainer.d.ts → InvoiceTable/InvoiceTableContainer.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableContainer.js → InvoiceTable/InvoiceTableContainer.js} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableRow.d.ts → InvoiceTable/InvoiceTableRow.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableRow.js → InvoiceTable/InvoiceTableRow.js} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableSection.d.ts → InvoiceTable/InvoiceTableSection.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableSection.js → InvoiceTable/InvoiceTableSection.js} +0 -0
- /package/dist/subgraphs/{integrations → acc-txs-addon}/schema.d.ts +0 -0
- /package/dist/subgraphs/{integrations → account-transactions}/resolvers.d.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface AddVendorModalProps {
|
|
2
|
+
onClose: () => void;
|
|
3
|
+
isDarkMode: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function AddVendorModal({ onClose, isDarkMode }: AddVendorModalProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=AddVendorModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddVendorModal.d.ts","sourceRoot":"","sources":["../../../../editors/service-subscriptions-editor/components/AddVendorModal.tsx"],"names":[],"mappings":"AAKA,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,mBAAmB,2CAsJ1E"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { generateId } from "document-model/core";
|
|
4
|
+
import { useSelectedServiceSubscriptionsDocument } from "../../../document-models/service-subscriptions/hooks.js";
|
|
5
|
+
import { addVendor } from "../../../document-models/service-subscriptions/gen/creators.js";
|
|
6
|
+
export function AddVendorModal({ onClose, isDarkMode }) {
|
|
7
|
+
const [, dispatch] = useSelectedServiceSubscriptionsDocument();
|
|
8
|
+
const [formData, setFormData] = useState({
|
|
9
|
+
name: "",
|
|
10
|
+
website: "",
|
|
11
|
+
supportEmail: "",
|
|
12
|
+
supportUrl: "",
|
|
13
|
+
});
|
|
14
|
+
const handleSubmit = (e) => {
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
if (!formData.name) {
|
|
17
|
+
alert("Name is required");
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
dispatch?.(addVendor({
|
|
21
|
+
id: generateId(),
|
|
22
|
+
name: formData.name,
|
|
23
|
+
website: formData.website || undefined,
|
|
24
|
+
supportEmail: formData.supportEmail || undefined,
|
|
25
|
+
supportUrl: formData.supportUrl || undefined,
|
|
26
|
+
}));
|
|
27
|
+
onClose();
|
|
28
|
+
};
|
|
29
|
+
const updateField = (field, value) => {
|
|
30
|
+
setFormData((prev) => ({ ...prev, [field]: value }));
|
|
31
|
+
};
|
|
32
|
+
const inputClass = `w-full px-3 py-2.5 text-sm rounded-lg border transition-colors focus:outline-none focus:border-indigo-500 ${isDarkMode
|
|
33
|
+
? "bg-gray-900 border-gray-700 text-gray-100 placeholder-gray-500"
|
|
34
|
+
: "bg-gray-50 border-gray-200 text-gray-900 placeholder-gray-400"}`;
|
|
35
|
+
const labelClass = `block text-sm font-medium mb-1.5 ${isDarkMode ? "text-gray-400" : "text-gray-500"}`;
|
|
36
|
+
return (_jsx("div", { className: `fixed inset-0 flex items-center justify-center z-50 ${isDarkMode ? "bg-black/70" : "bg-black/40"}`, onClick: onClose, children: _jsxs("div", { className: `w-full max-w-md rounded-xl border ${isDarkMode
|
|
37
|
+
? "bg-gray-800 border-gray-700"
|
|
38
|
+
: "bg-white border-gray-200 shadow-xl"}`, onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: `flex justify-between items-center px-6 py-5 border-b ${isDarkMode ? "border-gray-700" : "border-gray-200"}`, children: [_jsx("h2", { className: `text-lg font-semibold ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: "Add Vendor" }), _jsx("button", { className: `w-8 h-8 flex items-center justify-center rounded-md transition-colors ${isDarkMode
|
|
39
|
+
? "text-gray-400 hover:text-gray-100 hover:bg-gray-700"
|
|
40
|
+
: "text-gray-500 hover:text-gray-900 hover:bg-gray-100"}`, onClick: onClose, children: "\u2715" })] }), _jsxs("form", { onSubmit: handleSubmit, children: [_jsxs("div", { className: "p-6 space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: labelClass, children: "Name *" }), _jsx("input", { type: "text", className: inputClass, placeholder: "e.g., Google, Microsoft, Anthropic", value: formData.name, onChange: (e) => updateField("name", e.target.value), autoFocus: true })] }), _jsxs("div", { children: [_jsx("label", { className: labelClass, children: "Website" }), _jsx("input", { type: "url", className: inputClass, placeholder: "https://...", value: formData.website, onChange: (e) => updateField("website", e.target.value) })] }), _jsxs("div", { children: [_jsx("label", { className: labelClass, children: "Support Email" }), _jsx("input", { type: "email", className: inputClass, placeholder: "support@vendor.com", value: formData.supportEmail, onChange: (e) => updateField("supportEmail", e.target.value) })] }), _jsxs("div", { children: [_jsx("label", { className: labelClass, children: "Support URL" }), _jsx("input", { type: "url", className: inputClass, placeholder: "https://support.vendor.com", value: formData.supportUrl, onChange: (e) => updateField("supportUrl", e.target.value) })] })] }), _jsxs("div", { className: `flex justify-end gap-3 px-6 py-4 border-t ${isDarkMode ? "border-gray-700" : "border-gray-200"}`, children: [_jsx("button", { type: "button", className: `px-4 py-2 text-sm font-medium rounded-lg border transition-colors ${isDarkMode
|
|
41
|
+
? "bg-gray-700 border-gray-600 text-gray-100 hover:bg-gray-600"
|
|
42
|
+
: "bg-white border-gray-200 text-gray-900 hover:bg-gray-50"}`, onClick: onClose, children: "Cancel" }), _jsx("button", { type: "submit", className: "px-4 py-2 text-sm font-medium bg-indigo-500 text-white rounded-lg hover:bg-indigo-600 transition-colors", children: "Add Vendor" })] })] })] }) }));
|
|
43
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Category } from "../../../document-models/service-subscriptions/gen/types.js";
|
|
2
|
+
interface CategoriesListProps {
|
|
3
|
+
categories: Category[];
|
|
4
|
+
isDarkMode: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function CategoriesList({ categories, isDarkMode, }: CategoriesListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=CategoriesList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoriesList.d.ts","sourceRoot":"","sources":["../../../../editors/service-subscriptions-editor/components/CategoriesList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6DAA6D,CAAC;AAE5F,UAAU,mBAAmB;IAC3B,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,UAAU,GACX,EAAE,mBAAmB,2CAwCrB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useSelectedServiceSubscriptionsDocument } from "../../../document-models/service-subscriptions/hooks.js";
|
|
3
|
+
import { deleteCategory } from "../../../document-models/service-subscriptions/gen/creators.js";
|
|
4
|
+
export function CategoriesList({ categories, isDarkMode, }) {
|
|
5
|
+
if (categories.length === 0) {
|
|
6
|
+
return (_jsxs("div", { className: `text-center py-16 ${isDarkMode ? "text-gray-400" : "text-gray-500"}`, children: [_jsx("svg", { className: "w-12 h-12 mx-auto mb-4 opacity-50", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), _jsx("div", { className: `text-base font-medium mb-2 ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: "No categories yet" }), _jsx("p", { children: "Add categories to organize your subscriptions." })] }));
|
|
7
|
+
}
|
|
8
|
+
return (_jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: categories.map((category) => (_jsx(CategoryCard, { category: category, isDarkMode: isDarkMode }, category.id))) }));
|
|
9
|
+
}
|
|
10
|
+
function CategoryCard({ category, isDarkMode }) {
|
|
11
|
+
const [, dispatch] = useSelectedServiceSubscriptionsDocument();
|
|
12
|
+
const handleDelete = () => {
|
|
13
|
+
if (confirm(`Delete category "${category.name}"?`)) {
|
|
14
|
+
dispatch?.(deleteCategory({ id: category.id }));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const cardClass = `p-4 rounded-lg border transition-colors ${isDarkMode
|
|
18
|
+
? "bg-gray-800 border-gray-700 hover:border-indigo-500"
|
|
19
|
+
: "bg-white border-gray-200 hover:border-indigo-500 shadow-sm"}`;
|
|
20
|
+
return (_jsxs("div", { className: cardClass, children: [_jsx("div", { className: "mb-3", children: _jsx("h3", { className: `text-base font-semibold ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: category.name }) }), category.description && (_jsx("div", { className: "flex flex-col gap-2", children: _jsx("p", { className: `text-sm m-0 ${isDarkMode ? "text-gray-400" : "text-gray-500"}`, children: category.description }) })), _jsx("div", { className: `flex gap-2 mt-3 pt-3 border-t ${isDarkMode ? "border-gray-700" : "border-gray-200"}`, children: _jsx("button", { className: `px-2.5 py-1.5 text-xs rounded-lg transition-colors ${isDarkMode
|
|
21
|
+
? "text-red-400 hover:bg-red-500/10"
|
|
22
|
+
: "text-red-600 hover:bg-red-500/10"}`, onClick: handleDelete, children: "Delete" }) })] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditName.d.ts","sourceRoot":"","sources":["../../../../editors/service-subscriptions-editor/components/EditName.tsx"],"names":[],"mappings":"AAKA,4FAA4F;AAC5F,wBAAgB,4BAA4B,mDAyE3C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { setName } from "document-model";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { useSelectedServiceSubscriptionsDocument } from "../../../document-models/service-subscriptions/hooks.js";
|
|
5
|
+
/** Displays the name of the selected ServiceSubscriptions document and allows editing it */
|
|
6
|
+
export function EditServiceSubscriptionsName() {
|
|
7
|
+
const [serviceSubscriptionsDocument, dispatch] = useSelectedServiceSubscriptionsDocument();
|
|
8
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
9
|
+
if (!serviceSubscriptionsDocument)
|
|
10
|
+
return null;
|
|
11
|
+
const serviceSubscriptionsDocumentName = serviceSubscriptionsDocument.header.name;
|
|
12
|
+
const onClickEditServiceSubscriptionsName = () => {
|
|
13
|
+
setIsEditing(true);
|
|
14
|
+
};
|
|
15
|
+
const onClickCancelEditServiceSubscriptionsName = () => {
|
|
16
|
+
setIsEditing(false);
|
|
17
|
+
};
|
|
18
|
+
const onSubmitSetName = (event) => {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
const form = event.currentTarget;
|
|
21
|
+
const nameInput = form.elements.namedItem("name");
|
|
22
|
+
const name = nameInput.value;
|
|
23
|
+
if (!name)
|
|
24
|
+
return;
|
|
25
|
+
dispatch(setName(name));
|
|
26
|
+
setIsEditing(false);
|
|
27
|
+
};
|
|
28
|
+
if (isEditing)
|
|
29
|
+
return (_jsxs("form", { className: "flex gap-2 items-center justify-between", onSubmit: onSubmitSetName, children: [_jsx("input", { className: "text-lg font-semibold text-gray-900 p-1", type: "text", name: "name", defaultValue: serviceSubscriptionsDocumentName, autoFocus: true }), _jsxs("div", { className: "flex gap-2", children: [_jsx("button", { type: "submit", className: "text-sm text-gray-600", children: "Save" }), _jsx("button", { className: "text-sm text-red-800", onClick: onClickCancelEditServiceSubscriptionsName, children: "Cancel" })] })] }));
|
|
30
|
+
return (_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900", children: serviceSubscriptionsDocumentName }), _jsx("button", { className: "text-sm text-gray-600", onClick: onClickEditServiceSubscriptionsName, children: "Edit Name" })] }));
|
|
31
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ServiceSubscription } from "../../../document-models/service-subscriptions/gen/types.js";
|
|
2
|
+
interface StatsOverviewProps {
|
|
3
|
+
subscriptions: ServiceSubscription[];
|
|
4
|
+
isDarkMode: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function StatsOverview({ subscriptions, isDarkMode, }: StatsOverviewProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=StatsOverview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatsOverview.d.ts","sourceRoot":"","sources":["../../../../editors/service-subscriptions-editor/components/StatsOverview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAEvG,UAAU,kBAAkB;IAC1B,aAAa,EAAE,mBAAmB,EAAE,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,aAAa,EACb,UAAU,GACX,EAAE,kBAAkB,2CA0EpB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function StatsOverview({ subscriptions, isDarkMode, }) {
|
|
3
|
+
const activeCount = subscriptions.filter((s) => s.status === "ACTIVE").length;
|
|
4
|
+
const trialCount = subscriptions.filter((s) => s.status === "TRIAL").length;
|
|
5
|
+
const totalMonthly = subscriptions.reduce((sum, sub) => {
|
|
6
|
+
if (!sub.amount)
|
|
7
|
+
return sum;
|
|
8
|
+
const amount = sub.amount;
|
|
9
|
+
switch (sub.billingCycle) {
|
|
10
|
+
case "MONTHLY":
|
|
11
|
+
return sum + amount;
|
|
12
|
+
case "QUARTERLY":
|
|
13
|
+
return sum + amount / 3;
|
|
14
|
+
case "ANNUAL":
|
|
15
|
+
return sum + amount / 12;
|
|
16
|
+
case "BIENNIAL":
|
|
17
|
+
return sum + amount / 24;
|
|
18
|
+
default:
|
|
19
|
+
return sum;
|
|
20
|
+
}
|
|
21
|
+
}, 0);
|
|
22
|
+
const totalSeats = subscriptions.reduce((sum, sub) => sum + (sub.seats?.total ?? 0), 0);
|
|
23
|
+
const usedSeats = subscriptions.reduce((sum, sub) => sum + (sub.seats?.assignedMembers.length ?? 0), 0);
|
|
24
|
+
const cardClass = `p-4 rounded-lg border ${isDarkMode
|
|
25
|
+
? "bg-gray-800 border-gray-700"
|
|
26
|
+
: "bg-white border-gray-200 shadow-sm"}`;
|
|
27
|
+
const labelClass = `text-sm mb-2 ${isDarkMode ? "text-gray-400" : "text-gray-500"}`;
|
|
28
|
+
return (_jsxs("div", { className: "grid grid-cols-4 gap-4 mb-6", children: [_jsxs("div", { className: cardClass, children: [_jsx("div", { className: labelClass, children: "Active Subscriptions" }), _jsx("div", { className: "text-3xl font-semibold tracking-tight text-green-500", children: activeCount })] }), _jsxs("div", { className: cardClass, children: [_jsx("div", { className: labelClass, children: "Trial Subscriptions" }), _jsx("div", { className: "text-3xl font-semibold tracking-tight text-amber-500", children: trialCount })] }), _jsxs("div", { className: cardClass, children: [_jsx("div", { className: labelClass, children: "Monthly Cost (est.)" }), _jsxs("div", { className: `text-3xl font-semibold tracking-tight ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: ["$", totalMonthly.toLocaleString(undefined, {
|
|
29
|
+
minimumFractionDigits: 0,
|
|
30
|
+
maximumFractionDigits: 0,
|
|
31
|
+
})] })] }), _jsxs("div", { className: cardClass, children: [_jsx("div", { className: labelClass, children: "Seats Used" }), _jsxs("div", { className: `text-3xl font-semibold tracking-tight ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: [usedSeats, "/", totalSeats] })] })] }));
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ServiceSubscription, Vendor, Category } from "../../../document-models/service-subscriptions/gen/types.js";
|
|
2
|
+
interface SubscriptionsListProps {
|
|
3
|
+
subscriptions: ServiceSubscription[];
|
|
4
|
+
vendors: Vendor[];
|
|
5
|
+
categories: Category[];
|
|
6
|
+
isDarkMode: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function SubscriptionsList({ subscriptions, vendors, categories, isDarkMode, }: SubscriptionsListProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=SubscriptionsList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionsList.d.ts","sourceRoot":"","sources":["../../../../editors/service-subscriptions-editor/components/SubscriptionsList.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EACnB,MAAM,EACN,QAAQ,EAET,MAAM,6DAA6D,CAAC;AAGrE,UAAU,sBAAsB;IAC9B,aAAa,EAAE,mBAAmB,EAAE,CAAC;IACrC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,OAAO,EACP,UAAU,EACV,UAAU,GACX,EAAE,sBAAsB,2CAmDxB"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useSelectedServiceSubscriptionsDocument } from "../../../document-models/service-subscriptions/hooks.js";
|
|
3
|
+
import { deleteSubscription, updateSubscriptionStatus, assignMember, unassignMember, } from "../../../document-models/service-subscriptions/gen/creators.js";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
export function SubscriptionsList({ subscriptions, vendors, categories, isDarkMode, }) {
|
|
6
|
+
if (subscriptions.length === 0) {
|
|
7
|
+
return (_jsxs("div", { className: `text-center py-16 ${isDarkMode ? "text-gray-400" : "text-gray-500"}`, children: [_jsxs("svg", { className: "w-12 h-12 mx-auto mb-4 opacity-50", viewBox: "0 0 24 24", fill: "none", children: [_jsx("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2", stroke: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "M3 10h18", stroke: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "M7 15h4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] }), _jsx("div", { className: `text-base font-medium mb-2 ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: "No subscriptions yet" }), _jsx("p", { children: "Add your first subscription to start tracking." })] }));
|
|
8
|
+
}
|
|
9
|
+
return (_jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: subscriptions.map((subscription) => (_jsx(SubscriptionCard, { subscription: subscription, vendor: vendors.find((v) => v.id === subscription.vendorId), category: categories.find((c) => c.id === subscription.categoryId), isDarkMode: isDarkMode }, subscription.id))) }));
|
|
10
|
+
}
|
|
11
|
+
function SubscriptionCard({ subscription, vendor, category, isDarkMode, }) {
|
|
12
|
+
const [, dispatch] = useSelectedServiceSubscriptionsDocument();
|
|
13
|
+
const [showAssignModal, setShowAssignModal] = useState(false);
|
|
14
|
+
const handleDelete = () => {
|
|
15
|
+
if (confirm(`Delete subscription "${subscription.name}"?`)) {
|
|
16
|
+
dispatch?.(deleteSubscription({ id: subscription.id }));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const handleStatusChange = (status) => {
|
|
20
|
+
dispatch?.(updateSubscriptionStatus({ id: subscription.id, status }));
|
|
21
|
+
};
|
|
22
|
+
const handleAssignMember = (memberId) => {
|
|
23
|
+
dispatch?.(assignMember({ subscriptionId: subscription.id, memberId }));
|
|
24
|
+
setShowAssignModal(false);
|
|
25
|
+
};
|
|
26
|
+
const handleUnassignMember = (memberId) => {
|
|
27
|
+
dispatch?.(unassignMember({ subscriptionId: subscription.id, memberId }));
|
|
28
|
+
};
|
|
29
|
+
const getStatusClasses = (status) => {
|
|
30
|
+
const base = "inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full uppercase tracking-wide";
|
|
31
|
+
switch (status) {
|
|
32
|
+
case "ACTIVE":
|
|
33
|
+
return `${base} ${isDarkMode ? "bg-green-500/15 text-green-400" : "bg-green-500/10 text-green-600"}`;
|
|
34
|
+
case "TRIAL":
|
|
35
|
+
return `${base} ${isDarkMode ? "bg-indigo-500/15 text-indigo-400" : "bg-indigo-500/10 text-indigo-600"}`;
|
|
36
|
+
case "PENDING":
|
|
37
|
+
return `${base} ${isDarkMode ? "bg-amber-500/15 text-amber-400" : "bg-amber-500/10 text-amber-600"}`;
|
|
38
|
+
default:
|
|
39
|
+
return `${base} ${isDarkMode ? "bg-red-500/15 text-red-400" : "bg-red-500/10 text-red-600"}`;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const formatCurrency = (amount, currency) => {
|
|
43
|
+
if (!amount)
|
|
44
|
+
return "—";
|
|
45
|
+
return `${currency ?? "$"}${amount.toLocaleString()}`;
|
|
46
|
+
};
|
|
47
|
+
const billingCycleLabels = {
|
|
48
|
+
MONTHLY: "/mo",
|
|
49
|
+
QUARTERLY: "/qtr",
|
|
50
|
+
ANNUAL: "/yr",
|
|
51
|
+
BIENNIAL: "/2yr",
|
|
52
|
+
ONE_TIME: "one-time",
|
|
53
|
+
USAGE_BASED: "usage",
|
|
54
|
+
};
|
|
55
|
+
const cardClass = `p-4 rounded-lg border transition-colors ${isDarkMode
|
|
56
|
+
? "bg-gray-800 border-gray-700 hover:border-indigo-500"
|
|
57
|
+
: "bg-white border-gray-200 hover:border-indigo-500 shadow-sm"}`;
|
|
58
|
+
return (_jsxs("div", { className: cardClass, children: [_jsxs("div", { className: "flex justify-between items-start mb-3", children: [_jsxs("div", { children: [_jsx("h3", { className: `text-base font-semibold ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: subscription.name }), _jsxs("div", { className: `text-sm mt-1 ${isDarkMode ? "text-gray-400" : "text-gray-500"}`, children: [vendor?.name ?? "Unknown vendor", category && ` • ${category.name}`] })] }), _jsxs("div", { className: getStatusClasses(subscription.status), children: [_jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-current" }), subscription.status] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex justify-between text-sm", children: [_jsx("span", { className: isDarkMode ? "text-gray-400" : "text-gray-500", children: "Plan" }), _jsx("span", { className: `font-medium ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: subscription.planName ?? "—" })] }), _jsxs("div", { className: "flex justify-between text-sm", children: [_jsx("span", { className: isDarkMode ? "text-gray-400" : "text-gray-500", children: "Cost" }), _jsxs("span", { className: `font-medium ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: [formatCurrency(subscription.amount, subscription.currency), subscription.amount && (_jsxs("span", { className: `font-normal ${isDarkMode ? "text-gray-400" : "text-gray-500"}`, children: [" ", billingCycleLabels[subscription.billingCycle]] }))] })] }), subscription.nextBillingDate && (_jsxs("div", { className: "flex justify-between text-sm", children: [_jsx("span", { className: isDarkMode ? "text-gray-400" : "text-gray-500", children: "Next billing" }), _jsx("span", { className: `font-medium ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: subscription.nextBillingDate })] })), subscription.loginUrl && (_jsxs("div", { className: "flex justify-between text-sm", children: [_jsx("span", { className: isDarkMode ? "text-gray-400" : "text-gray-500", children: "Login" }), _jsx("a", { href: subscription.loginUrl, target: "_blank", rel: "noopener noreferrer", className: "text-indigo-500 hover:underline", children: "Open \u2192" })] }))] }), subscription.seats && (_jsxs("div", { className: `mt-3 pt-3 border-t ${isDarkMode ? "border-gray-700" : "border-gray-200"}`, children: [_jsxs("div", { className: "flex justify-between items-center mb-2", children: [_jsx("span", { className: `text-xs ${isDarkMode ? "text-gray-400" : "text-gray-500"}`, children: "Seats" }), _jsxs("span", { className: `text-xs font-medium ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: [subscription.seats.assignedMembers.length, " /", " ", subscription.seats.total] })] }), _jsx("div", { className: `h-1.5 rounded-full overflow-hidden ${isDarkMode ? "bg-gray-700" : "bg-gray-200"}`, children: _jsx("div", { className: "h-full bg-indigo-500 rounded-full transition-all duration-300", style: {
|
|
59
|
+
width: `${(subscription.seats.assignedMembers.length / subscription.seats.total) * 100}%`,
|
|
60
|
+
} }) }), subscription.seats.assignedMembers.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-1 mt-2", children: subscription.seats.assignedMembers.map((memberId) => (_jsxs("span", { className: `text-xs px-2 py-0.5 rounded cursor-pointer ${isDarkMode
|
|
61
|
+
? "bg-gray-900 text-gray-400"
|
|
62
|
+
: "bg-gray-100 text-gray-500"}`, onClick: () => handleUnassignMember(memberId), title: "Click to unassign", children: [memberId.slice(0, 12), "..."] }, memberId))) })), subscription.seats.assignedMembers.length <
|
|
63
|
+
subscription.seats.total && (_jsx("button", { className: `mt-2 text-xs px-2 py-1 rounded transition-colors ${isDarkMode
|
|
64
|
+
? "text-gray-400 hover:text-gray-100 hover:bg-gray-700"
|
|
65
|
+
: "text-gray-500 hover:text-gray-900 hover:bg-gray-100"}`, onClick: () => setShowAssignModal(true), children: "+ Assign member" }))] })), _jsxs("div", { className: `flex gap-2 mt-3 pt-3 border-t ${isDarkMode ? "border-gray-700" : "border-gray-200"}`, children: [_jsxs("select", { className: `flex-1 px-3 py-2 text-sm rounded-lg border cursor-pointer ${isDarkMode
|
|
66
|
+
? "bg-gray-900 border-gray-700 text-gray-100"
|
|
67
|
+
: "bg-gray-50 border-gray-200 text-gray-900"}`, value: subscription.status, onChange: (e) => handleStatusChange(e.target.value), children: [_jsx("option", { value: "ACTIVE", children: "Active" }), _jsx("option", { value: "TRIAL", children: "Trial" }), _jsx("option", { value: "PENDING", children: "Pending" }), _jsx("option", { value: "PAUSED", children: "Paused" }), _jsx("option", { value: "CANCELLED", children: "Cancelled" }), _jsx("option", { value: "EXPIRED", children: "Expired" })] }), _jsx("button", { className: `px-2.5 py-1.5 text-xs rounded-lg transition-colors ${isDarkMode
|
|
68
|
+
? "text-red-400 hover:bg-red-500/10"
|
|
69
|
+
: "text-red-600 hover:bg-red-500/10"}`, onClick: handleDelete, children: "Delete" })] }), showAssignModal && (_jsx(AssignMemberModal, { onAssign: handleAssignMember, onClose: () => setShowAssignModal(false), isDarkMode: isDarkMode }))] }));
|
|
70
|
+
}
|
|
71
|
+
function AssignMemberModal({ onAssign, onClose, isDarkMode, }) {
|
|
72
|
+
const [memberId, setMemberId] = useState("");
|
|
73
|
+
const handleSubmit = (e) => {
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
if (memberId.trim()) {
|
|
76
|
+
onAssign(memberId.trim());
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
return (_jsx("div", { className: `fixed inset-0 flex items-center justify-center z-50 animate-in fade-in duration-150 ${isDarkMode ? "bg-black/70" : "bg-black/40"}`, onClick: onClose, children: _jsxs("div", { className: `w-full max-w-md rounded-xl border animate-in slide-in-from-bottom-2 duration-200 ${isDarkMode
|
|
80
|
+
? "bg-gray-800 border-gray-700"
|
|
81
|
+
: "bg-white border-gray-200 shadow-xl"}`, onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: `flex justify-between items-center px-6 py-5 border-b ${isDarkMode ? "border-gray-700" : "border-gray-200"}`, children: [_jsx("h2", { className: `text-lg font-semibold ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: "Assign Member" }), _jsx("button", { className: `w-8 h-8 flex items-center justify-center rounded-md transition-colors ${isDarkMode
|
|
82
|
+
? "text-gray-400 hover:text-gray-100 hover:bg-gray-700"
|
|
83
|
+
: "text-gray-500 hover:text-gray-900 hover:bg-gray-100"}`, onClick: onClose, children: "\u2715" })] }), _jsxs("form", { onSubmit: handleSubmit, children: [_jsx("div", { className: "p-6", children: _jsxs("div", { className: "mb-4", children: [_jsx("label", { className: `block text-sm font-medium mb-1.5 ${isDarkMode ? "text-gray-400" : "text-gray-500"}`, children: "Member PHID" }), _jsx("input", { type: "text", className: `w-full px-3 py-2.5 text-sm rounded-lg border transition-colors focus:outline-none focus:border-indigo-500 ${isDarkMode
|
|
84
|
+
? "bg-gray-900 border-gray-700 text-gray-100 placeholder-gray-500"
|
|
85
|
+
: "bg-gray-50 border-gray-200 text-gray-900 placeholder-gray-400"}`, placeholder: "Enter member PHID", value: memberId, onChange: (e) => setMemberId(e.target.value), autoFocus: true })] }) }), _jsxs("div", { className: `flex justify-end gap-3 px-6 py-4 border-t ${isDarkMode ? "border-gray-700" : "border-gray-200"}`, children: [_jsx("button", { type: "button", className: `px-4 py-2 text-sm font-medium rounded-lg border transition-colors ${isDarkMode
|
|
86
|
+
? "bg-gray-700 border-gray-600 text-gray-100 hover:bg-gray-600"
|
|
87
|
+
: "bg-white border-gray-200 text-gray-900 hover:bg-gray-50"}`, onClick: onClose, children: "Cancel" }), _jsx("button", { type: "submit", className: "px-4 py-2 text-sm font-medium bg-indigo-500 text-white rounded-lg hover:bg-indigo-600 transition-colors", children: "Assign" })] })] })] }) }));
|
|
88
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Vendor } from "../../../document-models/service-subscriptions/gen/types.js";
|
|
2
|
+
interface VendorsListProps {
|
|
3
|
+
vendors: Vendor[];
|
|
4
|
+
isDarkMode: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function VendorsList({ vendors, isDarkMode }: VendorsListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=VendorsList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VendorsList.d.ts","sourceRoot":"","sources":["../../../../editors/service-subscriptions-editor/components/VendorsList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6DAA6D,CAAC;AAE1F,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,gBAAgB,2CAoCpE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useSelectedServiceSubscriptionsDocument } from "../../../document-models/service-subscriptions/hooks.js";
|
|
3
|
+
import { deleteVendor } from "../../../document-models/service-subscriptions/gen/creators.js";
|
|
4
|
+
export function VendorsList({ vendors, isDarkMode }) {
|
|
5
|
+
if (vendors.length === 0) {
|
|
6
|
+
return (_jsxs("div", { className: `text-center py-16 ${isDarkMode ? "text-gray-400" : "text-gray-500"}`, children: [_jsx("svg", { className: "w-12 h-12 mx-auto mb-4 opacity-50", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), _jsx("div", { className: `text-base font-medium mb-2 ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: "No vendors yet" }), _jsx("p", { children: "Add vendors to organize your subscriptions." })] }));
|
|
7
|
+
}
|
|
8
|
+
return (_jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: vendors.map((vendor) => (_jsx(VendorCard, { vendor: vendor, isDarkMode: isDarkMode }, vendor.id))) }));
|
|
9
|
+
}
|
|
10
|
+
function VendorCard({ vendor, isDarkMode }) {
|
|
11
|
+
const [, dispatch] = useSelectedServiceSubscriptionsDocument();
|
|
12
|
+
const handleDelete = () => {
|
|
13
|
+
if (confirm(`Delete vendor "${vendor.name}"?`)) {
|
|
14
|
+
dispatch?.(deleteVendor({ id: vendor.id }));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const cardClass = `p-4 rounded-lg border transition-colors ${isDarkMode
|
|
18
|
+
? "bg-gray-800 border-gray-700 hover:border-indigo-500"
|
|
19
|
+
: "bg-white border-gray-200 hover:border-indigo-500 shadow-sm"}`;
|
|
20
|
+
return (_jsxs("div", { className: cardClass, children: [_jsx("div", { className: "mb-3", children: _jsx("h3", { className: `text-base font-semibold ${isDarkMode ? "text-gray-100" : "text-gray-900"}`, children: vendor.name }) }), _jsxs("div", { className: "flex flex-col gap-2", children: [vendor.website && (_jsxs("div", { className: "flex justify-between text-sm", children: [_jsx("span", { className: isDarkMode ? "text-gray-400" : "text-gray-500", children: "Website" }), _jsx("a", { href: vendor.website, target: "_blank", rel: "noopener noreferrer", className: "text-indigo-500 hover:underline", children: new URL(vendor.website).hostname })] })), vendor.supportEmail && (_jsxs("div", { className: "flex justify-between text-sm", children: [_jsx("span", { className: isDarkMode ? "text-gray-400" : "text-gray-500", children: "Support Email" }), _jsx("a", { href: `mailto:${vendor.supportEmail}`, className: "text-indigo-500 hover:underline", children: vendor.supportEmail })] })), vendor.supportUrl && (_jsxs("div", { className: "flex justify-between text-sm", children: [_jsx("span", { className: isDarkMode ? "text-gray-400" : "text-gray-500", children: "Support" }), _jsx("a", { href: vendor.supportUrl, target: "_blank", rel: "noopener noreferrer", className: "text-indigo-500 hover:underline", children: "Help Center \u2192" })] }))] }), _jsx("div", { className: `flex gap-2 mt-3 pt-3 border-t ${isDarkMode ? "border-gray-700" : "border-gray-200"}`, children: _jsx("button", { className: `px-2.5 py-1.5 text-xs rounded-lg transition-colors ${isDarkMode
|
|
21
|
+
? "text-red-400 hover:bg-red-500/10"
|
|
22
|
+
: "text-red-600 hover:bg-red-500/10"}`, onClick: handleDelete, children: "Delete" }) })] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/service-subscriptions-editor/editor.tsx"],"names":[],"mappings":"AAaA,MAAM,CAAC,OAAO,UAAU,MAAM,4CAsL7B"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { useSelectedServiceSubscriptionsDocument } from "../../document-models/service-subscriptions/hooks.js";
|
|
4
|
+
import { SubscriptionsList } from "./components/SubscriptionsList.js";
|
|
5
|
+
import { VendorsList } from "./components/VendorsList.js";
|
|
6
|
+
import { CategoriesList } from "./components/CategoriesList.js";
|
|
7
|
+
import { AddSubscriptionModal } from "./components/AddSubscriptionModal.js";
|
|
8
|
+
import { AddVendorModal } from "./components/AddVendorModal.js";
|
|
9
|
+
import { AddCategoryModal } from "./components/AddCategoryModal.js";
|
|
10
|
+
import { StatsOverview } from "./components/StatsOverview.js";
|
|
11
|
+
import { DocumentToolbar } from "@powerhousedao/design-system/connect";
|
|
12
|
+
export default function Editor() {
|
|
13
|
+
const [document] = useSelectedServiceSubscriptionsDocument();
|
|
14
|
+
const [activeTab, setActiveTab] = useState("subscriptions");
|
|
15
|
+
const [isDarkMode, setIsDarkMode] = useState(false);
|
|
16
|
+
const [showAddSubscription, setShowAddSubscription] = useState(false);
|
|
17
|
+
const [showAddVendor, setShowAddVendor] = useState(false);
|
|
18
|
+
const [showAddCategory, setShowAddCategory] = useState(false);
|
|
19
|
+
if (!document) {
|
|
20
|
+
return (_jsxs("div", { className: `min-h-full p-6 md:p-8 flex flex-col items-center justify-center gap-4 ${isDarkMode ? "bg-gray-950 text-gray-400" : "bg-gray-50 text-gray-500"}`, children: [_jsx("div", { className: `w-8 h-8 border-3 rounded-full animate-spin ${isDarkMode
|
|
21
|
+
? "border-gray-700 border-t-indigo-500"
|
|
22
|
+
: "border-gray-300 border-t-indigo-500"}` }), _jsx("span", { children: "Loading subscriptions..." })] }));
|
|
23
|
+
}
|
|
24
|
+
const { subscriptions, vendors, categories } = document.state.global;
|
|
25
|
+
const tabs = [
|
|
26
|
+
{
|
|
27
|
+
id: "subscriptions",
|
|
28
|
+
label: "Subscriptions",
|
|
29
|
+
count: subscriptions.length,
|
|
30
|
+
},
|
|
31
|
+
{ id: "vendors", label: "Vendors", count: vendors.length },
|
|
32
|
+
{ id: "categories", label: "Categories", count: categories.length },
|
|
33
|
+
];
|
|
34
|
+
return (_jsxs("div", { className: `min-h-full p-6 md:p-8 font-sans ${isDarkMode ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-900"}`, children: [_jsx(DocumentToolbar, { className: "mb-4" }), _jsxs("header", { className: "flex justify-between items-center mb-6", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h1", { className: "text-2xl font-semibold tracking-tight", children: document.header.name || "Service Subscriptions" }), _jsxs("span", { className: `text-xs px-2.5 py-1 rounded-full border ${isDarkMode
|
|
35
|
+
? "bg-gray-800 border-gray-700 text-gray-400"
|
|
36
|
+
: "bg-white border-gray-200 text-gray-500 shadow-sm"}`, children: [subscriptions.length, " active subscriptions"] })] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx("button", { className: `flex items-center justify-center w-10 h-10 rounded-lg border cursor-pointer transition-all ${isDarkMode
|
|
37
|
+
? "bg-gray-800 border-gray-700 text-gray-400 hover:text-gray-100 hover:border-indigo-500"
|
|
38
|
+
: "bg-white border-gray-200 text-gray-500 hover:text-gray-900 hover:border-indigo-500 shadow-sm"}`, onClick: () => setIsDarkMode(!isDarkMode), title: isDarkMode ? "Switch to light mode" : "Switch to dark mode", children: isDarkMode ? _jsx(SunIcon, {}) : _jsx(MoonIcon, {}) }), activeTab === "subscriptions" && (_jsxs("button", { className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium bg-indigo-500 text-white rounded-lg hover:bg-indigo-600 transition-colors shadow-sm", onClick: () => setShowAddSubscription(true), children: [_jsx(PlusIcon, {}), "Add Subscription"] })), activeTab === "vendors" && (_jsxs("button", { className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium bg-indigo-500 text-white rounded-lg hover:bg-indigo-600 transition-colors shadow-sm", onClick: () => setShowAddVendor(true), children: [_jsx(PlusIcon, {}), "Add Vendor"] })), activeTab === "categories" && (_jsxs("button", { className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium bg-indigo-500 text-white rounded-lg hover:bg-indigo-600 transition-colors shadow-sm", onClick: () => setShowAddCategory(true), children: [_jsx(PlusIcon, {}), "Add Category"] }))] })] }), _jsx(StatsOverview, { subscriptions: subscriptions, isDarkMode: isDarkMode }), _jsx("nav", { className: `flex gap-1 mb-6 p-1 rounded-lg w-fit border ${isDarkMode
|
|
39
|
+
? "bg-gray-800 border-gray-700"
|
|
40
|
+
: "bg-white border-gray-200 shadow-sm"}`, children: tabs.map((tab) => (_jsxs("button", { className: `flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md cursor-pointer transition-all ${activeTab === tab.id
|
|
41
|
+
? isDarkMode
|
|
42
|
+
? "bg-gray-950 text-gray-100"
|
|
43
|
+
: "bg-gray-50 text-gray-900"
|
|
44
|
+
: isDarkMode
|
|
45
|
+
? "text-gray-400 hover:text-gray-100"
|
|
46
|
+
: "text-gray-500 hover:text-gray-900"}`, onClick: () => setActiveTab(tab.id), children: [tab.label, _jsx("span", { className: `text-xs px-1.5 py-0.5 rounded-full ${activeTab === tab.id
|
|
47
|
+
? "bg-indigo-500 text-white"
|
|
48
|
+
: isDarkMode
|
|
49
|
+
? "bg-gray-700 text-gray-400"
|
|
50
|
+
: "bg-gray-200 text-gray-500"}`, children: tab.count })] }, tab.id))) }), _jsxs("main", { className: "mt-2", children: [activeTab === "subscriptions" && (_jsx(SubscriptionsList, { subscriptions: subscriptions, vendors: vendors, categories: categories, isDarkMode: isDarkMode })), activeTab === "vendors" && (_jsx(VendorsList, { vendors: vendors, isDarkMode: isDarkMode })), activeTab === "categories" && (_jsx(CategoriesList, { categories: categories, isDarkMode: isDarkMode }))] }), showAddSubscription && (_jsx(AddSubscriptionModal, { vendors: vendors, categories: categories, onClose: () => setShowAddSubscription(false), isDarkMode: isDarkMode })), showAddVendor && (_jsx(AddVendorModal, { onClose: () => setShowAddVendor(false), isDarkMode: isDarkMode })), showAddCategory && (_jsx(AddCategoryModal, { onClose: () => setShowAddCategory(false), isDarkMode: isDarkMode }))] }));
|
|
51
|
+
}
|
|
52
|
+
function PlusIcon() {
|
|
53
|
+
return (_jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M8 3v10M3 8h10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
54
|
+
}
|
|
55
|
+
function SunIcon() {
|
|
56
|
+
return (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: [_jsx("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] }));
|
|
57
|
+
}
|
|
58
|
+
function MoonIcon() {
|
|
59
|
+
return (_jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../editors/service-subscriptions-editor/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,EAAE,YAOxC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { lazy } from "react";
|
|
2
|
+
/** Document editor module for the Todo List document type */
|
|
3
|
+
export const ServiceSubscriptionsEditor = {
|
|
4
|
+
Component: lazy(() => import("./editor.js")),
|
|
5
|
+
documentTypes: ["powerhouse/service-subscriptions"],
|
|
6
|
+
config: {
|
|
7
|
+
id: "service-subscriptions-editor",
|
|
8
|
+
name: "ServiceSubscriptionsEditor",
|
|
9
|
+
},
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SnapshotReportDocument } from "../../../document-models/snapshot-report/gen/types.js";
|
|
2
|
+
export declare function useAddReportToRemoteDrive(ownerIdOverride?: string | null): {
|
|
3
|
+
ownerDriveId: string | undefined;
|
|
4
|
+
ownerId: string;
|
|
5
|
+
selectedDocument: SnapshotReportDocument;
|
|
6
|
+
};
|
|
7
|
+
export declare function useOwnerDriveActions(ownerDriveId: string, selectedDocument: SnapshotReportDocument | undefined): {
|
|
8
|
+
addReportToOwnerDrive: () => Promise<boolean>;
|
|
9
|
+
canAddReportToOwnerDrive: boolean;
|
|
10
|
+
snapshotReportNodeIds: string[];
|
|
11
|
+
driveDocumentId: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=AddReportToRemoteDrive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddReportToRemoteDrive.d.ts","sourceRoot":"","sources":["../../../../editors/snapshot-report-editor/components/AddReportToRemoteDrive.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAEpG,wBAAgB,yBAAyB,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI;;;;EAgCxE;AAED,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,sBAAsB,GAAG,SAAS;iCA+BjB,OAAO,CAAC,OAAO,CAAC;;;;EA+BpD"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { addFolder, useDrives, useDriveById, } from "@powerhousedao/reactor-browser";
|
|
3
|
+
import { addFile } from "document-drive";
|
|
4
|
+
import { useSelectedSnapshotReportDocument } from "../../hooks/useSnapshotReportDocument.js";
|
|
5
|
+
export function useAddReportToRemoteDrive(ownerIdOverride) {
|
|
6
|
+
const [selectedDocument] = useSelectedSnapshotReportDocument();
|
|
7
|
+
const drives = useDrives();
|
|
8
|
+
const ownerId = ownerIdOverride ?? selectedDocument?.state?.global?.ownerId ?? "";
|
|
9
|
+
const ownerDrive = useMemo(() => {
|
|
10
|
+
if (!drives || !ownerId)
|
|
11
|
+
return undefined;
|
|
12
|
+
return drives.find((drive) => {
|
|
13
|
+
if (drive.header.documentType !== "powerhouse/document-drive" ||
|
|
14
|
+
drive.header.meta?.preferredEditor !== "builder-team-admin") {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return (drive.state.global.nodes ?? []).some((node) => node.kind === "file" &&
|
|
18
|
+
"documentType" in node &&
|
|
19
|
+
node.documentType === "powerhouse/builder-profile" &&
|
|
20
|
+
node.id === ownerId);
|
|
21
|
+
});
|
|
22
|
+
}, [drives, ownerId]);
|
|
23
|
+
const ownerDriveId = ownerDrive?.header.id;
|
|
24
|
+
return {
|
|
25
|
+
ownerDriveId,
|
|
26
|
+
ownerId,
|
|
27
|
+
selectedDocument,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export function useOwnerDriveActions(ownerDriveId, selectedDocument) {
|
|
31
|
+
const [driveDocument, dispatch] = useDriveById(ownerDriveId);
|
|
32
|
+
const driveDocumentId = driveDocument?.header?.id;
|
|
33
|
+
const isDriveAligned = Boolean(ownerDriveId && driveDocumentId === ownerDriveId);
|
|
34
|
+
const snapshotReportFolderId = useMemo(() => {
|
|
35
|
+
if (!isDriveAligned)
|
|
36
|
+
return undefined;
|
|
37
|
+
return driveDocument?.state?.global?.nodes?.find((node) => node.kind === "folder" && node.name === "Snapshot Reports")?.id;
|
|
38
|
+
}, [driveDocument, isDriveAligned]);
|
|
39
|
+
const snapshotReportNodeIds = useMemo(() => {
|
|
40
|
+
if (!isDriveAligned || !driveDocument?.state?.global?.nodes)
|
|
41
|
+
return [];
|
|
42
|
+
return driveDocument.state.global.nodes
|
|
43
|
+
.filter((node) => node.kind === "file" &&
|
|
44
|
+
"documentType" in node &&
|
|
45
|
+
node.documentType === "powerhouse/snapshot-report")
|
|
46
|
+
.map((node) => node.id);
|
|
47
|
+
}, [driveDocument, isDriveAligned]);
|
|
48
|
+
const canAddReportToOwnerDrive = Boolean(isDriveAligned && selectedDocument?.header?.id);
|
|
49
|
+
const addReportToOwnerDrive = async () => {
|
|
50
|
+
if (!dispatch ||
|
|
51
|
+
!isDriveAligned ||
|
|
52
|
+
!canAddReportToOwnerDrive ||
|
|
53
|
+
!selectedDocument?.header?.id)
|
|
54
|
+
return false;
|
|
55
|
+
let targetFolderId = snapshotReportFolderId;
|
|
56
|
+
if (!targetFolderId) {
|
|
57
|
+
const newFolder = await addFolder(ownerDriveId, "Snapshot Reports");
|
|
58
|
+
targetFolderId = newFolder?.id;
|
|
59
|
+
}
|
|
60
|
+
if (!targetFolderId)
|
|
61
|
+
return false;
|
|
62
|
+
dispatch(addFile({
|
|
63
|
+
name: selectedDocument.header.name,
|
|
64
|
+
documentType: "powerhouse/snapshot-report",
|
|
65
|
+
id: selectedDocument.header.id,
|
|
66
|
+
parentFolder: targetFolderId,
|
|
67
|
+
}));
|
|
68
|
+
return true;
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
addReportToOwnerDrive,
|
|
72
|
+
canAddReportToOwnerDrive,
|
|
73
|
+
snapshotReportNodeIds,
|
|
74
|
+
driveDocumentId,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { setOwnerId } from "../../../document-models/snapshot-report/gen/configuration/creators.js";
|
|
2
|
+
type SetOwnerProps = {
|
|
3
|
+
ownerId?: string | null;
|
|
4
|
+
dispatch: (action: ReturnType<typeof setOwnerId>) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function SetOwner({ ownerId, dispatch }: SetOwnerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=SetOwner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetOwner.d.ts","sourceRoot":"","sources":["../../../../editors/snapshot-report-editor/components/SetOwner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,wEAAwE,CAAC;AAapG,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,aAAa,2CA4K5D"}
|