@bagelink/vue 0.0.1303 → 1.0.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.
@@ -1,6 +1,6 @@
1
1
  import { TableSchemaProps } from '../types/TableSchema';
2
2
  declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & (Omit<TableSchemaProps<T>, "modelValue"> & {
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & (Omit<TableSchemaProps<T>, "data"> & {
4
4
  modelValue: T;
5
5
  includeUnset?: boolean;
6
6
  }) & Partial<{}>> & import('vue').PublicProps;
@@ -1 +1 @@
1
- {"version":3,"file":"DataPreview.vue.d.ts","sourceRoot":"","sources":["../../src/components/DataPreview.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;yBAK3C,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAqF1D,mBAAmB,CAAC;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,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -18,6 +18,7 @@ interface NumberInputProps {
18
18
  layout?: NumberLayout;
19
19
  center?: boolean;
20
20
  padZero?: number;
21
+ useGrouping?: boolean;
21
22
  }
22
23
  declare const _default: import('vue').DefineComponent<NumberInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
24
  "update:modelValue": (...args: any[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/NumberInput.vue"],"names":[],"mappings":"AAuOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAI7C,KAAK,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAA;AAEzD,UAAU,gBAAgB;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,QAAQ,CAAA;IACpB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;;;;;;AA6VD,wBAQG"}
1
+ {"version":3,"file":"NumberInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/NumberInput.vue"],"names":[],"mappings":"AAyOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAI7C,KAAK,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAA;AAEzD,UAAU,gBAAgB;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,QAAQ,CAAA;IACpB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;;;;;;AA8VD,wBAQG"}
package/dist/index.cjs CHANGED
@@ -10766,7 +10766,6 @@ const _hoisted_1$N = { class: "data-preview" };
10766
10766
  const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
10767
10767
  __name: "DataPreview",
10768
10768
  props: {
10769
- data: {},
10770
10769
  schema: { type: Function },
10771
10770
  showFields: {},
10772
10771
  useServerSort: { type: Boolean },
@@ -10805,7 +10804,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
10805
10804
  };
10806
10805
  }
10807
10806
  });
10808
- const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-32cd138c"]]);
10807
+ const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-74c7df87"]]);
10809
10808
  function useTableSelection(options) {
10810
10809
  const allSelectorEl = vue.ref();
10811
10810
  const computedSelectedItems = vue.computed(() => options.selectedItems.value);
@@ -17330,7 +17329,8 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
17330
17329
  helptext: {},
17331
17330
  layout: {},
17332
17331
  center: { type: Boolean },
17333
- padZero: { default: 1 }
17332
+ padZero: { default: 1 },
17333
+ useGrouping: { type: Boolean, default: true }
17334
17334
  },
17335
17335
  emits: ["update:modelValue"],
17336
17336
  setup(__props, { emit: __emit }) {
@@ -17372,7 +17372,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
17372
17372
  const formatter = new Intl.NumberFormat("en-US", {
17373
17373
  minimumFractionDigits: 0,
17374
17374
  maximumFractionDigits: 20,
17375
- useGrouping: true
17375
+ useGrouping: __props.useGrouping
17376
17376
  });
17377
17377
  const formattedNum = formatter.format(num);
17378
17378
  const [integerPart, decimalPart] = formattedNum.split(".");
@@ -17435,7 +17435,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
17435
17435
  readonly: _ctx.disabled,
17436
17436
  inputmode: "decimal",
17437
17437
  autocomplete: "off",
17438
- pattern: "^-?\\d*\\.?\\d*$",
17438
+ pattern: "^-?\\d{1,3}(,\\d{3})*(\\.\\d+)?$",
17439
17439
  autocorrect: "off",
17440
17440
  spellcheck: "false",
17441
17441
  onInput: inputHandler,
@@ -17501,7 +17501,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
17501
17501
  };
17502
17502
  }
17503
17503
  });
17504
- const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-8f9331b5"]]);
17504
+ const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-a3a46563"]]);
17505
17505
  const _hoisted_1$z = ["value", "autofocus", "onKeydown", "onPaste"];
17506
17506
  const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
