bt-core-app 2.1.37 → 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,100 @@
|
|
|
1
|
+
import { BTDemo } from './demo.ts';
|
|
2
|
+
import { BTAuth } from './auth.ts';
|
|
3
|
+
|
|
4
|
+
export interface QueryParams extends Record<string, any> {
|
|
5
|
+
filterBy?: string;
|
|
6
|
+
includeCount?: boolean;
|
|
7
|
+
includeInactive?: boolean;
|
|
8
|
+
lastUpdate?: string;
|
|
9
|
+
other?: any;
|
|
10
|
+
properties?: string[] | string;
|
|
11
|
+
query?: string;
|
|
12
|
+
searchString?: string;
|
|
13
|
+
sortOrder?: string;
|
|
14
|
+
sortBy?: string;
|
|
15
|
+
takeFrom?: number;
|
|
16
|
+
takeAmount?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface PathOptions {
|
|
19
|
+
/**always added to end before query {url}/{additionalUrl}?{query} */
|
|
20
|
+
additionalUrl?: string;
|
|
21
|
+
/**application/json or other options */
|
|
22
|
+
contentType?: string;
|
|
23
|
+
/**that data to send in the body for POST, PATCH, and DELETE requests */
|
|
24
|
+
data?: any;
|
|
25
|
+
/** resulting url after building {nav | url}/{additionalUrl}?{params} */
|
|
26
|
+
finalUrl?: string;
|
|
27
|
+
/**override default headers */
|
|
28
|
+
headers?: HeadersInit;
|
|
29
|
+
/**id will be added as a url paramter (/{id}?) rather than as a query parameter */
|
|
30
|
+
id?: string;
|
|
31
|
+
/**where to find the url */
|
|
32
|
+
nav?: string;
|
|
33
|
+
/**headers will not be calculated. Only the given headers in these options will be used */
|
|
34
|
+
overrideHeaders?: boolean;
|
|
35
|
+
/**query parameters */
|
|
36
|
+
params?: QueryParams;
|
|
37
|
+
/**attaches a proxyID to the request */
|
|
38
|
+
proxyID?: string;
|
|
39
|
+
/**whether to refresh the store data and go straight to the server */
|
|
40
|
+
refresh?: boolean;
|
|
41
|
+
/**returns result as a json object. Defaults to true. */
|
|
42
|
+
returnJson?: boolean;
|
|
43
|
+
/**returns result as a string */
|
|
44
|
+
returnText?: boolean;
|
|
45
|
+
/**If false, returns response no matter the status code */
|
|
46
|
+
throwError?: boolean;
|
|
47
|
+
/**if exists then overrides default nav */
|
|
48
|
+
url?: string;
|
|
49
|
+
/**whether to preference using the local cache */
|
|
50
|
+
useLocalCache?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface RequestPathOptions extends PathOptions {
|
|
53
|
+
method: string;
|
|
54
|
+
}
|
|
55
|
+
type FindPath = (navName?: string) => string | undefined;
|
|
56
|
+
export interface CreateApiOptions {
|
|
57
|
+
auth?: BTAuth;
|
|
58
|
+
/**overrides the default */
|
|
59
|
+
buildHeaders?: (path: PathOptions, createOptions?: CreateApiOptions) => HeadersInit;
|
|
60
|
+
/**build a query. Overrides the default */
|
|
61
|
+
buildQuery?: (params: any) => string;
|
|
62
|
+
/**overrides the default */
|
|
63
|
+
buildUrl?: (path: PathOptions) => string;
|
|
64
|
+
/**defaults to 'application/json' */
|
|
65
|
+
defaultContentType?: string;
|
|
66
|
+
/**returns result as a json object. Defaults to true. */
|
|
67
|
+
defaultReturnJson?: boolean;
|
|
68
|
+
/**returns result as a string */
|
|
69
|
+
defaultReturnText?: boolean;
|
|
70
|
+
/**defaults to true. Will throw an error on fail */
|
|
71
|
+
defaultThrowError?: boolean;
|
|
72
|
+
/**demo for providing any demo data */
|
|
73
|
+
demo?: BTDemo;
|
|
74
|
+
/**defaults to a function that returns '' */
|
|
75
|
+
findPath?: FindPath;
|
|
76
|
+
testUnauthorizedErrors?: boolean;
|
|
77
|
+
/**if true and logged in then will set an authorization header with 'bearer [token]' */
|
|
78
|
+
useBearerToken?: boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface BTApi {
|
|
81
|
+
buildHeaders: (options: PathOptions, createOptions?: CreateApiOptions) => HeadersInit;
|
|
82
|
+
buildQuery: (params: any) => string;
|
|
83
|
+
buildUrl: (path: PathOptions) => string;
|
|
84
|
+
deleteItem: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
85
|
+
get: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
86
|
+
getAll: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
87
|
+
getBlob: (pathOptions: PathOptions) => Promise<Response>;
|
|
88
|
+
post: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
89
|
+
patch: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
90
|
+
request: (pathOptions: RequestPathOptions) => Promise<Response | undefined>;
|
|
91
|
+
uploadImage: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
|
|
92
|
+
}
|
|
93
|
+
export declare function useApi(): BTApi;
|
|
94
|
+
export interface ApiError {
|
|
95
|
+
name: string;
|
|
96
|
+
code: 401 | 403;
|
|
97
|
+
message: string;
|
|
98
|
+
}
|
|
99
|
+
export declare function createApi(options?: CreateApiOptions): BTApi;
|
|
100
|
+
export {};
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import { toValue as x } from "vue";
|
|
2
|
+
import { appendUrl as $, DataURIToBlob as H } from "./helpers.mjs";
|
|
3
|
+
let y;
|
|
4
|
+
function C() {
|
|
5
|
+
return y;
|
|
6
|
+
}
|
|
7
|
+
function I(e) {
|
|
8
|
+
const m = (e == null ? void 0 : e.buildHeaders) ?? n, v = (e == null ? void 0 : e.buildQuery) ?? U, E = (e == null ? void 0 : e.buildUrl) ?? k, f = e == null ? void 0 : e.demo;
|
|
9
|
+
function U(r) {
|
|
10
|
+
let t = new URLSearchParams();
|
|
11
|
+
return Object.entries(r).forEach((l) => {
|
|
12
|
+
l[1] != null && t.append(l[0], l[1]);
|
|
13
|
+
}), r.filterBy && t.set("filterBy", r.filterBy), r.includeCount && t.set("includeCount", r.includeCount.toString()), r.includeInactive && t.set("includeInactive", r.includeInactive.toString()), r.properties && t.set("properties", r.properties.toString()), r.query && t.set("query", r.query.toString()), r.searchString && t.set("searchString", r.searchString), r.sortOrder && t.set("sortOrder", r.sortOrder), r.sortBy && t.set("sortBy", r.sortBy), r.takeFrom && t.set("takeFrom", r.takeFrom.toString()), r.takeAmount && t.set("takeAmount", r.takeAmount.toString()), r.other && Object.entries(r.other).forEach((l) => {
|
|
14
|
+
l[1] != null && t.append(l[0], l[1].toString());
|
|
15
|
+
}), t.toString();
|
|
16
|
+
}
|
|
17
|
+
function k(r) {
|
|
18
|
+
let t = x(r.url) ?? void 0, l = x(r.id);
|
|
19
|
+
return t == null && (e == null ? void 0 : e.findPath) != null && (t = e.findPath(r.nav)), r.additionalUrl != null && (t == null ? t = r.additionalUrl : t = $(t, r.additionalUrl)), l != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", l) : t = $(t, l)), r.params != null && (t = `${t}?${v(r.params)}`), r.finalUrl = t, r.finalUrl ?? "";
|
|
20
|
+
}
|
|
21
|
+
function n(r, t) {
|
|
22
|
+
var g, a;
|
|
23
|
+
let l = { ...r.headers };
|
|
24
|
+
return r.proxyID && (l.ManagedCompanyAccountID ?? (l.ManagedCompanyAccountID = r.proxyID)), (t == null ? void 0 : t.useBearerToken) != !1 && ((g = t == null ? void 0 : t.auth) == null ? void 0 : g.isLoggedIn.value) == !0 && (l.authorization ?? (l.authorization = `bearer ${(a = t == null ? void 0 : t.auth) == null ? void 0 : a.credentials.value.token}`)), l["Content-Type"] ?? (l["Content-Type"] = r.contentType ?? (t == null ? void 0 : t.defaultContentType) ?? "application/json"), l;
|
|
25
|
+
}
|
|
26
|
+
async function D(r) {
|
|
27
|
+
var g;
|
|
28
|
+
let t = r.finalUrl, l = r.headers;
|
|
29
|
+
return t == null && (t = E(r)), f != null && f.isDemoing.value ? (console.log(`DEMO: Get from ${t}`), f.get(r)) : (console.log(`Get from ${t}`), await ((g = e == null ? void 0 : e.auth) == null ? void 0 : g.tryRefreshToken()), r.overrideHeaders !== !0 && (l = m(r, e)), fetch(t, {
|
|
30
|
+
method: "GET",
|
|
31
|
+
mode: "cors",
|
|
32
|
+
cache: "no-cache",
|
|
33
|
+
headers: l
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
async function R(r) {
|
|
37
|
+
var h, w;
|
|
38
|
+
const t = r.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, l = r.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, g = r.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
39
|
+
let a = r.finalUrl, c = r.headers;
|
|
40
|
+
a == null && (a = E(r));
|
|
41
|
+
let u;
|
|
42
|
+
try {
|
|
43
|
+
if (f != null && f.isDemoing.value)
|
|
44
|
+
return console.log(`DEMO: Get from ${a}`), f.get(r);
|
|
45
|
+
if (console.log(`Get from ${a}`), await ((h = e == null ? void 0 : e.auth) == null ? void 0 : h.tryRefreshToken()), r.overrideHeaders !== !0 && (c = m(r, e)), u = await fetch(a, {
|
|
46
|
+
method: "GET",
|
|
47
|
+
mode: "cors",
|
|
48
|
+
cache: "no-cache",
|
|
49
|
+
headers: c
|
|
50
|
+
}), !u.ok) {
|
|
51
|
+
if (u.status == 401)
|
|
52
|
+
throw e != null && e.testUnauthorizedErrors && await ((w = e == null ? void 0 : e.auth) == null ? void 0 : w.testToken()), {
|
|
53
|
+
code: u.status,
|
|
54
|
+
name: "Unauthorized",
|
|
55
|
+
message: u.statusText
|
|
56
|
+
};
|
|
57
|
+
let d = await u.text();
|
|
58
|
+
throw {
|
|
59
|
+
code: u.status,
|
|
60
|
+
name: "Get error",
|
|
61
|
+
message: d ?? u.statusText ?? ""
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
if (g)
|
|
65
|
+
return await u.text();
|
|
66
|
+
if (l)
|
|
67
|
+
return await u.json();
|
|
68
|
+
throw new Error();
|
|
69
|
+
} catch (d) {
|
|
70
|
+
const T = `${(u == null ? void 0 : u.status) ?? ""} ${(u == null ? void 0 : u.statusText) ?? ""} ${d.message}`;
|
|
71
|
+
if (!t)
|
|
72
|
+
return;
|
|
73
|
+
throw d.code == 401 ? d : {
|
|
74
|
+
code: (u == null ? void 0 : u.status) ?? (d == null ? void 0 : d.code) ?? void 0,
|
|
75
|
+
name: "Error",
|
|
76
|
+
message: T
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function J(r) {
|
|
81
|
+
var h, w;
|
|
82
|
+
const t = r.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, l = r.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, g = r.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
83
|
+
let a = r.finalUrl, c = r.headers;
|
|
84
|
+
a == null && (a = E(r));
|
|
85
|
+
let u;
|
|
86
|
+
try {
|
|
87
|
+
if (f != null && f.isDemoing.value)
|
|
88
|
+
return console.log(`DEMO: Get all from ${a}`), f.getAll(r);
|
|
89
|
+
if (console.log(`Get all from ${a}`), await ((h = e == null ? void 0 : e.auth) == null ? void 0 : h.tryRefreshToken()), r.overrideHeaders !== !0 && (c = m(r, e)), u = await fetch(a, {
|
|
90
|
+
method: "GET",
|
|
91
|
+
mode: "cors",
|
|
92
|
+
cache: "no-cache",
|
|
93
|
+
headers: c
|
|
94
|
+
}), !u.ok) {
|
|
95
|
+
if (u.status == 401)
|
|
96
|
+
throw e != null && e.testUnauthorizedErrors && await ((w = e == null ? void 0 : e.auth) == null ? void 0 : w.testToken()), {
|
|
97
|
+
code: u.status,
|
|
98
|
+
name: "Unauthorized",
|
|
99
|
+
message: u.statusText
|
|
100
|
+
};
|
|
101
|
+
let d = await u.text();
|
|
102
|
+
throw {
|
|
103
|
+
code: u.status,
|
|
104
|
+
name: "Get all error",
|
|
105
|
+
message: d ?? u.statusText ?? ""
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
if (g)
|
|
109
|
+
return await u.text();
|
|
110
|
+
if (l)
|
|
111
|
+
return await u.json();
|
|
112
|
+
throw new Error();
|
|
113
|
+
} catch (d) {
|
|
114
|
+
const T = `${(u == null ? void 0 : u.status) ?? ""} ${(u == null ? void 0 : u.statusText) ?? ""} ${d.message}`;
|
|
115
|
+
if (!t)
|
|
116
|
+
return;
|
|
117
|
+
throw d.code == 401 ? d : {
|
|
118
|
+
code: (u == null ? void 0 : u.status) ?? (d == null ? void 0 : d.code) ?? void 0,
|
|
119
|
+
name: "Error",
|
|
120
|
+
message: T
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async function S(r) {
|
|
125
|
+
var h, w;
|
|
126
|
+
const t = r.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, l = r.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, g = r.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
127
|
+
let a = r.finalUrl, c = r.headers;
|
|
128
|
+
a == null && (a = E(r));
|
|
129
|
+
let u;
|
|
130
|
+
try {
|
|
131
|
+
if (f != null && f.isDemoing.value)
|
|
132
|
+
return console.log(`DEMO: Post to ${a}`), f.post(r);
|
|
133
|
+
if (console.log(`Post to ${a}`), await ((h = e == null ? void 0 : e.auth) == null ? void 0 : h.tryRefreshToken()), r.overrideHeaders !== !0 && (c = m(r, e)), u = await fetch(a, {
|
|
134
|
+
method: "POST",
|
|
135
|
+
mode: "cors",
|
|
136
|
+
cache: "no-cache",
|
|
137
|
+
headers: c,
|
|
138
|
+
body: JSON.stringify(r.data)
|
|
139
|
+
}), !u.ok) {
|
|
140
|
+
if (u.status == 401)
|
|
141
|
+
throw e != null && e.testUnauthorizedErrors && await ((w = e == null ? void 0 : e.auth) == null ? void 0 : w.testToken()), {
|
|
142
|
+
code: u.status,
|
|
143
|
+
name: "Unauthorized",
|
|
144
|
+
message: u.statusText
|
|
145
|
+
};
|
|
146
|
+
let d = await u.text();
|
|
147
|
+
throw {
|
|
148
|
+
code: u.status,
|
|
149
|
+
name: "Post error",
|
|
150
|
+
message: d ?? u.statusText ?? ""
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
if (g)
|
|
154
|
+
return await u.text();
|
|
155
|
+
if (l)
|
|
156
|
+
return await u.json();
|
|
157
|
+
throw new Error();
|
|
158
|
+
} catch (d) {
|
|
159
|
+
if (u.status == 200 || !t)
|
|
160
|
+
return;
|
|
161
|
+
const T = `${(u == null ? void 0 : u.status) ?? ""} ${(u == null ? void 0 : u.statusText) ?? ""} ${d.message}`;
|
|
162
|
+
throw d.code == 401 ? d : {
|
|
163
|
+
code: (u == null ? void 0 : u.status) ?? (d == null ? void 0 : d.code) ?? void 0,
|
|
164
|
+
name: "Post error",
|
|
165
|
+
message: T
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
async function b(r) {
|
|
170
|
+
var h, w;
|
|
171
|
+
const t = r.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, l = r.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, g = r.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
172
|
+
let a = r.finalUrl, c = r.headers;
|
|
173
|
+
a == null && (a = E(r));
|
|
174
|
+
let u;
|
|
175
|
+
try {
|
|
176
|
+
if (f != null && f.isDemoing.value)
|
|
177
|
+
return console.log(`DEMO: Patch to ${a}`), f.patch(r);
|
|
178
|
+
if (console.log(`Patch to ${a}`), await ((h = e == null ? void 0 : e.auth) == null ? void 0 : h.tryRefreshToken()), r.overrideHeaders !== !0 && (c = m(r, e)), u = await fetch(a, {
|
|
179
|
+
method: "PATCH",
|
|
180
|
+
mode: "cors",
|
|
181
|
+
cache: "no-cache",
|
|
182
|
+
headers: c,
|
|
183
|
+
body: JSON.stringify(r.data)
|
|
184
|
+
}), !u.ok) {
|
|
185
|
+
if (u.status == 401)
|
|
186
|
+
throw e != null && e.testUnauthorizedErrors && await ((w = e == null ? void 0 : e.auth) == null ? void 0 : w.testToken()), {
|
|
187
|
+
code: u.status,
|
|
188
|
+
name: "Unauthorized",
|
|
189
|
+
message: u.statusText
|
|
190
|
+
};
|
|
191
|
+
let d = await u.text();
|
|
192
|
+
throw {
|
|
193
|
+
code: u.status,
|
|
194
|
+
name: "Patch error",
|
|
195
|
+
message: d ?? u.statusText ?? ""
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
if (g)
|
|
199
|
+
return await u.text();
|
|
200
|
+
if (l)
|
|
201
|
+
return await u.json();
|
|
202
|
+
throw new Error();
|
|
203
|
+
} catch (d) {
|
|
204
|
+
if (u.status == 200 || !t)
|
|
205
|
+
return;
|
|
206
|
+
const T = `${(u == null ? void 0 : u.status) ?? ""} ${(u == null ? void 0 : u.statusText) ?? ""} ${d.message}`;
|
|
207
|
+
throw d.code == 401 ? d : {
|
|
208
|
+
code: (u == null ? void 0 : u.status) ?? (d == null ? void 0 : d.code) ?? void 0,
|
|
209
|
+
name: "Error",
|
|
210
|
+
message: T
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
async function M(r) {
|
|
215
|
+
var c, u;
|
|
216
|
+
const t = r.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
|
|
217
|
+
let l = r.finalUrl, g = r.headers;
|
|
218
|
+
l == null && (l = E(r));
|
|
219
|
+
let a;
|
|
220
|
+
try {
|
|
221
|
+
if (f != null && f.isDemoing.value)
|
|
222
|
+
return console.log(`DEMO: Delete ${l}`), f.deleteItem(r);
|
|
223
|
+
if (console.log(`Delete to ${l}`), await ((c = e == null ? void 0 : e.auth) == null ? void 0 : c.tryRefreshToken()), r.overrideHeaders !== !0 && (g = m(r, e)), a = await fetch(l, {
|
|
224
|
+
method: "DELETE",
|
|
225
|
+
mode: "cors",
|
|
226
|
+
cache: "no-cache",
|
|
227
|
+
headers: g,
|
|
228
|
+
body: JSON.stringify(r.data)
|
|
229
|
+
}), !a.ok)
|
|
230
|
+
throw a.status == 401 ? (e != null && e.testUnauthorizedErrors && await ((u = e == null ? void 0 : e.auth) == null ? void 0 : u.testToken()), {
|
|
231
|
+
code: a.status,
|
|
232
|
+
name: "Unauthorized",
|
|
233
|
+
message: a.statusText
|
|
234
|
+
}) : {
|
|
235
|
+
code: a.status,
|
|
236
|
+
name: "Deletion Error",
|
|
237
|
+
message: a.statusText
|
|
238
|
+
};
|
|
239
|
+
return;
|
|
240
|
+
} catch (h) {
|
|
241
|
+
const w = `${(a == null ? void 0 : a.status) ?? ""} ${(a == null ? void 0 : a.statusText) ?? ""} ${h.message}`;
|
|
242
|
+
if (!t)
|
|
243
|
+
return;
|
|
244
|
+
throw h.code == 401 ? h : {
|
|
245
|
+
code: (a == null ? void 0 : a.status) ?? (h == null ? void 0 : h.code) ?? void 0,
|
|
246
|
+
name: "Error",
|
|
247
|
+
message: w
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
async function z(r) {
|
|
252
|
+
var h;
|
|
253
|
+
const t = r.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, l = r.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, g = r.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
254
|
+
let a = r.finalUrl, c = r.headers;
|
|
255
|
+
if (a == null && (a = E(r)), r.overrideHeaders !== !0 && (c = m(r, e)), f != null && f.isDemoing.value)
|
|
256
|
+
return console.log(`DEMO: Uploading image to ${a}`), f.post(r);
|
|
257
|
+
console.log(`Upload image to ${a}`);
|
|
258
|
+
let u;
|
|
259
|
+
try {
|
|
260
|
+
const w = new FormData();
|
|
261
|
+
let d = typeof r.data == "string" ? H(r.data) : r.data;
|
|
262
|
+
w.append("file", d);
|
|
263
|
+
const T = { ...c };
|
|
264
|
+
if (delete T["Content-Type"], c = new Headers(T), u = await fetch(a, {
|
|
265
|
+
method: "POST",
|
|
266
|
+
mode: "cors",
|
|
267
|
+
cache: "no-cache",
|
|
268
|
+
headers: c,
|
|
269
|
+
body: w
|
|
270
|
+
}), u.status == 401)
|
|
271
|
+
throw e != null && e.testUnauthorizedErrors && await ((h = e == null ? void 0 : e.auth) == null ? void 0 : h.testToken()), {
|
|
272
|
+
code: u.status,
|
|
273
|
+
name: "Unauthorized",
|
|
274
|
+
message: u.statusText
|
|
275
|
+
};
|
|
276
|
+
return g ? await u.text() : l ? await u.json() : void 0;
|
|
277
|
+
} catch (w) {
|
|
278
|
+
if (u.status == 200 || !t)
|
|
279
|
+
return;
|
|
280
|
+
const d = `${(u == null ? void 0 : u.status) ?? ""} ${(u == null ? void 0 : u.statusText) ?? ""} ${w.message}`;
|
|
281
|
+
throw w.code == 401 ? w : {
|
|
282
|
+
code: (u == null ? void 0 : u.status) ?? (w == null ? void 0 : w.code) ?? void 0,
|
|
283
|
+
name: "Upload error",
|
|
284
|
+
message: d
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
async function G(r) {
|
|
289
|
+
var a;
|
|
290
|
+
const t = r.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
|
|
291
|
+
let l = r.finalUrl, g = r.headers;
|
|
292
|
+
l == null && (l = E(r));
|
|
293
|
+
try {
|
|
294
|
+
return f != null && f.isDemoing.value ? (console.log(`DEMO: Get from ${l}`), f.get(r)) : (console.log(`Get from ${l}`), await ((a = e == null ? void 0 : e.auth) == null ? void 0 : a.tryRefreshToken()), r.overrideHeaders !== !0 && (g = m(r, e)), await fetch(l, {
|
|
295
|
+
method: r.method,
|
|
296
|
+
mode: "cors",
|
|
297
|
+
cache: "no-cache",
|
|
298
|
+
headers: g
|
|
299
|
+
}));
|
|
300
|
+
} catch (c) {
|
|
301
|
+
const u = ` ${c.message}`;
|
|
302
|
+
if (!t)
|
|
303
|
+
return;
|
|
304
|
+
throw c.code == 401 ? c : {
|
|
305
|
+
code: (c == null ? void 0 : c.code) ?? void 0,
|
|
306
|
+
name: "Error",
|
|
307
|
+
message: u
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return y = {
|
|
312
|
+
buildHeaders: m,
|
|
313
|
+
buildQuery: v,
|
|
314
|
+
buildUrl: E,
|
|
315
|
+
deleteItem: M,
|
|
316
|
+
get: R,
|
|
317
|
+
getAll: J,
|
|
318
|
+
getBlob: D,
|
|
319
|
+
// getFetch,
|
|
320
|
+
patch: b,
|
|
321
|
+
post: S,
|
|
322
|
+
request: G,
|
|
323
|
+
uploadImage: z
|
|
324
|
+
}, y;
|
|
325
|
+
}
|
|
326
|
+
export {
|
|
327
|
+
I as createApi,
|
|
328
|
+
C as useApi
|
|
329
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface HelpLink {
|
|
4
|
+
categories?: string[];
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
id: string;
|
|
8
|
+
isAlways?: boolean;
|
|
9
|
+
routeNames?: string[];
|
|
10
|
+
sort?: number;
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
tags?: string[];
|
|
13
|
+
title?: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface CreateAssistantOptions {
|
|
17
|
+
firstFeedbackAfterDays?: number;
|
|
18
|
+
feedbackAfterDays?: number;
|
|
19
|
+
helpMenuRoute?: string;
|
|
20
|
+
hideFeedback?: boolean;
|
|
21
|
+
items: HelpLink[];
|
|
22
|
+
storageKey?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface BTAssistant {
|
|
25
|
+
allItems: HelpLink[];
|
|
26
|
+
doShowDialog: (routeName?: string) => boolean;
|
|
27
|
+
getLinks: (routeName?: string, tags?: string[]) => HelpLink[];
|
|
28
|
+
getPrimaryLinks: (routeName?: string, tags?: string[]) => HelpLink[];
|
|
29
|
+
getSecondaryLinks: (routeName?: string, tags?: string[]) => HelpLink[];
|
|
30
|
+
hideDialogPermanently: (rotueName?: string) => void;
|
|
31
|
+
hideDialogTemporarily: () => void;
|
|
32
|
+
hideFeedback: Ref<boolean>;
|
|
33
|
+
menuRouteName?: string;
|
|
34
|
+
tab: Ref<number>;
|
|
35
|
+
}
|
|
36
|
+
export declare function useAssistant(): BTAssistant;
|
|
37
|
+
export declare function createAssistant(options?: CreateAssistantOptions): BTAssistant;
|
|
38
|
+
export declare function findYouTubeAvatar(url?: string): string | undefined;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useStorage as T } from "@vueuse/core";
|
|
2
|
+
import i from "../bt-core/core/node_modules/luxon/src/datetime.mjs";
|
|
3
|
+
import "../bt-core/core/node_modules/luxon/src/duration.mjs";
|
|
4
|
+
import { ref as d } from "vue";
|
|
5
|
+
let n;
|
|
6
|
+
function F() {
|
|
7
|
+
return n;
|
|
8
|
+
}
|
|
9
|
+
function L(e) {
|
|
10
|
+
if (n != null)
|
|
11
|
+
return n;
|
|
12
|
+
e ?? (e = {
|
|
13
|
+
items: []
|
|
14
|
+
});
|
|
15
|
+
const r = T(e.storageKey ?? "assistant_dialog", {
|
|
16
|
+
feedbackTill: void 0,
|
|
17
|
+
hideTill: void 0,
|
|
18
|
+
items: {}
|
|
19
|
+
}), m = d(), s = d((e == null ? void 0 : e.hideFeedback) == !0), c = d(0);
|
|
20
|
+
function v(u, f) {
|
|
21
|
+
return (e == null ? void 0 : e.items.filter((l) => !!(l.isAlways == !0 || l.routeNames != null && u != null && l.routeNames.some((a) => a == u) || l.tags != null && f != null && l.tags.some((a) => f.some((t) => a == t))))) ?? [];
|
|
22
|
+
}
|
|
23
|
+
function b(u, f) {
|
|
24
|
+
return (e == null ? void 0 : e.items.filter((l) => !!(l.routeNames != null && u != null && l.routeNames.some((a) => a == u) || l.tags != null && f != null && l.tags.some((a) => f.some((t) => a == t))))) ?? [];
|
|
25
|
+
}
|
|
26
|
+
function k(u, f) {
|
|
27
|
+
return (e == null ? void 0 : e.items.filter((l) => !(l.isAlways != !0 || l.routeNames != null && u != null && l.routeNames.some((a) => a == u) || l.tags != null && f != null && l.tags.some((a) => f.some((t) => a == t))))) ?? [];
|
|
28
|
+
}
|
|
29
|
+
function g(u) {
|
|
30
|
+
u != null && (r.value.items[u] = !0);
|
|
31
|
+
}
|
|
32
|
+
function y() {
|
|
33
|
+
m.value == "feedback" && (e == null ? void 0 : e.feedbackAfterDays) != null ? r.value.feedbackTill = i.now().plus({ days: e.feedbackAfterDays }).toString() : r.value.hideTill = i.now().plus({ days: 3 }).toString();
|
|
34
|
+
}
|
|
35
|
+
function h(u) {
|
|
36
|
+
if (m.value = void 0, u == null)
|
|
37
|
+
return !1;
|
|
38
|
+
const f = i.now().toString();
|
|
39
|
+
if (((e == null ? void 0 : e.firstFeedbackAfterDays) != null || (e == null ? void 0 : e.feedbackAfterDays) != null) && (r.value.feedbackTill == null && (r.value.feedbackTill = i.now().plus({ days: (e == null ? void 0 : e.firstFeedbackAfterDays) ?? (e == null ? void 0 : e.feedbackAfterDays) }).toString()), r.value.feedbackTill < f))
|
|
40
|
+
return c.value = 1, m.value = "feedback", e.feedbackAfterDays != null && (r.value.feedbackTill = i.now().plus({ days: e.feedbackAfterDays }).toString()), !0;
|
|
41
|
+
if (r.value.hideTill != null && r.value.hideTill > f)
|
|
42
|
+
return !1;
|
|
43
|
+
var l = r.value.items[u] != !0 && e.items.some((a) => !!(a.routeNames != null && a.routeNames.some((t) => t == u)));
|
|
44
|
+
return l ? (c.value = 0, m.value = "help", !0) : !1;
|
|
45
|
+
}
|
|
46
|
+
return n = {
|
|
47
|
+
allItems: e.items ?? [],
|
|
48
|
+
doShowDialog: h,
|
|
49
|
+
getLinks: v,
|
|
50
|
+
getPrimaryLinks: b,
|
|
51
|
+
getSecondaryLinks: k,
|
|
52
|
+
hideFeedback: s,
|
|
53
|
+
menuRouteName: e.helpMenuRoute,
|
|
54
|
+
hideDialogPermanently: g,
|
|
55
|
+
hideDialogTemporarily: y,
|
|
56
|
+
tab: c
|
|
57
|
+
}, n;
|
|
58
|
+
}
|
|
59
|
+
function N(e) {
|
|
60
|
+
if (e != null) {
|
|
61
|
+
var r = e.split("?v=");
|
|
62
|
+
if (!(r.length < 2) && (r = r[1].split("&"), r[0] != null))
|
|
63
|
+
return `http://img.youtube.com/vi/${r[0]}/0.jpg`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
L as createAssistant,
|
|
68
|
+
N as findYouTubeAvatar,
|
|
69
|
+
F as useAssistant
|
|
70
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { PermissionGroup } from './navigation.ts';
|
|
2
|
+
import { Ref, ComputedRef } from 'vue';
|
|
3
|
+
import { Router } from 'vue-router';
|
|
4
|
+
import { BTCreateMenu } from '../composables/menu.ts';
|
|
5
|
+
import { RemovableRef } from '@vueuse/core';
|
|
6
|
+
|
|
7
|
+
export interface AuthItem {
|
|
8
|
+
children?: AuthItem[];
|
|
9
|
+
ignoreSuspension?: boolean;
|
|
10
|
+
permissions?: PermissionGroup | PermissionGroup[];
|
|
11
|
+
requiresAuth?: boolean;
|
|
12
|
+
subscriptions?: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface AuthSubscription {
|
|
15
|
+
code: string;
|
|
16
|
+
value: number;
|
|
17
|
+
}
|
|
18
|
+
export interface BaseAuthCredentials {
|
|
19
|
+
expiresOn?: string;
|
|
20
|
+
isGlobalAdmin?: boolean;
|
|
21
|
+
isLoggedIn?: boolean;
|
|
22
|
+
isSuspended?: boolean;
|
|
23
|
+
permissions?: string;
|
|
24
|
+
refreshExpiresOn?: string;
|
|
25
|
+
refreshToken?: string;
|
|
26
|
+
subscriptionCode?: string;
|
|
27
|
+
timeZone?: string;
|
|
28
|
+
token?: string;
|
|
29
|
+
userID?: string;
|
|
30
|
+
userPermissions?: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface CreateAuthOptions {
|
|
33
|
+
defaultTimeZone?: string;
|
|
34
|
+
/**expiry token date format. Defaults to 'd/MM/yyyy h:mm:ss a' */
|
|
35
|
+
expiryTokenFormat?: string;
|
|
36
|
+
/**OVERRIDES CORE DEFAULT. retrieve the auth item */
|
|
37
|
+
getAuthItem?: (navName?: string | AuthItem) => AuthItem | null;
|
|
38
|
+
/**OVERRIDES DEFAULT. the url to start the OAuth 2.0 process */
|
|
39
|
+
getAuthorizeUrl?: (redirectPath?: string, state?: string) => string;
|
|
40
|
+
/**OVERRIDES DEFAULT. use the given code and generate the url to convert to an access token */
|
|
41
|
+
getTokenUrl?: (code: string, redirect_uri: string, grant_type: string, client_id: string) => string;
|
|
42
|
+
/**OVERRIDES DEFAULT. */
|
|
43
|
+
getToken?: (code?: string, state?: string) => Promise<void>;
|
|
44
|
+
getTokenTestUrl?: (token: string) => string;
|
|
45
|
+
menu?: BTCreateMenu;
|
|
46
|
+
oauthGrantType?: string;
|
|
47
|
+
oauthClientID?: string;
|
|
48
|
+
/**sets current credentials on top of default function
|
|
49
|
+
* for processing the token payload and applying to state
|
|
50
|
+
*/
|
|
51
|
+
processTokenPayload?: (state: RemovableRef<any>, payload: any) => void;
|
|
52
|
+
router?: Router;
|
|
53
|
+
/**suboptions */
|
|
54
|
+
subscriptionOptions?: AuthSubscription[];
|
|
55
|
+
/**tests whether token is still valid after receiving a 401 Unauthorized Response */
|
|
56
|
+
testToken?: (code?: string) => Promise<boolean>;
|
|
57
|
+
/**where to route to if token is no longer valid */
|
|
58
|
+
tokenInvalidPath?: string;
|
|
59
|
+
/**overrides refresh token and all params below */
|
|
60
|
+
tryRefreshToken?: (authObj?: any) => Promise<void>;
|
|
61
|
+
/**how many minutes left on refresh expiry before refreshing | Defaults to 10,800 (7 days) */
|
|
62
|
+
tokenRefreshMinuteWindow?: number;
|
|
63
|
+
/**if UseTokenRefresh */
|
|
64
|
+
tokenRefreshPath?: string;
|
|
65
|
+
/**whether to use token refreshing */
|
|
66
|
+
useTokenRefresh?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface BTAuth {
|
|
69
|
+
authState: Ref<string>;
|
|
70
|
+
/**Global Admin, everything.edit, *.edit */
|
|
71
|
+
canEdit: (navName?: string) => boolean;
|
|
72
|
+
canEditPermit: (permit: string) => boolean;
|
|
73
|
+
/**Global Admin, everything.view, *.view */
|
|
74
|
+
canView: (navName?: string) => boolean;
|
|
75
|
+
canViewPermit: (permit: string) => boolean;
|
|
76
|
+
credentials: RemovableRef<any>;
|
|
77
|
+
doShow: (subcodes?: string[], permissions?: PermissionGroup | PermissionGroup[], action?: 'view' | 'edit') => boolean;
|
|
78
|
+
doShowByNav: (navName?: string | AuthItem, includeChildren?: boolean) => boolean;
|
|
79
|
+
getAuthorizeUrl: (redirectPath?: string) => string;
|
|
80
|
+
getToken: (code?: string, state?: string) => Promise<void>;
|
|
81
|
+
isLoggedIn: ComputedRef<boolean>;
|
|
82
|
+
login: (redirectPath?: string, query?: any) => void;
|
|
83
|
+
logout: (navNameRedirect?: string) => void;
|
|
84
|
+
refreshTokenExpired: () => boolean;
|
|
85
|
+
resetAuthState: () => void;
|
|
86
|
+
setAuth: (jwtToken?: string) => void;
|
|
87
|
+
testToken: () => Promise<boolean>;
|
|
88
|
+
timeZone: ComputedRef<string>;
|
|
89
|
+
tokenExpired: () => boolean;
|
|
90
|
+
tryLogin: (redirectPath?: string, query?: any) => boolean | undefined;
|
|
91
|
+
tryRefreshToken: () => Promise<void>;
|
|
92
|
+
}
|
|
93
|
+
export declare function useAuth(): BTAuth;
|
|
94
|
+
export declare function createAuth(options: CreateAuthOptions): BTAuth;
|