@streamline-pulse/formkrafter-wc 0.3.0 → 0.4.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 (158) hide show
  1. package/README.md +10 -8
  2. package/dist/components/fk-brick-actions.js +1 -1
  3. package/dist/components/fk-brick-list.js +1 -1
  4. package/dist/components/fk-brick-mold-item.js +1 -1
  5. package/dist/components/fk-brick-render.js +1 -1
  6. package/dist/components/fk-code-editor.js +1 -1
  7. package/dist/components/fk-data-grid.js +1 -1
  8. package/dist/components/fk-drop-area.js +1 -1
  9. package/dist/components/fk-empty-form.js +1 -1
  10. package/dist/components/fk-file-input.js +1 -1
  11. package/dist/components/fk-form-builder.js +1 -1
  12. package/dist/components/fk-form-render.js +1 -1
  13. package/dist/components/fk-property-panel.js +1 -1
  14. package/dist/components/fk-rules-editor.js +1 -1
  15. package/dist/components/fk-select-input.js +1 -1
  16. package/dist/components/fk-signature-input.js +1 -1
  17. package/dist/components/fk-stepper.js +1 -1
  18. package/dist/components/fk-tabs.js +1 -1
  19. package/dist/components/index.js +1 -1
  20. package/dist/components/{p-CKMHMpID.js → p-28GBFlUX.js} +4 -4
  21. package/dist/components/{p-D6n74M9d.js → p-BGxmFcpL.js} +1 -1
  22. package/dist/components/{p-DYchD23x.js → p-BInUBjyw.js} +1 -1
  23. package/dist/{formkrafter-wc/p-C-wnqV3i.js → components/p-BietHxaT.js} +1 -1
  24. package/dist/components/{p-fDJP6whN.js → p-BnzSarwW.js} +1 -1
  25. package/dist/components/p-BpkKcCCr.js +1 -0
  26. package/dist/components/p-C0Y8qh8R.js +1 -0
  27. package/dist/components/p-C5OWoRhO.js +1 -0
  28. package/dist/components/{p-wuC5rVU7.js → p-CKs1CWVz.js} +1 -1
  29. package/dist/components/{p-v7LxwCAc.js → p-CZHykCYD.js} +1 -1
  30. package/dist/components/{p-4COASNrZ.js → p-CehxuHtl.js} +1 -1
  31. package/dist/components/p-CqVSd56Z.js +1 -0
  32. package/dist/components/p-CyZA17qf.js +1 -0
  33. package/dist/components/{p-BGkZP87K.js → p-D4HhZxQ-.js} +1 -1
  34. package/dist/components/p-DC6Wxbnz.js +1 -0
  35. package/dist/components/p-DRNycSdI.js +1 -0
  36. package/dist/components/{p--vL6GR31.js → p-Dh5Z49YD.js} +1 -1
  37. package/dist/components/p-DiOstAi9.js +1 -0
  38. package/dist/components/p-DlqnIm46.js +1 -0
  39. package/dist/components/{p-CIfjRTky.js → p-DshUS8Zm.js} +1 -1
  40. package/dist/components/{p-DMCkrZqi.js → p-RzeBwfwG.js} +1 -1
  41. package/dist/components/{p-BWdm2a6q.js → p-ajy8ZcBX.js} +1 -1
  42. package/dist/components/p-kYG3E0GQ.js +1 -0
  43. package/dist/components/p-tTJg_I4V.js +1 -0
  44. package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
  45. package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
  46. package/dist/formkrafter-wc/index.esm.js +1 -1
  47. package/dist/formkrafter-wc/p-3579150a.entry.js +1 -0
  48. package/dist/formkrafter-wc/p-8b0ff66e.entry.js +1 -0
  49. package/dist/formkrafter-wc/p-BHZMDq2e.js +1 -0
  50. package/dist/{components/p-C-wnqV3i.js → formkrafter-wc/p-BietHxaT.js} +1 -1
  51. package/dist/formkrafter-wc/p-C0Y8qh8R.js +1 -0
  52. package/dist/formkrafter-wc/{p-4COASNrZ.js → p-CehxuHtl.js} +1 -1
  53. package/dist/formkrafter-wc/p-DlqnIm46.js +1 -0
  54. package/dist/formkrafter-wc/{p-DMCkrZqi.js → p-RzeBwfwG.js} +1 -1
  55. package/dist/formkrafter-wc/p-WWmY5Z05.js +1 -0
  56. package/dist/formkrafter-wc/p-hcT25XX4.js +12 -0
  57. package/dist/types/components/fk-code-editor/fk-code-editor.d.ts +1 -0
  58. package/dist/types/components/fk-data-grid/fk-data-grid.d.ts +1 -0
  59. package/dist/types/components/fk-drop-area/fk-drop-area.d.ts +1 -0
  60. package/dist/types/components/fk-form-render/fk-form-render.d.ts +7 -1
  61. package/dist/types/components.d.ts +17 -0
  62. package/dist/types/index.d.ts +1 -1
  63. package/dist/types/registry/default-bricks.d.ts +36 -0
  64. package/dist/types/utils/mask.d.ts +1 -0
  65. package/package.json +10 -15
  66. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  67. package/dist/cjs/fk-brick-actions_18.cjs.entry.js +0 -4224
  68. package/dist/cjs/formkrafter-wc.cjs.js +0 -25
  69. package/dist/cjs/index-Bhy1RJMV.js +0 -3042
  70. package/dist/cjs/index-CImTe9BG.js +0 -2126
  71. package/dist/cjs/index-CdaT3-qx.js +0 -5444
  72. package/dist/cjs/index-CkPPRg03.js +0 -17548
  73. package/dist/cjs/index-DHgK3reD.js +0 -12233
  74. package/dist/cjs/index-Ds0sDbXV.js +0 -4019
  75. package/dist/cjs/index-c9BL7y3N.js +0 -1922
  76. package/dist/cjs/index.cjs.js +0 -48
  77. package/dist/cjs/loader.cjs.js +0 -13
  78. package/dist/collection/collection-manifest.json +0 -30
  79. package/dist/collection/components/fk-brick-actions/fk-brick-actions.css +0 -78
  80. package/dist/collection/components/fk-brick-actions/fk-brick-actions.js +0 -215
  81. package/dist/collection/components/fk-brick-list/fk-brick-list.css +0 -71
  82. package/dist/collection/components/fk-brick-list/fk-brick-list.js +0 -55
  83. package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.css +0 -33
  84. package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.js +0 -73
  85. package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.css +0 -8
  86. package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.js +0 -18
  87. package/dist/collection/components/fk-brick-render/fk-brick-render.js +0 -447
  88. package/dist/collection/components/fk-code-editor/fk-code-editor.css +0 -26
  89. package/dist/collection/components/fk-code-editor/fk-code-editor.js +0 -145
  90. package/dist/collection/components/fk-data-grid/fk-data-grid.css +0 -75
  91. package/dist/collection/components/fk-data-grid/fk-data-grid.js +0 -300
  92. package/dist/collection/components/fk-drop-area/fk-drop-area.css +0 -18
  93. package/dist/collection/components/fk-drop-area/fk-drop-area.js +0 -98
  94. package/dist/collection/components/fk-empty-form/fk-empty-form.css +0 -22
  95. package/dist/collection/components/fk-empty-form/fk-empty-form.js +0 -19
  96. package/dist/collection/components/fk-file-input/fk-file-input.css +0 -95
  97. package/dist/collection/components/fk-file-input/fk-file-input.js +0 -239
  98. package/dist/collection/components/fk-form-builder/fk-form-builder.css +0 -112
  99. package/dist/collection/components/fk-form-builder/fk-form-builder.js +0 -431
  100. package/dist/collection/components/fk-form-render/fk-form-render.css +0 -7
  101. package/dist/collection/components/fk-form-render/fk-form-render.js +0 -352
  102. package/dist/collection/components/fk-property-panel/fk-property-panel.css +0 -153
  103. package/dist/collection/components/fk-property-panel/fk-property-panel.js +0 -388
  104. package/dist/collection/components/fk-rules-editor/fk-rules-editor.css +0 -166
  105. package/dist/collection/components/fk-rules-editor/fk-rules-editor.js +0 -250
  106. package/dist/collection/components/fk-select-input/fk-select-input.css +0 -153
  107. package/dist/collection/components/fk-select-input/fk-select-input.js +0 -454
  108. package/dist/collection/components/fk-signature-input/fk-signature-input.css +0 -42
  109. package/dist/collection/components/fk-signature-input/fk-signature-input.js +0 -158
  110. package/dist/collection/components/fk-stepper/fk-stepper.css +0 -99
  111. package/dist/collection/components/fk-stepper/fk-stepper.js +0 -285
  112. package/dist/collection/components/fk-tabs/fk-tabs.css +0 -38
  113. package/dist/collection/components/fk-tabs/fk-tabs.js +0 -249
  114. package/dist/collection/i18n/i18n.js +0 -265
  115. package/dist/collection/index.js +0 -5
  116. package/dist/collection/registry/create-brick.js +0 -34
  117. package/dist/collection/registry/default-bricks.js +0 -564
  118. package/dist/collection/registry/registry.js +0 -44
  119. package/dist/collection/utils/brick-data.js +0 -16
  120. package/dist/collection/utils/drop.js +0 -14
  121. package/dist/collection/utils/events.js +0 -1
  122. package/dist/collection/utils/options.js +0 -21
  123. package/dist/collection/utils/remote.js +0 -27
  124. package/dist/collection/utils/rule-condition.js +0 -72
  125. package/dist/collection/utils/style.js +0 -11
  126. package/dist/components/p-BOmBVgfJ.js +0 -1
  127. package/dist/components/p-B_-x-GlA.js +0 -1
  128. package/dist/components/p-Br1s4Ujx.js +0 -1
  129. package/dist/components/p-CUF31e-P.js +0 -1
  130. package/dist/components/p-CWQX0sXS.js +0 -1
  131. package/dist/components/p-DFe3zZCI.js +0 -1
  132. package/dist/components/p-DOInQkG6.js +0 -1
  133. package/dist/components/p-PAr7WoWG.js +0 -1
  134. package/dist/components/p-YyGnQmX-.js +0 -1
  135. package/dist/components/p-swxZqinH.js +0 -1
  136. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  137. package/dist/esm/fk-brick-actions_18.entry.js +0 -4205
  138. package/dist/esm/formkrafter-wc.js +0 -21
  139. package/dist/esm/index-BAcz7b5u.js +0 -5416
  140. package/dist/esm/index-BkRMoLXK.js +0 -3029
  141. package/dist/esm/index-CGMDfZ5m.js +0 -1808
  142. package/dist/esm/index-D7Cta1UB.js +0 -17488
  143. package/dist/esm/index-DtcM1yw5.js +0 -3991
  144. package/dist/esm/index-DuVf3NlP.js +0 -12222
  145. package/dist/esm/index-qLZlXROB.js +0 -2117
  146. package/dist/esm/index.js +0 -2
  147. package/dist/esm/loader.js +0 -11
  148. package/dist/formkrafter-wc/p-6d29555b.entry.js +0 -1
  149. package/dist/formkrafter-wc/p-DOInQkG6.js +0 -1
  150. package/dist/formkrafter-wc/p-Ddu6BquK.js +0 -12
  151. package/dist/index.cjs.js +0 -1
  152. package/dist/index.js +0 -1
  153. package/dist/stencil.config.js +0 -34
  154. package/loader/cdn.js +0 -1
  155. package/loader/index.cjs.js +0 -1
  156. package/loader/index.d.ts +0 -24
  157. package/loader/index.es2017.js +0 -1
  158. package/loader/index.js +0 -2
