@streamline-pulse/formkrafter-wc 0.2.0 → 0.3.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.
Files changed (106) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/fk-brick-actions_18.cjs.entry.js +188 -22407
  3. package/dist/cjs/formkrafter-wc.cjs.js +2 -2
  4. package/dist/cjs/index-Bhy1RJMV.js +3042 -0
  5. package/dist/cjs/{index-CbyFxLc_.js → index-CImTe9BG.js} +14 -2
  6. package/dist/cjs/index-CdaT3-qx.js +5444 -0
  7. package/dist/cjs/{index-Can2MpG5.js → index-CkPPRg03.js} +27 -17
  8. package/dist/cjs/index-DHgK3reD.js +12233 -0
  9. package/dist/cjs/index-Ds0sDbXV.js +4019 -0
  10. package/dist/cjs/index-c9BL7y3N.js +1922 -0
  11. package/dist/cjs/index.cjs.js +2 -2
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/collection/components/fk-code-editor/fk-code-editor.js +17 -8
  14. package/dist/collection/components/fk-file-input/fk-file-input.js +67 -24
  15. package/dist/collection/components/fk-property-panel/fk-property-panel.js +5 -1
  16. package/dist/collection/components/fk-select-input/fk-select-input.css +9 -0
  17. package/dist/collection/components/fk-select-input/fk-select-input.js +118 -20
  18. package/dist/collection/components/fk-stepper/fk-stepper.css +14 -0
  19. package/dist/collection/components/fk-stepper/fk-stepper.js +4 -1
  20. package/dist/collection/components/fk-tabs/fk-tabs.js +15 -2
  21. package/dist/collection/i18n/i18n.js +8 -0
  22. package/dist/collection/registry/default-bricks.js +16 -14
  23. package/dist/components/fk-brick-actions.js +1 -1
  24. package/dist/components/fk-brick-list.js +1 -1
  25. package/dist/components/fk-brick-mold-item.js +1 -1
  26. package/dist/components/fk-brick-not-found.js +1 -1
  27. package/dist/components/fk-brick-render.js +1 -1
  28. package/dist/components/fk-code-editor.js +1 -1
  29. package/dist/components/fk-data-grid.js +1 -1
  30. package/dist/components/fk-drop-area.js +1 -1
  31. package/dist/components/fk-empty-form.js +1 -1
  32. package/dist/components/fk-file-input.js +1 -1
  33. package/dist/components/fk-form-builder.js +1 -1
  34. package/dist/components/fk-form-render.js +1 -1
  35. package/dist/components/fk-property-panel.js +1 -1
  36. package/dist/components/fk-rules-editor.js +1 -1
  37. package/dist/components/fk-select-input.js +1 -1
  38. package/dist/components/fk-signature-input.js +1 -1
  39. package/dist/components/fk-stepper.js +1 -1
  40. package/dist/components/fk-tabs.js +1 -1
  41. package/dist/components/index.js +1 -1
  42. package/dist/components/{p-B0YjIsVn.js → p--vL6GR31.js} +1 -1
  43. package/dist/components/p-4COASNrZ.js +1 -0
  44. package/dist/components/p-BB4Llg42.js +1 -0
  45. package/dist/components/p-BGkZP87K.js +1 -0
  46. package/dist/components/p-BOmBVgfJ.js +1 -0
  47. package/dist/components/p-BWdm2a6q.js +1 -0
  48. package/dist/components/{p-GjmAhT2E.js → p-B_-x-GlA.js} +1 -1
  49. package/dist/components/p-Br1s4Ujx.js +1 -0
  50. package/dist/components/p-C-wnqV3i.js +1 -0
  51. package/dist/components/{p-BDvqHJih.js → p-CIfjRTky.js} +1 -1
  52. package/dist/components/{p-LXnm2ogM.js → p-CKMHMpID.js} +1 -1
  53. package/dist/components/p-CUF31e-P.js +1 -0
  54. package/dist/components/p-D6n74M9d.js +1 -0
  55. package/dist/components/{p-CXEvsomA.js → p-DFe3zZCI.js} +1 -1
  56. package/dist/components/p-DMCkrZqi.js +1 -0
  57. package/dist/components/p-DOInQkG6.js +1 -0
  58. package/dist/components/{p-BVBfbMl_.js → p-DYchD23x.js} +1 -1
  59. package/dist/components/p-DtcM1yw5.js +1 -0
  60. package/dist/components/p-NDbmiiYk.js +1 -0
  61. package/dist/components/p-PAr7WoWG.js +1 -0
  62. package/dist/components/{p-y0xDvzJR.js → p-YyGnQmX-.js} +1 -1
  63. package/dist/components/{p-C85zhhpr.js → p-fDJP6whN.js} +1 -1
  64. package/dist/components/p-swxZqinH.js +1 -0
  65. package/dist/components/{p-BSPTuA1p.js → p-v7LxwCAc.js} +1 -1
  66. package/dist/components/p-wuC5rVU7.js +1 -0
  67. package/dist/esm/fk-brick-actions_18.entry.js +188 -22407
  68. package/dist/esm/formkrafter-wc.js +3 -3
  69. package/dist/esm/index-BAcz7b5u.js +5416 -0
  70. package/dist/esm/index-BkRMoLXK.js +3029 -0
  71. package/dist/esm/index-CGMDfZ5m.js +1808 -0
  72. package/dist/esm/{index-BB2OOj__.js → index-D7Cta1UB.js} +27 -17
  73. package/dist/esm/index-DtcM1yw5.js +3991 -0
  74. package/dist/esm/index-DuVf3NlP.js +12222 -0
  75. package/dist/esm/{index-DMDO6w5-.js → index-qLZlXROB.js} +14 -2
  76. package/dist/esm/index.js +2 -2
  77. package/dist/esm/loader.js +3 -3
  78. package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
  79. package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
  80. package/dist/formkrafter-wc/index.esm.js +1 -1
  81. package/dist/formkrafter-wc/p-4COASNrZ.js +1 -0
  82. package/dist/formkrafter-wc/p-6d29555b.entry.js +1 -0
  83. package/dist/formkrafter-wc/p-C-wnqV3i.js +1 -0
  84. package/dist/formkrafter-wc/p-DMCkrZqi.js +1 -0
  85. package/dist/formkrafter-wc/p-DOInQkG6.js +1 -0
  86. package/dist/formkrafter-wc/{p-Bp_A8oL5.js → p-Ddu6BquK.js} +4 -4
  87. package/dist/formkrafter-wc/p-DtcM1yw5.js +1 -0
  88. package/dist/formkrafter-wc/p-qLZlXROB.js +2 -0
  89. package/dist/types/components/fk-code-editor/fk-code-editor.d.ts +2 -1
  90. package/dist/types/components/fk-file-input/fk-file-input.d.ts +7 -3
  91. package/dist/types/components/fk-select-input/fk-select-input.d.ts +9 -0
  92. package/dist/types/components.d.ts +22 -4
  93. package/package.json +2 -2
  94. package/dist/components/p-B1t0M_hN.js +0 -1
  95. package/dist/components/p-B21cOFRx.js +0 -1
  96. package/dist/components/p-B7ED8qMb.js +0 -1
  97. package/dist/components/p-BrOXMyOG.js +0 -1
  98. package/dist/components/p-CMQ_4Zfv.js +0 -1
  99. package/dist/components/p-Cq9HSEn8.js +0 -1
  100. package/dist/components/p-D7bf2ztq.js +0 -1
  101. package/dist/components/p-DIPoAaGe.js +0 -1
  102. package/dist/components/p-DYBirEew.js +0 -1
  103. package/dist/components/p-DluDp8V5.js +0 -1
  104. package/dist/components/p-Do6-yRva.js +0 -1
  105. package/dist/formkrafter-wc/p-0de7cbe1.entry.js +0 -1
  106. package/dist/formkrafter-wc/p-DMDO6w5-.js +0 -2
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CbyFxLc_.js');
4
- var index$1 = require('./index-Can2MpG5.js');
3
+ var index = require('./index-CImTe9BG.js');
4
+ var index$1 = require('./index-CkPPRg03.js');
5
5
 
