@myparcel-dev/pdk-admin 1.14.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (499) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +5 -5
  3. package/src/__tests__/__snapshots__/exports.spec.ts.snap +8 -1
  4. package/src/__tests__/doComponentTestTeardown.ts +2 -0
  5. package/src/__tests__/mocks/index.ts +1 -1
  6. package/src/__tests__/mocks/mockDefaultAccount.ts +1 -0
  7. package/src/__tests__/mocks/mockDefaultGlobalContext.ts +2 -2
  8. package/src/__tests__/mocks/{mockDefaultPlatform.ts → mockDefaultProposition.ts} +1 -3
  9. package/src/__tests__/mocks/mockDefaultShop.ts +1 -0
  10. package/src/__tests__/utils/getActionIds.ts +12 -0
  11. package/src/__tests__/utils/mockOrderData.ts +20 -0
  12. package/src/actions/composables/mutations/orders/useExportOrdersMutation.ts +1 -1
  13. package/src/actions/composables/queries/account/useOrderCapabilitiesQuery.ts +67 -0
  14. package/src/actions/composables/queries/account/useShipmentCapabilitiesQuery.ts +96 -0
  15. package/src/actions/definitions/orders.ts +6 -8
  16. package/src/actions/index.ts +1 -0
  17. package/src/actions/orderModeActions.spec.ts +150 -0
  18. package/src/actions/orderModeActions.ts +90 -0
  19. package/src/components/OrderBox/ShipmentOptionsBox.spec.ts +109 -0
  20. package/src/components/OrderBox/ShipmentOptionsBox.vue +9 -25
  21. package/src/components/OrderListItem/OrderModeOrderListItem.spec.ts +125 -0
  22. package/src/components/OrderListItem/OrderModeOrderListItem.vue +10 -6
  23. package/src/components/PluginSettings/PluginSettingsForms.vue +7 -4
  24. package/src/components/common/DeliveryOptionsExcerptCarrierName.vue +3 -3
  25. package/src/components/modals/ShipmentOptionsModal.spec.ts +79 -0
  26. package/src/components/modals/ShipmentOptionsModal.vue +4 -21
  27. package/src/composables/components/useToggleInputContext.ts +2 -2
  28. package/src/composables/components/useTriStateInputContext.ts +2 -2
  29. package/src/composables/context/index.ts +1 -0
  30. package/src/composables/context/useOrderMode.spec.ts +75 -0
  31. package/src/composables/context/useOrderMode.ts +26 -0
  32. package/src/composables/language/useLanguage.spec.ts +2 -2
  33. package/src/composables/shipments/useShipmentData.ts +2 -2
  34. package/src/data/index.ts +1 -0
  35. package/src/data/orderMode.spec.ts +22 -0
  36. package/src/data/orderMode.ts +50 -0
  37. package/src/forms/form-builder/builders/buildAfterUpdate.spec.ts +5 -8
  38. package/src/forms/form-builder/operations/executeOperations.spec.ts +4 -7
  39. package/src/forms/form-builder/operations/executeSetPropOperation.spec.ts +4 -7
  40. package/src/forms/form-builder/operations/executeSetValueOperation.spec.ts +3 -2
  41. package/src/forms/form-builder/utils/createValueSetter.ts +21 -8
  42. package/src/forms/helpers/addCapabilitiesClearNotification.ts +39 -0
  43. package/src/forms/helpers/getDeliveryTypes.ts +5 -10
  44. package/src/forms/helpers/getFieldLabel.ts +7 -2
  45. package/src/forms/helpers/getPackageTypes.ts +7 -12
  46. package/src/forms/helpers/index.ts +3 -10
  47. package/src/forms/helpers/useFormCapabilities.spec.ts +227 -0
  48. package/src/forms/helpers/useFormCapabilities.ts +176 -0
  49. package/src/forms/pluginSettings/createPluginSettingsForm.ts +2 -2
  50. package/src/forms/pluginSettings/filterPluginSettingsView.spec.ts +158 -0
  51. package/src/forms/pluginSettings/filterPluginSettingsView.ts +96 -0
  52. package/src/forms/pluginSettings/index.ts +1 -0
  53. package/src/forms/pluginSettings/resolveSettingsValues.spec.ts +62 -0
  54. package/src/forms/pluginSettings/resolveSettingsValues.ts +16 -0
  55. package/src/forms/shipmentOptions/createShipmentOptionsForm.spec.ts +108 -0
  56. package/src/forms/shipmentOptions/createShipmentOptionsForm.ts +114 -52
  57. package/src/forms/shipmentOptions/field.ts +6 -66
  58. package/src/forms/shipmentOptions/fieldFactoryRegistry.ts +26 -0
  59. package/src/forms/shipmentOptions/fields/createCarrierField.ts +119 -30
  60. package/src/forms/shipmentOptions/fields/createDigitalStampRangeField.ts +3 -3
  61. package/src/forms/shipmentOptions/fields/createInsuranceField.ts +43 -22
  62. package/src/forms/shipmentOptions/fields/createPackageTypeField.ts +1 -2
  63. package/src/forms/shipmentOptions/fields/createShipmentOptionField.spec.ts +177 -0
  64. package/src/forms/shipmentOptions/fields/createShipmentOptionField.ts +90 -8
  65. package/src/forms/shipmentOptions/fields/index.ts +0 -9
  66. package/src/forms/shipmentOptions/useCapabilitiesAutoClear.spec.ts +347 -0
  67. package/src/forms/shipmentOptions/useCapabilitiesAutoClear.ts +452 -0
  68. package/src/forms/shipmentOptions/useCapabilitiesWatcher.spec.ts +14 -0
  69. package/src/forms/shipmentOptions/useCapabilitiesWatcher.ts +29 -0
  70. package/src/forms/shipmentOptions/wireProxyCapabilities.spec.ts +160 -0
  71. package/src/forms/shipmentOptions/wireProxyCapabilities.ts +102 -0
  72. package/src/index.ts +2 -0
  73. package/src/pdk/instance/plugins/createRegisterComponentsPlugin.ts +2 -0
  74. package/src/sdk/composables/api/useFetchCarrier.ts +39 -4
  75. package/src/sdk/composables/usePdkAdminApi.ts +8 -3
  76. package/src/stores/useActionStore.spec.ts +101 -0
  77. package/src/stores/useActionStore.ts +4 -28
  78. package/src/stores/useQueryStore.ts +15 -0
  79. package/src/types/actions/endpoints.types.ts +2 -1
  80. package/src/types/sdk.types.ts +54 -1
  81. package/src/utils/forms/formToBody.ts +2 -1
  82. package/src/utils/forms/getEnabledValues.spec.ts +66 -0
  83. package/src/utils/forms/getEnabledValues.ts +25 -0
  84. package/src/utils/forms/index.ts +1 -0
  85. package/src/utils/translations/getDynamicTranslation.ts +1 -1
  86. package/src/views/OrderBox.vue +11 -5
  87. package/src/views/OrderListItem.spec.ts +71 -0
  88. package/src/views/OrderListItem.vue +6 -7
  89. package/dist/__tests__/doComponentTestSetup.d.ts +0 -2
  90. package/dist/__tests__/doComponentTestTeardown.d.ts +0 -1
  91. package/dist/__tests__/index.d.ts +0 -3
  92. package/dist/__tests__/mocks/index.d.ts +0 -14
  93. package/dist/__tests__/mocks/mockDefaultAccount.d.ts +0 -2
  94. package/dist/__tests__/mocks/mockDefaultAppConfig.d.ts +0 -2
  95. package/dist/__tests__/mocks/mockDefaultAppInfo.d.ts +0 -2
  96. package/dist/__tests__/mocks/mockDefaultCarriers.d.ts +0 -2
  97. package/dist/__tests__/mocks/mockDefaultConfig.d.ts +0 -2
  98. package/dist/__tests__/mocks/mockDefaultDynamicContext.d.ts +0 -2
  99. package/dist/__tests__/mocks/mockDefaultEndpoints.d.ts +0 -2
  100. package/dist/__tests__/mocks/mockDefaultGlobalContext.d.ts +0 -2
  101. package/dist/__tests__/mocks/mockDefaultLogger.d.ts +0 -1
  102. package/dist/__tests__/mocks/mockDefaultPlatform.d.ts +0 -2
  103. package/dist/__tests__/mocks/mockDefaultPluginSettings.d.ts +0 -2
  104. package/dist/__tests__/mocks/mockDefaultPrintOptionsView.d.ts +0 -2
  105. package/dist/__tests__/mocks/mockDefaultShop.d.ts +0 -2
  106. package/dist/__tests__/mocks/mockDefaultTranslations.d.ts +0 -2
  107. package/dist/actions/composables/index.d.ts +0 -2
  108. package/dist/actions/composables/mutations/account/index.d.ts +0 -2
  109. package/dist/actions/composables/mutations/account/useDeleteAccountMutation.d.ts +0 -3
  110. package/dist/actions/composables/mutations/account/useUpdateAccountMutation.d.ts +0 -3
  111. package/dist/actions/composables/mutations/debug/index.d.ts +0 -3
  112. package/dist/actions/composables/mutations/debug/useDownloadLogsMutation.d.ts +0 -3
  113. package/dist/actions/composables/mutations/debug/useSwitchToAcceptanceApiMutation.d.ts +0 -3
  114. package/dist/actions/composables/mutations/debug/useSwitchToProductionApiMutation.d.ts +0 -3
  115. package/dist/actions/composables/mutations/index.d.ts +0 -7
  116. package/dist/actions/composables/mutations/orders/index.d.ts +0 -3
  117. package/dist/actions/composables/mutations/orders/useExportOrdersMutation.d.ts +0 -5
  118. package/dist/actions/composables/mutations/orders/usePrintOrdersMutation.d.ts +0 -4
  119. package/dist/actions/composables/mutations/orders/useUpdateOrdersMutation.d.ts +0 -4
  120. package/dist/actions/composables/mutations/settings/index.d.ts +0 -2
  121. package/dist/actions/composables/mutations/settings/useUpdatePluginSettingsMutation.d.ts +0 -3
  122. package/dist/actions/composables/mutations/settings/useUpdateProductSettingsMutation.d.ts +0 -3
  123. package/dist/actions/composables/mutations/shipments/index.d.ts +0 -4
  124. package/dist/actions/composables/mutations/shipments/useDeleteShipmentsMutation.d.ts +0 -4
  125. package/dist/actions/composables/mutations/shipments/useExportReturnMutation.d.ts +0 -4
  126. package/dist/actions/composables/mutations/shipments/usePrintShipmentsMutation.d.ts +0 -4
  127. package/dist/actions/composables/mutations/shipments/useUpdateShipmentsMutation.d.ts +0 -4
  128. package/dist/actions/composables/mutations/usePdkMutation.d.ts +0 -15
  129. package/dist/actions/composables/mutations/webhooks/index.d.ts +0 -2
  130. package/dist/actions/composables/mutations/webhooks/useCreateWebhooksMutation.d.ts +0 -1
  131. package/dist/actions/composables/mutations/webhooks/useDeleteWebhooksMutation.d.ts +0 -3
  132. package/dist/actions/composables/queries/account/index.d.ts +0 -1
  133. package/dist/actions/composables/queries/account/useFetchContextQuery.d.ts +0 -3
  134. package/dist/actions/composables/queries/index.d.ts +0 -6
  135. package/dist/actions/composables/queries/orders/index.d.ts +0 -1
  136. package/dist/actions/composables/queries/orders/useFetchOrdersQuery.d.ts +0 -3
  137. package/dist/actions/composables/queries/products/index.d.ts +0 -1
  138. package/dist/actions/composables/queries/products/useFetchProductsQuery.d.ts +0 -3
  139. package/dist/actions/composables/queries/queryKeys.d.ts +0 -2
  140. package/dist/actions/composables/queries/shipments/index.d.ts +0 -1
  141. package/dist/actions/composables/queries/shipments/useFetchShipmentsQuery.d.ts +0 -4
  142. package/dist/actions/composables/queries/webhooks/index.d.ts +0 -1
  143. package/dist/actions/composables/queries/webhooks/useFetchWebhooksQuery.d.ts +0 -3
  144. package/dist/actions/defineAction.d.ts +0 -8
  145. package/dist/actions/definitions/account.d.ts +0 -13
  146. package/dist/actions/definitions/context.d.ts +0 -6
  147. package/dist/actions/definitions/debug.d.ts +0 -13
  148. package/dist/actions/definitions/index.d.ts +0 -8
  149. package/dist/actions/definitions/modal.d.ts +0 -17
  150. package/dist/actions/definitions/orders.d.ts +0 -38
  151. package/dist/actions/definitions/settings.d.ts +0 -2
  152. package/dist/actions/definitions/shipments.d.ts +0 -15
  153. package/dist/actions/definitions/webhooks.d.ts +0 -4
  154. package/dist/actions/executors/createHandlerWithParameters.d.ts +0 -5
  155. package/dist/actions/executors/createMutationHandler.d.ts +0 -3
  156. package/dist/actions/executors/createOrdersMutationHandler.d.ts +0 -2
  157. package/dist/actions/executors/createQueryHandler.d.ts +0 -3
  158. package/dist/actions/executors/createShipmentsMutationHandler.d.ts +0 -2
  159. package/dist/actions/executors/doMutate.d.ts +0 -4
  160. package/dist/actions/executors/executeAction.d.ts +0 -6
  161. package/dist/actions/executors/executeAfterHandle.d.ts +0 -3
  162. package/dist/actions/executors/executeBeforeHandle.d.ts +0 -4
  163. package/dist/actions/executors/executeHandler.d.ts +0 -3
  164. package/dist/actions/executors/executeNextAction.d.ts +0 -6
  165. package/dist/actions/executors/index.d.ts +0 -14
  166. package/dist/actions/executors/resolveOrderParameters.d.ts +0 -3
  167. package/dist/actions/executors/resolveQuerySuffix.d.ts +0 -3
  168. package/dist/actions/executors/types.d.ts +0 -19
  169. package/dist/actions/index.d.ts +0 -6
  170. package/dist/actions/print/index.d.ts +0 -3
  171. package/dist/actions/print/openOrPrintPdf.d.ts +0 -3
  172. package/dist/actions/print/resolvePrintParameters.d.ts +0 -3
  173. package/dist/actions/print/waitForLabelPrompt.d.ts +0 -3
  174. package/dist/actions/stopActionHandler.d.ts +0 -2
  175. package/dist/components/OrderBox/OrderShipmentsTable.vue.d.ts +0 -6
  176. package/dist/components/OrderBox/OrderShipmentsTableRow.vue.d.ts +0 -21
  177. package/dist/components/OrderBox/ShipmentOptionsBox.vue.d.ts +0 -2
  178. package/dist/components/OrderBox/ShipmentTableBox.vue.d.ts +0 -2
  179. package/dist/components/OrderListItem/OrderModeOrderListItem.vue.d.ts +0 -2
  180. package/dist/components/OrderListItem/ShipmentLabel.vue.d.ts +0 -15
  181. package/dist/components/OrderListItem/ShipmentModeOrderListItem.vue.d.ts +0 -2
  182. package/dist/components/PluginSettings/AccountSettings.vue.d.ts +0 -2
  183. package/dist/components/PluginSettings/DebugOptions.vue.d.ts +0 -2
  184. package/dist/components/PluginSettings/EditApiKeyForm.vue.d.ts +0 -7
  185. package/dist/components/PluginSettings/PluginSettingsForms.vue.d.ts +0 -2
  186. package/dist/components/PluginSettings/WebhooksStatus.vue.d.ts +0 -2
  187. package/dist/components/PluginSettings/createUpdateAccountSettingsValidator.d.ts +0 -4
  188. package/dist/components/common/ActionButton.vue.d.ts +0 -52
  189. package/dist/components/common/BulkSelectCheckbox.vue.d.ts +0 -22
  190. package/dist/components/common/CarrierLogo.vue.d.ts +0 -16
  191. package/dist/components/common/DateRelative.vue.d.ts +0 -16
  192. package/dist/components/common/DeliveryOptionsDeliveryType.vue.d.ts +0 -16
  193. package/dist/components/common/DeliveryOptionsExcerpt.vue.d.ts +0 -2
  194. package/dist/components/common/DeliveryOptionsExcerptCarrierName.vue.d.ts +0 -16
  195. package/dist/components/common/DeliveryOptionsPackageType.vue.d.ts +0 -16
  196. package/dist/components/common/DigitalStampWeightRange.vue.d.ts +0 -15
  197. package/dist/components/common/NotificationContainer.vue.d.ts +0 -19
  198. package/dist/components/common/PackageType.vue.d.ts +0 -16
  199. package/dist/components/common/PlainElement.d.ts +0 -2
  200. package/dist/components/common/ResetButton.vue.d.ts +0 -15
  201. package/dist/components/common/ReturnsForm.vue.d.ts +0 -14
  202. package/dist/components/common/ShipmentBarcode.vue.d.ts +0 -15
  203. package/dist/components/common/ShipmentOptionsForm.vue.d.ts +0 -16
  204. package/dist/components/common/ShipmentStatus.vue.d.ts +0 -15
  205. package/dist/components/common/StatusIndicator.vue.d.ts +0 -23
  206. package/dist/components/common/SubmitButton.vue.d.ts +0 -15
  207. package/dist/components/common/TabNavigation.vue.d.ts +0 -66
  208. package/dist/components/common/index.d.ts +0 -20
  209. package/dist/components/index.d.ts +0 -1
  210. package/dist/components/modals/PrintOptionsModal.vue.d.ts +0 -2
  211. package/dist/components/modals/PrintOptionsModalForm.vue.d.ts +0 -2
  212. package/dist/components/modals/ShipmentOptionsModal.vue.d.ts +0 -2
  213. package/dist/components/modals/ShipmentOptionsModalForm.vue.d.ts +0 -16
  214. package/dist/composables/components/index.d.ts +0 -15
  215. package/dist/composables/components/useBulkSelectCheckbox.d.ts +0 -9
  216. package/dist/composables/components/useCheckboxGroupContext.d.ts +0 -4
  217. package/dist/composables/components/useDropOffInputContext.d.ts +0 -13
  218. package/dist/composables/components/useDropdownButtonContext.d.ts +0 -15
  219. package/dist/composables/components/useElementContext.d.ts +0 -7
  220. package/dist/composables/components/useElementOptions.d.ts +0 -6
  221. package/dist/composables/components/useInputWithOptionsContext.d.ts +0 -10
  222. package/dist/composables/components/useModalElementContext.d.ts +0 -11
  223. package/dist/composables/components/useMultiSelectInputContext.d.ts +0 -4
  224. package/dist/composables/components/useRadioGroupContext.d.ts +0 -10
  225. package/dist/composables/components/useSelectInputContext.d.ts +0 -4
  226. package/dist/composables/components/useShippingMethodsInputContext.d.ts +0 -13
  227. package/dist/composables/components/useTableContext.d.ts +0 -7
  228. package/dist/composables/components/useToggleInputContext.d.ts +0 -11
  229. package/dist/composables/components/useTriStateInputContext.d.ts +0 -17
  230. package/dist/composables/context/index.d.ts +0 -7
  231. package/dist/composables/context/useAppInfo.d.ts +0 -2
  232. package/dist/composables/context/useContext.d.ts +0 -3
  233. package/dist/composables/context/useGlobalContext.d.ts +0 -2
  234. package/dist/composables/context/useInstanceContext.d.ts +0 -8
  235. package/dist/composables/context/useModalContext.d.ts +0 -11
  236. package/dist/composables/context/useModalOrder.d.ts +0 -1
  237. package/dist/composables/context/usePluginSettings.d.ts +0 -2
  238. package/dist/composables/formatter/default/createCurrencyFormat.d.ts +0 -1
  239. package/dist/composables/formatter/default/createLongDateFormat.d.ts +0 -1
  240. package/dist/composables/formatter/default/createRelativeTimeFormat.d.ts +0 -1
  241. package/dist/composables/formatter/default/defaultCurrencyFormatters.d.ts +0 -2
  242. package/dist/composables/formatter/default/defaultDateFormatters.d.ts +0 -4
  243. package/dist/composables/formatter/default/index.d.ts +0 -6
  244. package/dist/composables/formatter/default/parseDate.d.ts +0 -1
  245. package/dist/composables/formatter/formatter.types.d.ts +0 -23
  246. package/dist/composables/formatter/index.d.ts +0 -4
  247. package/dist/composables/formatter/useFormatter.d.ts +0 -2
  248. package/dist/composables/formatter/useLocalizedFormatter.d.ts +0 -2
  249. package/dist/composables/index.d.ts +0 -17
  250. package/dist/composables/language/index.d.ts +0 -4
  251. package/dist/composables/language/resolveTranslatedString.d.ts +0 -3
  252. package/dist/composables/language/resolveTranslationKey.d.ts +0 -2
  253. package/dist/composables/language/types.d.ts +0 -1
  254. package/dist/composables/language/useLanguage.d.ts +0 -23
  255. package/dist/composables/orders/index.d.ts +0 -3
  256. package/dist/composables/orders/useOrder.d.ts +0 -3
  257. package/dist/composables/orders/useOrderData.d.ts +0 -9
  258. package/dist/composables/orders/useOrdersData.d.ts +0 -3
  259. package/dist/composables/products/index.d.ts +0 -1
  260. package/dist/composables/products/useProductData.d.ts +0 -8
  261. package/dist/composables/shipments/index.d.ts +0 -3
  262. package/dist/composables/shipments/useShipment.d.ts +0 -3
  263. package/dist/composables/shipments/useShipmentData.d.ts +0 -12
  264. package/dist/composables/shipments/useShipmentsData.d.ts +0 -2
  265. package/dist/composables/useAdminConfig.d.ts +0 -2
  266. package/dist/composables/useAdminInstance.d.ts +0 -2
  267. package/dist/composables/useDigitalStampRanges.d.ts +0 -12
  268. package/dist/composables/useGlobalPdkAdmin.d.ts +0 -2
  269. package/dist/composables/useLoadMore.d.ts +0 -14
  270. package/dist/composables/useLoading.d.ts +0 -10
  271. package/dist/composables/useLogger.d.ts +0 -2
  272. package/dist/composables/useStoreContextQuery.d.ts +0 -3
  273. package/dist/composables/useStoreQuery.d.ts +0 -4
  274. package/dist/composables/useWeekdays.d.ts +0 -9
  275. package/dist/data/components.d.ts +0 -195
  276. package/dist/data/constants.d.ts +0 -63
  277. package/dist/data/endpoints.d.ts +0 -5
  278. package/dist/data/index.d.ts +0 -4
  279. package/dist/data/view.d.ts +0 -9
  280. package/dist/deprecated.d.ts +0 -6
  281. package/dist/forms/createReturnsForm.d.ts +0 -1
  282. package/dist/forms/form-builder/builders/buildAfterUpdate.d.ts +0 -3
  283. package/dist/forms/form-builder/builders/buildFormStateWatcher.d.ts +0 -3
  284. package/dist/forms/form-builder/builders/index.d.ts +0 -2
  285. package/dist/forms/form-builder/conditions/index.d.ts +0 -3
  286. package/dist/forms/form-builder/conditions/validateIfCondition.d.ts +0 -2
  287. package/dist/forms/form-builder/conditions/validateIfConditions.d.ts +0 -2
  288. package/dist/forms/form-builder/conditions/validateIsTruthy.d.ts +0 -2
  289. package/dist/forms/form-builder/index.d.ts +0 -5
  290. package/dist/forms/form-builder/operations/executeCustomOperationHandlers.d.ts +0 -2
  291. package/dist/forms/form-builder/operations/executeOperation.d.ts +0 -2
  292. package/dist/forms/form-builder/operations/executeOperations.d.ts +0 -2
  293. package/dist/forms/form-builder/operations/executeSetPropOperation.d.ts +0 -2
  294. package/dist/forms/form-builder/operations/executeSetValueOperation.d.ts +0 -2
  295. package/dist/forms/form-builder/operations/index.d.ts +0 -5
  296. package/dist/forms/form-builder/operations/parseBuilders.d.ts +0 -3
  297. package/dist/forms/form-builder/types/FormCondition.types.d.ts +0 -36
  298. package/dist/forms/form-builder/types/FormOperations.types.d.ts +0 -16
  299. package/dist/forms/form-builder/types/SubOperationBuilder.types.d.ts +0 -13
  300. package/dist/forms/form-builder/types/common.types.d.ts +0 -21
  301. package/dist/forms/form-builder/types/index.d.ts +0 -4
  302. package/dist/forms/form-builder/utils/createPropSetter.d.ts +0 -4
  303. package/dist/forms/form-builder/utils/createValueGetter.d.ts +0 -4
  304. package/dist/forms/form-builder/utils/createValueSetter.d.ts +0 -4
  305. package/dist/forms/form-builder/utils/index.d.ts +0 -4
  306. package/dist/forms/formKeys.d.ts +0 -10
  307. package/dist/forms/helpers/addBulkEditNotification.d.ts +0 -1
  308. package/dist/forms/helpers/createDefaultOption.d.ts +0 -3
  309. package/dist/forms/helpers/createHasShipmentOptionWatcher.d.ts +0 -3
  310. package/dist/forms/helpers/createLabel.d.ts +0 -1
  311. package/dist/forms/helpers/defineFormField.d.ts +0 -2
  312. package/dist/forms/helpers/getCarrier.d.ts +0 -3
  313. package/dist/forms/helpers/getDeliveryTypes.d.ts +0 -3
  314. package/dist/forms/helpers/getFieldLabel.d.ts +0 -2
  315. package/dist/forms/helpers/getFormCarrierName.d.ts +0 -2
  316. package/dist/forms/helpers/getInsuranceOptions.d.ts +0 -3
  317. package/dist/forms/helpers/getPackageTypes.d.ts +0 -3
  318. package/dist/forms/helpers/hasPostNlAgeCheck.d.ts +0 -2
  319. package/dist/forms/helpers/hasShipmentOption.d.ts +0 -3
  320. package/dist/forms/helpers/index.d.ts +0 -21
  321. package/dist/forms/helpers/isPackageTypeMailbox.d.ts +0 -2
  322. package/dist/forms/helpers/isPackageTypePackage.d.ts +0 -2
  323. package/dist/forms/helpers/isPackageTypePackageOrSmall.d.ts +0 -2
  324. package/dist/forms/helpers/isPackageTypeSmallPackage.d.ts +0 -2
  325. package/dist/forms/helpers/resolveFormComponent.d.ts +0 -3
  326. package/dist/forms/helpers/setFieldProp.d.ts +0 -8
  327. package/dist/forms/helpers/setPostNlAgeCheckSubtext.d.ts +0 -2
  328. package/dist/forms/helpers/triStateFieldIsEnabled.d.ts +0 -2
  329. package/dist/forms/helpers/updateFieldsDefaults.d.ts +0 -6
  330. package/dist/forms/index.d.ts +0 -6
  331. package/dist/forms/pluginSettings/createFormTab.d.ts +0 -3
  332. package/dist/forms/pluginSettings/createPluginSettingsForm.d.ts +0 -4
  333. package/dist/forms/pluginSettings/createPluginSettingsTabs.d.ts +0 -4
  334. package/dist/forms/pluginSettings/createPluginSettingsTabsComponent.d.ts +0 -4
  335. package/dist/forms/pluginSettings/generateFormFields.d.ts +0 -8
  336. package/dist/forms/pluginSettings/index.d.ts +0 -6
  337. package/dist/forms/pluginSettings/types.d.ts +0 -13
  338. package/dist/forms/shipmentOptions/createShipmentOptionsForm.d.ts +0 -4
  339. package/dist/forms/shipmentOptions/field.d.ts +0 -36
  340. package/dist/forms/shipmentOptions/fields/createAgeCheckField.d.ts +0 -3
  341. package/dist/forms/shipmentOptions/fields/createCarrierField.d.ts +0 -4
  342. package/dist/forms/shipmentOptions/fields/createDeliveryTypeField.d.ts +0 -3
  343. package/dist/forms/shipmentOptions/fields/createDigitalStampRangeField.d.ts +0 -4
  344. package/dist/forms/shipmentOptions/fields/createDirectReturnField.d.ts +0 -3
  345. package/dist/forms/shipmentOptions/fields/createHideSenderField.d.ts +0 -3
  346. package/dist/forms/shipmentOptions/fields/createInsuranceField.d.ts +0 -3
  347. package/dist/forms/shipmentOptions/fields/createLabelAmountField.d.ts +0 -3
  348. package/dist/forms/shipmentOptions/fields/createLargeFormatField.d.ts +0 -3
  349. package/dist/forms/shipmentOptions/fields/createOnlyRecipientField.d.ts +0 -3
  350. package/dist/forms/shipmentOptions/fields/createPackageTypeField.d.ts +0 -3
  351. package/dist/forms/shipmentOptions/fields/createPriorityDeliveryField.d.ts +0 -3
  352. package/dist/forms/shipmentOptions/fields/createReceiptCodeField.d.ts +0 -3
  353. package/dist/forms/shipmentOptions/fields/createRef.d.ts +0 -3
  354. package/dist/forms/shipmentOptions/fields/createSameDayDeliveryField.d.ts +0 -3
  355. package/dist/forms/shipmentOptions/fields/createShipmentOptionField.d.ts +0 -4
  356. package/dist/forms/shipmentOptions/fields/createSignatureField.d.ts +0 -3
  357. package/dist/forms/shipmentOptions/fields/index.d.ts +0 -15
  358. package/dist/forms/shipmentOptions/index.d.ts +0 -4
  359. package/dist/forms/shipmentOptions/types.d.ts +0 -2
  360. package/dist/index.d.ts +0 -19
  361. package/dist/pdk/PdkAdmin.d.ts +0 -18
  362. package/dist/pdk/boot.d.ts +0 -3
  363. package/dist/pdk/createAdminConfig.d.ts +0 -2
  364. package/dist/pdk/createPdkAdmin.d.ts +0 -8
  365. package/dist/pdk/createPdkAdminPlugin.d.ts +0 -3
  366. package/dist/pdk/fillShipmentsQueryData.d.ts +0 -4
  367. package/dist/pdk/index.d.ts +0 -11
  368. package/dist/pdk/instance/createInstanceContext.d.ts +0 -5
  369. package/dist/pdk/instance/createQueryClient.d.ts +0 -2
  370. package/dist/pdk/instance/index.d.ts +0 -3
  371. package/dist/pdk/instance/plugins/createContextPlugin.d.ts +0 -2
  372. package/dist/pdk/instance/plugins/createLoggerPlugin.d.ts +0 -2
  373. package/dist/pdk/instance/plugins/createRegisterComponentsPlugin.d.ts +0 -5
  374. package/dist/pdk/instance/plugins/createStorePlugin.d.ts +0 -2
  375. package/dist/pdk/instance/plugins/createVueQueryPlugin.d.ts +0 -5
  376. package/dist/pdk/instance/plugins/index.d.ts +0 -6
  377. package/dist/pdk/instance/plugins/plugins.types.d.ts +0 -3
  378. package/dist/pdk/renderMap.d.ts +0 -3
  379. package/dist/pdk/sendBootEvent.d.ts +0 -3
  380. package/dist/pdk/setupAdminApp.d.ts +0 -3
  381. package/dist/pdk/testIdDirective.d.ts +0 -5
  382. package/dist/sdk/PdkFetchClient.d.ts +0 -11
  383. package/dist/sdk/composables/api/index.d.ts +0 -1
  384. package/dist/sdk/composables/api/useFetchCarrier.d.ts +0 -2
  385. package/dist/sdk/composables/index.d.ts +0 -3
  386. package/dist/sdk/composables/useMyParcelApi.d.ts +0 -5
  387. package/dist/sdk/composables/usePdkAdminApi.d.ts +0 -6
  388. package/dist/sdk/endpoints/abstractPdkEndpoint.d.ts +0 -7
  389. package/dist/sdk/endpoints/index.d.ts +0 -1
  390. package/dist/sdk/index.d.ts +0 -3
  391. package/dist/services/actions/createAction.d.ts +0 -4
  392. package/dist/services/actions/createActionContext.d.ts +0 -3
  393. package/dist/services/actions/downloadFile.d.ts +0 -4
  394. package/dist/services/actions/getActionIdentifier.d.ts +0 -2
  395. package/dist/services/actions/index.d.ts +0 -4
  396. package/dist/services/addErrorToNotifications.d.ts +0 -2
  397. package/dist/services/context/getElementContext.d.ts +0 -2
  398. package/dist/services/context/index.d.ts +0 -1
  399. package/dist/services/createNotification.d.ts +0 -5
  400. package/dist/services/index.d.ts +0 -9
  401. package/dist/services/instantiateAction.d.ts +0 -2
  402. package/dist/services/instantiateActions.d.ts +0 -8
  403. package/dist/services/logger.d.ts +0 -19
  404. package/dist/services/mutations/getCallbackForMutationMode.d.ts +0 -4
  405. package/dist/services/mutations/getModalMutationOptions.d.ts +0 -2
  406. package/dist/services/mutations/index.d.ts +0 -3
  407. package/dist/services/mutations/mutationMode.d.ts +0 -4
  408. package/dist/services/print/index.d.ts +0 -1
  409. package/dist/services/print/openPdfInNewWindow.d.ts +0 -4
  410. package/dist/stores/createQueryCacheKey.d.ts +0 -3
  411. package/dist/stores/index.d.ts +0 -6
  412. package/dist/stores/types.d.ts +0 -13
  413. package/dist/stores/useActionStore.d.ts +0 -25
  414. package/dist/stores/useModalStore.d.ts +0 -16
  415. package/dist/stores/useNotificationStore.d.ts +0 -60
  416. package/dist/stores/useQueryStore.d.ts +0 -77
  417. package/dist/symbols.d.ts +0 -5
  418. package/dist/testing.d.ts +0 -1
  419. package/dist/types/actions/actions.types.d.ts +0 -31
  420. package/dist/types/actions/endpoints.types.d.ts +0 -9
  421. package/dist/types/actions/index.d.ts +0 -4
  422. package/dist/types/actions/parameters.types.d.ts +0 -55
  423. package/dist/types/actions/response.types.d.ts +0 -7
  424. package/dist/types/actions.types.d.ts +0 -45
  425. package/dist/types/admin.types.d.ts +0 -26
  426. package/dist/types/common.types.d.ts +0 -53
  427. package/dist/types/components-form.types.d.ts +0 -107
  428. package/dist/types/components.types.d.ts +0 -273
  429. package/dist/types/configuration.types.d.ts +0 -95
  430. package/dist/types/context.types.d.ts +0 -20
  431. package/dist/types/endpoints.types.d.ts +0 -7
  432. package/dist/types/form.types.d.ts +0 -39
  433. package/dist/types/index.d.ts +0 -12
  434. package/dist/types/language.types.d.ts +0 -9
  435. package/dist/types/sdk.types.d.ts +0 -155
  436. package/dist/utils/booleanToTriState.d.ts +0 -2
  437. package/dist/utils/convertDotNotationToObject.d.ts +0 -1
  438. package/dist/utils/createAssetUrl.d.ts +0 -1
  439. package/dist/utils/createClasses.d.ts +0 -8
  440. package/dist/utils/createObjectWithKeys.d.ts +0 -3
  441. package/dist/utils/decodeHtmlEntities.d.ts +0 -7
  442. package/dist/utils/downloadBlob.d.ts +0 -1
  443. package/dist/utils/downloadFileFromUrl.d.ts +0 -1
  444. package/dist/utils/encodeArrayParameter.d.ts +0 -2
  445. package/dist/utils/extendAdminInstance.d.ts +0 -2
  446. package/dist/utils/fakeLinkClick.d.ts +0 -4
  447. package/dist/utils/forms/createFormElement.d.ts +0 -3
  448. package/dist/utils/forms/createShipmentFormName.d.ts +0 -1
  449. package/dist/utils/forms/formToBody.d.ts +0 -2
  450. package/dist/utils/forms/generateFieldId.d.ts +0 -3
  451. package/dist/utils/forms/index.d.ts +0 -4
  452. package/dist/utils/generateLabelFilename.d.ts +0 -3
  453. package/dist/utils/getOrderId.d.ts +0 -3
  454. package/dist/utils/getOrderShipmentIds.d.ts +0 -2
  455. package/dist/utils/index.d.ts +0 -22
  456. package/dist/utils/openUrlInNewTab.d.ts +0 -1
  457. package/dist/utils/prefixComponent.d.ts +0 -3
  458. package/dist/utils/query/index.d.ts +0 -3
  459. package/dist/utils/query/setQueryData.d.ts +0 -2
  460. package/dist/utils/query/setQueryOrder.d.ts +0 -10
  461. package/dist/utils/query/setQueryShipment.d.ts +0 -3
  462. package/dist/utils/resolveCarrier.d.ts +0 -1
  463. package/dist/utils/translations/getDeliveryTypeTranslation.d.ts +0 -2
  464. package/dist/utils/translations/getDynamicTranslation.d.ts +0 -1
  465. package/dist/utils/translations/getPackageTypeTranslation.d.ts +0 -2
  466. package/dist/utils/translations/index.d.ts +0 -4
  467. package/dist/utils/translations/translateSelectOption.d.ts +0 -3
  468. package/dist/utils/triStateToBoolean.d.ts +0 -2
  469. package/dist/utils/unprefixComponent.d.ts +0 -3
  470. package/dist/utils/validateId.d.ts +0 -2
  471. package/dist/views/ChildProductSettings.vue.d.ts +0 -2
  472. package/dist/views/Modals.vue.d.ts +0 -2
  473. package/dist/views/Notifications.vue.d.ts +0 -2
  474. package/dist/views/OrderBox.vue.d.ts +0 -2
  475. package/dist/views/OrderListItem.vue.d.ts +0 -2
  476. package/dist/views/PluginSettings.vue.d.ts +0 -2
  477. package/dist/views/ProductSettings.vue.d.ts +0 -35
  478. package/dist/views/integrated/OrderBoxView.vue.d.ts +0 -12
  479. package/dist/views/integrated/OrderListItemView.vue.d.ts +0 -12
  480. package/dist/views/integrated/index.d.ts +0 -7
  481. package/src/forms/helpers/createHasShipmentOptionWatcher.ts +0 -12
  482. package/src/forms/helpers/getCarrier.ts +0 -11
  483. package/src/forms/helpers/getInsuranceOptions.ts +0 -23
  484. package/src/forms/helpers/hasPostNlAgeCheck.ts +0 -11
  485. package/src/forms/helpers/hasShipmentOption.ts +0 -8
  486. package/src/forms/helpers/isPackageTypeMailbox.ts +0 -7
  487. package/src/forms/helpers/isPackageTypePackage.ts +0 -7
  488. package/src/forms/helpers/isPackageTypePackageOrSmall.ts +0 -7
  489. package/src/forms/helpers/isPackageTypeSmallPackage.ts +0 -7
  490. package/src/forms/helpers/setPostNlAgeCheckSubtext.ts +0 -17
  491. package/src/forms/shipmentOptions/fields/createAgeCheckField.ts +0 -33
  492. package/src/forms/shipmentOptions/fields/createDirectReturnField.ts +0 -8
  493. package/src/forms/shipmentOptions/fields/createHideSenderField.ts +0 -8
  494. package/src/forms/shipmentOptions/fields/createLargeFormatField.ts +0 -8
  495. package/src/forms/shipmentOptions/fields/createOnlyRecipientField.ts +0 -21
  496. package/src/forms/shipmentOptions/fields/createPriorityDeliveryField.ts +0 -12
  497. package/src/forms/shipmentOptions/fields/createReceiptCodeField.ts +0 -21
  498. package/src/forms/shipmentOptions/fields/createSameDayDeliveryField.ts +0 -8
  499. package/src/forms/shipmentOptions/fields/createSignatureField.ts +0 -11
