bt-core-app 2.1.36 → 2.2.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.
- package/dist/_virtual/_commonjs-dynamic-modules.mjs +6 -0
- package/dist/_virtual/_commonjsHelpers.mjs +30 -0
- package/dist/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/dist/_virtual/index.mjs +4 -0
- package/dist/_virtual/localforage.mjs +4 -0
- package/dist/_virtual/luxon.mjs +6 -0
- package/dist/_virtual/matcher.mjs +4 -0
- package/dist/_virtual/parser.mjs +4 -0
- package/dist/bt-core/core/node_modules/@datasert/cronjs-matcher/dist/index.mjs +12 -0
- package/dist/bt-core/core/node_modules/@datasert/cronjs-matcher/dist/matcher.mjs +220 -0
- package/dist/bt-core/core/node_modules/@datasert/cronjs-parser/dist/parser.mjs +186 -0
- package/dist/bt-core/core/node_modules/@mdi/js/mdi.mjs +70 -0
- package/dist/bt-core/core/node_modules/@vuepic/vue-datepicker/dist/main.css.mjs +1 -0
- package/dist/bt-core/core/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.mjs +5210 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/addLeadingZeros.mjs +7 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/defaultOptions.mjs +7 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/format/formatters.mjs +517 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/format/lightFormatters.mjs +59 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/format/longFormatters.mjs +52 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs +18 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/normalizeDates.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/normalizeInterval.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/protectedTokens.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/add.mjs +20 -0
- package/dist/bt-core/core/node_modules/date-fns/addDays.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/addHours.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/addMilliseconds.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/addMonths.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/addQuarters.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/addYears.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/compareAsc.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/constants.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/constructFrom.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/differenceInCalendarDays.mjs +16 -0
- package/dist/bt-core/core/node_modules/date-fns/differenceInCalendarYears.mjs +13 -0
- package/dist/bt-core/core/node_modules/date-fns/differenceInYears.mjs +17 -0
- package/dist/bt-core/core/node_modules/date-fns/eachDayOfInterval.mjs +20 -0
- package/dist/bt-core/core/node_modules/date-fns/eachQuarterOfInterval.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/endOfQuarter.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/endOfWeek.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/endOfYear.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/format.mjs +60 -0
- package/dist/bt-core/core/node_modules/date-fns/getDay.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getDayOfYear.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/getDaysInMonth.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/getDefaultOptions.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getHours.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getISODay.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/getISOWeek.mjs +12 -0
- package/dist/bt-core/core/node_modules/date-fns/getISOWeekYear.mjs +15 -0
- package/dist/bt-core/core/node_modules/date-fns/getMinutes.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getMonth.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getQuarter.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/getSeconds.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getWeek.mjs +12 -0
- package/dist/bt-core/core/node_modules/date-fns/getWeekYear.mjs +17 -0
- package/dist/bt-core/core/node_modules/date-fns/getYear.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isAfter.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isBefore.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isDate.mjs +7 -0
- package/dist/bt-core/core/node_modules/date-fns/isEqual.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isSameQuarter.mjs +14 -0
- package/dist/bt-core/core/node_modules/date-fns/isValid.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs +18 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildMatchFn.mjs +31 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs +17 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs +70 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatLong.mjs +33 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/localize.mjs +155 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/match.mjs +110 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/Parser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/Setter.mjs +41 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/constants.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DateParser.mjs +61 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs +51 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayParser.mjs +45 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/EraParser.mjs +30 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs +33 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs +33 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs +99 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs +48 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs +48 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs +40 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs +74 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs +48 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs +69 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs +71 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs +70 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs +74 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs +71 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs +70 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/YearParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers.mjs +67 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/utils.mjs +103 -0
- package/dist/bt-core/core/node_modules/date-fns/parse.mjs +90 -0
- package/dist/bt-core/core/node_modules/date-fns/set.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/setDay.mjs +12 -0
- package/dist/bt-core/core/node_modules/date-fns/setHours.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setISODay.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/setISOWeek.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/setMilliseconds.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setMinutes.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setMonth.mjs +13 -0
- package/dist/bt-core/core/node_modules/date-fns/setSeconds.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setWeek.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/setYear.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfDay.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfISOWeek.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfISOWeekYear.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfMonth.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfQuarter.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfWeek.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfWeekYear.mjs +13 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfYear.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/sub.mjs +19 -0
- package/dist/bt-core/core/node_modules/date-fns/subDays.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/subMonths.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/subYears.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/toDate.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/transpose.mjs +18 -0
- package/dist/bt-core/core/node_modules/localforage/dist/localforage.mjs +1454 -0
- package/dist/bt-core/core/node_modules/luxon/src/datetime.mjs +1855 -0
- package/dist/bt-core/core/node_modules/luxon/src/duration.mjs +753 -0
- package/dist/bt-core/core/node_modules/luxon/src/errors.mjs +40 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/conversions.mjs +92 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/diff.mjs +36 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/digits.mjs +77 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/english.mjs +138 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/formats.mjs +150 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/formatter.mjs +258 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/invalid.mjs +11 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/locale.mjs +294 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/regexParser.mjs +202 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/tokenParser.mjs +329 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/util.mjs +220 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/zoneUtil.mjs +20 -0
- package/dist/bt-core/core/node_modules/luxon/src/info.mjs +180 -0
- package/dist/bt-core/core/node_modules/luxon/src/interval.mjs +481 -0
- package/dist/bt-core/core/node_modules/luxon/src/luxon.mjs +24 -0
- package/dist/bt-core/core/node_modules/luxon/src/settings.mjs +150 -0
- package/dist/bt-core/core/node_modules/luxon/src/zone.mjs +88 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/IANAZone.mjs +183 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/fixedOffsetZone.mjs +125 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/invalidZone.mjs +41 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/systemZone.mjs +47 -0
- package/dist/bt-core/core/node_modules/merge-images/dist/index.es2015.mjs +47 -0
- package/dist/bt-core/core/node_modules/signature_pad/dist/signature_pad.mjs +248 -0
- package/dist/bt-core/core/node_modules/thenby/thenBy.module.mjs +38 -0
- package/dist/bt-core/core/node_modules/vue-picture-cropper/lib/index.mjs +1643 -0
- package/dist/bt-core/core/node_modules/vue-signature-pad/dist/vue-signature-pad.esm.mjs +173 -0
- package/dist/bt-core/core/node_modules/vue-use-spring/dist/index.mjs +204 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/defaults.mjs +61 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/icons.mjs +82 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/iconsets/mdi-svg.mjs +74 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/colors.mjs +322 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/console.mjs +7 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/defineComponent.mjs +34 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/getCurrentInstance.mjs +10 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/helpers.mjs +44 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/injectSelf.mjs +12 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/propsFactory.mjs +14 -0
- package/dist/components/BT-Assistant-Menu.vue.d.ts +19 -0
- package/dist/components/BT-Assistant-Menu.vue.mjs +464 -0
- package/dist/components/BT-Assistant-Menu.vue2.mjs +4 -0
- package/dist/components/BT-Avatar.vue.d.ts +16 -0
- package/dist/components/BT-Avatar.vue.mjs +41 -0
- package/dist/components/BT-Avatar.vue2.mjs +4 -0
- package/dist/components/BT-Background-Task.vue.d.ts +61 -0
- package/dist/components/BT-Background-Task.vue.mjs +89 -0
- package/dist/components/BT-Background-Task.vue2.mjs +4 -0
- package/dist/components/BT-Blade-Item.vue.d.ts +578 -0
- package/dist/components/BT-Blade-Item.vue.mjs +441 -0
- package/dist/components/BT-Blade-Item.vue2.mjs +4 -0
- package/dist/components/BT-Blade-Items.vue.d.ts +2358 -0
- package/dist/components/BT-Blade-Items.vue.mjs +7 -0
- package/dist/components/BT-Blade-Items.vue2.mjs +943 -0
- package/dist/components/BT-Blade-Items.vue3.mjs +1 -0
- package/dist/components/BT-Blade-Steps.vue.d.ts +1740 -0
- package/dist/components/BT-Blade-Steps.vue.mjs +7 -0
- package/dist/components/BT-Blade-Steps.vue2.mjs +1305 -0
- package/dist/components/BT-Blade-Steps.vue3.mjs +1 -0
- package/dist/components/BT-Blade.vue.d.ts +109 -0
- package/dist/components/BT-Blade.vue.mjs +268 -0
- package/dist/components/BT-Blade.vue2.mjs +4 -0
- package/dist/components/BT-Btn.vue.d.ts +47 -0
- package/dist/components/BT-Btn.vue.mjs +43 -0
- package/dist/components/BT-Btn.vue2.mjs +4 -0
- package/dist/components/BT-Camera-Overlay.vue.d.ts +57 -0
- package/dist/components/BT-Camera-Overlay.vue.mjs +173 -0
- package/dist/components/BT-Camera-Overlay.vue2.mjs +4 -0
- package/dist/components/BT-Col.vue.d.ts +49 -0
- package/dist/components/BT-Col.vue.mjs +33 -0
- package/dist/components/BT-Col.vue2.mjs +4 -0
- package/dist/components/BT-Color-Picker-Menu.vue.d.ts +23 -0
- package/dist/components/BT-Color-Picker-Menu.vue.mjs +63 -0
- package/dist/components/BT-Color-Picker-Menu.vue2.mjs +4 -0
- package/dist/components/BT-Cosmetics-Menu.vue.d.ts +14 -0
- package/dist/components/BT-Cosmetics-Menu.vue.mjs +211 -0
- package/dist/components/BT-Cosmetics-Menu.vue2.mjs +4 -0
- package/dist/components/BT-Cron-Span.vue.d.ts +21 -0
- package/dist/components/BT-Cron-Span.vue.mjs +66 -0
- package/dist/components/BT-Cron-Span.vue2.mjs +4 -0
- package/dist/components/BT-Cron.vue.d.ts +37 -0
- package/dist/components/BT-Cron.vue.mjs +538 -0
- package/dist/components/BT-Cron.vue2.mjs +4 -0
- package/dist/components/BT-Date-Select.vue.d.ts +46 -0
- package/dist/components/BT-Date-Select.vue.mjs +71 -0
- package/dist/components/BT-Date-Select.vue2.mjs +4 -0
- package/dist/components/BT-Date.vue.d.ts +53 -0
- package/dist/components/BT-Date.vue.mjs +55 -0
- package/dist/components/BT-Date.vue2.mjs +4 -0
- package/dist/components/BT-Demo-Profile-Select.vue.d.ts +17 -0
- package/dist/components/BT-Demo-Profile-Select.vue.mjs +52 -0
- package/dist/components/BT-Demo-Profile-Select.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Confirm.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Confirm.vue.mjs +63 -0
- package/dist/components/BT-Dialog-Confirm.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Date.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Date.vue.mjs +79 -0
- package/dist/components/BT-Dialog-Date.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Number.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Number.vue.mjs +178 -0
- package/dist/components/BT-Dialog-Number.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Select.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Select.vue.mjs +235 -0
- package/dist/components/BT-Dialog-Select.vue2.mjs +4 -0
- package/dist/components/BT-Divider.vue.d.ts +24 -0
- package/dist/components/BT-Divider.vue.mjs +31 -0
- package/dist/components/BT-Divider.vue2.mjs +4 -0
- package/dist/components/BT-Drag-Counter.vue.d.ts +114 -0
- package/dist/components/BT-Drag-Counter.vue.mjs +7 -0
- package/dist/components/BT-Drag-Counter.vue2.mjs +156 -0
- package/dist/components/BT-Drag-Counter.vue3.mjs +1 -0
- package/dist/components/BT-Entity.vue.d.ts +82 -0
- package/dist/components/BT-Entity.vue.mjs +172 -0
- package/dist/components/BT-Entity.vue2.mjs +4 -0
- package/dist/components/BT-Error.vue.d.ts +15 -0
- package/dist/components/BT-Error.vue.mjs +35 -0
- package/dist/components/BT-Error.vue2.mjs +4 -0
- package/dist/components/BT-Field-Checkbox.vue.d.ts +57 -0
- package/dist/components/BT-Field-Checkbox.vue.mjs +61 -0
- package/dist/components/BT-Field-Checkbox.vue2.mjs +4 -0
- package/dist/components/BT-Field-Date.vue.d.ts +69 -0
- package/dist/components/BT-Field-Date.vue.mjs +120 -0
- package/dist/components/BT-Field-Date.vue2.mjs +4 -0
- package/dist/components/BT-Field-Entity.vue.d.ts +48 -0
- package/dist/components/BT-Field-Entity.vue.mjs +55 -0
- package/dist/components/BT-Field-Entity.vue2.mjs +4 -0
- package/dist/components/BT-Field-Select-Simple.vue.d.ts +55 -0
- package/dist/components/BT-Field-Select-Simple.vue.mjs +52 -0
- package/dist/components/BT-Field-Select-Simple.vue2.mjs +4 -0
- package/dist/components/BT-Field-Select.vue.d.ts +70 -0
- package/dist/components/BT-Field-Select.vue.mjs +60 -0
- package/dist/components/BT-Field-Select.vue2.mjs +4 -0
- package/dist/components/BT-Field-String.vue.d.ts +57 -0
- package/dist/components/BT-Field-String.vue.mjs +87 -0
- package/dist/components/BT-Field-String.vue2.mjs +4 -0
- package/dist/components/BT-Field-Switch.vue.d.ts +51 -0
- package/dist/components/BT-Field-Switch.vue.mjs +64 -0
- package/dist/components/BT-Field-Switch.vue2.mjs +4 -0
- package/dist/components/BT-Field-Tags.vue.d.ts +53 -0
- package/dist/components/BT-Field-Tags.vue.mjs +80 -0
- package/dist/components/BT-Field-Tags.vue2.mjs +4 -0
- package/dist/components/BT-Field-Textarea.vue.d.ts +53 -0
- package/dist/components/BT-Field-Textarea.vue.mjs +66 -0
- package/dist/components/BT-Field-Textarea.vue2.mjs +4 -0
- package/dist/components/BT-Field-Trigger.vue.d.ts +113 -0
- package/dist/components/BT-Field-Trigger.vue.mjs +368 -0
- package/dist/components/BT-Field-Trigger.vue2.mjs +4 -0
- package/dist/components/BT-Field.vue.d.ts +49 -0
- package/dist/components/BT-Field.vue.mjs +59 -0
- package/dist/components/BT-Field.vue2.mjs +4 -0
- package/dist/components/BT-Form-Builder.vue.d.ts +74 -0
- package/dist/components/BT-Form-Builder.vue.mjs +762 -0
- package/dist/components/BT-Form-Builder.vue2.mjs +4 -0
- package/dist/components/BT-Form-Field.vue.d.ts +41 -0
- package/dist/components/BT-Form-Field.vue.mjs +186 -0
- package/dist/components/BT-Form-Field.vue2.mjs +4 -0
- package/dist/components/BT-Form.vue.d.ts +95 -0
- package/dist/components/BT-Form.vue.mjs +635 -0
- package/dist/components/BT-Form.vue2.mjs +4 -0
- package/dist/components/BT-Header-Option.vue.d.ts +18 -0
- package/dist/components/BT-Header-Option.vue.mjs +62 -0
- package/dist/components/BT-Header-Option.vue2.mjs +4 -0
- package/dist/components/BT-Image-Select.vue.d.ts +71 -0
- package/dist/components/BT-Image-Select.vue.mjs +219 -0
- package/dist/components/BT-Image-Select.vue2.mjs +4 -0
- package/dist/components/BT-Json.vue.d.ts +6 -0
- package/dist/components/BT-Json.vue.mjs +38 -0
- package/dist/components/BT-Json.vue2.mjs +1 -0
- package/dist/components/BT-Json.vue3.mjs +5 -0
- package/dist/components/BT-Loader.vue.d.ts +6 -0
- package/dist/components/BT-Loader.vue.mjs +37 -0
- package/dist/components/BT-Loader.vue2.mjs +4 -0
- package/dist/components/BT-Nav-Sidebar.vue.d.ts +25 -0
- package/dist/components/BT-Nav-Sidebar.vue.mjs +138 -0
- package/dist/components/BT-Nav-Sidebar.vue2.mjs +4 -0
- package/dist/components/BT-Number.vue.d.ts +23 -0
- package/dist/components/BT-Number.vue.mjs +7 -0
- package/dist/components/BT-Number.vue2.mjs +43 -0
- package/dist/components/BT-Number.vue3.mjs +1 -0
- package/dist/components/BT-Numpad.vue.d.ts +68 -0
- package/dist/components/BT-Numpad.vue.mjs +191 -0
- package/dist/components/BT-Numpad.vue2.mjs +4 -0
- package/dist/components/BT-Select-Inline.vue.d.ts +121 -0
- package/dist/components/BT-Select-Inline.vue.mjs +74 -0
- package/dist/components/BT-Select-Inline.vue2.mjs +24 -0
- package/dist/components/BT-Select-Inline.vue3.mjs +1 -0
- package/dist/components/BT-Select-List-Box.vue.d.ts +137 -0
- package/dist/components/BT-Select-List-Box.vue.mjs +414 -0
- package/dist/components/BT-Select-List-Box.vue2.mjs +4 -0
- package/dist/components/BT-Select-Simple.vue.d.ts +58 -0
- package/dist/components/BT-Select-Simple.vue.mjs +126 -0
- package/dist/components/BT-Select-Simple.vue2.mjs +4 -0
- package/dist/components/BT-Select.vue.d.ts +73 -0
- package/dist/components/BT-Select.vue.mjs +138 -0
- package/dist/components/BT-Select.vue2.mjs +4 -0
- package/dist/components/BT-Signature-Overlay.vue.d.ts +65 -0
- package/dist/components/BT-Signature-Overlay.vue.mjs +146 -0
- package/dist/components/BT-Signature-Overlay.vue2.mjs +4 -0
- package/dist/components/BT-Signature.vue.d.ts +70 -0
- package/dist/components/BT-Signature.vue.mjs +155 -0
- package/dist/components/BT-Signature.vue2.mjs +4 -0
- package/dist/components/BT-Slider.vue.d.ts +37 -0
- package/dist/components/BT-Slider.vue.mjs +126 -0
- package/dist/components/BT-Slider.vue2.mjs +4 -0
- package/dist/components/BT-Span.vue.d.ts +19 -0
- package/dist/components/BT-Span.vue.mjs +23 -0
- package/dist/components/BT-Span.vue2.mjs +4 -0
- package/dist/components/BT-Square-Check.vue.d.ts +104 -0
- package/dist/components/BT-Square-Check.vue.mjs +98 -0
- package/dist/components/BT-Square-Check.vue2.mjs +4 -0
- package/dist/components/BT-Status-Item.vue.d.ts +45 -0
- package/dist/components/BT-Status-Item.vue.mjs +51 -0
- package/dist/components/BT-Status-Item.vue2.mjs +4 -0
- package/dist/components/BT-Tags.vue.d.ts +19 -0
- package/dist/components/BT-Tags.vue.mjs +32 -0
- package/dist/components/BT-Tags.vue2.mjs +4 -0
- package/dist/components/BT-Tour.vue.d.ts +43 -0
- package/dist/components/BT-Tour.vue.mjs +78 -0
- package/dist/components/BT-Tour.vue2.mjs +4 -0
- package/dist/components.mjs +36 -0
- package/dist/composables/actions-local.d.ts +14 -0
- package/dist/composables/actions-local.mjs +26 -0
- package/dist/composables/actions-tracker.d.ts +36 -0
- package/dist/composables/actions-tracker.mjs +88 -0
- package/dist/composables/actions.d.ts +116 -0
- package/dist/composables/actions.mjs +272 -0
- package/dist/composables/api.d.ts +100 -0
- package/dist/composables/api.mjs +329 -0
- package/dist/composables/assistant.d.ts +38 -0
- package/dist/composables/assistant.mjs +70 -0
- package/dist/composables/auth.d.ts +94 -0
- package/dist/composables/auth.mjs +257 -0
- package/dist/composables/background-tasks.d.ts +31 -0
- package/dist/composables/background-tasks.mjs +79 -0
- package/dist/composables/blade-old.d.ts +1 -0
- package/dist/composables/blade.d.ts +91 -0
- package/dist/composables/blade.mjs +156 -0
- package/dist/composables/charts.d.ts +10 -0
- package/dist/composables/colorizer.d.ts +5 -0
- package/dist/composables/colorizer.mjs +27 -0
- package/dist/composables/component-config.d.ts +8 -0
- package/dist/composables/component-config.mjs +11 -0
- package/dist/composables/confirm.d.ts +1 -0
- package/dist/composables/confirm.mjs +11 -0
- package/dist/composables/cosmetics.d.ts +44 -0
- package/dist/composables/cosmetics.mjs +125 -0
- package/dist/composables/cron-adjustments.d.ts +63 -0
- package/dist/composables/cron-adjustments.mjs +106 -0
- package/dist/composables/cron.d.ts +72 -0
- package/dist/composables/cron.mjs +326 -0
- package/dist/composables/csv.d.ts +44 -0
- package/dist/composables/csv.mjs +163 -0
- package/dist/composables/dates.d.ts +22 -0
- package/dist/composables/dates.mjs +61 -0
- package/dist/composables/demo.d.ts +68 -0
- package/dist/composables/demo.mjs +173 -0
- package/dist/composables/dialog-items.d.ts +117 -0
- package/dist/composables/dialog-items.mjs +72 -0
- package/dist/composables/document-meta.d.ts +11 -0
- package/dist/composables/document-meta.mjs +20 -0
- package/dist/composables/draggable.d.ts +56 -0
- package/dist/composables/draggable.mjs +76 -0
- package/dist/composables/feedback.d.ts +24 -0
- package/dist/composables/feedback.mjs +32 -0
- package/dist/composables/filters.d.ts +27 -0
- package/dist/composables/filters.mjs +218 -0
- package/dist/composables/forage.d.ts +89 -0
- package/dist/composables/forage.mjs +37 -0
- package/dist/composables/forms.d.ts +104 -0
- package/dist/composables/forms.mjs +256 -0
- package/dist/composables/geo.d.ts +24 -0
- package/dist/composables/geo.mjs +95 -0
- package/dist/composables/graph-pro.d.ts +98 -0
- package/dist/composables/graph-pro.mjs +205 -0
- package/dist/composables/graphing.d.ts +1 -0
- package/dist/composables/heights.d.ts +24 -0
- package/dist/composables/heights.mjs +41 -0
- package/dist/composables/helpers.d.ts +114 -0
- package/dist/composables/helpers.mjs +512 -0
- package/dist/composables/icons.d.ts +3 -0
- package/dist/composables/icons.mjs +84 -0
- package/dist/composables/id.d.ts +8 -0
- package/dist/composables/id.mjs +32 -0
- package/dist/composables/item.d.ts +132 -0
- package/dist/composables/item.mjs +263 -0
- package/dist/composables/iterating.d.ts +1 -0
- package/dist/composables/list.d.ts +345 -0
- package/dist/composables/list.mjs +460 -0
- package/dist/composables/lists.d.ts +10 -0
- package/dist/composables/lists.mjs +31 -0
- package/dist/composables/menu.d.ts +35 -0
- package/dist/composables/menu.mjs +63 -0
- package/dist/composables/navigation.d.ts +123 -0
- package/dist/composables/navigation.mjs +157 -0
- package/dist/composables/nested.d.ts +3 -0
- package/dist/composables/nested.mjs +20 -0
- package/dist/composables/old-dialogs.d.ts +1 -0
- package/dist/composables/presets.d.ts +8 -0
- package/dist/composables/presets.mjs +16 -0
- package/dist/composables/pwa-old.d.ts +15 -0
- package/dist/composables/pwa.d.ts +26 -0
- package/dist/composables/pwa.mjs +80 -0
- package/dist/composables/resizable.d.ts +34 -0
- package/dist/composables/resizable.mjs +135 -0
- package/dist/composables/routing-old.d.ts +1 -0
- package/dist/composables/routing.d.ts +16 -0
- package/dist/composables/routing.mjs +112 -0
- package/dist/composables/rules.d.ts +13 -0
- package/dist/composables/rules.mjs +22 -0
- package/dist/composables/select.d.ts +78 -0
- package/dist/composables/select.mjs +129 -0
- package/dist/composables/settings.d.ts +6 -0
- package/dist/composables/settings.mjs +21 -0
- package/dist/composables/setup.d.ts +1 -0
- package/dist/composables/steps-old.d.ts +1 -0
- package/dist/composables/steps.d.ts +53 -0
- package/dist/composables/steps.mjs +39 -0
- package/dist/composables/stores.d.ts +258 -0
- package/dist/composables/stores.mjs +1257 -0
- package/dist/composables/sync.d.ts +33 -0
- package/dist/composables/track.d.ts +13 -0
- package/dist/composables/track.mjs +30 -0
- package/dist/composables/urls.d.ts +35 -0
- package/dist/composables/urls.mjs +66 -0
- package/dist/composables/vuetify.d.ts +85 -0
- package/dist/composables.mjs +237 -0
- package/dist/core.d.ts +48 -0
- package/dist/core.mjs +6 -0
- package/dist/core2.mjs +118 -0
- package/dist/index-components.d.ts +19 -0
- package/dist/index-composables.d.ts +75 -0
- package/dist/index-core.d.ts +3 -0
- package/dist/index.d.ts +96 -3036
- package/dist/index.mjs +275 -0
- package/dist/main.d.ts +1 -0
- package/dist/node_modules/bt-core-app/dist/bt-core-app.mjs +30372 -0
- package/dist/style.css +1 -5
- package/dist/types.d.ts +18 -0
- package/dist/types.mjs +7 -0
- package/package.json +4 -1
- package/dist/bt-core-app.js +0 -81355
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { default as r } from "./components/BT-Assistant-Menu.vue.mjs";
|
|
2
|
+
import { default as t } from "./components/BT-Blade-Steps.vue.mjs";
|
|
3
|
+
import { default as l } from "./components/BT-Cron-Span.vue.mjs";
|
|
4
|
+
import { default as u } from "./components/BT-Date-Select.vue.mjs";
|
|
5
|
+
import { default as p } from "./components/BT-Dialog-Confirm.vue.mjs";
|
|
6
|
+
import { default as B } from "./components/BT-Dialog-Select.vue.mjs";
|
|
7
|
+
import { default as x } from "./components/BT-Dialog-Number.vue.mjs";
|
|
8
|
+
import { default as S } from "./components/BT-Dialog-Date.vue.mjs";
|
|
9
|
+
import { default as D } from "./components/BT-Demo-Profile-Select.vue.mjs";
|
|
10
|
+
import { default as F } from "./components/BT-Color-Picker-Menu.vue.mjs";
|
|
11
|
+
import { default as C } from "./components/BT-Form.vue.mjs";
|
|
12
|
+
import { default as M } from "./components/BT-Form-Builder.vue.mjs";
|
|
13
|
+
import { default as b } from "./components/BT-Form-Field.vue.mjs";
|
|
14
|
+
import { default as q } from "./components/BT-Square-Check.vue.mjs";
|
|
15
|
+
import { default as N } from "./components/BT-Select-Simple.vue.mjs";
|
|
16
|
+
import { default as v } from "./components/BT-Field-Select-Simple.vue.mjs";
|
|
17
|
+
import { default as y } from "./components/BT-Tour.vue.mjs";
|
|
18
|
+
export {
|
|
19
|
+
r as BTAssistantMenu,
|
|
20
|
+
t as BTBladeSteps,
|
|
21
|
+
F as BTColorPickerMenu,
|
|
22
|
+
l as BTCronSpan,
|
|
23
|
+
u as BTDateSelect,
|
|
24
|
+
D as BTDemoProfileSelect,
|
|
25
|
+
p as BTDialogConfirm,
|
|
26
|
+
S as BTDialogDate,
|
|
27
|
+
x as BTDialogNumber,
|
|
28
|
+
B as BTDialogSelect,
|
|
29
|
+
v as BTFieldSelectSimple,
|
|
30
|
+
C as BTForm,
|
|
31
|
+
M as BTFormBuilder,
|
|
32
|
+
b as BTFormField,
|
|
33
|
+
N as BTSelectSimple,
|
|
34
|
+
q as BTSquareCheck,
|
|
35
|
+
y as BTTour
|
|
36
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StorePathOptions } from './stores.ts';
|
|
2
|
+
import { DoActionOptions } from './actions-tracker.ts';
|
|
3
|
+
|
|
4
|
+
export interface DeleteOptions extends StorePathOptions, DoActionOptions {
|
|
5
|
+
id?: string;
|
|
6
|
+
nav: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function useLocalActions(): {
|
|
9
|
+
actionErrorMsg: import('vue').ShallowRef<string | undefined>;
|
|
10
|
+
actionLoadingMsg: import('vue').ShallowRef<string | undefined>;
|
|
11
|
+
clearErrors: () => void;
|
|
12
|
+
deleteItem: (doOptions: DeleteOptions) => Promise<unknown>;
|
|
13
|
+
isLoading: import('vue').ComputedRef<boolean>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useActionsTracker as u } from "./actions-tracker.mjs";
|
|
2
|
+
import { useStoreDefinition as s } from "./stores.mjs";
|
|
3
|
+
function m() {
|
|
4
|
+
const { actionErrorMsg: e, actionLoadingMsg: r, clearErrors: n, isLoading: c, doAction: a } = u(
|
|
5
|
+
{
|
|
6
|
+
stringifyError: (t) => typeof t == "object" ? t.message : t == null ? void 0 : t.toString()
|
|
7
|
+
}
|
|
8
|
+
);
|
|
9
|
+
function o(t) {
|
|
10
|
+
t.useLocalCache ?? (t.useLocalCache = !0);
|
|
11
|
+
const i = s({ nav: t.nav });
|
|
12
|
+
return a(async () => {
|
|
13
|
+
await i().deleteItem(t);
|
|
14
|
+
}, t);
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
actionErrorMsg: e,
|
|
18
|
+
actionLoadingMsg: r,
|
|
19
|
+
clearErrors: n,
|
|
20
|
+
deleteItem: o,
|
|
21
|
+
isLoading: c
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
m as useLocalActions
|
|
26
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface DoActionOptions {
|
|
4
|
+
completionMsg?: string;
|
|
5
|
+
confirmationMsg?: string;
|
|
6
|
+
errorMsg?: string;
|
|
7
|
+
loadingMsg?: string;
|
|
8
|
+
onFinished?: () => void;
|
|
9
|
+
onError?: (err: any) => any;
|
|
10
|
+
requireConfirmation?: boolean;
|
|
11
|
+
stringifyError?: (err: any) => string;
|
|
12
|
+
throwError?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface IterateThroughOptions<T> {
|
|
15
|
+
eachList?: (list: T[]) => Promise<any>;
|
|
16
|
+
eachItem?: (item: T) => Promise<any>;
|
|
17
|
+
errorMsg?: string;
|
|
18
|
+
getLoadingMsg?: (ind: number, total: number) => string;
|
|
19
|
+
iterationCount?: number;
|
|
20
|
+
listToIterate: T[];
|
|
21
|
+
onError?: (err: any) => any;
|
|
22
|
+
onFinished?: () => void;
|
|
23
|
+
throwError?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function useActionsTracker(useOptions?: DoActionOptions): {
|
|
26
|
+
actionErrorMsg: ShallowRef<string | undefined>;
|
|
27
|
+
actionLoadingMsg: ShallowRef<string | undefined>;
|
|
28
|
+
actionCompleteMsg: ShallowRef<string | undefined>;
|
|
29
|
+
clearErrors: () => void;
|
|
30
|
+
doAction: <TReturn>(action: any, options?: DoActionOptions) => Promise<TReturn | undefined>;
|
|
31
|
+
isLoading: import('vue').ComputedRef<boolean>;
|
|
32
|
+
iterateThrough: <T>(opt: IterateThroughOptions<T>) => Promise<true | undefined>;
|
|
33
|
+
logError: (err?: string | Error) => void;
|
|
34
|
+
persistLoading: (startingMsg: string) => void;
|
|
35
|
+
releaseLoading: () => void;
|
|
36
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ref as u, shallowRef as M, computed as D } from "vue";
|
|
2
|
+
import { useId as P } from "./id.mjs";
|
|
3
|
+
function b(n) {
|
|
4
|
+
const g = u([]), h = M(), o = M(), y = M(), I = D(() => h.value != null || m.value != null), m = M();
|
|
5
|
+
function d(l) {
|
|
6
|
+
if (l != null) {
|
|
7
|
+
var a = g.value.findIndex((r) => r.id == l);
|
|
8
|
+
a >= 0 && g.value.splice(a, 1);
|
|
9
|
+
}
|
|
10
|
+
h.value = g.value.length > 0 ? g.value[0].msg : m.value;
|
|
11
|
+
}
|
|
12
|
+
function v(l, a) {
|
|
13
|
+
let r;
|
|
14
|
+
return a != null && (r = g.value.find((f) => f.id == a)), r == null && (r = { id: P(), msg: l ?? "Loading" }, g.value.unshift(r)), l != null && (r.msg = l), h.value = g.value[0].msg, r.id;
|
|
15
|
+
}
|
|
16
|
+
function C(l) {
|
|
17
|
+
return (n == null ? void 0 : n.stringifyError) != null ? n == null ? void 0 : n.stringifyError(l) : l == null ? void 0 : l.toString();
|
|
18
|
+
}
|
|
19
|
+
function E(l) {
|
|
20
|
+
l != null && (o.value = C(l));
|
|
21
|
+
}
|
|
22
|
+
function q() {
|
|
23
|
+
o.value = void 0;
|
|
24
|
+
}
|
|
25
|
+
function T(l) {
|
|
26
|
+
m.value = l, d();
|
|
27
|
+
}
|
|
28
|
+
function x() {
|
|
29
|
+
m.value = void 0, d();
|
|
30
|
+
}
|
|
31
|
+
async function A(l, a) {
|
|
32
|
+
const r = { ...a };
|
|
33
|
+
r.completionMsg ?? (r.completionMsg = n == null ? void 0 : n.completionMsg), r.confirmationMsg ?? (r.confirmationMsg = n == null ? void 0 : n.confirmationMsg), r.errorMsg ?? (r.errorMsg = n == null ? void 0 : n.errorMsg), r.loadingMsg ?? (r.loadingMsg = (n == null ? void 0 : n.loadingMsg) ?? "Loading"), r.requireConfirmation ?? (r.requireConfirmation = n == null ? void 0 : n.requireConfirmation), r.onError ?? (r.onError = n == null ? void 0 : n.onError), r.onFinished ?? (r.onFinished = n == null ? void 0 : n.onFinished);
|
|
34
|
+
const f = v(r.loadingMsg);
|
|
35
|
+
let c = null;
|
|
36
|
+
try {
|
|
37
|
+
return r.requireConfirmation || r.confirmationMsg, c = await l(), r.completionMsg != null && (y.value = r.completionMsg), c;
|
|
38
|
+
} catch (i) {
|
|
39
|
+
if (r.onError != null && (i = r.onError(i)), i == null)
|
|
40
|
+
return;
|
|
41
|
+
if (r.throwError == !0)
|
|
42
|
+
throw i;
|
|
43
|
+
E(r.errorMsg ?? i ?? "error");
|
|
44
|
+
} finally {
|
|
45
|
+
r.onFinished != null && r.onFinished(), d(f);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async function $(l) {
|
|
49
|
+
let a;
|
|
50
|
+
try {
|
|
51
|
+
l.errorMsg ?? (l.errorMsg = n == null ? void 0 : n.errorMsg), l.onError ?? (l.onError = n == null ? void 0 : n.onError), l.onFinished ?? (l.onFinished = n == null ? void 0 : n.onFinished), l.throwError ?? (l.throwError = n == null ? void 0 : n.throwError);
|
|
52
|
+
let r = l.getLoadingMsg ?? ((e, k) => `${e} of ${k}`), f = l.iterationCount ?? 1;
|
|
53
|
+
l.eachItem != null && (f = 1);
|
|
54
|
+
let c = 0, i = l.listToIterate, L = i.length, F = 0, w = 0;
|
|
55
|
+
for (a = v(r(c, L)); w < L; ) {
|
|
56
|
+
w += f;
|
|
57
|
+
let e = i.slice(F, w);
|
|
58
|
+
c += e.length, v(r(c, L), a), F += e.length, l.eachItem != null ? await l.eachItem(e[0]) : l.eachList != null && await l.eachList(e);
|
|
59
|
+
}
|
|
60
|
+
return d(a), !0;
|
|
61
|
+
} catch (r) {
|
|
62
|
+
if (l.onError != null)
|
|
63
|
+
l.onError(r);
|
|
64
|
+
else {
|
|
65
|
+
if (l.throwError)
|
|
66
|
+
throw r;
|
|
67
|
+
E(l.errorMsg ?? r ?? "error");
|
|
68
|
+
}
|
|
69
|
+
} finally {
|
|
70
|
+
l.onFinished != null && l.onFinished(), a != null && d(a);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
actionErrorMsg: o,
|
|
75
|
+
actionLoadingMsg: h,
|
|
76
|
+
actionCompleteMsg: y,
|
|
77
|
+
clearErrors: q,
|
|
78
|
+
doAction: A,
|
|
79
|
+
isLoading: I,
|
|
80
|
+
iterateThrough: $,
|
|
81
|
+
logError: E,
|
|
82
|
+
persistLoading: T,
|
|
83
|
+
releaseLoading: x
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export {
|
|
87
|
+
b as useActionsTracker
|
|
88
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { BaseIDModel } from './list.ts';
|
|
2
|
+
import { BulkActionResult, SyncOptions } from './sync.ts';
|
|
3
|
+
import { ShallowRef, ComputedRef } from 'vue';
|
|
4
|
+
import { IterateThroughOptions, DoActionOptions } from '../composables/actions-tracker.ts';
|
|
5
|
+
import { BTApi } from '../composables/api.ts';
|
|
6
|
+
import { StorePathOptions, BTStoreDefinition, StoreGetReturn, StoreGetAllReturn, StoreMode, StorageMode } from './stores.ts';
|
|
7
|
+
import { BladeMode } from '../composables/blade.ts';
|
|
8
|
+
|
|
9
|
+
export type OnCanDoAsync<T> = (item: T) => Promise<string | undefined>;
|
|
10
|
+
export type OnDoAsync<T> = (item: T) => Promise<string | undefined>;
|
|
11
|
+
export type OnDoSuccessAsync<T, TReturn> = (item: T) => Promise<TReturn | undefined>;
|
|
12
|
+
export type OnDoMaybeSuccessAsync<T, TReturn> = (item?: T) => Promise<TReturn | undefined>;
|
|
13
|
+
export type OnDoActionAsync<T> = (item: T) => Promise<T | undefined>;
|
|
14
|
+
export type OnGetAsync<T> = (opt?: StorePathOptions) => Promise<StoreGetReturn<T | T[]> | undefined>;
|
|
15
|
+
export type OnGetSuccessAsync<T, TReturn> = (item: StoreGetReturn<T | T[]>, opt?: StorePathOptions) => Promise<StoreGetReturn<T | T[] | TReturn | TReturn[]> | undefined>;
|
|
16
|
+
export type OnGetAllAsync<T> = (opt?: StorePathOptions) => Promise<StoreGetAllReturn<T> | undefined>;
|
|
17
|
+
export type OnGetAllSuccessAsync<T, TReturn> = (item: StoreGetAllReturn<T>, opt?: StorePathOptions) => Promise<StoreGetAllReturn<T | TReturn> | undefined>;
|
|
18
|
+
export interface StoreAction {
|
|
19
|
+
/**particularly what store syle to use */
|
|
20
|
+
storeMode?: StoreMode;
|
|
21
|
+
/**whether to store data locally or only for the duration of the session */
|
|
22
|
+
storageMode?: StorageMode;
|
|
23
|
+
store?: BTStoreDefinition;
|
|
24
|
+
}
|
|
25
|
+
export interface GetOptions<T, TReturn> extends StoreAction, StorePathOptions, DoActionOptions {
|
|
26
|
+
/**returns an error msg if failed */
|
|
27
|
+
onGetAsync?: OnGetAsync<T>;
|
|
28
|
+
/**called after get occurs successfully */
|
|
29
|
+
onGetSuccessAsync?: OnGetSuccessAsync<T, TReturn>;
|
|
30
|
+
}
|
|
31
|
+
export interface GetAllOptions<T, TReturn> extends StoreAction, StorePathOptions, DoActionOptions {
|
|
32
|
+
/**returns an error msg if failed */
|
|
33
|
+
onGetAsync?: OnGetAllAsync<T>;
|
|
34
|
+
/**called after get occurs successfully */
|
|
35
|
+
onGetSuccessAsync?: OnGetAllSuccessAsync<T, TReturn>;
|
|
36
|
+
}
|
|
37
|
+
export interface DeleteOptions<T> extends StoreAction, StorePathOptions, DoActionOptions {
|
|
38
|
+
/**only applies if connecting to store */
|
|
39
|
+
deleteStrat?: 'soft' | undefined;
|
|
40
|
+
/**Returns a string if cannot */
|
|
41
|
+
onCanDeleteAsync?: OnCanDoAsync<T>;
|
|
42
|
+
/**Will override the default store delete action */
|
|
43
|
+
onDeleteAsync?: OnDoActionAsync<T>;
|
|
44
|
+
/**Will open a dialog box requesting user confirmation for delete action */
|
|
45
|
+
onDeleteSuccessAsync?: OnDoMaybeSuccessAsync<T, T>;
|
|
46
|
+
}
|
|
47
|
+
export interface RestoreOptions<T> extends StoreAction, StorePathOptions, DoActionOptions {
|
|
48
|
+
/**Returns a string if cannot */
|
|
49
|
+
onCanRestoreAsync?: OnCanDoAsync<T>;
|
|
50
|
+
/**Will override the default store delete action */
|
|
51
|
+
onRestoreAsync?: OnDoActionAsync<T>;
|
|
52
|
+
/**Called after restore succeeds */
|
|
53
|
+
onRestoreSuccessAsync?: OnDoSuccessAsync<T, T>;
|
|
54
|
+
}
|
|
55
|
+
export interface SaveOptions<T, TSave, TReturn> extends StoreAction, StorePathOptions, DoActionOptions {
|
|
56
|
+
getMode?: 'post' | 'patch' | ((item: any) => BladeMode);
|
|
57
|
+
/**called to check whether to proceed with save */
|
|
58
|
+
onCanSaveAsync?: OnCanDoAsync<T | TSave>;
|
|
59
|
+
/**
|
|
60
|
+
* retrieves item to save
|
|
61
|
+
* called before seeing whether it can save
|
|
62
|
+
*/
|
|
63
|
+
onGetSaveAsync?: OnDoSuccessAsync<T, TSave>;
|
|
64
|
+
/**Will override the default store post/patch action */
|
|
65
|
+
onSaveAsync?: (item: T | TSave) => Promise<T | undefined>;
|
|
66
|
+
/**Called after save succeeds */
|
|
67
|
+
onSaveSuccessAsync?: OnDoSuccessAsync<T, TReturn>;
|
|
68
|
+
}
|
|
69
|
+
export interface ActionOptions extends StorePathOptions, DoActionOptions {
|
|
70
|
+
}
|
|
71
|
+
export interface ApiActionOptions extends StorePathOptions, DoActionOptions {
|
|
72
|
+
api?: BTApi;
|
|
73
|
+
}
|
|
74
|
+
export interface ApiRequestActionOptions extends ApiActionOptions {
|
|
75
|
+
method: string;
|
|
76
|
+
}
|
|
77
|
+
export interface UseActionsOptions extends DoActionOptions {
|
|
78
|
+
nav?: string;
|
|
79
|
+
proxyID?: string;
|
|
80
|
+
refresh?: boolean;
|
|
81
|
+
store?: BTStoreDefinition;
|
|
82
|
+
/**particularly what store syle to use */
|
|
83
|
+
storeMode?: StoreMode;
|
|
84
|
+
/**whether to store data locally or only for the duration of the session */
|
|
85
|
+
storageMode?: StorageMode;
|
|
86
|
+
throwError?: boolean;
|
|
87
|
+
url?: string;
|
|
88
|
+
/**for basic functionality when no store is provided */
|
|
89
|
+
items?: any[];
|
|
90
|
+
}
|
|
91
|
+
export interface BTActions {
|
|
92
|
+
actionLoadingMsg: ShallowRef<string | undefined>;
|
|
93
|
+
actionErrorMsg: ShallowRef<string | undefined>;
|
|
94
|
+
apiGet: <TReturn>(doOptions: ApiActionOptions) => Promise<TReturn | undefined>;
|
|
95
|
+
apiPatch: <TReturn>(doOptions: ApiActionOptions) => Promise<TReturn | undefined>;
|
|
96
|
+
apiPost: <TReturn>(doOptions: ApiActionOptions) => Promise<TReturn | undefined>;
|
|
97
|
+
apiRequest: (doOptions: ApiRequestActionOptions) => Promise<Response | undefined>;
|
|
98
|
+
apiUpload: <TReturn>(doOptions: ApiActionOptions) => Promise<TReturn | undefined>;
|
|
99
|
+
clearErrors: () => void;
|
|
100
|
+
clearStore: (nav: string) => void;
|
|
101
|
+
deleteItem: <T>(doOptions: DeleteOptions<T>) => Promise<string | undefined>;
|
|
102
|
+
doAction: (action: any, options?: DoActionOptions) => Promise<any>;
|
|
103
|
+
expectArray: <T>(doOptions: GetAllOptions<T, T>) => Promise<T[]>;
|
|
104
|
+
expectSingle: <T>(doOptions: GetOptions<T, T>) => Promise<T | undefined>;
|
|
105
|
+
getAllItems: <T, TReturn>(doOptions: GetAllOptions<T, TReturn>) => Promise<StoreGetAllReturn<T | TReturn> | undefined>;
|
|
106
|
+
getItem: <T, TReturn>(doOptions: GetOptions<T, TReturn>) => Promise<StoreGetReturn<T | T[] | TReturn | TReturn[]> | undefined>;
|
|
107
|
+
isLoading: ComputedRef<boolean>;
|
|
108
|
+
iterateThrough: <T>(opt: IterateThroughOptions<T>) => Promise<true | undefined>;
|
|
109
|
+
logError: (err?: string | Error) => void;
|
|
110
|
+
persistLoading: (startingMsg: string) => void;
|
|
111
|
+
releaseLoading: () => void;
|
|
112
|
+
restoreItem: <T>(doOptions: RestoreOptions<T>) => Promise<T | undefined>;
|
|
113
|
+
saveItem: <T, TSave, TReturn>(doOptions: SaveOptions<T, TSave, TReturn>) => Promise<TReturn | undefined>;
|
|
114
|
+
syncItem: <T extends BaseIDModel>(syncOptions: SyncOptions<T>) => Promise<BulkActionResult<T>[] | undefined>;
|
|
115
|
+
}
|
|
116
|
+
export declare function useActions(options?: UseActionsOptions): BTActions;
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { useStoreDefinition as v } from "./stores.mjs";
|
|
2
|
+
import { useApi as w } from "./api.mjs";
|
|
3
|
+
import { useActionsTracker as W } from "./actions-tracker.mjs";
|
|
4
|
+
import { useNavigation as X } from "./navigation.mjs";
|
|
5
|
+
import { expectArray as Y, expectSingle as Z, isLengthyArray as _ } from "./helpers.mjs";
|
|
6
|
+
function i(e) {
|
|
7
|
+
const {
|
|
8
|
+
actionErrorMsg: q,
|
|
9
|
+
actionLoadingMsg: G,
|
|
10
|
+
clearErrors: P,
|
|
11
|
+
isLoading: L,
|
|
12
|
+
iterateThrough: R,
|
|
13
|
+
doAction: f,
|
|
14
|
+
logError: h,
|
|
15
|
+
persistLoading: T,
|
|
16
|
+
releaseLoading: U
|
|
17
|
+
} = W(
|
|
18
|
+
{
|
|
19
|
+
...e,
|
|
20
|
+
stringifyError: (r) => typeof r == "object" ? r.message : r == null ? void 0 : r.toString()
|
|
21
|
+
}
|
|
22
|
+
), V = X();
|
|
23
|
+
function $(r) {
|
|
24
|
+
var a;
|
|
25
|
+
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.storeMode ?? (r.storeMode = e == null ? void 0 : e.storeMode), r.storageMode ?? (r.storageMode = e == null ? void 0 : e.storageMode), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0);
|
|
26
|
+
let l = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
27
|
+
const c = (e == null ? void 0 : e.items) ?? [];
|
|
28
|
+
return l == null && r.nav != null && (l = v({
|
|
29
|
+
nav: r.nav,
|
|
30
|
+
storeMode: r.storeMode,
|
|
31
|
+
storageMode: r.storageMode,
|
|
32
|
+
proxyID: r.proxyID
|
|
33
|
+
})), l != null ? (r.deleteStrat ?? (r.deleteStrat = ((a = V.findItem(r.nav)) == null ? void 0 : a.deleteStrat) ?? void 0), r.deleteStrat == "soft" ? (r.additionalUrl ?? (r.additionalUrl = "/delete"), r.onDeleteAsync ?? (r.onDeleteAsync = () => l().patch(r))) : r.onDeleteAsync ?? (r.onDeleteAsync = () => l().deleteItem(r))) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
|
|
34
|
+
var M;
|
|
35
|
+
const u = r.id ?? ((M = r.data) == null ? void 0 : M.id);
|
|
36
|
+
if (u == null)
|
|
37
|
+
return Promise.resolve(void 0);
|
|
38
|
+
const g = c.findIndex((y) => y.id == u);
|
|
39
|
+
return g >= 0 && c.splice(g, 1), Promise.resolve(void 0);
|
|
40
|
+
}), f(async () => {
|
|
41
|
+
let u, g;
|
|
42
|
+
if (r.onCanDeleteAsync != null && (u = await r.onCanDeleteAsync(r.data)), u == null && r.onDeleteAsync != null && (g = await r.onDeleteAsync(r.data)), h(u), u == null && r.onDeleteSuccessAsync != null)
|
|
43
|
+
return await r.onDeleteSuccessAsync(g);
|
|
44
|
+
}, {
|
|
45
|
+
...e,
|
|
46
|
+
...r,
|
|
47
|
+
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
48
|
+
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
49
|
+
errorMsg: r.errorMsg ?? (e == null ? void 0 : e.errorMsg),
|
|
50
|
+
loadingMsg: r.loadingMsg ?? (e == null ? void 0 : e.loadingMsg) ?? "Deleting",
|
|
51
|
+
requireConfirmation: r.requireConfirmation ?? (e == null ? void 0 : e.requireConfirmation),
|
|
52
|
+
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async function b(r) {
|
|
56
|
+
return Y(await D(r)) ?? [];
|
|
57
|
+
}
|
|
58
|
+
async function j(r) {
|
|
59
|
+
return Z(await I(r));
|
|
60
|
+
}
|
|
61
|
+
function I(r) {
|
|
62
|
+
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.storeMode ?? (r.storeMode = e == null ? void 0 : e.storeMode), r.storageMode ?? (r.storageMode = e == null ? void 0 : e.storageMode), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get this item?" : void 0);
|
|
63
|
+
let l = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
64
|
+
const c = (e == null ? void 0 : e.items) ?? [];
|
|
65
|
+
return l == null && r.nav != null && (l = v({
|
|
66
|
+
nav: r.nav,
|
|
67
|
+
storeMode: r.storeMode,
|
|
68
|
+
storageMode: r.storageMode,
|
|
69
|
+
proxyID: r.proxyID
|
|
70
|
+
})), l != null ? r.onGetAsync ?? (r.onGetAsync = async () => await l().get(r)) : r.onGetAsync ?? (r.onGetAsync = () => {
|
|
71
|
+
var u;
|
|
72
|
+
const a = r.id ?? ((u = r.data) == null ? void 0 : u.id);
|
|
73
|
+
return a == null ? Promise.resolve(void 0) : Promise.resolve({ data: c.find((g) => g.id == a) });
|
|
74
|
+
}), f(async () => {
|
|
75
|
+
let a;
|
|
76
|
+
return r.onGetAsync != null && (a = await r.onGetAsync(r)), a != null && r.onGetSuccessAsync != null ? await r.onGetSuccessAsync(a, r) : a;
|
|
77
|
+
}, {
|
|
78
|
+
...e,
|
|
79
|
+
...r,
|
|
80
|
+
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
81
|
+
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
82
|
+
errorMsg: r.errorMsg ?? (e == null ? void 0 : e.errorMsg),
|
|
83
|
+
loadingMsg: r.loadingMsg ?? (e == null ? void 0 : e.loadingMsg) ?? "Retrieving",
|
|
84
|
+
requireConfirmation: r.requireConfirmation ?? (e == null ? void 0 : e.requireConfirmation),
|
|
85
|
+
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function D(r) {
|
|
89
|
+
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.storeMode ?? (r.storeMode = e == null ? void 0 : e.storeMode), r.storageMode ?? (r.storageMode = e == null ? void 0 : e.storageMode), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get these items?" : void 0);
|
|
90
|
+
let l = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
91
|
+
const c = (e == null ? void 0 : e.items) ?? [];
|
|
92
|
+
return l == null && r.nav != null && (l = v({
|
|
93
|
+
nav: r.nav,
|
|
94
|
+
storeMode: r.storeMode,
|
|
95
|
+
storageMode: r.storageMode,
|
|
96
|
+
proxyID: r.proxyID
|
|
97
|
+
})), l != null ? r.onGetAsync ?? (r.onGetAsync = () => l().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve({ data: c })), f(async () => {
|
|
98
|
+
let a;
|
|
99
|
+
return r.onGetAsync != null && (a = await r.onGetAsync(r)), a != null && r.onGetSuccessAsync != null ? await r.onGetSuccessAsync(a, r) : a;
|
|
100
|
+
}, {
|
|
101
|
+
...e,
|
|
102
|
+
...r,
|
|
103
|
+
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
104
|
+
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
105
|
+
errorMsg: r.errorMsg ?? (e == null ? void 0 : e.errorMsg),
|
|
106
|
+
loadingMsg: r.loadingMsg ?? (e == null ? void 0 : e.loadingMsg) ?? "Retrieving",
|
|
107
|
+
requireConfirmation: r.requireConfirmation ?? (e == null ? void 0 : e.requireConfirmation),
|
|
108
|
+
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function k(r) {
|
|
112
|
+
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.storeMode ?? (r.storeMode = e == null ? void 0 : e.storeMode), r.storageMode ?? (r.storageMode = e == null ? void 0 : e.storageMode), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to restore this item?" : void 0);
|
|
113
|
+
let l = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
114
|
+
return l == null && r.nav != null && (l = v({
|
|
115
|
+
nav: r.nav,
|
|
116
|
+
storeMode: r.storeMode,
|
|
117
|
+
storageMode: r.storageMode,
|
|
118
|
+
proxyID: r.proxyID
|
|
119
|
+
})), l != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => l().restore(r))), f(async () => {
|
|
120
|
+
let c, a;
|
|
121
|
+
return r.onCanRestoreAsync != null && (c = await r.onCanRestoreAsync(r.data)), c == null && r.onRestoreAsync != null && (a = await r.onRestoreAsync(r.data)), h(c), a != null && r.onRestoreSuccessAsync != null ? await r.onRestoreSuccessAsync(a) : a;
|
|
122
|
+
}, {
|
|
123
|
+
...e,
|
|
124
|
+
...r,
|
|
125
|
+
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
126
|
+
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
127
|
+
errorMsg: r.errorMsg ?? (e == null ? void 0 : e.errorMsg),
|
|
128
|
+
loadingMsg: r.loadingMsg ?? (e == null ? void 0 : e.loadingMsg) ?? "Restoring",
|
|
129
|
+
requireConfirmation: r.requireConfirmation ?? (e == null ? void 0 : e.requireConfirmation),
|
|
130
|
+
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function x(r) {
|
|
134
|
+
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.storeMode ?? (r.storeMode = e == null ? void 0 : e.storeMode), r.storageMode ?? (r.storageMode = e == null ? void 0 : e.storageMode), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to save this item?" : void 0);
|
|
135
|
+
let l = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
136
|
+
const c = (e == null ? void 0 : e.items) ?? [];
|
|
137
|
+
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (a) => a), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), r.getMode ?? (r.getMode = (a) => a.id == null ? "new" : "edit"), l == null && r.nav != null && (l = v({
|
|
138
|
+
nav: r.nav,
|
|
139
|
+
storeMode: r.storeMode,
|
|
140
|
+
storageMode: r.storageMode,
|
|
141
|
+
proxyID: r.proxyID
|
|
142
|
+
})), l != null ? r.onSaveAsync ?? (r.onSaveAsync = async (a) => {
|
|
143
|
+
if (a == null)
|
|
144
|
+
return;
|
|
145
|
+
let u;
|
|
146
|
+
return r.getMode != null && (typeof r.getMode == "string" ? u = r.getMode : u = r.getMode(a)), r.data = a, u == "new" || u == "post" ? await l().post(r) : await l().patch(r);
|
|
147
|
+
}) : r.onSaveAsync ?? (r.onSaveAsync = (a) => {
|
|
148
|
+
const u = c.findIndex((g) => g.id == a.id);
|
|
149
|
+
return u >= 0 ? c.splice(u, 1, a) : c.push(a), Promise.resolve(a);
|
|
150
|
+
}), f(async () => {
|
|
151
|
+
let a;
|
|
152
|
+
if (r.onGetSaveAsync != null && (a = await r.onGetSaveAsync(r.data)), a == null)
|
|
153
|
+
return;
|
|
154
|
+
if (r.onCanSaveAsync != null) {
|
|
155
|
+
let g = await r.onCanSaveAsync(a);
|
|
156
|
+
if (h(g), g != null)
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
let u;
|
|
160
|
+
return r.onSaveAsync != null && (u = await r.onSaveAsync(a)), u != null && r.onSaveSuccessAsync != null ? await r.onSaveSuccessAsync(u) : u;
|
|
161
|
+
}, {
|
|
162
|
+
...e,
|
|
163
|
+
...r,
|
|
164
|
+
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
165
|
+
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
166
|
+
errorMsg: r.errorMsg ?? (e == null ? void 0 : e.errorMsg),
|
|
167
|
+
loadingMsg: r.loadingMsg ?? (e == null ? void 0 : e.loadingMsg) ?? "Saving",
|
|
168
|
+
requireConfirmation: r.requireConfirmation ?? (e == null ? void 0 : e.requireConfirmation),
|
|
169
|
+
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
function N(r) {
|
|
173
|
+
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.storeMode ?? (r.storeMode = e == null ? void 0 : e.storeMode), r.storageMode ?? (r.storageMode = e == null ? void 0 : e.storageMode), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to sync this item?" : void 0), r.additionalUrl ?? (r.additionalUrl = "CustomSync"), _(r.actions) ? (r.onSyncAsync ?? (r.onSyncAsync = async (l) => {
|
|
174
|
+
var a, u;
|
|
175
|
+
try {
|
|
176
|
+
var c = await E({
|
|
177
|
+
...r,
|
|
178
|
+
data: {
|
|
179
|
+
partyID: l.partyID,
|
|
180
|
+
actions: l.actions.map((M) => {
|
|
181
|
+
var y;
|
|
182
|
+
return {
|
|
183
|
+
action: M.action,
|
|
184
|
+
externalItemID: M.externalItemID,
|
|
185
|
+
localItemID: M.localItemID ?? ((y = M.item) == null ? void 0 : y.id)
|
|
186
|
+
};
|
|
187
|
+
})
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
let g = [];
|
|
191
|
+
if ((c == null ? void 0 : c.data) != null)
|
|
192
|
+
for (let M = 0; M < c.data.length; M++) {
|
|
193
|
+
let y = c.data[M], A = y.item, m = (u = (a = l.actions) == null ? void 0 : a.find((Q) => {
|
|
194
|
+
var S, C;
|
|
195
|
+
return ((S = Q.item) == null ? void 0 : S.id) == ((C = y.item) == null ? void 0 : C.id);
|
|
196
|
+
})) == null ? void 0 : u.item;
|
|
197
|
+
y.isSuccess && m != null && A != null && (m.hasOwnProperty("rowVersion") && (m.rowVersion = A.rowVersion), l.localIDProp != null && (m[l.localIDProp] = A[l.localIDProp]), await x({
|
|
198
|
+
data: m,
|
|
199
|
+
localOnly: !0,
|
|
200
|
+
nav: r.nav
|
|
201
|
+
})), g.push({
|
|
202
|
+
isSuccess: y.isSuccess,
|
|
203
|
+
item: m,
|
|
204
|
+
msg: y.msg
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
return g;
|
|
208
|
+
} catch (g) {
|
|
209
|
+
throw console.log("er"), console.log(g), g;
|
|
210
|
+
}
|
|
211
|
+
}), f(async () => {
|
|
212
|
+
if (r.onSyncAsync != null)
|
|
213
|
+
return await r.onSyncAsync(r);
|
|
214
|
+
}, {
|
|
215
|
+
...e,
|
|
216
|
+
...r,
|
|
217
|
+
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
218
|
+
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
219
|
+
errorMsg: r.errorMsg ?? (e == null ? void 0 : e.errorMsg),
|
|
220
|
+
loadingMsg: r.loadingMsg ?? (e == null ? void 0 : e.loadingMsg) ?? "Saving",
|
|
221
|
+
requireConfirmation: r.requireConfirmation ?? (e == null ? void 0 : e.requireConfirmation),
|
|
222
|
+
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
223
|
+
})) : Promise.resolve(void 0);
|
|
224
|
+
}
|
|
225
|
+
function B(r) {
|
|
226
|
+
var l = v({ nav: r });
|
|
227
|
+
l().$reset();
|
|
228
|
+
}
|
|
229
|
+
function F(r) {
|
|
230
|
+
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), f(async () => await (r.api ?? w()).request(r), { ...e, ...r });
|
|
231
|
+
}
|
|
232
|
+
function H(r) {
|
|
233
|
+
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), f(async () => await (r.api ?? w()).get(r), { ...e, ...r });
|
|
234
|
+
}
|
|
235
|
+
function E(r) {
|
|
236
|
+
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), f(async () => await (r.api ?? w()).post(r), { ...e, ...r });
|
|
237
|
+
}
|
|
238
|
+
function J(r) {
|
|
239
|
+
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), f(async () => await (r.api ?? w()).uploadImage(r), { ...e, ...r });
|
|
240
|
+
}
|
|
241
|
+
function K(r) {
|
|
242
|
+
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), f(async () => await (r.api ?? w()).patch(r), { ...e, ...r });
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
actionLoadingMsg: G,
|
|
246
|
+
actionErrorMsg: q,
|
|
247
|
+
apiGet: H,
|
|
248
|
+
apiPatch: K,
|
|
249
|
+
apiPost: E,
|
|
250
|
+
apiRequest: F,
|
|
251
|
+
apiUpload: J,
|
|
252
|
+
clearErrors: P,
|
|
253
|
+
clearStore: B,
|
|
254
|
+
deleteItem: $,
|
|
255
|
+
doAction: f,
|
|
256
|
+
expectArray: b,
|
|
257
|
+
expectSingle: j,
|
|
258
|
+
getAllItems: D,
|
|
259
|
+
getItem: I,
|
|
260
|
+
isLoading: L,
|
|
261
|
+
iterateThrough: R,
|
|
262
|
+
logError: h,
|
|
263
|
+
persistLoading: T,
|
|
264
|
+
releaseLoading: U,
|
|
265
|
+
restoreItem: k,
|
|
266
|
+
saveItem: x,
|
|
267
|
+
syncItem: N
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
export {
|
|
271
|
+
i as useActions
|
|
272
|
+
};
|