6
6
 
7
7
 
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CbyFxLc_.js');
3
+ var index = require('./index-CImTe9BG.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  const defineCustomElements = async (win, options) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
8
  await appGlobals.globalScripts();
9
- return index.bootstrapLazy([["fk-brick-actions_18.cjs",[[2,"fk-form-builder",{"spec":[16],"data":[16],"locales":[16],"currentSpec":[32],"currentData":[32],"selectedUid":[32],"copied":[32],"importError":[32],"editLocale":[32]},[[0,"brickDrop","handleBrickDrop"],[0,"brickRemove","handleBrickRemove"],[0,"brickDuplicate","handleBrickDuplicate"],[0,"brickConfigsChange","handleConfigsChange"],[0,"brickStylesChange","handleStylesChange"],[0,"brickValidationsChange","handleValidationsChange"],[0,"brickRulesChange","handleRulesChange"],[0,"formDataChange","handleDataChange"],[4,"paste","handlePaste"],[0,"brickSelect","handleBrickSelect"]],{"spec":[{"syncSpec":0}]}],[2,"fk-data-grid",{"spec":[16],"value":[16],"disabled":[4],"locale":[1],"utils":[16],"touched":[32],"validateRows":[64]},[[0,"brickDataChange","handleRowChange"]]],[2,"fk-form-render",{"spec":[16],"data":[16],"editable":[4],"selectedUid":[1,"selected-uid"],"locale":[1],"currentData":[32],"touched":[32],"validate":[64]},[[0,"brickDataChange","handleBrickDataChange"],[0,"stepTouch","handleStepTouch"],[0,"stepperSubmit","handleStepperSubmit"]],{"data":[{"syncData":0}]}],[2,"fk-property-panel",{"brick":[16],"fields":[16],"locales":[16],"editLocale":[1,"edit-locale"],"activeTab":[32],"newStyleKey":[32]},null,{"brick":[{"onBrickChange":0}]}],[2,"fk-brick-list",{"query":[32],"collapsed":[32]}],[2,"fk-empty-form"],[2,"fk-file-input",{"value":[16],"disabled":[4],"accept":[1],"uploadUrl":[1,"upload-url"],"uploading":[32],"removing":[32],"uploadError":[32]}],[2,"fk-select-input",{"configs":[16],"value":[1],"disabled":[4],"multiple":[4],"dataMap":[16],"open":[32],"query":[32],"remoteOptions":[32],"remoteError":[32]},null,{"configs":[{"onConfigsChange":0}],"dataMap":[{"onDataMapChange":0}]}],[2,"fk-signature-input",{"value":[1],"disabled":[4]},null,{"value":[{"onValueChange":0}]}],[262,"fk-stepper",{"stepLabels":[16],"editable":[4],"spec":[16],"dataMap":[16],"locale":[1],"active":[32]},null,{"stepLabels":[{"clampActive":0}]}],[262,"fk-tabs",{"tabLabels":[16],"editable":[4],"spec":[16],"dataMap":[16],"locale":[1],"active":[32]},null,{"tabLabels":[{"clampActive":0}]}],[2,"fk-rules-editor",{"brick":[16],"fields":[16],"forcedModes":[32],"jsonErrors":[32],"codeErrors":[32]}],[2,"fk-brick-mold-item",{"brickMold":[16],"isDragging":[32]}],[2,"fk-code-editor",{"value":[1],"placeholder":[1]},null,{"value":[{"syncValue":0}]}],[0,"fk-brick-render",{"brickSpec":[16],"rootSpec":[16],"data":[16],"dataMap":[16],"path":[1],"editable":[4],"selectedUid":[1,"selected-uid"],"errors":[16],"locale":[1],"utils":[16]}],[262,"fk-brick-actions",{"path":[1],"selected":[4],"isDragging":[32],"isDropTarget":[32]}],[262,"fk-brick-not-found"],[2,"fk-drop-area",{"path":[1],"isOver":[32]}]]]], options);
9
+ return index.bootstrapLazy([["fk-brick-actions_18.cjs",[[2,"fk-form-builder",{"spec":[16],"data":[16],"locales":[16],"currentSpec":[32],"currentData":[32],"selectedUid":[32],"copied":[32],"importError":[32],"editLocale":[32]},[[0,"brickDrop","handleBrickDrop"],[0,"brickRemove","handleBrickRemove"],[0,"brickDuplicate","handleBrickDuplicate"],[0,"brickConfigsChange","handleConfigsChange"],[0,"brickStylesChange","handleStylesChange"],[0,"brickValidationsChange","handleValidationsChange"],[0,"brickRulesChange","handleRulesChange"],[0,"formDataChange","handleDataChange"],[4,"paste","handlePaste"],[0,"brickSelect","handleBrickSelect"]],{"spec":[{"syncSpec":0}]}],[2,"fk-data-grid",{"spec":[16],"value":[16],"disabled":[4],"locale":[1],"utils":[16],"touched":[32],"validateRows":[64]},[[0,"brickDataChange","handleRowChange"]]],[2,"fk-form-render",{"spec":[16],"data":[16],"editable":[4],"selectedUid":[1,"selected-uid"],"locale":[1],"currentData":[32],"touched":[32],"validate":[64]},[[0,"brickDataChange","handleBrickDataChange"],[0,"stepTouch","handleStepTouch"],[0,"stepperSubmit","handleStepperSubmit"]],{"data":[{"syncData":0}]}],[2,"fk-property-panel",{"brick":[16],"fields":[16],"locales":[16],"editLocale":[1,"edit-locale"],"activeTab":[32],"newStyleKey":[32]},null,{"brick":[{"onBrickChange":0}]}],[2,"fk-brick-list",{"query":[32],"collapsed":[32]}],[2,"fk-empty-form"],[2,"fk-file-input",{"value":[16],"disabled":[4],"accept":[1],"uploadUrl":[1,"upload-url"],"multiple":[4],"uploading":[32],"removingUrl":[32],"uploadError":[32]}],[2,"fk-select-input",{"configs":[16],"value":[1],"disabled":[4],"multiple":[4],"invalid":[4],"dataMap":[16],"open":[32],"query":[32],"activeIndex":[32],"remoteOptions":[32],"remoteError":[32]},null,{"configs":[{"onConfigsChange":0}],"dataMap":[{"onDataMapChange":0}]}],[2,"fk-signature-input",{"value":[1],"disabled":[4]},null,{"value":[{"onValueChange":0}]}],[262,"fk-stepper",{"stepLabels":[16],"editable":[4],"spec":[16],"dataMap":[16],"locale":[1],"active":[32]},null,{"stepLabels":[{"clampActive":0}]}],[262,"fk-tabs",{"tabLabels":[16],"editable":[4],"spec":[16],"dataMap":[16],"locale":[1],"active":[32]},null,{"tabLabels":[{"clampActive":0}]}],[2,"fk-rules-editor",{"brick":[16],"fields":[16],"forcedModes":[32],"jsonErrors":[32],"codeErrors":[32]}],[2,"fk-brick-mold-item",{"brickMold":[16],"isDragging":[32]}],[2,"fk-code-editor",{"value":[1],"placeholder":[1]},null,{"value":[{"syncValue":0}]}],[0,"fk-brick-render",{"brickSpec":[16],"rootSpec":[16],"data":[16],"dataMap":[16],"path":[1],"editable":[4],"selectedUid":[1,"selected-uid"],"errors":[16],"locale":[1],"utils":[16]}],[262,"fk-brick-actions",{"path":[1],"selected":[4],"isDragging":[32],"isDropTarget":[32]}],[262,"fk-brick-not-found"],[2,"fk-drop-area",{"path":[1],"isOver":[32]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -1,15 +1,23 @@
1
- import { EditorState } from "@codemirror/state";
2
- import { EditorView, keymap, lineNumbers, placeholder as cmPlaceholder, } from "@codemirror/view";
3
- import { defaultKeymap, history, historyKeymap } from "@codemirror/commands";
4
- import { defaultHighlightStyle, syntaxHighlighting } from "@codemirror/language";
5
- import { javascript } from "@codemirror/lang-javascript";
1
+ const fetchCodeMirror = () => Promise.all([
2
+ import('@codemirror/state'),
3
+ import('@codemirror/view'),
4
+ import('@codemirror/commands'),
5
+ import('@codemirror/language'),
6
+ import('@codemirror/lang-javascript'),
7
+ ]);
8
+ let codeMirrorModules;
9
+ const loadCodeMirror = () => (codeMirrorModules !== null && codeMirrorModules !== void 0 ? codeMirrorModules : (codeMirrorModules = fetchCodeMirror()));
6
10
  export class FkCodeEditor {
7
11
  constructor() {
8
12
  this.value = '';
9
13
  this.placeholder = '';
14
+ this.disconnected = false;
10
15
  }
11
- componentDidLoad() {
12
- this.view = new EditorView({
16
+ async componentDidLoad() {
17
+ const [{ EditorState }, { EditorView: View, keymap, lineNumbers, placeholder: cmPlaceholder }, { defaultKeymap, history, historyKeymap }, { defaultHighlightStyle, syntaxHighlighting }, { javascript },] = await loadCodeMirror();
18
+ if (this.disconnected)
19
+ return;
20
+ this.view = new View({
13
21
  parent: this.host,
14
22
  state: EditorState.create({
15
23
  doc: this.value,
@@ -20,7 +28,7 @@ export class FkCodeEditor {
20
28
  javascript(),
21
29
  syntaxHighlighting(defaultHighlightStyle),
22
30
  cmPlaceholder(this.placeholder),
23
- EditorView.domEventHandlers({
31
+ View.domEventHandlers({
24
32
  blur: () => this.emitIfChanged(),
25
33
  }),
26
34
  ],
@@ -46,6 +54,7 @@ export class FkCodeEditor {
46
54
  }
47
55
  disconnectedCallback() {
48
56
  var _a;
57
+ this.disconnected = true;
49
58
  (_a = this.view) === null || _a === void 0 ? void 0 : _a.destroy();
50
59
  this.view = undefined;
51
60
  }
@@ -1,24 +1,25 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { services } from "@streamline-pulse/formkrafter-core";
3
- import { fkT } from "../../i18n/i18n";
3
+ import { fkT, fkTOr } from "../../i18n/i18n";
4
4
  export class FkFileInput {
5
5
  constructor() {
6
6
  this.disabled = false;
7
+ this.multiple = false;
7
8
  this.uploading = false;
8
- this.removing = false;
9
9
  this.handleFile = async (event) => {
10
10
  var _a;
11
11
  const input = event.target;
12
- const file = (_a = input.files) === null || _a === void 0 ? void 0 : _a[0];
13
- if (!file)
12
+ const selected = Array.from((_a = input.files) !== null && _a !== void 0 ? _a : []);
13
+ if (!selected.length)
14
14
  return;
15
15
  this.uploading = true;
16
16
  this.uploadError = undefined;
17
17
  try {
18
- const uploaded = await services.fileUploadService.upload(file, {
19
- url: this.uploadUrl,
20
- });
21
- this.fileValueChange.emit(uploaded);
18
+ const uploaded = [];
19
+ for (const file of this.multiple ? selected : selected.slice(0, 1)) {
20
+ uploaded.push(await services.fileUploadService.upload(file, { url: this.uploadUrl }));
21
+ }
22
+ this.emitFiles(this.multiple ? [...this.files, ...uploaded] : uploaded);
22
23
  }
23
24
  catch (error) {
24
25
  this.uploadError =
@@ -29,26 +30,35 @@ export class FkFileInput {
29
30
  input.value = '';
30
31
  }
31
32
  };
32
- this.handleRemove = async (event) => {
33
+ this.handleRemove = async (file) => {
33
34
  var _a, _b;
34
- event.preventDefault();
35
- const current = this.value;
36
- if (!current)
37
- return;
38
- this.removing = true;
35
+ this.removingUrl = file.url;
39
36
  this.uploadError = undefined;
40
37
  try {
41
- await ((_b = (_a = services.fileUploadService).remove) === null || _b === void 0 ? void 0 : _b.call(_a, current, { url: this.uploadUrl }));
38
+ await ((_b = (_a = services.fileUploadService).remove) === null || _b === void 0 ? void 0 : _b.call(_a, file, { url: this.uploadUrl }));
42
39
  }
43
40
  catch (error) {
44
41
  this.uploadError = error instanceof Error ? error.message : String(error);
45
42
  }
46
43
  finally {
47
- this.removing = false;
48
- this.fileValueChange.emit(undefined);
44
+ this.removingUrl = undefined;
45
+ this.emitFiles(this.files.filter((item) => item !== file));
49
46
  }
50
47
  };
51
48
  }
49
+ get files() {
50
+ if (Array.isArray(this.value))
51
+ return this.value;
52
+ return this.value ? [this.value] : [];
53
+ }
54
+ emitFiles(files) {
55
+ if (this.multiple) {
56
+ this.fileValueChange.emit(files.length ? files : undefined);
57
+ }
58
+ else {
59
+ this.fileValueChange.emit(files[0]);
60
+ }
61
+ }
52
62
  formatSize(size) {
53
63
  if (size < 1024)
54
64
  return `${size} B`;
@@ -56,12 +66,25 @@ export class FkFileInput {
56
66
  return `${(size / 1024).toFixed(1)} KB`;
57
67
  return `${(size / (1024 * 1024)).toFixed(1)} MB`;
58
68
  }
69
+ renderFile(file) {
70
+ const removing = this.removingUrl !== undefined && this.removingUrl === file.url;
71
+ return (h("div", { class: "fk-file__selected", key: `${file.url}:${file.name}` }, h("span", { class: "fk-file__icon", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), h("polyline", { points: "14 2 14 8 20 8" }))), h("span", { class: "fk-file__meta" }, h("span", { class: "fk-file__name", title: file.name }, file.name), h("span", { class: "fk-file__size" }, this.formatSize(file.size))), h("button", { type: "button", class: "fk-file__remove", title: fkT('file.remove'), disabled: this.disabled || removing, onClick: (event) => {
72
+ event.preventDefault();
73
+ void this.handleRemove(file);
74
+ } }, removing ? '…' : '✕')));
75
+ }
59
76
  render() {
60
- return (h("div", { key: 'f7705974fe50f568094cf1f2874716fad7b2e31b', class: "fk-file" }, this.value ? (h("div", { class: "fk-file__selected" }, h("span", { class: "fk-file__icon", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), h("polyline", { points: "14 2 14 8 20 8" }))), h("span", { class: "fk-file__meta" }, h("span", { class: "fk-file__name", title: this.value.name }, this.value.name), h("span", { class: "fk-file__size" }, this.formatSize(this.value.size))), h("button", { type: "button", class: "fk-file__remove", title: fkT('file.remove'), disabled: this.disabled || this.removing, onClick: this.handleRemove }, this.removing ? '…' : '✕'))) : (h("button", { type: "button", class: "fk-file__choose", disabled: this.disabled || this.uploading, onClick: (event) => {
77
+ const files = this.files;
78
+ const showChoose = this.multiple || files.length === 0;
79
+ return (h("div", { key: '883cb0627b948d807f59ed5c62e44b0db421c3c6', class: "fk-file" }, files.map((file) => this.renderFile(file)), showChoose ? (h("button", { type: "button", class: "fk-file__choose", disabled: this.disabled || this.uploading, onClick: (event) => {
61
80
  var _a;
62
81
  event.preventDefault();
63
82
  (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.click();
64
- } }, this.uploading ? fkT('file.uploading') : fkT('file.choose'))), h("input", { key: '170b1335f87a4ffdfa6cc29e005036384c4f04a6', class: "fk-file__native", type: "file", accept: this.accept, disabled: this.disabled, ref: (element) => (this.inputEl = element), onChange: this.handleFile }), this.uploadError ? (h("span", { class: "fk-field__error" }, this.uploadError)) : null));
83
+ } }, this.uploading
84
+ ? fkT('file.uploading')
85
+ : this.multiple && files.length
86
+ ? fkTOr('file.addAnother', '+ Add a file')
87
+ : fkT('file.choose'))) : null, h("input", { key: 'a35947614d82f94eba8453b1f43382d2754cb36f', class: "fk-file__native", type: "file", accept: this.accept, multiple: this.multiple, disabled: this.disabled, ref: (element) => (this.inputEl = element), onChange: this.handleFile }), this.uploadError ? (h("span", { class: "fk-field__error" }, this.uploadError)) : null));
65
88
  }
66
89
  static get is() { return "fk-file-input"; }
67
90
  static get encapsulation() { return "scoped"; }
@@ -81,8 +104,8 @@ export class FkFileInput {
81
104
  "type": "unknown",
82
105
  "mutable": false,
83
106
  "complexType": {
84
- "original": "UploadedFile",
85
- "resolved": "UploadedFile",
107
+ "original": "UploadedFile | UploadedFile[]",
108
+ "resolved": "UploadedFile | UploadedFile[]",
86
109
  "references": {
87
110
  "UploadedFile": {
88
111
  "location": "import",
@@ -158,13 +181,33 @@ export class FkFileInput {
158
181
  "setter": false,
159
182
  "reflect": false,
160
183
  "attribute": "upload-url"
184
+ },
185
+ "multiple": {
186
+ "type": "boolean",
187
+ "mutable": false,
188
+ "complexType": {
189
+ "original": "boolean",
190
+ "resolved": "boolean",
191
+ "references": {}
192
+ },
193
+ "required": false,
194
+ "optional": false,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": ""
198
+ },
199
+ "getter": false,
200
+ "setter": false,
201
+ "reflect": false,
202
+ "attribute": "multiple",
203
+ "defaultValue": "false"
161
204
  }
162
205
  };
163
206
  }
164
207
  static get states() {
165
208
  return {
166
209
  "uploading": {},
167
- "removing": {},
210
+ "removingUrl": {},
168
211
  "uploadError": {}
169
212
  };
170
213
  }
@@ -180,8 +223,8 @@ export class FkFileInput {
180
223
  "text": ""
181
224
  },
182
225
  "complexType": {
183
- "original": "UploadedFile | undefined",
184
- "resolved": "UploadedFile",
226
+ "original": "UploadedFile | UploadedFile[] | undefined",
227
+ "resolved": "UploadedFile | UploadedFile[]",
185
228
  "references": {
186
229
  "UploadedFile": {
187
230
  "location": "import",
@@ -133,6 +133,10 @@ export class FkPropertyPanel {
133
133
  this.textField(fkT('panel.prefix'), configs === null || configs === void 0 ? void 0 : configs.prefix, (value) => this.emitConfigs({ prefix: value || undefined })),
134
134
  this.textField(fkT('panel.suffix'), configs === null || configs === void 0 ? void 0 : configs.suffix, (value) => this.emitConfigs({ suffix: value || undefined })),
135
135
  ]
136
+ : null, configs && 'accept' in configs
137
+ ? this.textField(fkTOr('panel.accept', 'Accepted file types'), configs.accept, (value) => this.emitConfigs({ accept: value }))
138
+ : null, configs && 'uploadUrl' in configs
139
+ ? this.textField(fkTOr('panel.uploadUrl', 'Upload URL'), configs.uploadUrl, (value) => this.emitConfigs({ uploadUrl: value }))
136
140
  : null, this.optionsFields(), Object.entries(configs !== null && configs !== void 0 ? configs : {})
137
141
  .filter(([, value]) => typeof value === 'boolean')
138
142
  .map(([key, value]) => (h("label", { class: "fk-props__field fk-props__field--inline", key: key }, h("input", { type: "checkbox", checked: value === true, onChange: (event) => this.emitConfigs({
@@ -200,7 +204,7 @@ export class FkPropertyPanel {
200
204
  } }))));
201
205
  }
202
206
  render() {
203
- return (h("div", { key: 'a935dd3bf883d81cc16b9a14786b8a663dbb33be', class: "fk-props" }, h("header", { key: '021592872aed2d7c41644f492fb0b48847e0e12d', class: "fk-props__header" }, h("span", { key: '56b02e18fc6b87976aa45ab13bc643630220f3d3', class: "fk-props__type" }, this.brick.type), h("h4", { key: '78f0a39ee6db58a1d60b0587792424e6bb0efd20', class: "fk-props__title" }, fkTOr(`brick.${this.brick.id}.name`, this.brick.name))), h("div", { key: 'bce6485ecc449b0db6e3c7db1b5fde98196d1ae7', class: "fk-props__tabs" }, this.availableTabs().map((tab) => (h("button", { key: tab.id, type: "button", class: {
207
+ return (h("div", { key: '095fc127131cc509f0fb27ae2853042d3ca97e8f', class: "fk-props" }, h("header", { key: '5e5c3eb0cc844dbc023336c93e7b347bc87f5501', class: "fk-props__header" }, h("span", { key: 'f01a54c31c5885741c3671bbcd2bb46ec9deff32', class: "fk-props__type" }, this.brick.type), h("h4", { key: 'a558c48e018a228084eeac289b98e76495d7e630', class: "fk-props__title" }, fkTOr(`brick.${this.brick.id}.name`, this.brick.name))), h("div", { key: 'c11ee0bf0f17754abc00b561fef398bf9cdd9416', class: "fk-props__tabs" }, this.availableTabs().map((tab) => (h("button", { key: tab.id, type: "button", class: {
204
208
  'fk-props__tab': true,
205
209
  'fk-props__tab--active': this.activeTab === tab.id,
206
210
  }, onClick: () => (this.activeTab = tab.id) }, tab.label)))), this.activeTab === 'config' ? this.renderConfigTab() : null, this.activeTab === 'validation' ? this.renderValidationTab() : null, this.activeTab === 'styles' ? this.renderStylesTab() : null, this.activeTab === 'rules' ? (h("section", { class: "fk-props__section" }, h("fk-rules-editor", { brick: this.brick, fields: this.fields }))) : null));
@@ -142,3 +142,12 @@
142
142
  font-size: 0.85rem;
143
143
  color: var(--fk-color-muted);
144
144
  }
145
+
146
+ .fk-select__trigger:focus-visible {
147
+ outline: 2px solid color-mix(in srgb, var(--fk-color-primary) 55%, transparent);
148
+ outline-offset: 1px;
149
+ }
150
+
151
+ .fk-select__option--active {
152
+ background: color-mix(in srgb, var(--fk-color-primary) 12%, transparent);
153
+ }
@@ -3,17 +3,33 @@ import { evalBrickCode, services } from "@streamline-pulse/formkrafter-core";
3
3
  import { normalizeOptions } from "../../utils/options";
4
4
  import { appendSearchParam, interpolateTemplate, parseHeaderLines, } from "../../utils/remote";
5
5
  import { fkT } from "../../i18n/i18n";
6
+ let selectInstanceCounter = 0;
6
7
  export class FkSelectInput {
7
8
  constructor() {
8
9
  this.disabled = false;
9
10
  this.multiple = false;
11
+ this.invalid = false;
10
12
  this.open = false;
11
13
  this.query = '';
14
+ this.activeIndex = 0;
15
+ this.instanceId = `fk-select-${++selectInstanceCounter}`;
12
16
  this.remoteOptions = [];
13
17
  this.outsideClick = (event) => {
14
18
  if (!this.host.contains(event.target))
15
19
  this.close();
16
20
  };
21
+ this.onTriggerKeyDown = (event) => {
22
+ if (this.disabled)
23
+ return;
24
+ if (['Enter', ' ', 'ArrowDown', 'ArrowUp'].includes(event.key)) {
25
+ event.preventDefault();
26
+ this.openDropdown();
27
+ }
28
+ else if (event.key === 'Escape' && this.open) {
29
+ event.preventDefault();
30
+ this.close();
31
+ }
32
+ };
17
33
  }
18
34
  componentWillLoad() {
19
35
  return this.resolveRemote();
@@ -53,15 +69,76 @@ export class FkSelectInput {
53
69
  return;
54
70
  if (this.open)
55
71
  this.close();
56
- else {
57
- this.open = true;
58
- this.query = '';
59
- this.bindOutsideClick();
60
- }
72
+ else
73
+ this.openDropdown();
74
+ }
75
+ openDropdown() {
76
+ if (this.disabled || this.open)
77
+ return;
78
+ this.open = true;
79
+ this.query = '';
80
+ const { options } = this.resolve();
81
+ const selected = this.selectedValues();
82
+ const selectedIndex = options.findIndex((option) => selected.includes(option.value));
83
+ this.activeIndex = selectedIndex >= 0 ? selectedIndex : 0;
84
+ this.bindOutsideClick();
61
85
  }
62
- close() {
86
+ close(refocusTrigger = false) {
87
+ var _a;
63
88
  this.open = false;
64
89
  this.unbindOutsideClick();
90
+ if (refocusTrigger)
91
+ (_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
92
+ }
93
+ moveActive(delta, count) {
94
+ if (!count)
95
+ return;
96
+ this.activeIndex = (this.activeIndex + delta + count) % count;
97
+ this.scrollActiveIntoView();
98
+ }
99
+ scrollActiveIntoView() {
100
+ requestAnimationFrame(() => {
101
+ var _a;
102
+ const active = this.host.querySelector(`#${this.instanceId}-opt-${this.activeIndex}`);
103
+ (_a = active === null || active === void 0 ? void 0 : active.scrollIntoView) === null || _a === void 0 ? void 0 : _a.call(active, { block: 'nearest' });
104
+ });
105
+ }
106
+ onSearchKeyDown(event, filtered) {
107
+ var _a;
108
+ switch (event.key) {
109
+ case 'ArrowDown':
110
+ event.preventDefault();
111
+ this.moveActive(1, filtered.length);
112
+ break;
113
+ case 'ArrowUp':
114
+ event.preventDefault();
115
+ this.moveActive(-1, filtered.length);
116
+ break;
117
+ case 'Home':
118
+ event.preventDefault();
119
+ this.activeIndex = 0;
120
+ this.scrollActiveIntoView();
121
+ break;
122
+ case 'End':
123
+ event.preventDefault();
124
+ this.activeIndex = Math.max(filtered.length - 1, 0);
125
+ this.scrollActiveIntoView();
126
+ break;
127
+ case 'Enter': {
128
+ event.preventDefault();
129
+ const option = (_a = filtered[this.activeIndex]) !== null && _a !== void 0 ? _a : filtered[0];
130
+ if (option)
131
+ this.pick(option);
132
+ break;
133
+ }
134
+ case 'Escape':
135
+ event.preventDefault();
136
+ this.close(true);
137
+ break;
138
+ case 'Tab':
139
+ this.close();
140
+ break;
141
+ }
65
142
  }
66
143
  source() {
67
144
  var _a, _b;
@@ -150,7 +227,7 @@ export class FkSelectInput {
150
227
  return;
151
228
  }
152
229
  this.selectValueChange.emit(option.value);
153
- this.close();
230
+ this.close(true);
154
231
  }
155
232
  unpick(value) {
156
233
  const next = this.selectedValues().filter((entry) => entry !== value);
@@ -169,30 +246,30 @@ export class FkSelectInput {
169
246
  const { options, error } = this.resolve();
170
247
  const selected = this.selectedValues();
171
248
  const filtered = this.filteredOptions(options);
172
- return (h("div", { key: '85d53f13df0d06af139fd666e2c81c1cae51080a', class: { 'fk-select': true, 'fk-select--disabled': this.disabled } }, h("div", { key: '2b91528a8584a4437b4a4d873276feb8a5126b1e', class: { 'fk-select__trigger': true, 'fk-select__trigger--open': this.open }, onClick: (event) => {
249
+ return (h("div", { key: 'b891babd7bf125b1e388618ed12be7283136def1', class: { 'fk-select': true, 'fk-select--disabled': this.disabled } }, h("div", { key: 'ef9d0b05e422f78f92a74fcd7dd589c25bc2cbe0', class: { 'fk-select__trigger': true, 'fk-select__trigger--open': this.open }, role: "combobox", tabIndex: this.disabled ? undefined : 0, "aria-expanded": this.open ? 'true' : 'false', "aria-haspopup": "listbox", "aria-controls": `${this.instanceId}-listbox`, "aria-disabled": this.disabled ? 'true' : undefined, "aria-invalid": this.invalid ? 'true' : undefined, ref: (element) => (this.triggerEl = element), onKeyDown: this.onTriggerKeyDown, onClick: (event) => {
173
250
  event.preventDefault();
174
251
  this.toggleOpen();
175
- } }, h("div", { key: 'bc0dafdb3b3aec4ad2f90fc57a59cae953dc5f16', class: "fk-select__values" }, selected.length === 0 ? (h("span", { class: "fk-select__placeholder" }, String((_b = (_a = this.configs) === null || _a === void 0 ? void 0 : _a.placeholder) !== null && _b !== void 0 ? _b : ''))) : this.multiple ? (selected.map((value) => (h("span", { class: "fk-select__chip", key: value }, this.labelOf(value, options), h("button", { type: "button", class: "fk-select__chip-remove", disabled: this.disabled, onClick: (event) => {
252
+ } }, h("div", { key: '9f803f11783a2730865685c34770171a8bf92850', class: "fk-select__values" }, selected.length === 0 ? (h("span", { class: "fk-select__placeholder" }, String((_b = (_a = this.configs) === null || _a === void 0 ? void 0 : _a.placeholder) !== null && _b !== void 0 ? _b : ''))) : this.multiple ? (selected.map((value) => (h("span", { class: "fk-select__chip", key: value }, this.labelOf(value, options), h("button", { type: "button", class: "fk-select__chip-remove", "aria-label": `${fkT('select.clear')} — ${this.labelOf(value, options)}`, disabled: this.disabled, onClick: (event) => {
176
253
  event.preventDefault();
177
254
  event.stopPropagation();
178
255
  this.unpick(value);
179
- } }, "\u2715"))))) : (h("span", { class: "fk-select__value" }, this.labelOf(selected[0], options)))), !this.multiple && selected.length > 0 && !this.disabled ? (h("button", { type: "button", class: "fk-select__clear", title: fkT('select.clear'), onClick: (event) => {
256
+ } }, "\u2715"))))) : (h("span", { class: "fk-select__value" }, this.labelOf(selected[0], options)))), !this.multiple && selected.length > 0 && !this.disabled ? (h("button", { type: "button", class: "fk-select__clear", title: fkT('select.clear'), "aria-label": fkT('select.clear'), onClick: (event) => {
180
257
  event.preventDefault();
181
258
  event.stopPropagation();
182
259
  this.selectValueChange.emit(undefined);
183
- } }, "\u2715")) : null, h("span", { key: '4b254a05b0a0f92171fc4ead179f407f5dbe0fd1', class: "fk-select__caret" }, "\u25BE")), this.open ? (h("div", { class: "fk-select__dropdown" }, h("input", { class: "fk-select__search", type: "text", placeholder: fkT('select.search'), value: this.query, ref: (element) => setTimeout(() => element === null || element === void 0 ? void 0 : element.focus(), 0), onInput: (event) => this.onSearchInput(event.target.value), onKeyDown: (event) => {
184
- if (event.key === 'Escape')
185
- this.close();
186
- if (event.key === 'Enter' && filtered.length > 0) {
187
- event.preventDefault();
188
- this.pick(filtered[0]);
189
- }
190
- } }), h("div", { class: "fk-select__options", role: "listbox" }, filtered.map((option) => {
260
+ } }, "\u2715")) : null, h("span", { key: '2fabef683d5007a58b1b2c34e7005cd4d3eaef04', class: "fk-select__caret" }, "\u25BE")), this.open ? (h("div", { class: "fk-select__dropdown" }, h("input", { class: "fk-select__search", type: "text", placeholder: fkT('select.search'), value: this.query, role: "combobox", "aria-expanded": "true", "aria-autocomplete": "list", "aria-controls": `${this.instanceId}-listbox`, "aria-activedescendant": filtered.length
261
+ ? `${this.instanceId}-opt-${Math.min(this.activeIndex, filtered.length - 1)}`
262
+ : undefined, ref: (element) => setTimeout(() => element === null || element === void 0 ? void 0 : element.focus(), 0), onInput: (event) => {
263
+ this.activeIndex = 0;
264
+ this.onSearchInput(event.target.value);
265
+ }, onKeyDown: (event) => this.onSearchKeyDown(event, filtered) }), h("div", { class: "fk-select__options", role: "listbox", id: `${this.instanceId}-listbox`, "aria-multiselectable": this.multiple ? 'true' : undefined }, filtered.map((option, index) => {
191
266
  const isSelected = selected.includes(option.value);
192
- return (h("div", { key: option.value, role: "option", "aria-selected": isSelected ? 'true' : 'false', class: {
267
+ const isActive = index === Math.min(this.activeIndex, filtered.length - 1);
268
+ return (h("div", { key: option.value, id: `${this.instanceId}-opt-${index}`, role: "option", "aria-selected": isSelected ? 'true' : 'false', class: {
193
269
  'fk-select__option': true,
194
270
  'fk-select__option--selected': isSelected,
195
- }, onClick: (event) => {
271
+ 'fk-select__option--active': isActive,
272
+ }, onMouseEnter: () => (this.activeIndex = index), onClick: (event) => {
196
273
  event.preventDefault();
197
274
  this.pick(option);
198
275
  } }, h("span", { class: "fk-select__option-label" }, option.label), isSelected ? h("span", { class: "fk-select__check" }, "\u2713") : null));
@@ -293,6 +370,26 @@ export class FkSelectInput {
293
370
  "attribute": "multiple",
294
371
  "defaultValue": "false"
295
372
  },
373
+ "invalid": {
374
+ "type": "boolean",
375
+ "mutable": false,
376
+ "complexType": {
377
+ "original": "boolean",
378
+ "resolved": "boolean",
379
+ "references": {}
380
+ },
381
+ "required": false,
382
+ "optional": false,
383
+ "docs": {
384
+ "tags": [],
385
+ "text": ""
386
+ },
387
+ "getter": false,
388
+ "setter": false,
389
+ "reflect": false,
390
+ "attribute": "invalid",
391
+ "defaultValue": "false"
392
+ },
296
393
  "dataMap": {
297
394
  "type": "unknown",
298
395
  "mutable": false,
@@ -321,6 +418,7 @@ export class FkSelectInput {
321
418
  return {
322
419
  "open": {},
323
420
  "query": {},
421
+ "activeIndex": {},
324
422
  "remoteOptions": {},
325
423
  "remoteError": {}
326
424
  };
@@ -83,3 +83,17 @@
83
83
  opacity: 0.45;
84
84
  cursor: not-allowed;
85
85
  }
86
+
87
+ .fk-stepper__step-button {
88
+ all: unset;
89
+ display: inline-flex;
90
+ align-items: center;
91
+ gap: inherit;
92
+ cursor: pointer;
93
+ }
94
+
95
+ .fk-stepper__step-button:focus-visible {
96
+ outline: 2px solid color-mix(in srgb, var(--fk-color-primary) 55%, transparent);
97
+ outline-offset: 2px;
98
+ border-radius: calc(var(--fk-radius) / 2);
99
+ }
@@ -113,7 +113,10 @@ export class FkStepper {
113
113
  'fk-stepper__step': true,
114
114
  'fk-stepper__step--active': index === this.active,
115
115
  'fk-stepper__step--done': !this.editable && index < this.active,
116
- }, onClick: () => this.goToStep(index) }, h("span", { class: "fk-stepper__index" }, index + 1), h("span", { class: "fk-stepper__label" }, label))))), h("div", { key: 'c17a9bf5c76574072d45621fe819fd49671226f0', class: "fk-stepper__body" }, h("slot", { key: 'aa168f9a54babdb9c25cdbb79738b024944e94e3' })), !this.editable && this.stepLabels.length > 1 ? (h("div", { class: "fk-stepper__actions" }, h("button", { type: "button", class: "fk-stepper__button", disabled: this.active === 0, onClick: this.back }, fkT('stepper.back')), this.active < lastStep ? (h("button", { type: "button", class: "fk-stepper__button fk-stepper__button--primary", onClick: this.next }, fkT('stepper.next'))) : null, showSubmit ? (h("button", { type: "button", class: "fk-stepper__button fk-stepper__button--primary", onClick: this.submit }, fkT('stepper.submit'))) : null)) : null));
116
+ } }, h("button", { type: "button", class: "fk-stepper__step-button", "aria-current": index === this.active ? 'step' : undefined, onClick: (event) => {
117
+ event.preventDefault();
118
+ this.goToStep(index);
119
+ } }, h("span", { class: "fk-stepper__index" }, index + 1), h("span", { class: "fk-stepper__label" }, label)))))), h("div", { key: 'cd902a9df2d72a4d7f452e7621287df50a89d3c4', class: "fk-stepper__body" }, h("slot", { key: 'ab689448817eaf7b5ddfc9146e18411fe6b5924c' })), !this.editable && this.stepLabels.length > 1 ? (h("div", { class: "fk-stepper__actions" }, h("button", { type: "button", class: "fk-stepper__button", disabled: this.active === 0, onClick: this.back }, fkT('stepper.back')), this.active < lastStep ? (h("button", { type: "button", class: "fk-stepper__button fk-stepper__button--primary", onClick: this.next }, fkT('stepper.next'))) : null, showSubmit ? (h("button", { type: "button", class: "fk-stepper__button fk-stepper__button--primary", onClick: this.submit }, fkT('stepper.submit'))) : null)) : null));
117
120
  }
118
121
  static get is() { return "fk-stepper"; }
119
122
  static get encapsulation() { return "scoped"; }
@@ -76,13 +76,26 @@ export class FkTabs {
76
76
  this.active = index;
77
77
  }
78
78
  render() {
79
- return (h("div", { key: 'dc3d42e16d4dd2c948b780326d13afce15bbd908', class: "fk-tabs" }, h("div", { key: 'a5cfd97f5decd63774b9054559f392c5c23447cc', class: "fk-tabs__nav", role: "tablist" }, this.tabLabels.map((label, index) => (h("button", { key: `${index}-${label}`, type: "button", role: "tab", class: {
79
+ return (h("div", { key: 'dc3d42e16d4dd2c948b780326d13afce15bbd908', class: "fk-tabs" }, h("div", { key: 'a5cfd97f5decd63774b9054559f392c5c23447cc', class: "fk-tabs__nav", role: "tablist" }, this.tabLabels.map((label, index) => (h("button", { key: `${index}-${label}`, type: "button", role: "tab", "aria-selected": index === this.active ? 'true' : 'false', tabIndex: index === this.active ? 0 : -1, class: {
80
80
  'fk-tabs__tab': true,
81
81
  'fk-tabs__tab--active': index === this.active,
82
+ }, onKeyDown: (event) => {
83
+ const count = this.tabLabels.length;
84
+ if (!count)
85
+ return;
86
+ if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {
87
+ event.preventDefault();
88
+ const delta = event.key === 'ArrowRight' ? 1 : -1;
89
+ this.goToTab((index + delta + count) % count);
90
+ requestAnimationFrame(() => {
91
+ var _a;
92
+ (_a = this.host.querySelector('.fk-tabs__tab--active')) === null || _a === void 0 ? void 0 : _a.focus();
93
+ });
94
+ }
82
95
  }, onClick: (event) => {
83
96
  event.preventDefault();
84
97
  this.goToTab(index);
85
- } }, label)))), h("div", { key: 'cd2b57a56aac0d14de856ea004feb3ac55ee8bfa', class: "fk-tabs__body" }, h("slot", { key: 'b4e2b21e39d445465ddf24dd35749efd79fda9c2' }))));
98
+ } }, label)))), h("div", { key: 'fe33c5bdfe8a876452850abfd8082b8e4325c355', class: "fk-tabs__body" }, h("slot", { key: 'b3de83a128f36d328c34554cc6df7b1cbeae4761' }))));
86
99
  }
87
100
  static get is() { return "fk-tabs"; }
88
101
  static get encapsulation() { return "scoped"; }
@@ -34,6 +34,9 @@ const en = {
34
34
  'panel.placeholder': 'Placeholder',
35
35
  'panel.prefix': 'Prefix',
36
36
  'panel.suffix': 'Suffix',
37
+ 'panel.accept': 'Accepted file types',
38
+ 'panel.uploadUrl': 'Upload URL',
39
+ 'panel.cfg.multiple': 'Allow multiple files',
37
40
  'panel.optionsSource': 'Options source',
38
41
  'panel.options': 'Options (one per line)',
39
42
  'panel.content': 'Content',
@@ -61,6 +64,7 @@ const en = {
61
64
  'file.choose': 'Choose a file…',
62
65
  'file.uploading': 'Uploading…',
63
66
  'file.remove': 'Remove file',
67
+ 'file.addAnother': '+ Add a file',
64
68
  'address.street': 'Street',
65
69
  'address.city': 'City',
66
70
  'address.zip': 'Postal code',
@@ -153,6 +157,9 @@ export const frFkTranslations = {
153
157
  'panel.placeholder': 'Placeholder',
154
158
  'panel.prefix': 'Préfixe',
155
159
  'panel.suffix': 'Suffixe',
160
+ 'panel.accept': 'Types de fichiers acceptés',
161
+ 'panel.uploadUrl': "URL d'upload",
162
+ 'panel.cfg.multiple': 'Autoriser plusieurs fichiers',
156
163
  'panel.optionsSource': 'Source des options',
157
164
  'panel.options': 'Options (une par ligne)',
158
165
  'panel.content': 'Contenu',
@@ -180,6 +187,7 @@ export const frFkTranslations = {
180
187
  'file.choose': 'Choisir un fichier…',
181
188
  'file.uploading': 'Envoi en cours…',
182
189
  'file.remove': 'Retirer le fichier',
190
+ 'file.addAnother': '+ Ajouter un fichier',
183
191
  'address.street': 'Rue',
184
192
  'address.city': 'Ville',
185
193
  'address.zip': 'Code postal',