@nhtio/lucid-resourceful-vue-components 0.1.0-master-bb69df0b → 0.1.0-master-36a05f8e
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/{VChip-COQck2AV.mjs → VChip-DWwcL8cL.mjs} +2 -2
- package/{VChip-COQck2AV.mjs.map → VChip-DWwcL8cL.mjs.map} +1 -1
- package/{VDatePicker-DJFZcev9.mjs → VDatePicker-C7_ULYfO.mjs} +4 -4
- package/{VDatePicker-DJFZcev9.mjs.map → VDatePicker-C7_ULYfO.mjs.map} +1 -1
- package/{VDialog-JGibK5Rl.mjs → VDialog-BVRDhoD7.mjs} +3 -3
- package/{VDialog-JGibK5Rl.mjs.map → VDialog-BVRDhoD7.mjs.map} +1 -1
- package/{VEmptyState-DKODfacQ.mjs → VEmptyState-C2B0Znk9.mjs} +2 -2
- package/{VEmptyState-DKODfacQ.mjs.map → VEmptyState-C2B0Znk9.mjs.map} +1 -1
- package/{VHover-DGMoUvi7.mjs → VHover-DnB1GlWG.mjs} +3 -3
- package/{VHover-DGMoUvi7.mjs.map → VHover-DnB1GlWG.mjs.map} +1 -1
- package/{VListItem-ZmExdT37.mjs → VListItem-DojRgtpe.mjs} +3 -3
- package/{VListItem-ZmExdT37.mjs.map → VListItem-DojRgtpe.mjs.map} +1 -1
- package/{VMenu-DCDIKpqX.mjs → VMenu-D2biKkpd.mjs} +3 -3
- package/{VMenu-DCDIKpqX.mjs.map → VMenu-D2biKkpd.mjs.map} +1 -1
- package/{VPicker-CAvKVtUE.mjs → VPicker-dxKS1KK4.mjs} +4 -4
- package/{VPicker-CAvKVtUE.mjs.map → VPicker-dxKS1KK4.mjs.map} +1 -1
- package/{VRadioGroup-BZEBDCHZ.mjs → VRadioGroup-4EZRfNoO.mjs} +4 -4
- package/{VRadioGroup-BZEBDCHZ.mjs.map → VRadioGroup-4EZRfNoO.mjs.map} +1 -1
- package/{VRow-BwokRy3H.mjs → VRow-BBY2gEjT.mjs} +2 -2
- package/{VRow-BwokRy3H.mjs.map → VRow-BBY2gEjT.mjs.map} +1 -1
- package/{VSheet-CHO05eqU.mjs → VSheet-B4SA9_dv.mjs} +2 -2
- package/{VSheet-CHO05eqU.mjs.map → VSheet-B4SA9_dv.mjs.map} +1 -1
- package/{actions-YSn63NuZ.mjs → actions-Cl683OMq.mjs} +12 -12
- package/{actions-YSn63NuZ.mjs.map → actions-Cl683OMq.mjs.map} +1 -1
- package/{alert-DyPHXrg0.mjs → alert-BX9BkYd9.mjs} +11 -11
- package/{alert-DyPHXrg0.mjs.map → alert-BX9BkYd9.mjs.map} +1 -1
- package/{bigint-Cy2vBSgT.mjs → bigint-Cutiv42Q.mjs} +7 -7
- package/{bigint-Cy2vBSgT.mjs.map → bigint-Cutiv42Q.mjs.map} +1 -1
- package/{boolean-ByszdhzJ.mjs → boolean-D6WyXCcY.mjs} +10 -10
- package/{boolean-ByszdhzJ.mjs.map → boolean-D6WyXCcY.mjs.map} +1 -1
- package/{clipboard-KJvxDtG2.mjs → clipboard-C0t7KXsZ.mjs} +7 -7
- package/{clipboard-KJvxDtG2.mjs.map → clipboard-C0t7KXsZ.mjs.map} +1 -1
- package/{common-BgBJF6Ey.mjs → common-CCR70s0E.mjs} +15 -15
- package/{common-BgBJF6Ey.mjs.map → common-CCR70s0E.mjs.map} +1 -1
- package/components/autorefresh_controller.mjs +1 -1
- package/components/control_button.mjs +1 -1
- package/components/control_button_bar.mjs +2 -2
- package/components/control_menu.mjs +1 -1
- package/components/custom_field.mjs +1 -1
- package/components/exporter.mjs +1 -1
- package/components/fields/bigint.mjs +1 -1
- package/components/fields/boolean.mjs +1 -1
- package/components/fields/date.mjs +1 -1
- package/components/fields/date_time.mjs +1 -1
- package/components/fields/enum.mjs +1 -1
- package/components/fields/integer.mjs +1 -1
- package/components/fields/number.mjs +1 -1
- package/components/fields/string.mjs +1 -1
- package/components/fields/unsigned_integer.mjs +1 -1
- package/components/fields.mjs +9 -9
- package/components/form_with_validation.mjs +1 -1
- package/components/resourceful_alerter.mjs +1 -1
- package/components/resourceful_index.mjs +1 -1
- package/components/resourceful_record.mjs +2 -2
- package/components/resourceful_record_default_form.mjs +1 -1
- package/components/resourceful_record_form.mjs +1 -1
- package/components/sortable.mjs +1 -1
- package/components/svg_icon.mjs +1 -1
- package/components/timezone_picker.mjs +1 -1
- package/components.mjs +23 -23
- package/composables.mjs +11 -11
- package/{custom-BAFcOQCK.mjs → custom-B9c_7nfV.mjs} +7 -7
- package/{custom-BAFcOQCK.mjs.map → custom-B9c_7nfV.mjs.map} +1 -1
- package/{date-C1TpKZjo.mjs → date-B2SWnGCI.mjs} +10 -10
- package/{date-C1TpKZjo.mjs.map → date-B2SWnGCI.mjs.map} +1 -1
- package/{date_time-CBWmY4pF.mjs → date_time-CDwBSOoF.mjs} +18 -18
- package/{date_time-CBWmY4pF.mjs.map → date_time-CDwBSOoF.mjs.map} +1 -1
- package/{display-B7Pfpbav.mjs → display-C5mRsn7Z.mjs} +4 -4
- package/{display-B7Pfpbav.mjs.map → display-C5mRsn7Z.mjs.map} +1 -1
- package/{display-XSB3T9Jj.mjs → display-CHspVOz6.mjs} +25 -25
- package/{display-XSB3T9Jj.mjs.map → display-CHspVOz6.mjs.map} +1 -1
- package/{enum-IEIpDoBF.mjs → enum-DWYdxtym.mjs} +9 -9
- package/{enum-IEIpDoBF.mjs.map → enum-DWYdxtym.mjs.map} +1 -1
- package/{exceptions-VkcMC9Hx.mjs → exceptions-Cc9ucZ7k.mjs} +2 -2
- package/{exceptions-VkcMC9Hx.mjs.map → exceptions-Cc9ucZ7k.mjs.map} +1 -1
- package/exceptions.mjs +2 -2
- package/factories.mjs +2 -2
- package/{field_composer-B-kmiFl5.mjs → field_composer-BKt9bYLY.mjs} +3 -3
- package/{field_composer-B-kmiFl5.mjs.map → field_composer-BKt9bYLY.mjs.map} +1 -1
- package/{form-lIbQiExG.mjs → form-UkVPEtmH.mjs} +15 -15
- package/{form-lIbQiExG.mjs.map → form-UkVPEtmH.mjs.map} +1 -1
- package/{guards-COQOhf2Z.mjs → guards-DH0cjg4V.mjs} +2 -2
- package/{guards-COQOhf2Z.mjs.map → guards-DH0cjg4V.mjs.map} +1 -1
- package/guards.mjs +4 -4
- package/helpers.mjs +17 -17
- package/{http-Hs94xPgs.mjs → http-DF04z-RO.mjs} +29 -14
- package/{http-Hs94xPgs.mjs.map → http-DF04z-RO.mjs.map} +1 -1
- package/{http-BwGUOld8.mjs → http-I0AHP1E0.mjs} +2 -2
- package/{http-BwGUOld8.mjs.map → http-I0AHP1E0.mjs.map} +1 -1
- package/http.d.ts +1 -1
- package/http.mjs +3 -2
- package/{index-CHhB4TiN.mjs → index-BDy60Kot.mjs} +15 -15
- package/{index-CHhB4TiN.mjs.map → index-BDy60Kot.mjs.map} +1 -1
- package/{index-e3yUkeGc.mjs → index-BLHeTLWJ.mjs} +6 -6
- package/{index-e3yUkeGc.mjs.map → index-BLHeTLWJ.mjs.map} +1 -1
- package/{index-Du-L5rWD.mjs → index-BYW_4VLZ.mjs} +3 -3
- package/{index-Du-L5rWD.mjs.map → index-BYW_4VLZ.mjs.map} +1 -1
- package/{index-BdT3da5h.mjs → index-Bv_WlNae.mjs} +4 -4
- package/{index-BdT3da5h.mjs.map → index-Bv_WlNae.mjs.map} +1 -1
- package/{index-DjmxSnUM.mjs → index-CPEwoqSn.mjs} +3 -3
- package/{index-DjmxSnUM.mjs.map → index-CPEwoqSn.mjs.map} +1 -1
- package/{index-B7CvKrUN.mjs → index-CQL3B-1I.mjs} +43 -43
- package/{index-B7CvKrUN.mjs.map → index-CQL3B-1I.mjs.map} +1 -1
- package/{index--Cf9LsTT.mjs → index-CdM957SL.mjs} +8 -8
- package/{index--Cf9LsTT.mjs.map → index-CdM957SL.mjs.map} +1 -1
- package/{index-C0T5wSMu.mjs → index-DocX_tDZ.mjs} +8 -8
- package/{index-C0T5wSMu.mjs.map → index-DocX_tDZ.mjs.map} +1 -1
- package/{index-DsWZ5fYy.mjs → index-DrnPA6Ix.mjs} +8 -8
- package/{index-DsWZ5fYy.mjs.map → index-DrnPA6Ix.mjs.map} +1 -1
- package/index.mjs +45 -44
- package/{integer-Dgaby1O_.mjs → integer-Bt_AlHXh.mjs} +3 -3
- package/{integer-Dgaby1O_.mjs.map → integer-Bt_AlHXh.mjs.map} +1 -1
- package/{ioc-BCu4NowD.mjs → ioc-kp39kvzE.mjs} +2 -2
- package/{ioc-BCu4NowD.mjs.map → ioc-kp39kvzE.mjs.map} +1 -1
- package/ioc.mjs +1 -1
- package/{mdi-CicdOYKA.mjs → mdi-jw9Ee7p6.mjs} +15 -15
- package/{mdi-CicdOYKA.mjs.map → mdi-jw9Ee7p6.mjs.map} +1 -1
- package/{number-CTG9FMqx.mjs → number-Dm-VOsTt.mjs} +8 -8
- package/{number-CTG9FMqx.mjs.map → number-Dm-VOsTt.mjs.map} +1 -1
- package/package.json +5 -5
- package/private/services/http.d.ts +9 -0
- package/{props-Ck_v-XiR.mjs → props-BD6dI7C6.mjs} +4 -4
- package/{props-Ck_v-XiR.mjs.map → props-BD6dI7C6.mjs.map} +1 -1
- package/{props-zY0c2If4.mjs → props-CLREBMsk.mjs} +6 -6
- package/{props-zY0c2If4.mjs.map → props-CLREBMsk.mjs.map} +1 -1
- package/{renderers-CP-Q2CXv.mjs → renderers-52Fmk2vb.mjs} +14 -14
- package/{renderers-CP-Q2CXv.mjs.map → renderers-52Fmk2vb.mjs.map} +1 -1
- package/{string-BRlUr05B.mjs → string-CLObNFFq.mjs} +13 -13
- package/{string-BRlUr05B.mjs.map → string-CLObNFFq.mjs.map} +1 -1
- package/{unsigned_integer-DPCZyWeW.mjs → unsigned_integer-BE8JsE5A.mjs} +4 -4
- package/{unsigned_integer-DPCZyWeW.mjs.map → unsigned_integer-BE8JsE5A.mjs.map} +1 -1
- package/{utils-DJdki5Rp.mjs → utils-CtD3mjq0.mjs} +2 -2
- package/{utils-DJdki5Rp.mjs.map → utils-CtD3mjq0.mjs.map} +1 -1
- package/{validation-DJJIheBG.mjs → validation-AYuAZgi0.mjs} +5 -5
- package/{validation-DJJIheBG.mjs.map → validation-AYuAZgi0.mjs.map} +1 -1
- package/{vendor-nhtio-vuetifiable-D1pLdLSx.mjs → vendor-nhtio-vuetifiable-CS-KbH1h.mjs} +16 -16
- package/{vendor-nhtio-vuetifiable-D1pLdLSx.mjs.map → vendor-nhtio-vuetifiable-CS-KbH1h.mjs.map} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards-
|
|
1
|
+
{"version":3,"file":"guards-DH0cjg4V.mjs","sources":["../src/private/resourceful-record/guards.ts"],"sourcesContent":["import { isObject } from '../common/guards'\nimport { validator as joi, ValidationError } from '@nhtio/validation'\nimport type { Schema } from '@nhtio/validation'\nimport type { ResourceResourcefulRecordResponse } from './types'\nimport type { ResourcefulHttpResponse, ResourcefulHttpProgress } from '../services/http'\n\nconst passesSchema = (schema: Schema, value: unknown): boolean => {\n const { error } = schema.validate(value, { abortEarly: true })\n return !error\n}\n\nexport const isValidationError = (value: unknown): value is ValidationError => {\n const schema = joi.alternatives(\n joi.object().instance(ValidationError as any),\n joi.function().instance(ValidationError as any),\n joi\n .object({\n message: joi.string().required(),\n details: joi\n .array()\n .items(\n joi.object({\n message: joi.string().required(),\n path: joi.array().items(joi.alternatives(joi.string(), joi.number())).required(),\n type: joi.string().required(),\n context: joi.object().unknown(true).required(),\n })\n )\n .required(),\n })\n .unknown(true)\n )\n return passesSchema(schema, value)\n}\n\nexport const isValues = (value: unknown): value is Record<string, any> => {\n return isObject(value)\n}\n\nexport const isResourceResourcefulRecordResponse = (\n value: unknown\n): value is ResourceResourcefulRecordResponse => {\n return isObject(value)\n}\n\nexport const isResourcefulHttpResponse = (value: unknown): value is ResourcefulHttpResponse => {\n const schema = joi.object({\n data: joi.any().required(),\n status: joi.number().required(),\n headers: joi.object().unknown(true).required(),\n url: joi.string().allow('').required(),\n })\n return passesSchema(schema, value)\n}\n\nexport const isResourcefulHttpProgress = (value: unknown): value is ResourcefulHttpProgress => {\n const schema = joi.object({\n percent: joi.number().min(0).max(100).required(),\n transferredBytes: joi.number().min(0).required(),\n totalBytes: joi.number().min(0).required(),\n })\n return passesSchema(schema, value)\n}\n\nexport const isResourcefulRecordPreventedEvent = (\n values: Record<string, any>,\n error: ValidationError\n): boolean => {\n return isValues(values) && isValidationError(error)\n}\n\nexport const isResourcefulRecordSubmittedEvent = (values: Record<string, any>): boolean => {\n return isValues(values)\n}\n\nexport const isResourcefulRecordProcessingEvent = (\n progress: ResourcefulHttpProgress,\n values: Record<string, any>\n): boolean => {\n return isResourcefulHttpProgress(progress) && isValues(values)\n}\n\nexport const isResourcefulRecordSuccessEvent = (\n response: ResourceResourcefulRecordResponse,\n values: Record<string, any>\n): boolean => {\n return isResourceResourcefulRecordResponse(response) && isValues(values)\n}\n\nexport const isResourcefulRecordFailureEvent = (\n response: ResourcefulHttpResponse,\n values: Record<string, any>\n): boolean => {\n return isResourcefulHttpResponse(response) && isValues(values)\n}\n"],"names":["joi"],"mappings":";;AAMA,MAAM,eAAe,CAAC,QAAgB,UAA4B;AAChE,QAAM,EAAE,UAAU,OAAO,SAAS,OAAO,EAAE,YAAY,MAAM;AAC7D,SAAO,CAAC;AACV;AAEO,MAAM,oBAAoB,CAAC,UAA6C;AAC7E,QAAM,SAASA,UAAI;AAAA,IACjBA,UAAI,OAAA,EAAS,SAAS,eAAsB;AAAA,IAC5CA,UAAI,SAAA,EAAW,SAAS,eAAsB;AAAA,IAC9CA,UACG,OAAO;AAAA,MACN,SAASA,UAAI,OAAA,EAAS,SAAA;AAAA,MACtB,SAASA,UACN,MAAA,EACA;AAAA,QACCA,UAAI,OAAO;AAAA,UACT,SAASA,UAAI,OAAA,EAAS,SAAA;AAAA,UACtB,MAAMA,UAAI,MAAA,EAAQ,MAAMA,UAAI,aAAaA,UAAI,OAAA,GAAUA,UAAI,OAAA,CAAQ,CAAC,EAAE,SAAA;AAAA,UACtE,MAAMA,UAAI,OAAA,EAAS,SAAA;AAAA,UACnB,SAASA,UAAI,OAAA,EAAS,QAAQ,IAAI,EAAE,SAAA;AAAA,QAAS,CAC9C;AAAA,MAAA,EAEF,SAAA;AAAA,IAAS,CACb,EACA,QAAQ,IAAI;AAAA,EAAA;AAEjB,SAAO,aAAa,QAAQ,KAAK;AACnC;AAEO,MAAM,WAAW,CAAC,UAAiD;AACxE,SAAO,SAAS,KAAK;AACvB;AAEO,MAAM,sCAAsC,CACjD,UAC+C;AAC/C,SAAO,SAAS,KAAK;AACvB;AAEO,MAAM,4BAA4B,CAAC,UAAqD;AAC7F,QAAM,SAASA,UAAI,OAAO;AAAA,IACxB,MAAMA,UAAI,IAAA,EAAM,SAAA;AAAA,IAChB,QAAQA,UAAI,OAAA,EAAS,SAAA;AAAA,IACrB,SAASA,UAAI,OAAA,EAAS,QAAQ,IAAI,EAAE,SAAA;AAAA,IACpC,KAAKA,UAAI,OAAA,EAAS,MAAM,EAAE,EAAE,SAAA;AAAA,EAAS,CACtC;AACD,SAAO,aAAa,QAAQ,KAAK;AACnC;AAEO,MAAM,4BAA4B,CAAC,UAAqD;AAC7F,QAAM,SAASA,UAAI,OAAO;AAAA,IACxB,SAASA,UAAI,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,SAAA;AAAA,IACtC,kBAAkBA,UAAI,OAAA,EAAS,IAAI,CAAC,EAAE,SAAA;AAAA,IACtC,YAAYA,UAAI,OAAA,EAAS,IAAI,CAAC,EAAE,SAAA;AAAA,EAAS,CAC1C;AACD,SAAO,aAAa,QAAQ,KAAK;AACnC;AAEO,MAAM,oCAAoC,CAC/C,QACA,UACY;AACZ,SAAO,SAAS,MAAM,KAAK,kBAAkB,KAAK;AACpD;AAEO,MAAM,oCAAoC,CAAC,WAAyC;AACzF,SAAO,SAAS,MAAM;AACxB;AAEO,MAAM,qCAAqC,CAChD,UACA,WACY;AACZ,SAAO,0BAA0B,QAAQ,KAAK,SAAS,MAAM;AAC/D;AAEO,MAAM,kCAAkC,CAC7C,UACA,WACY;AACZ,SAAO,oCAAoC,QAAQ,KAAK,SAAS,MAAM;AACzE;AAEO,MAAM,kCAAkC,CAC7C,UACA,WACY;AACZ,SAAO,0BAA0B,QAAQ,KAAK,SAAS,MAAM;AAC/D;"}
|
package/guards.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i } from "./validation-
|
|
2
|
-
import { a, c, b, h, d, f, e, g, i as i2 } from "./guards-
|
|
3
|
-
import { a as a2, i as i3 } from "./actions-
|
|
4
|
-
import { f as f2, i as i4 } from "./utils-
|
|
1
|
+
import { i } from "./validation-AYuAZgi0.mjs";
|
|
2
|
+
import { a, c, b, h, d, f, e, g, i as i2 } from "./guards-DH0cjg4V.mjs";
|
|
3
|
+
import { a as a2, i as i3 } from "./actions-Cl683OMq.mjs";
|
|
4
|
+
import { f as f2, i as i4 } from "./utils-CtD3mjq0.mjs";
|
|
5
5
|
export {
|
|
6
6
|
f2 as isHTMLElement,
|
|
7
7
|
i4 as isObject,
|
package/helpers.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { c } from "./clipboard-
|
|
2
|
-
import { I, S, d, t } from "./vendor-nhtio-vuetifiable-
|
|
3
|
-
import { S as S2, a } from "./display-
|
|
4
|
-
import { e } from "./http-
|
|
5
|
-
import { s } from "./index-
|
|
6
|
-
import { r, a as a2 } from "./renderers-
|
|
7
|
-
import { g, a as a3, u, b, c as c2 } from "./index-
|
|
8
|
-
import { p as printfExports } from "./http-
|
|
9
|
-
import {
|
|
1
|
+
import { c } from "./clipboard-C0t7KXsZ.mjs";
|
|
2
|
+
import { I, S, d, t } from "./vendor-nhtio-vuetifiable-CS-KbH1h.mjs";
|
|
3
|
+
import { S as S2, a } from "./display-C5mRsn7Z.mjs";
|
|
4
|
+
import { e } from "./http-I0AHP1E0.mjs";
|
|
5
|
+
import { s } from "./index-CPEwoqSn.mjs";
|
|
6
|
+
import { r, a as a2 } from "./renderers-52Fmk2vb.mjs";
|
|
7
|
+
import { g, a as a3, u, b, c as c2 } from "./index-Bv_WlNae.mjs";
|
|
8
|
+
import { p as printfExports } from "./http-DF04z-RO.mjs";
|
|
9
|
+
import { d as d2 } from "./http-DF04z-RO.mjs";
|
|
10
10
|
import { f } from "./big_number_formatter-Y4TivQxi.mjs";
|
|
11
|
-
import { R, j, g as g2, h, k, n, l, m, o, s as s2, t as t2, q } from "./utils-
|
|
12
|
-
import { d as
|
|
13
|
-
import { d as
|
|
11
|
+
import { R, j, g as g2, h, k, n, l, m, o, s as s2, t as t2, q } from "./utils-CtD3mjq0.mjs";
|
|
12
|
+
import { d as d3, e as e2, v } from "./index-qrLo5NeU.mjs";
|
|
13
|
+
import { d as d4, e as e3 } from "./vendor-nhtio-validation-IJWW0vrt.mjs";
|
|
14
14
|
import { n as n2 } from "./numeral-DmC5bR5g.mjs";
|
|
15
|
-
import { o as o2 } from "./index-
|
|
15
|
+
import { o as o2 } from "./index-BYW_4VLZ.mjs";
|
|
16
16
|
import { m as merge, c as compact, d as decode, i as isRegExp, a as maybeMap, b as combine, f as formats, s as stringify } from "./stringify-Bfbvixfq.mjs";
|
|
17
|
-
import { l as dotCtor } from "./ioc-
|
|
17
|
+
import { l as dotCtor } from "./ioc-kp39kvzE.mjs";
|
|
18
18
|
const has = Object.prototype.hasOwnProperty;
|
|
19
19
|
const isArray = Array.isArray;
|
|
20
20
|
const defaults = {
|
|
@@ -242,10 +242,10 @@ export {
|
|
|
242
242
|
a as SUPPORTS_VISUAL_VIEWPORT,
|
|
243
243
|
j as asAbsInt,
|
|
244
244
|
c as copyToClipboard,
|
|
245
|
-
|
|
245
|
+
d2 as createError,
|
|
246
246
|
d as debounce,
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
d3 as decode,
|
|
248
|
+
d4 as decodeValidator,
|
|
249
249
|
dot,
|
|
250
250
|
e2 as encode,
|
|
251
251
|
e3 as encodeValidator,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
import { I as IN_BROWSER, S as SUPPORTS_INTERSECTION } from "./vendor-nhtio-vuetifiable-
|
|
2
|
+
import { I as IN_BROWSER, S as SUPPORTS_INTERSECTION } from "./vendor-nhtio-vuetifiable-CS-KbH1h.mjs";
|
|
3
3
|
import { M as Middleware } from "./vendor-nhtio-middleware-DPyFv1NP.mjs";
|
|
4
4
|
import { d as decode, e as encode } from "./index-qrLo5NeU.mjs";
|
|
5
5
|
const BROWSER_ALIASES_MAP = {
|
|
@@ -3721,6 +3721,13 @@ const createError = (message, code) => {
|
|
|
3721
3721
|
};
|
|
3722
3722
|
};
|
|
3723
3723
|
const ResourcefulHttpMethod = ["get", "post", "put", "patch", "head", "delete"];
|
|
3724
|
+
const ResourcefulHttpResponseType = [
|
|
3725
|
+
"arraybuffer",
|
|
3726
|
+
"json",
|
|
3727
|
+
"text",
|
|
3728
|
+
"stream",
|
|
3729
|
+
"blob"
|
|
3730
|
+
];
|
|
3724
3731
|
const createResourcefulHttpMiddlewareProxy = (middleware) => {
|
|
3725
3732
|
const proxy = {
|
|
3726
3733
|
add(...args) {
|
|
@@ -3779,17 +3786,23 @@ class ResourcefulFetchHttpService {
|
|
|
3779
3786
|
}).run(async (fn, next) => fn(response, next));
|
|
3780
3787
|
return response;
|
|
3781
3788
|
}
|
|
3782
|
-
async #respond(response) {
|
|
3789
|
+
async #respond(response, responseType) {
|
|
3783
3790
|
let data;
|
|
3784
3791
|
switch (true) {
|
|
3785
|
-
case response.headers.get("content-type")?.includes("application/json"):
|
|
3792
|
+
case (response.headers.get("content-type")?.includes("application/json") || responseType === "json"):
|
|
3786
3793
|
data = await response.json();
|
|
3787
3794
|
break;
|
|
3788
|
-
case response.headers.get("content-type")?.includes("text/plain"):
|
|
3795
|
+
case (response.headers.get("content-type")?.includes("text/plain") || responseType === "text"):
|
|
3789
3796
|
data = await response.text();
|
|
3790
3797
|
break;
|
|
3791
3798
|
case response.headers.get("content-type")?.includes("application/octet-stream"):
|
|
3792
|
-
|
|
3799
|
+
{
|
|
3800
|
+
if (typeof Blob !== "undefined" && (responseType === "blob" || responseType === void 0)) {
|
|
3801
|
+
data = await response.blob();
|
|
3802
|
+
} else {
|
|
3803
|
+
data = await response.arrayBuffer();
|
|
3804
|
+
}
|
|
3805
|
+
}
|
|
3793
3806
|
break;
|
|
3794
3807
|
case response.headers.get("content-type")?.includes("application/x-www-form-urlencoded"):
|
|
3795
3808
|
data = await response.formData();
|
|
@@ -3843,11 +3856,11 @@ class ResourcefulFetchHttpService {
|
|
|
3843
3856
|
};
|
|
3844
3857
|
try {
|
|
3845
3858
|
const response = await this.#instance(options.url, opts);
|
|
3846
|
-
return await this.#respond(response);
|
|
3859
|
+
return await this.#respond(response, options.response);
|
|
3847
3860
|
} catch (error) {
|
|
3848
3861
|
if (error instanceof Error && "response" in error) {
|
|
3849
3862
|
const res = error.response;
|
|
3850
|
-
return await this.#respond(res);
|
|
3863
|
+
return await this.#respond(res, options.response);
|
|
3851
3864
|
} else {
|
|
3852
3865
|
return {
|
|
3853
3866
|
data: error,
|
|
@@ -3965,17 +3978,18 @@ class ResourcefulAxiosHttpService {
|
|
|
3965
3978
|
}
|
|
3966
3979
|
},
|
|
3967
3980
|
onDownloadProgress: (e) => {
|
|
3968
|
-
if (options.
|
|
3981
|
+
if (options.onDownloadProgress) {
|
|
3969
3982
|
const progress = {
|
|
3970
3983
|
percent: e.loaded / (e.total || 1) * 100,
|
|
3971
3984
|
transferredBytes: e.loaded,
|
|
3972
3985
|
totalBytes: e.total || 0
|
|
3973
3986
|
};
|
|
3974
|
-
options.
|
|
3987
|
+
options.onDownloadProgress(progress);
|
|
3975
3988
|
}
|
|
3976
3989
|
},
|
|
3977
3990
|
validateStatus: () => true,
|
|
3978
|
-
signal: options.signal
|
|
3991
|
+
signal: options.signal,
|
|
3992
|
+
responseType: options.response || "json"
|
|
3979
3993
|
};
|
|
3980
3994
|
try {
|
|
3981
3995
|
const response = await this.#instance.request(opts);
|
|
@@ -4026,9 +4040,10 @@ export {
|
|
|
4026
4040
|
ResourcefulAxiosHttpService as R,
|
|
4027
4041
|
ResourcefulFetchHttpService as a,
|
|
4028
4042
|
ResourcefulHttpMethod as b,
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4043
|
+
ResourcefulHttpResponseType as c,
|
|
4044
|
+
createError as d,
|
|
4045
|
+
browserService as e,
|
|
4046
|
+
defaultResourcefulHttpService as f,
|
|
4032
4047
|
printfExports as p
|
|
4033
4048
|
};
|
|
4034
|
-
//# sourceMappingURL=http-
|
|
4049
|
+
//# sourceMappingURL=http-DF04z-RO.mjs.map
|