@streamline-pulse/formkrafter-wc 0.2.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 (161) 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-not-found.js +1 -1
  6. package/dist/components/fk-brick-render.js +1 -1
  7. package/dist/components/fk-code-editor.js +1 -1
  8. package/dist/components/fk-data-grid.js +1 -1
  9. package/dist/components/fk-drop-area.js +1 -1
  10. package/dist/components/fk-empty-form.js +1 -1
  11. package/dist/components/fk-file-input.js +1 -1
  12. package/dist/components/fk-form-builder.js +1 -1
  13. package/dist/components/fk-form-render.js +1 -1
  14. package/dist/components/fk-property-panel.js +1 -1
  15. package/dist/components/fk-rules-editor.js +1 -1
  16. package/dist/components/fk-select-input.js +1 -1
  17. package/dist/components/fk-signature-input.js +1 -1
  18. package/dist/components/fk-stepper.js +1 -1
  19. package/dist/components/fk-tabs.js +1 -1
  20. package/dist/components/index.js +1 -1
  21. package/dist/components/{p-LXnm2ogM.js → p-28GBFlUX.js} +4 -4
  22. package/dist/components/p-BB4Llg42.js +1 -0
  23. package/dist/components/p-BGxmFcpL.js +1 -0
  24. package/dist/components/{p-BVBfbMl_.js → p-BInUBjyw.js} +1 -1
  25. package/dist/components/p-BietHxaT.js +1 -0
  26. package/dist/components/{p-C85zhhpr.js → p-BnzSarwW.js} +1 -1
  27. package/dist/components/p-BpkKcCCr.js +1 -0
  28. package/dist/components/p-C0Y8qh8R.js +1 -0
  29. package/dist/components/p-C5OWoRhO.js +1 -0
  30. package/dist/components/p-CKs1CWVz.js +1 -0
  31. package/dist/components/{p-BSPTuA1p.js → p-CZHykCYD.js} +1 -1
  32. package/dist/components/p-CehxuHtl.js +1 -0
  33. package/dist/components/p-CqVSd56Z.js +1 -0
  34. package/dist/components/p-CyZA17qf.js +1 -0
  35. package/dist/components/p-D4HhZxQ-.js +1 -0
  36. package/dist/components/p-DC6Wxbnz.js +1 -0
  37. package/dist/components/p-DRNycSdI.js +1 -0
  38. package/dist/components/{p-B0YjIsVn.js → p-Dh5Z49YD.js} +1 -1
  39. package/dist/components/p-DiOstAi9.js +1 -0
  40. package/dist/components/p-DlqnIm46.js +1 -0
  41. package/dist/components/{p-BDvqHJih.js → p-DshUS8Zm.js} +1 -1
  42. package/dist/components/p-DtcM1yw5.js +1 -0
  43. package/dist/components/p-NDbmiiYk.js +1 -0
  44. package/dist/components/p-RzeBwfwG.js +1 -0
  45. package/dist/components/p-ajy8ZcBX.js +1 -0
  46. package/dist/components/p-kYG3E0GQ.js +1 -0
  47. package/dist/components/p-tTJg_I4V.js +1 -0
  48. package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
  49. package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
  50. package/dist/formkrafter-wc/index.esm.js +1 -1
  51. package/dist/formkrafter-wc/p-3579150a.entry.js +1 -0
  52. package/dist/formkrafter-wc/p-8b0ff66e.entry.js +1 -0
  53. package/dist/formkrafter-wc/p-BHZMDq2e.js +1 -0
  54. package/dist/formkrafter-wc/p-BietHxaT.js +1 -0
  55. package/dist/formkrafter-wc/p-C0Y8qh8R.js +1 -0
  56. package/dist/formkrafter-wc/p-CehxuHtl.js +1 -0
  57. package/dist/formkrafter-wc/p-DlqnIm46.js +1 -0
  58. package/dist/formkrafter-wc/p-DtcM1yw5.js +1 -0
  59. package/dist/formkrafter-wc/p-RzeBwfwG.js +1 -0
  60. package/dist/formkrafter-wc/p-WWmY5Z05.js +1 -0
  61. package/dist/formkrafter-wc/p-hcT25XX4.js +12 -0
  62. package/dist/formkrafter-wc/p-qLZlXROB.js +2 -0
  63. package/dist/types/components/fk-code-editor/fk-code-editor.d.ts +3 -1
  64. package/dist/types/components/fk-data-grid/fk-data-grid.d.ts +1 -0
  65. package/dist/types/components/fk-drop-area/fk-drop-area.d.ts +1 -0
  66. package/dist/types/components/fk-file-input/fk-file-input.d.ts +7 -3
  67. package/dist/types/components/fk-form-render/fk-form-render.d.ts +7 -1
  68. package/dist/types/components/fk-select-input/fk-select-input.d.ts +9 -0
  69. package/dist/types/components.d.ts +39 -4
  70. package/dist/types/index.d.ts +1 -1
  71. package/dist/types/registry/default-bricks.d.ts +36 -0
  72. package/dist/types/utils/mask.d.ts +1 -0
  73. package/package.json +10 -15
  74. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  75. package/dist/cjs/fk-brick-actions_18.cjs.entry.js +0 -26443
  76. package/dist/cjs/formkrafter-wc.cjs.js +0 -25
  77. package/dist/cjs/index-Can2MpG5.js +0 -17538
  78. package/dist/cjs/index-CbyFxLc_.js +0 -2114
  79. package/dist/cjs/index.cjs.js +0 -48
  80. package/dist/cjs/loader.cjs.js +0 -13
  81. package/dist/collection/collection-manifest.json +0 -30
  82. package/dist/collection/components/fk-brick-actions/fk-brick-actions.css +0 -78
  83. package/dist/collection/components/fk-brick-actions/fk-brick-actions.js +0 -215
  84. package/dist/collection/components/fk-brick-list/fk-brick-list.css +0 -71
  85. package/dist/collection/components/fk-brick-list/fk-brick-list.js +0 -55
  86. package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.css +0 -33
  87. package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.js +0 -73
  88. package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.css +0 -8
  89. package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.js +0 -18
  90. package/dist/collection/components/fk-brick-render/fk-brick-render.js +0 -447
  91. package/dist/collection/components/fk-code-editor/fk-code-editor.css +0 -26
  92. package/dist/collection/components/fk-code-editor/fk-code-editor.js +0 -136
  93. package/dist/collection/components/fk-data-grid/fk-data-grid.css +0 -75
  94. package/dist/collection/components/fk-data-grid/fk-data-grid.js +0 -300
  95. package/dist/collection/components/fk-drop-area/fk-drop-area.css +0 -18
  96. package/dist/collection/components/fk-drop-area/fk-drop-area.js +0 -98
  97. package/dist/collection/components/fk-empty-form/fk-empty-form.css +0 -22
  98. package/dist/collection/components/fk-empty-form/fk-empty-form.js +0 -19
  99. package/dist/collection/components/fk-file-input/fk-file-input.css +0 -95
  100. package/dist/collection/components/fk-file-input/fk-file-input.js +0 -196
  101. package/dist/collection/components/fk-form-builder/fk-form-builder.css +0 -112
  102. package/dist/collection/components/fk-form-builder/fk-form-builder.js +0 -431
  103. package/dist/collection/components/fk-form-render/fk-form-render.css +0 -7
  104. package/dist/collection/components/fk-form-render/fk-form-render.js +0 -352
  105. package/dist/collection/components/fk-property-panel/fk-property-panel.css +0 -153
  106. package/dist/collection/components/fk-property-panel/fk-property-panel.js +0 -384
  107. package/dist/collection/components/fk-rules-editor/fk-rules-editor.css +0 -166
  108. package/dist/collection/components/fk-rules-editor/fk-rules-editor.js +0 -250
  109. package/dist/collection/components/fk-select-input/fk-select-input.css +0 -144
  110. package/dist/collection/components/fk-select-input/fk-select-input.js +0 -356
  111. package/dist/collection/components/fk-signature-input/fk-signature-input.css +0 -42
  112. package/dist/collection/components/fk-signature-input/fk-signature-input.js +0 -158
  113. package/dist/collection/components/fk-stepper/fk-stepper.css +0 -85
  114. package/dist/collection/components/fk-stepper/fk-stepper.js +0 -282
  115. package/dist/collection/components/fk-tabs/fk-tabs.css +0 -38
  116. package/dist/collection/components/fk-tabs/fk-tabs.js +0 -236
  117. package/dist/collection/i18n/i18n.js +0 -257
  118. package/dist/collection/index.js +0 -5
  119. package/dist/collection/registry/create-brick.js +0 -34
  120. package/dist/collection/registry/default-bricks.js +0 -562
  121. package/dist/collection/registry/registry.js +0 -44
  122. package/dist/collection/utils/brick-data.js +0 -16
  123. package/dist/collection/utils/drop.js +0 -14
  124. package/dist/collection/utils/events.js +0 -1
  125. package/dist/collection/utils/options.js +0 -21
  126. package/dist/collection/utils/remote.js +0 -27
  127. package/dist/collection/utils/rule-condition.js +0 -72
  128. package/dist/collection/utils/style.js +0 -11
  129. package/dist/components/p-B1t0M_hN.js +0 -1
  130. package/dist/components/p-B21cOFRx.js +0 -1
  131. package/dist/components/p-B7ED8qMb.js +0 -1
  132. package/dist/components/p-BrOXMyOG.js +0 -1
  133. package/dist/components/p-CMQ_4Zfv.js +0 -1
  134. package/dist/components/p-CWQX0sXS.js +0 -1
  135. package/dist/components/p-CXEvsomA.js +0 -1
  136. package/dist/components/p-Cq9HSEn8.js +0 -1
  137. package/dist/components/p-D7bf2ztq.js +0 -1
  138. package/dist/components/p-DIPoAaGe.js +0 -1
  139. package/dist/components/p-DYBirEew.js +0 -1
  140. package/dist/components/p-DluDp8V5.js +0 -1
  141. package/dist/components/p-Do6-yRva.js +0 -1
  142. package/dist/components/p-GjmAhT2E.js +0 -1
  143. package/dist/components/p-y0xDvzJR.js +0 -1
  144. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  145. package/dist/esm/fk-brick-actions_18.entry.js +0 -26424
  146. package/dist/esm/formkrafter-wc.js +0 -21
  147. package/dist/esm/index-BB2OOj__.js +0 -17478
  148. package/dist/esm/index-DMDO6w5-.js +0 -2105
  149. package/dist/esm/index.js +0 -2
  150. package/dist/esm/loader.js +0 -11
  151. package/dist/formkrafter-wc/p-0de7cbe1.entry.js +0 -1
  152. package/dist/formkrafter-wc/p-Bp_A8oL5.js +0 -12
  153. package/dist/formkrafter-wc/p-DMDO6w5-.js +0 -2
  154. package/dist/index.cjs.js +0 -1
  155. package/dist/index.js +0 -1
  156. package/dist/stencil.config.js +0 -34
  157. package/loader/cdn.js +0 -1
  158. package/loader/index.cjs.js +0 -1
  159. package/loader/index.d.ts +0 -24
  160. package/loader/index.es2017.js +0 -1
  161. package/loader/index.js +0 -2
