@ouestfrance/sipa-bms-ui 8.5.2 → 8.5.4
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/mockServiceWorker.js +1 -1
- package/dist/sipa-bms-ui.css +28 -22
- package/dist/sipa-bms-ui.es.js +38 -26
- package/dist/sipa-bms-ui.es.js.map +1 -1
- package/dist/sipa-bms-ui.umd.js +38 -26
- package/dist/sipa-bms-ui.umd.js.map +1 -1
- package/package.json +13 -13
- package/src/components/form/BmsSelect.vue +1 -0
- package/src/components/form/RawAutocomplete.vue +15 -14
- package/src/plugins/confirm/index.ts +4 -2
- package/src/plugins/feature-flipper/index.ts +1 -0
- package/src/plugins/field/index.ts +1 -0
- package/src/plugins/notifications/index.ts +1 -0
- package/src/plugins/router-history/index.ts +4 -2
package/dist/sipa-bms-ui.umd.js
CHANGED
|
@@ -38072,7 +38072,7 @@
|
|
|
38072
38072
|
const inputText = vue.ref(
|
|
38073
38073
|
getValidOptionByValue(modelValue.value)?.label ?? ""
|
|
38074
38074
|
);
|
|
38075
|
-
const
|
|
38075
|
+
const showDataList = vue.ref(props.open);
|
|
38076
38076
|
const autocompleteInput = vue.ref(null);
|
|
38077
38077
|
const classes = vue.computed(() => {
|
|
38078
38078
|
return { "is-error": props.errors?.length, "is-disabled": props.disabled };
|
|
@@ -38084,7 +38084,8 @@
|
|
|
38084
38084
|
emits("select", option);
|
|
38085
38085
|
const existingOption = getValidOptionByLabel(option.label) || getValidOptionByValue(option.value);
|
|
38086
38086
|
modelValue.value = existingOption?.value ?? null;
|
|
38087
|
-
|
|
38087
|
+
showDataList.value = false;
|
|
38088
|
+
setFocus();
|
|
38088
38089
|
};
|
|
38089
38090
|
const displayItem = (option) => {
|
|
38090
38091
|
const existingOption = getValidOptionByLabel(option.label) || getValidOptionByValue(option.value);
|
|
@@ -38109,19 +38110,24 @@
|
|
|
38109
38110
|
}
|
|
38110
38111
|
);
|
|
38111
38112
|
const onInput = () => {
|
|
38112
|
-
|
|
38113
|
+
showDataList.value = true;
|
|
38113
38114
|
if (inputText.value === "") {
|
|
38114
38115
|
clearInput();
|
|
38115
38116
|
}
|
|
38116
38117
|
};
|
|
38117
38118
|
const setFocus = () => {
|
|
38118
38119
|
if (autocompleteInput.value) {
|
|
38119
|
-
autocompleteInput.value.
|
|
38120
|
+
autocompleteInput.value.setFocus();
|
|
38120
38121
|
}
|
|
38121
38122
|
};
|
|
38122
38123
|
const clearInput = () => {
|
|
38123
38124
|
inputText.value = "";
|
|
38124
38125
|
modelValue.value = null;
|
|
38126
|
+
setFocus();
|
|
38127
|
+
};
|
|
38128
|
+
const toggleList = () => {
|
|
38129
|
+
showDataList.value = !showDataList.value;
|
|
38130
|
+
setFocus();
|
|
38125
38131
|
};
|
|
38126
38132
|
__expose({
|
|
38127
38133
|
setFocus
|
|
@@ -38132,13 +38138,13 @@
|
|
|
38132
38138
|
datalist: vue.withCtx(() => [
|
|
38133
38139
|
vue.withDirectives(vue.createVNode(FieldDatalist, {
|
|
38134
38140
|
"data-testid": "autocomplete-menu",
|
|
38135
|
-
"is-input-focused":
|
|
38141
|
+
"is-input-focused": showDataList.value,
|
|
38136
38142
|
"can-add-new-option": _ctx.canAddNewOption,
|
|
38137
38143
|
"new-option": inputText.value,
|
|
38138
38144
|
options: filteredMenuItems.value,
|
|
38139
38145
|
small: _ctx.small,
|
|
38140
38146
|
onSelect: selectItem,
|
|
38141
|
-
onAddNewOption: _cache[
|
|
38147
|
+
onAddNewOption: _cache[1] || (_cache[1] = (option) => emits("addNewOption", option))
|
|
38142
38148
|
}, {
|
|
38143
38149
|
option: vue.withCtx(({ option }) => [
|
|
38144
38150
|
vue.renderSlot(_ctx.$slots, "option", { option }, () => [
|
|
@@ -38147,7 +38153,7 @@
|
|
|
38147
38153
|
]),
|
|
38148
38154
|
_: 3
|
|
38149
38155
|
}, 8, ["is-input-focused", "can-add-new-option", "new-option", "options", "small"]), [
|
|
38150
|
-
[vue.vShow,
|
|
38156
|
+
[vue.vShow, showDataList.value]
|
|
38151
38157
|
])
|
|
38152
38158
|
]),
|
|
38153
38159
|
default: vue.withCtx(() => [
|
|
@@ -38155,16 +38161,14 @@
|
|
|
38155
38161
|
ref_key: "autocompleteInput",
|
|
38156
38162
|
ref: autocompleteInput,
|
|
38157
38163
|
modelValue: inputText.value,
|
|
38158
|
-
"onUpdate:modelValue": _cache[
|
|
38164
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputText.value = $event),
|
|
38159
38165
|
type: vue.unref(InputType).TEXT,
|
|
38160
38166
|
disabled: _ctx.disabled,
|
|
38161
38167
|
class: vue.normalizeClass(classes.value),
|
|
38162
38168
|
placeholder: _ctx.placeholder,
|
|
38163
38169
|
required: _ctx.required,
|
|
38164
38170
|
small: _ctx.small,
|
|
38165
|
-
onInput
|
|
38166
|
-
focus: isInputFocused.value,
|
|
38167
|
-
"onUpdate:focus": _cache[2] || (_cache[2] = ($event) => isInputFocused.value = $event)
|
|
38171
|
+
onInput
|
|
38168
38172
|
}, {
|
|
38169
38173
|
"icon-start": vue.withCtx(() => [
|
|
38170
38174
|
vue.renderSlot(_ctx.$slots, "icon-start", {}, void 0, true)
|
|
@@ -38180,14 +38184,14 @@
|
|
|
38180
38184
|
])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
38181
38185
|
key: 1,
|
|
38182
38186
|
class: "icon",
|
|
38183
|
-
onClick:
|
|
38187
|
+
onClick: vue.withModifiers(toggleList, ["stop"])
|
|
38184
38188
|
}, [
|
|
38185
|
-
!
|
|
38189
|
+
!showDataList.value ? (vue.openBlock(), vue.createBlock(vue.unref(ChevronDown), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(ChevronUp), { key: 1 }))
|
|
38186
38190
|
]))
|
|
38187
38191
|
], true)
|
|
38188
38192
|
]),
|
|
38189
38193
|
_: 3
|
|
38190
|
-
}, 8, ["modelValue", "type", "disabled", "class", "placeholder", "required", "small"
|
|
38194
|
+
}, 8, ["modelValue", "type", "disabled", "class", "placeholder", "required", "small"])
|
|
38191
38195
|
]),
|
|
38192
38196
|
_: 3
|
|
38193
38197
|
}, 16);
|
|
@@ -38195,7 +38199,7 @@
|
|
|
38195
38199
|
}
|
|
38196
38200
|
});
|
|
38197
38201
|
|
|
38198
|
-
const RawAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-
|
|
38202
|
+
const RawAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-5d665f68"]]);
|
|
38199
38203
|
|
|
38200
38204
|
const _hoisted_1$N = ["innerHTML"];
|
|
38201
38205
|
const _hoisted_2$v = ["innerHTML"];
|
|
@@ -38521,8 +38525,8 @@
|
|
|
38521
38525
|
default: vue.withCtx(() => [
|
|
38522
38526
|
vue.createVNode(vue.unref(Trash2))
|
|
38523
38527
|
]),
|
|
38524
|
-
_:
|
|
38525
|
-
},
|
|
38528
|
+
_: 1
|
|
38529
|
+
}, 8, ["onClick"])
|
|
38526
38530
|
]);
|
|
38527
38531
|
}), 128)) : vue.createCommentVNode("", true)
|
|
38528
38532
|
]))
|
|
@@ -67781,8 +67785,8 @@
|
|
|
67781
67785
|
default: vue.withCtx(() => [
|
|
67782
67786
|
vue.createVNode(vue.unref(CircleX))
|
|
67783
67787
|
]),
|
|
67784
|
-
_:
|
|
67785
|
-
},
|
|
67788
|
+
_: 1
|
|
67789
|
+
}, 8, ["mode", "onClick"])
|
|
67786
67790
|
], 2);
|
|
67787
67791
|
}), 128))
|
|
67788
67792
|
], 2)) : vue.createCommentVNode("", true)
|
|
@@ -85453,6 +85457,7 @@
|
|
|
85453
85457
|
});
|
|
85454
85458
|
const selectItem = (option) => {
|
|
85455
85459
|
modelValue.value = option.value;
|
|
85460
|
+
setFocus();
|
|
85456
85461
|
open.value = false;
|
|
85457
85462
|
};
|
|
85458
85463
|
const setFocus = () => {
|
|
@@ -85511,7 +85516,7 @@
|
|
|
85511
85516
|
}
|
|
85512
85517
|
});
|
|
85513
85518
|
|
|
85514
|
-
const BmsSelect = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-
|
|
85519
|
+
const BmsSelect = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-6e3f7aab"]]);
|
|
85515
85520
|
|
|
85516
85521
|
const _hoisted_1$E = { class: "dismiss-button" };
|
|
85517
85522
|
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -90375,8 +90380,8 @@
|
|
|
90375
90380
|
default: vue.withCtx(() => [
|
|
90376
90381
|
vue.createVNode(vue.unref(Trash))
|
|
90377
90382
|
]),
|
|
90378
|
-
_:
|
|
90379
|
-
},
|
|
90383
|
+
_: 1
|
|
90384
|
+
}, 8, ["mode", "onClick"])
|
|
90380
90385
|
], 40, _hoisted_1$g),
|
|
90381
90386
|
vue.createElementVNode("div", {
|
|
90382
90387
|
class: "separator",
|
|
@@ -101506,6 +101511,7 @@
|
|
|
101506
101511
|
}
|
|
101507
101512
|
});
|
|
101508
101513
|
app.component("bms-notifications", NotificationWidget);
|
|
101514
|
+
app.component("BmsNotifications", NotificationWidget);
|
|
101509
101515
|
}
|
|
101510
101516
|
};
|
|
101511
101517
|
function useNotifications() {
|
|
@@ -101949,6 +101955,7 @@
|
|
|
101949
101955
|
install: (app, initialFeatures) => {
|
|
101950
101956
|
const { initFeatures } = useFeatureFlipper();
|
|
101951
101957
|
initFeatures(initialFeatures);
|
|
101958
|
+
app.component("BmsFeatureFlipper", _sfc_main$1);
|
|
101952
101959
|
app.component("bms-feature-flipper", _sfc_main$1);
|
|
101953
101960
|
}
|
|
101954
101961
|
};
|
|
@@ -102113,6 +102120,7 @@
|
|
|
102113
102120
|
}
|
|
102114
102121
|
});
|
|
102115
102122
|
app.component("field", _sfc_main);
|
|
102123
|
+
app.component("Field", _sfc_main);
|
|
102116
102124
|
}
|
|
102117
102125
|
};
|
|
102118
102126
|
|
|
@@ -104129,11 +104137,13 @@
|
|
|
104129
104137
|
});
|
|
104130
104138
|
}
|
|
104131
104139
|
);
|
|
104132
|
-
|
|
104140
|
+
const confirm = {
|
|
104133
104141
|
render() {
|
|
104134
104142
|
return vue.h("div", { id: "confirm" });
|
|
104135
104143
|
}
|
|
104136
|
-
}
|
|
104144
|
+
};
|
|
104145
|
+
app.component("BmsConfirm", confirm);
|
|
104146
|
+
app.component("bms-confirm", confirm);
|
|
104137
104147
|
}
|
|
104138
104148
|
};
|
|
104139
104149
|
function useConfirm() {
|
|
@@ -104165,7 +104175,7 @@
|
|
|
104165
104175
|
|
|
104166
104176
|
const routerHistoryPlugin = {
|
|
104167
104177
|
install(app) {
|
|
104168
|
-
|
|
104178
|
+
const history = {
|
|
104169
104179
|
setup() {
|
|
104170
104180
|
const { addHistoryRoute } = useRouterHistory();
|
|
104171
104181
|
const currentRoute = vueRouter.useRoute();
|
|
@@ -104176,7 +104186,9 @@
|
|
|
104176
104186
|
render() {
|
|
104177
104187
|
return "";
|
|
104178
104188
|
}
|
|
104179
|
-
}
|
|
104189
|
+
};
|
|
104190
|
+
app.component("BmsRouterHistory", history);
|
|
104191
|
+
app.component("bms-router-history", history);
|
|
104180
104192
|
}
|
|
104181
104193
|
};
|
|
104182
104194
|
|