17507
17507
  __name: "OTP",
package/dist/index.mjs CHANGED
@@ -10764,7 +10764,6 @@ const _hoisted_1$N = { class: "data-preview" };
10764
10764
  const _sfc_main$Y = /* @__PURE__ */ defineComponent({
10765
10765
  __name: "DataPreview",
10766
10766
  props: {
10767
- data: {},
10768
10767
  schema: { type: Function },
10769
10768
  showFields: {},
10770
10769
  useServerSort: { type: Boolean },
@@ -10803,7 +10802,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
10803
10802
  };
10804
10803
  }
10805
10804
  });
10806
- const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-32cd138c"]]);
10805
+ const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-74c7df87"]]);
10807
10806
  function useTableSelection(options) {
10808
10807
  const allSelectorEl = ref();
10809
10808
  const computedSelectedItems = computed(() => options.selectedItems.value);
@@ -17328,7 +17327,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
17328
17327
  helptext: {},
17329
17328
  layout: {},
17330
17329
  center: { type: Boolean },
17331
- padZero: { default: 1 }
17330
+ padZero: { default: 1 },
17331
+ useGrouping: { type: Boolean, default: true }
17332
17332
  },
17333
17333
  emits: ["update:modelValue"],
17334
17334
  setup(__props, { emit: __emit }) {
@@ -17370,7 +17370,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
17370
17370
  const formatter = new Intl.NumberFormat("en-US", {
17371
17371
  minimumFractionDigits: 0,
17372
17372
  maximumFractionDigits: 20,
17373
- useGrouping: true
17373
+ useGrouping: __props.useGrouping
17374
17374
  });
17375
17375
  const formattedNum = formatter.format(num);
17376
17376
  const [integerPart, decimalPart] = formattedNum.split(".");
@@ -17433,7 +17433,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
17433
17433
  readonly: _ctx.disabled,
17434
17434
  inputmode: "decimal",
17435
17435
  autocomplete: "off",
17436
- pattern: "^-?\\d*\\.?\\d*$",
17436
+ pattern: "^-?\\d{1,3}(,\\d{3})*(\\.\\d+)?$",
17437
17437
  autocorrect: "off",
17438
17438
  spellcheck: "false",
17439
17439
  onInput: inputHandler,
@@ -17499,7 +17499,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
17499
17499
  };
17500
17500
  }
17501
17501
  });
17502
- const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-8f9331b5"]]);
17502
+ const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-a3a46563"]]);
17503
17503
  const _hoisted_1$z = ["value", "autofocus", "onKeydown", "onPaste"];
17504
17504
  const _sfc_main$G = /* @__PURE__ */ defineComponent({
17505
17505
  __name: "OTP",
package/dist/style.css CHANGED
@@ -995,23 +995,23 @@ display: block;
995
995
  }
996
996
  }
997
997
 