@@ -1,27 +0,0 @@
1
- export function interpolateTemplate(template, dataMap) {
2
- return template.replace(/\{(\w+)\}/g, (_, token) => {
3
- const value = dataMap === null || dataMap === void 0 ? void 0 : dataMap[token];
4
- return value === undefined || value === null ? '' : String(value);
5
- });
6
- }
7
- export function parseHeaderLines(raw, dataMap) {
8
- if (typeof raw !== 'string' || !raw.trim())
9
- return undefined;
10
- const headers = {};
11
- for (const line of raw.split('\n')) {
12
- const separator = line.indexOf(':');
13
- if (separator <= 0)
14
- continue;
15
- const name = line.slice(0, separator).trim();
16
- const value = interpolateTemplate(line.slice(separator + 1).trim(), dataMap);
17
- if (name)
18
- headers[name] = value;
19
- }
20
- return Object.keys(headers).length ? headers : undefined;
21
- }
22
- export function appendSearchParam(url, param, term) {
23
- if (!term)
24
- return url;
25
- const separator = url.includes('?') ? '&' : '?';
26
- return `${url}${separator}${encodeURIComponent(param)}=${encodeURIComponent(term)}`;
27
- }
@@ -1,72 +0,0 @@
1
- export const OPERATORS = [
2
- { id: 'equals', label: 'equals' },
3
- { id: 'notEquals', label: 'does not equal' },
4
- { id: 'greaterThan', label: 'is greater than' },
5
- { id: 'lessThan', label: 'is less than' },
6
- { id: 'isEmpty', label: 'is empty' },
7
- { id: 'isNotEmpty', label: 'is not empty' },
8
- ];
9
- export function buildLogic(condition) {
10
- const variable = { var: condition.field };
11
- switch (condition.operator) {
12
- case 'equals':
13
- return { '==': [variable, condition.value] };
14
- case 'notEquals':
15
- return { '!=': [variable, condition.value] };
16
- case 'greaterThan':
17
- return { '>': [variable, condition.value] };
18
- case 'lessThan':
19
- return { '<': [variable, condition.value] };
20
- case 'isEmpty':
21
- return { '!': variable };
22
- case 'isNotEmpty':
23
- return { '!!': variable };
24
- }
25
- }
26
- const varName = (value) => value !== null &&
27
- typeof value === 'object' &&
28
- typeof value.var === 'string'
29
- ? value.var
30
- : undefined;
31
- const BINARY_OPERATORS = {
32
- '==': 'equals',
33
- '!=': 'notEquals',
34
- '>': 'greaterThan',
35
- '<': 'lessThan',
36
- };
37
- export function parseLogic(logic) {
38
- if (!logic || typeof logic !== 'object')
39
- return undefined;
40
- const entries = Object.entries(logic);
41
- if (entries.length !== 1)
42
- return undefined;
43
- const [operator, args] = entries[0];
44
- if (operator === '!' || operator === '!!') {
45
- const field = varName(Array.isArray(args) ? args[0] : args);
46
- if (!field)
47
- return undefined;
48
- return { field, operator: operator === '!' ? 'isEmpty' : 'isNotEmpty' };
49
- }
50
- const mapped = BINARY_OPERATORS[operator];
51
- if (!mapped || !Array.isArray(args) || args.length !== 2)
52
- return undefined;
53
- const field = varName(args[0]);
54
- if (!field)
55
- return undefined;
56
- return { field, operator: mapped, value: args[1] };
57
- }
58
- export function parseValueInput(raw) {
59
- if (raw === '')
60
- return '';
61
- try {
62
- return JSON.parse(raw);
63
- }
64
- catch (_a) {
65
- return raw;
66
- }
67
- }
68
- export function formatValue(value) {
69
- if (value === undefined)
70
- return '';
71
- return typeof value === 'string' ? value : JSON.stringify(value);
72
- }
@@ -1,11 +0,0 @@
1
- const toCamel = (key) => key.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
2
- export function asInlineStyle(styles) {
3
- const entries = Object.entries(styles !== null && styles !== void 0 ? styles : {}).filter(([, value]) => value !== undefined && value !== null && value !== '');
4
- if (entries.length === 0)
5
- return undefined;
6
- const result = {};
7
- for (const [key, value] of entries) {
8
- result[toCamel(key)] = String(value);
9
- }
10
- return result;
11
- }