@juo/orion-extensions 0.14.1 → 0.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/extensions.js +60 -29
  2. package/package.json +2 -2
@@ -31533,6 +31533,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
31533
31533
  const props = __props;
31534
31534
  const workflowService = useContext$2(WorkflowServiceContext);
31535
31535
  const isLoading = computed(() => workflowService.isLoading.value);
31536
+ const canRespond = computed(() => workflowService.canRespond.value);
31536
31537
  const actionConfig = computed(
31537
31538
  () => {
31538
31539
  var _a;
@@ -31845,7 +31846,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
31845
31846
  createVNode(unref(UiButton), {
31846
31847
  variant: "solid",
31847
31848
  size: "lg",
31848
- disabled: isLoading.value,
31849
+ disabled: isLoading.value || !canRespond.value,
31849
31850
  class: "w-[200px]",
31850
31851
  handler: () => unref(workflowService).respond("accepted")
31851
31852
  }, {
@@ -31857,7 +31858,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
31857
31858
  createVNode(unref(UiButton), {
31858
31859
  variant: _ctx.secondaryButton === "outline" ? "outline" : "link",
31859
31860
  size: _ctx.secondaryButton === "outline" ? "lg" : void 0,
31860
- disabled: isLoading.value,
31861
+ disabled: isLoading.value || !canRespond.value,
31861
31862
  class: "w-[200px]",
31862
31863
  handler: () => unref(workflowService).respond("declined")
31863
31864
  }, {
@@ -32150,6 +32151,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
32150
32151
  const workflowService = useContext$2(WorkflowServiceContext);
32151
32152
  const productService = useContext$2(ProductServiceContext);
32152
32153
  const isLoading = computed(() => workflowService.isLoading.value);
32154
+ const canRespond = computed(() => workflowService.canRespond.value);
32153
32155
  const actionConfig = computed(
32154
32156
  () => {
32155
32157
  var _a;
@@ -32598,7 +32600,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
32598
32600
  createVNode(unref(UiButton), {
32599
32601
  variant: "solid",
32600
32602
  size: "lg",
32601
- disabled: isLoading.value,
32603
+ disabled: isLoading.value || !canRespond.value,
32602
32604
  class: "w-[200px]",
32603
32605
  handler: () => unref(workflowService).respond("accepted")
32604
32606
  }, {
@@ -32610,7 +32612,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
32610
32612
  createVNode(unref(UiButton), {
32611
32613
  variant: _ctx.secondaryButton === "outline" ? "outline" : "link",
32612
32614
  size: _ctx.secondaryButton === "outline" ? "lg" : void 0,
32613
- disabled: isLoading.value,
32615
+ disabled: isLoading.value || !canRespond.value,
32614
32616
  class: "w-[200px]",
32615
32617
  handler: () => unref(workflowService).respond("declined")
32616
32618
  }, {
@@ -32783,6 +32785,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
32783
32785
  const workflowService = useContext$2(WorkflowServiceContext);
32784
32786
  const subscriptionService = useContext$2(SubscriptionServiceContext);
32785
32787
  const isLoading = computed(() => workflowService.isLoading.value);
32788
+ const canRespond = computed(() => workflowService.canRespond.value);
32786
32789
  const plans = ref([]);
32787
32790
  const selectedPlanIndex = ref(0);
32788
32791
  const isLoadingPlans = ref(true);
@@ -32915,7 +32918,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
32915
32918
  createVNode(unref(UiButton), {
32916
32919
  variant: "solid",
32917
32920
  size: "lg",
32918
- disabled: isLoading.value || plans.value.length === 0,
32921
+ disabled: isLoading.value || plans.value.length === 0 || !canRespond.value,
32919
32922
  class: "w-[200px]",
32920
32923
  handler: handleAccept
32921
32924
  }, {
@@ -32927,7 +32930,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
32927
32930
  createVNode(unref(UiButton), {
32928
32931
  variant: "outline",
32929
32932
  size: "lg",
32930
- disabled: isLoading.value,
32933
+ disabled: isLoading.value || !canRespond.value,
32931
32934
  class: "w-[200px]",
32932
32935
  handler: () => unref(workflowService).respond("declined")
32933
32936
  }, {
@@ -32952,22 +32955,40 @@ const schema$a = {
32952
32955
  properties: {
32953
32956
  headline: {
32954
32957
  type: "string",
32955
- default: defaults$7.headline
32958
+ default: defaults$7.headline,
32959
+ "x-juo-control-type": "inline-text",
32960
+ description: "Headline"
32956
32961
  },
32957
32962
  description: {
32958
32963
  type: "string",
32959
- default: defaults$7.description
32964
+ default: defaults$7.description,
32965
+ "x-juo-control-type": "inline-text",
32966
+ description: "Description"
32960
32967
  },
32961
32968
  dropdownLabel: {
32962
32969
  type: "string",
32963
- default: defaults$7.dropdownLabel
32970
+ default: defaults$7.dropdownLabel,
32971
+ "x-juo-control-type": "inline-text",
32972
+ description: "Dropdown label"
32964
32973
  },
32965
32974
  deliveryEveryPrefix: {
32966
32975
  type: "string",
32967
- default: defaults$7.deliveryEveryPrefix
32976
+ default: defaults$7.deliveryEveryPrefix,
32977
+ "x-juo-control-type": "inline-text",
32978
+ description: "Delivery every prefix"
32979
+ },
32980
+ acceptLabel: {
32981
+ type: "string",
32982
+ default: defaults$7.acceptLabel,
32983
+ "x-juo-control-type": "inline-text",
32984
+ description: "Accept label"
32968
32985
  },
32969
- acceptLabel: { type: "string", default: defaults$7.acceptLabel },
32970
- declineLabel: { type: "string", default: defaults$7.declineLabel }
32986
+ declineLabel: {
32987
+ type: "string",
32988
+ default: defaults$7.declineLabel,
32989
+ "x-juo-control-type": "inline-text",
32990
+ description: "Decline label"
32991
+ }
32971
32992
  },
32972
32993
  required: ["headline"],
32973
32994
  additionalProperties: false
@@ -33016,6 +33037,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
33016
33037
  setup(__props) {
33017
33038
  const workflowService = useContext$2(WorkflowServiceContext);
33018
33039
  const isLoading = computed(() => workflowService.isLoading.value);
33040
+ const canRespond = computed(() => workflowService.canRespond.value);
33019
33041
  return (_ctx, _cache) => {
33020
33042
  return openBlock(), createElementBlock("div", _hoisted_1$9, [
33021
33043
  createVNode(unref(_sfc_main$F), {
@@ -33043,7 +33065,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
33043
33065
  createVNode(unref(UiButton), {
33044
33066
  variant: "solid",
33045
33067
  size: "lg",
33046
- disabled: isLoading.value,
33068
+ disabled: isLoading.value || !canRespond.value,
33047
33069
  handler: () => unref(workflowService).respond("accepted")
33048
33070
  }, {
33049
33071
  default: withCtx(() => [
@@ -33054,7 +33076,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
33054
33076
  createVNode(unref(UiButton), {
33055
33077
  variant: "outline",
33056
33078
  size: "lg",
33057
- disabled: isLoading.value,
33079
+ disabled: isLoading.value || !canRespond.value,
33058
33080
  handler: () => unref(workflowService).respond("declined")
33059
33081
  }, {
33060
33082
  default: withCtx(() => [
@@ -33215,6 +33237,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
33215
33237
  const workflowService = useContext$2(WorkflowServiceContext);
33216
33238
  const productService = useContext$2(ProductServiceContext);
33217
33239
  const isLoading = computed(() => workflowService.isLoading.value);
33240
+ const canRespond = computed(() => workflowService.canRespond.value);
33218
33241
  const allResponses = computed(() => {
33219
33242
  var _a;
33220
33243
  return ((_a = workflowService.currentStepInfo.value) == null ? void 0 : _a.availableResponses) ?? [];
@@ -33704,7 +33727,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
33704
33727
  createVNode(unref(UiButton), {
33705
33728
  variant: "solid",
33706
33729
  size: "lg",
33707
- disabled: isLoading.value || !selectedResponse.value,
33730
+ disabled: isLoading.value || !selectedResponse.value || !canRespond.value,
33708
33731
  class: "w-[200px]",
33709
33732
  handler: handleAccept
33710
33733
  }, {
@@ -33717,7 +33740,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
33717
33740
  key: 0,
33718
33741
  variant: _ctx.secondaryButton === "outline" ? "outline" : "link",
33719
33742
  size: _ctx.secondaryButton === "outline" ? "lg" : void 0,
33720
- disabled: isLoading.value,
33743
+ disabled: isLoading.value || !canRespond.value,
33721
33744
  class: "w-[200px]",
33722
33745
  handler: () => unref(workflowService).respond("declined")
33723
33746
  }, {
@@ -33850,6 +33873,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
33850
33873
  const props = __props;
33851
33874
  const workflowService = useContext$2(WorkflowServiceContext);
33852
33875
  const isLoading = computed(() => workflowService.isLoading.value);
33876
+ const canRespond = computed(() => workflowService.canRespond.value);
33853
33877
  function nextElement(current) {
33854
33878
  const idx = props.elements.indexOf(current);
33855
33879
  return idx >= 0 ? props.elements[idx + 1] : void 0;
@@ -33933,7 +33957,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
33933
33957
  createVNode(unref(UiButton), {
33934
33958
  variant: "solid",
33935
33959
  size: "lg",
33936
- disabled: isLoading.value,
33960
+ disabled: isLoading.value || !canRespond.value,
33937
33961
  class: "w-[200px]",
33938
33962
  handler: () => unref(workflowService).respond("accepted")
33939
33963
  }, {
@@ -33945,7 +33969,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
33945
33969
  createVNode(unref(UiButton), {
33946
33970
  variant: _ctx.secondaryButton === "outline" ? "outline" : "link",
33947
33971
  size: _ctx.secondaryButton === "outline" ? "lg" : void 0,
33948
- disabled: isLoading.value,
33972
+ disabled: isLoading.value || !canRespond.value,
33949
33973
  class: "w-[200px]",
33950
33974
  handler: () => unref(workflowService).respond("declined")
33951
33975
  }, {
@@ -34080,6 +34104,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
34080
34104
  const props = __props;
34081
34105
  const workflowService = useContext$2(WorkflowServiceContext);
34082
34106
  const isLoading = computed(() => workflowService.isLoading.value);
34107
+ const canRespond = computed(() => workflowService.canRespond.value);
34083
34108
  const availableResponses = computed(() => {
34084
34109
  var _a;
34085
34110
  return ((_a = workflowService.currentStepInfo.value) == null ? void 0 : _a.availableResponses) ?? [];
@@ -34219,7 +34244,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
34219
34244
  variant: "solid",
34220
34245
  size: "lg",
34221
34246
  class: "w-[200px]",
34222
- disabled: isLoading.value || !selectedResponse.value,
34247
+ disabled: isLoading.value || !selectedResponse.value || !canRespond.value,
34223
34248
  handler: handleSubmit
34224
34249
  }, {
34225
34250
  default: withCtx(() => [
@@ -34319,6 +34344,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
34319
34344
  setup(__props) {
34320
34345
  const workflowService = useContext$2(WorkflowServiceContext);
34321
34346
  const isLoading = computed(() => workflowService.isLoading.value);
34347
+ const canRespond = computed(() => workflowService.canRespond.value);
34322
34348
  const availableResponses = computed(() => {
34323
34349
  var _a;
34324
34350
  return ((_a = workflowService.currentStepInfo.value) == null ? void 0 : _a.availableResponses) ?? [];
@@ -34355,7 +34381,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
34355
34381
  variant: "solid",
34356
34382
  size: "lg",
34357
34383
  class: "action-choice-btn",
34358
- disabled: isLoading.value,
34384
+ disabled: isLoading.value || !canRespond.value,
34359
34385
  handler: () => unref(workflowService).respond(response.type)
34360
34386
  }, {
34361
34387
  default: withCtx(() => [
@@ -34447,6 +34473,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
34447
34473
  const props = __props;
34448
34474
  const workflowService = useContext$2(WorkflowServiceContext);
34449
34475
  const isLoading = computed(() => workflowService.isLoading.value);
34476
+ const canRespond = computed(() => workflowService.canRespond.value);
34450
34477
  const isVideo = computed(() => {
34451
34478
  if (props.mediaType)
34452
34479
  return props.mediaType === "video";
@@ -34618,7 +34645,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
34618
34645
  createVNode(unref(UiButton), {
34619
34646
  variant: "solid",
34620
34647
  size: "lg",
34621
- disabled: isLoading.value,
34648
+ disabled: isLoading.value || !canRespond.value,
34622
34649
  class: "w-[200px]",
34623
34650
  handler: () => unref(workflowService).respond("continue")
34624
34651
  }, {
@@ -34850,6 +34877,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
34850
34877
  const props = __props;
34851
34878
  const workflowService = useContext$2(WorkflowServiceContext);
34852
34879
  const isLoading = computed(() => workflowService.isLoading.value);
34880
+ const canRespond = computed(() => workflowService.canRespond.value);
34853
34881
  function nextElement(current) {
34854
34882
  const idx = props.elements.indexOf(current);
34855
34883
  return idx >= 0 ? props.elements[idx + 1] : void 0;
@@ -34957,7 +34985,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
34957
34985
  createVNode(unref(UiButton), {
34958
34986
  variant: "outline",
34959
34987
  size: "lg",
34960
- disabled: isLoading.value,
34988
+ disabled: isLoading.value || !canRespond.value,
34961
34989
  class: "w-[234px]",
34962
34990
  handler: () => unref(workflowService).respond("acknowledge")
34963
34991
  }, {
@@ -34973,7 +35001,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
34973
35001
  createVNode(unref(UiButton), {
34974
35002
  variant: "outline",
34975
35003
  size: "lg",
34976
- disabled: isLoading.value,
35004
+ disabled: isLoading.value || !canRespond.value,
34977
35005
  class: "w-[200px]",
34978
35006
  handler: () => unref(workflowService).respond("acknowledge")
34979
35007
  }, {
@@ -35122,6 +35150,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
35122
35150
  const feedback = ref("");
35123
35151
  const workflowService = useContext$2(WorkflowServiceContext);
35124
35152
  const isLoading = computed(() => workflowService.isLoading.value);
35153
+ const canRespond = computed(() => workflowService.canRespond.value);
35125
35154
  function handleSubmit() {
35126
35155
  workflowService.respond("submitted", { feedback: feedback.value });
35127
35156
  }
@@ -35216,7 +35245,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
35216
35245
  createVNode(unref(UiButton), {
35217
35246
  variant: "solid",
35218
35247
  size: "lg",
35219
- disabled: isLoading.value || !feedback.value.trim() && _ctx.required,
35248
+ disabled: isLoading.value || !feedback.value.trim() && _ctx.required || !canRespond.value,
35220
35249
  class: "w-[200px]",
35221
35250
  handler: handleSubmit
35222
35251
  }, {
@@ -35229,7 +35258,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
35229
35258
  key: 0,
35230
35259
  variant: _ctx.secondaryButton === "outline" ? "outline" : "link",
35231
35260
  size: _ctx.secondaryButton === "outline" ? "lg" : void 0,
35232
- disabled: isLoading.value,
35261
+ disabled: isLoading.value || !canRespond.value,
35233
35262
  class: "w-[200px]",
35234
35263
  handler: () => unref(workflowService).respond("skipped")
35235
35264
  }, {
@@ -35395,6 +35424,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
35395
35424
  const props = __props;
35396
35425
  const workflowService = useContext$2(WorkflowServiceContext);
35397
35426
  const isLoading = computed(() => workflowService.isLoading.value);
35427
+ const canRespond = computed(() => workflowService.canRespond.value);
35398
35428
  const benefitProps = ["benefit1", "benefit2", "benefit3", "benefit4", "benefit5"];
35399
35429
  const benefits = computed(() => {
35400
35430
  const count2 = props.benefitCount ?? 0;
@@ -35548,7 +35578,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
35548
35578
  createVNode(unref(UiButton), {
35549
35579
  variant: "solid",
35550
35580
  size: "lg",
35551
- disabled: isLoading.value,
35581
+ disabled: isLoading.value || !canRespond.value,
35552
35582
  class: "w-[200px]",
35553
35583
  handler: () => unref(workflowService).respond("accepted")
35554
35584
  }, {
@@ -35560,7 +35590,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
35560
35590
  createVNode(unref(UiButton), {
35561
35591
  variant: _ctx.secondaryButton === "outline" ? "outline" : "link",
35562
35592
  size: _ctx.secondaryButton === "outline" ? "lg" : void 0,
35563
- disabled: isLoading.value,
35593
+ disabled: isLoading.value || !canRespond.value,
35564
35594
  class: "w-[200px]",
35565
35595
  handler: () => unref(workflowService).respond("declined")
35566
35596
  }, {
@@ -35807,6 +35837,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35807
35837
  const productService = useContext$2(ProductServiceContext);
35808
35838
  const subscriptionService = useContext$2(SubscriptionServiceContext);
35809
35839
  const isLoading = computed(() => workflowService.isLoading.value);
35840
+ const canRespond = computed(() => workflowService.canRespond.value);
35810
35841
  const selections = ref([]);
35811
35842
  const availableProducts = ref([]);
35812
35843
  const subscriptionItems = ref([]);
@@ -35987,7 +36018,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35987
36018
  createVNode(unref(UiButton), {
35988
36019
  variant: "solid",
35989
36020
  size: "lg",
35990
- disabled: isLoading.value || selections.value.length === 0,
36021
+ disabled: isLoading.value || selections.value.length === 0 || !canRespond.value,
35991
36022
  class: "w-[200px]",
35992
36023
  handler: onConfirm
35993
36024
  }, {
@@ -35999,7 +36030,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35999
36030
  createVNode(unref(UiButton), {
36000
36031
  variant: _ctx.secondaryButton === "outline" ? "outline" : "link",
36001
36032
  size: _ctx.secondaryButton === "outline" ? "lg" : void 0,
36002
- disabled: isLoading.value,
36033
+ disabled: isLoading.value || !canRespond.value,
36003
36034
  class: "w-[200px]",
36004
36035
  handler: () => unref(workflowService).respond("declined")
36005
36036
  }, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@juo/orion-extensions",
3
3
  "private": false,
4
- "version": "0.14.1",
4
+ "version": "0.14.3",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -44,7 +44,7 @@
44
44
  "tailwindcss": "3.3.5",
45
45
  "vue": "3.5.13",
46
46
  "@juo/customer-ui": "0.4.1",
47
- "@juo/orion-core": "0.20.1"
47
+ "@juo/orion-core": "0.20.2"
48
48
  },
49
49
  "scripts": {
50
50
  "dev": "vite build -w",