@@ -1,273 +0,0 @@
1
- import { type SlotsType } from 'vue';
2
- import { type Size } from '@myparcel-dev/pdk-common';
3
- import { type AdminIcon, type AdminModalKey } from '../data';
4
- import { type Translation } from './language.types';
5
- import { type PdkElementProps } from './form.types';
6
- import { type AdminModalContext } from './context.types';
7
- import { type DefaultSlot, type PdkNotification, type PlainComponentProps, type PlainComponentSlots } from './common.types';
8
- import { type ActionDefinition } from './actions.types';
9
- /**
10
- * @see AdminComponent.Badge
11
- */
12
- export type BadgeProps = PlainComponentProps;
13
- export type BadgeSlots = PlainComponentSlots;
14
- /**
15
- * @see AdminComponent.Box
16
- */
17
- export type BoxProps = {
18
- /**
19
- * Used to control loading state.
20
- */
21
- loading: boolean;
22
- /**
23
- * Size of the box.
24
- */
25
- size: Size;
26
- /**
27
- * Title of the box.
28
- */
29
- title?: string;
30
- };
31
- export type BoxEmits = (e: 'clickHeader') => void;
32
- export type BoxSlots = DefaultSlot & {
33
- header(): never;
34
- footer(): never;
35
- };
36
- /**
37
- * @see AdminComponent.Button
38
- */
39
- export type ButtonProps = {
40
- /**
41
- * Controls disabled state.
42
- */
43
- disabled?: boolean;
44
- /**
45
- * Icon.
46
- */
47
- icon: AdminIcon | null;
48
- /**
49
- * Button label. Can be used instead of the slot.
50
- */
51
- label: string;
52
- /**
53
- * Size of the button.
54
- */
55
- size: Size;
56
- };
57
- export type ButtonEmits = (e: 'click') => void;
58
- export type ButtonSlots = DefaultSlot;
59
- /**
60
- * @see AdminComponent.ButtonGroup
61
- */
62
- export type ButtonGroupProps = PlainComponentProps;
63
- export type ButtonGroupSlots = PlainComponentSlots;
64
- /**
65
- * @see AdminComponent.Col
66
- */
67
- export type ColProps = {};
68
- export type ColSlots = DefaultSlot;
69
- /**
70
- * @see AdminComponent.ConceptBoxWrapper
71
- */
72
- export type ConceptBoxWrapperProps = PlainComponentProps;
73
- export type ConceptBoxWrapperSlots = PlainComponentSlots;
74
- /**
75
- * @see AdminComponent.DropdownButton
76
- */
77
- export type DropdownButtonProps = {
78
- /**
79
- * List of actions.
80
- */
81
- actions: ActionDefinition[];
82
- /**
83
- * Controls disabled state.
84
- */
85
- disabled?: boolean;
86
- /**
87
- * To hide the text of the standalone actions.
88
- */
89
- hideText?: boolean;
90
- /**
91
- * Size of the button.
92
- */
93
- size?: Size;
94
- };
95
- export type DropdownButtonSlots = DefaultSlot;
96
- /**
97
- * @see AdminComponent.FormGroup
98
- */
99
- export type FormGroupProps = PdkElementProps<never, {
100
- label?: Translation;
101
- description?: Translation;
102
- subtext?: Translation;
103
- }>;
104
- export type FormGroupSlots = DefaultSlot & {
105
- label(): never;
106
- };
107
- /**
108
- * @see AdminComponent.Heading
109
- */
110
- export type HeadingProps = {
111
- level: number | string;
112
- };
113
- export type HeadingSlots = DefaultSlot;
114
- /**
115
- * @see AdminComponent.Icon
116
- */
117
- export type IconProps = {
118
- /**
119
- * The icon to display.
120
- */
121
- icon: AdminIcon;
122
- };
123
- /**
124
- * @see AdminComponent.Image
125
- */
126
- export type ImageProps = {
127
- /**
128
- * The source of the image.
129
- */
130
- src: string;
131
- /**
132
- * The alternative text of the image.
133
- */
134
- alt: string;
135
- /**
136
- * The title of the image.
137
- */
138
- title?: string | null;
139
- /**
140
- * The width of the image.
141
- */
142
- width?: number | string | null;
143
- /**
144
- * The height of the image.
145
- */
146
- height?: number | string | null;
147
- };
148
- /**
149
- * @see AdminComponent.Link
150
- */
151
- export type LinkProps = {
152
- action?: ActionDefinition;
153
- hideText?: boolean;
154
- href?: string;
155
- };
156
- export type LinkEmits = (e: 'click', event: MouseEvent) => void;
157
- export type LinkSlots = DefaultSlot;
158
- /**
159
- * @see AdminComponent.Loader
160
- */
161
- export type LoaderProps = {
162
- /**
163
- * The size of the loader.
164
- */
165
- size: Size;
166
- /**
167
- * The html tag. Defaults to 'div'.
168
- */
169
- tag: string;
170
- };
171
- /**
172
- * @see AdminComponent.Modal
173
- */
174
- export type ModalProps = {
175
- /**
176
- * Available actions in the modal.
177
- */
178
- actions?: ActionDefinition[];
179
- /**
180
- * Modal key.
181
- */
182
- modalKey: AdminModalKey;
183
- /**
184
- * Modal title.
185
- */
186
- title?: string;
187
- };
188
- export type ModalSlots = {
189
- default(context: AdminModalContext): never;
190
- };
191
- /**
192
- * @see AdminComponent.Notification
193
- */
194
- export type NotificationProps = {
195
- /**
196
- * The notification to display.
197
- */
198
- notification: PdkNotification;
199
- };
200
- /**
201
- * @see AdminComponent.PluginSettingsWrapper
202
- */
203
- export type PluginSettingsWrapperProps = PlainComponentProps;
204
- export type PluginSettingsWrapperSlots = PlainComponentSlots;
205
- /**
206
- * @see AdminComponent.Row
207
- */
208
- export type RowProps = {};
209
- export type RowSlots = DefaultSlot;
210
- /**
211
- * @see AdminComponent.SettingsDivider
212
- */
213
- export type SettingsDividerProps = PdkElementProps<never, {
214
- content?: Translation;
215
- heading?: Translation;
216
- level?: number | string;
217
- }>;
218
- /**
219
- * @see AdminComponent.ShipmentLabelWrapper
220
- */
221
- export type ShipmentLabelWrapperProps = PlainComponentProps;
222
- export type ShipmentLabelWrapperSlots = PlainComponentSlots;
223
- /**
224
- * @see AdminComponent.Table
225
- */
226
- export type TableProps = {
227
- transition?: false | string;
228
- };
229
- export type TableSlots = DefaultSlot & {
230
- header(): never;
231
- footer(): never;
232
- };
233
- /**
234
- * The component that is used to render a table column in a Table.
235
- *
236
- * @see AdminComponent.TableCol
237
- */
238
- export type TableColProps = {
239
- /**
240
- * Component to use as the table column. Defaults to 'td'.
241
- */
242
- component?: string;
243
- };
244
- export type TableColSlots = DefaultSlot;
245
- /**
246
- * The component that is used to render a table row in a Table.
247
- *
248
- * @see AdminComponent.TableRow
249
- */
250
- export type TableRowProps = {
251
- /**
252
- * Component to use as the table row. Defaults to 'tr'.
253
- */
254
- component?: string;
255
- };
256
- export type TableRowSlots = SlotsType<DefaultSlot>;
257
- /**
258
- * @see AdminComponent.TabNavButton
259
- */
260
- export type TabNavButtonProps = {
261
- active: boolean;
262
- };
263
- export type TabNavButtonEmits = (e: 'click') => void;
264
- /**
265
- * @see AdminComponent.TabNavButtonWrapper
266
- */
267
- export type TabNavButtonWrapperProps = PlainComponentProps;
268
- export type TabNavButtonWrapperSlots = PlainComponentSlots;
269
- /**
270
- * @see AdminComponent.TabNavContentWrapper
271
- */
272
- export type TabNavContentWrapperProps = PlainComponentProps;
273
- export type TabNavContentWrapperSlots = PlainComponentSlots;
@@ -1,95 +0,0 @@
1
- import { type PiniaPluginContext } from 'pinia';
2
- import { type FormConfiguration, type InteractiveElementInstance } from '@myparcel-dev/vue-form-builder';
3
- import { type MakeOptional } from '@myparcel-dev/ts-utils';
4
- import { type LogLevel } from '../services';
5
- import { type FORM_KEYS } from '../forms';
6
- import { type FormatterObject } from '../composables';
7
- import { type AdminContextObject } from './context.types';
8
- import { type AdminComponentMap, type PrefixedAdminComponentMap } from './admin.types';
9
- export type DefaultAdminConfiguration = Omit<AdminConfiguration, 'context' | 'components' | 'generateFieldId'> & {
10
- components?: Record<string, undefined>;
11
- formatters: Record<string, undefined>;
12
- generateFieldId(element: InteractiveElementInstance): string;
13
- };
14
- export type AdminConfiguration = {
15
- /**
16
- * Components to use.
17
- */
18
- components: AdminComponentMap | PrefixedAdminComponentMap;
19
- /**
20
- * Override default formatters.
21
- */
22
- formatters?: FormatterObject;
23
- /**
24
- * Log level to use. Defaults to 'info' on production and 'debug' on development.
25
- */
26
- logLevel: LogLevel;
27
- /**
28
- * Configuration to pass to @myparcel-dev/vue-form-builder.
29
- */
30
- formConfig?: Omit<FormConfiguration, 'fields'>;
31
- /**
32
- * Overrides per form.
33
- */
34
- formConfigOverrides?: Partial<Record<(typeof FORM_KEYS)[number], Omit<FormConfiguration, 'fields'> & {
35
- /**
36
- * Callback to generate a field id.
37
- */
38
- generateFieldId?(element: InteractiveElementInstance): string;
39
- }>>;
40
- /**
41
- * Transition names.
42
- */
43
- transitions?: {
44
- shipmentBox?: string;
45
- modal?: string;
46
- modalBackdrop?: string;
47
- notification?: string;
48
- shipmentRow?: string;
49
- tabNavigation?: string;
50
- tableRow?: string;
51
- };
52
- /**
53
- * Css classes for common utility usage.
54
- */
55
- cssUtilities?: {
56
- animationLoading?: string;
57
- animationSpin?: string;
58
- cursorDefault?: string;
59
- cursorPointer?: string;
60
- displayFlex?: string;
61
- flexGrow?: string;
62
- marginLAuto?: string;
63
- marginYAuto?: string;
64
- textCenter?: string;
65
- textColorError?: string;
66
- textColorSuccess?: string;
67
- whitespaceNoWrap?: string;
68
- };
69
- /**
70
- * Hook that executes when a store is created.
71
- */
72
- onCreateStore?(piniaContext: PiniaPluginContext): void;
73
- /**
74
- * Hook that executes before an app is created.
75
- */
76
- beforeRender?(configuration: AdminConfiguration): void;
77
- /**
78
- * Hook that executes after an app is created.
79
- */
80
- onRendered?(configuration: AdminConfiguration): void;
81
- /**
82
- * Hook that executes before the pdk admin is created.
83
- */
84
- beforeInitialize?(configuration: AdminConfiguration, context: AdminContextObject): void;
85
- /**
86
- * Hook that executes after the pdk admin is created.
87
- */
88
- onInitialized?(configuration: AdminConfiguration, context: AdminContextObject): void;
89
- /**
90
- * Callback to generate a field id.
91
- */
92
- generateFieldId(element: InteractiveElementInstance): string;
93
- };
94
- export type AdminConfigurationPreset = Omit<Partial<AdminConfiguration>, 'components'>;
95
- export type InputAdminConfiguration = MakeOptional<AdminConfiguration, 'generateFieldId'>;
@@ -1,20 +0,0 @@
1
- import { type AdminContextKey, type Plugin } from '@myparcel-dev/pdk-common';
2
- import { type FormInstance } from '@myparcel-dev/vue-form-builder';
3
- import { type OneOrMore, type Replace } from '@myparcel-dev/ts-utils';
4
- import { type AdminInstanceContextKey, type AdminModalKey } from '../data';
5
- import { type BackendPdkEndpointObject } from './endpoints.types';
6
- export type AdminContextObject = Replace<Plugin.ModelContextContextBag, 'global', GlobalAdminContext> & Partial<AdminInstanceContext>;
7
- export type GlobalAdminContext = Replace<Plugin.ModelContextGlobalContext, 'endpoints', BackendPdkEndpointObject>;
8
- export type AnyAdminContext = AdminContext<AdminContextKey>;
9
- export type AdminContext<T> = T extends keyof AdminContextObject ? AdminContextObject[T] : never;
10
- export type AdminInstanceContext = {
11
- [AdminInstanceContextKey.OrderIdentifier]: Plugin.ModelContextOrderDataContext['externalIdentifier'];
12
- [AdminInstanceContextKey.ProductIdentifier]: Plugin.ModelContextProductDataContext['externalIdentifier'];
13
- };
14
- type BaseModalContext = {
15
- form?: FormInstance;
16
- };
17
- export type AdminModalContext<T extends AdminModalKey = AdminModalKey> = (BaseModalContext & (T extends AdminModalKey.ShipmentOptions ? {
18
- orderIds?: OneOrMore<string>;
19
- } : unknown)) | null;
20
- export {};
@@ -1,7 +0,0 @@
1
- import { type BackendEndpoint, type EndpointObject } from '@myparcel-dev/pdk-common';
2
- import { type BACKEND_ENDPOINTS_DEBUG, type BACKEND_ENDPOINTS_ORDERS, type BACKEND_ENDPOINTS_SHIPMENTS, type BACKEND_ENDPOINTS_WEBHOOKS } from '../data';
3
- export type BackendPdkEndpointObject = EndpointObject<BackendEndpoint>;
4
- export type BackendShipmentEndpoint = (typeof BACKEND_ENDPOINTS_SHIPMENTS)[number];
5
- export type BackendOrderEndpoint = (typeof BACKEND_ENDPOINTS_ORDERS)[number];
6
- export type BackendWebhookEndpoint = (typeof BACKEND_ENDPOINTS_WEBHOOKS)[number];
7
- export type BackendDebugEndpoint = (typeof BACKEND_ENDPOINTS_DEBUG)[number];
@@ -1,39 +0,0 @@
1
- import { type Keyable, type SortType } from '@myparcel-dev/pdk-common';
2
- import { type InteractiveElementInstance } from '@myparcel-dev/vue-form-builder';
3
- import { type AdminIcon } from '../data';
4
- import { type Translatable, type Translation } from './language.types';
5
- export type GlobalFieldProps = {
6
- description?: Translation;
7
- subtext?: Translation;
8
- value?: unknown;
9
- };
10
- export type ElementInstance<Type = unknown, Props = any> = InteractiveElementInstance<Type, Props & GlobalFieldProps & Record<string, unknown>>;
11
- export type OptionsProp<T extends SelectOptionValue = SelectOptionValue> = {
12
- options?: SelectOption<T>[];
13
- sort?: SortType;
14
- };
15
- export type PdkElementProps<ModelValue extends unknown = Keyable, Props = any> = {
16
- element: ElementInstance<ModelValue, Props>;
17
- modelValue: ModelValue;
18
- };
19
- export type PdkElementEmits<ModelValue extends unknown = Keyable> = (event: 'update:modelValue', value: ModelValue) => void;
20
- export type RadioGroupOption<Value extends Keyable = Keyable> = SelectOption<Value> & {
21
- image?: string;
22
- icon?: AdminIcon;
23
- };
24
- interface BaseSelectOption<Value extends SelectOptionValue = SelectOptionValue> {
25
- disabled?: boolean;
26
- icon?: string | AdminIcon;
27
- image?: string;
28
- description?: Translatable;
29
- value: Value;
30
- }
31
- export interface SelectOptionWithLabel<Value extends SelectOptionValue = SelectOptionValue, T extends Translation = Translation> extends BaseSelectOption<Value> {
32
- label: T;
33
- }
34
- export interface SelectOptionWithPlainLabel<Value extends SelectOptionValue = SelectOptionValue, T extends Translation = Translation> extends BaseSelectOption<Value> {
35
- plainLabel: T;
36
- }
37
- export type SelectOptionValue = Keyable | boolean;
38
- export type SelectOption<Value extends SelectOptionValue = SelectOptionValue> = SelectOptionWithLabel<Value> | SelectOptionWithPlainLabel<Value>;
39
- export {};
@@ -1,12 +0,0 @@
1
- export * from './actions';
2
- export * from './actions.types';
3
- export * from './admin.types';
4
- export * from './common.types';
5
- export * from './components-form.types';
6
- export * from './components.types';
7
- export * from './configuration.types';
8
- export * from './context.types';
9
- export * from './endpoints.types';
10
- export * from './form.types';
11
- export * from './language.types';
12
- export * from './sdk.types';
@@ -1,9 +0,0 @@
1
- import { type Keyable } from '@myparcel-dev/pdk-common';
2
- export interface NonTranslatable {
3
- text: string;
4
- }
5
- export interface Translatable {
6
- key: string;
7
- args?: Record<Keyable, Keyable>;
8
- }
9
- export type Translation = string | Translatable | NonTranslatable;
@@ -1,155 +0,0 @@
1
- import { type AdminContextKey, type BackendEndpoint, type ExtractEndpointDefinition, type LabelFormat, type LabelOutput, type LabelPosition, type PdkEndpointDefinition, type Plugin, type Settings, type Shipment } from '@myparcel-dev/pdk-common';
2
- import { type RecursivePartial } from '@myparcel-dev/ts-utils';
3
- import { type AdminContextObject } from './context.types';
4
- import { type WebhookDefinition } from './common.types';
5
- export type PdfUrlResponse = {
6
- url: string;
7
- };
8
- export type PdfDataResponse = {
9
- data: string;
10
- };
11
- interface BasePrintDefinition extends PdkEndpointDefinition {
12
- formattedResponse: PdfUrlResponse | PdfDataResponse;
13
- parameters: {
14
- orderIds: string;
15
- shipmentIds?: string;
16
- format?: LabelFormat;
17
- output?: LabelOutput;
18
- position?: LabelPosition;
19
- };
20
- response: (PdfUrlResponse | PdfDataResponse)[];
21
- }
22
- interface FetchContextDefinition extends PdkEndpointDefinition {
23
- formattedResponse: AdminContextObject;
24
- name: BackendEndpoint.FetchContext;
25
- parameters: {
26
- context: string;
27
- };
28
- response: [AdminContextObject];
29
- }
30
- interface DeleteAccountDefinition extends PdkEndpointDefinition {
31
- name: BackendEndpoint.UpdateAccount;
32
- body: undefined;
33
- parameters: undefined;
34
- response: [Pick<AdminContextObject, AdminContextKey.Dynamic | AdminContextKey.PluginSettingsView>];
35
- formattedResponse: Pick<AdminContextObject, AdminContextKey.Dynamic | AdminContextKey.PluginSettingsView>;
36
- }
37
- interface UpdateAccountDefinition extends PdkEndpointDefinition {
38
- body: Settings.ModelAccountSettings;
39
- name: BackendEndpoint.UpdateAccount;
40
- parameters: undefined;
41
- response: [Pick<AdminContextObject, AdminContextKey.Dynamic | AdminContextKey.PluginSettingsView>];
42
- formattedResponse: Pick<AdminContextObject, AdminContextKey.Dynamic | AdminContextKey.PluginSettingsView>;
43
- }
44
- interface FetchOrdersDefinition extends PdkEndpointDefinition {
45
- formattedResponse: Plugin.ModelContextOrderDataContext;
46
- name: BackendEndpoint.FetchOrders;
47
- parameters: {
48
- orderIds: string;
49
- };
50
- response: [Plugin.ModelContextOrderDataContext];
51
- }
52
- interface ExportOrdersDefinition extends PdkEndpointDefinition {
53
- body?: RecursivePartial<Plugin.ModelContextOrderDataContext>[];
54
- name: BackendEndpoint.ExportOrders;
55
- parameters: {
56
- orderIds: string;
57
- };
58
- response: Plugin.ModelContextOrderDataContext[];
59
- }
60
- interface UpdateOrdersDefinition extends PdkEndpointDefinition {
61
- body?: RecursivePartial<Plugin.ModelContextOrderDataContext>[];
62
- name: BackendEndpoint.UpdateOrders;
63
- parameters: {
64
- orderIds: string;
65
- };
66
- response: Plugin.ModelContextOrderDataContext[];
67
- }
68
- interface DeleteShipmentsDefinition extends PdkEndpointDefinition {
69
- name: BackendEndpoint.DeleteShipments;
70
- parameters: {
71
- orderIds: string;
72
- shipmentIds?: string;
73
- };
74
- response: Plugin.ModelContextOrderDataContext[];
75
- }
76
- interface UpdateShipmentsDefinition extends PdkEndpointDefinition {
77
- body: RecursivePartial<Plugin.ModelContextOrderDataContext>[];
78
- name: BackendEndpoint.UpdateShipments;
79
- parameters: {
80
- orderIds: string;
81
- shipmentIds?: string;
82
- };
83
- response: Plugin.ModelContextOrderDataContext['shipments'];
84
- }
85
- interface FetchShipmentsDefinition extends PdkEndpointDefinition {
86
- name: BackendEndpoint.FetchShipments;
87
- parameters: {
88
- orderIds: string;
89
- shipmentIds?: string;
90
- };
91
- response: Shipment.ModelShipment[];
92
- formattedResponse: Shipment.ModelShipment;
93
- }
94
- interface FetchProductsDefinition extends PdkEndpointDefinition {
95
- formattedResponse: Plugin.ModelContextProductDataContext;
96
- name: BackendEndpoint.FetchProducts;
97
- parameters: {
98
- productIds: string;
99
- };
100
- response: [Plugin.ModelContextProductDataContext];
101
- }
102
- interface UpdatePluginSettingsDefinition extends PdkEndpointDefinition {
103
- body: Settings.ModelSettings;
104
- name: BackendEndpoint.UpdatePluginSettings;
105
- parameters: undefined;
106
- response: Settings.ModelSettings[];
107
- }
108
- interface UpdateProductSettingsDefinition extends PdkEndpointDefinition {
109
- body: Settings.ModelProductSettings;
110
- name: BackendEndpoint.UpdateProductSettings;
111
- parameters: {
112
- productIds: string;
113
- };
114
- response: Settings.ModelProductSettings[];
115
- }
116
- interface PrintShipmentsDefinition extends BasePrintDefinition {
117
- name: BackendEndpoint.PrintShipments;
118
- }
119
- interface PrintOrdersDefinition extends BasePrintDefinition {
120
- name: BackendEndpoint.PrintOrders;
121
- }
122
- interface FetchWebhooksDefinition extends PdkEndpointDefinition {
123
- name: BackendEndpoint.FetchWebhooks;
124
- parameters: never;
125
- response: WebhookDefinition[];
126
- }
127
- interface CreateWebhooksDefinition extends PdkEndpointDefinition {
128
- name: BackendEndpoint.CreateWebhooks;
129
- parameters: {
130
- hooks: string;
131
- };
132
- response: WebhookDefinition[];
133
- }
134
- interface DeleteWebhooksDefinition extends PdkEndpointDefinition {
135
- name: BackendEndpoint.DeleteWebhooks;
136
- parameters: {
137
- hooks: string;
138
- };
139
- response: WebhookDefinition[];
140
- }
141
- interface DebugDownloadLogsDefinition extends PdkEndpointDefinition {
142
- name: BackendEndpoint.DownloadLogs;
143
- response: Blob;
144
- }
145
- interface DebugSwitchToAcceptanceApiDefinition extends PdkEndpointDefinition {
146
- name: BackendEndpoint.SwitchToAcceptanceApi;
147
- response: void;
148
- }
149
- interface DebugSwitchToProductionApiDefinition extends PdkEndpointDefinition {
150
- name: BackendEndpoint.SwitchToProductionApi;
151
- response: void;
152
- }
153
- export type BackendEndpointDefinition = CreateWebhooksDefinition | DebugDownloadLogsDefinition | DebugSwitchToAcceptanceApiDefinition | DebugSwitchToProductionApiDefinition | DeleteAccountDefinition | DeleteShipmentsDefinition | DeleteWebhooksDefinition | ExportOrdersDefinition | FetchContextDefinition | FetchOrdersDefinition | FetchProductsDefinition | FetchShipmentsDefinition | FetchWebhooksDefinition | PrintOrdersDefinition | PrintShipmentsDefinition | UpdateAccountDefinition | UpdateOrdersDefinition | UpdatePluginSettingsDefinition | UpdateProductSettingsDefinition | UpdateShipmentsDefinition;
154
- export type BackendEndpointOptions<N extends BackendEndpoint> = Omit<ExtractEndpointDefinition<N, BackendEndpointDefinition>, 'name' | 'response'>;
155
- export {};
@@ -1,2 +0,0 @@
1
- import { TriState } from '@myparcel-dev/pdk-common';
2
- export declare const booleanToTriState: (value?: boolean) => TriState.On | TriState.Off;
@@ -1 +0,0 @@
1
- export declare const convertDotNotationToObject: (object: Record<string, any>, valueCallback?: (value: any, key: string) => any) => Record<string, any>;
@@ -1 +0,0 @@
1
- export declare const createAssetUrl: (path?: string) => string;
@@ -1,8 +0,0 @@
1
- import { type MaybeRef } from '@vueuse/core';
2
- type ClassValue = MaybeRef<string | number | boolean | undefined>;
3
- type ClassDefinition = {
4
- key: string | undefined;
5
- value: ClassValue;
6
- };
7
- export declare const createClasses: (param: ClassDefinition[]) => Record<string, ClassValue>;
8
- export {};
@@ -1,3 +0,0 @@
1
- import { type Keyable } from '@myparcel-dev/pdk-common';
2
- import { type ReadonlyOr } from '@myparcel-dev/ts-utils';
3
- export declare const createObjectWithKeys: <K extends ReadonlyOr<Keyable[]>, V>(keys: K, callback?: (key: K[number]) => V) => Record<K[number], V>;
@@ -1,7 +0,0 @@
1
- /**
2
- * Decodes any HTML entities in given string into their original strings.
3
- *
4
- * @param {string} string
5
- * @returns {string}
6
- */
7
- export declare function decodeHtmlEntities(string: string): string;
@@ -1 +0,0 @@
1
- export declare const downloadBlob: (blob: Blob, filename: string) => void;
@@ -1 +0,0 @@
1
- export declare const downloadFileFromUrl: (url: string, filename: string) => void;
@@ -1,2 +0,0 @@
1
- import { type OneOrMore } from '@myparcel-dev/ts-utils';
2
- export declare const encodeArrayParameter: (parameter?: null | OneOrMore<string | number | undefined>) => string;
@@ -1,2 +0,0 @@
1
- import { type AdminInstance } from '../types';
2
- export declare const extendAdminInstance: (data: Partial<AdminInstance>) => void;
@@ -1,4 +0,0 @@
1
- /**
2
- * Creates and clicks a link with the given URL. Avoids popup blockers by creating a hidden link element.
3
- */
4
- export declare const fakeLinkClick: (url: string, attributes: Record<string, string>) => void;
@@ -1,3 +0,0 @@
1
- import { type InteractiveElementConfiguration } from '@myparcel-dev/vue-form-builder';
2
- import { type ElementInstance, type PdkElementProps } from '../../types';
3
- export declare const createFormElement: <Type = unknown>(config?: Partial<InteractiveElementConfiguration<Type>>, formName?: string) => ElementInstance<Type, PdkElementProps<Type>>;
@@ -1 +0,0 @@
1
- export declare const createShipmentFormName: (orderId?: string) => string;
@@ -1,2 +0,0 @@
1
- import { type FormInstance } from '@myparcel-dev/vue-form-builder';
2
- export declare const formToBody: <T extends Record<string, unknown> = Record<string, unknown>>(form?: false | FormInstance | T) => T;