@@ -1,48 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-CImTe9BG.js');
4
- var index$1 = require('./index-CkPPRg03.js');
5
-
6
-
7
-
8
- exports.h = index.h;
9
- exports.addressBrick = index$1.addressBrick;
10
- exports.checkboxBrick = index$1.checkboxBrick;
11
- exports.columnBrick = index$1.columnBrick;
12
- exports.contentBrick = index$1.contentBrick;
13
- exports.createBrick = index$1.createBrick;
14
- exports.dataGridBrick = index$1.dataGridBrick;
15
- exports.dateBrick = index$1.dateBrick;
16
- exports.datetimeBrick = index$1.datetimeBrick;
17
- exports.emailBrick = index$1.emailBrick;
18
- exports.fileBrick = index$1.fileBrick;
19
- exports.fkT = index$1.fkT;
20
- exports.fkTOr = index$1.fkTOr;
21
- exports.frFkTranslations = index$1.frFkTranslations;
22
- exports.getBrick = index$1.getBrick;
23
- exports.getBrickMolds = index$1.getBrickMolds;
24
- exports.getBrickMoldsGroupedByCategory = index$1.getBrickMoldsGroupedByCategory;
25
- exports.groupBrick = index$1.groupBrick;
26
- exports.hiddenBrick = index$1.hiddenBrick;
27
- exports.multiSelectBrick = index$1.multiSelectBrick;
28
- exports.newBrickSpec = index$1.newBrickSpec;
29
- exports.numberBrick = index$1.numberBrick;
30
- exports.passwordBrick = index$1.passwordBrick;
31
- exports.phoneBrick = index$1.phoneBrick;
32
- exports.radioBrick = index$1.radioBrick;
33
- exports.recapBrick = index$1.recapBrick;
34
- exports.registerBrick = index$1.registerBrick;
35
- exports.registerBricks = index$1.registerBricks;
36
- exports.registerDefaultBricks = index$1.registerDefaultBricks;
37
- exports.rowBrick = index$1.rowBrick;
38
- exports.selectBoxesBrick = index$1.selectBoxesBrick;
39
- exports.selectBrick = index$1.selectBrick;
40
- exports.setFkTranslations = index$1.setFkTranslations;
41
- exports.signatureBrick = index$1.signatureBrick;
42
- exports.stepperBrick = index$1.stepperBrick;
43
- exports.tabsBrick = index$1.tabsBrick;
44
- exports.tagsBrick = index$1.tagsBrick;
45
- exports.textInputBrick = index$1.textInputBrick;
46
- exports.textareaBrick = index$1.textareaBrick;
47
- exports.timeBrick = index$1.timeBrick;
48
- exports.urlBrick = index$1.urlBrick;
@@ -1,13 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-CImTe9BG.js');
4
- var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
-
6
- const defineCustomElements = async (win, options) => {
7
- if (typeof window === 'undefined') return undefined;
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"],"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
- };
11
-
12
- exports.setNonce = index.setNonce;
13
- exports.defineCustomElements = defineCustomElements;
@@ -1,30 +0,0 @@
1
- {
2
- "entries": [
3
- "components/fk-brick-actions/fk-brick-actions.js",
4
- "components/fk-brick-list/fk-brick-list.js",
5
- "components/fk-brick-mold-item/fk-brick-mold-item.js",
6
- "components/fk-brick-not-found/fk-brick-not-found.js",
7
- "components/fk-brick-render/fk-brick-render.js",
8
- "components/fk-code-editor/fk-code-editor.js",
9
- "components/fk-data-grid/fk-data-grid.js",
10
- "components/fk-drop-area/fk-drop-area.js",
11
- "components/fk-empty-form/fk-empty-form.js",
12
- "components/fk-file-input/fk-file-input.js",
13
- "components/fk-form-builder/fk-form-builder.js",
14
- "components/fk-form-render/fk-form-render.js",
15
- "components/fk-property-panel/fk-property-panel.js",
16
- "components/fk-rules-editor/fk-rules-editor.js",
17
- "components/fk-select-input/fk-select-input.js",
18
- "components/fk-signature-input/fk-signature-input.js",
19
- "components/fk-stepper/fk-stepper.js",
20
- "components/fk-tabs/fk-tabs.js"
21
- ],
22
- "mixins": [],
23
- "compiler": {
24
- "name": "@stencil/core",
25
- "version": "4.43.5",
26
- "typescriptVersion": "5.8.3"
27
- },
28
- "collections": [],
29
- "bundles": []
30
- }
@@ -1,78 +0,0 @@
1
- .fk-actions {
2
- position: relative;
3
- padding: calc(var(--fk-spacing) / 2);
4
- border: 1px solid transparent;
5
- border-radius: var(--fk-radius);
6
- }
7
-
8
- .fk-actions:hover {
9
- border-color: var(--fk-color-border);
10
- }
11
-
12
- .fk-actions--selected,
13
- .fk-actions--selected:hover {
14
- border-color: var(--fk-color-primary);
15
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--fk-color-primary) 20%, transparent);
16
- }
17
-
18
- .fk-actions--dragging {
19
- opacity: 0.5;
20
- }
21
-
22
- .fk-actions--drop-before::before {
23
- content: '';
24
- position: absolute;
25
- top: -2px;
26
- left: 0;
27
- right: 0;
28
- height: 3px;
29
- border-radius: 2px;
30
- background: var(--fk-color-primary);
31
- }
32
-
33
- .fk-actions__toolbar {
34
- position: absolute;
35
- top: calc(var(--fk-spacing) / -2);
36
- right: var(--fk-spacing);
37
- z-index: 1;
38
- display: none;
39
- gap: 2px;
40
- padding: 2px;
41
- border: 1px solid var(--fk-color-border);
42
- border-radius: calc(var(--fk-radius) / 2);
43
- background: var(--fk-color-surface);
44
- box-shadow: 0 2px 6px var(--fk-color-shadow);
45
- }
46
-
47
- .fk-actions:hover > .fk-actions__toolbar {
48
- display: flex;
49
- }
50
-
51
- .fk-actions__button {
52
- display: inline-flex;
53
- align-items: center;
54
- justify-content: center;
55
- width: 24px;
56
- height: 24px;
57
- padding: 0;
58
- border: none;
59
- border-radius: calc(var(--fk-radius) / 2);
60
- background: transparent;
61
- color: var(--fk-color-muted);
62
- font-size: 0.8rem;
63
- cursor: pointer;
64
- }
65
-
66
- .fk-actions__button:hover {
67
- background: color-mix(in srgb, var(--fk-color-primary) 12%, transparent);
68
- color: var(--fk-color-primary);
69
- }
70
-
71
- .fk-actions__button--danger:hover {
72
- background: color-mix(in srgb, var(--fk-color-danger) 12%, transparent);
73
- color: var(--fk-color-danger);
74
- }
75
-
76
- .fk-actions__handle {
77
- cursor: grab;
78
- }
@@ -1,215 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { draggable, dropTargetForElements, } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
3
- import { toBrickDropDetail } from "../../utils/drop";
4
- import { fkT } from "../../i18n/i18n";
5
- export class FkBrickActions {
6
- constructor() {
7
- this.selected = false;
8
- this.isDragging = false;
9
- this.isDropTarget = false;
10
- this.cleanups = [];
11
- }
12
- componentDidLoad() {
13
- if (this.handleEl) {
14
- this.cleanups.push(draggable({
15
- element: this.handleEl,
16
- getInitialData: () => ({ kind: 'move-brick', path: this.path }),
17
- onDragStart: () => (this.isDragging = true),
18
- onDrop: () => (this.isDragging = false),
19
- }));
20
- }
21
- this.cleanups.push(dropTargetForElements({
22
- element: this.host,
23
- onDrag: ({ location }) => {
24
- var _a;
25
- return (this.isDropTarget =
26
- ((_a = location.current.dropTargets[0]) === null || _a === void 0 ? void 0 : _a.element) === this.host);
27
- },
28
- onDragLeave: () => (this.isDropTarget = false),
29
- onDrop: ({ source, location }) => {
30
- var _a;
31
- this.isDropTarget = false;
32
- if (((_a = location.current.dropTargets[0]) === null || _a === void 0 ? void 0 : _a.element) !== this.host)
33
- return;
34
- const segments = this.path.split('.');
35
- const detail = toBrickDropDetail(source.data, segments.slice(0, -1).join('.'), Number(segments[segments.length - 1]));
36
- if (detail)
37
- this.brickDrop.emit(detail);
38
- },
39
- }));
40
- }
41
- disconnectedCallback() {
42
- this.cleanups.forEach((cleanup) => cleanup());
43
- this.cleanups = [];
44
- }
45
- render() {
46
- return (h("div", { key: 'ea1cc1c7af646f403330c98b251714f3968c1aae', class: {
47
- 'fk-actions': true,
48
- 'fk-actions--dragging': this.isDragging,
49
- 'fk-actions--drop-before': this.isDropTarget,
50
- 'fk-actions--selected': this.selected,
51
- }, onClick: (event) => {
52
- event.stopPropagation();
53
- this.brickSelect.emit({ path: this.path });
54
- } }, h("div", { key: '99c08de8c78ff6362103f9e355ff6aa3da1367ee', class: "fk-actions__toolbar" }, h("button", { key: '8702b1f565ea639585614d4c6e88b2dc44c7ed7c', type: "button", class: "fk-actions__button fk-actions__handle", ref: (el) => (this.handleEl = el), title: fkT('actions.move') }, "\u283F"), h("button", { key: '7394adc36780dbd61195b69cd21fce3c8a852f2a', type: "button", class: "fk-actions__button", title: fkT('actions.duplicate'), onClick: (event) => {
55
- event.stopPropagation();
56
- this.brickDuplicate.emit({ path: this.path });
57
- } }, "\u29C9"), h("button", { key: 'ddea0decbc02a4b0627170c973ed19180aa6f651', type: "button", class: "fk-actions__button fk-actions__button--danger", title: fkT('actions.delete'), onClick: (event) => {
58
- event.stopPropagation();
59
- this.brickRemove.emit({ path: this.path });
60
- } }, "\u2715")), h("slot", { key: '44fa7c12a7581ff6b62f29fb1249d427594b5e1f' })));
61
- }
62
- static get is() { return "fk-brick-actions"; }
63
- static get encapsulation() { return "scoped"; }
64
- static get originalStyleUrls() {
65
- return {
66
- "$": ["fk-brick-actions.css"]
67
- };
68
- }
69
- static get styleUrls() {
70
- return {
71
- "$": ["fk-brick-actions.css"]
72
- };
73
- }
74
- static get properties() {
75
- return {
76
- "path": {
77
- "type": "string",
78
- "mutable": false,
79
- "complexType": {
80
- "original": "string",
81
- "resolved": "string",
82
- "references": {}
83
- },
84
- "required": true,
85
- "optional": false,
86
- "docs": {
87
- "tags": [],
88
- "text": ""
89
- },
90
- "getter": false,
91
- "setter": false,
92
- "reflect": false,
93
- "attribute": "path"
94
- },
95
- "selected": {
96
- "type": "boolean",
97
- "mutable": false,
98
- "complexType": {
99
- "original": "boolean",
100
- "resolved": "boolean",
101
- "references": {}
102
- },
103
- "required": false,
104
- "optional": false,
105
- "docs": {
106
- "tags": [],
107
- "text": ""
108
- },
109
- "getter": false,
110
- "setter": false,
111
- "reflect": false,
112
- "attribute": "selected",
113
- "defaultValue": "false"
114
- }
115
- };
116
- }
117
- static get states() {
118
- return {
119
- "isDragging": {},
120
- "isDropTarget": {}
121
- };
122
- }
123
- static get events() {
124
- return [{
125
- "method": "brickRemove",
126
- "name": "brickRemove",
127
- "bubbles": true,
128
- "cancelable": true,
129
- "composed": true,
130
- "docs": {
131
- "tags": [],
132
- "text": ""
133
- },
134
- "complexType": {
135
- "original": "BrickPathDetail",
136
- "resolved": "BrickPathDetail",
137
- "references": {
138
- "BrickPathDetail": {
139
- "location": "import",
140
- "path": "../../utils/events",
141
- "id": "src/utils/events.ts::BrickPathDetail",
142
- "referenceLocation": "BrickPathDetail"
143
- }
144
- }
145
- }
146
- }, {
147
- "method": "brickDuplicate",
148
- "name": "brickDuplicate",
149
- "bubbles": true,
150
- "cancelable": true,
151
- "composed": true,
152
- "docs": {
153
- "tags": [],
154
- "text": ""
155
- },
156
- "complexType": {
157
- "original": "BrickPathDetail",
158
- "resolved": "BrickPathDetail",
159
- "references": {
160
- "BrickPathDetail": {
161
- "location": "import",
162
- "path": "../../utils/events",
163
- "id": "src/utils/events.ts::BrickPathDetail",
164
- "referenceLocation": "BrickPathDetail"
165
- }
166
- }
167
- }
168
- }, {
169
- "method": "brickDrop",
170
- "name": "brickDrop",
171
- "bubbles": true,
172
- "cancelable": true,
173
- "composed": true,
174
- "docs": {
175
- "tags": [],
176
- "text": ""
177
- },
178
- "complexType": {
179
- "original": "BrickDropDetail",
180
- "resolved": "BrickDropDetail",
181
- "references": {
182
- "BrickDropDetail": {
183
- "location": "import",
184
- "path": "../../utils/events",
185
- "id": "src/utils/events.ts::BrickDropDetail",
186
- "referenceLocation": "BrickDropDetail"
187
- }
188
- }
189
- }
190
- }, {
191
- "method": "brickSelect",
192
- "name": "brickSelect",
193
- "bubbles": true,
194
- "cancelable": true,
195
- "composed": true,
196
- "docs": {
197
- "tags": [],
198
- "text": ""
199
- },
200
- "complexType": {
201
- "original": "BrickPathDetail",
202
- "resolved": "BrickPathDetail",
203
- "references": {
204
- "BrickPathDetail": {
205
- "location": "import",
206
- "path": "../../utils/events",
207
- "id": "src/utils/events.ts::BrickPathDetail",
208
- "referenceLocation": "BrickPathDetail"
209
- }
210
- }
211
- }
212
- }];
213
- }
214
- static get elementRef() { return "host"; }
215
- }
@@ -1,71 +0,0 @@
1
- .fk-palette {
2
- display: flex;
3
- flex-direction: column;
4
- gap: var(--fk-spacing);
5
- font-family: var(--fk-font);
6
- }
7
-
8
- .fk-palette__search {
9
- font: inherit;
10
- font-size: 0.85rem;
11
- padding: calc(var(--fk-spacing) / 1.5) var(--fk-spacing);
12
- border: 1px solid var(--fk-color-border);
13
- border-radius: calc(var(--fk-radius) / 1.5);
14
- background: var(--fk-color-surface);
15
- color: var(--fk-color-text);
16
- }
17
-
18
- .fk-palette__search:focus {
19
- outline: none;
20
- border-color: var(--fk-color-primary);
21
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--fk-color-primary) 20%, transparent);
22
- }
23
-
24
- .fk-palette__category {
25
- display: flex;
26
- align-items: center;
27
- gap: calc(var(--fk-spacing) / 2);
28
- width: 100%;
29
- margin: 0 0 calc(var(--fk-spacing) / 2);
30
- padding: calc(var(--fk-spacing) / 2) 0;
31
- border: none;
32
- background: transparent;
33
- font: inherit;
34
- font-size: 0.7rem;
35
- font-weight: 700;
36
- letter-spacing: 0.08em;
37
- text-transform: uppercase;
38
- color: var(--fk-color-muted);
39
- cursor: pointer;
40
- }
41
-
42
- .fk-palette__category:hover {
43
- color: var(--fk-color-text);
44
- }
45
-
46
- .fk-palette__chevron {
47
- display: inline-block;
48
- transition: transform 120ms ease;
49
- }
50
-
51
- .fk-palette__chevron--collapsed {
52
- transform: rotate(-90deg);
53
- }
54
-
55
- .fk-palette__count {
56
- margin-left: auto;
57
- font-weight: 600;
58
- color: var(--fk-color-muted);
59
- }
60
-
61
- .fk-palette__items {
62
- display: grid;
63
- grid-template-columns: repeat(2, minmax(0, 1fr));
64
- gap: calc(var(--fk-spacing) / 2);
65
- }
66
-
67
- .fk-palette__empty {
68
- margin: 0;
69
- font-size: 0.8rem;
70
- color: var(--fk-color-muted);
71
- }
@@ -1,55 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- import { getBrickMoldsGroupedByCategory } from "../../registry/registry";
3
- import { fkT, fkTOr } from "../../i18n/i18n";
4
- export class FkBrickList {
5
- constructor() {
6
- this.query = '';
7
- this.collapsed = {};
8
- }
9
- toggle(category) {
10
- this.collapsed = Object.assign(Object.assign({}, this.collapsed), { [category]: !this.collapsed[category] });
11
- }
12
- render() {
13
- const grouped = getBrickMoldsGroupedByCategory();
14
- const query = this.query.trim().toLowerCase();
15
- const filtered = Object.entries(grouped)
16
- .map(([category, molds]) => ({
17
- category,
18
- molds: query
19
- ? molds.filter((mold) => [
20
- mold.name,
21
- fkTOr(`brick.${mold.id}.name`, mold.name),
22
- mold.id,
23
- category,
24
- fkTOr(`category.${category}`, category),
25
- ].some((candidate) => candidate.toLowerCase().includes(query)))
26
- : molds,
27
- }))
28
- .filter((group) => group.molds.length > 0);
29
- return (h(Host, { key: '93facfae49363bb2fe1ceeb5ab84105fc5f339fa' }, h("div", { key: 'dc68df2c48929c7e5d6c4037b755761f0f581898', class: "fk-palette" }, h("input", { key: '6acf14db7433b4a4bfb4cca2ca0fd51465785d7f', class: "fk-palette__search", type: "search", placeholder: fkT('palette.search'), value: this.query, onInput: (event) => (this.query = event.target.value) }), filtered.map(({ category, molds }) => {
30
- const isCollapsed = !query && this.collapsed[category];
31
- return (h("section", { class: "fk-palette__group", key: category }, h("button", { type: "button", class: "fk-palette__category", onClick: () => this.toggle(category) }, h("span", { class: {
32
- 'fk-palette__chevron': true,
33
- 'fk-palette__chevron--collapsed': isCollapsed,
34
- } }, "\u25BE"), fkTOr(`category.${category}`, category), h("span", { class: "fk-palette__count" }, molds.length)), !isCollapsed ? (h("div", { class: "fk-palette__items" }, molds.map((mold) => (h("fk-brick-mold-item", { brickMold: mold, key: `${mold.type}:${mold.id}` }))))) : null));
35
- }), filtered.length === 0 ? (h("p", { class: "fk-palette__empty" }, fkT('palette.empty', { query: this.query }))) : null)));
36
- }
37
- static get is() { return "fk-brick-list"; }
38
- static get encapsulation() { return "scoped"; }
39
- static get originalStyleUrls() {
40
- return {
41
- "$": ["fk-brick-list.css"]
42
- };
43
- }
44
- static get styleUrls() {
45
- return {
46
- "$": ["fk-brick-list.css"]
47
- };
48
- }
49
- static get states() {
50
- return {
51
- "query": {},
52
- "collapsed": {}
53
- };
54
- }
55
- }
@@ -1,33 +0,0 @@
1
- :host {
2
- display: block;
3
- cursor: grab;
4
- min-width: 0;
5
- }
6
-
7
- .fk-mold {
8
- display: flex;
9
- align-items: center;
10
- padding: calc(var(--fk-spacing) / 1.5) var(--fk-spacing);
11
- border: 1px solid var(--fk-color-border);
12
- border-radius: calc(var(--fk-radius) / 1.5);
13
- background: var(--fk-color-surface);
14
- font-size: 0.8rem;
15
- transition: border-color 120ms ease, box-shadow 120ms ease;
16
- }
17
-
18
- .fk-mold:hover {
19
- border-color: var(--fk-color-primary);
20
- box-shadow: 0 1px 4px var(--fk-color-shadow);
21
- }
22
-
23
- .fk-mold--dragging {
24
- opacity: 0.5;
25
- }
26
-
27
- .fk-mold__name {
28
- font-weight: 500;
29
- color: var(--fk-color-text);
30
- overflow: hidden;
31
- text-overflow: ellipsis;
32
- white-space: nowrap;
33
- }
@@ -1,73 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { draggable } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
3
- import { fkTOr } from "../../i18n/i18n";
4
- export class FkBrickMoldItem {
5
- constructor() {
6
- this.isDragging = false;
7
- }
8
- componentDidLoad() {
9
- this.cleanup = draggable({
10
- element: this.host,
11
- getInitialData: () => ({
12
- kind: 'new-brick',
13
- moldType: this.brickMold.type,
14
- moldId: this.brickMold.id,
15
- }),
16
- onDragStart: () => (this.isDragging = true),
17
- onDrop: () => (this.isDragging = false),
18
- });
19
- }
20
- disconnectedCallback() {
21
- var _a;
22
- (_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
23
- }
24
- render() {
25
- return (h("div", { key: '0570015fb47b6be613f900a333b061537006edec', class: { 'fk-mold': true, 'fk-mold--dragging': this.isDragging }, title: fkTOr(`brick.${this.brickMold.id}.name`, this.brickMold.name) }, h("span", { key: 'bf3ab329f7a4b054c56e042dd83822706546c93b', class: "fk-mold__name" }, fkTOr(`brick.${this.brickMold.id}.name`, this.brickMold.name))));
26
- }
27
- static get is() { return "fk-brick-mold-item"; }
28
- static get encapsulation() { return "scoped"; }
29
- static get originalStyleUrls() {
30
- return {
31
- "$": ["fk-brick-mold-item.css"]
32
- };
33
- }
34
- static get styleUrls() {
35
- return {
36
- "$": ["fk-brick-mold-item.css"]
37
- };
38
- }
39
- static get properties() {
40
- return {
41
- "brickMold": {
42
- "type": "unknown",
43
- "mutable": false,
44
- "complexType": {
45
- "original": "BrickMold",
46
- "resolved": "BrickMold",
47
- "references": {
48
- "BrickMold": {
49
- "location": "import",
50
- "path": "@streamline-pulse/formkrafter-core",
51
- "id": "../core/dist/index.d.ts::BrickMold",
52
- "referenceLocation": "BrickMold"
53
- }
54
- }
55
- },
56
- "required": true,
57
- "optional": false,
58
- "docs": {
59
- "tags": [],
60
- "text": ""
61
- },
62
- "getter": false,
63
- "setter": false
64
- }
65
- };
66
- }
67
- static get states() {
68
- return {
69
- "isDragging": {}
70
- };
71
- }
72
- static get elementRef() { return "host"; }
73
- }
@@ -1,8 +0,0 @@
1
- .fk-not-found {
2
- margin: 0;
3
- padding: calc(var(--fk-spacing) * 1.5);
4
- border: 1px dashed var(--fk-color-danger);
5
- border-radius: var(--fk-radius);
6
- color: var(--fk-color-danger);
7
- font-size: 0.875rem;
8
- }
@@ -1,18 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- export class FkBrickNotFound {
3
- render() {
4
- return (h(Host, { key: '558231ac77ac07f7b40bd08081a498dc5623442c' }, h("p", { key: 'f1ca1f59750c6ed2b1a3c2e22bd6f7f1dc721496', class: "fk-not-found" }, "Brick ", h("slot", { key: '0003d9dcc23c52cb8d466d794eafd4dd6be4b708' }), " not found")));
5
- }
6
- static get is() { return "fk-brick-not-found"; }
7
- static get encapsulation() { return "scoped"; }
8
- static get originalStyleUrls() {
9
- return {
10
- "$": ["fk-brick-not-found.css"]
11
- };
12
- }
13
- static get styleUrls() {
14
- return {
15
- "$": ["fk-brick-not-found.css"]
16
- };
17
- }
18
- }