998
- .data-preview[data-v-32cd138c] {
998
+ .data-preview[data-v-74c7df87] {
999
999
  display: flex;
1000
1000
  flex-direction: column;
1001
1001
  gap: 0.5rem;
1002
1002
  }
1003
- .preview-field[data-v-32cd138c] {
1003
+ .preview-field[data-v-74c7df87] {
1004
1004
  display: flex;
1005
1005
  flex-direction: row;
1006
1006
  align-items: center;
1007
1007
  gap: 0.5rem;
1008
1008
  }
1009
- .field-label[data-v-32cd138c] {
1009
+ .field-label[data-v-74c7df87] {
1010
1010
  font-size: 0.8rem;
1011
1011
  color: var(--bgl-black-tint);
1012
1012
  font-weight: 500;
1013
1013
  }
1014
- .field-value[data-v-32cd138c] {
1014
+ .field-value[data-v-74c7df87] {
1015
1015
  font-size: 0.95rem;
1016
1016
  }
1017
1017
 
@@ -1847,14 +1847,14 @@ pre code.hljs{
1847
1847
  direction: ltr;
1848
1848
  }
1849
1849
 
1850
- .txtInputIconStart .iconStart[data-v-8f9331b5] {
1850
+ .txtInputIconStart .iconStart[data-v-a3a46563] {
1851
1851
  color: var(--input-color);
1852
1852
  position: absolute;
1853
1853
  inset-inline-start:calc(var(--input-height) / 3 - 0.25rem);
1854
1854
  margin-top: calc(var(--input-height) / 2 );
1855
1855
  line-height: 0;
1856
1856
  }
1857
- .textInputSpinnerWrap .spinner[data-v-8f9331b5] {
1857
+ .textInputSpinnerWrap .spinner[data-v-a3a46563] {
1858
1858
  color: var(--input-color);
1859
1859
  position: absolute;
1860
1860
  inset-inline-end: 0;
@@ -1864,18 +1864,18 @@ pre code.hljs{
1864
1864
  flex-direction: column;
1865
1865
  gap: 0;
1866
1866
  }
1867
- .top-bgl-ctrl-num-btn[data-v-8f9331b5]{
1867
+ .top-bgl-ctrl-num-btn[data-v-a3a46563]{
1868
1868
  margin-top: calc(var(--input-height) / 10) !important;
1869
1869
  }
1870
- .bgl-ctrl-num-btn[data-v-8f9331b5]{
1870
+ .bgl-ctrl-num-btn[data-v-a3a46563]{
1871
1871
  height: calc(var(--input-height) / 2.5) !important;
1872
1872
  isolation: isolate;
1873
1873
  }
1874
- .bgl-big-ctrl-num-btn[data-v-8f9331b5]{
1874
+ .bgl-big-ctrl-num-btn[data-v-a3a46563]{
1875
1875
  width: 100% !important;
1876
1876
  isolation: isolate;
1877
1877
  }
1878
- .bgl-number-input[data-v-8f9331b5]{
1878
+ .bgl-number-input[data-v-a3a46563]{
1879
1879
  padding-inline-end: 1.75rem !important;
1880
1880
  }
1881
1881
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.1303",
4
+ "version": "1.0.3",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -6,7 +6,7 @@ import { computed, useSlots } from 'vue'
6
6
  import { useSchemaField } from '../composables/useSchemaField'
7
7
  import { useTableData } from './DataTable/useTableData'
8
8
 
9
- const props = defineProps<Omit<TableSchemaProps<T>, 'modelValue'> & { modelValue: T, includeUnset?: boolean }>()
9
+ const props = defineProps<Omit<TableSchemaProps<T>, 'data'> & { modelValue: T, includeUnset?: boolean }>()
10
10
  const slots = useSlots() as Slots & Record<string, (props: { row: T, field: BaseBagelField<T> }) => any>
11
11
 
12
12
  const data = computed(() => Array.isArray(props.modelValue) ? props.modelValue : [props.modelValue])
@@ -23,6 +23,7 @@ interface NumberInputProps {
23
23
  layout?: NumberLayout
24
24
  center?: boolean
25
25
  padZero?: number
26
+ useGrouping?: boolean
26
27
  }
27
28
 
28
29
  const {
@@ -41,7 +42,8 @@ const {
41
42
  layout,
42
43
  id,
43
44
  padZero = 1,
44
- defaultValue
45
+ defaultValue,
46
+ useGrouping = true
45
47
  } = defineProps<NumberInputProps>()
46
48
 
47
49
  const emit = defineEmits(['update:modelValue'])
@@ -90,7 +92,7 @@ function formatNumber(num: number) {
90
92
  const formatter = new Intl.NumberFormat('en-US', {
91
93
  minimumFractionDigits: 0,
92
94
  maximumFractionDigits: 20,
93
- useGrouping: true
95
+ useGrouping
94
96
  })
95
97
 
96
98
  const formattedNum = formatter.format(num)
@@ -161,7 +163,7 @@ watch(() => modelValue, (newVal) => {
161
163
  :readonly="disabled"
162
164
  inputmode="decimal"
163
165
  autocomplete="off"
164
- pattern="^-?\d*\.?\d*$"
166
+ pattern="^-?\d{1,3}(,\d{3})*(\.\d+)?$"
165
167
  autocorrect="off"
166
168
  spellcheck="false"
167
169
  @input="inputHandler"